From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] ARM: mx5: dynamically allocate imx2-wdt devices
Date: Fri, 26 Nov 2010 12:37:28 +0100 [thread overview]
Message-ID: <20101126113728.GE27637@pengutronix.de> (raw)
In-Reply-To: <1290724946-23516-2-git-send-email-user@fabio-desktop>
On Thu, Nov 25, 2010 at 08:42:26PM -0200, Fabio Estevam wrote:
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Thanks
Uwe
> ---
> arch/arm/mach-mx5/devices-imx51.h | 4 ++++
> arch/arm/mach-mx5/devices.c | 15 ---------------
> arch/arm/mach-mx5/devices.h | 1 -
> arch/arm/plat-mxc/devices/platform-imx2-wdt.c | 5 +++++
> 4 files changed, 9 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
> index 01b71ef..939d2e8 100644
> --- a/arch/arm/mach-mx5/devices-imx51.h
> +++ b/arch/arm/mach-mx5/devices-imx51.h
> @@ -43,3 +43,7 @@ extern const struct imx_spi_imx_data imx51_cspi_data __initconst;
> extern const struct imx_spi_imx_data imx51_ecspi_data[] __initconst;
> #define imx51_add_ecspi(id, pdata) \
> imx_add_spi_imx(&imx51_ecspi_data[id], pdata)
> +
> +extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data __initconst;
> +#define imx51_imx2_wdt_data(pdata) \
> + imx_add_imx2_wdt_data(&imx51_imx2_wdt_data, pdata)
> diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c
> index d926203..ac55f7f 100644
> --- a/arch/arm/mach-mx5/devices.c
> +++ b/arch/arm/mach-mx5/devices.c
> @@ -97,21 +97,6 @@ struct platform_device mxc_usbh1_device = {
> },
> };
>
> -static struct resource mxc_wdt_resources[] = {
> - {
> - .start = MX51_WDOG_BASE_ADDR,
> - .end = MX51_WDOG_BASE_ADDR + SZ_16K - 1,
> - .flags = IORESOURCE_MEM,
> - },
> -};
> -
> -struct platform_device mxc_wdt = {
> - .name = "imx2-wdt",
> - .id = 0,
> - .num_resources = ARRAY_SIZE(mxc_wdt_resources),
> - .resource = mxc_wdt_resources,
> -};
> -
> static struct resource mxc_kpp_resources[] = {
> {
> .start = MX51_MXC_INT_KPP,
> diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h
> index af1d07c..ccb7cdc 100644
> --- a/arch/arm/mach-mx5/devices.h
> +++ b/arch/arm/mach-mx5/devices.h
> @@ -1,6 +1,5 @@
> extern struct platform_device mxc_usbdr_host_device;
> extern struct platform_device mxc_usbh1_device;
> extern struct platform_device mxc_usbdr_udc_device;
> -extern struct platform_device mxc_wdt;
> extern struct platform_device mxc_hsi2c_device;
> extern struct platform_device mxc_keypad_device;
> diff --git a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c b/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
> index c61bd4e..8dc19f6 100644
> --- a/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
> +++ b/arch/arm/plat-mxc/devices/platform-imx2-wdt.c
> @@ -41,6 +41,11 @@ const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst =
> imx_imx2_wdt_data_entry_single(MX35, SZ_16K);
> #endif /* ifdef CONFIG_SOC_IMX35 */
>
> +#ifdef CONFIG_SOC_IMX51
> +const struct imx_imx2_wdt_data imx51_imx2_wdt_data __initconst =
> + imx_imx2_wdt_data_entry_single(MX51, SZ_16K);
> +#endif /* ifdef CONFIG_SOC_IMX51 */
> +
> struct platform_device *__init imx_add_imx2_wdt(
> const struct imx_imx2_wdt_data *data)
> {
> --
> 1.6.0.4
>
>
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
prev parent reply other threads:[~2010-11-26 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1290724946-23516-1-git-send-email-user@fabio-desktop>
2010-11-26 11:36 ` [PATCH v2 1/2] ARM: mx5: introduce SOC_IMX51 Uwe Kleine-König
2010-12-08 10:32 ` Richard Zhao
2010-12-08 10:49 ` Uwe Kleine-König
[not found] ` <1290724946-23516-2-git-send-email-user@fabio-desktop>
2010-11-26 11:37 ` Uwe Kleine-König [this message]
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=20101126113728.GE27637@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).