aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-04-05 13:43:06 -0400
committerOlof Johansson <olof@lixom.net>2012-04-05 13:43:06 -0400
commit8078342664aac3a9801a110c9a36132f592f4f37 (patch)
tree962f0435412483942236ff94650000ec0c73107a /arch
parent98f0ec0dd4e0c96fcc7bc6dae08007820b1134a8 (diff)
parentdcce6ce802c271cd7c21f4730f301150577b2826 (diff)
Merge branch 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
* 'at91-fixes' of git://github.com/at91linux/linux-at91: ARM: at91: dt: remove unit-address part for memory nodes ARM: at91: fix check of valid GPIO for SPI and USB USB: ehci-atmel: add needed of.h header file ARM: at91/NAND DT bindings: add comments ARM: at91/at91sam9x5.dtsi: fix NAND ale/cle in DT file USB: ohci-at91: trivial return code name change USB: ohci-at91: change maximum number of ports USB: ohci-at91: rework and fix initialization ARM: at91/dts: USB host vbus is active low ARM: at91/USB host: specify and handle properly vbus_pin_active_low USB: ohci-at91: fix vbus_pin_active_low handling ARM: at91/at91sam9x5: add clkdev entries for DMA controllers
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/at91sam9g20.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g25ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9m10g45ek.dts6
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi6
-rw-r--r--arch/arm/boot/dts/at91sam9x5cm.dtsi2
-rw-r--r--arch/arm/boot/dts/usb_a9g20.dts2
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c3
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c3
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c6
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c11
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c3
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c2
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c1
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c1
-rw-r--r--arch/arm/mach-at91/include/mach/board.h13
16 files changed, 45 insertions, 22 deletions
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi
index 92f36627e7f8..799ad1889b51 100644
--- a/arch/arm/boot/dts/at91sam9g20.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20.dtsi
@@ -35,7 +35,7 @@
35 }; 35 };
36 }; 36 };
37 37
38 memory@20000000 { 38 memory {
39 reg = <0x20000000 0x08000000>; 39 reg = <0x20000000 0x08000000>;
40 }; 40 };
41 41
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts
index ac0dc0031dda..7829a4d0cb22 100644
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -37,8 +37,8 @@
37 usb0: ohci@00600000 { 37 usb0: ohci@00600000 {
38 status = "okay"; 38 status = "okay";
39 num-ports = <2>; 39 num-ports = <2>;
40 atmel,vbus-gpio = <&pioD 19 0 40 atmel,vbus-gpio = <&pioD 19 1
41 &pioD 20 0 41 &pioD 20 1
42 >; 42 >;
43 }; 43 };
44 44
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 3d0c32fb218f..9e6eb6ecea0e 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -36,7 +36,7 @@
36 }; 36 };
37 }; 37 };
38 38
39 memory@70000000 { 39 memory {
40 reg = <0x70000000 0x10000000>; 40 reg = <0x70000000 0x10000000>;
41 }; 41 };
42 42
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index c4c8ae4123d5..a3633bd13111 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -17,7 +17,7 @@
17 bootargs = "mem=64M console=ttyS0,115200 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 {
21 reg = <0x70000000 0x4000000>; 21 reg = <0x70000000 0x4000000>;
22 }; 22 };
23 23
@@ -73,8 +73,8 @@
73 usb0: ohci@00700000 { 73 usb0: ohci@00700000 {
74 status = "okay"; 74 status = "okay";
75 num-ports = <2>; 75 num-ports = <2>;
76 atmel,vbus-gpio = <&pioD 1 0 76 atmel,vbus-gpio = <&pioD 1 1
77 &pioD 3 0>; 77 &pioD 3 1>;
78 }; 78 };
79 79
80 usb1: ehci@00800000 { 80 usb1: ehci@00800000 {
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index c111001f254e..70ab3a4e026f 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -34,7 +34,7 @@
34 }; 34 };
35 }; 35 };
36 36
37 memory@20000000 { 37 memory {
38 reg = <0x20000000 0x10000000>; 38 reg = <0x20000000 0x10000000>;
39 }; 39 };
40 40
@@ -201,8 +201,8 @@
201 >; 201 >;
202 atmel,nand-addr-offset = <21>; 202 atmel,nand-addr-offset = <21>;
203 atmel,nand-cmd-offset = <22>; 203 atmel,nand-cmd-offset = <22>;
204 gpios = <&pioC 8 0 204 gpios = <&pioD 5 0
205 &pioC 14 0 205 &pioD 4 0
206 0 206 0
207 >; 207 >;
208 status = "disabled"; 208 status = "disabled";
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi
index 67936f83c694..31e7be23703d 100644
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -8,7 +8,7 @@
8 */ 8 */
9 9
10/ { 10/ {
11 memory@20000000 { 11 memory {
12 reg = <0x20000000 0x8000000>; 12 reg = <0x20000000 0x8000000>;
13 }; 13 };
14 14
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts
index 3b3c4e0fa79f..7c2399c532e5 100644
--- a/arch/arm/boot/dts/usb_a9g20.dts
+++ b/arch/arm/boot/dts/usb_a9g20.dts
@@ -16,7 +16,7 @@
16 bootargs = "mem=64M console=ttyS0,115200 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 {
20 reg = <0x20000000 0x4000000>; 20 reg = <0x20000000 0x4000000>;
21 }; 21 };
22 22
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 7e5651ee9f85..5652dde4bbe2 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -598,6 +598,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
598 else 598 else
599 cs_pin = spi1_standard_cs[devices[i].chip_select]; 599 cs_pin = spi1_standard_cs[devices[i].chip_select];
600 600
601 if (!gpio_is_valid(cs_pin))
602 continue;
603
601 if (devices[i].bus_num == 0) 604 if (devices[i].bus_num == 0)
602 enable_spi0 = 1; 605 enable_spi0 = 1;
603 else 606 else
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 096da87dc00d..4db961a93085 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -415,6 +415,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
415 else 415 else
416 cs_pin = spi1_standard_cs[devices[i].chip_select]; 416 cs_pin = spi1_standard_cs[devices[i].chip_select];
417 417
418 if (!gpio_is_valid(cs_pin))
419 continue;
420
418 if (devices[i].bus_num == 0) 421 if (devices[i].bus_num == 0)
419 enable_spi0 = 1; 422 enable_spi0 = 1;
420 else 423 else
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 53688c46f956..fe99206de880 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -72,7 +72,8 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
72 /* Enable VBus control for UHP ports */ 72 /* Enable VBus control for UHP ports */
73 for (i = 0; i < data->ports; i++) { 73 for (i = 0; i < data->ports; i++) {
74 if (gpio_is_valid(data->vbus_pin[i])) 74 if (gpio_is_valid(data->vbus_pin[i]))
75 at91_set_gpio_output(data->vbus_pin[i], 0); 75 at91_set_gpio_output(data->vbus_pin[i],
76 data->vbus_pin_active_low[i]);
76 } 77 }
77 78
78 /* Enable overcurrent notification */ 79 /* Enable overcurrent notification */
@@ -671,6 +672,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
671 else 672 else
672 cs_pin = spi1_standard_cs[devices[i].chip_select]; 673 cs_pin = spi1_standard_cs[devices[i].chip_select];
673 674
675 if (!gpio_is_valid(cs_pin))
676 continue;
677
674 if (devices[i].bus_num == 0) 678 if (devices[i].bus_num == 0)
675 enable_spi0 = 1; 679 enable_spi0 = 1;
676 else 680 else
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 698479f1e197..6b008aee1dff 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -127,12 +127,13 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
127 /* Enable VBus control for UHP ports */ 127 /* Enable VBus control for UHP ports */
128 for (i = 0; i < data->ports; i++) { 128 for (i = 0; i < data->ports; i++) {
129 if (gpio_is_valid(data->vbus_pin[i])) 129 if (gpio_is_valid(data->vbus_pin[i]))
130 at91_set_gpio_output(data->vbus_pin[i], 0); 130 at91_set_gpio_output(data->vbus_pin[i],
131 data->vbus_pin_active_low[i]);
131 } 132 }
132 133
133 /* Enable overcurrent notification */ 134 /* Enable overcurrent notification */
134 for (i = 0; i < data->ports; i++) { 135 for (i = 0; i < data->ports; i++) {
135 if (data->overcurrent_pin[i]) 136 if (gpio_is_valid(data->overcurrent_pin[i]))
136 at91_set_gpio_input(data->overcurrent_pin[i], 1); 137 at91_set_gpio_input(data->overcurrent_pin[i], 1);
137 } 138 }
138 139
@@ -188,7 +189,8 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
188 /* Enable VBus control for UHP ports */ 189 /* Enable VBus control for UHP ports */
189 for (i = 0; i < data->ports; i++) { 190 for (i = 0; i < data->ports; i++) {
190 if (gpio_is_valid(data->vbus_pin[i])) 191 if (gpio_is_valid(data->vbus_pin[i]))
191 at91_set_gpio_output(data->vbus_pin[i], 0); 192 at91_set_gpio_output(data->vbus_pin[i],
193 data->vbus_pin_active_low[i]);
192 } 194 }
193 195
194 usbh_ehci_data = *data; 196 usbh_ehci_data = *data;
@@ -785,6 +787,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
785 else 787 else
786 cs_pin = spi1_standard_cs[devices[i].chip_select]; 788 cs_pin = spi1_standard_cs[devices[i].chip_select];
787 789
790 if (!gpio_is_valid(cs_pin))
791 continue;
792
788 if (devices[i].bus_num == 0) 793 if (devices[i].bus_num == 0)
789 enable_spi0 = 1; 794 enable_spi0 = 1;
790 else 795 else
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index eda72e83037d..fe4ae22e8561 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -419,6 +419,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
419 else 419 else
420 cs_pin = spi_standard_cs[devices[i].chip_select]; 420 cs_pin = spi_standard_cs[devices[i].chip_select];
421 421
422 if (!gpio_is_valid(cs_pin))
423 continue;
424
422 /* enable chip-select pin */ 425 /* enable chip-select pin */
423 at91_set_gpio_output(cs_pin, 1); 426 at91_set_gpio_output(cs_pin, 1);
424 427
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index b6831eeb7b76..13c8cae60462 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -223,6 +223,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
223 CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk), 223 CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk),
224 CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk), 224 CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk),
225 CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk), 225 CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk),
226 CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk),
227 CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk),
226 CLKDEV_CON_ID("pioA", &pioAB_clk), 228 CLKDEV_CON_ID("pioA", &pioAB_clk),
227 CLKDEV_CON_ID("pioB", &pioAB_clk), 229 CLKDEV_CON_ID("pioB", &pioAB_clk),
228 CLKDEV_CON_ID("pioC", &pioCD_clk), 230 CLKDEV_CON_ID("pioC", &pioCD_clk),
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 66f0ddf4b2ae..2ffe50f3a9e9 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -74,6 +74,7 @@ static void __init ek_init_early(void)
74static struct at91_usbh_data __initdata ek_usbh_data = { 74static struct at91_usbh_data __initdata ek_usbh_data = {
75 .ports = 2, 75 .ports = 2,
76 .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 }, 76 .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 },
77 .vbus_pin_active_low = {1, 1},
77 .overcurrent_pin= {-EINVAL, -EINVAL}, 78 .overcurrent_pin= {-EINVAL, -EINVAL},
78}; 79};
79 80
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index e1bea73e6b30..c88e908ddd82 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -71,6 +71,7 @@ static void __init ek_init_early(void)
71static struct at91_usbh_data __initdata ek_usbh_hs_data = { 71static struct at91_usbh_data __initdata ek_usbh_hs_data = {
72 .ports = 2, 72 .ports = 2,
73 .vbus_pin = {AT91_PIN_PD1, AT91_PIN_PD3}, 73 .vbus_pin = {AT91_PIN_PD1, AT91_PIN_PD3},
74 .vbus_pin_active_low = {1, 1},
74 .overcurrent_pin= {-EINVAL, -EINVAL}, 75 .overcurrent_pin= {-EINVAL, -EINVAL},
75}; 76};
76 77
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 544a5d5ce416..49a821192c65 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -86,14 +86,15 @@ extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *d
86extern void __init at91_add_device_eth(struct macb_platform_data *data); 86extern void __init at91_add_device_eth(struct macb_platform_data *data);
87 87
88 /* USB Host */ 88 /* USB Host */
89#define AT91_MAX_USBH_PORTS 3
89struct at91_usbh_data { 90struct at91_usbh_data {
90 u8 ports; /* number of ports on root hub */ 91 int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */
91 int vbus_pin[2]; /* port power-control pin */ 92 int overcurrent_pin[AT91_MAX_USBH_PORTS];
92 u8 vbus_pin_active_low[2]; 93 u8 ports; /* number of ports on root hub */
93 u8 overcurrent_supported; 94 u8 overcurrent_supported;
94 int overcurrent_pin[2]; 95 u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS];
95 u8 overcurrent_status[2]; 96 u8 overcurrent_status[AT91_MAX_USBH_PORTS];
96 u8 overcurrent_changed[2]; 97 u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
97}; 98};
98extern void __init at91_add_device_usbh(struct at91_usbh_data *data); 99extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
99extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); 100extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);