diff options
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx31ads.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31ads.c | 57 |
1 files changed, 12 insertions, 45 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c index 88b97d62b57e..4e4b780c481d 100644 --- a/arch/arm/mach-mx3/mach-mx31ads.c +++ b/arch/arm/mach-mx3/mach-mx31ads.c | |||
@@ -69,12 +69,8 @@ | |||
69 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) | 69 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) |
70 | 70 | ||
71 | #define MXC_MAX_EXP_IO_LINES 16 | 71 | #define MXC_MAX_EXP_IO_LINES 16 |
72 | /* | ||
73 | * This file contains the board-specific initialization routines. | ||
74 | */ | ||
75 | 72 | ||
76 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 73 | /* |
77 | /*! | ||
78 | * The serial port definition structure. | 74 | * The serial port definition structure. |
79 | */ | 75 | */ |
80 | static struct plat_serial8250_port serial_platform_data[] = { | 76 | static struct plat_serial8250_port serial_platform_data[] = { |
@@ -110,14 +106,7 @@ static int __init mxc_init_extuart(void) | |||
110 | { | 106 | { |
111 | return platform_device_register(&serial_device); | 107 | return platform_device_register(&serial_device); |
112 | } | 108 | } |
113 | #else | ||
114 | static inline int mxc_init_extuart(void) | ||
115 | { | ||
116 | return 0; | ||
117 | } | ||
118 | #endif | ||
119 | 109 | ||
120 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | ||
121 | static const struct imxuart_platform_data uart_pdata __initconst = { | 110 | static const struct imxuart_platform_data uart_pdata __initconst = { |
122 | .flags = IMXUART_HAVE_RTSCTS, | 111 | .flags = IMXUART_HAVE_RTSCTS, |
123 | }; | 112 | }; |
@@ -134,11 +123,6 @@ static inline void mxc_init_imx_uart(void) | |||
134 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0"); | 123 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0"); |
135 | imx31_add_imx_uart0(&uart_pdata); | 124 | imx31_add_imx_uart0(&uart_pdata); |
136 | } | 125 | } |
137 | #else /* !SERIAL_IMX */ | ||
138 | static inline void mxc_init_imx_uart(void) | ||
139 | { | ||
140 | } | ||
141 | #endif /* !SERIAL_IMX */ | ||
142 | 126 | ||
143 | static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | 127 | static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) |
144 | { | 128 | { |
@@ -160,7 +144,7 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
160 | 144 | ||
161 | /* | 145 | /* |
162 | * Disable an expio pin's interrupt by setting the bit in the imr. | 146 | * Disable an expio pin's interrupt by setting the bit in the imr. |
163 | * @param irq an expio virtual irq number | 147 | * @param d an expio virtual irq description |
164 | */ | 148 | */ |
165 | static void expio_mask_irq(struct irq_data *d) | 149 | static void expio_mask_irq(struct irq_data *d) |
166 | { | 150 | { |
@@ -172,7 +156,7 @@ static void expio_mask_irq(struct irq_data *d) | |||
172 | 156 | ||
173 | /* | 157 | /* |
174 | * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr. | 158 | * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr. |
175 | * @param irq an expanded io virtual irq number | 159 | * @param d an expio virtual irq description |
176 | */ | 160 | */ |
177 | static void expio_ack_irq(struct irq_data *d) | 161 | static void expio_ack_irq(struct irq_data *d) |
178 | { | 162 | { |
@@ -183,7 +167,7 @@ static void expio_ack_irq(struct irq_data *d) | |||
183 | 167 | ||
184 | /* | 168 | /* |
185 | * Enable a expio pin's interrupt by clearing the bit in the imr. | 169 | * Enable a expio pin's interrupt by clearing the bit in the imr. |
186 | * @param irq a expio virtual irq number | 170 | * @param d an expio virtual irq description |
187 | */ | 171 | */ |
188 | static void expio_unmask_irq(struct irq_data *d) | 172 | static void expio_unmask_irq(struct irq_data *d) |
189 | { | 173 | { |
@@ -476,7 +460,6 @@ static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { | |||
476 | }; | 460 | }; |
477 | #endif | 461 | #endif |
478 | 462 | ||
479 | #if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE) | ||
480 | static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { | 463 | static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { |
481 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | 464 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 |
482 | { | 465 | { |
@@ -497,11 +480,6 @@ static void mxc_init_i2c(void) | |||
497 | 480 | ||
498 | imx31_add_imx_i2c1(NULL); | 481 | imx31_add_imx_i2c1(NULL); |
499 | } | 482 | } |
500 | #else | ||
501 | static void mxc_init_i2c(void) | ||
502 | { | ||
503 | } | ||
504 | #endif | ||
505 | 483 | ||
506 | static unsigned int ssi_pins[] = { | 484 | static unsigned int ssi_pins[] = { |
507 | MX31_PIN_SFS5__SFS5, | 485 | MX31_PIN_SFS5__SFS5, |
@@ -516,9 +494,7 @@ static void mxc_init_audio(void) | |||
516 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); | 494 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); |
517 | } | 495 | } |
518 | 496 | ||
519 | /*! | 497 | /* static mappings */ |
520 | * This structure defines static mappings for the i.MX31ADS board. | ||
521 | */ | ||
522 | static struct map_desc mx31ads_io_desc[] __initdata = { | 498 | static struct map_desc mx31ads_io_desc[] __initdata = { |
523 | { | 499 | { |
524 | .virtual = MX31_CS4_BASE_ADDR_VIRT, | 500 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
@@ -528,9 +504,6 @@ static struct map_desc mx31ads_io_desc[] __initdata = { | |||
528 | }, | 504 | }, |
529 | }; | 505 | }; |
530 | 506 | ||
531 | /*! | ||
532 | * Set up static virtual mappings. | ||
533 | */ | ||
534 | static void __init mx31ads_map_io(void) | 507 | static void __init mx31ads_map_io(void) |
535 | { | 508 | { |
536 | mx31_map_io(); | 509 | mx31_map_io(); |
@@ -543,10 +516,7 @@ static void __init mx31ads_init_irq(void) | |||
543 | mx31ads_init_expio(); | 516 | mx31ads_init_expio(); |
544 | } | 517 | } |
545 | 518 | ||
546 | /*! | 519 | static void __init mx31ads_init(void) |
547 | * Board specific initialization. | ||
548 | */ | ||
549 | static void __init mxc_board_init(void) | ||
550 | { | 520 | { |
551 | mxc_init_extuart(); | 521 | mxc_init_extuart(); |
552 | mxc_init_imx_uart(); | 522 | mxc_init_imx_uart(); |
@@ -563,15 +533,12 @@ static struct sys_timer mx31ads_timer = { | |||
563 | .init = mx31ads_timer_init, | 533 | .init = mx31ads_timer_init, |
564 | }; | 534 | }; |
565 | 535 | ||
566 | /* | ||
567 | * The following uses standard kernel macros defined in arch.h in order to | ||
568 | * initialize __mach_desc_MX31ADS data structure. | ||
569 | */ | ||
570 | MACHINE_START(MX31ADS, "Freescale MX31ADS") | 536 | MACHINE_START(MX31ADS, "Freescale MX31ADS") |
571 | /* Maintainer: Freescale Semiconductor, Inc. */ | 537 | /* Maintainer: Freescale Semiconductor, Inc. */ |
572 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 538 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
573 | .map_io = mx31ads_map_io, | 539 | .map_io = mx31ads_map_io, |
574 | .init_irq = mx31ads_init_irq, | 540 | .init_early = imx31_init_early, |
575 | .init_machine = mxc_board_init, | 541 | .init_irq = mx31ads_init_irq, |
576 | .timer = &mx31ads_timer, | 542 | .timer = &mx31ads_timer, |
543 | .init_machine = mx31ads_init, | ||
577 | MACHINE_END | 544 | MACHINE_END |