diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/at91sam9g20.dtsi | 16 | ||||
-rw-r--r-- | arch/arm/boot/dts/at91sam9g45.dtsi | 16 | ||||
-rw-r--r-- | arch/arm/boot/dts/at91sam9m10g45ek.dts | 25 | ||||
-rw-r--r-- | arch/arm/boot/dts/usb_a9g20.dts | 44 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9x5.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-dt.c | 51 |
6 files changed, 99 insertions, 58 deletions
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi index a100db03ec90..4b0dc99b9319 100644 --- a/arch/arm/boot/dts/at91sam9g20.dtsi +++ b/arch/arm/boot/dts/at91sam9g20.dtsi | |||
@@ -172,5 +172,21 @@ | |||
172 | status = "disabled"; | 172 | status = "disabled"; |
173 | }; | 173 | }; |
174 | }; | 174 | }; |
175 | |||
176 | nand0: nand@40000000 { | ||
177 | compatible = "atmel,at91rm9200-nand"; | ||
178 | #address-cells = <1>; | ||
179 | #size-cells = <1>; | ||
180 | reg = <0x40000000 0x10000000 | ||
181 | 0xffffe800 0x200 | ||
182 | >; | ||
183 | atmel,nand-addr-offset = <21>; | ||
184 | atmel,nand-cmd-offset = <22>; | ||
185 | gpios = <&pioC 13 0 | ||
186 | &pioC 14 0 | ||
187 | 0 | ||
188 | >; | ||
189 | status = "disabled"; | ||
190 | }; | ||
175 | }; | 191 | }; |
176 | }; | 192 | }; |
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index f779667159b1..d79021b831c4 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
@@ -180,5 +180,21 @@ | |||
180 | status = "disabled"; | 180 | status = "disabled"; |
181 | }; | 181 | }; |
182 | }; | 182 | }; |
183 | |||
184 | nand0: nand@40000000 { | ||
185 | compatible = "atmel,at91rm9200-nand"; | ||
186 | #address-cells = <1>; | ||
187 | #size-cells = <1>; | ||
188 | reg = <0x40000000 0x10000000 | ||
189 | 0xffffe200 0x200 | ||
190 | >; | ||
191 | atmel,nand-addr-offset = <21>; | ||
192 | atmel,nand-cmd-offset = <22>; | ||
193 | gpios = <&pioC 8 0 | ||
194 | &pioC 14 0 | ||
195 | 0 | ||
196 | >; | ||
197 | status = "disabled"; | ||
198 | }; | ||
183 | }; | 199 | }; |
184 | }; | 200 | }; |
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts index 15e25f903cad..fd4531135431 100644 --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts | |||
@@ -14,7 +14,7 @@ | |||
14 | compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9"; | 14 | compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9"; |
15 | 15 | ||
16 | chosen { | 16 | chosen { |
17 | bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=jffs2"; | 17 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2"; |
18 | }; | 18 | }; |
19 | 19 | ||
20 | memory@70000000 { | 20 | memory@70000000 { |
@@ -36,6 +36,29 @@ | |||
36 | status = "okay"; | 36 | status = "okay"; |
37 | }; | 37 | }; |
38 | }; | 38 | }; |
39 | |||
40 | nand0: nand@40000000 { | ||
41 | nand-bus-width = <8>; | ||
42 | nand-ecc-mode = "soft"; | ||
43 | nand-on-flash-bbt; | ||
44 | status = "okay"; | ||
45 | |||
46 | boot@0 { | ||
47 | label = "bootstrap/uboot/kernel"; | ||
48 | reg = <0x0 0x400000>; | ||
49 | }; | ||
50 | |||
51 | rootfs@400000 { | ||
52 | label = "rootfs"; | ||
53 | reg = <0x400000 0x3C00000>; | ||
54 | }; | ||
55 | |||
56 | data@4000000 { | ||
57 | label = "data"; | ||
58 | reg = <0x4000000 0xC000000>; | ||
59 | }; | ||
60 | |||
61 | }; | ||
39 | }; | 62 | }; |
40 | 63 | ||
41 | leds { | 64 | leds { |
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts index d74545a2a77c..71d83ef316df 100644 --- a/arch/arm/boot/dts/usb_a9g20.dts +++ b/arch/arm/boot/dts/usb_a9g20.dts | |||
@@ -13,7 +13,7 @@ | |||
13 | compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9"; | 13 | compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9"; |
14 | 14 | ||
15 | chosen { | 15 | chosen { |
16 | bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) root=/dev/mtdblock5 rw rootfstype=ubifs"; | 16 | bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | memory@20000000 { | 19 | memory@20000000 { |
@@ -31,6 +31,48 @@ | |||
31 | status = "okay"; | 31 | status = "okay"; |
32 | }; | 32 | }; |
33 | }; | 33 | }; |
34 | |||
35 | nand0: nand@40000000 { | ||
36 | nand-bus-width = <8>; | ||
37 | nand-ecc-mode = "soft"; | ||
38 | nand-on-flash-bbt; | ||
39 | status = "okay"; | ||
40 | |||
41 | at91bootstrap@0 { | ||
42 | label = "at91bootstrap"; | ||
43 | reg = <0x0 0x20000>; | ||
44 | }; | ||
45 | |||
46 | barebox@20000 { | ||
47 | label = "barebox"; | ||
48 | reg = <0x20000 0x40000>; | ||
49 | }; | ||
50 | |||
51 | bareboxenv@60000 { | ||
52 | label = "bareboxenv"; | ||
53 | reg = <0x60000 0x20000>; | ||
54 | }; | ||
55 | |||
56 | bareboxenv2@80000 { | ||
57 | label = "bareboxenv2"; | ||
58 | reg = <0x80000 0x20000>; | ||
59 | }; | ||
60 | |||
61 | kernel@a0000 { | ||
62 | label = "kernel"; | ||
63 | reg = <0xa0000 0x400000>; | ||
64 | }; | ||
65 | |||
66 | rootfs@4a0000 { | ||
67 | label = "rootfs"; | ||
68 | reg = <0x4a0000 0x7800000>; | ||
69 | }; | ||
70 | |||
71 | data@7ca0000 { | ||
72 | label = "data"; | ||
73 | reg = <0x7ca0000 0x8360000>; | ||
74 | }; | ||
75 | }; | ||
34 | }; | 76 | }; |
35 | 77 | ||
36 | leds { | 78 | leds { |
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c index a34d96afa746..7bec5a40d01a 100644 --- a/arch/arm/mach-at91/at91sam9x5.c +++ b/arch/arm/mach-at91/at91sam9x5.c | |||
@@ -314,11 +314,6 @@ void __init at91sam9x5_initialize(void) | |||
314 | } | 314 | } |
315 | 315 | ||
316 | /* -------------------------------------------------------------------- | 316 | /* -------------------------------------------------------------------- |
317 | * AT91SAM9x5 devices (temporary before modification of code) | ||
318 | * -------------------------------------------------------------------- */ | ||
319 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} | ||
320 | |||
321 | /* -------------------------------------------------------------------- | ||
322 | * Interrupt initialization | 317 | * Interrupt initialization |
323 | * -------------------------------------------------------------------- */ | 318 | * -------------------------------------------------------------------- */ |
324 | /* | 319 | /* |
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c index 2eb294b2cc0e..9f729d6c8942 100644 --- a/arch/arm/mach-at91/board-dt.c +++ b/arch/arm/mach-at91/board-dt.c | |||
@@ -19,10 +19,7 @@ | |||
19 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | 21 | ||
22 | #include <mach/hardware.h> | ||
23 | #include <mach/board.h> | 22 | #include <mach/board.h> |
24 | #include <mach/system_rev.h> | ||
25 | #include <mach/at91sam9_smc.h> | ||
26 | 23 | ||
27 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
28 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
@@ -30,7 +27,6 @@ | |||
30 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
31 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
32 | 29 | ||
33 | #include "sam9_smc.h" | ||
34 | #include "generic.h" | 30 | #include "generic.h" |
35 | 31 | ||
36 | 32 | ||
@@ -40,50 +36,6 @@ static void __init ek_init_early(void) | |||
40 | at91_initialize(12000000); | 36 | at91_initialize(12000000); |
41 | } | 37 | } |
42 | 38 | ||
43 | /* det_pin is not connected */ | ||
44 | static struct atmel_nand_data __initdata ek_nand_data = { | ||
45 | .ale = 21, | ||
46 | .cle = 22, | ||
47 | .det_pin = -EINVAL, | ||
48 | .rdy_pin = AT91_PIN_PC8, | ||
49 | .enable_pin = AT91_PIN_PC14, | ||
50 | .ecc_mode = NAND_ECC_SOFT, | ||
51 | .on_flash_bbt = 1, | ||
52 | }; | ||
53 | |||
54 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
55 | .ncs_read_setup = 0, | ||
56 | .nrd_setup = 2, | ||
57 | .ncs_write_setup = 0, | ||
58 | .nwe_setup = 2, | ||
59 | |||
60 | .ncs_read_pulse = 4, | ||
61 | .nrd_pulse = 4, | ||
62 | .ncs_write_pulse = 4, | ||
63 | .nwe_pulse = 4, | ||
64 | |||
65 | .read_cycle = 7, | ||
66 | .write_cycle = 7, | ||
67 | |||
68 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
69 | .tdf_cycles = 3, | ||
70 | }; | ||
71 | |||
72 | static void __init ek_add_device_nand(void) | ||
73 | { | ||
74 | ek_nand_data.bus_width_16 = board_have_nand_16bit(); | ||
75 | /* setup bus-width (8 or 16) */ | ||
76 | if (ek_nand_data.bus_width_16) | ||
77 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
78 | else | ||
79 | ek_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
80 | |||
81 | /* configure chip-select 3 (NAND) */ | ||
82 | sam9_smc_configure(0, 3, &ek_nand_smc_config); | ||
83 | |||
84 | at91_add_device_nand(&ek_nand_data); | ||
85 | } | ||
86 | |||
87 | static const struct of_device_id irq_of_match[] __initconst = { | 39 | static const struct of_device_id irq_of_match[] __initconst = { |
88 | 40 | ||
89 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, | 41 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, |
@@ -100,9 +52,6 @@ static void __init at91_dt_init_irq(void) | |||
100 | static void __init at91_dt_device_init(void) | 52 | static void __init at91_dt_device_init(void) |
101 | { | 53 | { |
102 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 54 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
103 | |||
104 | /* NAND */ | ||
105 | ek_add_device_nand(); | ||
106 | } | 55 | } |
107 | 56 | ||
108 | static const char *at91_dt_board_compat[] __initdata = { | 57 | static const char *at91_dt_board_compat[] __initdata = { |