From: Tony Lindgren <tony@atomide.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-omap@vger.kernel.org, alsa-devel@alsa-project.org,
Misael Lopez Cruz <misael.lopez@ti.com>,
Benoit Cousson <b-cousson@ti.com>,
Sebastien Guiriec <s-guiriec@ti.com>
Subject: Re: [PATCH 1/4] OMAP: McPDM: Convert McPDM device to omap_device
Date: Fri, 19 Aug 2011 16:02:01 +0300 [thread overview]
Message-ID: <20110819130200.GD4996@atomide.com> (raw)
In-Reply-To: <1312284857-1774-2-git-send-email-peter.ujfalusi@ti.com>
* Peter Ujfalusi <peter.ujfalusi@ti.com> [110802 14:28]:
> McPDM device is converted to omap device.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Jorge Eduardo Candelaria
> Signed-off-by: Margarita Olaya Cabrera
> Signed-off-by: Liam Girdwood <lrg@ti.com>
> Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/devices.c | 33 +++++++++++++++++++++++++++++++++
> arch/arm/plat-omap/devices.c | 36 ------------------------------------
> 2 files changed, 33 insertions(+), 36 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 5b8ca68..d94e845 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -329,6 +329,38 @@ static void omap_init_audio(void)
> static inline void omap_init_audio(void) {}
> #endif
>
> +#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
> + defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
> +
> +static struct omap_device_pm_latency omap_mcpdm_latency[] = {
> + {
> + .deactivate_func = omap_device_idle_hwmods,
> + .activate_func = omap_device_enable_hwmods,
> + .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
> + },
> +};
> +
> +static void omap_init_mcpdm(void)
> +{
> + struct omap_hwmod *oh;
> + struct omap_device *od;
> +
> + oh = omap_hwmod_lookup("mcpdm");
> + if (!oh) {
> + printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
> + return;
> + }
> +
> + od = omap_device_build("omap-mcpdm", -1, oh, NULL, 0,
> + omap_mcpdm_latency,
> + ARRAY_SIZE(omap_mcpdm_latency), 0);
> + if (IS_ERR(od))
> + printk(KERN_ERR "Could not build omap_device for omap-mcpdm-dai\n");
> +}
> +#else
> +static inline void omap_init_mcpdm(void) {}
> +#endif
> +
> #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
>
> #include <plat/mcspi.h>
> @@ -682,6 +714,7 @@ static int __init omap2_init_devices(void)
> * in alphabetical order so they're easier to sort through.
> */
> omap_init_audio();
> + omap_init_mcpdm();
> omap_init_camera();
> omap_init_mbox();
> omap_init_mcspi();
> diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> index ea28f98..40eca9b 100644
> --- a/arch/arm/plat-omap/devices.c
> +++ b/arch/arm/plat-omap/devices.c
> @@ -74,41 +74,6 @@ void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
>
> /*-------------------------------------------------------------------------*/
>
> -#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
> - defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
> -
> -static struct resource mcpdm_resources[] = {
> - {
> - .name = "mcpdm_mem",
> - .start = OMAP44XX_MCPDM_BASE,
> - .end = OMAP44XX_MCPDM_BASE + SZ_4K,
> - .flags = IORESOURCE_MEM,
> - },
> - {
> - .name = "mcpdm_irq",
> - .start = OMAP44XX_IRQ_MCPDM,
> - .end = OMAP44XX_IRQ_MCPDM,
> - .flags = IORESOURCE_IRQ,
> - },
> -};
> -
> -static struct platform_device omap_mcpdm_device = {
> - .name = "omap-mcpdm",
> - .id = -1,
> - .num_resources = ARRAY_SIZE(mcpdm_resources),
> - .resource = mcpdm_resources,
> -};
> -
> -static void omap_init_mcpdm(void)
> -{
> - (void) platform_device_register(&omap_mcpdm_device);
> -}
> -#else
> -static inline void omap_init_mcpdm(void) {}
> -#endif
> -
> -/*-------------------------------------------------------------------------*/
> -
> #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
> defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
>
> @@ -291,7 +256,6 @@ static int __init omap_init_devices(void)
> * in alphabetical order so they're easier to sort through.
> */
> omap_init_rng();
> - omap_init_mcpdm();
> omap_init_uwire();
> return 0;
> }
> --
> 1.7.6
>
next prev parent reply other threads:[~2011-08-19 13:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 11:34 [PATCH 0/4] ASoC: OMAP4: McPDM: Fix legacy support Peter Ujfalusi
2011-08-02 11:34 ` [PATCH 1/4] OMAP: McPDM: Convert McPDM device to omap_device Peter Ujfalusi
2011-08-19 13:02 ` Tony Lindgren [this message]
2011-08-02 11:34 ` [PATCH 2/4] OMAP4: hwmod: enable mcpdm hwmod device Peter Ujfalusi
2011-08-19 13:02 ` Tony Lindgren
2011-08-02 11:34 ` [PATCH 3/4] ASoC: omap-mcpdm: Fix threshold and dma configuration Peter Ujfalusi
2011-08-02 15:50 ` Mark Brown
2011-08-02 11:34 ` [PATCH 4/4] ASoC: OMAP4: McPDM: Convert to hwmod/omap_device Peter Ujfalusi
2011-08-02 16:07 ` Mark Brown
2011-08-03 7:58 ` [alsa-devel] " Péter Ujfalusi
2011-08-09 7:27 ` [alsa-devel] [PATCH 0/4] ASoC: OMAP4: McPDM: Fix legacy support Péter Ujfalusi
2011-08-15 11:28 ` Péter Ujfalusi
2011-08-19 13:04 ` Re: [alsa-devel] " Tony Lindgren
2011-08-22 7:13 ` Péter Ujfalusi
2011-08-22 7:38 ` Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110819130200.GD4996@atomide.com \
--to=tony@atomide.com \
--cc=alsa-devel@alsa-project.org \
--cc=b-cousson@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@ti.com \
--cc=misael.lopez@ti.com \
--cc=peter.ujfalusi@ti.com \
--cc=s-guiriec@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.