diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx1ads.c')
| -rw-r--r-- | arch/arm/mach-imx/mach-mx1ads.c | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 6187ce9ba7d..77fda3de429 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c @@ -23,14 +23,10 @@ #include <asm/mach/arch.h> #include <asm/mach/time.h> -#include <mach/common.h> -#include <mach/hardware.h> -#include <mach/i2c.h> -#include <mach/iomux-mx1.h> -#include <mach/irqs.h> - +#include "common.h" #include "devices-imx1.h" -#include "devices.h" +#include "hardware.h" +#include "iomux-mx1.h" static const int mx1ads_pins[] __initconst = { /* UART1 */ @@ -70,23 +66,16 @@ static const struct imxuart_platform_data uart1_pdata __initconst = { * Physmap flash */ -static struct physmap_flash_data mx1ads_flash_data = { +static const struct physmap_flash_data mx1ads_flash_data __initconst = { .width = 4, /* bankwidth in bytes */ }; -static struct resource flash_resource = { +static const struct resource flash_resource __initconst = { .start = MX1_CS0_PHYS, .end = MX1_CS0_PHYS + SZ_32M - 1, .flags = IORESOURCE_MEM, }; -static struct platform_device flash_device = { - .name = "physmap-flash", - .id = 0, - .resource = &flash_resource, - .num_resources = 1, -}; - /* * I2C */ @@ -117,6 +106,8 @@ static struct i2c_board_info mx1ads_i2c_devices[] = { */ static void __init mx1ads_init(void) { + imx1_soc_init(); + mxc_gpio_setup_multiple_pins(mx1ads_pins, ARRAY_SIZE(mx1ads_pins), "mx1ads"); @@ -125,7 +116,9 @@ static void __init mx1ads_init(void) imx1_add_imx_uart1(&uart1_pdata); /* Physmap flash */ - mxc_register_device(&flash_device, &mx1ads_flash_data); + platform_device_register_resndata(NULL, "physmap-flash", 0, + &flash_resource, 1, + &mx1ads_flash_data, sizeof(mx1ads_flash_data)); /* I2C */ i2c_register_board_info(0, mx1ads_i2c_devices, @@ -139,23 +132,23 @@ static void __init mx1ads_timer_init(void) mx1_clocks_init(32000); } -struct sys_timer mx1ads_timer = { - .init = mx1ads_timer_init, -}; - MACHINE_START(MX1ADS, "Freescale MX1ADS") /* Maintainer: Sascha Hauer, Pengutronix */ - .boot_params = MX1_PHYS_OFFSET + 0x100, - .map_io = mx1_map_io, - .init_irq = mx1_init_irq, - .timer = &mx1ads_timer, - .init_machine = mx1ads_init, + .atag_offset = 0x100, + .map_io = mx1_map_io, + .init_early = imx1_init_early, + .init_irq = mx1_init_irq, + .init_time = mx1ads_timer_init, + .init_machine = mx1ads_init, + .restart = mxc_restart, MACHINE_END MACHINE_START(MXLADS, "Freescale MXLADS") - .boot_params = MX1_PHYS_OFFSET + 0x100, - .map_io = mx1_map_io, - .init_irq = mx1_init_irq, - .timer = &mx1ads_timer, - .init_machine = mx1ads_init, + .atag_offset = 0x100, + .map_io = mx1_map_io, + .init_early = imx1_init_early, + .init_irq = mx1_init_irq, + .init_time = mx1ads_timer_init, + .init_machine = mx1ads_init, + .restart = mxc_restart, MACHINE_END |
