Skip to content

Commit

Permalink
ARM: mx5: dynamically allocate imx2-wdt devices
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Fabio Estevam authored and Sascha Hauer committed Dec 3, 2010
1 parent d94ed12 commit b99545c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-mx5/devices-imx51.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
15 changes: 0 additions & 15 deletions arch/arm/mach-mx5/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-mx5/devices.h
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 5 additions & 0 deletions arch/arm/plat-mxc/devices/platform-imx2-wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit b99545c

Please sign in to comment.