diff options
Diffstat (limited to 'arch/arm/mach-at91rm9200/board-kb9202.c')
-rw-r--r-- | arch/arm/mach-at91rm9200/board-kb9202.c | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91rm9200/board-kb9202.c index f06d2b54cc9a..272fe43bceca 100644 --- a/arch/arm/mach-at91rm9200/board-kb9202.c +++ b/arch/arm/mach-at91rm9200/board-kb9202.c | |||
@@ -35,20 +35,11 @@ | |||
35 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
36 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
37 | 37 | ||
38 | #include <asm/hardware.h> | ||
39 | #include <asm/arch/board.h> | 38 | #include <asm/arch/board.h> |
40 | #include <asm/arch/gpio.h> | 39 | #include <asm/arch/gpio.h> |
41 | 40 | ||
42 | #include "generic.h" | 41 | #include "generic.h" |
43 | 42 | ||
44 | static void __init kb9202_init_irq(void) | ||
45 | { | ||
46 | /* Initialize AIC controller */ | ||
47 | at91rm9200_init_irq(NULL); | ||
48 | |||
49 | /* Set up the GPIO interrupts */ | ||
50 | at91_gpio_irq_setup(PQFP_GPIO_BANKS); | ||
51 | } | ||
52 | 43 | ||
53 | /* | 44 | /* |
54 | * Serial port configuration. | 45 | * Serial port configuration. |
@@ -63,10 +54,8 @@ static struct at91_uart_config __initdata kb9202_uart_config = { | |||
63 | 54 | ||
64 | static void __init kb9202_map_io(void) | 55 | static void __init kb9202_map_io(void) |
65 | { | 56 | { |
66 | at91rm9200_map_io(); | 57 | /* Initialize processor: 10 MHz crystal */ |
67 | 58 | at91rm9200_initialize(10000000, AT91RM9200_PQFP); | |
68 | /* Initialize clocks: 10 MHz crystal */ | ||
69 | at91_clock_init(10000000); | ||
70 | 59 | ||
71 | /* Set up the LEDs */ | 60 | /* Set up the LEDs */ |
72 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); | 61 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); |
@@ -75,6 +64,11 @@ static void __init kb9202_map_io(void) | |||
75 | at91_init_serial(&kb9202_uart_config); | 64 | at91_init_serial(&kb9202_uart_config); |
76 | } | 65 | } |
77 | 66 | ||
67 | static void __init kb9202_init_irq(void) | ||
68 | { | ||
69 | at91rm9200_init_interrupts(NULL); | ||
70 | } | ||
71 | |||
78 | static struct at91_eth_data __initdata kb9202_eth_data = { | 72 | static struct at91_eth_data __initdata kb9202_eth_data = { |
79 | .phy_irq_pin = AT91_PIN_PB29, | 73 | .phy_irq_pin = AT91_PIN_PB29, |
80 | .is_rmii = 0, | 74 | .is_rmii = 0, |
@@ -95,6 +89,29 @@ static struct at91_mmc_data __initdata kb9202_mmc_data = { | |||
95 | .wire4 = 1, | 89 | .wire4 = 1, |
96 | }; | 90 | }; |
97 | 91 | ||
92 | static struct mtd_partition __initdata kb9202_nand_partition[] = { | ||
93 | { | ||
94 | .name = "nand_fs", | ||
95 | .offset = 0, | ||
96 | .size = MTDPART_SIZ_FULL, | ||
97 | }, | ||
98 | }; | ||
99 | |||
100 | static struct mtd_partition *nand_partitions(int size, int *num_partitions) | ||
101 | { | ||
102 | *num_partitions = ARRAY_SIZE(kb9202_nand_partition); | ||
103 | return kb9202_nand_partition; | ||
104 | } | ||
105 | |||
106 | static struct at91_nand_data __initdata kb9202_nand_data = { | ||
107 | .ale = 22, | ||
108 | .cle = 21, | ||
109 | // .det_pin = ... not there | ||
110 | .rdy_pin = AT91_PIN_PC29, | ||
111 | .enable_pin = AT91_PIN_PC28, | ||
112 | .partition_info = nand_partitions, | ||
113 | }; | ||
114 | |||
98 | static void __init kb9202_board_init(void) | 115 | static void __init kb9202_board_init(void) |
99 | { | 116 | { |
100 | /* Serial */ | 117 | /* Serial */ |
@@ -111,6 +128,8 @@ static void __init kb9202_board_init(void) | |||
111 | at91_add_device_i2c(); | 128 | at91_add_device_i2c(); |
112 | /* SPI */ | 129 | /* SPI */ |
113 | at91_add_device_spi(NULL, 0); | 130 | at91_add_device_spi(NULL, 0); |
131 | /* NAND */ | ||
132 | at91_add_device_nand(&kb9202_nand_data); | ||
114 | } | 133 | } |
115 | 134 | ||
116 | MACHINE_START(KB9200, "KB920x") | 135 | MACHINE_START(KB9200, "KB920x") |