|
@@ -319,3 +319,96 @@ static void omap_init_audio(void)
|
|
platform_device_register(&omap_pcm);
|
|
platform_device_register(&omap_pcm);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#else
|
|
|
|
+static inline void omap_init_audio(void) {}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
|
|
|
|
+ defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
|
|
|
|
+
|
|
|
|
+static void __init omap_init_mcpdm(void)
|
|
|
|
+{
|
|
|
|
+ struct omap_hwmod *oh;
|
|
|
|
+ struct platform_device *pdev;
|
|
|
|
+
|
|
|
|
+ oh = omap_hwmod_lookup("mcpdm");
|
|
|
|
+ if (!oh) {
|
|
|
|
+ printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0, NULL, 0, 0);
|
|
|
|
+ WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+static inline void omap_init_mcpdm(void) {}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_SND_OMAP_SOC_DMIC) || \
|
|
|
|
+ defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE)
|
|
|
|
+
|
|
|
|
+static void __init omap_init_dmic(void)
|
|
|
|
+{
|
|
|
|
+ struct omap_hwmod *oh;
|
|
|
|
+ struct platform_device *pdev;
|
|
|
|
+
|
|
|
|
+ oh = omap_hwmod_lookup("dmic");
|
|
|
|
+ if (!oh) {
|
|
|
|
+ pr_err("Could not look up dmic hw_mod\n");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0, NULL, 0, 0);
|
|
|
|
+ WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n");
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+static inline void omap_init_dmic(void) {}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
|
|
|
|
+ defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
|
|
|
|
+
|
|
|
|
+static struct platform_device omap_hdmi_audio = {
|
|
|
|
+ .name = "omap-hdmi-audio",
|
|
|
|
+ .id = -1,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static void __init omap_init_hdmi_audio(void)
|
|
|
|
+{
|
|
|
|
+ struct omap_hwmod *oh;
|
|
|
|
+ struct platform_device *pdev;
|
|
|
|
+
|
|
|
|
+ oh = omap_hwmod_lookup("dss_hdmi");
|
|
|
|
+ if (!oh) {
|
|
|
|
+ printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ pdev = omap_device_build("omap-hdmi-audio-dai",
|
|
|
|
+ -1, oh, NULL, 0, NULL, 0, 0);
|
|
|
|
+ WARN(IS_ERR(pdev),
|
|
|
|
+ "Can't build omap_device for omap-hdmi-audio-dai.\n");
|
|
|
|
+
|
|
|
|
+ platform_device_register(&omap_hdmi_audio);
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+static inline void omap_init_hdmi_audio(void) {}
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
|
|
|
|
+
|
|
|
|
+#include <linux/platform_data/spi-omap2-mcspi.h>
|
|
|
|
+
|
|
|
|
+static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused)
|
|
|
|
+{
|
|
|
|
+ struct platform_device *pdev;
|
|
|
|
+ char *name = "omap2_mcspi";
|
|
|
|
+ struct omap2_mcspi_platform_config *pdata;
|
|
|
|
+ static int spi_num;
|
|
|
|
+ struct omap2_mcspi_dev_attr *mcspi_attrib = oh->dev_attr;
|
|
|
|
+
|
|
|
|
+ pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
|
|
|
|
+ if (!pdata) {
|
|
|
|
+ pr_err("Memory allocation for McSPI device failed\n");
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+ }
|