diff options
270 files changed, 10139 insertions, 10616 deletions
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README new file mode 100644 index 000000000000..87a1e8fb6242 --- /dev/null +++ b/Documentation/arm/sunxi/README | |||
@@ -0,0 +1,19 @@ | |||
1 | ARM Allwinner SoCs | ||
2 | ================== | ||
3 | |||
4 | This document lists all the ARM Allwinner SoCs that are currently | ||
5 | supported in mainline by the Linux kernel. This document will also | ||
6 | provide links to documentation and or datasheet for these SoCs. | ||
7 | |||
8 | SunXi family | ||
9 | ------------ | ||
10 | |||
11 | Flavors: | ||
12 | Allwinner A10 (sun4i) | ||
13 | Datasheet : http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf | ||
14 | |||
15 | Allwinner A13 (sun5i) | ||
16 | Datasheet : http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | ||
17 | |||
18 | Core: Cortex A8 | ||
19 | Linux kernel mach directory: arch/arm/mach-sunxi \ No newline at end of file | ||
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt b/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt new file mode 100644 index 000000000000..fb7b5cd2652f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | Broadcom BCM11351 device tree bindings | ||
2 | ------------------------------------------- | ||
3 | |||
4 | Boards with the bcm281xx SoC family (which includes bcm11130, bcm11140, | ||
5 | bcm11351, bcm28145, bcm28155 SoCs) shall have the following properties: | ||
6 | |||
7 | Required root node property: | ||
8 | |||
9 | compatible = "bcm,bcm11351"; | ||
diff --git a/Documentation/devicetree/bindings/arm/calxeda.txt b/Documentation/devicetree/bindings/arm/calxeda.txt index 4755caaccba6..25fcf96795ca 100644 --- a/Documentation/devicetree/bindings/arm/calxeda.txt +++ b/Documentation/devicetree/bindings/arm/calxeda.txt | |||
@@ -1,8 +1,15 @@ | |||
1 | Calxeda Highbank Platforms Device Tree Bindings | 1 | Calxeda Platforms Device Tree Bindings |
2 | ----------------------------------------------- | 2 | ----------------------------------------------- |
3 | 3 | ||
4 | Boards with Calxeda Cortex-A9 based Highbank SOC shall have the following | 4 | Boards with Calxeda Cortex-A9 based ECX-1000 (Highbank) SOC shall have the |
5 | properties. | 5 | following properties. |
6 | 6 | ||
7 | Required root node properties: | 7 | Required root node properties: |
8 | - compatible = "calxeda,highbank"; | 8 | - compatible = "calxeda,highbank"; |
9 | |||
10 | |||
11 | Boards with Calxeda Cortex-A15 based ECX-2000 SOC shall have the following | ||
12 | properties. | ||
13 | |||
14 | Required root node properties: | ||
15 | - compatible = "calxeda,ecx-2000"; | ||
diff --git a/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt new file mode 100644 index 000000000000..9cf3f25544c7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | ARM Versatile Express system registers | ||
2 | -------------------------------------- | ||
3 | |||
4 | This is a system control registers block, providing multiple low level | ||
5 | platform functions like board detection and identification, software | ||
6 | interrupt generation, MMC and NOR Flash control etc. | ||
7 | |||
8 | Required node properties: | ||
9 | - compatible value : = "arm,vexpress,sysreg"; | ||
10 | - reg : physical base address and the size of the registers window | ||
11 | - gpio-controller : specifies that the node is a GPIO controller | ||
12 | - #gpio-cells : size of the GPIO specifier, should be 2: | ||
13 | - first cell is the pseudo-GPIO line number: | ||
14 | 0 - MMC CARDIN | ||
15 | 1 - MMC WPROT | ||
16 | 2 - NOR FLASH WPn | ||
17 | - second cell can take standard GPIO flags (currently ignored). | ||
18 | |||
19 | Example: | ||
20 | v2m_sysreg: sysreg@10000000 { | ||
21 | compatible = "arm,vexpress-sysreg"; | ||
22 | reg = <0x10000000 0x1000>; | ||
23 | gpio-controller; | ||
24 | #gpio-cells = <2>; | ||
25 | }; | ||
26 | |||
27 | This block also can also act a bridge to the platform's configuration | ||
28 | bus via "system control" interface, addressing devices with site number, | ||
29 | position in the board stack, config controller, function and device | ||
30 | numbers - see motherboard's TRM for more details. | ||
31 | |||
32 | The node describing a config device must refer to the sysreg node via | ||
33 | "arm,vexpress,config-bridge" phandle (can be also defined in the node's | ||
34 | parent) and relies on the board topology properties - see main vexpress | ||
35 | node documentation for more details. It must must also define the | ||
36 | following property: | ||
37 | - arm,vexpress-sysreg,func : must contain two cells: | ||
38 | - first cell defines function number (eg. 1 for clock generator, | ||
39 | 2 for voltage regulators etc.) | ||
40 | - device number (eg. osc 0, osc 1 etc.) | ||
41 | |||
42 | Example: | ||
43 | mcc { | ||
44 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
45 | |||
46 | osc@0 { | ||
47 | compatible = "arm,vexpress-osc"; | ||
48 | arm,vexpress-sysreg,func = <1 0>; | ||
49 | }; | ||
50 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vexpress.txt b/Documentation/devicetree/bindings/arm/vexpress.txt index ec8b50cbb2e8..ae49161e478a 100644 --- a/Documentation/devicetree/bindings/arm/vexpress.txt +++ b/Documentation/devicetree/bindings/arm/vexpress.txt | |||
@@ -11,6 +11,10 @@ the motherboard file using a /include/ directive. As the motherboard | |||
11 | can be initialized in one of two different configurations ("memory | 11 | can be initialized in one of two different configurations ("memory |
12 | maps"), care must be taken to include the correct one. | 12 | maps"), care must be taken to include the correct one. |
13 | 13 | ||
14 | |||
15 | Root node | ||
16 | --------- | ||
17 | |||
14 | Required properties in the root node: | 18 | Required properties in the root node: |
15 | - compatible value: | 19 | - compatible value: |
16 | compatible = "arm,vexpress,<model>", "arm,vexpress"; | 20 | compatible = "arm,vexpress,<model>", "arm,vexpress"; |
@@ -45,6 +49,10 @@ Optional properties in the root node: | |||
45 | - Coretile Express A9x4 (V2P-CA9) HBI-0225: | 49 | - Coretile Express A9x4 (V2P-CA9) HBI-0225: |
46 | arm,hbi = <0x225>; | 50 | arm,hbi = <0x225>; |
47 | 51 | ||
52 | |||
53 | CPU nodes | ||
54 | --------- | ||
55 | |||
48 | Top-level standard "cpus" node is required. It must contain a node | 56 | Top-level standard "cpus" node is required. It must contain a node |
49 | with device_type = "cpu" property for every available core, eg.: | 57 | with device_type = "cpu" property for every available core, eg.: |
50 | 58 | ||
@@ -59,6 +67,52 @@ with device_type = "cpu" property for every available core, eg.: | |||
59 | }; | 67 | }; |
60 | }; | 68 | }; |
61 | 69 | ||
70 | |||
71 | Configuration infrastructure | ||
72 | ---------------------------- | ||
73 | |||
74 | The platform has an elaborated configuration system, consisting of | ||
75 | microcontrollers residing on the mother- and daughterboards known | ||
76 | as Motherboard/Daughterboard Configuration Controller (MCC and DCC). | ||
77 | The controllers are responsible for the platform initialization | ||
78 | (reset generation, flash programming, FPGA bitfiles loading etc.) | ||
79 | but also control clock generators, voltage regulators, gather | ||
80 | environmental data like temperature, power consumption etc. Even | ||
81 | the video output switch (FPGA) is controlled that way. | ||
82 | |||
83 | Nodes describing devices controlled by this infrastructure should | ||
84 | point at the bridge device node: | ||
85 | - bridge phandle: | ||
86 | arm,vexpress,config-bridge = <phandle>; | ||
87 | This property can be also defined in a parent node (eg. for a DCC) | ||
88 | and is effective for all children. | ||
89 | |||
90 | |||
91 | Platform topology | ||
92 | ----------------- | ||
93 | |||
94 | As Versatile Express can be configured in number of physically | ||
95 | different setups, the device tree should describe platform topology. | ||
96 | Root node and main motherboard node must define the following | ||
97 | property, describing physical location of the children nodes: | ||
98 | - site number: | ||
99 | arm,vexpress,site = <number>; | ||
100 | where 0 means motherboard, 1 or 2 are daugtherboard sites, | ||
101 | 0xf means "master" site (site containing main CPU tile) | ||
102 | - when daughterboards are stacked on one site, their position | ||
103 | in the stack be be described with: | ||
104 | arm,vexpress,position = <number>; | ||
105 | - when describing tiles consisting more than one DCC, its number | ||
106 | can be described with: | ||
107 | arm,vexpress,dcc = <number>; | ||
108 | |||
109 | Any of the numbers above defaults to zero if not defined in | ||
110 | the node or any of its parent. | ||
111 | |||
112 | |||
113 | Motherboard | ||
114 | ----------- | ||
115 | |||
62 | The motherboard description file provides a single "motherboard" node | 116 | The motherboard description file provides a single "motherboard" node |
63 | using 2 address cells corresponding to the Static Memory Bus used | 117 | using 2 address cells corresponding to the Static Memory Bus used |
64 | between the motherboard and the tile. The first cell defines the Chip | 118 | between the motherboard and the tile. The first cell defines the Chip |
@@ -87,22 +141,30 @@ can be used to obtain required phandle in the tile's "aliases" node: | |||
87 | - SP804 timers: | 141 | - SP804 timers: |
88 | v2m_timer01 and v2m_timer23 | 142 | v2m_timer01 and v2m_timer23 |
89 | 143 | ||
90 | Current Linux implementation requires a "arm,v2m_timer" alias | 144 | The tile description should define a "smb" node, describing the |
91 | pointing at one of the motherboard's SP804 timers, if it is to be | 145 | Static Memory Bus between the tile and motherboard. It must define |
92 | used as the system timer. This alias should be defined in the | 146 | the following properties: |
93 | motherboard files. | 147 | - "simple-bus" compatible value (to ensure creation of the children) |
148 | compatible = "simple-bus"; | ||
149 | - mapping of the SMB CS/offset addresses into main address space: | ||
150 | #address-cells = <2>; | ||
151 | #size-cells = <1>; | ||
152 | ranges = <...>; | ||
153 | - interrupts mapping: | ||
154 | #interrupt-cells = <1>; | ||
155 | interrupt-map-mask = <0 0 63>; | ||
156 | interrupt-map = <...>; | ||
94 | 157 | ||
95 | The tile description must define "ranges", "interrupt-map-mask" and | ||
96 | "interrupt-map" properties to translate the motherboard's address | ||
97 | and interrupt space into one used by the tile's processor. | ||
98 | 158 | ||
99 | Abbreviated example: | 159 | Example of a VE tile description (simplified) |
160 | --------------------------------------------- | ||
100 | 161 | ||
101 | /dts-v1/; | 162 | /dts-v1/; |
102 | 163 | ||
103 | / { | 164 | / { |
104 | model = "V2P-CA5s"; | 165 | model = "V2P-CA5s"; |
105 | arm,hbi = <0x225>; | 166 | arm,hbi = <0x225>; |
167 | arm,vexpress,site = <0xf>; | ||
106 | compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress"; | 168 | compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress"; |
107 | interrupt-parent = <&gic>; | 169 | interrupt-parent = <&gic>; |
108 | #address-cells = <1>; | 170 | #address-cells = <1>; |
@@ -134,13 +196,29 @@ Abbreviated example: | |||
134 | <0x2c000100 0x100>; | 196 | <0x2c000100 0x100>; |
135 | }; | 197 | }; |
136 | 198 | ||
137 | motherboard { | 199 | dcc { |
200 | compatible = "simple-bus"; | ||
201 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
202 | |||
203 | osc@0 { | ||
204 | compatible = "arm,vexpress-osc"; | ||
205 | }; | ||
206 | }; | ||
207 | |||
208 | smb { | ||
209 | compatible = "simple-bus"; | ||
210 | |||
211 | #address-cells = <2>; | ||
212 | #size-cells = <1>; | ||
138 | /* CS0 is visible at 0x08000000 */ | 213 | /* CS0 is visible at 0x08000000 */ |
139 | ranges = <0 0 0x08000000 0x04000000>; | 214 | ranges = <0 0 0x08000000 0x04000000>; |
215 | |||
216 | #interrupt-cells = <1>; | ||
140 | interrupt-map-mask = <0 0 63>; | 217 | interrupt-map-mask = <0 0 63>; |
141 | /* Active high IRQ 0 is connected to GIC's SPI0 */ | 218 | /* Active high IRQ 0 is connected to GIC's SPI0 */ |
142 | interrupt-map = <0 0 0 &gic 0 0 4>; | 219 | interrupt-map = <0 0 0 &gic 0 0 4>; |
220 | |||
221 | /include/ "vexpress-v2m-rs1.dtsi" | ||
143 | }; | 222 | }; |
144 | }; | 223 | }; |
145 | 224 | ||
146 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/Documentation/devicetree/bindings/clock/imx5-clock.txt b/Documentation/devicetree/bindings/clock/imx5-clock.txt new file mode 100644 index 000000000000..04ad47876be0 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx5-clock.txt | |||
@@ -0,0 +1,191 @@ | |||
1 | * Clock bindings for Freescale i.MX5 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,<soc>-ccm" , where <soc> can be imx51 or imx53 | ||
5 | - reg: Address and length of the register set | ||
6 | - interrupts: Should contain CCM interrupt | ||
7 | - #clock-cells: Should be <1> | ||
8 | |||
9 | The clock consumer should specify the desired clock by having the clock | ||
10 | ID in its "clocks" phandle cell. The following is a full list of i.MX5 | ||
11 | clocks and IDs. | ||
12 | |||
13 | Clock ID | ||
14 | --------------------------- | ||
15 | dummy 0 | ||
16 | ckil 1 | ||
17 | osc 2 | ||
18 | ckih1 3 | ||
19 | ckih2 4 | ||
20 | ahb 5 | ||
21 | ipg 6 | ||
22 | axi_a 7 | ||
23 | axi_b 8 | ||
24 | uart_pred 9 | ||
25 | uart_root 10 | ||
26 | esdhc_a_pred 11 | ||
27 | esdhc_b_pred 12 | ||
28 | esdhc_c_s 13 | ||
29 | esdhc_d_s 14 | ||
30 | emi_sel 15 | ||
31 | emi_slow_podf 16 | ||
32 | nfc_podf 17 | ||
33 | ecspi_pred 18 | ||
34 | ecspi_podf 19 | ||
35 | usboh3_pred 20 | ||
36 | usboh3_podf 21 | ||
37 | usb_phy_pred 22 | ||
38 | usb_phy_podf 23 | ||
39 | cpu_podf 24 | ||
40 | di_pred 25 | ||
41 | tve_di 26 | ||
42 | tve_s 27 | ||
43 | uart1_ipg_gate 28 | ||
44 | uart1_per_gate 29 | ||
45 | uart2_ipg_gate 30 | ||
46 | uart2_per_gate 31 | ||
47 | uart3_ipg_gate 32 | ||
48 | uart3_per_gate 33 | ||
49 | i2c1_gate 34 | ||
50 | i2c2_gate 35 | ||
51 | gpt_ipg_gate 36 | ||
52 | pwm1_ipg_gate 37 | ||
53 | pwm1_hf_gate 38 | ||
54 | pwm2_ipg_gate 39 | ||
55 | pwm2_hf_gate 40 | ||
56 | gpt_hf_gate 41 | ||
57 | fec_gate 42 | ||
58 | usboh3_per_gate 43 | ||
59 | esdhc1_ipg_gate 44 | ||
60 | esdhc2_ipg_gate 45 | ||
61 | esdhc3_ipg_gate 46 | ||
62 | esdhc4_ipg_gate 47 | ||
63 | ssi1_ipg_gate 48 | ||
64 | ssi2_ipg_gate 49 | ||
65 | ssi3_ipg_gate 50 | ||
66 | ecspi1_ipg_gate 51 | ||
67 | ecspi1_per_gate 52 | ||
68 | ecspi2_ipg_gate 53 | ||
69 | ecspi2_per_gate 54 | ||
70 | cspi_ipg_gate 55 | ||
71 | sdma_gate 56 | ||
72 | emi_slow_gate 57 | ||
73 | ipu_s 58 | ||
74 | ipu_gate 59 | ||
75 | nfc_gate 60 | ||
76 | ipu_di1_gate 61 | ||
77 | vpu_s 62 | ||
78 | vpu_gate 63 | ||
79 | vpu_reference_gate 64 | ||
80 | uart4_ipg_gate 65 | ||
81 | uart4_per_gate 66 | ||
82 | uart5_ipg_gate 67 | ||
83 | uart5_per_gate 68 | ||
84 | tve_gate 69 | ||
85 | tve_pred 70 | ||
86 | esdhc1_per_gate 71 | ||
87 | esdhc2_per_gate 72 | ||
88 | esdhc3_per_gate 73 | ||
89 | esdhc4_per_gate 74 | ||
90 | usb_phy_gate 75 | ||
91 | hsi2c_gate 76 | ||
92 | mipi_hsc1_gate 77 | ||
93 | mipi_hsc2_gate 78 | ||
94 | mipi_esc_gate 79 | ||
95 | mipi_hsp_gate 80 | ||
96 | ldb_di1_div_3_5 81 | ||
97 | ldb_di1_div 82 | ||
98 | ldb_di0_div_3_5 83 | ||
99 | ldb_di0_div 84 | ||
100 | ldb_di1_gate 85 | ||
101 | can2_serial_gate 86 | ||
102 | can2_ipg_gate 87 | ||
103 | i2c3_gate 88 | ||
104 | lp_apm 89 | ||
105 | periph_apm 90 | ||
106 | main_bus 91 | ||
107 | ahb_max 92 | ||
108 | aips_tz1 93 | ||
109 | aips_tz2 94 | ||
110 | tmax1 95 | ||
111 | tmax2 96 | ||
112 | tmax3 97 | ||
113 | spba 98 | ||
114 | uart_sel 99 | ||
115 | esdhc_a_sel 100 | ||
116 | esdhc_b_sel 101 | ||
117 | esdhc_a_podf 102 | ||
118 | esdhc_b_podf 103 | ||
119 | ecspi_sel 104 | ||
120 | usboh3_sel 105 | ||
121 | usb_phy_sel 106 | ||
122 | iim_gate 107 | ||
123 | usboh3_gate 108 | ||
124 | emi_fast_gate 109 | ||
125 | ipu_di0_gate 110 | ||
126 | gpc_dvfs 111 | ||
127 | pll1_sw 112 | ||
128 | pll2_sw 113 | ||
129 | pll3_sw 114 | ||
130 | ipu_di0_sel 115 | ||
131 | ipu_di1_sel 116 | ||
132 | tve_ext_sel 117 | ||
133 | mx51_mipi 118 | ||
134 | pll4_sw 119 | ||
135 | ldb_di1_sel 120 | ||
136 | di_pll4_podf 121 | ||
137 | ldb_di0_sel 122 | ||
138 | ldb_di0_gate 123 | ||
139 | usb_phy1_gate 124 | ||
140 | usb_phy2_gate 125 | ||
141 | per_lp_apm 126 | ||
142 | per_pred1 127 | ||
143 | per_pred2 128 | ||
144 | per_podf 129 | ||
145 | per_root 130 | ||
146 | ssi_apm 131 | ||
147 | ssi1_root_sel 132 | ||
148 | ssi2_root_sel 133 | ||
149 | ssi3_root_sel 134 | ||
150 | ssi_ext1_sel 135 | ||
151 | ssi_ext2_sel 136 | ||
152 | ssi_ext1_com_sel 137 | ||
153 | ssi_ext2_com_sel 138 | ||
154 | ssi1_root_pred 139 | ||
155 | ssi1_root_podf 140 | ||
156 | ssi2_root_pred 141 | ||
157 | ssi2_root_podf 142 | ||
158 | ssi_ext1_pred 143 | ||
159 | ssi_ext1_podf 144 | ||
160 | ssi_ext2_pred 145 | ||
161 | ssi_ext2_podf 146 | ||
162 | ssi1_root_gate 147 | ||
163 | ssi2_root_gate 148 | ||
164 | ssi3_root_gate 149 | ||
165 | ssi_ext1_gate 150 | ||
166 | ssi_ext2_gate 151 | ||
167 | epit1_ipg_gate 152 | ||
168 | epit1_hf_gate 153 | ||
169 | epit2_ipg_gate 154 | ||
170 | epit2_hf_gate 155 | ||
171 | can_sel 156 | ||
172 | can1_serial_gate 157 | ||
173 | can1_ipg_gate 158 | ||
174 | |||
175 | Examples (for mx53): | ||
176 | |||
177 | clks: ccm@53fd4000{ | ||
178 | compatible = "fsl,imx53-ccm"; | ||
179 | reg = <0x53fd4000 0x4000>; | ||
180 | interrupts = <0 71 0x04 0 72 0x04>; | ||
181 | #clock-cells = <1>; | ||
182 | }; | ||
183 | |||
184 | can1: can@53fc8000 { | ||
185 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | ||
186 | reg = <0x53fc8000 0x4000>; | ||
187 | interrupts = <82>; | ||
188 | clocks = <&clks 158>, <&clks 157>; | ||
189 | clock-names = "ipg", "per"; | ||
190 | status = "disabled"; | ||
191 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index 492bd991d52a..d77b4e68dc42 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
@@ -187,9 +187,9 @@ clocks and IDs. | |||
187 | pll3_usb_otg 172 | 187 | pll3_usb_otg 172 |
188 | pll4_audio 173 | 188 | pll4_audio 173 |
189 | pll5_video 174 | 189 | pll5_video 174 |
190 | pll6_mlb 175 | 190 | pll8_mlb 175 |
191 | pll7_usb_host 176 | 191 | pll7_usb_host 176 |
192 | pll8_enet 177 | 192 | pll6_enet 177 |
193 | ssi1_ipg 178 | 193 | ssi1_ipg 178 |
194 | ssi2_ipg 179 | 194 | ssi2_ipg 179 |
195 | ssi3_ipg 180 | 195 | ssi3_ipg 180 |
@@ -198,6 +198,11 @@ clocks and IDs. | |||
198 | usbphy2 183 | 198 | usbphy2 183 |
199 | ldb_di0_div_3_5 184 | 199 | ldb_di0_div_3_5 184 |
200 | ldb_di1_div_3_5 185 | 200 | ldb_di1_div_3_5 185 |
201 | sata_ref 186 | ||
202 | sata_ref_100m 187 | ||
203 | pcie_ref 188 | ||
204 | pcie_ref_125m 189 | ||
205 | enet_ref 190 | ||
201 | 206 | ||
202 | Examples: | 207 | Examples: |
203 | 208 | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt new file mode 100644 index 000000000000..7f9fb85f5456 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt | |||
@@ -0,0 +1,104 @@ | |||
1 | Allwinner Sunxi Interrupt Controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "allwinner,sunxi-ic" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | - interrupt-controller : Identifies the node as an interrupt controller | ||
8 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
9 | interrupt source. The value shall be 1. | ||
10 | |||
11 | The interrupt sources are as follows: | ||
12 | |||
13 | 0: ENMI | ||
14 | 1: UART0 | ||
15 | 2: UART1 | ||
16 | 3: UART2 | ||
17 | 4: UART3 | ||
18 | 5: IR0 | ||
19 | 6: IR1 | ||
20 | 7: I2C0 | ||
21 | 8: I2C1 | ||
22 | 9: I2C2 | ||
23 | 10: SPI0 | ||
24 | 11: SPI1 | ||
25 | 12: SPI2 | ||
26 | 13: SPDIF | ||
27 | 14: AC97 | ||
28 | 15: TS | ||
29 | 16: I2S | ||
30 | 17: UART4 | ||
31 | 18: UART5 | ||
32 | 19: UART6 | ||
33 | 20: UART7 | ||
34 | 21: KEYPAD | ||
35 | 22: TIMER0 | ||
36 | 23: TIMER1 | ||
37 | 24: TIMER2 | ||
38 | 25: TIMER3 | ||
39 | 26: CAN | ||
40 | 27: DMA | ||
41 | 28: PIO | ||
42 | 29: TOUCH_PANEL | ||
43 | 30: AUDIO_CODEC | ||
44 | 31: LRADC | ||
45 | 32: SDMC0 | ||
46 | 33: SDMC1 | ||
47 | 34: SDMC2 | ||
48 | 35: SDMC3 | ||
49 | 36: MEMSTICK | ||
50 | 37: NAND | ||
51 | 38: USB0 | ||
52 | 39: USB1 | ||
53 | 40: USB2 | ||
54 | 41: SCR | ||
55 | 42: CSI0 | ||
56 | 43: CSI1 | ||
57 | 44: LCDCTRL0 | ||
58 | 45: LCDCTRL1 | ||
59 | 46: MP | ||
60 | 47: DEFEBE0 | ||
61 | 48: DEFEBE1 | ||
62 | 49: PMU | ||
63 | 50: SPI3 | ||
64 | 51: TZASC | ||
65 | 52: PATA | ||
66 | 53: VE | ||
67 | 54: SS | ||
68 | 55: EMAC | ||
69 | 56: SATA | ||
70 | 57: GPS | ||
71 | 58: HDMI | ||
72 | 59: TVE | ||
73 | 60: ACE | ||
74 | 61: TVD | ||
75 | 62: PS2_0 | ||
76 | 63: PS2_1 | ||
77 | 64: USB3 | ||
78 | 65: USB4 | ||
79 | 66: PLE_PFM | ||
80 | 67: TIMER4 | ||
81 | 68: TIMER5 | ||
82 | 69: GPU_GP | ||
83 | 70: GPU_GPMMU | ||
84 | 71: GPU_PP0 | ||
85 | 72: GPU_PPMMU0 | ||
86 | 73: GPU_PMU | ||
87 | 74: GPU_RSV0 | ||
88 | 75: GPU_RSV1 | ||
89 | 76: GPU_RSV2 | ||
90 | 77: GPU_RSV3 | ||
91 | 78: GPU_RSV4 | ||
92 | 79: GPU_RSV5 | ||
93 | 80: GPU_RSV6 | ||
94 | 82: SYNC_TIMER0 | ||
95 | 83: SYNC_TIMER1 | ||
96 | |||
97 | Example: | ||
98 | |||
99 | intc: interrupt-controller { | ||
100 | compatible = "allwinner,sunxi-ic"; | ||
101 | reg = <0x01c20400 0x400>; | ||
102 | interrupt-controller; | ||
103 | #interrupt-cells = <2>; | ||
104 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index 03dee50532f5..e97a27856b21 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | |||
@@ -8,13 +8,20 @@ on-chip controllers onto these pads. | |||
8 | Required Properties: | 8 | Required Properties: |
9 | - compatible: should be one of the following. | 9 | - compatible: should be one of the following. |
10 | - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. | 10 | - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. |
11 | - "samsung,pinctrl-exynos4x12": for Exynos4x12 compatible pin-controller. | ||
11 | - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. | 12 | - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. |
12 | 13 | ||
13 | - reg: Base address of the pin controller hardware module and length of | 14 | - reg: Base address of the pin controller hardware module and length of |
14 | the address space it occupies. | 15 | the address space it occupies. |
15 | 16 | ||
16 | - interrupts: interrupt specifier for the controller. The format and value of | 17 | - Pin banks as child nodes: Pin banks of the controller are represented by child |
17 | the interrupt specifier depends on the interrupt parent for the controller. | 18 | nodes of the controller node. Bank name is taken from name of the node. Each |
19 | bank node must contain following properties: | ||
20 | |||
21 | - gpio-controller: identifies the node as a gpio controller and pin bank. | ||
22 | - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO | ||
23 | binding is used, the amount of cells must be specified as 2. See generic | ||
24 | GPIO binding documentation for description of particular cells. | ||
18 | 25 | ||
19 | - Pin mux/config groups as child nodes: The pin mux (selecting pin function | 26 | - Pin mux/config groups as child nodes: The pin mux (selecting pin function |
20 | mode) and pin config (pull up/down, driver strength) settings are represented | 27 | mode) and pin config (pull up/down, driver strength) settings are represented |
@@ -72,16 +79,24 @@ used as system wakeup events. | |||
72 | A. External GPIO Interrupts: For supporting external gpio interrupts, the | 79 | A. External GPIO Interrupts: For supporting external gpio interrupts, the |
73 | following properties should be specified in the pin-controller device node. | 80 | following properties should be specified in the pin-controller device node. |
74 | 81 | ||
75 | - interrupt-controller: identifies the controller node as interrupt-parent. | 82 | - interrupt-parent: phandle of the interrupt parent to which the external |
76 | - #interrupt-cells: the value of this property should be 2. | 83 | GPIO interrupts are forwarded to. |
77 | - First Cell: represents the external gpio interrupt number local to the | 84 | - interrupts: interrupt specifier for the controller. The format and value of |
78 | external gpio interrupt space of the controller. | 85 | the interrupt specifier depends on the interrupt parent for the controller. |
79 | - Second Cell: flags to identify the type of the interrupt | 86 | |
80 | - 1 = rising edge triggered | 87 | In addition, following properties must be present in node of every bank |
81 | - 2 = falling edge triggered | 88 | of pins supporting GPIO interrupts: |
82 | - 3 = rising and falling edge triggered | 89 | |
83 | - 4 = high level triggered | 90 | - interrupt-controller: identifies the controller node as interrupt-parent. |
84 | - 8 = low level triggered | 91 | - #interrupt-cells: the value of this property should be 2. |
92 | - First Cell: represents the external gpio interrupt number local to the | ||
93 | external gpio interrupt space of the controller. | ||
94 | - Second Cell: flags to identify the type of the interrupt | ||
95 | - 1 = rising edge triggered | ||
96 | - 2 = falling edge triggered | ||
97 | - 3 = rising and falling edge triggered | ||
98 | - 4 = high level triggered | ||
99 | - 8 = low level triggered | ||
85 | 100 | ||
86 | B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | 101 | B. External Wakeup Interrupts: For supporting external wakeup interrupts, a |
87 | child node representing the external wakeup interrupt controller should be | 102 | child node representing the external wakeup interrupt controller should be |
@@ -94,6 +109,11 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | |||
94 | found on Samsung Exynos4210 SoC. | 109 | found on Samsung Exynos4210 SoC. |
95 | - interrupt-parent: phandle of the interrupt parent to which the external | 110 | - interrupt-parent: phandle of the interrupt parent to which the external |
96 | wakeup interrupts are forwarded to. | 111 | wakeup interrupts are forwarded to. |
112 | - interrupts: interrupt used by multiplexed wakeup interrupts. | ||
113 | |||
114 | In addition, following properties must be present in node of every bank | ||
115 | of pins supporting wake-up interrupts: | ||
116 | |||
97 | - interrupt-controller: identifies the node as interrupt-parent. | 117 | - interrupt-controller: identifies the node as interrupt-parent. |
98 | - #interrupt-cells: the value of this property should be 2 | 118 | - #interrupt-cells: the value of this property should be 2 |
99 | - First Cell: represents the external wakeup interrupt number local to | 119 | - First Cell: represents the external wakeup interrupt number local to |
@@ -105,11 +125,63 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | |||
105 | - 4 = high level triggered | 125 | - 4 = high level triggered |
106 | - 8 = low level triggered | 126 | - 8 = low level triggered |
107 | 127 | ||
128 | Node of every bank of pins supporting direct wake-up interrupts (without | ||
129 | multiplexing) must contain following properties: | ||
130 | |||
131 | - interrupt-parent: phandle of the interrupt parent to which the external | ||
132 | wakeup interrupts are forwarded to. | ||
133 | - interrupts: interrupts of the interrupt parent which are used for external | ||
134 | wakeup interrupts from pins of the bank, must contain interrupts for all | ||
135 | pins of the bank. | ||
136 | |||
108 | Aliases: | 137 | Aliases: |
109 | 138 | ||
110 | All the pin controller nodes should be represented in the aliases node using | 139 | All the pin controller nodes should be represented in the aliases node using |
111 | the following format 'pinctrl{n}' where n is a unique number for the alias. | 140 | the following format 'pinctrl{n}' where n is a unique number for the alias. |
112 | 141 | ||
142 | Example: A pin-controller node with pin banks: | ||
143 | |||
144 | pinctrl_0: pinctrl@11400000 { | ||
145 | compatible = "samsung,pinctrl-exynos4210"; | ||
146 | reg = <0x11400000 0x1000>; | ||
147 | interrupts = <0 47 0>; | ||
148 | |||
149 | /* ... */ | ||
150 | |||
151 | /* Pin bank without external interrupts */ | ||
152 | gpy0: gpy0 { | ||
153 | gpio-controller; | ||
154 | #gpio-cells = <2>; | ||
155 | }; | ||
156 | |||
157 | /* ... */ | ||
158 | |||
159 | /* Pin bank with external GPIO or muxed wake-up interrupts */ | ||
160 | gpj0: gpj0 { | ||
161 | gpio-controller; | ||
162 | #gpio-cells = <2>; | ||
163 | |||
164 | interrupt-controller; | ||
165 | #interrupt-cells = <2>; | ||
166 | }; | ||
167 | |||
168 | /* ... */ | ||
169 | |||
170 | /* Pin bank with external direct wake-up interrupts */ | ||
171 | gpx0: gpx0 { | ||
172 | gpio-controller; | ||
173 | #gpio-cells = <2>; | ||
174 | |||
175 | interrupt-controller; | ||
176 | interrupt-parent = <&gic>; | ||
177 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
178 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>; | ||
179 | #interrupt-cells = <2>; | ||
180 | }; | ||
181 | |||
182 | /* ... */ | ||
183 | }; | ||
184 | |||
113 | Example 1: A pin-controller node with pin groups. | 185 | Example 1: A pin-controller node with pin groups. |
114 | 186 | ||
115 | pinctrl_0: pinctrl@11400000 { | 187 | pinctrl_0: pinctrl@11400000 { |
@@ -117,6 +189,8 @@ Example 1: A pin-controller node with pin groups. | |||
117 | reg = <0x11400000 0x1000>; | 189 | reg = <0x11400000 0x1000>; |
118 | interrupts = <0 47 0>; | 190 | interrupts = <0 47 0>; |
119 | 191 | ||
192 | /* ... */ | ||
193 | |||
120 | uart0_data: uart0-data { | 194 | uart0_data: uart0-data { |
121 | samsung,pins = "gpa0-0", "gpa0-1"; | 195 | samsung,pins = "gpa0-0", "gpa0-1"; |
122 | samsung,pin-function = <2>; | 196 | samsung,pin-function = <2>; |
@@ -158,20 +232,14 @@ Example 2: A pin-controller node with external wakeup interrupt controller node. | |||
158 | pinctrl_1: pinctrl@11000000 { | 232 | pinctrl_1: pinctrl@11000000 { |
159 | compatible = "samsung,pinctrl-exynos4210"; | 233 | compatible = "samsung,pinctrl-exynos4210"; |
160 | reg = <0x11000000 0x1000>; | 234 | reg = <0x11000000 0x1000>; |
161 | interrupts = <0 46 0>; | 235 | interrupts = <0 46 0> |
162 | interrupt-controller; | ||
163 | #interrupt-cells = <2>; | ||
164 | 236 | ||
165 | wakup_eint: wakeup-interrupt-controller { | 237 | /* ... */ |
238 | |||
239 | wakeup-interrupt-controller { | ||
166 | compatible = "samsung,exynos4210-wakeup-eint"; | 240 | compatible = "samsung,exynos4210-wakeup-eint"; |
167 | interrupt-parent = <&gic>; | 241 | interrupt-parent = <&gic>; |
168 | interrupt-controller; | 242 | interrupts = <0 32 0>; |
169 | #interrupt-cells = <2>; | ||
170 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
171 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>, | ||
172 | <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, | ||
173 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>, | ||
174 | <0 32 0>; | ||
175 | }; | 243 | }; |
176 | }; | 244 | }; |
177 | 245 | ||
@@ -190,7 +258,8 @@ Example 4: Set up the default pin state for uart controller. | |||
190 | 258 | ||
191 | static int s3c24xx_serial_probe(struct platform_device *pdev) { | 259 | static int s3c24xx_serial_probe(struct platform_device *pdev) { |
192 | struct pinctrl *pinctrl; | 260 | struct pinctrl *pinctrl; |
193 | ... | 261 | |
194 | ... | 262 | /* ... */ |
263 | |||
195 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | 264 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); |
196 | } | 265 | } |
diff --git a/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt new file mode 100644 index 000000000000..0c7b64e95a61 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Allwinner A1X SoCs Timer Controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "allwinner,sunxi-timer" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | - interrupts : The interrupt of the first timer | ||
8 | - clocks: phandle to the source clock (usually a 24 MHz fixed clock) | ||
9 | |||
10 | Example: | ||
11 | |||
12 | timer { | ||
13 | compatible = "allwinner,sunxi-timer"; | ||
14 | reg = <0x01c20c00 0x400>; | ||
15 | interrupts = <22>; | ||
16 | clocks = <&osc>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt b/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt new file mode 100644 index 000000000000..d209366b4a69 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | BCM2835 Watchdog timer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "brcm,bcm2835-pm-wdt" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | watchdog { | ||
11 | compatible = "brcm,bcm2835-pm-wdt"; | ||
12 | reg = <0x7e100000 0x28>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt new file mode 100644 index 000000000000..0b2717775600 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | Allwinner sunXi Watchdog timer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "allwinner,sunxi-wdt" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | wdt: watchdog@01c20c90 { | ||
11 | compatible = "allwinner,sunxi-wdt"; | ||
12 | reg = <0x01c20c90 0x10>; | ||
13 | }; | ||
diff --git a/MAINTAINERS b/MAINTAINERS index e624aa2fc3da..386fce6715c4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -685,6 +685,12 @@ M: Lennert Buytenhek <kernel@wantstofly.org> | |||
685 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 685 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
686 | S: Maintained | 686 | S: Maintained |
687 | 687 | ||
688 | ARM/Allwinner A1X SoC support | ||
689 | M: Maxime Ripard <maxime.ripard@free-electrons.com> | ||
690 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
691 | S: Maintained | ||
692 | F: arch/arm/mach-sunxi/ | ||
693 | |||
688 | ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES | 694 | ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES |
689 | M: Andrew Victor <linux@maxim.org.za> | 695 | M: Andrew Victor <linux@maxim.org.za> |
690 | M: Nicolas Ferre <nicolas.ferre@atmel.com> | 696 | M: Nicolas Ferre <nicolas.ferre@atmel.com> |
@@ -707,6 +713,12 @@ S: Maintained | |||
707 | F: arch/arm/mach-cns3xxx/ | 713 | F: arch/arm/mach-cns3xxx/ |
708 | T: git git://git.infradead.org/users/cbou/linux-cns3xxx.git | 714 | T: git git://git.infradead.org/users/cbou/linux-cns3xxx.git |
709 | 715 | ||
716 | ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE | ||
717 | M: Alexander Shiyan <shc_work@mail.ru> | ||
718 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
719 | S: Odd Fixes | ||
720 | F: arch/arm/mach-clps711x/ | ||
721 | |||
710 | ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE | 722 | ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE |
711 | M: Hartley Sweeten <hsweeten@visionengravers.com> | 723 | M: Hartley Sweeten <hsweeten@visionengravers.com> |
712 | M: Ryan Mallon <rmallon@gmail.com> | 724 | M: Ryan Mallon <rmallon@gmail.com> |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 03e0460d5067..29b85e6bd71d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -286,8 +286,8 @@ config ARCH_INTEGRATOR | |||
286 | select MULTI_IRQ_HANDLER | 286 | select MULTI_IRQ_HANDLER |
287 | select NEED_MACH_MEMORY_H | 287 | select NEED_MACH_MEMORY_H |
288 | select PLAT_VERSATILE | 288 | select PLAT_VERSATILE |
289 | select PLAT_VERSATILE_FPGA_IRQ | ||
290 | select SPARSE_IRQ | 289 | select SPARSE_IRQ |
290 | select VERSATILE_FPGA_IRQ | ||
291 | help | 291 | help |
292 | Support for ARM's Integrator platform. | 292 | Support for ARM's Integrator platform. |
293 | 293 | ||
@@ -320,7 +320,7 @@ config ARCH_VERSATILE | |||
320 | select PLAT_VERSATILE | 320 | select PLAT_VERSATILE |
321 | select PLAT_VERSATILE_CLCD | 321 | select PLAT_VERSATILE_CLCD |
322 | select PLAT_VERSATILE_CLOCK | 322 | select PLAT_VERSATILE_CLOCK |
323 | select PLAT_VERSATILE_FPGA_IRQ | 323 | select VERSATILE_FPGA_IRQ |
324 | help | 324 | help |
325 | This enables support for ARM Ltd Versatile board. | 325 | This enables support for ARM Ltd Versatile board. |
326 | 326 | ||
@@ -340,7 +340,7 @@ config ARCH_AT91 | |||
340 | 340 | ||
341 | config ARCH_BCM2835 | 341 | config ARCH_BCM2835 |
342 | bool "Broadcom BCM2835 family" | 342 | bool "Broadcom BCM2835 family" |
343 | select ARCH_WANT_OPTIONAL_GPIOLIB | 343 | select ARCH_REQUIRE_GPIOLIB |
344 | select ARM_AMBA | 344 | select ARM_AMBA |
345 | select ARM_ERRATA_411920 | 345 | select ARM_ERRATA_411920 |
346 | select ARM_TIMER_SP804 | 346 | select ARM_TIMER_SP804 |
@@ -348,7 +348,10 @@ config ARCH_BCM2835 | |||
348 | select COMMON_CLK | 348 | select COMMON_CLK |
349 | select CPU_V6 | 349 | select CPU_V6 |
350 | select GENERIC_CLOCKEVENTS | 350 | select GENERIC_CLOCKEVENTS |
351 | select GENERIC_GPIO | ||
351 | select MULTI_IRQ_HANDLER | 352 | select MULTI_IRQ_HANDLER |
353 | select PINCTRL | ||
354 | select PINCTRL_BCM2835 | ||
352 | select SPARSE_IRQ | 355 | select SPARSE_IRQ |
353 | select USE_OF | 356 | select USE_OF |
354 | help | 357 | help |
@@ -370,10 +373,14 @@ config ARCH_CLPS711X | |||
370 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" | 373 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" |
371 | select ARCH_REQUIRE_GPIOLIB | 374 | select ARCH_REQUIRE_GPIOLIB |
372 | select ARCH_USES_GETTIMEOFFSET | 375 | select ARCH_USES_GETTIMEOFFSET |
376 | select AUTO_ZRELADDR | ||
373 | select CLKDEV_LOOKUP | 377 | select CLKDEV_LOOKUP |
374 | select COMMON_CLK | 378 | select COMMON_CLK |
375 | select CPU_ARM720T | 379 | select CPU_ARM720T |
380 | select GENERIC_CLOCKEVENTS | ||
381 | select MULTI_IRQ_HANDLER | ||
376 | select NEED_MACH_MEMORY_H | 382 | select NEED_MACH_MEMORY_H |
383 | select SPARSE_IRQ | ||
377 | help | 384 | help |
378 | Support for Cirrus Logic 711x/721x/731x based boards. | 385 | Support for Cirrus Logic 711x/721x/731x based boards. |
379 | 386 | ||
@@ -1015,6 +1022,8 @@ source "arch/arm/mach-mvebu/Kconfig" | |||
1015 | 1022 | ||
1016 | source "arch/arm/mach-at91/Kconfig" | 1023 | source "arch/arm/mach-at91/Kconfig" |
1017 | 1024 | ||
1025 | source "arch/arm/mach-bcm/Kconfig" | ||
1026 | |||
1018 | source "arch/arm/mach-clps711x/Kconfig" | 1027 | source "arch/arm/mach-clps711x/Kconfig" |
1019 | 1028 | ||
1020 | source "arch/arm/mach-cns3xxx/Kconfig" | 1029 | source "arch/arm/mach-cns3xxx/Kconfig" |
@@ -1106,6 +1115,8 @@ source "arch/arm/mach-exynos/Kconfig" | |||
1106 | 1115 | ||
1107 | source "arch/arm/mach-shmobile/Kconfig" | 1116 | source "arch/arm/mach-shmobile/Kconfig" |
1108 | 1117 | ||
1118 | source "arch/arm/mach-sunxi/Kconfig" | ||
1119 | |||
1109 | source "arch/arm/mach-prima2/Kconfig" | 1120 | source "arch/arm/mach-prima2/Kconfig" |
1110 | 1121 | ||
1111 | source "arch/arm/mach-tegra/Kconfig" | 1122 | source "arch/arm/mach-tegra/Kconfig" |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 5566520686a5..04a3f0d1d053 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -338,6 +338,17 @@ choice | |||
338 | The uncompressor code port configuration is now handled | 338 | The uncompressor code port configuration is now handled |
339 | by CONFIG_S3C_LOWLEVEL_UART_PORT. | 339 | by CONFIG_S3C_LOWLEVEL_UART_PORT. |
340 | 340 | ||
341 | config DEBUG_S3C_UART3 | ||
342 | depends on PLAT_SAMSUNG && ARCH_EXYNOS | ||
343 | bool "Use S3C UART 3 for low-level debug" | ||
344 | help | ||
345 | Say Y here if you want the debug print routines to direct | ||
346 | their output to UART 3. The port must have been initialised | ||
347 | by the boot-loader before use. | ||
348 | |||
349 | The uncompressor code port configuration is now handled | ||
350 | by CONFIG_S3C_LOWLEVEL_UART_PORT. | ||
351 | |||
341 | config DEBUG_SOCFPGA_UART | 352 | config DEBUG_SOCFPGA_UART |
342 | depends on ARCH_SOCFPGA | 353 | depends on ARCH_SOCFPGA |
343 | bool "Use SOCFPGA UART for low-level debug" | 354 | bool "Use SOCFPGA UART for low-level debug" |
@@ -345,6 +356,20 @@ choice | |||
345 | Say Y here if you want kernel low-level debugging support | 356 | Say Y here if you want kernel low-level debugging support |
346 | on SOCFPGA based platforms. | 357 | on SOCFPGA based platforms. |
347 | 358 | ||
359 | config DEBUG_SUNXI_UART0 | ||
360 | bool "Kernel low-level debugging messages via sunXi UART0" | ||
361 | depends on ARCH_SUNXI | ||
362 | help | ||
363 | Say Y here if you want kernel low-level debugging support | ||
364 | on Allwinner A1X based platforms on the UART0. | ||
365 | |||
366 | config DEBUG_SUNXI_UART1 | ||
367 | bool "Kernel low-level debugging messages via sunXi UART1" | ||
368 | depends on ARCH_SUNXI | ||
369 | help | ||
370 | Say Y here if you want kernel low-level debugging support | ||
371 | on Allwinner A1X based platforms on the UART1. | ||
372 | |||
348 | config DEBUG_VEXPRESS_UART0_DETECT | 373 | config DEBUG_VEXPRESS_UART0_DETECT |
349 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" | 374 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" |
350 | depends on ARCH_VEXPRESS && CPU_CP15_MMU | 375 | depends on ARCH_VEXPRESS && CPU_CP15_MMU |
@@ -424,6 +449,7 @@ config DEBUG_LL_INCLUDE | |||
424 | default "debug/mvebu.S" if DEBUG_MVEBU_UART | 449 | default "debug/mvebu.S" if DEBUG_MVEBU_UART |
425 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART | 450 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART |
426 | default "debug/socfpga.S" if DEBUG_SOCFPGA_UART | 451 | default "debug/socfpga.S" if DEBUG_SOCFPGA_UART |
452 | default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 | ||
427 | default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ | 453 | default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ |
428 | DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 | 454 | DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 |
429 | default "mach/debug-macro.S" | 455 | default "mach/debug-macro.S" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 20d295aca51f..9c60f474a559 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -138,6 +138,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 | |||
138 | # Machine directory name. This list is sorted alphanumerically | 138 | # Machine directory name. This list is sorted alphanumerically |
139 | # by CONFIG_* macro name. | 139 | # by CONFIG_* macro name. |
140 | machine-$(CONFIG_ARCH_AT91) += at91 | 140 | machine-$(CONFIG_ARCH_AT91) += at91 |
141 | machine-$(CONFIG_ARCH_BCM) += bcm | ||
141 | machine-$(CONFIG_ARCH_BCM2835) += bcm2835 | 142 | machine-$(CONFIG_ARCH_BCM2835) += bcm2835 |
142 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x | 143 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x |
143 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx | 144 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx |
@@ -194,6 +195,7 @@ machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx | |||
194 | machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx | 195 | machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx |
195 | machine-$(CONFIG_MACH_SPEAR600) += spear6xx | 196 | machine-$(CONFIG_MACH_SPEAR600) += spear6xx |
196 | machine-$(CONFIG_ARCH_ZYNQ) += zynq | 197 | machine-$(CONFIG_ARCH_ZYNQ) += zynq |
198 | machine-$(CONFIG_ARCH_SUNXI) += sunxi | ||
197 | 199 | ||
198 | # Platform directory name. This list is sorted alphanumerically | 200 | # Platform directory name. This list is sorted alphanumerically |
199 | # by CONFIG_* macro name. | 201 | # by CONFIG_* macro name. |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 537208f22e56..5cad8a6dadb0 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -45,11 +45,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y) | |||
45 | OBJS += head-shark.o ofw-shark.o | 45 | OBJS += head-shark.o ofw-shark.o |
46 | endif | 46 | endif |
47 | 47 | ||
48 | ifeq ($(CONFIG_ARCH_P720T),y) | ||
49 | # Borrow this code from SA1100 | ||
50 | OBJS += head-sa1100.o | ||
51 | endif | ||
52 | |||
53 | ifeq ($(CONFIG_ARCH_SA1100),y) | 48 | ifeq ($(CONFIG_ARCH_SA1100),y) |
54 | OBJS += head-sa1100.o | 49 | OBJS += head-sa1100.o |
55 | endif | 50 | endif |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5e98094a3e1b..42917866fcde 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -33,14 +33,17 @@ dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb | |||
33 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb | 33 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb |
34 | 34 | ||
35 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb | 35 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb |
36 | dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb | ||
36 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ | 37 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ |
37 | dove-cubox.dtb \ | 38 | dove-cubox.dtb \ |
38 | dove-dove-db.dtb | 39 | dove-dove-db.dtb |
39 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ | 40 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ |
40 | exynos4210-smdkv310.dtb \ | 41 | exynos4210-smdkv310.dtb \ |
41 | exynos4210-trats.dtb \ | 42 | exynos4210-trats.dtb \ |
42 | exynos5250-smdk5250.dtb | 43 | exynos5250-smdk5250.dtb \ |
43 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb | 44 | exynos5440-ssdk5440.dtb |
45 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ | ||
46 | ecx-2000.dtb | ||
44 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ | 47 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ |
45 | integratorcp.dtb | 48 | integratorcp.dtb |
46 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb | 49 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb |
@@ -102,6 +105,8 @@ dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \ | |||
102 | spear310-evb.dtb \ | 105 | spear310-evb.dtb \ |
103 | spear320-evb.dtb | 106 | spear320-evb.dtb |
104 | dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb | 107 | dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb |
108 | dtb-$(CONFIG_ARCH_SUNXI) += sun4i-cubieboard.dtb \ | ||
109 | sun5i-olinuxino.dtb | ||
105 | dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ | 110 | dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ |
106 | tegra20-medcom-wide.dtb \ | 111 | tegra20-medcom-wide.dtb \ |
107 | tegra20-paz00.dtb \ | 112 | tegra20-paz00.dtb \ |
diff --git a/arch/arm/boot/dts/bcm11351-brt.dts b/arch/arm/boot/dts/bcm11351-brt.dts new file mode 100644 index 000000000000..248067cf7069 --- /dev/null +++ b/arch/arm/boot/dts/bcm11351-brt.dts | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | |||
16 | /include/ "bcm11351.dtsi" | ||
17 | |||
18 | / { | ||
19 | model = "BCM11351 BRT board"; | ||
20 | compatible = "bcm,bcm11351-brt", "bcm,bcm11351"; | ||
21 | |||
22 | memory { | ||
23 | reg = <0x80000000 0x40000000>; /* 1 GB */ | ||
24 | }; | ||
25 | |||
26 | uart@3e000000 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | }; | ||
diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi new file mode 100644 index 000000000000..ad135885bd2a --- /dev/null +++ b/arch/arm/boot/dts/bcm11351.dtsi | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | /include/ "skeleton.dtsi" | ||
15 | |||
16 | / { | ||
17 | model = "BCM11351 SoC"; | ||
18 | compatible = "bcm,bcm11351"; | ||
19 | interrupt-parent = <&gic>; | ||
20 | |||
21 | chosen { | ||
22 | bootargs = "console=ttyS0,115200n8"; | ||
23 | }; | ||
24 | |||
25 | gic: interrupt-controller@3ff00100 { | ||
26 | compatible = "arm,cortex-a9-gic"; | ||
27 | #interrupt-cells = <3>; | ||
28 | #address-cells = <0>; | ||
29 | interrupt-controller; | ||
30 | reg = <0x3ff01000 0x1000>, | ||
31 | <0x3ff00100 0x100>; | ||
32 | }; | ||
33 | |||
34 | uart@3e000000 { | ||
35 | compatible = "bcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart"; | ||
36 | status = "disabled"; | ||
37 | reg = <0x3e000000 0x1000>; | ||
38 | clock-frequency = <13000000>; | ||
39 | interrupts = <0x0 67 0x4>; | ||
40 | reg-shift = <2>; | ||
41 | reg-io-width = <4>; | ||
42 | }; | ||
43 | |||
44 | L2: l2-cache { | ||
45 | compatible = "arm,pl310-cache"; | ||
46 | reg = <0x3ff20000 0x1000>; | ||
47 | cache-unified; | ||
48 | cache-level = <2>; | ||
49 | }; | ||
50 | }; | ||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts index 7dd860f83f96..9b72054a0bc0 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts | |||
@@ -10,3 +10,18 @@ | |||
10 | reg = <0 0x10000000>; | 10 | reg = <0 0x10000000>; |
11 | }; | 11 | }; |
12 | }; | 12 | }; |
13 | |||
14 | &gpio { | ||
15 | pinctrl-names = "default"; | ||
16 | pinctrl-0 = <&alt0 &alt3>; | ||
17 | |||
18 | alt0: alt0 { | ||
19 | brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11 14 15 40 45>; | ||
20 | brcm,function = <4>; /* alt0 */ | ||
21 | }; | ||
22 | |||
23 | alt3: alt3 { | ||
24 | brcm,pins = <48 49 50 51 52 53>; | ||
25 | brcm,function = <7>; /* alt3 */ | ||
26 | }; | ||
27 | }; | ||
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 0b619398532c..8917550fd1bb 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi | |||
@@ -29,11 +29,39 @@ | |||
29 | #interrupt-cells = <2>; | 29 | #interrupt-cells = <2>; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | watchdog { | ||
33 | compatible = "brcm,bcm2835-pm-wdt"; | ||
34 | reg = <0x7e100000 0x28>; | ||
35 | }; | ||
36 | |||
32 | uart@20201000 { | 37 | uart@20201000 { |
33 | compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; | 38 | compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; |
34 | reg = <0x7e201000 0x1000>; | 39 | reg = <0x7e201000 0x1000>; |
35 | interrupts = <2 25>; | 40 | interrupts = <2 25>; |
36 | clock-frequency = <3000000>; | 41 | clock-frequency = <3000000>; |
37 | }; | 42 | }; |
43 | |||
44 | gpio: gpio { | ||
45 | compatible = "brcm,bcm2835-gpio"; | ||
46 | reg = <0x7e200000 0xb4>; | ||
47 | /* | ||
48 | * The GPIO IP block is designed for 3 banks of GPIOs. | ||
49 | * Each bank has a GPIO interrupt for itself. | ||
50 | * There is an overall "any bank" interrupt. | ||
51 | * In order, these are GIC interrupts 17, 18, 19, 20. | ||
52 | * Since the BCM2835 only has 2 banks, the 2nd bank | ||
53 | * interrupt output appears to be mirrored onto the | ||
54 | * 3rd bank's interrupt signal. | ||
55 | * So, a bank0 interrupt shows up on 17, 20, and | ||
56 | * a bank1 interrupt shows up on 18, 19, 20! | ||
57 | */ | ||
58 | interrupts = <2 17>, <2 18>, <2 19>, <2 20>; | ||
59 | |||
60 | gpio-controller; | ||
61 | #gpio-cells = <2>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <2>; | ||
65 | }; | ||
38 | }; | 66 | }; |
39 | }; | 67 | }; |
diff --git a/arch/arm/boot/dts/ecx-2000.dts b/arch/arm/boot/dts/ecx-2000.dts new file mode 100644 index 000000000000..46477ac1de99 --- /dev/null +++ b/arch/arm/boot/dts/ecx-2000.dts | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * Copyright 2011-2012 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | /dts-v1/; | ||
18 | |||
19 | /* First 4KB has pen for secondary cores. */ | ||
20 | /memreserve/ 0x00000000 0x0001000; | ||
21 | |||
22 | / { | ||
23 | model = "Calxeda ECX-2000"; | ||
24 | compatible = "calxeda,ecx-2000"; | ||
25 | #address-cells = <2>; | ||
26 | #size-cells = <2>; | ||
27 | clock-ranges; | ||
28 | |||
29 | cpus { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <0>; | ||
32 | |||
33 | cpu@0 { | ||
34 | compatible = "arm,cortex-a15"; | ||
35 | reg = <0>; | ||
36 | clocks = <&a9pll>; | ||
37 | clock-names = "cpu"; | ||
38 | }; | ||
39 | |||
40 | cpu@1 { | ||
41 | compatible = "arm,cortex-a15"; | ||
42 | reg = <1>; | ||
43 | clocks = <&a9pll>; | ||
44 | clock-names = "cpu"; | ||
45 | }; | ||
46 | |||
47 | cpu@2 { | ||
48 | compatible = "arm,cortex-a15"; | ||
49 | reg = <2>; | ||
50 | clocks = <&a9pll>; | ||
51 | clock-names = "cpu"; | ||
52 | }; | ||
53 | |||
54 | cpu@3 { | ||
55 | compatible = "arm,cortex-a15"; | ||
56 | reg = <3>; | ||
57 | clocks = <&a9pll>; | ||
58 | clock-names = "cpu"; | ||
59 | }; | ||
60 | }; | ||
61 | |||
62 | memory@0 { | ||
63 | name = "memory"; | ||
64 | device_type = "memory"; | ||
65 | reg = <0x00000000 0x00000000 0x00000000 0xff800000>; | ||
66 | }; | ||
67 | |||
68 | memory@200000000 { | ||
69 | name = "memory"; | ||
70 | device_type = "memory"; | ||
71 | reg = <0x00000002 0x00000000 0x00000003 0x00000000>; | ||
72 | }; | ||
73 | |||
74 | soc { | ||
75 | ranges = <0x00000000 0x00000000 0x00000000 0xffffffff>; | ||
76 | |||
77 | timer { | ||
78 | compatible = "arm,cortex-a15-timer", "arm,armv7-timer"; interrupts = <1 13 0xf08>, | ||
79 | <1 14 0xf08>, | ||
80 | <1 11 0xf08>, | ||
81 | <1 10 0xf08>; | ||
82 | }; | ||
83 | |||
84 | intc: interrupt-controller@fff11000 { | ||
85 | compatible = "arm,cortex-a15-gic"; | ||
86 | #interrupt-cells = <3>; | ||
87 | #size-cells = <0>; | ||
88 | #address-cells = <1>; | ||
89 | interrupt-controller; | ||
90 | interrupts = <1 9 0xf04>; | ||
91 | reg = <0xfff11000 0x1000>, | ||
92 | <0xfff12000 0x1000>, | ||
93 | <0xfff14000 0x2000>, | ||
94 | <0xfff16000 0x2000>; | ||
95 | }; | ||
96 | |||
97 | pmu { | ||
98 | compatible = "arm,cortex-a9-pmu"; | ||
99 | interrupts = <0 76 4 0 75 4 0 74 4 0 73 4>; | ||
100 | }; | ||
101 | }; | ||
102 | }; | ||
103 | |||
104 | /include/ "ecx-common.dtsi" | ||
diff --git a/arch/arm/boot/dts/ecx-common.dtsi b/arch/arm/boot/dts/ecx-common.dtsi new file mode 100644 index 000000000000..d61b535f682a --- /dev/null +++ b/arch/arm/boot/dts/ecx-common.dtsi | |||
@@ -0,0 +1,237 @@ | |||
1 | /* | ||
2 | * Copyright 2011-2012 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | / { | ||
18 | chosen { | ||
19 | bootargs = "console=ttyAMA0"; | ||
20 | }; | ||
21 | |||
22 | soc { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | compatible = "simple-bus"; | ||
26 | interrupt-parent = <&intc>; | ||
27 | |||
28 | sata@ffe08000 { | ||
29 | compatible = "calxeda,hb-ahci"; | ||
30 | reg = <0xffe08000 0x10000>; | ||
31 | interrupts = <0 83 4>; | ||
32 | dma-coherent; | ||
33 | calxeda,port-phys = <&combophy5 0 &combophy0 0 | ||
34 | &combophy0 1 &combophy0 2 | ||
35 | &combophy0 3>; | ||
36 | }; | ||
37 | |||
38 | sdhci@ffe0e000 { | ||
39 | compatible = "calxeda,hb-sdhci"; | ||
40 | reg = <0xffe0e000 0x1000>; | ||
41 | interrupts = <0 90 4>; | ||
42 | clocks = <&eclk>; | ||
43 | status = "disabled"; | ||
44 | }; | ||
45 | |||
46 | memory-controller@fff00000 { | ||
47 | compatible = "calxeda,hb-ddr-ctrl"; | ||
48 | reg = <0xfff00000 0x1000>; | ||
49 | interrupts = <0 91 4>; | ||
50 | }; | ||
51 | |||
52 | ipc@fff20000 { | ||
53 | compatible = "arm,pl320", "arm,primecell"; | ||
54 | reg = <0xfff20000 0x1000>; | ||
55 | interrupts = <0 7 4>; | ||
56 | clocks = <&pclk>; | ||
57 | clock-names = "apb_pclk"; | ||
58 | }; | ||
59 | |||
60 | gpioe: gpio@fff30000 { | ||
61 | #gpio-cells = <2>; | ||
62 | compatible = "arm,pl061", "arm,primecell"; | ||
63 | gpio-controller; | ||
64 | reg = <0xfff30000 0x1000>; | ||
65 | interrupts = <0 14 4>; | ||
66 | clocks = <&pclk>; | ||
67 | clock-names = "apb_pclk"; | ||
68 | status = "disabled"; | ||
69 | }; | ||
70 | |||
71 | gpiof: gpio@fff31000 { | ||
72 | #gpio-cells = <2>; | ||
73 | compatible = "arm,pl061", "arm,primecell"; | ||
74 | gpio-controller; | ||
75 | reg = <0xfff31000 0x1000>; | ||
76 | interrupts = <0 15 4>; | ||
77 | clocks = <&pclk>; | ||
78 | clock-names = "apb_pclk"; | ||
79 | status = "disabled"; | ||
80 | }; | ||
81 | |||
82 | gpiog: gpio@fff32000 { | ||
83 | #gpio-cells = <2>; | ||
84 | compatible = "arm,pl061", "arm,primecell"; | ||
85 | gpio-controller; | ||
86 | reg = <0xfff32000 0x1000>; | ||
87 | interrupts = <0 16 4>; | ||
88 | clocks = <&pclk>; | ||
89 | clock-names = "apb_pclk"; | ||
90 | status = "disabled"; | ||
91 | }; | ||
92 | |||
93 | gpioh: gpio@fff33000 { | ||
94 | #gpio-cells = <2>; | ||
95 | compatible = "arm,pl061", "arm,primecell"; | ||
96 | gpio-controller; | ||
97 | reg = <0xfff33000 0x1000>; | ||
98 | interrupts = <0 17 4>; | ||
99 | clocks = <&pclk>; | ||
100 | clock-names = "apb_pclk"; | ||
101 | status = "disabled"; | ||
102 | }; | ||
103 | |||
104 | timer@fff34000 { | ||
105 | compatible = "arm,sp804", "arm,primecell"; | ||
106 | reg = <0xfff34000 0x1000>; | ||
107 | interrupts = <0 18 4>; | ||
108 | clocks = <&pclk>; | ||
109 | clock-names = "apb_pclk"; | ||
110 | }; | ||
111 | |||
112 | rtc@fff35000 { | ||
113 | compatible = "arm,pl031", "arm,primecell"; | ||
114 | reg = <0xfff35000 0x1000>; | ||
115 | interrupts = <0 19 4>; | ||
116 | clocks = <&pclk>; | ||
117 | clock-names = "apb_pclk"; | ||
118 | }; | ||
119 | |||
120 | serial@fff36000 { | ||
121 | compatible = "arm,pl011", "arm,primecell"; | ||
122 | reg = <0xfff36000 0x1000>; | ||
123 | interrupts = <0 20 4>; | ||
124 | clocks = <&pclk>; | ||
125 | clock-names = "apb_pclk"; | ||
126 | }; | ||
127 | |||
128 | smic@fff3a000 { | ||
129 | compatible = "ipmi-smic"; | ||
130 | device_type = "ipmi"; | ||
131 | reg = <0xfff3a000 0x1000>; | ||
132 | interrupts = <0 24 4>; | ||
133 | reg-size = <4>; | ||
134 | reg-spacing = <4>; | ||
135 | }; | ||
136 | |||
137 | sregs@fff3c000 { | ||
138 | compatible = "calxeda,hb-sregs"; | ||
139 | reg = <0xfff3c000 0x1000>; | ||
140 | |||
141 | clocks { | ||
142 | #address-cells = <1>; | ||
143 | #size-cells = <0>; | ||
144 | |||
145 | osc: oscillator { | ||
146 | #clock-cells = <0>; | ||
147 | compatible = "fixed-clock"; | ||
148 | clock-frequency = <33333000>; | ||
149 | }; | ||
150 | |||
151 | ddrpll: ddrpll { | ||
152 | #clock-cells = <0>; | ||
153 | compatible = "calxeda,hb-pll-clock"; | ||
154 | clocks = <&osc>; | ||
155 | reg = <0x108>; | ||
156 | }; | ||
157 | |||
158 | a9pll: a9pll { | ||
159 | #clock-cells = <0>; | ||
160 | compatible = "calxeda,hb-pll-clock"; | ||
161 | clocks = <&osc>; | ||
162 | reg = <0x100>; | ||
163 | }; | ||
164 | |||
165 | a9periphclk: a9periphclk { | ||
166 | #clock-cells = <0>; | ||
167 | compatible = "calxeda,hb-a9periph-clock"; | ||
168 | clocks = <&a9pll>; | ||
169 | reg = <0x104>; | ||
170 | }; | ||
171 | |||
172 | a9bclk: a9bclk { | ||
173 | #clock-cells = <0>; | ||
174 | compatible = "calxeda,hb-a9bus-clock"; | ||
175 | clocks = <&a9pll>; | ||
176 | reg = <0x104>; | ||
177 | }; | ||
178 | |||
179 | emmcpll: emmcpll { | ||
180 | #clock-cells = <0>; | ||
181 | compatible = "calxeda,hb-pll-clock"; | ||
182 | clocks = <&osc>; | ||
183 | reg = <0x10C>; | ||
184 | }; | ||
185 | |||
186 | eclk: eclk { | ||
187 | #clock-cells = <0>; | ||
188 | compatible = "calxeda,hb-emmc-clock"; | ||
189 | clocks = <&emmcpll>; | ||
190 | reg = <0x114>; | ||
191 | }; | ||
192 | |||
193 | pclk: pclk { | ||
194 | #clock-cells = <0>; | ||
195 | compatible = "fixed-clock"; | ||
196 | clock-frequency = <150000000>; | ||
197 | }; | ||
198 | }; | ||
199 | }; | ||
200 | |||
201 | dma@fff3d000 { | ||
202 | compatible = "arm,pl330", "arm,primecell"; | ||
203 | reg = <0xfff3d000 0x1000>; | ||
204 | interrupts = <0 92 4>; | ||
205 | clocks = <&pclk>; | ||
206 | clock-names = "apb_pclk"; | ||
207 | }; | ||
208 | |||
209 | ethernet@fff50000 { | ||
210 | compatible = "calxeda,hb-xgmac"; | ||
211 | reg = <0xfff50000 0x1000>; | ||
212 | interrupts = <0 77 4 0 78 4 0 79 4>; | ||
213 | dma-coherent; | ||
214 | }; | ||
215 | |||
216 | ethernet@fff51000 { | ||
217 | compatible = "calxeda,hb-xgmac"; | ||
218 | reg = <0xfff51000 0x1000>; | ||
219 | interrupts = <0 80 4 0 81 4 0 82 4>; | ||
220 | dma-coherent; | ||
221 | }; | ||
222 | |||
223 | combophy0: combo-phy@fff58000 { | ||
224 | compatible = "calxeda,hb-combophy"; | ||
225 | #phy-cells = <1>; | ||
226 | reg = <0xfff58000 0x1000>; | ||
227 | phydev = <5>; | ||
228 | }; | ||
229 | |||
230 | combophy5: combo-phy@fff5d000 { | ||
231 | compatible = "calxeda,hb-combophy"; | ||
232 | #phy-cells = <1>; | ||
233 | reg = <0xfff5d000 0x1000>; | ||
234 | phydev = <31>; | ||
235 | }; | ||
236 | }; | ||
237 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index a26c3dd58269..96d4462730fb 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
@@ -244,5 +244,11 @@ | |||
244 | reg = <0x12690000 0x1000>; | 244 | reg = <0x12690000 0x1000>; |
245 | interrupts = <0 36 0>; | 245 | interrupts = <0 36 0>; |
246 | }; | 246 | }; |
247 | |||
248 | mdma1: mdma@12850000 { | ||
249 | compatible = "arm,pl330", "arm,primecell"; | ||
250 | reg = <0x12850000 0x1000>; | ||
251 | interrupts = <0 34 0>; | ||
252 | }; | ||
247 | }; | 253 | }; |
248 | }; | 254 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi index b12cf272ad0d..6a4a1a04221c 100644 --- a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi | |||
@@ -16,6 +16,134 @@ | |||
16 | 16 | ||
17 | / { | 17 | / { |
18 | pinctrl@11400000 { | 18 | pinctrl@11400000 { |
19 | gpa0: gpa0 { | ||
20 | gpio-controller; | ||
21 | #gpio-cells = <2>; | ||
22 | |||
23 | interrupt-controller; | ||
24 | #interrupt-cells = <2>; | ||
25 | }; | ||
26 | |||
27 | gpa1: gpa1 { | ||
28 | gpio-controller; | ||
29 | #gpio-cells = <2>; | ||
30 | |||
31 | interrupt-controller; | ||
32 | #interrupt-cells = <2>; | ||
33 | }; | ||
34 | |||
35 | gpb: gpb { | ||
36 | gpio-controller; | ||
37 | #gpio-cells = <2>; | ||
38 | |||
39 | interrupt-controller; | ||
40 | #interrupt-cells = <2>; | ||
41 | }; | ||
42 | |||
43 | gpc0: gpc0 { | ||
44 | gpio-controller; | ||
45 | #gpio-cells = <2>; | ||
46 | |||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <2>; | ||
49 | }; | ||
50 | |||
51 | gpc1: gpc1 { | ||
52 | gpio-controller; | ||
53 | #gpio-cells = <2>; | ||
54 | |||
55 | interrupt-controller; | ||
56 | #interrupt-cells = <2>; | ||
57 | }; | ||
58 | |||
59 | gpd0: gpd0 { | ||
60 | gpio-controller; | ||
61 | #gpio-cells = <2>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <2>; | ||
65 | }; | ||
66 | |||
67 | gpd1: gpd1 { | ||
68 | gpio-controller; | ||
69 | #gpio-cells = <2>; | ||
70 | |||
71 | interrupt-controller; | ||
72 | #interrupt-cells = <2>; | ||
73 | }; | ||
74 | |||
75 | gpe0: gpe0 { | ||
76 | gpio-controller; | ||
77 | #gpio-cells = <2>; | ||
78 | |||
79 | interrupt-controller; | ||
80 | #interrupt-cells = <2>; | ||
81 | }; | ||
82 | |||
83 | gpe1: gpe1 { | ||
84 | gpio-controller; | ||
85 | #gpio-cells = <2>; | ||
86 | |||
87 | interrupt-controller; | ||
88 | #interrupt-cells = <2>; | ||
89 | }; | ||
90 | |||
91 | gpe2: gpe2 { | ||
92 | gpio-controller; | ||
93 | #gpio-cells = <2>; | ||
94 | |||
95 | interrupt-controller; | ||
96 | #interrupt-cells = <2>; | ||
97 | }; | ||
98 | |||
99 | gpe3: gpe3 { | ||
100 | gpio-controller; | ||
101 | #gpio-cells = <2>; | ||
102 | |||
103 | interrupt-controller; | ||
104 | #interrupt-cells = <2>; | ||
105 | }; | ||
106 | |||
107 | gpe4: gpe4 { | ||
108 | gpio-controller; | ||
109 | #gpio-cells = <2>; | ||
110 | |||
111 | interrupt-controller; | ||
112 | #interrupt-cells = <2>; | ||
113 | }; | ||
114 | |||
115 | gpf0: gpf0 { | ||
116 | gpio-controller; | ||
117 | #gpio-cells = <2>; | ||
118 | |||
119 | interrupt-controller; | ||
120 | #interrupt-cells = <2>; | ||
121 | }; | ||
122 | |||
123 | gpf1: gpf1 { | ||
124 | gpio-controller; | ||
125 | #gpio-cells = <2>; | ||
126 | |||
127 | interrupt-controller; | ||
128 | #interrupt-cells = <2>; | ||
129 | }; | ||
130 | |||
131 | gpf2: gpf2 { | ||
132 | gpio-controller; | ||
133 | #gpio-cells = <2>; | ||
134 | |||
135 | interrupt-controller; | ||
136 | #interrupt-cells = <2>; | ||
137 | }; | ||
138 | |||
139 | gpf3: gpf3 { | ||
140 | gpio-controller; | ||
141 | #gpio-cells = <2>; | ||
142 | |||
143 | interrupt-controller; | ||
144 | #interrupt-cells = <2>; | ||
145 | }; | ||
146 | |||
19 | uart0_data: uart0-data { | 147 | uart0_data: uart0-data { |
20 | samsung,pins = "gpa0-0", "gpa0-1"; | 148 | samsung,pins = "gpa0-0", "gpa0-1"; |
21 | samsung,pin-function = <0x2>; | 149 | samsung,pin-function = <0x2>; |
@@ -205,6 +333,151 @@ | |||
205 | }; | 333 | }; |
206 | 334 | ||
207 | pinctrl@11000000 { | 335 | pinctrl@11000000 { |
336 | gpj0: gpj0 { | ||
337 | gpio-controller; | ||
338 | #gpio-cells = <2>; | ||
339 | |||
340 | interrupt-controller; | ||
341 | #interrupt-cells = <2>; | ||
342 | }; | ||
343 | |||
344 | gpj1: gpj1 { | ||
345 | gpio-controller; | ||
346 | #gpio-cells = <2>; | ||
347 | |||
348 | interrupt-controller; | ||
349 | #interrupt-cells = <2>; | ||
350 | }; | ||
351 | |||
352 | gpk0: gpk0 { | ||
353 | gpio-controller; | ||
354 | #gpio-cells = <2>; | ||
355 | |||
356 | interrupt-controller; | ||
357 | #interrupt-cells = <2>; | ||
358 | }; | ||
359 | |||
360 | gpk1: gpk1 { | ||
361 | gpio-controller; | ||
362 | #gpio-cells = <2>; | ||
363 | |||
364 | interrupt-controller; | ||
365 | #interrupt-cells = <2>; | ||
366 | }; | ||
367 | |||
368 | gpk2: gpk2 { | ||
369 | gpio-controller; | ||
370 | #gpio-cells = <2>; | ||
371 | |||
372 | interrupt-controller; | ||
373 | #interrupt-cells = <2>; | ||
374 | }; | ||
375 | |||
376 | gpk3: gpk3 { | ||
377 | gpio-controller; | ||
378 | #gpio-cells = <2>; | ||
379 | |||
380 | interrupt-controller; | ||
381 | #interrupt-cells = <2>; | ||
382 | }; | ||
383 | |||
384 | gpl0: gpl0 { | ||
385 | gpio-controller; | ||
386 | #gpio-cells = <2>; | ||
387 | |||
388 | interrupt-controller; | ||
389 | #interrupt-cells = <2>; | ||
390 | }; | ||
391 | |||
392 | gpl1: gpl1 { | ||
393 | gpio-controller; | ||
394 | #gpio-cells = <2>; | ||
395 | |||
396 | interrupt-controller; | ||
397 | #interrupt-cells = <2>; | ||
398 | }; | ||
399 | |||
400 | gpl2: gpl2 { | ||
401 | gpio-controller; | ||
402 | #gpio-cells = <2>; | ||
403 | |||
404 | interrupt-controller; | ||
405 | #interrupt-cells = <2>; | ||
406 | }; | ||
407 | |||
408 | gpy0: gpy0 { | ||
409 | gpio-controller; | ||
410 | #gpio-cells = <2>; | ||
411 | }; | ||
412 | |||
413 | gpy1: gpy1 { | ||
414 | gpio-controller; | ||
415 | #gpio-cells = <2>; | ||
416 | }; | ||
417 | |||
418 | gpy2: gpy2 { | ||
419 | gpio-controller; | ||
420 | #gpio-cells = <2>; | ||
421 | }; | ||
422 | |||
423 | gpy3: gpy3 { | ||
424 | gpio-controller; | ||
425 | #gpio-cells = <2>; | ||
426 | }; | ||
427 | |||
428 | gpy4: gpy4 { | ||
429 | gpio-controller; | ||
430 | #gpio-cells = <2>; | ||
431 | }; | ||
432 | |||
433 | gpy5: gpy5 { | ||
434 | gpio-controller; | ||
435 | #gpio-cells = <2>; | ||
436 | }; | ||
437 | |||
438 | gpy6: gpy6 { | ||
439 | gpio-controller; | ||
440 | #gpio-cells = <2>; | ||
441 | }; | ||
442 | |||
443 | gpx0: gpx0 { | ||
444 | gpio-controller; | ||
445 | #gpio-cells = <2>; | ||
446 | |||
447 | interrupt-controller; | ||
448 | interrupt-parent = <&gic>; | ||
449 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
450 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>; | ||
451 | #interrupt-cells = <2>; | ||
452 | }; | ||
453 | |||
454 | gpx1: gpx1 { | ||
455 | gpio-controller; | ||
456 | #gpio-cells = <2>; | ||
457 | |||
458 | interrupt-controller; | ||
459 | interrupt-parent = <&gic>; | ||
460 | interrupts = <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, | ||
461 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; | ||
462 | #interrupt-cells = <2>; | ||
463 | }; | ||
464 | |||
465 | gpx2: gpx2 { | ||
466 | gpio-controller; | ||
467 | #gpio-cells = <2>; | ||
468 | |||
469 | interrupt-controller; | ||
470 | #interrupt-cells = <2>; | ||
471 | }; | ||
472 | |||
473 | gpx3: gpx3 { | ||
474 | gpio-controller; | ||
475 | #gpio-cells = <2>; | ||
476 | |||
477 | interrupt-controller; | ||
478 | #interrupt-cells = <2>; | ||
479 | }; | ||
480 | |||
208 | sd0_clk: sd0-clk { | 481 | sd0_clk: sd0-clk { |
209 | samsung,pins = "gpk0-0"; | 482 | samsung,pins = "gpk0-0"; |
210 | samsung,pin-function = <2>; | 483 | samsung,pin-function = <2>; |
@@ -438,6 +711,11 @@ | |||
438 | }; | 711 | }; |
439 | 712 | ||
440 | pinctrl@03860000 { | 713 | pinctrl@03860000 { |
714 | gpz: gpz { | ||
715 | gpio-controller; | ||
716 | #gpio-cells = <2>; | ||
717 | }; | ||
718 | |||
441 | i2s0_bus: i2s0-bus { | 719 | i2s0_bus: i2s0-bus { |
442 | samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", | 720 | samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", |
443 | "gpz-4", "gpz-5", "gpz-6"; | 721 | "gpz-4", "gpz-5", "gpz-6"; |
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 214c557eda7f..d877dbe7ac0e 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
@@ -46,27 +46,17 @@ | |||
46 | compatible = "samsung,pinctrl-exynos4210"; | 46 | compatible = "samsung,pinctrl-exynos4210"; |
47 | reg = <0x11400000 0x1000>; | 47 | reg = <0x11400000 0x1000>; |
48 | interrupts = <0 47 0>; | 48 | interrupts = <0 47 0>; |
49 | interrupt-controller; | ||
50 | #interrupt-cells = <2>; | ||
51 | }; | 49 | }; |
52 | 50 | ||
53 | pinctrl_1: pinctrl@11000000 { | 51 | pinctrl_1: pinctrl@11000000 { |
54 | compatible = "samsung,pinctrl-exynos4210"; | 52 | compatible = "samsung,pinctrl-exynos4210"; |
55 | reg = <0x11000000 0x1000>; | 53 | reg = <0x11000000 0x1000>; |
56 | interrupts = <0 46 0>; | 54 | interrupts = <0 46 0>; |
57 | interrupt-controller; | ||
58 | #interrupt-cells = <2>; | ||
59 | 55 | ||
60 | wakup_eint: wakeup-interrupt-controller { | 56 | wakup_eint: wakeup-interrupt-controller { |
61 | compatible = "samsung,exynos4210-wakeup-eint"; | 57 | compatible = "samsung,exynos4210-wakeup-eint"; |
62 | interrupt-parent = <&gic>; | 58 | interrupt-parent = <&gic>; |
63 | interrupt-controller; | 59 | interrupts = <0 32 0>; |
64 | #interrupt-cells = <2>; | ||
65 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
66 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>, | ||
67 | <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, | ||
68 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>, | ||
69 | <0 32 0>; | ||
70 | }; | 60 | }; |
71 | }; | 61 | }; |
72 | 62 | ||
@@ -74,233 +64,4 @@ | |||
74 | compatible = "samsung,pinctrl-exynos4210"; | 64 | compatible = "samsung,pinctrl-exynos4210"; |
75 | reg = <0x03860000 0x1000>; | 65 | reg = <0x03860000 0x1000>; |
76 | }; | 66 | }; |
77 | |||
78 | gpio-controllers { | ||
79 | #address-cells = <1>; | ||
80 | #size-cells = <1>; | ||
81 | gpio-controller; | ||
82 | ranges; | ||
83 | |||
84 | gpa0: gpio-controller@11400000 { | ||
85 | compatible = "samsung,exynos4-gpio"; | ||
86 | reg = <0x11400000 0x20>; | ||
87 | #gpio-cells = <4>; | ||
88 | }; | ||
89 | |||
90 | gpa1: gpio-controller@11400020 { | ||
91 | compatible = "samsung,exynos4-gpio"; | ||
92 | reg = <0x11400020 0x20>; | ||
93 | #gpio-cells = <4>; | ||
94 | }; | ||
95 | |||
96 | gpb: gpio-controller@11400040 { | ||
97 | compatible = "samsung,exynos4-gpio"; | ||
98 | reg = <0x11400040 0x20>; | ||
99 | #gpio-cells = <4>; | ||
100 | }; | ||
101 | |||
102 | gpc0: gpio-controller@11400060 { | ||
103 | compatible = "samsung,exynos4-gpio"; | ||
104 | reg = <0x11400060 0x20>; | ||
105 | #gpio-cells = <4>; | ||
106 | }; | ||
107 | |||
108 | gpc1: gpio-controller@11400080 { | ||
109 | compatible = "samsung,exynos4-gpio"; | ||
110 | reg = <0x11400080 0x20>; | ||
111 | #gpio-cells = <4>; | ||
112 | }; | ||
113 | |||
114 | gpd0: gpio-controller@114000A0 { | ||
115 | compatible = "samsung,exynos4-gpio"; | ||
116 | reg = <0x114000A0 0x20>; | ||
117 | #gpio-cells = <4>; | ||
118 | }; | ||
119 | |||
120 | gpd1: gpio-controller@114000C0 { | ||
121 | compatible = "samsung,exynos4-gpio"; | ||
122 | reg = <0x114000C0 0x20>; | ||
123 | #gpio-cells = <4>; | ||
124 | }; | ||
125 | |||
126 | gpe0: gpio-controller@114000E0 { | ||
127 | compatible = "samsung,exynos4-gpio"; | ||
128 | reg = <0x114000E0 0x20>; | ||
129 | #gpio-cells = <4>; | ||
130 | }; | ||
131 | |||
132 | gpe1: gpio-controller@11400100 { | ||
133 | compatible = "samsung,exynos4-gpio"; | ||
134 | reg = <0x11400100 0x20>; | ||
135 | #gpio-cells = <4>; | ||
136 | }; | ||
137 | |||
138 | gpe2: gpio-controller@11400120 { | ||
139 | compatible = "samsung,exynos4-gpio"; | ||
140 | reg = <0x11400120 0x20>; | ||
141 | #gpio-cells = <4>; | ||
142 | }; | ||
143 | |||
144 | gpe3: gpio-controller@11400140 { | ||
145 | compatible = "samsung,exynos4-gpio"; | ||
146 | reg = <0x11400140 0x20>; | ||
147 | #gpio-cells = <4>; | ||
148 | }; | ||
149 | |||
150 | gpe4: gpio-controller@11400160 { | ||
151 | compatible = "samsung,exynos4-gpio"; | ||
152 | reg = <0x11400160 0x20>; | ||
153 | #gpio-cells = <4>; | ||
154 | }; | ||
155 | |||
156 | gpf0: gpio-controller@11400180 { | ||
157 | compatible = "samsung,exynos4-gpio"; | ||
158 | reg = <0x11400180 0x20>; | ||
159 | #gpio-cells = <4>; | ||
160 | }; | ||
161 | |||
162 | gpf1: gpio-controller@114001A0 { | ||
163 | compatible = "samsung,exynos4-gpio"; | ||
164 | reg = <0x114001A0 0x20>; | ||
165 | #gpio-cells = <4>; | ||
166 | }; | ||
167 | |||
168 | gpf2: gpio-controller@114001C0 { | ||
169 | compatible = "samsung,exynos4-gpio"; | ||
170 | reg = <0x114001C0 0x20>; | ||
171 | #gpio-cells = <4>; | ||
172 | }; | ||
173 | |||
174 | gpf3: gpio-controller@114001E0 { | ||
175 | compatible = "samsung,exynos4-gpio"; | ||
176 | reg = <0x114001E0 0x20>; | ||
177 | #gpio-cells = <4>; | ||
178 | }; | ||
179 | |||
180 | gpj0: gpio-controller@11000000 { | ||
181 | compatible = "samsung,exynos4-gpio"; | ||
182 | reg = <0x11000000 0x20>; | ||
183 | #gpio-cells = <4>; | ||
184 | }; | ||
185 | |||
186 | gpj1: gpio-controller@11000020 { | ||
187 | compatible = "samsung,exynos4-gpio"; | ||
188 | reg = <0x11000020 0x20>; | ||
189 | #gpio-cells = <4>; | ||
190 | }; | ||
191 | |||
192 | gpk0: gpio-controller@11000040 { | ||
193 | compatible = "samsung,exynos4-gpio"; | ||
194 | reg = <0x11000040 0x20>; | ||
195 | #gpio-cells = <4>; | ||
196 | }; | ||
197 | |||
198 | gpk1: gpio-controller@11000060 { | ||
199 | compatible = "samsung,exynos4-gpio"; | ||
200 | reg = <0x11000060 0x20>; | ||
201 | #gpio-cells = <4>; | ||
202 | }; | ||
203 | |||
204 | gpk2: gpio-controller@11000080 { | ||
205 | compatible = "samsung,exynos4-gpio"; | ||
206 | reg = <0x11000080 0x20>; | ||
207 | #gpio-cells = <4>; | ||
208 | }; | ||
209 | |||
210 | gpk3: gpio-controller@110000A0 { | ||
211 | compatible = "samsung,exynos4-gpio"; | ||
212 | reg = <0x110000A0 0x20>; | ||
213 | #gpio-cells = <4>; | ||
214 | }; | ||
215 | |||
216 | gpl0: gpio-controller@110000C0 { | ||
217 | compatible = "samsung,exynos4-gpio"; | ||
218 | reg = <0x110000C0 0x20>; | ||
219 | #gpio-cells = <4>; | ||
220 | }; | ||
221 | |||
222 | gpl1: gpio-controller@110000E0 { | ||
223 | compatible = "samsung,exynos4-gpio"; | ||
224 | reg = <0x110000E0 0x20>; | ||
225 | #gpio-cells = <4>; | ||
226 | }; | ||
227 | |||
228 | gpl2: gpio-controller@11000100 { | ||
229 | compatible = "samsung,exynos4-gpio"; | ||
230 | reg = <0x11000100 0x20>; | ||
231 | #gpio-cells = <4>; | ||
232 | }; | ||
233 | |||
234 | gpy0: gpio-controller@11000120 { | ||
235 | compatible = "samsung,exynos4-gpio"; | ||
236 | reg = <0x11000120 0x20>; | ||
237 | #gpio-cells = <4>; | ||
238 | }; | ||
239 | |||
240 | gpy1: gpio-controller@11000140 { | ||
241 | compatible = "samsung,exynos4-gpio"; | ||
242 | reg = <0x11000140 0x20>; | ||
243 | #gpio-cells = <4>; | ||
244 | }; | ||
245 | |||
246 | gpy2: gpio-controller@11000160 { | ||
247 | compatible = "samsung,exynos4-gpio"; | ||
248 | reg = <0x11000160 0x20>; | ||
249 | #gpio-cells = <4>; | ||
250 | }; | ||
251 | |||
252 | gpy3: gpio-controller@11000180 { | ||
253 | compatible = "samsung,exynos4-gpio"; | ||
254 | reg = <0x11000180 0x20>; | ||
255 | #gpio-cells = <4>; | ||
256 | }; | ||
257 | |||
258 | gpy4: gpio-controller@110001A0 { | ||
259 | compatible = "samsung,exynos4-gpio"; | ||
260 | reg = <0x110001A0 0x20>; | ||
261 | #gpio-cells = <4>; | ||
262 | }; | ||
263 | |||
264 | gpy5: gpio-controller@110001C0 { | ||
265 | compatible = "samsung,exynos4-gpio"; | ||
266 | reg = <0x110001C0 0x20>; | ||
267 | #gpio-cells = <4>; | ||
268 | }; | ||
269 | |||
270 | gpy6: gpio-controller@110001E0 { | ||
271 | compatible = "samsung,exynos4-gpio"; | ||
272 | reg = <0x110001E0 0x20>; | ||
273 | #gpio-cells = <4>; | ||
274 | }; | ||
275 | |||
276 | gpx0: gpio-controller@11000C00 { | ||
277 | compatible = "samsung,exynos4-gpio"; | ||
278 | reg = <0x11000C00 0x20>; | ||
279 | #gpio-cells = <4>; | ||
280 | }; | ||
281 | |||
282 | gpx1: gpio-controller@11000C20 { | ||
283 | compatible = "samsung,exynos4-gpio"; | ||
284 | reg = <0x11000C20 0x20>; | ||
285 | #gpio-cells = <4>; | ||
286 | }; | ||
287 | |||
288 | gpx2: gpio-controller@11000C40 { | ||
289 | compatible = "samsung,exynos4-gpio"; | ||
290 | reg = <0x11000C40 0x20>; | ||
291 | #gpio-cells = <4>; | ||
292 | }; | ||
293 | |||
294 | gpx3: gpio-controller@11000C60 { | ||
295 | compatible = "samsung,exynos4-gpio"; | ||
296 | reg = <0x11000C60 0x20>; | ||
297 | #gpio-cells = <4>; | ||
298 | }; | ||
299 | |||
300 | gpz: gpio-controller@03860000 { | ||
301 | compatible = "samsung,exynos4-gpio"; | ||
302 | reg = <0x03860000 0x20>; | ||
303 | #gpio-cells = <4>; | ||
304 | }; | ||
305 | }; | ||
306 | }; | 67 | }; |
diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts new file mode 100644 index 000000000000..921c83cf694f --- /dev/null +++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * SAMSUNG SSDK5440 board device tree source | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | /include/ "exynos5440.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "SAMSUNG SSDK5440 board based on EXYNOS5440"; | ||
17 | compatible = "samsung,ssdk5440", "samsung,exynos5440"; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x80000000 0x80000000>; | ||
21 | }; | ||
22 | |||
23 | chosen { | ||
24 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC2,115200 init=/linuxrc"; | ||
25 | }; | ||
26 | |||
27 | spi { | ||
28 | status = "disabled"; | ||
29 | }; | ||
30 | |||
31 | i2c@F0000 { | ||
32 | status = "disabled"; | ||
33 | }; | ||
34 | |||
35 | i2c@100000 { | ||
36 | status = "disabled"; | ||
37 | }; | ||
38 | |||
39 | watchdog { | ||
40 | status = "disabled"; | ||
41 | }; | ||
42 | |||
43 | rtc { | ||
44 | status = "disabled"; | ||
45 | }; | ||
46 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi new file mode 100644 index 000000000000..024269de8ee5 --- /dev/null +++ b/arch/arm/boot/dts/exynos5440.dtsi | |||
@@ -0,0 +1,159 @@ | |||
1 | /* | ||
2 | * SAMSUNG EXYNOS5440 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | /include/ "skeleton.dtsi" | ||
13 | |||
14 | / { | ||
15 | compatible = "samsung,exynos5440"; | ||
16 | |||
17 | interrupt-parent = <&gic>; | ||
18 | |||
19 | gic:interrupt-controller@2E0000 { | ||
20 | compatible = "arm,cortex-a15-gic"; | ||
21 | #interrupt-cells = <3>; | ||
22 | interrupt-controller; | ||
23 | reg = <0x2E1000 0x1000>, <0x2E2000 0x1000>; | ||
24 | }; | ||
25 | |||
26 | cpus { | ||
27 | cpu@0 { | ||
28 | compatible = "arm,cortex-a15"; | ||
29 | timer { | ||
30 | compatible = "arm,armv7-timer"; | ||
31 | interrupts = <1 13 0xf08>; | ||
32 | clock-frequency = <1000000>; | ||
33 | }; | ||
34 | }; | ||
35 | cpu@1 { | ||
36 | compatible = "arm,cortex-a15"; | ||
37 | timer { | ||
38 | compatible = "arm,armv7-timer"; | ||
39 | interrupts = <1 14 0xf08>; | ||
40 | clock-frequency = <1000000>; | ||
41 | }; | ||
42 | }; | ||
43 | cpu@2 { | ||
44 | compatible = "arm,cortex-a15"; | ||
45 | timer { | ||
46 | compatible = "arm,armv7-timer"; | ||
47 | interrupts = <1 14 0xf08>; | ||
48 | clock-frequency = <1000000>; | ||
49 | }; | ||
50 | }; | ||
51 | cpu@3 { | ||
52 | compatible = "arm,cortex-a15"; | ||
53 | timer { | ||
54 | compatible = "arm,armv7-timer"; | ||
55 | interrupts = <1 14 0xf08>; | ||
56 | clock-frequency = <1000000>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
60 | |||
61 | common { | ||
62 | compatible = "samsung,exynos5440"; | ||
63 | |||
64 | }; | ||
65 | |||
66 | serial@B0000 { | ||
67 | compatible = "samsung,exynos4210-uart"; | ||
68 | reg = <0xB0000 0x1000>; | ||
69 | interrupts = <0 2 0>; | ||
70 | }; | ||
71 | |||
72 | serial@C0000 { | ||
73 | compatible = "samsung,exynos4210-uart"; | ||
74 | reg = <0xC0000 0x1000>; | ||
75 | interrupts = <0 3 0>; | ||
76 | }; | ||
77 | |||
78 | spi { | ||
79 | compatible = "samsung,exynos4210-spi"; | ||
80 | reg = <0xD0000 0x1000>; | ||
81 | interrupts = <0 4 0>; | ||
82 | tx-dma-channel = <&pdma0 5>; /* preliminary */ | ||
83 | rx-dma-channel = <&pdma0 4>; /* preliminary */ | ||
84 | #address-cells = <1>; | ||
85 | #size-cells = <0>; | ||
86 | }; | ||
87 | |||
88 | pinctrl { | ||
89 | compatible = "samsung,pinctrl-exynos5440"; | ||
90 | reg = <0xE0000 0x1000>; | ||
91 | interrupt-controller; | ||
92 | #interrupt-cells = <2>; | ||
93 | #gpio-cells = <2>; | ||
94 | |||
95 | fan: fan { | ||
96 | samsung,exynos5440-pin-function = <1>; | ||
97 | }; | ||
98 | |||
99 | hdd_led0: hdd_led0 { | ||
100 | samsung,exynos5440-pin-function = <2>; | ||
101 | }; | ||
102 | |||
103 | hdd_led1: hdd_led1 { | ||
104 | samsung,exynos5440-pin-function = <3>; | ||
105 | }; | ||
106 | |||
107 | uart1: uart1 { | ||
108 | samsung,exynos5440-pin-function = <4>; | ||
109 | }; | ||
110 | }; | ||
111 | |||
112 | i2c@F0000 { | ||
113 | compatible = "samsung,s3c2440-i2c"; | ||
114 | reg = <0xF0000 0x1000>; | ||
115 | interrupts = <0 5 0>; | ||
116 | #address-cells = <1>; | ||
117 | #size-cells = <0>; | ||
118 | }; | ||
119 | |||
120 | i2c@100000 { | ||
121 | compatible = "samsung,s3c2440-i2c"; | ||
122 | reg = <0x100000 0x1000>; | ||
123 | interrupts = <0 6 0>; | ||
124 | #address-cells = <1>; | ||
125 | #size-cells = <0>; | ||
126 | }; | ||
127 | |||
128 | watchdog { | ||
129 | compatible = "samsung,s3c2410-wdt"; | ||
130 | reg = <0x110000 0x1000>; | ||
131 | interrupts = <0 1 0>; | ||
132 | }; | ||
133 | |||
134 | amba { | ||
135 | #address-cells = <1>; | ||
136 | #size-cells = <1>; | ||
137 | compatible = "arm,amba-bus"; | ||
138 | interrupt-parent = <&gic>; | ||
139 | ranges; | ||
140 | |||
141 | pdma0: pdma@121A0000 { | ||
142 | compatible = "arm,pl330", "arm,primecell"; | ||
143 | reg = <0x120000 0x1000>; | ||
144 | interrupts = <0 34 0>; | ||
145 | }; | ||
146 | |||
147 | pdma1: pdma@121B0000 { | ||
148 | compatible = "arm,pl330", "arm,primecell"; | ||
149 | reg = <0x121000 0x1000>; | ||
150 | interrupts = <0 35 0>; | ||
151 | }; | ||
152 | }; | ||
153 | |||
154 | rtc { | ||
155 | compatible = "samsung,s3c6410-rtc"; | ||
156 | reg = <0x130000 0x1000>; | ||
157 | interrupts = <0 16 0>, <0 17 0>; | ||
158 | }; | ||
159 | }; | ||
diff --git a/arch/arm/boot/dts/highbank.dts b/arch/arm/boot/dts/highbank.dts index 0c6fc34821f9..a9ae5d32e80d 100644 --- a/arch/arm/boot/dts/highbank.dts +++ b/arch/arm/boot/dts/highbank.dts | |||
@@ -69,16 +69,8 @@ | |||
69 | reg = <0x00000000 0xff900000>; | 69 | reg = <0x00000000 0xff900000>; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | chosen { | ||
73 | bootargs = "console=ttyAMA0"; | ||
74 | }; | ||
75 | |||
76 | soc { | 72 | soc { |
77 | #address-cells = <1>; | 73 | ranges = <0x00000000 0x00000000 0xffffffff>; |
78 | #size-cells = <1>; | ||
79 | compatible = "simple-bus"; | ||
80 | interrupt-parent = <&intc>; | ||
81 | ranges; | ||
82 | 74 | ||
83 | timer@fff10600 { | 75 | timer@fff10600 { |
84 | compatible = "arm,cortex-a9-twd-timer"; | 76 | compatible = "arm,cortex-a9-twd-timer"; |
@@ -117,173 +109,6 @@ | |||
117 | interrupts = <0 76 4 0 75 4 0 74 4 0 73 4>; | 109 | interrupts = <0 76 4 0 75 4 0 74 4 0 73 4>; |
118 | }; | 110 | }; |
119 | 111 | ||
120 | sata@ffe08000 { | ||
121 | compatible = "calxeda,hb-ahci"; | ||
122 | reg = <0xffe08000 0x10000>; | ||
123 | interrupts = <0 83 4>; | ||
124 | calxeda,port-phys = <&combophy5 0 &combophy0 0 | ||
125 | &combophy0 1 &combophy0 2 | ||
126 | &combophy0 3>; | ||
127 | dma-coherent; | ||
128 | }; | ||
129 | |||
130 | sdhci@ffe0e000 { | ||
131 | compatible = "calxeda,hb-sdhci"; | ||
132 | reg = <0xffe0e000 0x1000>; | ||
133 | interrupts = <0 90 4>; | ||
134 | clocks = <&eclk>; | ||
135 | }; | ||
136 | |||
137 | memory-controller@fff00000 { | ||
138 | compatible = "calxeda,hb-ddr-ctrl"; | ||
139 | reg = <0xfff00000 0x1000>; | ||
140 | interrupts = <0 91 4>; | ||
141 | }; | ||
142 | |||
143 | ipc@fff20000 { | ||
144 | compatible = "arm,pl320", "arm,primecell"; | ||
145 | reg = <0xfff20000 0x1000>; | ||
146 | interrupts = <0 7 4>; | ||
147 | clocks = <&pclk>; | ||
148 | clock-names = "apb_pclk"; | ||
149 | }; | ||
150 | |||
151 | gpioe: gpio@fff30000 { | ||
152 | #gpio-cells = <2>; | ||
153 | compatible = "arm,pl061", "arm,primecell"; | ||
154 | gpio-controller; | ||
155 | reg = <0xfff30000 0x1000>; | ||
156 | interrupts = <0 14 4>; | ||
157 | clocks = <&pclk>; | ||
158 | clock-names = "apb_pclk"; | ||
159 | }; | ||
160 | |||
161 | gpiof: gpio@fff31000 { | ||
162 | #gpio-cells = <2>; | ||
163 | compatible = "arm,pl061", "arm,primecell"; | ||
164 | gpio-controller; | ||
165 | reg = <0xfff31000 0x1000>; | ||
166 | interrupts = <0 15 4>; | ||
167 | clocks = <&pclk>; | ||
168 | clock-names = "apb_pclk"; | ||
169 | }; | ||
170 | |||
171 | gpiog: gpio@fff32000 { | ||
172 | #gpio-cells = <2>; | ||
173 | compatible = "arm,pl061", "arm,primecell"; | ||
174 | gpio-controller; | ||
175 | reg = <0xfff32000 0x1000>; | ||
176 | interrupts = <0 16 4>; | ||
177 | clocks = <&pclk>; | ||
178 | clock-names = "apb_pclk"; | ||
179 | }; | ||
180 | |||
181 | gpioh: gpio@fff33000 { | ||
182 | #gpio-cells = <2>; | ||
183 | compatible = "arm,pl061", "arm,primecell"; | ||
184 | gpio-controller; | ||
185 | reg = <0xfff33000 0x1000>; | ||
186 | interrupts = <0 17 4>; | ||
187 | clocks = <&pclk>; | ||
188 | clock-names = "apb_pclk"; | ||
189 | }; | ||
190 | |||
191 | timer { | ||
192 | compatible = "arm,sp804", "arm,primecell"; | ||
193 | reg = <0xfff34000 0x1000>; | ||
194 | interrupts = <0 18 4>; | ||
195 | clocks = <&pclk>; | ||
196 | clock-names = "apb_pclk"; | ||
197 | }; | ||
198 | |||
199 | rtc@fff35000 { | ||
200 | compatible = "arm,pl031", "arm,primecell"; | ||
201 | reg = <0xfff35000 0x1000>; | ||
202 | interrupts = <0 19 4>; | ||
203 | clocks = <&pclk>; | ||
204 | clock-names = "apb_pclk"; | ||
205 | }; | ||
206 | |||
207 | serial@fff36000 { | ||
208 | compatible = "arm,pl011", "arm,primecell"; | ||
209 | reg = <0xfff36000 0x1000>; | ||
210 | interrupts = <0 20 4>; | ||
211 | clocks = <&pclk>; | ||
212 | clock-names = "apb_pclk"; | ||
213 | }; | ||
214 | |||
215 | smic@fff3a000 { | ||
216 | compatible = "ipmi-smic"; | ||
217 | device_type = "ipmi"; | ||
218 | reg = <0xfff3a000 0x1000>; | ||
219 | interrupts = <0 24 4>; | ||
220 | reg-size = <4>; | ||
221 | reg-spacing = <4>; | ||
222 | }; | ||
223 | |||
224 | sregs@fff3c000 { | ||
225 | compatible = "calxeda,hb-sregs"; | ||
226 | reg = <0xfff3c000 0x1000>; | ||
227 | |||
228 | clocks { | ||
229 | #address-cells = <1>; | ||
230 | #size-cells = <0>; | ||
231 | |||
232 | osc: oscillator { | ||
233 | #clock-cells = <0>; | ||
234 | compatible = "fixed-clock"; | ||
235 | clock-frequency = <33333000>; | ||
236 | }; | ||
237 | |||
238 | ddrpll: ddrpll { | ||
239 | #clock-cells = <0>; | ||
240 | compatible = "calxeda,hb-pll-clock"; | ||
241 | clocks = <&osc>; | ||
242 | reg = <0x108>; | ||
243 | }; | ||
244 | |||
245 | a9pll: a9pll { | ||
246 | #clock-cells = <0>; | ||
247 | compatible = "calxeda,hb-pll-clock"; | ||
248 | clocks = <&osc>; | ||
249 | reg = <0x100>; | ||
250 | }; | ||
251 | |||
252 | a9periphclk: a9periphclk { | ||
253 | #clock-cells = <0>; | ||
254 | compatible = "calxeda,hb-a9periph-clock"; | ||
255 | clocks = <&a9pll>; | ||
256 | reg = <0x104>; | ||
257 | }; | ||
258 | |||
259 | a9bclk: a9bclk { | ||
260 | #clock-cells = <0>; | ||
261 | compatible = "calxeda,hb-a9bus-clock"; | ||
262 | clocks = <&a9pll>; | ||
263 | reg = <0x104>; | ||
264 | }; | ||
265 | |||
266 | emmcpll: emmcpll { | ||
267 | #clock-cells = <0>; | ||
268 | compatible = "calxeda,hb-pll-clock"; | ||
269 | clocks = <&osc>; | ||
270 | reg = <0x10C>; | ||
271 | }; | ||
272 | |||
273 | eclk: eclk { | ||
274 | #clock-cells = <0>; | ||
275 | compatible = "calxeda,hb-emmc-clock"; | ||
276 | clocks = <&emmcpll>; | ||
277 | reg = <0x114>; | ||
278 | }; | ||
279 | |||
280 | pclk: pclk { | ||
281 | #clock-cells = <0>; | ||
282 | compatible = "fixed-clock"; | ||
283 | clock-frequency = <150000000>; | ||
284 | }; | ||
285 | }; | ||
286 | }; | ||
287 | 112 | ||
288 | sregs@fff3c200 { | 113 | sregs@fff3c200 { |
289 | compatible = "calxeda,hb-sregs-l2-ecc"; | 114 | compatible = "calxeda,hb-sregs-l2-ecc"; |
@@ -291,38 +116,7 @@ | |||
291 | interrupts = <0 71 4 0 72 4>; | 116 | interrupts = <0 71 4 0 72 4>; |
292 | }; | 117 | }; |
293 | 118 | ||
294 | dma@fff3d000 { | ||
295 | compatible = "arm,pl330", "arm,primecell"; | ||
296 | reg = <0xfff3d000 0x1000>; | ||
297 | interrupts = <0 92 4>; | ||
298 | clocks = <&pclk>; | ||
299 | clock-names = "apb_pclk"; | ||
300 | }; | ||
301 | |||
302 | ethernet@fff50000 { | ||
303 | compatible = "calxeda,hb-xgmac"; | ||
304 | reg = <0xfff50000 0x1000>; | ||
305 | interrupts = <0 77 4 0 78 4 0 79 4>; | ||
306 | }; | ||
307 | |||
308 | ethernet@fff51000 { | ||
309 | compatible = "calxeda,hb-xgmac"; | ||
310 | reg = <0xfff51000 0x1000>; | ||
311 | interrupts = <0 80 4 0 81 4 0 82 4>; | ||
312 | }; | ||
313 | |||
314 | combophy0: combo-phy@fff58000 { | ||
315 | compatible = "calxeda,hb-combophy"; | ||
316 | #phy-cells = <1>; | ||
317 | reg = <0xfff58000 0x1000>; | ||
318 | phydev = <5>; | ||
319 | }; | ||
320 | |||
321 | combophy5: combo-phy@fff5d000 { | ||
322 | compatible = "calxeda,hb-combophy"; | ||
323 | #phy-cells = <1>; | ||
324 | reg = <0xfff5d000 0x1000>; | ||
325 | phydev = <31>; | ||
326 | }; | ||
327 | }; | 119 | }; |
328 | }; | 120 | }; |
121 | |||
122 | /include/ "ecx-common.dtsi" | ||
diff --git a/arch/arm/boot/dts/imx27-3ds.dts b/arch/arm/boot/dts/imx27-3ds.dts index 0a8978a40ece..b01c0d745fc5 100644 --- a/arch/arm/boot/dts/imx27-3ds.dts +++ b/arch/arm/boot/dts/imx27-3ds.dts | |||
@@ -23,10 +23,6 @@ | |||
23 | soc { | 23 | soc { |
24 | aipi@10000000 { /* aipi */ | 24 | aipi@10000000 { /* aipi */ |
25 | 25 | ||
26 | wdog@10002000 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | uart1: serial@1000a000 { | 26 | uart1: serial@1000a000 { |
31 | fsl,uart-has-rtscts; | 27 | fsl,uart-has-rtscts; |
32 | status = "okay"; | 28 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index cbd2b1c7487b..567e7ee72f91 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts | |||
@@ -22,6 +22,22 @@ | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | soc { | 24 | soc { |
25 | display@di0 { | ||
26 | compatible = "fsl,imx-parallel-display"; | ||
27 | crtcs = <&ipu 0>; | ||
28 | interface-pix-fmt = "rgb24"; | ||
29 | pinctrl-names = "default"; | ||
30 | pinctrl-0 = <&pinctrl_ipu_disp1_1>; | ||
31 | }; | ||
32 | |||
33 | display@di1 { | ||
34 | compatible = "fsl,imx-parallel-display"; | ||
35 | crtcs = <&ipu 1>; | ||
36 | interface-pix-fmt = "rgb565"; | ||
37 | pinctrl-names = "default"; | ||
38 | pinctrl-0 = <&pinctrl_ipu_disp2_1>; | ||
39 | }; | ||
40 | |||
25 | aips@70000000 { /* aips-1 */ | 41 | aips@70000000 { /* aips-1 */ |
26 | spba@70000000 { | 42 | spba@70000000 { |
27 | esdhc@70004000 { /* ESDHC1 */ | 43 | esdhc@70004000 { /* ESDHC1 */ |
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi index 54aea74769a1..2781e47cff0d 100644 --- a/arch/arm/boot/dts/imx51.dtsi +++ b/arch/arm/boot/dts/imx51.dtsi | |||
@@ -62,6 +62,13 @@ | |||
62 | interrupt-parent = <&tzic>; | 62 | interrupt-parent = <&tzic>; |
63 | ranges; | 63 | ranges; |
64 | 64 | ||
65 | ipu: ipu@40000000 { | ||
66 | #crtc-cells = <1>; | ||
67 | compatible = "fsl,imx51-ipu"; | ||
68 | reg = <0x40000000 0x20000000>; | ||
69 | interrupts = <11 10>; | ||
70 | }; | ||
71 | |||
65 | aips@70000000 { /* AIPS1 */ | 72 | aips@70000000 { /* AIPS1 */ |
66 | compatible = "fsl,aips-bus", "simple-bus"; | 73 | compatible = "fsl,aips-bus", "simple-bus"; |
67 | #address-cells = <1>; | 74 | #address-cells = <1>; |
@@ -80,6 +87,8 @@ | |||
80 | compatible = "fsl,imx51-esdhc"; | 87 | compatible = "fsl,imx51-esdhc"; |
81 | reg = <0x70004000 0x4000>; | 88 | reg = <0x70004000 0x4000>; |
82 | interrupts = <1>; | 89 | interrupts = <1>; |
90 | clocks = <&clks 44>, <&clks 0>, <&clks 71>; | ||
91 | clock-names = "ipg", "ahb", "per"; | ||
83 | status = "disabled"; | 92 | status = "disabled"; |
84 | }; | 93 | }; |
85 | 94 | ||
@@ -87,6 +96,8 @@ | |||
87 | compatible = "fsl,imx51-esdhc"; | 96 | compatible = "fsl,imx51-esdhc"; |
88 | reg = <0x70008000 0x4000>; | 97 | reg = <0x70008000 0x4000>; |
89 | interrupts = <2>; | 98 | interrupts = <2>; |
99 | clocks = <&clks 45>, <&clks 0>, <&clks 72>; | ||
100 | clock-names = "ipg", "ahb", "per"; | ||
90 | status = "disabled"; | 101 | status = "disabled"; |
91 | }; | 102 | }; |
92 | 103 | ||
@@ -94,6 +105,8 @@ | |||
94 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 105 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
95 | reg = <0x7000c000 0x4000>; | 106 | reg = <0x7000c000 0x4000>; |
96 | interrupts = <33>; | 107 | interrupts = <33>; |
108 | clocks = <&clks 32>, <&clks 33>; | ||
109 | clock-names = "ipg", "per"; | ||
97 | status = "disabled"; | 110 | status = "disabled"; |
98 | }; | 111 | }; |
99 | 112 | ||
@@ -103,6 +116,8 @@ | |||
103 | compatible = "fsl,imx51-ecspi"; | 116 | compatible = "fsl,imx51-ecspi"; |
104 | reg = <0x70010000 0x4000>; | 117 | reg = <0x70010000 0x4000>; |
105 | interrupts = <36>; | 118 | interrupts = <36>; |
119 | clocks = <&clks 51>, <&clks 52>; | ||
120 | clock-names = "ipg", "per"; | ||
106 | status = "disabled"; | 121 | status = "disabled"; |
107 | }; | 122 | }; |
108 | 123 | ||
@@ -110,6 +125,7 @@ | |||
110 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; | 125 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; |
111 | reg = <0x70014000 0x4000>; | 126 | reg = <0x70014000 0x4000>; |
112 | interrupts = <30>; | 127 | interrupts = <30>; |
128 | clocks = <&clks 49>; | ||
113 | fsl,fifo-depth = <15>; | 129 | fsl,fifo-depth = <15>; |
114 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ | 130 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ |
115 | status = "disabled"; | 131 | status = "disabled"; |
@@ -119,6 +135,8 @@ | |||
119 | compatible = "fsl,imx51-esdhc"; | 135 | compatible = "fsl,imx51-esdhc"; |
120 | reg = <0x70020000 0x4000>; | 136 | reg = <0x70020000 0x4000>; |
121 | interrupts = <3>; | 137 | interrupts = <3>; |
138 | clocks = <&clks 46>, <&clks 0>, <&clks 73>; | ||
139 | clock-names = "ipg", "ahb", "per"; | ||
122 | status = "disabled"; | 140 | status = "disabled"; |
123 | }; | 141 | }; |
124 | 142 | ||
@@ -126,6 +144,8 @@ | |||
126 | compatible = "fsl,imx51-esdhc"; | 144 | compatible = "fsl,imx51-esdhc"; |
127 | reg = <0x70024000 0x4000>; | 145 | reg = <0x70024000 0x4000>; |
128 | interrupts = <4>; | 146 | interrupts = <4>; |
147 | clocks = <&clks 47>, <&clks 0>, <&clks 74>; | ||
148 | clock-names = "ipg", "ahb", "per"; | ||
129 | status = "disabled"; | 149 | status = "disabled"; |
130 | }; | 150 | }; |
131 | }; | 151 | }; |
@@ -202,12 +222,14 @@ | |||
202 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; | 222 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; |
203 | reg = <0x73f98000 0x4000>; | 223 | reg = <0x73f98000 0x4000>; |
204 | interrupts = <58>; | 224 | interrupts = <58>; |
225 | clocks = <&clks 0>; | ||
205 | }; | 226 | }; |
206 | 227 | ||
207 | wdog@73f9c000 { /* WDOG2 */ | 228 | wdog@73f9c000 { /* WDOG2 */ |
208 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; | 229 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; |
209 | reg = <0x73f9c000 0x4000>; | 230 | reg = <0x73f9c000 0x4000>; |
210 | interrupts = <59>; | 231 | interrupts = <59>; |
232 | clocks = <&clks 0>; | ||
211 | status = "disabled"; | 233 | status = "disabled"; |
212 | }; | 234 | }; |
213 | 235 | ||
@@ -295,6 +317,66 @@ | |||
295 | }; | 317 | }; |
296 | }; | 318 | }; |
297 | 319 | ||
320 | ipu_disp1 { | ||
321 | pinctrl_ipu_disp1_1: ipudisp1grp-1 { | ||
322 | fsl,pins = < | ||
323 | 528 0x5 /* MX51_PAD_DISP1_DAT0__DISP1_DAT0 */ | ||
324 | 529 0x5 /* MX51_PAD_DISP1_DAT1__DISP1_DAT1 */ | ||
325 | 530 0x5 /* MX51_PAD_DISP1_DAT2__DISP1_DAT2 */ | ||
326 | 531 0x5 /* MX51_PAD_DISP1_DAT3__DISP1_DAT3 */ | ||
327 | 532 0x5 /* MX51_PAD_DISP1_DAT4__DISP1_DAT4 */ | ||
328 | 533 0x5 /* MX51_PAD_DISP1_DAT5__DISP1_DAT5 */ | ||
329 | 535 0x5 /* MX51_PAD_DISP1_DAT6__DISP1_DAT6 */ | ||
330 | 537 0x5 /* MX51_PAD_DISP1_DAT7__DISP1_DAT7 */ | ||
331 | 539 0x5 /* MX51_PAD_DISP1_DAT8__DISP1_DAT8 */ | ||
332 | 541 0x5 /* MX51_PAD_DISP1_DAT9__DISP1_DAT9 */ | ||
333 | 543 0x5 /* MX51_PAD_DISP1_DAT10__DISP1_DAT10 */ | ||
334 | 545 0x5 /* MX51_PAD_DISP1_DAT11__DISP1_DAT11 */ | ||
335 | 547 0x5 /* MX51_PAD_DISP1_DAT12__DISP1_DAT12 */ | ||
336 | 549 0x5 /* MX51_PAD_DISP1_DAT13__DISP1_DAT13 */ | ||
337 | 551 0x5 /* MX51_PAD_DISP1_DAT14__DISP1_DAT14 */ | ||
338 | 553 0x5 /* MX51_PAD_DISP1_DAT15__DISP1_DAT15 */ | ||
339 | 555 0x5 /* MX51_PAD_DISP1_DAT16__DISP1_DAT16 */ | ||
340 | 557 0x5 /* MX51_PAD_DISP1_DAT17__DISP1_DAT17 */ | ||
341 | 559 0x5 /* MX51_PAD_DISP1_DAT18__DISP1_DAT18 */ | ||
342 | 563 0x5 /* MX51_PAD_DISP1_DAT19__DISP1_DAT19 */ | ||
343 | 567 0x5 /* MX51_PAD_DISP1_DAT20__DISP1_DAT20 */ | ||
344 | 571 0x5 /* MX51_PAD_DISP1_DAT21__DISP1_DAT21 */ | ||
345 | 575 0x5 /* MX51_PAD_DISP1_DAT22__DISP1_DAT22 */ | ||
346 | 579 0x5 /* MX51_PAD_DISP1_DAT23__DISP1_DAT23 */ | ||
347 | 584 0x5 /* MX51_PAD_DI1_PIN2__DI1_PIN2 (hsync) */ | ||
348 | 583 0x5 /* MX51_PAD_DI1_PIN3__DI1_PIN3 (vsync) */ | ||
349 | >; | ||
350 | }; | ||
351 | }; | ||
352 | |||
353 | ipu_disp2 { | ||
354 | pinctrl_ipu_disp2_1: ipudisp2grp-1 { | ||
355 | fsl,pins = < | ||
356 | 603 0x5 /* MX51_PAD_DISP2_DAT0__DISP2_DAT0 */ | ||
357 | 608 0x5 /* MX51_PAD_DISP2_DAT1__DISP2_DAT1 */ | ||
358 | 613 0x5 /* MX51_PAD_DISP2_DAT2__DISP2_DAT2 */ | ||
359 | 614 0x5 /* MX51_PAD_DISP2_DAT3__DISP2_DAT3 */ | ||
360 | 615 0x5 /* MX51_PAD_DISP2_DAT4__DISP2_DAT4 */ | ||
361 | 616 0x5 /* MX51_PAD_DISP2_DAT5__DISP2_DAT5 */ | ||
362 | 617 0x5 /* MX51_PAD_DISP2_DAT6__DISP2_DAT6 */ | ||
363 | 622 0x5 /* MX51_PAD_DISP2_DAT7__DISP2_DAT7 */ | ||
364 | 627 0x5 /* MX51_PAD_DISP2_DAT8__DISP2_DAT8 */ | ||
365 | 633 0x5 /* MX51_PAD_DISP2_DAT9__DISP2_DAT9 */ | ||
366 | 637 0x5 /* MX51_PAD_DISP2_DAT10__DISP2_DAT10 */ | ||
367 | 643 0x5 /* MX51_PAD_DISP2_DAT11__DISP2_DAT11 */ | ||
368 | 648 0x5 /* MX51_PAD_DISP2_DAT12__DISP2_DAT12 */ | ||
369 | 652 0x5 /* MX51_PAD_DISP2_DAT13__DISP2_DAT13 */ | ||
370 | 656 0x5 /* MX51_PAD_DISP2_DAT14__DISP2_DAT14 */ | ||
371 | 661 0x5 /* MX51_PAD_DISP2_DAT15__DISP2_DAT15 */ | ||
372 | 593 0x5 /* MX51_PAD_DI2_PIN2__DI2_PIN2 (hsync) */ | ||
373 | 595 0x5 /* MX51_PAD_DI2_PIN3__DI2_PIN3 (vsync) */ | ||
374 | 597 0x5 /* MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK */ | ||
375 | 599 0x5 /* MX51_PAD_DI_GP4__DI2_PIN15 */ | ||
376 | >; | ||
377 | }; | ||
378 | }; | ||
379 | |||
298 | uart1 { | 380 | uart1 { |
299 | pinctrl_uart1_1: uart1grp-1 { | 381 | pinctrl_uart1_1: uart1grp-1 { |
300 | fsl,pins = < | 382 | fsl,pins = < |
@@ -327,10 +409,30 @@ | |||
327 | }; | 409 | }; |
328 | }; | 410 | }; |
329 | 411 | ||
412 | pwm1: pwm@73fb4000 { | ||
413 | #pwm-cells = <2>; | ||
414 | compatible = "fsl,imx51-pwm", "fsl,imx27-pwm"; | ||
415 | reg = <0x73fb4000 0x4000>; | ||
416 | clocks = <&clks 37>, <&clks 38>; | ||
417 | clock-names = "ipg", "per"; | ||
418 | interrupts = <61>; | ||
419 | }; | ||
420 | |||
421 | pwm2: pwm@73fb8000 { | ||
422 | #pwm-cells = <2>; | ||
423 | compatible = "fsl,imx51-pwm", "fsl,imx27-pwm"; | ||
424 | reg = <0x73fb8000 0x4000>; | ||
425 | clocks = <&clks 39>, <&clks 40>; | ||
426 | clock-names = "ipg", "per"; | ||
427 | interrupts = <94>; | ||
428 | }; | ||
429 | |||
330 | uart1: serial@73fbc000 { | 430 | uart1: serial@73fbc000 { |
331 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 431 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
332 | reg = <0x73fbc000 0x4000>; | 432 | reg = <0x73fbc000 0x4000>; |
333 | interrupts = <31>; | 433 | interrupts = <31>; |
434 | clocks = <&clks 28>, <&clks 29>; | ||
435 | clock-names = "ipg", "per"; | ||
334 | status = "disabled"; | 436 | status = "disabled"; |
335 | }; | 437 | }; |
336 | 438 | ||
@@ -338,8 +440,17 @@ | |||
338 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 440 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
339 | reg = <0x73fc0000 0x4000>; | 441 | reg = <0x73fc0000 0x4000>; |
340 | interrupts = <32>; | 442 | interrupts = <32>; |
443 | clocks = <&clks 30>, <&clks 31>; | ||
444 | clock-names = "ipg", "per"; | ||
341 | status = "disabled"; | 445 | status = "disabled"; |
342 | }; | 446 | }; |
447 | |||
448 | clks: ccm@73fd4000{ | ||
449 | compatible = "fsl,imx51-ccm"; | ||
450 | reg = <0x73fd4000 0x4000>; | ||
451 | interrupts = <0 71 0x04 0 72 0x04>; | ||
452 | #clock-cells = <1>; | ||
453 | }; | ||
343 | }; | 454 | }; |
344 | 455 | ||
345 | aips@80000000 { /* AIPS2 */ | 456 | aips@80000000 { /* AIPS2 */ |
@@ -355,6 +466,8 @@ | |||
355 | compatible = "fsl,imx51-ecspi"; | 466 | compatible = "fsl,imx51-ecspi"; |
356 | reg = <0x83fac000 0x4000>; | 467 | reg = <0x83fac000 0x4000>; |
357 | interrupts = <37>; | 468 | interrupts = <37>; |
469 | clocks = <&clks 53>, <&clks 54>; | ||
470 | clock-names = "ipg", "per"; | ||
358 | status = "disabled"; | 471 | status = "disabled"; |
359 | }; | 472 | }; |
360 | 473 | ||
@@ -362,6 +475,8 @@ | |||
362 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; | 475 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; |
363 | reg = <0x83fb0000 0x4000>; | 476 | reg = <0x83fb0000 0x4000>; |
364 | interrupts = <6>; | 477 | interrupts = <6>; |
478 | clocks = <&clks 56>, <&clks 56>; | ||
479 | clock-names = "ipg", "ahb"; | ||
365 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin"; | 480 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin"; |
366 | }; | 481 | }; |
367 | 482 | ||
@@ -371,6 +486,8 @@ | |||
371 | compatible = "fsl,imx51-cspi", "fsl,imx35-cspi"; | 486 | compatible = "fsl,imx51-cspi", "fsl,imx35-cspi"; |
372 | reg = <0x83fc0000 0x4000>; | 487 | reg = <0x83fc0000 0x4000>; |
373 | interrupts = <38>; | 488 | interrupts = <38>; |
489 | clocks = <&clks 55>, <&clks 0>; | ||
490 | clock-names = "ipg", "per"; | ||
374 | status = "disabled"; | 491 | status = "disabled"; |
375 | }; | 492 | }; |
376 | 493 | ||
@@ -380,6 +497,7 @@ | |||
380 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; | 497 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; |
381 | reg = <0x83fc4000 0x4000>; | 498 | reg = <0x83fc4000 0x4000>; |
382 | interrupts = <63>; | 499 | interrupts = <63>; |
500 | clocks = <&clks 35>; | ||
383 | status = "disabled"; | 501 | status = "disabled"; |
384 | }; | 502 | }; |
385 | 503 | ||
@@ -389,6 +507,7 @@ | |||
389 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; | 507 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; |
390 | reg = <0x83fc8000 0x4000>; | 508 | reg = <0x83fc8000 0x4000>; |
391 | interrupts = <62>; | 509 | interrupts = <62>; |
510 | clocks = <&clks 34>; | ||
392 | status = "disabled"; | 511 | status = "disabled"; |
393 | }; | 512 | }; |
394 | 513 | ||
@@ -396,6 +515,7 @@ | |||
396 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; | 515 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; |
397 | reg = <0x83fcc000 0x4000>; | 516 | reg = <0x83fcc000 0x4000>; |
398 | interrupts = <29>; | 517 | interrupts = <29>; |
518 | clocks = <&clks 48>; | ||
399 | fsl,fifo-depth = <15>; | 519 | fsl,fifo-depth = <15>; |
400 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ | 520 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ |
401 | status = "disabled"; | 521 | status = "disabled"; |
@@ -411,6 +531,7 @@ | |||
411 | compatible = "fsl,imx51-nand"; | 531 | compatible = "fsl,imx51-nand"; |
412 | reg = <0x83fdb000 0x1000 0xcfff0000 0x10000>; | 532 | reg = <0x83fdb000 0x1000 0xcfff0000 0x10000>; |
413 | interrupts = <8>; | 533 | interrupts = <8>; |
534 | clocks = <&clks 60>; | ||
414 | status = "disabled"; | 535 | status = "disabled"; |
415 | }; | 536 | }; |
416 | 537 | ||
@@ -418,6 +539,7 @@ | |||
418 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; | 539 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; |
419 | reg = <0x83fe8000 0x4000>; | 540 | reg = <0x83fe8000 0x4000>; |
420 | interrupts = <96>; | 541 | interrupts = <96>; |
542 | clocks = <&clks 50>; | ||
421 | fsl,fifo-depth = <15>; | 543 | fsl,fifo-depth = <15>; |
422 | fsl,ssi-dma-events = <47 46 37 35>; /* TX0 RX0 TX1 RX1 */ | 544 | fsl,ssi-dma-events = <47 46 37 35>; /* TX0 RX0 TX1 RX1 */ |
423 | status = "disabled"; | 545 | status = "disabled"; |
@@ -427,6 +549,8 @@ | |||
427 | compatible = "fsl,imx51-fec", "fsl,imx27-fec"; | 549 | compatible = "fsl,imx51-fec", "fsl,imx27-fec"; |
428 | reg = <0x83fec000 0x4000>; | 550 | reg = <0x83fec000 0x4000>; |
429 | interrupts = <87>; | 551 | interrupts = <87>; |
552 | clocks = <&clks 42>, <&clks 42>, <&clks 42>; | ||
553 | clock-names = "ipg", "ahb", "ptp"; | ||
430 | status = "disabled"; | 554 | status = "disabled"; |
431 | }; | 555 | }; |
432 | }; | 556 | }; |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index caf09ff73f10..da9a047ce4cf 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
@@ -67,6 +67,13 @@ | |||
67 | interrupt-parent = <&tzic>; | 67 | interrupt-parent = <&tzic>; |
68 | ranges; | 68 | ranges; |
69 | 69 | ||
70 | ipu: ipu@18000000 { | ||
71 | #crtc-cells = <1>; | ||
72 | compatible = "fsl,imx53-ipu"; | ||
73 | reg = <0x18000000 0x080000000>; | ||
74 | interrupts = <11 10>; | ||
75 | }; | ||
76 | |||
70 | aips@50000000 { /* AIPS1 */ | 77 | aips@50000000 { /* AIPS1 */ |
71 | compatible = "fsl,aips-bus", "simple-bus"; | 78 | compatible = "fsl,aips-bus", "simple-bus"; |
72 | #address-cells = <1>; | 79 | #address-cells = <1>; |
@@ -85,6 +92,8 @@ | |||
85 | compatible = "fsl,imx53-esdhc"; | 92 | compatible = "fsl,imx53-esdhc"; |
86 | reg = <0x50004000 0x4000>; | 93 | reg = <0x50004000 0x4000>; |
87 | interrupts = <1>; | 94 | interrupts = <1>; |
95 | clocks = <&clks 44>, <&clks 0>, <&clks 71>; | ||
96 | clock-names = "ipg", "ahb", "per"; | ||
88 | status = "disabled"; | 97 | status = "disabled"; |
89 | }; | 98 | }; |
90 | 99 | ||
@@ -92,6 +101,8 @@ | |||
92 | compatible = "fsl,imx53-esdhc"; | 101 | compatible = "fsl,imx53-esdhc"; |
93 | reg = <0x50008000 0x4000>; | 102 | reg = <0x50008000 0x4000>; |
94 | interrupts = <2>; | 103 | interrupts = <2>; |
104 | clocks = <&clks 45>, <&clks 0>, <&clks 72>; | ||
105 | clock-names = "ipg", "ahb", "per"; | ||
95 | status = "disabled"; | 106 | status = "disabled"; |
96 | }; | 107 | }; |
97 | 108 | ||
@@ -99,6 +110,8 @@ | |||
99 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 110 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
100 | reg = <0x5000c000 0x4000>; | 111 | reg = <0x5000c000 0x4000>; |
101 | interrupts = <33>; | 112 | interrupts = <33>; |
113 | clocks = <&clks 32>, <&clks 33>; | ||
114 | clock-names = "ipg", "per"; | ||
102 | status = "disabled"; | 115 | status = "disabled"; |
103 | }; | 116 | }; |
104 | 117 | ||
@@ -108,6 +121,8 @@ | |||
108 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; | 121 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; |
109 | reg = <0x50010000 0x4000>; | 122 | reg = <0x50010000 0x4000>; |
110 | interrupts = <36>; | 123 | interrupts = <36>; |
124 | clocks = <&clks 51>, <&clks 52>; | ||
125 | clock-names = "ipg", "per"; | ||
111 | status = "disabled"; | 126 | status = "disabled"; |
112 | }; | 127 | }; |
113 | 128 | ||
@@ -115,6 +130,7 @@ | |||
115 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; | 130 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; |
116 | reg = <0x50014000 0x4000>; | 131 | reg = <0x50014000 0x4000>; |
117 | interrupts = <30>; | 132 | interrupts = <30>; |
133 | clocks = <&clks 49>; | ||
118 | fsl,fifo-depth = <15>; | 134 | fsl,fifo-depth = <15>; |
119 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ | 135 | fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ |
120 | status = "disabled"; | 136 | status = "disabled"; |
@@ -124,6 +140,8 @@ | |||
124 | compatible = "fsl,imx53-esdhc"; | 140 | compatible = "fsl,imx53-esdhc"; |
125 | reg = <0x50020000 0x4000>; | 141 | reg = <0x50020000 0x4000>; |
126 | interrupts = <3>; | 142 | interrupts = <3>; |
143 | clocks = <&clks 46>, <&clks 0>, <&clks 73>; | ||
144 | clock-names = "ipg", "ahb", "per"; | ||
127 | status = "disabled"; | 145 | status = "disabled"; |
128 | }; | 146 | }; |
129 | 147 | ||
@@ -131,6 +149,8 @@ | |||
131 | compatible = "fsl,imx53-esdhc"; | 149 | compatible = "fsl,imx53-esdhc"; |
132 | reg = <0x50024000 0x4000>; | 150 | reg = <0x50024000 0x4000>; |
133 | interrupts = <4>; | 151 | interrupts = <4>; |
152 | clocks = <&clks 47>, <&clks 0>, <&clks 74>; | ||
153 | clock-names = "ipg", "ahb", "per"; | ||
134 | status = "disabled"; | 154 | status = "disabled"; |
135 | }; | 155 | }; |
136 | }; | 156 | }; |
@@ -207,12 +227,14 @@ | |||
207 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; | 227 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; |
208 | reg = <0x53f98000 0x4000>; | 228 | reg = <0x53f98000 0x4000>; |
209 | interrupts = <58>; | 229 | interrupts = <58>; |
230 | clocks = <&clks 0>; | ||
210 | }; | 231 | }; |
211 | 232 | ||
212 | wdog@53f9c000 { /* WDOG2 */ | 233 | wdog@53f9c000 { /* WDOG2 */ |
213 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; | 234 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; |
214 | reg = <0x53f9c000 0x4000>; | 235 | reg = <0x53f9c000 0x4000>; |
215 | interrupts = <59>; | 236 | interrupts = <59>; |
237 | clocks = <&clks 0>; | ||
216 | status = "disabled"; | 238 | status = "disabled"; |
217 | }; | 239 | }; |
218 | 240 | ||
@@ -371,10 +393,30 @@ | |||
371 | }; | 393 | }; |
372 | }; | 394 | }; |
373 | 395 | ||
396 | pwm1: pwm@53fb4000 { | ||
397 | #pwm-cells = <2>; | ||
398 | compatible = "fsl,imx53-pwm", "fsl,imx27-pwm"; | ||
399 | reg = <0x53fb4000 0x4000>; | ||
400 | clocks = <&clks 37>, <&clks 38>; | ||
401 | clock-names = "ipg", "per"; | ||
402 | interrupts = <61>; | ||
403 | }; | ||
404 | |||
405 | pwm2: pwm@53fb8000 { | ||
406 | #pwm-cells = <2>; | ||
407 | compatible = "fsl,imx53-pwm", "fsl,imx27-pwm"; | ||
408 | reg = <0x53fb8000 0x4000>; | ||
409 | clocks = <&clks 39>, <&clks 40>; | ||
410 | clock-names = "ipg", "per"; | ||
411 | interrupts = <94>; | ||
412 | }; | ||
413 | |||
374 | uart1: serial@53fbc000 { | 414 | uart1: serial@53fbc000 { |
375 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 415 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
376 | reg = <0x53fbc000 0x4000>; | 416 | reg = <0x53fbc000 0x4000>; |
377 | interrupts = <31>; | 417 | interrupts = <31>; |
418 | clocks = <&clks 28>, <&clks 29>; | ||
419 | clock-names = "ipg", "per"; | ||
378 | status = "disabled"; | 420 | status = "disabled"; |
379 | }; | 421 | }; |
380 | 422 | ||
@@ -382,6 +424,8 @@ | |||
382 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 424 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
383 | reg = <0x53fc0000 0x4000>; | 425 | reg = <0x53fc0000 0x4000>; |
384 | interrupts = <32>; | 426 | interrupts = <32>; |
427 | clocks = <&clks 30>, <&clks 31>; | ||
428 | clock-names = "ipg", "per"; | ||
385 | status = "disabled"; | 429 | status = "disabled"; |
386 | }; | 430 | }; |
387 | 431 | ||
@@ -389,6 +433,8 @@ | |||
389 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | 433 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; |
390 | reg = <0x53fc8000 0x4000>; | 434 | reg = <0x53fc8000 0x4000>; |
391 | interrupts = <82>; | 435 | interrupts = <82>; |
436 | clocks = <&clks 158>, <&clks 157>; | ||
437 | clock-names = "ipg", "per"; | ||
392 | status = "disabled"; | 438 | status = "disabled"; |
393 | }; | 439 | }; |
394 | 440 | ||
@@ -396,9 +442,18 @@ | |||
396 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | 442 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; |
397 | reg = <0x53fcc000 0x4000>; | 443 | reg = <0x53fcc000 0x4000>; |
398 | interrupts = <83>; | 444 | interrupts = <83>; |
445 | clocks = <&clks 158>, <&clks 157>; | ||
446 | clock-names = "ipg", "per"; | ||
399 | status = "disabled"; | 447 | status = "disabled"; |
400 | }; | 448 | }; |
401 | 449 | ||
450 | clks: ccm@53fd4000{ | ||
451 | compatible = "fsl,imx53-ccm"; | ||
452 | reg = <0x53fd4000 0x4000>; | ||
453 | interrupts = <0 71 0x04 0 72 0x04>; | ||
454 | #clock-cells = <1>; | ||
455 | }; | ||
456 | |||
402 | gpio5: gpio@53fdc000 { | 457 | gpio5: gpio@53fdc000 { |
403 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; | 458 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; |
404 | reg = <0x53fdc000 0x4000>; | 459 | reg = <0x53fdc000 0x4000>; |
@@ -435,6 +490,7 @@ | |||
435 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; | 490 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; |
436 | reg = <0x53fec000 0x4000>; | 491 | reg = <0x53fec000 0x4000>; |
437 | interrupts = <64>; | 492 | interrupts = <64>; |
493 | clocks = <&clks 88>; | ||
438 | status = "disabled"; | 494 | status = "disabled"; |
439 | }; | 495 | }; |
440 | 496 | ||
@@ -442,6 +498,8 @@ | |||
442 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 498 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
443 | reg = <0x53ff0000 0x4000>; | 499 | reg = <0x53ff0000 0x4000>; |
444 | interrupts = <13>; | 500 | interrupts = <13>; |
501 | clocks = <&clks 65>, <&clks 66>; | ||
502 | clock-names = "ipg", "per"; | ||
445 | status = "disabled"; | 503 | status = "disabled"; |
446 | }; | 504 | }; |
447 | }; | 505 | }; |
@@ -457,6 +515,8 @@ | |||
457 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 515 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
458 | reg = <0x63f90000 0x4000>; | 516 | reg = <0x63f90000 0x4000>; |
459 | interrupts = <86>; | 517 | interrupts = <86>; |
518 | clocks = <&clks 67>, <&clks 68>; | ||
519 | clock-names = "ipg", "per"; | ||
460 | status = "disabled"; | 520 | status = "disabled"; |
461 | }; | 521 | }; |
462 | 522 | ||
@@ -466,6 +526,8 @@ | |||
466 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; | 526 | compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; |
467 | reg = <0x63fac000 0x4000>; | 527 | reg = <0x63fac000 0x4000>; |
468 | interrupts = <37>; | 528 | interrupts = <37>; |
529 | clocks = <&clks 53>, <&clks 54>; | ||
530 | clock-names = "ipg", "per"; | ||
469 | status = "disabled"; | 531 | status = "disabled"; |
470 | }; | 532 | }; |
471 | 533 | ||
@@ -473,6 +535,8 @@ | |||
473 | compatible = "fsl,imx53-sdma", "fsl,imx35-sdma"; | 535 | compatible = "fsl,imx53-sdma", "fsl,imx35-sdma"; |
474 | reg = <0x63fb0000 0x4000>; | 536 | reg = <0x63fb0000 0x4000>; |
475 | interrupts = <6>; | 537 | interrupts = <6>; |
538 | clocks = <&clks 56>, <&clks 56>; | ||
539 | clock-names = "ipg", "ahb"; | ||
476 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; | 540 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; |
477 | }; | 541 | }; |
478 | 542 | ||
@@ -482,6 +546,8 @@ | |||
482 | compatible = "fsl,imx53-cspi", "fsl,imx35-cspi"; | 546 | compatible = "fsl,imx53-cspi", "fsl,imx35-cspi"; |
483 | reg = <0x63fc0000 0x4000>; | 547 | reg = <0x63fc0000 0x4000>; |
484 | interrupts = <38>; | 548 | interrupts = <38>; |
549 | clocks = <&clks 55>, <&clks 0>; | ||
550 | clock-names = "ipg", "per"; | ||
485 | status = "disabled"; | 551 | status = "disabled"; |
486 | }; | 552 | }; |
487 | 553 | ||
@@ -491,6 +557,7 @@ | |||
491 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; | 557 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; |
492 | reg = <0x63fc4000 0x4000>; | 558 | reg = <0x63fc4000 0x4000>; |
493 | interrupts = <63>; | 559 | interrupts = <63>; |
560 | clocks = <&clks 35>; | ||
494 | status = "disabled"; | 561 | status = "disabled"; |
495 | }; | 562 | }; |
496 | 563 | ||
@@ -500,6 +567,7 @@ | |||
500 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; | 567 | compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; |
501 | reg = <0x63fc8000 0x4000>; | 568 | reg = <0x63fc8000 0x4000>; |
502 | interrupts = <62>; | 569 | interrupts = <62>; |
570 | clocks = <&clks 34>; | ||
503 | status = "disabled"; | 571 | status = "disabled"; |
504 | }; | 572 | }; |
505 | 573 | ||
@@ -507,6 +575,7 @@ | |||
507 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; | 575 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; |
508 | reg = <0x63fcc000 0x4000>; | 576 | reg = <0x63fcc000 0x4000>; |
509 | interrupts = <29>; | 577 | interrupts = <29>; |
578 | clocks = <&clks 48>; | ||
510 | fsl,fifo-depth = <15>; | 579 | fsl,fifo-depth = <15>; |
511 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ | 580 | fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ |
512 | status = "disabled"; | 581 | status = "disabled"; |
@@ -522,6 +591,7 @@ | |||
522 | compatible = "fsl,imx53-nand"; | 591 | compatible = "fsl,imx53-nand"; |
523 | reg = <0x63fdb000 0x1000 0xf7ff0000 0x10000>; | 592 | reg = <0x63fdb000 0x1000 0xf7ff0000 0x10000>; |
524 | interrupts = <8>; | 593 | interrupts = <8>; |
594 | clocks = <&clks 60>; | ||
525 | status = "disabled"; | 595 | status = "disabled"; |
526 | }; | 596 | }; |
527 | 597 | ||
@@ -529,6 +599,7 @@ | |||
529 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; | 599 | compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; |
530 | reg = <0x63fe8000 0x4000>; | 600 | reg = <0x63fe8000 0x4000>; |
531 | interrupts = <96>; | 601 | interrupts = <96>; |
602 | clocks = <&clks 50>; | ||
532 | fsl,fifo-depth = <15>; | 603 | fsl,fifo-depth = <15>; |
533 | fsl,ssi-dma-events = <47 46 45 44>; /* TX0 RX0 TX1 RX1 */ | 604 | fsl,ssi-dma-events = <47 46 45 44>; /* TX0 RX0 TX1 RX1 */ |
534 | status = "disabled"; | 605 | status = "disabled"; |
@@ -538,6 +609,8 @@ | |||
538 | compatible = "fsl,imx53-fec", "fsl,imx25-fec"; | 609 | compatible = "fsl,imx53-fec", "fsl,imx25-fec"; |
539 | reg = <0x63fec000 0x4000>; | 610 | reg = <0x63fec000 0x4000>; |
540 | interrupts = <87>; | 611 | interrupts = <87>; |
612 | clocks = <&clks 42>, <&clks 42>, <&clks 42>; | ||
613 | clock-names = "ipg", "ahb", "ptp"; | ||
541 | status = "disabled"; | 614 | status = "disabled"; |
542 | }; | 615 | }; |
543 | }; | 616 | }; |
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index f604a44a5c66..d907d062e5dd 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi | |||
@@ -268,23 +268,39 @@ | |||
268 | }; | 268 | }; |
269 | 269 | ||
270 | pwm@02080000 { /* PWM1 */ | 270 | pwm@02080000 { /* PWM1 */ |
271 | #pwm-cells = <2>; | ||
272 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
271 | reg = <0x02080000 0x4000>; | 273 | reg = <0x02080000 0x4000>; |
272 | interrupts = <0 83 0x04>; | 274 | interrupts = <0 83 0x04>; |
275 | clocks = <&clks 62>, <&clks 145>; | ||
276 | clock-names = "ipg", "per"; | ||
273 | }; | 277 | }; |
274 | 278 | ||
275 | pwm@02084000 { /* PWM2 */ | 279 | pwm@02084000 { /* PWM2 */ |
280 | #pwm-cells = <2>; | ||
281 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
276 | reg = <0x02084000 0x4000>; | 282 | reg = <0x02084000 0x4000>; |
277 | interrupts = <0 84 0x04>; | 283 | interrupts = <0 84 0x04>; |
284 | clocks = <&clks 62>, <&clks 146>; | ||
285 | clock-names = "ipg", "per"; | ||
278 | }; | 286 | }; |
279 | 287 | ||
280 | pwm@02088000 { /* PWM3 */ | 288 | pwm@02088000 { /* PWM3 */ |
289 | #pwm-cells = <2>; | ||
290 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
281 | reg = <0x02088000 0x4000>; | 291 | reg = <0x02088000 0x4000>; |
282 | interrupts = <0 85 0x04>; | 292 | interrupts = <0 85 0x04>; |
293 | clocks = <&clks 62>, <&clks 147>; | ||
294 | clock-names = "ipg", "per"; | ||
283 | }; | 295 | }; |
284 | 296 | ||
285 | pwm@0208c000 { /* PWM4 */ | 297 | pwm@0208c000 { /* PWM4 */ |
298 | #pwm-cells = <2>; | ||
299 | compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm"; | ||
286 | reg = <0x0208c000 0x4000>; | 300 | reg = <0x0208c000 0x4000>; |
287 | interrupts = <0 86 0x04>; | 301 | interrupts = <0 86 0x04>; |
302 | clocks = <&clks 62>, <&clks 148>; | ||
303 | clock-names = "ipg", "per"; | ||
288 | }; | 304 | }; |
289 | 305 | ||
290 | flexcan@02090000 { /* CAN1 */ | 306 | flexcan@02090000 { /* CAN1 */ |
@@ -1001,5 +1017,23 @@ | |||
1001 | status = "disabled"; | 1017 | status = "disabled"; |
1002 | }; | 1018 | }; |
1003 | }; | 1019 | }; |
1020 | |||
1021 | ipu1: ipu@02400000 { | ||
1022 | #crtc-cells = <1>; | ||
1023 | compatible = "fsl,imx6q-ipu"; | ||
1024 | reg = <0x02400000 0x400000>; | ||
1025 | interrupts = <0 6 0x4 0 5 0x4>; | ||
1026 | clocks = <&clks 130>, <&clks 131>, <&clks 132>; | ||
1027 | clock-names = "bus", "di0", "di1"; | ||
1028 | }; | ||
1029 | |||
1030 | ipu2: ipu@02800000 { | ||
1031 | #crtc-cells = <1>; | ||
1032 | compatible = "fsl,imx6q-ipu"; | ||
1033 | reg = <0x02800000 0x400000>; | ||
1034 | interrupts = <0 8 0x4 0 7 0x4>; | ||
1035 | clocks = <&clks 133>, <&clks 134>, <&clks 137>; | ||
1036 | clock-names = "bus", "di0", "di1"; | ||
1037 | }; | ||
1004 | }; | 1038 | }; |
1005 | }; | 1039 | }; |
diff --git a/arch/arm/boot/dts/sh7377.dtsi b/arch/arm/boot/dts/sh7377.dtsi deleted file mode 100644 index 767ee0796daa..000000000000 --- a/arch/arm/boot/dts/sh7377.dtsi +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the sh7377 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | /include/ "skeleton.dtsi" | ||
12 | |||
13 | / { | ||
14 | compatible = "renesas,sh7377"; | ||
15 | |||
16 | cpus { | ||
17 | cpu@0 { | ||
18 | compatible = "arm,cortex-a8"; | ||
19 | }; | ||
20 | }; | ||
21 | }; | ||
diff --git a/arch/arm/boot/dts/sun4i-cubieboard.dts b/arch/arm/boot/dts/sun4i-cubieboard.dts new file mode 100644 index 000000000000..f4ca126ad994 --- /dev/null +++ b/arch/arm/boot/dts/sun4i-cubieboard.dts | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Stefan Roese | ||
3 | * Stefan Roese <sr@denx.de> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | /dts-v1/; | ||
14 | /include/ "sun4i.dtsi" | ||
15 | |||
16 | / { | ||
17 | model = "Cubietech Cubieboard"; | ||
18 | compatible = "cubietech,cubieboard", "allwinner,sun4i"; | ||
19 | |||
20 | aliases { | ||
21 | serial0 = &uart0; | ||
22 | serial1 = &uart1; | ||
23 | }; | ||
24 | |||
25 | chosen { | ||
26 | bootargs = "earlyprintk console=ttyS0,115200"; | ||
27 | }; | ||
28 | |||
29 | soc { | ||
30 | uart0: uart@01c28000 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | |||
34 | uart1: uart@01c28400 { | ||
35 | status = "okay"; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
diff --git a/arch/arm/boot/dts/sun4i.dtsi b/arch/arm/boot/dts/sun4i.dtsi new file mode 100644 index 000000000000..e61fdd47bd01 --- /dev/null +++ b/arch/arm/boot/dts/sun4i.dtsi | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Stefan Roese | ||
3 | * Stefan Roese <sr@denx.de> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | /include/ "sunxi.dtsi" | ||
14 | |||
15 | / { | ||
16 | memory { | ||
17 | reg = <0x40000000 0x80000000>; | ||
18 | }; | ||
19 | }; | ||
diff --git a/arch/arm/boot/dts/sun5i-olinuxino.dts b/arch/arm/boot/dts/sun5i-olinuxino.dts new file mode 100644 index 000000000000..d6ff889a5d87 --- /dev/null +++ b/arch/arm/boot/dts/sun5i-olinuxino.dts | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /dts-v1/; | ||
15 | /include/ "sun5i.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "Olimex A13-Olinuxino"; | ||
19 | compatible = "olimex,a13-olinuxino", "allwinner,sun5i"; | ||
20 | |||
21 | chosen { | ||
22 | bootargs = "earlyprintk console=ttyS0,115200"; | ||
23 | }; | ||
24 | |||
25 | soc { | ||
26 | uart1: uart@01c28400 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | }; | ||
30 | }; | ||
diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi new file mode 100644 index 000000000000..59a2d265a98e --- /dev/null +++ b/arch/arm/boot/dts/sun5i.dtsi | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "sunxi.dtsi" | ||
15 | |||
16 | / { | ||
17 | memory { | ||
18 | reg = <0x40000000 0x20000000>; | ||
19 | }; | ||
20 | }; | ||
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi new file mode 100644 index 000000000000..8bbc2bfef221 --- /dev/null +++ b/arch/arm/boot/dts/sunxi.dtsi | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /include/ "skeleton.dtsi" | ||
15 | |||
16 | / { | ||
17 | interrupt-parent = <&intc>; | ||
18 | |||
19 | cpus { | ||
20 | cpu@0 { | ||
21 | compatible = "arm,cortex-a8"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | clocks { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | osc: oscillator { | ||
30 | #clock-cells = <0>; | ||
31 | compatible = "fixed-clock"; | ||
32 | clock-frequency = <24000000>; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | soc { | ||
37 | compatible = "simple-bus"; | ||
38 | #address-cells = <1>; | ||
39 | #size-cells = <1>; | ||
40 | reg = <0x01c20000 0x300000>; | ||
41 | ranges; | ||
42 | |||
43 | timer@01c20c00 { | ||
44 | compatible = "allwinner,sunxi-timer"; | ||
45 | reg = <0x01c20c00 0x90>; | ||
46 | interrupts = <22>; | ||
47 | clocks = <&osc>; | ||
48 | }; | ||
49 | |||
50 | wdt: watchdog@01c20c90 { | ||
51 | compatible = "allwinner,sunxi-wdt"; | ||
52 | reg = <0x01c20c90 0x10>; | ||
53 | }; | ||
54 | |||
55 | intc: interrupt-controller@01c20400 { | ||
56 | compatible = "allwinner,sunxi-ic"; | ||
57 | reg = <0x01c20400 0x400>; | ||
58 | interrupt-controller; | ||
59 | #interrupt-cells = <1>; | ||
60 | }; | ||
61 | |||
62 | uart0: uart@01c28000 { | ||
63 | compatible = "ns8250"; | ||
64 | reg = <0x01c28000 0x400>; | ||
65 | interrupts = <1>; | ||
66 | reg-shift = <2>; | ||
67 | clock-frequency = <24000000>; | ||
68 | status = "disabled"; | ||
69 | }; | ||
70 | |||
71 | uart1: uart@01c28400 { | ||
72 | compatible = "ns8250"; | ||
73 | reg = <0x01c28400 0x400>; | ||
74 | interrupts = <2>; | ||
75 | reg-shift = <2>; | ||
76 | clock-frequency = <24000000>; | ||
77 | status = "disabled"; | ||
78 | }; | ||
79 | }; | ||
80 | }; | ||
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index f3a09d0d45bc..f40cfbaa7c7e 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
@@ -4,6 +4,15 @@ | |||
4 | compatible = "nvidia,tegra20"; | 4 | compatible = "nvidia,tegra20"; |
5 | interrupt-parent = <&intc>; | 5 | interrupt-parent = <&intc>; |
6 | 6 | ||
7 | cache-controller@50043000 { | ||
8 | compatible = "arm,pl310-cache"; | ||
9 | reg = <0x50043000 0x1000>; | ||
10 | arm,data-latency = <5 5 2>; | ||
11 | arm,tag-latency = <4 4 2>; | ||
12 | cache-unified; | ||
13 | cache-level = <2>; | ||
14 | }; | ||
15 | |||
7 | intc: interrupt-controller { | 16 | intc: interrupt-controller { |
8 | compatible = "arm,cortex-a9-gic"; | 17 | compatible = "arm,cortex-a9-gic"; |
9 | reg = <0x50041000 0x1000 | 18 | reg = <0x50041000 0x1000 |
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index df7f2270fc91..fed8dca1692d 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -4,6 +4,15 @@ | |||
4 | compatible = "nvidia,tegra30"; | 4 | compatible = "nvidia,tegra30"; |
5 | interrupt-parent = <&intc>; | 5 | interrupt-parent = <&intc>; |
6 | 6 | ||
7 | cache-controller@50043000 { | ||
8 | compatible = "arm,pl310-cache"; | ||
9 | reg = <0x50043000 0x1000>; | ||
10 | arm,data-latency = <6 6 2>; | ||
11 | arm,tag-latency = <5 5 2>; | ||
12 | cache-unified; | ||
13 | cache-level = <2>; | ||
14 | }; | ||
15 | |||
7 | intc: interrupt-controller { | 16 | intc: interrupt-controller { |
8 | compatible = "arm,cortex-a9-gic"; | 17 | compatible = "arm,cortex-a9-gic"; |
9 | reg = <0x50041000 0x1000 | 18 | reg = <0x50041000 0x1000 |
diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi index d8a827bd2bf3..ac870fb3fa0d 100644 --- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | |||
@@ -17,17 +17,16 @@ | |||
17 | * CHANGES TO vexpress-v2m.dtsi! | 17 | * CHANGES TO vexpress-v2m.dtsi! |
18 | */ | 18 | */ |
19 | 19 | ||
20 | / { | ||
21 | aliases { | ||
22 | arm,v2m_timer = &v2m_timer01; | ||
23 | }; | ||
24 | |||
25 | motherboard { | 20 | motherboard { |
26 | compatible = "simple-bus"; | 21 | model = "V2M-P1"; |
22 | arm,hbi = <0x190>; | ||
23 | arm,vexpress,site = <0>; | ||
27 | arm,v2m-memory-map = "rs1"; | 24 | arm,v2m-memory-map = "rs1"; |
25 | compatible = "arm,vexpress,v2m-p1", "simple-bus"; | ||
28 | #address-cells = <2>; /* SMB chipselect number and offset */ | 26 | #address-cells = <2>; /* SMB chipselect number and offset */ |
29 | #size-cells = <1>; | 27 | #size-cells = <1>; |
30 | #interrupt-cells = <1>; | 28 | #interrupt-cells = <1>; |
29 | ranges; | ||
31 | 30 | ||
32 | flash@0,00000000 { | 31 | flash@0,00000000 { |
33 | compatible = "arm,vexpress-flash", "cfi-flash"; | 32 | compatible = "arm,vexpress-flash", "cfi-flash"; |
@@ -72,14 +71,20 @@ | |||
72 | #size-cells = <1>; | 71 | #size-cells = <1>; |
73 | ranges = <0 3 0 0x200000>; | 72 | ranges = <0 3 0 0x200000>; |
74 | 73 | ||
75 | sysreg@010000 { | 74 | v2m_sysreg: sysreg@010000 { |
76 | compatible = "arm,vexpress-sysreg"; | 75 | compatible = "arm,vexpress-sysreg"; |
77 | reg = <0x010000 0x1000>; | 76 | reg = <0x010000 0x1000>; |
77 | gpio-controller; | ||
78 | #gpio-cells = <2>; | ||
78 | }; | 79 | }; |
79 | 80 | ||
80 | sysctl@020000 { | 81 | v2m_sysctl: sysctl@020000 { |
81 | compatible = "arm,sp810", "arm,primecell"; | 82 | compatible = "arm,sp810", "arm,primecell"; |
82 | reg = <0x020000 0x1000>; | 83 | reg = <0x020000 0x1000>; |
84 | clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&smbclk>; | ||
85 | clock-names = "refclk", "timclk", "apb_pclk"; | ||
86 | #clock-cells = <1>; | ||
87 | clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; | ||
83 | }; | 88 | }; |
84 | 89 | ||
85 | /* PCI-E I2C bus */ | 90 | /* PCI-E I2C bus */ |
@@ -100,66 +105,92 @@ | |||
100 | compatible = "arm,pl041", "arm,primecell"; | 105 | compatible = "arm,pl041", "arm,primecell"; |
101 | reg = <0x040000 0x1000>; | 106 | reg = <0x040000 0x1000>; |
102 | interrupts = <11>; | 107 | interrupts = <11>; |
108 | clocks = <&smbclk>; | ||
109 | clock-names = "apb_pclk"; | ||
103 | }; | 110 | }; |
104 | 111 | ||
105 | mmci@050000 { | 112 | mmci@050000 { |
106 | compatible = "arm,pl180", "arm,primecell"; | 113 | compatible = "arm,pl180", "arm,primecell"; |
107 | reg = <0x050000 0x1000>; | 114 | reg = <0x050000 0x1000>; |
108 | interrupts = <9 10>; | 115 | interrupts = <9 10>; |
116 | cd-gpios = <&v2m_sysreg 0 0>; | ||
117 | wp-gpios = <&v2m_sysreg 1 0>; | ||
118 | max-frequency = <12000000>; | ||
119 | vmmc-supply = <&v2m_fixed_3v3>; | ||
120 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
121 | clock-names = "mclk", "apb_pclk"; | ||
109 | }; | 122 | }; |
110 | 123 | ||
111 | kmi@060000 { | 124 | kmi@060000 { |
112 | compatible = "arm,pl050", "arm,primecell"; | 125 | compatible = "arm,pl050", "arm,primecell"; |
113 | reg = <0x060000 0x1000>; | 126 | reg = <0x060000 0x1000>; |
114 | interrupts = <12>; | 127 | interrupts = <12>; |
128 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
129 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
115 | }; | 130 | }; |
116 | 131 | ||
117 | kmi@070000 { | 132 | kmi@070000 { |
118 | compatible = "arm,pl050", "arm,primecell"; | 133 | compatible = "arm,pl050", "arm,primecell"; |
119 | reg = <0x070000 0x1000>; | 134 | reg = <0x070000 0x1000>; |
120 | interrupts = <13>; | 135 | interrupts = <13>; |
136 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
137 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
121 | }; | 138 | }; |
122 | 139 | ||
123 | v2m_serial0: uart@090000 { | 140 | v2m_serial0: uart@090000 { |
124 | compatible = "arm,pl011", "arm,primecell"; | 141 | compatible = "arm,pl011", "arm,primecell"; |
125 | reg = <0x090000 0x1000>; | 142 | reg = <0x090000 0x1000>; |
126 | interrupts = <5>; | 143 | interrupts = <5>; |
144 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
145 | clock-names = "uartclk", "apb_pclk"; | ||
127 | }; | 146 | }; |
128 | 147 | ||
129 | v2m_serial1: uart@0a0000 { | 148 | v2m_serial1: uart@0a0000 { |
130 | compatible = "arm,pl011", "arm,primecell"; | 149 | compatible = "arm,pl011", "arm,primecell"; |
131 | reg = <0x0a0000 0x1000>; | 150 | reg = <0x0a0000 0x1000>; |
132 | interrupts = <6>; | 151 | interrupts = <6>; |
152 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
153 | clock-names = "uartclk", "apb_pclk"; | ||
133 | }; | 154 | }; |
134 | 155 | ||
135 | v2m_serial2: uart@0b0000 { | 156 | v2m_serial2: uart@0b0000 { |
136 | compatible = "arm,pl011", "arm,primecell"; | 157 | compatible = "arm,pl011", "arm,primecell"; |
137 | reg = <0x0b0000 0x1000>; | 158 | reg = <0x0b0000 0x1000>; |
138 | interrupts = <7>; | 159 | interrupts = <7>; |
160 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
161 | clock-names = "uartclk", "apb_pclk"; | ||
139 | }; | 162 | }; |
140 | 163 | ||
141 | v2m_serial3: uart@0c0000 { | 164 | v2m_serial3: uart@0c0000 { |
142 | compatible = "arm,pl011", "arm,primecell"; | 165 | compatible = "arm,pl011", "arm,primecell"; |
143 | reg = <0x0c0000 0x1000>; | 166 | reg = <0x0c0000 0x1000>; |
144 | interrupts = <8>; | 167 | interrupts = <8>; |
168 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
169 | clock-names = "uartclk", "apb_pclk"; | ||
145 | }; | 170 | }; |
146 | 171 | ||
147 | wdt@0f0000 { | 172 | wdt@0f0000 { |
148 | compatible = "arm,sp805", "arm,primecell"; | 173 | compatible = "arm,sp805", "arm,primecell"; |
149 | reg = <0x0f0000 0x1000>; | 174 | reg = <0x0f0000 0x1000>; |
150 | interrupts = <0>; | 175 | interrupts = <0>; |
176 | clocks = <&v2m_refclk32khz>, <&smbclk>; | ||
177 | clock-names = "wdogclk", "apb_pclk"; | ||
151 | }; | 178 | }; |
152 | 179 | ||
153 | v2m_timer01: timer@110000 { | 180 | v2m_timer01: timer@110000 { |
154 | compatible = "arm,sp804", "arm,primecell"; | 181 | compatible = "arm,sp804", "arm,primecell"; |
155 | reg = <0x110000 0x1000>; | 182 | reg = <0x110000 0x1000>; |
156 | interrupts = <2>; | 183 | interrupts = <2>; |
184 | clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>; | ||
185 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
157 | }; | 186 | }; |
158 | 187 | ||
159 | v2m_timer23: timer@120000 { | 188 | v2m_timer23: timer@120000 { |
160 | compatible = "arm,sp804", "arm,primecell"; | 189 | compatible = "arm,sp804", "arm,primecell"; |
161 | reg = <0x120000 0x1000>; | 190 | reg = <0x120000 0x1000>; |
162 | interrupts = <3>; | 191 | interrupts = <3>; |
192 | clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&smbclk>; | ||
193 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
163 | }; | 194 | }; |
164 | 195 | ||
165 | /* DVI I2C bus */ | 196 | /* DVI I2C bus */ |
@@ -185,6 +216,8 @@ | |||
185 | compatible = "arm,pl031", "arm,primecell"; | 216 | compatible = "arm,pl031", "arm,primecell"; |
186 | reg = <0x170000 0x1000>; | 217 | reg = <0x170000 0x1000>; |
187 | interrupts = <4>; | 218 | interrupts = <4>; |
219 | clocks = <&smbclk>; | ||
220 | clock-names = "apb_pclk"; | ||
188 | }; | 221 | }; |
189 | 222 | ||
190 | compact-flash@1a0000 { | 223 | compact-flash@1a0000 { |
@@ -198,6 +231,8 @@ | |||
198 | compatible = "arm,pl111", "arm,primecell"; | 231 | compatible = "arm,pl111", "arm,primecell"; |
199 | reg = <0x1f0000 0x1000>; | 232 | reg = <0x1f0000 0x1000>; |
200 | interrupts = <14>; | 233 | interrupts = <14>; |
234 | clocks = <&v2m_oscclk1>, <&smbclk>; | ||
235 | clock-names = "clcdclk", "apb_pclk"; | ||
201 | }; | 236 | }; |
202 | }; | 237 | }; |
203 | 238 | ||
@@ -208,5 +243,98 @@ | |||
208 | regulator-max-microvolt = <3300000>; | 243 | regulator-max-microvolt = <3300000>; |
209 | regulator-always-on; | 244 | regulator-always-on; |
210 | }; | 245 | }; |
246 | |||
247 | v2m_clk24mhz: clk24mhz { | ||
248 | compatible = "fixed-clock"; | ||
249 | #clock-cells = <0>; | ||
250 | clock-frequency = <24000000>; | ||
251 | clock-output-names = "v2m:clk24mhz"; | ||
252 | }; | ||
253 | |||
254 | v2m_refclk1mhz: refclk1mhz { | ||
255 | compatible = "fixed-clock"; | ||
256 | #clock-cells = <0>; | ||
257 | clock-frequency = <1000000>; | ||
258 | clock-output-names = "v2m:refclk1mhz"; | ||
259 | }; | ||
260 | |||
261 | v2m_refclk32khz: refclk32khz { | ||
262 | compatible = "fixed-clock"; | ||
263 | #clock-cells = <0>; | ||
264 | clock-frequency = <32768>; | ||
265 | clock-output-names = "v2m:refclk32khz"; | ||
266 | }; | ||
267 | |||
268 | mcc { | ||
269 | compatible = "arm,vexpress,config-bus"; | ||
270 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
271 | |||
272 | osc@0 { | ||
273 | /* MCC static memory clock */ | ||
274 | compatible = "arm,vexpress-osc"; | ||
275 | arm,vexpress-sysreg,func = <1 0>; | ||
276 | freq-range = <25000000 60000000>; | ||
277 | #clock-cells = <0>; | ||
278 | clock-output-names = "v2m:oscclk0"; | ||
279 | }; | ||
280 | |||
281 | v2m_oscclk1: osc@1 { | ||
282 | /* CLCD clock */ | ||
283 | compatible = "arm,vexpress-osc"; | ||
284 | arm,vexpress-sysreg,func = <1 1>; | ||
285 | freq-range = <23750000 63500000>; | ||
286 | #clock-cells = <0>; | ||
287 | clock-output-names = "v2m:oscclk1"; | ||
288 | }; | ||
289 | |||
290 | v2m_oscclk2: osc@2 { | ||
291 | /* IO FPGA peripheral clock */ | ||
292 | compatible = "arm,vexpress-osc"; | ||
293 | arm,vexpress-sysreg,func = <1 2>; | ||
294 | freq-range = <24000000 24000000>; | ||
295 | #clock-cells = <0>; | ||
296 | clock-output-names = "v2m:oscclk2"; | ||
297 | }; | ||
298 | |||
299 | volt@0 { | ||
300 | /* Logic level voltage */ | ||
301 | compatible = "arm,vexpress-volt"; | ||
302 | arm,vexpress-sysreg,func = <2 0>; | ||
303 | regulator-name = "VIO"; | ||
304 | regulator-always-on; | ||
305 | label = "VIO"; | ||
306 | }; | ||
307 | |||
308 | temp@0 { | ||
309 | /* MCC internal operating temperature */ | ||
310 | compatible = "arm,vexpress-temp"; | ||
311 | arm,vexpress-sysreg,func = <4 0>; | ||
312 | label = "MCC"; | ||
313 | }; | ||
314 | |||
315 | reset@0 { | ||
316 | compatible = "arm,vexpress-reset"; | ||
317 | arm,vexpress-sysreg,func = <5 0>; | ||
318 | }; | ||
319 | |||
320 | muxfpga@0 { | ||
321 | compatible = "arm,vexpress-muxfpga"; | ||
322 | arm,vexpress-sysreg,func = <7 0>; | ||
323 | }; | ||
324 | |||
325 | shutdown@0 { | ||
326 | compatible = "arm,vexpress-shutdown"; | ||
327 | arm,vexpress-sysreg,func = <8 0>; | ||
328 | }; | ||
329 | |||
330 | reboot@0 { | ||
331 | compatible = "arm,vexpress-reboot"; | ||
332 | arm,vexpress-sysreg,func = <9 0>; | ||
333 | }; | ||
334 | |||
335 | dvimode@0 { | ||
336 | compatible = "arm,vexpress-dvimode"; | ||
337 | arm,vexpress-sysreg,func = <11 0>; | ||
338 | }; | ||
339 | }; | ||
211 | }; | 340 | }; |
212 | }; | ||
diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi index dba53fd026bb..f1420368355b 100644 --- a/arch/arm/boot/dts/vexpress-v2m.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m.dtsi | |||
@@ -17,16 +17,15 @@ | |||
17 | * CHANGES TO vexpress-v2m-rs1.dtsi! | 17 | * CHANGES TO vexpress-v2m-rs1.dtsi! |
18 | */ | 18 | */ |
19 | 19 | ||
20 | / { | ||
21 | aliases { | ||
22 | arm,v2m_timer = &v2m_timer01; | ||
23 | }; | ||
24 | |||
25 | motherboard { | 20 | motherboard { |
26 | compatible = "simple-bus"; | 21 | model = "V2M-P1"; |
22 | arm,hbi = <0x190>; | ||
23 | arm,vexpress,site = <0>; | ||
24 | compatible = "arm,vexpress,v2m-p1", "simple-bus"; | ||
27 | #address-cells = <2>; /* SMB chipselect number and offset */ | 25 | #address-cells = <2>; /* SMB chipselect number and offset */ |
28 | #size-cells = <1>; | 26 | #size-cells = <1>; |
29 | #interrupt-cells = <1>; | 27 | #interrupt-cells = <1>; |
28 | ranges; | ||
30 | 29 | ||
31 | flash@0,00000000 { | 30 | flash@0,00000000 { |
32 | compatible = "arm,vexpress-flash", "cfi-flash"; | 31 | compatible = "arm,vexpress-flash", "cfi-flash"; |
@@ -71,14 +70,20 @@ | |||
71 | #size-cells = <1>; | 70 | #size-cells = <1>; |
72 | ranges = <0 7 0 0x20000>; | 71 | ranges = <0 7 0 0x20000>; |
73 | 72 | ||
74 | sysreg@00000 { | 73 | v2m_sysreg: sysreg@00000 { |
75 | compatible = "arm,vexpress-sysreg"; | 74 | compatible = "arm,vexpress-sysreg"; |
76 | reg = <0x00000 0x1000>; | 75 | reg = <0x00000 0x1000>; |
76 | gpio-controller; | ||
77 | #gpio-cells = <2>; | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | sysctl@01000 { | 80 | v2m_sysctl: sysctl@01000 { |
80 | compatible = "arm,sp810", "arm,primecell"; | 81 | compatible = "arm,sp810", "arm,primecell"; |
81 | reg = <0x01000 0x1000>; | 82 | reg = <0x01000 0x1000>; |
83 | clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&smbclk>; | ||
84 | clock-names = "refclk", "timclk", "apb_pclk"; | ||
85 | #clock-cells = <1>; | ||
86 | clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; | ||
82 | }; | 87 | }; |
83 | 88 | ||
84 | /* PCI-E I2C bus */ | 89 | /* PCI-E I2C bus */ |
@@ -99,66 +104,92 @@ | |||
99 | compatible = "arm,pl041", "arm,primecell"; | 104 | compatible = "arm,pl041", "arm,primecell"; |
100 | reg = <0x04000 0x1000>; | 105 | reg = <0x04000 0x1000>; |
101 | interrupts = <11>; | 106 | interrupts = <11>; |
107 | clocks = <&smbclk>; | ||
108 | clock-names = "apb_pclk"; | ||
102 | }; | 109 | }; |
103 | 110 | ||
104 | mmci@05000 { | 111 | mmci@05000 { |
105 | compatible = "arm,pl180", "arm,primecell"; | 112 | compatible = "arm,pl180", "arm,primecell"; |
106 | reg = <0x05000 0x1000>; | 113 | reg = <0x05000 0x1000>; |
107 | interrupts = <9 10>; | 114 | interrupts = <9 10>; |
115 | cd-gpios = <&v2m_sysreg 0 0>; | ||
116 | wp-gpios = <&v2m_sysreg 1 0>; | ||
117 | max-frequency = <12000000>; | ||
118 | vmmc-supply = <&v2m_fixed_3v3>; | ||
119 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
120 | clock-names = "mclk", "apb_pclk"; | ||
108 | }; | 121 | }; |
109 | 122 | ||
110 | kmi@06000 { | 123 | kmi@06000 { |
111 | compatible = "arm,pl050", "arm,primecell"; | 124 | compatible = "arm,pl050", "arm,primecell"; |
112 | reg = <0x06000 0x1000>; | 125 | reg = <0x06000 0x1000>; |
113 | interrupts = <12>; | 126 | interrupts = <12>; |
127 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
128 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
114 | }; | 129 | }; |
115 | 130 | ||
116 | kmi@07000 { | 131 | kmi@07000 { |
117 | compatible = "arm,pl050", "arm,primecell"; | 132 | compatible = "arm,pl050", "arm,primecell"; |
118 | reg = <0x07000 0x1000>; | 133 | reg = <0x07000 0x1000>; |
119 | interrupts = <13>; | 134 | interrupts = <13>; |
135 | clocks = <&v2m_clk24mhz>, <&smbclk>; | ||
136 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
120 | }; | 137 | }; |
121 | 138 | ||
122 | v2m_serial0: uart@09000 { | 139 | v2m_serial0: uart@09000 { |
123 | compatible = "arm,pl011", "arm,primecell"; | 140 | compatible = "arm,pl011", "arm,primecell"; |
124 | reg = <0x09000 0x1000>; | 141 | reg = <0x09000 0x1000>; |
125 | interrupts = <5>; | 142 | interrupts = <5>; |
143 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
144 | clock-names = "uartclk", "apb_pclk"; | ||
126 | }; | 145 | }; |
127 | 146 | ||
128 | v2m_serial1: uart@0a000 { | 147 | v2m_serial1: uart@0a000 { |
129 | compatible = "arm,pl011", "arm,primecell"; | 148 | compatible = "arm,pl011", "arm,primecell"; |
130 | reg = <0x0a000 0x1000>; | 149 | reg = <0x0a000 0x1000>; |
131 | interrupts = <6>; | 150 | interrupts = <6>; |
151 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
152 | clock-names = "uartclk", "apb_pclk"; | ||
132 | }; | 153 | }; |
133 | 154 | ||
134 | v2m_serial2: uart@0b000 { | 155 | v2m_serial2: uart@0b000 { |
135 | compatible = "arm,pl011", "arm,primecell"; | 156 | compatible = "arm,pl011", "arm,primecell"; |
136 | reg = <0x0b000 0x1000>; | 157 | reg = <0x0b000 0x1000>; |
137 | interrupts = <7>; | 158 | interrupts = <7>; |
159 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
160 | clock-names = "uartclk", "apb_pclk"; | ||
138 | }; | 161 | }; |
139 | 162 | ||
140 | v2m_serial3: uart@0c000 { | 163 | v2m_serial3: uart@0c000 { |
141 | compatible = "arm,pl011", "arm,primecell"; | 164 | compatible = "arm,pl011", "arm,primecell"; |
142 | reg = <0x0c000 0x1000>; | 165 | reg = <0x0c000 0x1000>; |
143 | interrupts = <8>; | 166 | interrupts = <8>; |
167 | clocks = <&v2m_oscclk2>, <&smbclk>; | ||
168 | clock-names = "uartclk", "apb_pclk"; | ||
144 | }; | 169 | }; |
145 | 170 | ||
146 | wdt@0f000 { | 171 | wdt@0f000 { |
147 | compatible = "arm,sp805", "arm,primecell"; | 172 | compatible = "arm,sp805", "arm,primecell"; |
148 | reg = <0x0f000 0x1000>; | 173 | reg = <0x0f000 0x1000>; |
149 | interrupts = <0>; | 174 | interrupts = <0>; |
175 | clocks = <&v2m_refclk32khz>, <&smbclk>; | ||
176 | clock-names = "wdogclk", "apb_pclk"; | ||
150 | }; | 177 | }; |
151 | 178 | ||
152 | v2m_timer01: timer@11000 { | 179 | v2m_timer01: timer@11000 { |
153 | compatible = "arm,sp804", "arm,primecell"; | 180 | compatible = "arm,sp804", "arm,primecell"; |
154 | reg = <0x11000 0x1000>; | 181 | reg = <0x11000 0x1000>; |
155 | interrupts = <2>; | 182 | interrupts = <2>; |
183 | clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>; | ||
184 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
156 | }; | 185 | }; |
157 | 186 | ||
158 | v2m_timer23: timer@12000 { | 187 | v2m_timer23: timer@12000 { |
159 | compatible = "arm,sp804", "arm,primecell"; | 188 | compatible = "arm,sp804", "arm,primecell"; |
160 | reg = <0x12000 0x1000>; | 189 | reg = <0x12000 0x1000>; |
161 | interrupts = <3>; | 190 | interrupts = <3>; |
191 | clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&smbclk>; | ||
192 | clock-names = "timclken1", "timclken2", "apb_pclk"; | ||
162 | }; | 193 | }; |
163 | 194 | ||
164 | /* DVI I2C bus */ | 195 | /* DVI I2C bus */ |
@@ -184,6 +215,8 @@ | |||
184 | compatible = "arm,pl031", "arm,primecell"; | 215 | compatible = "arm,pl031", "arm,primecell"; |
185 | reg = <0x17000 0x1000>; | 216 | reg = <0x17000 0x1000>; |
186 | interrupts = <4>; | 217 | interrupts = <4>; |
218 | clocks = <&smbclk>; | ||
219 | clock-names = "apb_pclk"; | ||
187 | }; | 220 | }; |
188 | 221 | ||
189 | compact-flash@1a000 { | 222 | compact-flash@1a000 { |
@@ -197,6 +230,8 @@ | |||
197 | compatible = "arm,pl111", "arm,primecell"; | 230 | compatible = "arm,pl111", "arm,primecell"; |
198 | reg = <0x1f000 0x1000>; | 231 | reg = <0x1f000 0x1000>; |
199 | interrupts = <14>; | 232 | interrupts = <14>; |
233 | clocks = <&v2m_oscclk1>, <&smbclk>; | ||
234 | clock-names = "clcdclk", "apb_pclk"; | ||
200 | }; | 235 | }; |
201 | }; | 236 | }; |
202 | 237 | ||
@@ -207,5 +242,98 @@ | |||
207 | regulator-max-microvolt = <3300000>; | 242 | regulator-max-microvolt = <3300000>; |
208 | regulator-always-on; | 243 | regulator-always-on; |
209 | }; | 244 | }; |
245 | |||
246 | v2m_clk24mhz: clk24mhz { | ||
247 | compatible = "fixed-clock"; | ||
248 | #clock-cells = <0>; | ||
249 | clock-frequency = <24000000>; | ||
250 | clock-output-names = "v2m:clk24mhz"; | ||
251 | }; | ||
252 | |||
253 | v2m_refclk1mhz: refclk1mhz { | ||
254 | compatible = "fixed-clock"; | ||
255 | #clock-cells = <0>; | ||
256 | clock-frequency = <1000000>; | ||
257 | clock-output-names = "v2m:refclk1mhz"; | ||
258 | }; | ||
259 | |||
260 | v2m_refclk32khz: refclk32khz { | ||
261 | compatible = "fixed-clock"; | ||
262 | #clock-cells = <0>; | ||
263 | clock-frequency = <32768>; | ||
264 | clock-output-names = "v2m:refclk32khz"; | ||
265 | }; | ||
266 | |||
267 | mcc { | ||
268 | compatible = "arm,vexpress,config-bus"; | ||
269 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
270 | |||
271 | osc@0 { | ||
272 | /* MCC static memory clock */ | ||
273 | compatible = "arm,vexpress-osc"; | ||
274 | arm,vexpress-sysreg,func = <1 0>; | ||
275 | freq-range = <25000000 60000000>; | ||
276 | #clock-cells = <0>; | ||
277 | clock-output-names = "v2m:oscclk0"; | ||
278 | }; | ||
279 | |||
280 | v2m_oscclk1: osc@1 { | ||
281 | /* CLCD clock */ | ||
282 | compatible = "arm,vexpress-osc"; | ||
283 | arm,vexpress-sysreg,func = <1 1>; | ||
284 | freq-range = <23750000 63500000>; | ||
285 | #clock-cells = <0>; | ||
286 | clock-output-names = "v2m:oscclk1"; | ||
287 | }; | ||
288 | |||
289 | v2m_oscclk2: osc@2 { | ||
290 | /* IO FPGA peripheral clock */ | ||
291 | compatible = "arm,vexpress-osc"; | ||
292 | arm,vexpress-sysreg,func = <1 2>; | ||
293 | freq-range = <24000000 24000000>; | ||
294 | #clock-cells = <0>; | ||
295 | clock-output-names = "v2m:oscclk2"; | ||
296 | }; | ||
297 | |||
298 | volt@0 { | ||
299 | /* Logic level voltage */ | ||
300 | compatible = "arm,vexpress-volt"; | ||
301 | arm,vexpress-sysreg,func = <2 0>; | ||
302 | regulator-name = "VIO"; | ||
303 | regulator-always-on; | ||
304 | label = "VIO"; | ||
305 | }; | ||
306 | |||
307 | temp@0 { | ||
308 | /* MCC internal operating temperature */ | ||
309 | compatible = "arm,vexpress-temp"; | ||
310 | arm,vexpress-sysreg,func = <4 0>; | ||
311 | label = "MCC"; | ||
312 | }; | ||
313 | |||
314 | reset@0 { | ||
315 | compatible = "arm,vexpress-reset"; | ||
316 | arm,vexpress-sysreg,func = <5 0>; | ||
317 | }; | ||
318 | |||
319 | muxfpga@0 { | ||
320 | compatible = "arm,vexpress-muxfpga"; | ||
321 | arm,vexpress-sysreg,func = <7 0>; | ||
322 | }; | ||
323 | |||
324 | shutdown@0 { | ||
325 | compatible = "arm,vexpress-shutdown"; | ||
326 | arm,vexpress-sysreg,func = <8 0>; | ||
327 | }; | ||
328 | |||
329 | reboot@0 { | ||
330 | compatible = "arm,vexpress-reboot"; | ||
331 | arm,vexpress-sysreg,func = <9 0>; | ||
332 | }; | ||
333 | |||
334 | dvimode@0 { | ||
335 | compatible = "arm,vexpress-dvimode"; | ||
336 | arm,vexpress-sysreg,func = <11 0>; | ||
337 | }; | ||
338 | }; | ||
210 | }; | 339 | }; |
211 | }; | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts b/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts index d12b34ca0568..a3d37ec2655d 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA15"; | 13 | model = "V2P-CA15"; |
14 | arm,hbi = <0x237>; | 14 | arm,hbi = <0x237>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca15,tc1", "arm,vexpress,v2p-ca15", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca15,tc1", "arm,vexpress,v2p-ca15", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <2>; | 18 | #address-cells = <2>; |
@@ -54,17 +55,24 @@ | |||
54 | compatible = "arm,hdlcd"; | 55 | compatible = "arm,hdlcd"; |
55 | reg = <0 0x2b000000 0 0x1000>; | 56 | reg = <0 0x2b000000 0 0x1000>; |
56 | interrupts = <0 85 4>; | 57 | interrupts = <0 85 4>; |
58 | clocks = <&oscclk5>; | ||
59 | clock-names = "pxlclk"; | ||
57 | }; | 60 | }; |
58 | 61 | ||
59 | memory-controller@2b0a0000 { | 62 | memory-controller@2b0a0000 { |
60 | compatible = "arm,pl341", "arm,primecell"; | 63 | compatible = "arm,pl341", "arm,primecell"; |
61 | reg = <0 0x2b0a0000 0 0x1000>; | 64 | reg = <0 0x2b0a0000 0 0x1000>; |
65 | clocks = <&oscclk7>; | ||
66 | clock-names = "apb_pclk"; | ||
62 | }; | 67 | }; |
63 | 68 | ||
64 | wdt@2b060000 { | 69 | wdt@2b060000 { |
65 | compatible = "arm,sp805", "arm,primecell"; | 70 | compatible = "arm,sp805", "arm,primecell"; |
71 | status = "disabled"; | ||
66 | reg = <0 0x2b060000 0 0x1000>; | 72 | reg = <0 0x2b060000 0 0x1000>; |
67 | interrupts = <98>; | 73 | interrupts = <98>; |
74 | clocks = <&oscclk7>; | ||
75 | clock-names = "apb_pclk"; | ||
68 | }; | 76 | }; |
69 | 77 | ||
70 | gic: interrupt-controller@2c001000 { | 78 | gic: interrupt-controller@2c001000 { |
@@ -84,6 +92,8 @@ | |||
84 | reg = <0 0x7ffd0000 0 0x1000>; | 92 | reg = <0 0x7ffd0000 0 0x1000>; |
85 | interrupts = <0 86 4>, | 93 | interrupts = <0 86 4>, |
86 | <0 87 4>; | 94 | <0 87 4>; |
95 | clocks = <&oscclk7>; | ||
96 | clock-names = "apb_pclk"; | ||
87 | }; | 97 | }; |
88 | 98 | ||
89 | dma@7ffb0000 { | 99 | dma@7ffb0000 { |
@@ -94,6 +104,8 @@ | |||
94 | <0 89 4>, | 104 | <0 89 4>, |
95 | <0 90 4>, | 105 | <0 90 4>, |
96 | <0 91 4>; | 106 | <0 91 4>; |
107 | clocks = <&oscclk7>; | ||
108 | clock-names = "apb_pclk"; | ||
97 | }; | 109 | }; |
98 | 110 | ||
99 | timer { | 111 | timer { |
@@ -110,7 +122,109 @@ | |||
110 | <0 69 4>; | 122 | <0 69 4>; |
111 | }; | 123 | }; |
112 | 124 | ||
113 | motherboard { | 125 | dcc { |
126 | compatible = "arm,vexpress,config-bus"; | ||
127 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
128 | |||
129 | osc@0 { | ||
130 | /* CPU PLL reference clock */ | ||
131 | compatible = "arm,vexpress-osc"; | ||
132 | arm,vexpress-sysreg,func = <1 0>; | ||
133 | freq-range = <50000000 60000000>; | ||
134 | #clock-cells = <0>; | ||
135 | clock-output-names = "oscclk0"; | ||
136 | }; | ||
137 | |||
138 | osc@4 { | ||
139 | /* Multiplexed AXI master clock */ | ||
140 | compatible = "arm,vexpress-osc"; | ||
141 | arm,vexpress-sysreg,func = <1 4>; | ||
142 | freq-range = <20000000 40000000>; | ||
143 | #clock-cells = <0>; | ||
144 | clock-output-names = "oscclk4"; | ||
145 | }; | ||
146 | |||
147 | oscclk5: osc@5 { | ||
148 | /* HDLCD PLL reference clock */ | ||
149 | compatible = "arm,vexpress-osc"; | ||
150 | arm,vexpress-sysreg,func = <1 5>; | ||
151 | freq-range = <23750000 165000000>; | ||
152 | #clock-cells = <0>; | ||
153 | clock-output-names = "oscclk5"; | ||
154 | }; | ||
155 | |||
156 | smbclk: osc@6 { | ||
157 | /* SMB clock */ | ||
158 | compatible = "arm,vexpress-osc"; | ||
159 | arm,vexpress-sysreg,func = <1 6>; | ||
160 | freq-range = <20000000 50000000>; | ||
161 | #clock-cells = <0>; | ||
162 | clock-output-names = "oscclk6"; | ||
163 | }; | ||
164 | |||
165 | oscclk7: osc@7 { | ||
166 | /* SYS PLL reference clock */ | ||
167 | compatible = "arm,vexpress-osc"; | ||
168 | arm,vexpress-sysreg,func = <1 7>; | ||
169 | freq-range = <20000000 60000000>; | ||
170 | #clock-cells = <0>; | ||
171 | clock-output-names = "oscclk7"; | ||
172 | }; | ||
173 | |||
174 | osc@8 { | ||
175 | /* DDR2 PLL reference clock */ | ||
176 | compatible = "arm,vexpress-osc"; | ||
177 | arm,vexpress-sysreg,func = <1 8>; | ||
178 | freq-range = <40000000 40000000>; | ||
179 | #clock-cells = <0>; | ||
180 | clock-output-names = "oscclk8"; | ||
181 | }; | ||
182 | |||
183 | volt@0 { | ||
184 | /* CPU core voltage */ | ||
185 | compatible = "arm,vexpress-volt"; | ||
186 | arm,vexpress-sysreg,func = <2 0>; | ||
187 | regulator-name = "Cores"; | ||
188 | regulator-min-microvolt = <800000>; | ||
189 | regulator-max-microvolt = <1050000>; | ||
190 | regulator-always-on; | ||
191 | label = "Cores"; | ||
192 | }; | ||
193 | |||
194 | amp@0 { | ||
195 | /* Total current for the two cores */ | ||
196 | compatible = "arm,vexpress-amp"; | ||
197 | arm,vexpress-sysreg,func = <3 0>; | ||
198 | label = "Cores"; | ||
199 | }; | ||
200 | |||
201 | temp@0 { | ||
202 | /* DCC internal temperature */ | ||
203 | compatible = "arm,vexpress-temp"; | ||
204 | arm,vexpress-sysreg,func = <4 0>; | ||
205 | label = "DCC"; | ||
206 | }; | ||
207 | |||
208 | power@0 { | ||
209 | /* Total power */ | ||
210 | compatible = "arm,vexpress-power"; | ||
211 | arm,vexpress-sysreg,func = <12 0>; | ||
212 | label = "Cores"; | ||
213 | }; | ||
214 | |||
215 | energy@0 { | ||
216 | /* Total energy */ | ||
217 | compatible = "arm,vexpress-energy"; | ||
218 | arm,vexpress-sysreg,func = <13 0>; | ||
219 | label = "Cores"; | ||
220 | }; | ||
221 | }; | ||
222 | |||
223 | smb { | ||
224 | compatible = "simple-bus"; | ||
225 | |||
226 | #address-cells = <2>; | ||
227 | #size-cells = <1>; | ||
114 | ranges = <0 0 0 0x08000000 0x04000000>, | 228 | ranges = <0 0 0 0x08000000 0x04000000>, |
115 | <1 0 0 0x14000000 0x04000000>, | 229 | <1 0 0 0x14000000 0x04000000>, |
116 | <2 0 0 0x18000000 0x04000000>, | 230 | <2 0 0 0x18000000 0x04000000>, |
@@ -118,6 +232,7 @@ | |||
118 | <4 0 0 0x0c000000 0x04000000>, | 232 | <4 0 0 0x0c000000 0x04000000>, |
119 | <5 0 0 0x10000000 0x04000000>; | 233 | <5 0 0 0x10000000 0x04000000>; |
120 | 234 | ||
235 | #interrupt-cells = <1>; | ||
121 | interrupt-map-mask = <0 0 63>; | 236 | interrupt-map-mask = <0 0 63>; |
122 | interrupt-map = <0 0 0 &gic 0 0 4>, | 237 | interrupt-map = <0 0 0 &gic 0 0 4>, |
123 | <0 0 1 &gic 0 1 4>, | 238 | <0 0 1 &gic 0 1 4>, |
@@ -162,7 +277,7 @@ | |||
162 | <0 0 40 &gic 0 40 4>, | 277 | <0 0 40 &gic 0 40 4>, |
163 | <0 0 41 &gic 0 41 4>, | 278 | <0 0 41 &gic 0 41 4>, |
164 | <0 0 42 &gic 0 42 4>; | 279 | <0 0 42 &gic 0 42 4>; |
280 | |||
281 | /include/ "vexpress-v2m-rs1.dtsi" | ||
165 | }; | 282 | }; |
166 | }; | 283 | }; |
167 | |||
168 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts index 4890a81c5467..1fc405a9ecfb 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA15_CA7"; | 13 | model = "V2P-CA15_CA7"; |
14 | arm,hbi = <0x249>; | 14 | arm,hbi = <0x249>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca15_a7", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca15_a7", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <2>; | 18 | #address-cells = <2>; |
@@ -74,17 +75,23 @@ | |||
74 | compatible = "arm,sp805", "arm,primecell"; | 75 | compatible = "arm,sp805", "arm,primecell"; |
75 | reg = <0 0x2a490000 0 0x1000>; | 76 | reg = <0 0x2a490000 0 0x1000>; |
76 | interrupts = <98>; | 77 | interrupts = <98>; |
78 | clocks = <&oscclk6a>, <&oscclk6a>; | ||
79 | clock-names = "wdogclk", "apb_pclk"; | ||
77 | }; | 80 | }; |
78 | 81 | ||
79 | hdlcd@2b000000 { | 82 | hdlcd@2b000000 { |
80 | compatible = "arm,hdlcd"; | 83 | compatible = "arm,hdlcd"; |
81 | reg = <0 0x2b000000 0 0x1000>; | 84 | reg = <0 0x2b000000 0 0x1000>; |
82 | interrupts = <0 85 4>; | 85 | interrupts = <0 85 4>; |
86 | clocks = <&oscclk5>; | ||
87 | clock-names = "pxlclk"; | ||
83 | }; | 88 | }; |
84 | 89 | ||
85 | memory-controller@2b0a0000 { | 90 | memory-controller@2b0a0000 { |
86 | compatible = "arm,pl341", "arm,primecell"; | 91 | compatible = "arm,pl341", "arm,primecell"; |
87 | reg = <0 0x2b0a0000 0 0x1000>; | 92 | reg = <0 0x2b0a0000 0 0x1000>; |
93 | clocks = <&oscclk6a>; | ||
94 | clock-names = "apb_pclk"; | ||
88 | }; | 95 | }; |
89 | 96 | ||
90 | gic: interrupt-controller@2c001000 { | 97 | gic: interrupt-controller@2c001000 { |
@@ -104,6 +111,8 @@ | |||
104 | reg = <0 0x7ffd0000 0 0x1000>; | 111 | reg = <0 0x7ffd0000 0 0x1000>; |
105 | interrupts = <0 86 4>, | 112 | interrupts = <0 86 4>, |
106 | <0 87 4>; | 113 | <0 87 4>; |
114 | clocks = <&oscclk6a>; | ||
115 | clock-names = "apb_pclk"; | ||
107 | }; | 116 | }; |
108 | 117 | ||
109 | dma@7ff00000 { | 118 | dma@7ff00000 { |
@@ -114,6 +123,8 @@ | |||
114 | <0 89 4>, | 123 | <0 89 4>, |
115 | <0 90 4>, | 124 | <0 90 4>, |
116 | <0 91 4>; | 125 | <0 91 4>; |
126 | clocks = <&oscclk6a>; | ||
127 | clock-names = "apb_pclk"; | ||
117 | }; | 128 | }; |
118 | 129 | ||
119 | timer { | 130 | timer { |
@@ -130,7 +141,175 @@ | |||
130 | <0 69 4>; | 141 | <0 69 4>; |
131 | }; | 142 | }; |
132 | 143 | ||
133 | motherboard { | 144 | oscclk6a: oscclk6a { |
145 | /* Reference 24MHz clock */ | ||
146 | compatible = "fixed-clock"; | ||
147 | #clock-cells = <0>; | ||
148 | clock-frequency = <24000000>; | ||
149 | clock-output-names = "oscclk6a"; | ||
150 | }; | ||
151 | |||
152 | dcc { | ||
153 | compatible = "arm,vexpress,config-bus"; | ||
154 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
155 | |||
156 | osc@0 { | ||
157 | /* A15 PLL 0 reference clock */ | ||
158 | compatible = "arm,vexpress-osc"; | ||
159 | arm,vexpress-sysreg,func = <1 0>; | ||
160 | freq-range = <17000000 50000000>; | ||
161 | #clock-cells = <0>; | ||
162 | clock-output-names = "oscclk0"; | ||
163 | }; | ||
164 | |||
165 | osc@1 { | ||
166 | /* A15 PLL 1 reference clock */ | ||
167 | compatible = "arm,vexpress-osc"; | ||
168 | arm,vexpress-sysreg,func = <1 1>; | ||
169 | freq-range = <17000000 50000000>; | ||
170 | #clock-cells = <0>; | ||
171 | clock-output-names = "oscclk1"; | ||
172 | }; | ||
173 | |||
174 | osc@2 { | ||
175 | /* A7 PLL 0 reference clock */ | ||
176 | compatible = "arm,vexpress-osc"; | ||
177 | arm,vexpress-sysreg,func = <1 2>; | ||
178 | freq-range = <17000000 50000000>; | ||
179 | #clock-cells = <0>; | ||
180 | clock-output-names = "oscclk2"; | ||
181 | }; | ||
182 | |||
183 | osc@3 { | ||
184 | /* A7 PLL 1 reference clock */ | ||
185 | compatible = "arm,vexpress-osc"; | ||
186 | arm,vexpress-sysreg,func = <1 3>; | ||
187 | freq-range = <17000000 50000000>; | ||
188 | #clock-cells = <0>; | ||
189 | clock-output-names = "oscclk3"; | ||
190 | }; | ||
191 | |||
192 | osc@4 { | ||
193 | /* External AXI master clock */ | ||
194 | compatible = "arm,vexpress-osc"; | ||
195 | arm,vexpress-sysreg,func = <1 4>; | ||
196 | freq-range = <20000000 40000000>; | ||
197 | #clock-cells = <0>; | ||
198 | clock-output-names = "oscclk4"; | ||
199 | }; | ||
200 | |||
201 | oscclk5: osc@5 { | ||
202 | /* HDLCD PLL reference clock */ | ||
203 | compatible = "arm,vexpress-osc"; | ||
204 | arm,vexpress-sysreg,func = <1 5>; | ||
205 | freq-range = <23750000 165000000>; | ||
206 | #clock-cells = <0>; | ||
207 | clock-output-names = "oscclk5"; | ||
208 | }; | ||
209 | |||
210 | smbclk: osc@6 { | ||
211 | /* Static memory controller clock */ | ||
212 | compatible = "arm,vexpress-osc"; | ||
213 | arm,vexpress-sysreg,func = <1 6>; | ||
214 | freq-range = <20000000 40000000>; | ||
215 | #clock-cells = <0>; | ||
216 | clock-output-names = "oscclk6"; | ||
217 | }; | ||
218 | |||
219 | osc@7 { | ||
220 | /* SYS PLL reference clock */ | ||
221 | compatible = "arm,vexpress-osc"; | ||
222 | arm,vexpress-sysreg,func = <1 7>; | ||
223 | freq-range = <17000000 50000000>; | ||
224 | #clock-cells = <0>; | ||
225 | clock-output-names = "oscclk7"; | ||
226 | }; | ||
227 | |||
228 | osc@8 { | ||
229 | /* DDR2 PLL reference clock */ | ||
230 | compatible = "arm,vexpress-osc"; | ||
231 | arm,vexpress-sysreg,func = <1 8>; | ||
232 | freq-range = <20000000 50000000>; | ||
233 | #clock-cells = <0>; | ||
234 | clock-output-names = "oscclk8"; | ||
235 | }; | ||
236 | |||
237 | volt@0 { | ||
238 | /* A15 CPU core voltage */ | ||
239 | compatible = "arm,vexpress-volt"; | ||
240 | arm,vexpress-sysreg,func = <2 0>; | ||
241 | regulator-name = "A15 Vcore"; | ||
242 | regulator-min-microvolt = <800000>; | ||
243 | regulator-max-microvolt = <1050000>; | ||
244 | regulator-always-on; | ||
245 | label = "A15 Vcore"; | ||
246 | }; | ||
247 | |||
248 | volt@1 { | ||
249 | /* A7 CPU core voltage */ | ||
250 | compatible = "arm,vexpress-volt"; | ||
251 | arm,vexpress-sysreg,func = <2 1>; | ||
252 | regulator-name = "A7 Vcore"; | ||
253 | regulator-min-microvolt = <800000>; | ||
254 | regulator-max-microvolt = <1050000>; | ||
255 | regulator-always-on; | ||
256 | label = "A7 Vcore"; | ||
257 | }; | ||
258 | |||
259 | amp@0 { | ||
260 | /* Total current for the two A15 cores */ | ||
261 | compatible = "arm,vexpress-amp"; | ||
262 | arm,vexpress-sysreg,func = <3 0>; | ||
263 | label = "A15 Icore"; | ||
264 | }; | ||
265 | |||
266 | amp@1 { | ||
267 | /* Total current for the three A7 cores */ | ||
268 | compatible = "arm,vexpress-amp"; | ||
269 | arm,vexpress-sysreg,func = <3 1>; | ||
270 | label = "A7 Icore"; | ||
271 | }; | ||
272 | |||
273 | temp@0 { | ||
274 | /* DCC internal temperature */ | ||
275 | compatible = "arm,vexpress-temp"; | ||
276 | arm,vexpress-sysreg,func = <4 0>; | ||
277 | label = "DCC"; | ||
278 | }; | ||
279 | |||
280 | power@0 { | ||
281 | /* Total power for the two A15 cores */ | ||
282 | compatible = "arm,vexpress-power"; | ||
283 | arm,vexpress-sysreg,func = <12 0>; | ||
284 | label = "A15 Pcore"; | ||
285 | }; | ||
286 | power@1 { | ||
287 | /* Total power for the three A7 cores */ | ||
288 | compatible = "arm,vexpress-power"; | ||
289 | arm,vexpress-sysreg,func = <12 1>; | ||
290 | label = "A7 Pcore"; | ||
291 | }; | ||
292 | |||
293 | energy@0 { | ||
294 | /* Total energy for the two A15 cores */ | ||
295 | compatible = "arm,vexpress-energy"; | ||
296 | arm,vexpress-sysreg,func = <13 0>; | ||
297 | label = "A15 Jcore"; | ||
298 | }; | ||
299 | |||
300 | energy@2 { | ||
301 | /* Total energy for the three A7 cores */ | ||
302 | compatible = "arm,vexpress-energy"; | ||
303 | arm,vexpress-sysreg,func = <13 2>; | ||
304 | label = "A7 Jcore"; | ||
305 | }; | ||
306 | }; | ||
307 | |||
308 | smb { | ||
309 | compatible = "simple-bus"; | ||
310 | |||
311 | #address-cells = <2>; | ||
312 | #size-cells = <1>; | ||
134 | ranges = <0 0 0 0x08000000 0x04000000>, | 313 | ranges = <0 0 0 0x08000000 0x04000000>, |
135 | <1 0 0 0x14000000 0x04000000>, | 314 | <1 0 0 0x14000000 0x04000000>, |
136 | <2 0 0 0x18000000 0x04000000>, | 315 | <2 0 0 0x18000000 0x04000000>, |
@@ -138,6 +317,7 @@ | |||
138 | <4 0 0 0x0c000000 0x04000000>, | 317 | <4 0 0 0x0c000000 0x04000000>, |
139 | <5 0 0 0x10000000 0x04000000>; | 318 | <5 0 0 0x10000000 0x04000000>; |
140 | 319 | ||
320 | #interrupt-cells = <1>; | ||
141 | interrupt-map-mask = <0 0 63>; | 321 | interrupt-map-mask = <0 0 63>; |
142 | interrupt-map = <0 0 0 &gic 0 0 4>, | 322 | interrupt-map = <0 0 0 &gic 0 0 4>, |
143 | <0 0 1 &gic 0 1 4>, | 323 | <0 0 1 &gic 0 1 4>, |
@@ -182,7 +362,7 @@ | |||
182 | <0 0 40 &gic 0 40 4>, | 362 | <0 0 40 &gic 0 40 4>, |
183 | <0 0 41 &gic 0 41 4>, | 363 | <0 0 41 &gic 0 41 4>, |
184 | <0 0 42 &gic 0 42 4>; | 364 | <0 0 42 &gic 0 42 4>; |
365 | |||
366 | /include/ "vexpress-v2m-rs1.dtsi" | ||
185 | }; | 367 | }; |
186 | }; | 368 | }; |
187 | |||
188 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts index 18917a0f8604..6328cbc71d30 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA5s"; | 13 | model = "V2P-CA5s"; |
14 | arm,hbi = <0x225>; | 14 | arm,hbi = <0x225>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca5s", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca5s", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <1>; | 18 | #address-cells = <1>; |
@@ -56,11 +57,15 @@ | |||
56 | compatible = "arm,hdlcd"; | 57 | compatible = "arm,hdlcd"; |
57 | reg = <0x2a110000 0x1000>; | 58 | reg = <0x2a110000 0x1000>; |
58 | interrupts = <0 85 4>; | 59 | interrupts = <0 85 4>; |
60 | clocks = <&oscclk3>; | ||
61 | clock-names = "pxlclk"; | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | memory-controller@2a150000 { | 64 | memory-controller@2a150000 { |
62 | compatible = "arm,pl341", "arm,primecell"; | 65 | compatible = "arm,pl341", "arm,primecell"; |
63 | reg = <0x2a150000 0x1000>; | 66 | reg = <0x2a150000 0x1000>; |
67 | clocks = <&oscclk1>; | ||
68 | clock-names = "apb_pclk"; | ||
64 | }; | 69 | }; |
65 | 70 | ||
66 | memory-controller@2a190000 { | 71 | memory-controller@2a190000 { |
@@ -68,6 +73,8 @@ | |||
68 | reg = <0x2a190000 0x1000>; | 73 | reg = <0x2a190000 0x1000>; |
69 | interrupts = <0 86 4>, | 74 | interrupts = <0 86 4>, |
70 | <0 87 4>; | 75 | <0 87 4>; |
76 | clocks = <&oscclk1>; | ||
77 | clock-names = "apb_pclk"; | ||
71 | }; | 78 | }; |
72 | 79 | ||
73 | scu@2c000000 { | 80 | scu@2c000000 { |
@@ -109,7 +116,77 @@ | |||
109 | <0 69 4>; | 116 | <0 69 4>; |
110 | }; | 117 | }; |
111 | 118 | ||
112 | motherboard { | 119 | dcc { |
120 | compatible = "arm,vexpress,config-bus"; | ||
121 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
122 | |||
123 | osc@0 { | ||
124 | /* CPU and internal AXI reference clock */ | ||
125 | compatible = "arm,vexpress-osc"; | ||
126 | arm,vexpress-sysreg,func = <1 0>; | ||
127 | freq-range = <50000000 100000000>; | ||
128 | #clock-cells = <0>; | ||
129 | clock-output-names = "oscclk0"; | ||
130 | }; | ||
131 | |||
132 | oscclk1: osc@1 { | ||
133 | /* Multiplexed AXI master clock */ | ||
134 | compatible = "arm,vexpress-osc"; | ||
135 | arm,vexpress-sysreg,func = <1 1>; | ||
136 | freq-range = <5000000 50000000>; | ||
137 | #clock-cells = <0>; | ||
138 | clock-output-names = "oscclk1"; | ||
139 | }; | ||
140 | |||
141 | osc@2 { | ||
142 | /* DDR2 */ | ||
143 | compatible = "arm,vexpress-osc"; | ||
144 | arm,vexpress-sysreg,func = <1 2>; | ||
145 | freq-range = <80000000 120000000>; | ||
146 | #clock-cells = <0>; | ||
147 | clock-output-names = "oscclk2"; | ||
148 | }; | ||
149 | |||
150 | oscclk3: osc@3 { | ||
151 | /* HDLCD */ | ||
152 | compatible = "arm,vexpress-osc"; | ||
153 | arm,vexpress-sysreg,func = <1 3>; | ||
154 | freq-range = <23750000 165000000>; | ||
155 | #clock-cells = <0>; | ||
156 | clock-output-names = "oscclk3"; | ||
157 | }; | ||
158 | |||
159 | osc@4 { | ||
160 | /* Test chip gate configuration */ | ||
161 | compatible = "arm,vexpress-osc"; | ||
162 | arm,vexpress-sysreg,func = <1 4>; | ||
163 | freq-range = <80000000 80000000>; | ||
164 | #clock-cells = <0>; | ||
165 | clock-output-names = "oscclk4"; | ||
166 | }; | ||
167 | |||
168 | smbclk: osc@5 { | ||
169 | /* SMB clock */ | ||
170 | compatible = "arm,vexpress-osc"; | ||
171 | arm,vexpress-sysreg,func = <1 5>; | ||
172 | freq-range = <25000000 60000000>; | ||
173 | #clock-cells = <0>; | ||
174 | clock-output-names = "oscclk5"; | ||
175 | }; | ||
176 | |||
177 | temp@0 { | ||
178 | /* DCC internal operating temperature */ | ||
179 | compatible = "arm,vexpress-temp"; | ||
180 | arm,vexpress-sysreg,func = <4 0>; | ||
181 | label = "DCC"; | ||
182 | }; | ||
183 | }; | ||
184 | |||
185 | smb { | ||
186 | compatible = "simple-bus"; | ||
187 | |||
188 | #address-cells = <2>; | ||
189 | #size-cells = <1>; | ||
113 | ranges = <0 0 0x08000000 0x04000000>, | 190 | ranges = <0 0 0x08000000 0x04000000>, |
114 | <1 0 0x14000000 0x04000000>, | 191 | <1 0 0x14000000 0x04000000>, |
115 | <2 0 0x18000000 0x04000000>, | 192 | <2 0 0x18000000 0x04000000>, |
@@ -117,6 +194,7 @@ | |||
117 | <4 0 0x0c000000 0x04000000>, | 194 | <4 0 0x0c000000 0x04000000>, |
118 | <5 0 0x10000000 0x04000000>; | 195 | <5 0 0x10000000 0x04000000>; |
119 | 196 | ||
197 | #interrupt-cells = <1>; | ||
120 | interrupt-map-mask = <0 0 63>; | 198 | interrupt-map-mask = <0 0 63>; |
121 | interrupt-map = <0 0 0 &gic 0 0 4>, | 199 | interrupt-map = <0 0 0 &gic 0 0 4>, |
122 | <0 0 1 &gic 0 1 4>, | 200 | <0 0 1 &gic 0 1 4>, |
@@ -161,7 +239,7 @@ | |||
161 | <0 0 40 &gic 0 40 4>, | 239 | <0 0 40 &gic 0 40 4>, |
162 | <0 0 41 &gic 0 41 4>, | 240 | <0 0 41 &gic 0 41 4>, |
163 | <0 0 42 &gic 0 42 4>; | 241 | <0 0 42 &gic 0 42 4>; |
242 | |||
243 | /include/ "vexpress-v2m-rs1.dtsi" | ||
164 | }; | 244 | }; |
165 | }; | 245 | }; |
166 | |||
167 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca9.dts b/arch/arm/boot/dts/vexpress-v2p-ca9.dts index 3f0c736d31d6..1420bb14d95c 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca9.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca9.dts | |||
@@ -12,6 +12,7 @@ | |||
12 | / { | 12 | / { |
13 | model = "V2P-CA9"; | 13 | model = "V2P-CA9"; |
14 | arm,hbi = <0x191>; | 14 | arm,hbi = <0x191>; |
15 | arm,vexpress,site = <0xf>; | ||
15 | compatible = "arm,vexpress,v2p-ca9", "arm,vexpress"; | 16 | compatible = "arm,vexpress,v2p-ca9", "arm,vexpress"; |
16 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
17 | #address-cells = <1>; | 18 | #address-cells = <1>; |
@@ -70,11 +71,15 @@ | |||
70 | compatible = "arm,pl111", "arm,primecell"; | 71 | compatible = "arm,pl111", "arm,primecell"; |
71 | reg = <0x10020000 0x1000>; | 72 | reg = <0x10020000 0x1000>; |
72 | interrupts = <0 44 4>; | 73 | interrupts = <0 44 4>; |
74 | clocks = <&oscclk1>, <&oscclk2>; | ||
75 | clock-names = "clcdclk", "apb_pclk"; | ||
73 | }; | 76 | }; |
74 | 77 | ||
75 | memory-controller@100e0000 { | 78 | memory-controller@100e0000 { |
76 | compatible = "arm,pl341", "arm,primecell"; | 79 | compatible = "arm,pl341", "arm,primecell"; |
77 | reg = <0x100e0000 0x1000>; | 80 | reg = <0x100e0000 0x1000>; |
81 | clocks = <&oscclk2>; | ||
82 | clock-names = "apb_pclk"; | ||
78 | }; | 83 | }; |
79 | 84 | ||
80 | memory-controller@100e1000 { | 85 | memory-controller@100e1000 { |
@@ -82,6 +87,8 @@ | |||
82 | reg = <0x100e1000 0x1000>; | 87 | reg = <0x100e1000 0x1000>; |
83 | interrupts = <0 45 4>, | 88 | interrupts = <0 45 4>, |
84 | <0 46 4>; | 89 | <0 46 4>; |
90 | clocks = <&oscclk2>; | ||
91 | clock-names = "apb_pclk"; | ||
85 | }; | 92 | }; |
86 | 93 | ||
87 | timer@100e4000 { | 94 | timer@100e4000 { |
@@ -89,12 +96,16 @@ | |||
89 | reg = <0x100e4000 0x1000>; | 96 | reg = <0x100e4000 0x1000>; |
90 | interrupts = <0 48 4>, | 97 | interrupts = <0 48 4>, |
91 | <0 49 4>; | 98 | <0 49 4>; |
99 | clocks = <&oscclk2>, <&oscclk2>; | ||
100 | clock-names = "timclk", "apb_pclk"; | ||
92 | }; | 101 | }; |
93 | 102 | ||
94 | watchdog@100e5000 { | 103 | watchdog@100e5000 { |
95 | compatible = "arm,sp805", "arm,primecell"; | 104 | compatible = "arm,sp805", "arm,primecell"; |
96 | reg = <0x100e5000 0x1000>; | 105 | reg = <0x100e5000 0x1000>; |
97 | interrupts = <0 51 4>; | 106 | interrupts = <0 51 4>; |
107 | clocks = <&oscclk2>, <&oscclk2>; | ||
108 | clock-names = "wdogclk", "apb_pclk"; | ||
98 | }; | 109 | }; |
99 | 110 | ||
100 | scu@1e000000 { | 111 | scu@1e000000 { |
@@ -140,13 +151,132 @@ | |||
140 | <0 63 4>; | 151 | <0 63 4>; |
141 | }; | 152 | }; |
142 | 153 | ||
143 | motherboard { | 154 | dcc { |
155 | compatible = "arm,vexpress,config-bus"; | ||
156 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
157 | |||
158 | osc@0 { | ||
159 | /* ACLK clock to the AXI master port on the test chip */ | ||
160 | compatible = "arm,vexpress-osc"; | ||
161 | arm,vexpress-sysreg,func = <1 0>; | ||
162 | freq-range = <30000000 50000000>; | ||
163 | #clock-cells = <0>; | ||
164 | clock-output-names = "extsaxiclk"; | ||
165 | }; | ||
166 | |||
167 | oscclk1: osc@1 { | ||
168 | /* Reference clock for the CLCD */ | ||
169 | compatible = "arm,vexpress-osc"; | ||
170 | arm,vexpress-sysreg,func = <1 1>; | ||
171 | freq-range = <10000000 80000000>; | ||
172 | #clock-cells = <0>; | ||
173 | clock-output-names = "clcdclk"; | ||
174 | }; | ||
175 | |||
176 | smbclk: oscclk2: osc@2 { | ||
177 | /* Reference clock for the test chip internal PLLs */ | ||
178 | compatible = "arm,vexpress-osc"; | ||
179 | arm,vexpress-sysreg,func = <1 2>; | ||
180 | freq-range = <33000000 100000000>; | ||
181 | #clock-cells = <0>; | ||
182 | clock-output-names = "tcrefclk"; | ||
183 | }; | ||
184 | |||
185 | volt@0 { | ||
186 | /* Test Chip internal logic voltage */ | ||
187 | compatible = "arm,vexpress-volt"; | ||
188 | arm,vexpress-sysreg,func = <2 0>; | ||
189 | regulator-name = "VD10"; | ||
190 | regulator-always-on; | ||
191 | label = "VD10"; | ||
192 | }; | ||
193 | |||
194 | volt@1 { | ||
195 | /* PL310, L2 cache, RAM cell supply (not PL310 logic) */ | ||
196 | compatible = "arm,vexpress-volt"; | ||
197 | arm,vexpress-sysreg,func = <2 1>; | ||
198 | regulator-name = "VD10_S2"; | ||
199 | regulator-always-on; | ||
200 | label = "VD10_S2"; | ||
201 | }; | ||
202 | |||
203 | volt@2 { | ||
204 | /* Cortex-A9 system supply, Cores, MPEs, SCU and PL310 logic */ | ||
205 | compatible = "arm,vexpress-volt"; | ||
206 | arm,vexpress-sysreg,func = <2 2>; | ||
207 | regulator-name = "VD10_S3"; | ||
208 | regulator-always-on; | ||
209 | label = "VD10_S3"; | ||
210 | }; | ||
211 | |||
212 | volt@3 { | ||
213 | /* DDR2 SDRAM and Test Chip DDR2 I/O supply */ | ||
214 | compatible = "arm,vexpress-volt"; | ||
215 | arm,vexpress-sysreg,func = <2 3>; | ||
216 | regulator-name = "VCC1V8"; | ||
217 | regulator-always-on; | ||
218 | label = "VCC1V8"; | ||
219 | }; | ||
220 | |||
221 | volt@4 { | ||
222 | /* DDR2 SDRAM VTT termination voltage */ | ||
223 | compatible = "arm,vexpress-volt"; | ||
224 | arm,vexpress-sysreg,func = <2 4>; | ||
225 | regulator-name = "DDR2VTT"; | ||
226 | regulator-always-on; | ||
227 | label = "DDR2VTT"; | ||
228 | }; | ||
229 | |||
230 | volt@5 { | ||
231 | /* Local board supply for miscellaneous logic external to the Test Chip */ | ||
232 | arm,vexpress-sysreg,func = <2 5>; | ||
233 | compatible = "arm,vexpress-volt"; | ||
234 | regulator-name = "VCC3V3"; | ||
235 | regulator-always-on; | ||
236 | label = "VCC3V3"; | ||
237 | }; | ||
238 | |||
239 | amp@0 { | ||
240 | /* PL310, L2 cache, RAM cell supply (not PL310 logic) */ | ||
241 | compatible = "arm,vexpress-amp"; | ||
242 | arm,vexpress-sysreg,func = <3 0>; | ||
243 | label = "VD10_S2"; | ||
244 | }; | ||
245 | |||
246 | amp@1 { | ||
247 | /* Cortex-A9 system supply, Cores, MPEs, SCU and PL310 logic */ | ||
248 | compatible = "arm,vexpress-amp"; | ||
249 | arm,vexpress-sysreg,func = <3 1>; | ||
250 | label = "VD10_S3"; | ||
251 | }; | ||
252 | |||
253 | power@0 { | ||
254 | /* PL310, L2 cache, RAM cell supply (not PL310 logic) */ | ||
255 | compatible = "arm,vexpress-power"; | ||
256 | arm,vexpress-sysreg,func = <12 0>; | ||
257 | label = "PVD10_S2"; | ||
258 | }; | ||
259 | |||
260 | power@1 { | ||
261 | /* Cortex-A9 system supply, Cores, MPEs, SCU and PL310 logic */ | ||
262 | compatible = "arm,vexpress-power"; | ||
263 | arm,vexpress-sysreg,func = <12 1>; | ||
264 | label = "PVD10_S3"; | ||
265 | }; | ||
266 | }; | ||
267 | |||
268 | smb { | ||
269 | compatible = "simple-bus"; | ||
270 | |||
271 | #address-cells = <2>; | ||
272 | #size-cells = <1>; | ||
144 | ranges = <0 0 0x40000000 0x04000000>, | 273 | ranges = <0 0 0x40000000 0x04000000>, |
145 | <1 0 0x44000000 0x04000000>, | 274 | <1 0 0x44000000 0x04000000>, |
146 | <2 0 0x48000000 0x04000000>, | 275 | <2 0 0x48000000 0x04000000>, |
147 | <3 0 0x4c000000 0x04000000>, | 276 | <3 0 0x4c000000 0x04000000>, |
148 | <7 0 0x10000000 0x00020000>; | 277 | <7 0 0x10000000 0x00020000>; |
149 | 278 | ||
279 | #interrupt-cells = <1>; | ||
150 | interrupt-map-mask = <0 0 63>; | 280 | interrupt-map-mask = <0 0 63>; |
151 | interrupt-map = <0 0 0 &gic 0 0 4>, | 281 | interrupt-map = <0 0 0 &gic 0 0 4>, |
152 | <0 0 1 &gic 0 1 4>, | 282 | <0 0 1 &gic 0 1 4>, |
@@ -191,7 +321,7 @@ | |||
191 | <0 0 40 &gic 0 40 4>, | 321 | <0 0 40 &gic 0 40 4>, |
192 | <0 0 41 &gic 0 41 4>, | 322 | <0 0 41 &gic 0 41 4>, |
193 | <0 0 42 &gic 0 42 4>; | 323 | <0 0 42 &gic 0 42 4>; |
324 | |||
325 | /include/ "vexpress-v2m.dtsi" | ||
194 | }; | 326 | }; |
195 | }; | 327 | }; |
196 | |||
197 | /include/ "vexpress-v2m.dtsi" | ||
diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig index f78d259f8d23..3d764072dd54 100644 --- a/arch/arm/configs/armadillo800eva_defconfig +++ b/arch/arm/configs/armadillo800eva_defconfig | |||
@@ -7,6 +7,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
7 | # CONFIG_IPC_NS is not set | 7 | # CONFIG_IPC_NS is not set |
8 | # CONFIG_PID_NS is not set | 8 | # CONFIG_PID_NS is not set |
9 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 9 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
10 | CONFIG_PERF_EVENTS=y | ||
10 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
11 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
12 | CONFIG_MODULE_UNLOAD=y | 13 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig index 7aea70253c63..74e27f0ff6ad 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig | |||
@@ -66,8 +66,6 @@ CONFIG_TTY_PRINTK=y | |||
66 | # CONFIG_FILE_LOCKING is not set | 66 | # CONFIG_FILE_LOCKING is not set |
67 | # CONFIG_DNOTIFY is not set | 67 | # CONFIG_DNOTIFY is not set |
68 | # CONFIG_INOTIFY_USER is not set | 68 | # CONFIG_INOTIFY_USER is not set |
69 | # CONFIG_PROC_FS is not set | ||
70 | # CONFIG_SYSFS is not set | ||
71 | # CONFIG_MISC_FILESYSTEMS is not set | 69 | # CONFIG_MISC_FILESYSTEMS is not set |
72 | CONFIG_PRINTK_TIME=y | 70 | CONFIG_PRINTK_TIME=y |
73 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | 71 | # CONFIG_ENABLE_WARN_DEPRECATED is not set |
diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig new file mode 100644 index 000000000000..e3bf2d65618e --- /dev/null +++ b/arch/arm/configs/bcm_defconfig | |||
@@ -0,0 +1,114 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_NO_HZ=y | ||
6 | CONFIG_HIGH_RES_TIMERS=y | ||
7 | CONFIG_BSD_PROCESS_ACCT=y | ||
8 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
9 | CONFIG_IKCONFIG=y | ||
10 | CONFIG_IKCONFIG_PROC=y | ||
11 | CONFIG_LOG_BUF_SHIFT=19 | ||
12 | CONFIG_CGROUPS=y | ||
13 | CONFIG_CGROUP_FREEZER=y | ||
14 | CONFIG_CGROUP_DEVICE=y | ||
15 | CONFIG_CGROUP_CPUACCT=y | ||
16 | CONFIG_RESOURCE_COUNTERS=y | ||
17 | CONFIG_CGROUP_SCHED=y | ||
18 | CONFIG_BLK_CGROUP=y | ||
19 | CONFIG_NAMESPACES=y | ||
20 | CONFIG_BLK_DEV_INITRD=y | ||
21 | CONFIG_SYSCTL_SYSCALL=y | ||
22 | CONFIG_EMBEDDED=y | ||
23 | # CONFIG_COMPAT_BRK is not set | ||
24 | CONFIG_MODULES=y | ||
25 | CONFIG_MODULE_UNLOAD=y | ||
26 | # CONFIG_BLK_DEV_BSG is not set | ||
27 | CONFIG_PARTITION_ADVANCED=y | ||
28 | CONFIG_EFI_PARTITION=y | ||
29 | CONFIG_ARCH_BCM=y | ||
30 | CONFIG_ARM_THUMBEE=y | ||
31 | CONFIG_ARM_ERRATA_743622=y | ||
32 | CONFIG_PREEMPT=y | ||
33 | CONFIG_AEABI=y | ||
34 | # CONFIG_OABI_COMPAT is not set | ||
35 | # CONFIG_COMPACTION is not set | ||
36 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
37 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
38 | CONFIG_ARM_APPENDED_DTB=y | ||
39 | CONFIG_CMDLINE="console=ttyS0,115200n8 mem=128M" | ||
40 | CONFIG_CPU_IDLE=y | ||
41 | CONFIG_VFP=y | ||
42 | CONFIG_NEON=y | ||
43 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
44 | CONFIG_PM_RUNTIME=y | ||
45 | CONFIG_DEVTMPFS=y | ||
46 | CONFIG_DEVTMPFS_MOUNT=y | ||
47 | CONFIG_PROC_DEVICETREE=y | ||
48 | # CONFIG_BLK_DEV is not set | ||
49 | CONFIG_SCSI=y | ||
50 | CONFIG_BLK_DEV_SD=y | ||
51 | CONFIG_CHR_DEV_SG=y | ||
52 | CONFIG_SCSI_MULTI_LUN=y | ||
53 | CONFIG_SCSI_SCAN_ASYNC=y | ||
54 | CONFIG_INPUT_FF_MEMLESS=y | ||
55 | CONFIG_INPUT_JOYDEV=y | ||
56 | CONFIG_INPUT_EVDEV=y | ||
57 | # CONFIG_KEYBOARD_ATKBD is not set | ||
58 | # CONFIG_INPUT_MOUSE is not set | ||
59 | CONFIG_INPUT_TOUCHSCREEN=y | ||
60 | CONFIG_INPUT_MISC=y | ||
61 | CONFIG_INPUT_UINPUT=y | ||
62 | # CONFIG_SERIO is not set | ||
63 | # CONFIG_LEGACY_PTYS is not set | ||
64 | CONFIG_SERIAL_8250=y | ||
65 | CONFIG_SERIAL_8250_CONSOLE=y | ||
66 | CONFIG_SERIAL_8250_EXTENDED=y | ||
67 | CONFIG_SERIAL_8250_MANY_PORTS=y | ||
68 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
69 | CONFIG_SERIAL_8250_RSA=y | ||
70 | CONFIG_SERIAL_8250_DW=y | ||
71 | CONFIG_HW_RANDOM=y | ||
72 | CONFIG_I2C=y | ||
73 | CONFIG_I2C_CHARDEV=y | ||
74 | # CONFIG_HWMON is not set | ||
75 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
76 | CONFIG_FB=y | ||
77 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
78 | CONFIG_LCD_CLASS_DEVICE=y | ||
79 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
80 | # CONFIG_USB_SUPPORT is not set | ||
81 | CONFIG_NEW_LEDS=y | ||
82 | CONFIG_LEDS_CLASS=y | ||
83 | CONFIG_LEDS_TRIGGERS=y | ||
84 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
85 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
86 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
87 | CONFIG_EXT4_FS=y | ||
88 | CONFIG_EXT4_FS_POSIX_ACL=y | ||
89 | CONFIG_EXT4_FS_SECURITY=y | ||
90 | CONFIG_AUTOFS4_FS=y | ||
91 | CONFIG_FUSE_FS=y | ||
92 | CONFIG_MSDOS_FS=y | ||
93 | CONFIG_VFAT_FS=y | ||
94 | CONFIG_TMPFS=y | ||
95 | CONFIG_TMPFS_POSIX_ACL=y | ||
96 | CONFIG_CONFIGFS_FS=y | ||
97 | # CONFIG_MISC_FILESYSTEMS is not set | ||
98 | CONFIG_NLS_CODEPAGE_437=y | ||
99 | CONFIG_NLS_ISO8859_1=y | ||
100 | CONFIG_PRINTK_TIME=y | ||
101 | CONFIG_MAGIC_SYSRQ=y | ||
102 | CONFIG_DEBUG_FS=y | ||
103 | CONFIG_DETECT_HUNG_TASK=y | ||
104 | CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110 | ||
105 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y | ||
106 | CONFIG_DEBUG_INFO=y | ||
107 | # CONFIG_FTRACE is not set | ||
108 | CONFIG_DEBUG_LL=y | ||
109 | CONFIG_CRC_CCITT=y | ||
110 | CONFIG_CRC_T10DIF=y | ||
111 | CONFIG_CRC_ITU_T=y | ||
112 | CONFIG_CRC7=y | ||
113 | CONFIG_XZ_DEC=y | ||
114 | CONFIG_AVERAGE=y | ||
diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig new file mode 100644 index 000000000000..1cd94c36321f --- /dev/null +++ b/arch/arm/configs/clps711x_defconfig | |||
@@ -0,0 +1,90 @@ | |||
1 | CONFIG_KERNEL_LZMA=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_RD_LZMA=y | ||
6 | CONFIG_EMBEDDED=y | ||
7 | CONFIG_SLOB=y | ||
8 | CONFIG_JUMP_LABEL=y | ||
9 | # CONFIG_LBDAF is not set | ||
10 | CONFIG_PARTITION_ADVANCED=y | ||
11 | # CONFIG_IOSCHED_CFQ is not set | ||
12 | CONFIG_ARCH_CLPS711X=y | ||
13 | CONFIG_ARCH_AUTCPU12=y | ||
14 | CONFIG_ARCH_CDB89712=y | ||
15 | CONFIG_ARCH_CLEP7312=y | ||
16 | CONFIG_ARCH_EDB7211=y | ||
17 | CONFIG_ARCH_P720T=y | ||
18 | CONFIG_ARCH_FORTUNET=y | ||
19 | CONFIG_AEABI=y | ||
20 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
21 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
22 | # CONFIG_COREDUMP is not set | ||
23 | CONFIG_NET=y | ||
24 | CONFIG_PACKET=y | ||
25 | CONFIG_UNIX=y | ||
26 | CONFIG_INET=y | ||
27 | # CONFIG_IPV6 is not set | ||
28 | CONFIG_IRDA=y | ||
29 | CONFIG_IRTTY_SIR=y | ||
30 | CONFIG_EP7211_DONGLE=y | ||
31 | # CONFIG_WIRELESS is not set | ||
32 | CONFIG_MTD=y | ||
33 | CONFIG_MTD_CMDLINE_PARTS=y | ||
34 | CONFIG_MTD_CHAR=y | ||
35 | CONFIG_MTD_BLOCK=y | ||
36 | CONFIG_MTD_CFI=y | ||
37 | CONFIG_MTD_JEDECPROBE=y | ||
38 | CONFIG_MTD_CFI_INTELEXT=y | ||
39 | CONFIG_MTD_CFI_AMDSTD=y | ||
40 | CONFIG_MTD_CFI_STAA=y | ||
41 | CONFIG_MTD_AUTCPU12=y | ||
42 | CONFIG_MTD_PLATRAM=y | ||
43 | CONFIG_MTD_NAND=y | ||
44 | CONFIG_MTD_NAND_GPIO=y | ||
45 | CONFIG_NETDEVICES=y | ||
46 | # CONFIG_NET_CADENCE is not set | ||
47 | # CONFIG_NET_VENDOR_BROADCOM is not set | ||
48 | # CONFIG_NET_VENDOR_CHELSIO is not set | ||
49 | CONFIG_CS89x0=y | ||
50 | CONFIG_CS89x0_PLATFORM=y | ||
51 | # CONFIG_NET_VENDOR_FARADAY is not set | ||
52 | # CONFIG_NET_VENDOR_INTEL is not set | ||
53 | # CONFIG_NET_VENDOR_MARVELL is not set | ||
54 | # CONFIG_NET_VENDOR_MICREL is not set | ||
55 | # CONFIG_NET_VENDOR_NATSEMI is not set | ||
56 | # CONFIG_NET_VENDOR_SEEQ is not set | ||
57 | # CONFIG_NET_VENDOR_SMSC is not set | ||
58 | # CONFIG_NET_VENDOR_STMICRO is not set | ||
59 | # CONFIG_NET_VENDOR_WIZNET is not set | ||
60 | # CONFIG_WLAN is not set | ||
61 | # CONFIG_INPUT is not set | ||
62 | # CONFIG_SERIO is not set | ||
63 | # CONFIG_VT is not set | ||
64 | CONFIG_SERIAL_CLPS711X_CONSOLE=y | ||
65 | # CONFIG_HW_RANDOM is not set | ||
66 | CONFIG_SPI=y | ||
67 | CONFIG_GPIO_GENERIC_PLATFORM=y | ||
68 | # CONFIG_HWMON is not set | ||
69 | CONFIG_FB=y | ||
70 | CONFIG_FB_CLPS711X=y | ||
71 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
72 | CONFIG_LCD_PLATFORM=y | ||
73 | # CONFIG_USB_SUPPORT is not set | ||
74 | CONFIG_NEW_LEDS=y | ||
75 | CONFIG_LEDS_CLASS=y | ||
76 | CONFIG_LEDS_GPIO=y | ||
77 | CONFIG_LEDS_TRIGGERS=y | ||
78 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
79 | # CONFIG_IOMMU_SUPPORT is not set | ||
80 | CONFIG_EXT2_FS=y | ||
81 | CONFIG_CRAMFS=y | ||
82 | CONFIG_MINIX_FS=y | ||
83 | # CONFIG_NETWORK_FILESYSTEMS is not set | ||
84 | # CONFIG_FTRACE is not set | ||
85 | CONFIG_DEBUG_USER=y | ||
86 | CONFIG_DEBUG_LL=y | ||
87 | CONFIG_EARLY_PRINTK=y | ||
88 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
89 | # CONFIG_CRYPTO_HW is not set | ||
90 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/edb7211_defconfig b/arch/arm/configs/edb7211_defconfig deleted file mode 100644 index d52ded350a12..000000000000 --- a/arch/arm/configs/edb7211_defconfig +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_EXPERT=y | ||
6 | # CONFIG_HOTPLUG is not set | ||
7 | CONFIG_ARCH_CLPS711X=y | ||
8 | CONFIG_ARCH_EDB7211=y | ||
9 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
10 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
11 | CONFIG_NET=y | ||
12 | CONFIG_PACKET=y | ||
13 | CONFIG_UNIX=y | ||
14 | CONFIG_INET=y | ||
15 | # CONFIG_IPV6 is not set | ||
16 | CONFIG_BLK_DEV_RAM=y | ||
17 | CONFIG_NETDEVICES=y | ||
18 | # CONFIG_INPUT is not set | ||
19 | CONFIG_SERIO_LIBPS2=y | ||
20 | # CONFIG_VT is not set | ||
21 | CONFIG_SERIAL_CLPS711X=y | ||
22 | CONFIG_SERIAL_CLPS711X_CONSOLE=y | ||
23 | CONFIG_EXT2_FS=y | ||
24 | CONFIG_MINIX_FS=y | ||
25 | CONFIG_PARTITION_ADVANCED=y | ||
26 | # CONFIG_MSDOS_PARTITION is not set | ||
27 | CONFIG_DEBUG_USER=y | ||
diff --git a/arch/arm/configs/fortunet_defconfig b/arch/arm/configs/fortunet_defconfig deleted file mode 100644 index 840fced7529f..000000000000 --- a/arch/arm/configs/fortunet_defconfig +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_EXPERT=y | ||
6 | # CONFIG_HOTPLUG is not set | ||
7 | CONFIG_ARCH_CLPS711X=y | ||
8 | CONFIG_ARCH_FORTUNET=y | ||
9 | # CONFIG_ARM_THUMB is not set | ||
10 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
11 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
12 | CONFIG_FPE_FASTFPE=y | ||
13 | CONFIG_BINFMT_AOUT=y | ||
14 | CONFIG_NET=y | ||
15 | CONFIG_UNIX=y | ||
16 | CONFIG_MTD=y | ||
17 | CONFIG_MTD_CHAR=y | ||
18 | CONFIG_MTD_BLOCK=y | ||
19 | CONFIG_MTD_CFI=y | ||
20 | CONFIG_MTD_CFI_INTELEXT=y | ||
21 | CONFIG_BLK_DEV_RAM=y | ||
22 | # CONFIG_INPUT is not set | ||
23 | # CONFIG_SERIO is not set | ||
24 | # CONFIG_VT is not set | ||
25 | CONFIG_SERIAL_CLPS711X=y | ||
26 | CONFIG_SERIAL_CLPS711X_CONSOLE=y | ||
27 | CONFIG_EXT2_FS=y | ||
28 | CONFIG_DEBUG_USER=y | ||
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 53382b6c8bb4..f79b55c512d0 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
@@ -69,6 +69,8 @@ CONFIG_SERIAL_SH_SCI=y | |||
69 | CONFIG_SERIAL_SH_SCI_NR_UARTS=6 | 69 | CONFIG_SERIAL_SH_SCI_NR_UARTS=6 |
70 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 70 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
71 | # CONFIG_HW_RANDOM is not set | 71 | # CONFIG_HW_RANDOM is not set |
72 | CONFIG_I2C=y | ||
73 | CONFIG_I2C_RCAR=y | ||
72 | CONFIG_GPIO_SYSFS=y | 74 | CONFIG_GPIO_SYSFS=y |
73 | # CONFIG_HWMON is not set | 75 | # CONFIG_HWMON is not set |
74 | CONFIG_THERMAL=y | 76 | CONFIG_THERMAL=y |
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index e2184f6c20b3..a7827fd0616f 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig | |||
@@ -80,6 +80,10 @@ CONFIG_RFKILL_GPIO=y | |||
80 | CONFIG_DEVTMPFS=y | 80 | CONFIG_DEVTMPFS=y |
81 | CONFIG_DEVTMPFS_MOUNT=y | 81 | CONFIG_DEVTMPFS_MOUNT=y |
82 | # CONFIG_FIRMWARE_IN_KERNEL is not set | 82 | # CONFIG_FIRMWARE_IN_KERNEL is not set |
83 | CONFIG_CMA=y | ||
84 | CONFIG_MTD=y | ||
85 | CONFIG_MTD_CHAR=y | ||
86 | CONFIG_MTD_M25P80=y | ||
83 | CONFIG_PROC_DEVICETREE=y | 87 | CONFIG_PROC_DEVICETREE=y |
84 | CONFIG_BLK_DEV_LOOP=y | 88 | CONFIG_BLK_DEV_LOOP=y |
85 | CONFIG_AD525X_DPOT=y | 89 | CONFIG_AD525X_DPOT=y |
@@ -98,12 +102,12 @@ CONFIG_USB_PEGASUS=y | |||
98 | CONFIG_USB_USBNET=y | 102 | CONFIG_USB_USBNET=y |
99 | CONFIG_USB_NET_SMSC75XX=y | 103 | CONFIG_USB_NET_SMSC75XX=y |
100 | CONFIG_USB_NET_SMSC95XX=y | 104 | CONFIG_USB_NET_SMSC95XX=y |
105 | CONFIG_BRCMFMAC=m | ||
101 | CONFIG_RT2X00=y | 106 | CONFIG_RT2X00=y |
102 | CONFIG_RT2800USB=m | 107 | CONFIG_RT2800USB=m |
103 | CONFIG_INPUT_EVDEV=y | 108 | CONFIG_INPUT_EVDEV=y |
104 | CONFIG_INPUT_MISC=y | 109 | CONFIG_INPUT_MISC=y |
105 | CONFIG_INPUT_MPU3050=y | 110 | CONFIG_INPUT_MPU3050=y |
106 | # CONFIG_VT is not set | ||
107 | # CONFIG_LEGACY_PTYS is not set | 111 | # CONFIG_LEGACY_PTYS is not set |
108 | # CONFIG_DEVKMEM is not set | 112 | # CONFIG_DEVKMEM is not set |
109 | CONFIG_SERIAL_8250=y | 113 | CONFIG_SERIAL_8250=y |
@@ -116,7 +120,8 @@ CONFIG_I2C_MUX=y | |||
116 | CONFIG_I2C_MUX_PINCTRL=y | 120 | CONFIG_I2C_MUX_PINCTRL=y |
117 | CONFIG_I2C_TEGRA=y | 121 | CONFIG_I2C_TEGRA=y |
118 | CONFIG_SPI=y | 122 | CONFIG_SPI=y |
119 | CONFIG_SPI_TEGRA=y | 123 | CONFIG_SPI_TEGRA20_SFLASH=y |
124 | CONFIG_SPI_TEGRA20_SLINK=y | ||
120 | CONFIG_GPIO_PCA953X_IRQ=y | 125 | CONFIG_GPIO_PCA953X_IRQ=y |
121 | CONFIG_GPIO_TPS6586X=y | 126 | CONFIG_GPIO_TPS6586X=y |
122 | CONFIG_GPIO_TPS65910=y | 127 | CONFIG_GPIO_TPS65910=y |
@@ -138,6 +143,15 @@ CONFIG_MEDIA_SUPPORT=y | |||
138 | CONFIG_MEDIA_CAMERA_SUPPORT=y | 143 | CONFIG_MEDIA_CAMERA_SUPPORT=y |
139 | CONFIG_MEDIA_USB_SUPPORT=y | 144 | CONFIG_MEDIA_USB_SUPPORT=y |
140 | CONFIG_USB_VIDEO_CLASS=m | 145 | CONFIG_USB_VIDEO_CLASS=m |
146 | CONFIG_DRM=y | ||
147 | CONFIG_DRM_TEGRA=y | ||
148 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
149 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
150 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
151 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
152 | CONFIG_BACKLIGHT_PWM=y | ||
153 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
154 | CONFIG_LOGO=y | ||
141 | CONFIG_SOUND=y | 155 | CONFIG_SOUND=y |
142 | CONFIG_SND=y | 156 | CONFIG_SND=y |
143 | # CONFIG_SND_SUPPORT_OLD_API is not set | 157 | # CONFIG_SND_SUPPORT_OLD_API is not set |
@@ -205,6 +219,9 @@ CONFIG_EXT4_FS=y | |||
205 | CONFIG_VFAT_FS=y | 219 | CONFIG_VFAT_FS=y |
206 | CONFIG_TMPFS=y | 220 | CONFIG_TMPFS=y |
207 | CONFIG_TMPFS_POSIX_ACL=y | 221 | CONFIG_TMPFS_POSIX_ACL=y |
222 | CONFIG_SQUASHFS=y | ||
223 | CONFIG_SQUASHFS_LZO=y | ||
224 | CONFIG_SQUASHFS_XZ=y | ||
208 | CONFIG_NFS_FS=y | 225 | CONFIG_NFS_FS=y |
209 | CONFIG_ROOT_NFS=y | 226 | CONFIG_ROOT_NFS=y |
210 | CONFIG_NLS_CODEPAGE_437=y | 227 | CONFIG_NLS_CODEPAGE_437=y |
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h index afd7e916472f..6636430dd0e6 100644 --- a/arch/arm/include/asm/hardware/sp810.h +++ b/arch/arm/include/asm/hardware/sp810.h | |||
@@ -50,12 +50,6 @@ | |||
50 | #define SCPCELLID2 0xFF8 | 50 | #define SCPCELLID2 0xFF8 |
51 | #define SCPCELLID3 0xFFC | 51 | #define SCPCELLID3 0xFFC |
52 | 52 | ||
53 | #define SCCTRL_TIMEREN0SEL_REFCLK (0 << 15) | ||
54 | #define SCCTRL_TIMEREN0SEL_TIMCLK (1 << 15) | ||
55 | |||
56 | #define SCCTRL_TIMEREN1SEL_REFCLK (0 << 17) | ||
57 | #define SCCTRL_TIMEREN1SEL_TIMCLK (1 << 17) | ||
58 | |||
59 | #define SCCTRL_TIMERENnSEL_SHIFT(n) (15 + ((n) * 2)) | 53 | #define SCCTRL_TIMERENnSEL_SHIFT(n) (15 + ((n) * 2)) |
60 | 54 | ||
61 | static inline void sysctl_soft_reset(void __iomem *base) | 55 | static inline void sysctl_soft_reset(void __iomem *base) |
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 195ac2f9d3d3..2fe141fcc8d6 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -40,6 +40,13 @@ extern void iotable_init(struct map_desc *, int); | |||
40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, | 40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, |
41 | void *caller); | 41 | void *caller); |
42 | 42 | ||
43 | #ifdef CONFIG_DEBUG_LL | ||
44 | extern void debug_ll_addr(unsigned long *paddr, unsigned long *vaddr); | ||
45 | extern void debug_ll_io_init(void); | ||
46 | #else | ||
47 | static inline void debug_ll_io_init(void) {} | ||
48 | #endif | ||
49 | |||
43 | struct mem_type; | 50 | struct mem_type; |
44 | extern const struct mem_type *get_mem_type(unsigned int type); | 51 | extern const struct mem_type *get_mem_type(unsigned int type); |
45 | /* | 52 | /* |
diff --git a/arch/arm/include/debug/sunxi.S b/arch/arm/include/debug/sunxi.S new file mode 100644 index 000000000000..04eb56d5db2c --- /dev/null +++ b/arch/arm/include/debug/sunxi.S | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Allwinner A1X SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #if defined(CONFIG_DEBUG_SUNXI_UART0) | ||
14 | #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28000 | ||
15 | #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28000 | ||
16 | #elif defined(CONFIG_DEBUG_SUNXI_UART1) | ||
17 | #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400 | ||
18 | #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400 | ||
19 | #endif | ||
20 | |||
21 | .macro addruart, rp, rv, tmp | ||
22 | ldr \rp, =SUNXI_UART_DEBUG_PHYS_BASE | ||
23 | ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE | ||
24 | .endm | ||
25 | |||
26 | #define UART_SHIFT 2 | ||
27 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index 66f711b2e0e8..6809200c31fb 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
@@ -100,6 +100,13 @@ ENTRY(printch) | |||
100 | b 1b | 100 | b 1b |
101 | ENDPROC(printch) | 101 | ENDPROC(printch) |
102 | 102 | ||
103 | ENTRY(debug_ll_addr) | ||
104 | addruart r2, r3, ip | ||
105 | str r2, [r0] | ||
106 | str r3, [r1] | ||
107 | mov pc, lr | ||
108 | ENDPROC(debug_ll_addr) | ||
109 | |||
103 | #else | 110 | #else |
104 | 111 | ||
105 | ENTRY(printascii) | 112 | ENTRY(printascii) |
@@ -119,4 +126,11 @@ ENTRY(printch) | |||
119 | mov pc, lr | 126 | mov pc, lr |
120 | ENDPROC(printch) | 127 | ENDPROC(printch) |
121 | 128 | ||
129 | ENTRY(debug_ll_addr) | ||
130 | mov r2, #0 | ||
131 | str r2, [r0] | ||
132 | str r2, [r1] | ||
133 | mov pc, lr | ||
134 | ENDPROC(debug_ll_addr) | ||
135 | |||
122 | #endif | 136 | #endif |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index ff07879ad95d..49f335d301ba 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -390,10 +390,8 @@ void __init twd_local_timer_of_register(void) | |||
390 | int err; | 390 | int err; |
391 | 391 | ||
392 | np = of_find_matching_node(NULL, twd_of_match); | 392 | np = of_find_matching_node(NULL, twd_of_match); |
393 | if (!np) { | 393 | if (!np) |
394 | err = -ENODEV; | 394 | return; |
395 | goto out; | ||
396 | } | ||
397 | 395 | ||
398 | twd_ppi = irq_of_parse_and_map(np, 0); | 396 | twd_ppi = irq_of_parse_and_map(np, 0); |
399 | if (!twd_ppi) { | 397 | if (!twd_ppi) { |
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig new file mode 100644 index 000000000000..48705c10a0fe --- /dev/null +++ b/arch/arm/mach-bcm/Kconfig | |||
@@ -0,0 +1,19 @@ | |||
1 | config ARCH_BCM | ||
2 | bool "Broadcom SoC" if ARCH_MULTI_V7 | ||
3 | depends on MMU | ||
4 | select ARCH_REQUIRE_GPIOLIB | ||
5 | select ARM_ERRATA_754322 | ||
6 | select ARM_ERRATA_764369 if SMP | ||
7 | select ARM_GIC | ||
8 | select CPU_V7 | ||
9 | select GENERIC_CLOCKEVENTS | ||
10 | select GENERIC_GPIO | ||
11 | select GENERIC_TIME | ||
12 | select GPIO_BCM | ||
13 | select SPARSE_IRQ | ||
14 | select TICK_ONESHOT | ||
15 | help | ||
16 | This enables support for system based on Broadcom SoCs. | ||
17 | It currently supports the 'BCM281XX' family, which includes | ||
18 | BCM11130, BCM11140, BCM11351, BCM28145 and | ||
19 | BCM28155 variants. | ||
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile new file mode 100644 index 000000000000..bbf412261e5e --- /dev/null +++ b/arch/arm/mach-bcm/Makefile | |||
@@ -0,0 +1,13 @@ | |||
1 | # | ||
2 | # Copyright (C) 2012 Broadcom Corporation | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or | ||
5 | # modify it under the terms of the GNU General Public License as | ||
6 | # published by the Free Software Foundation version 2. | ||
7 | # | ||
8 | # This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | # kind, whether express or implied; without even the implied warranty | ||
10 | # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | obj-$(CONFIG_ARCH_BCM) := board_bcm.o | ||
diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c new file mode 100644 index 000000000000..3a62f1b1cabc --- /dev/null +++ b/arch/arm/mach-bcm/board_bcm.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | #include <linux/of_irq.h> | ||
15 | #include <linux/of_platform.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | |||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/hardware/gic.h> | ||
22 | |||
23 | #include <asm/mach/time.h> | ||
24 | |||
25 | static const struct of_device_id irq_match[] = { | ||
26 | {.compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
27 | {} | ||
28 | }; | ||
29 | |||
30 | static void timer_init(void) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | static struct sys_timer timer = { | ||
35 | .init = timer_init, | ||
36 | }; | ||
37 | |||
38 | static void __init init_irq(void) | ||
39 | { | ||
40 | of_irq_init(irq_match); | ||
41 | } | ||
42 | |||
43 | static void __init board_init(void) | ||
44 | { | ||
45 | of_platform_populate(NULL, of_default_bus_match_table, NULL, | ||
46 | &platform_bus); | ||
47 | } | ||
48 | |||
49 | static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; | ||
50 | |||
51 | DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") | ||
52 | .init_irq = init_irq, | ||
53 | .timer = &timer, | ||
54 | .init_machine = board_init, | ||
55 | .dt_compat = bcm11351_dt_compat, | ||
56 | .handle_irq = gic_handle_irq, | ||
57 | MACHINE_END | ||
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index 53e3842c9330..f0d739f4b7a3 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -12,8 +12,10 @@ | |||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/delay.h> | ||
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/irqchip/bcm2835.h> | 17 | #include <linux/irqchip/bcm2835.h> |
18 | #include <linux/of_address.h> | ||
17 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
18 | #include <linux/bcm2835_timer.h> | 20 | #include <linux/bcm2835_timer.h> |
19 | #include <linux/clk/bcm2835.h> | 21 | #include <linux/clk/bcm2835.h> |
@@ -23,6 +25,48 @@ | |||
23 | 25 | ||
24 | #include <mach/bcm2835_soc.h> | 26 | #include <mach/bcm2835_soc.h> |
25 | 27 | ||
28 | #define PM_RSTC 0x1c | ||
29 | #define PM_WDOG 0x24 | ||
30 | |||
31 | #define PM_PASSWORD 0x5a000000 | ||
32 | #define PM_RSTC_WRCFG_MASK 0x00000030 | ||
33 | #define PM_RSTC_WRCFG_FULL_RESET 0x00000020 | ||
34 | |||
35 | static void __iomem *wdt_regs; | ||
36 | |||
37 | /* | ||
38 | * The machine restart method can be called from an atomic context so we won't | ||
39 | * be able to ioremap the regs then. | ||
40 | */ | ||
41 | static void bcm2835_setup_restart(void) | ||
42 | { | ||
43 | struct device_node *np = of_find_compatible_node(NULL, NULL, | ||
44 | "brcm,bcm2835-pm-wdt"); | ||
45 | if (WARN(!np, "unable to setup watchdog restart")) | ||
46 | return; | ||
47 | |||
48 | wdt_regs = of_iomap(np, 0); | ||
49 | WARN(!wdt_regs, "failed to remap watchdog regs"); | ||
50 | } | ||
51 | |||
52 | static void bcm2835_restart(char mode, const char *cmd) | ||
53 | { | ||
54 | u32 val; | ||
55 | |||
56 | if (!wdt_regs) | ||
57 | return; | ||
58 | |||
59 | /* use a timeout of 10 ticks (~150us) */ | ||
60 | writel_relaxed(10 | PM_PASSWORD, wdt_regs + PM_WDOG); | ||
61 | val = readl_relaxed(wdt_regs + PM_RSTC); | ||
62 | val &= ~PM_RSTC_WRCFG_MASK; | ||
63 | val |= PM_PASSWORD | PM_RSTC_WRCFG_FULL_RESET; | ||
64 | writel_relaxed(val, wdt_regs + PM_RSTC); | ||
65 | |||
66 | /* No sleeping, possibly atomic. */ | ||
67 | mdelay(1); | ||
68 | } | ||
69 | |||
26 | static struct map_desc io_map __initdata = { | 70 | static struct map_desc io_map __initdata = { |
27 | .virtual = BCM2835_PERIPH_VIRT, | 71 | .virtual = BCM2835_PERIPH_VIRT, |
28 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), | 72 | .pfn = __phys_to_pfn(BCM2835_PERIPH_PHYS), |
@@ -39,6 +83,7 @@ static void __init bcm2835_init(void) | |||
39 | { | 83 | { |
40 | int ret; | 84 | int ret; |
41 | 85 | ||
86 | bcm2835_setup_restart(); | ||
42 | bcm2835_init_clocks(); | 87 | bcm2835_init_clocks(); |
43 | 88 | ||
44 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, | 89 | ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, |
@@ -60,5 +105,6 @@ DT_MACHINE_START(BCM2835, "BCM2835") | |||
60 | .handle_irq = bcm2835_handle_irq, | 105 | .handle_irq = bcm2835_handle_irq, |
61 | .init_machine = bcm2835_init, | 106 | .init_machine = bcm2835_init, |
62 | .timer = &bcm2835_timer, | 107 | .timer = &bcm2835_timer, |
108 | .restart = bcm2835_restart, | ||
63 | .dt_compat = bcm2835_compat | 109 | .dt_compat = bcm2835_compat |
64 | MACHINE_END | 110 | MACHINE_END |
diff --git a/arch/arm/mach-bcm2835/include/mach/gpio.h b/arch/arm/mach-bcm2835/include/mach/gpio.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/arch/arm/mach-bcm2835/include/mach/gpio.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index 263242da2cb8..2d00165e85ec 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig | |||
@@ -10,7 +10,6 @@ config ARCH_AUTCPU12 | |||
10 | 10 | ||
11 | config ARCH_CDB89712 | 11 | config ARCH_CDB89712 |
12 | bool "CDB89712" | 12 | bool "CDB89712" |
13 | select ISA | ||
14 | help | 13 | help |
15 | This is an evaluation board from Cirrus for the CS89712 processor. | 14 | This is an evaluation board from Cirrus for the CS89712 processor. |
16 | The board includes 2 serial ports, Ethernet, IRDA, and expansion | 15 | The board includes 2 serial ports, Ethernet, IRDA, and expansion |
@@ -25,7 +24,6 @@ config ARCH_EDB7211 | |||
25 | bool "EDB7211" | 24 | bool "EDB7211" |
26 | select ARCH_SELECT_MEMORY_MODEL | 25 | select ARCH_SELECT_MEMORY_MODEL |
27 | select ARCH_SPARSEMEM_ENABLE | 26 | select ARCH_SPARSEMEM_ENABLE |
28 | select ISA | ||
29 | help | 27 | help |
30 | Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 | 28 | Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 |
31 | evaluation board. | 29 | evaluation board. |
diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile index 6da6940b3656..992995af666a 100644 --- a/arch/arm/mach-clps711x/Makefile +++ b/arch/arm/mach-clps711x/Makefile | |||
@@ -9,9 +9,9 @@ obj-m := | |||
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
11 | 11 | ||
12 | obj-$(CONFIG_ARCH_AUTCPU12) += autcpu12.o | 12 | obj-$(CONFIG_ARCH_AUTCPU12) += board-autcpu12.o |
13 | obj-$(CONFIG_ARCH_CDB89712) += cdb89712.o | 13 | obj-$(CONFIG_ARCH_CDB89712) += board-cdb89712.o |
14 | obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o | 14 | obj-$(CONFIG_ARCH_CLEP7312) += board-clep7312.o |
15 | obj-$(CONFIG_ARCH_EDB7211) += edb7211-arch.o edb7211-mm.o | 15 | obj-$(CONFIG_ARCH_EDB7211) += board-edb7211.o |
16 | obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o | 16 | obj-$(CONFIG_ARCH_FORTUNET) += board-fortunet.o |
17 | obj-$(CONFIG_ARCH_P720T) += p720t.o | 17 | obj-$(CONFIG_ARCH_P720T) += board-p720t.o |
diff --git a/arch/arm/mach-clps711x/Makefile.boot b/arch/arm/mach-clps711x/Makefile.boot index 9398e859b5af..eba77d35a615 100644 --- a/arch/arm/mach-clps711x/Makefile.boot +++ b/arch/arm/mach-clps711x/Makefile.boot | |||
@@ -1,5 +1,4 @@ | |||
1 | # The standard locations for stuff on CLPS711x type processors | 1 | # The standard locations for stuff on CLPS711x type processors |
2 | zreladdr-y += 0xc0028000 | ||
3 | params_phys-y := 0xc0000100 | 2 | params_phys-y := 0xc0000100 |
4 | # Should probably have some agreement on these... | 3 | # Should probably have some agreement on these... |
5 | initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 | 4 | initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 |
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c deleted file mode 100644 index 32871918bb6e..000000000000 --- a/arch/arm/mach-clps711x/autcpu12.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/autcpu12.c | ||
3 | * | ||
4 | * (c) 2001 Thomas Gleixner, autronix automation <gleixner@autronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/sizes.h> | ||
31 | #include <asm/setup.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/pgtable.h> | ||
35 | #include <asm/page.h> | ||
36 | |||
37 | #include <asm/mach/map.h> | ||
38 | #include <mach/autcpu12.h> | ||
39 | |||
40 | #include "common.h" | ||
41 | |||
42 | /* | ||
43 | * The on-chip registers are given a size of 1MB so that a section can | ||
44 | * be used to map them; this saves a page table. This is the place to | ||
45 | * add mappings for ROM, expansion memory, PCMCIA, etc. (if static | ||
46 | * mappings are chosen for those areas). | ||
47 | * | ||
48 | */ | ||
49 | |||
50 | static struct map_desc autcpu12_io_desc[] __initdata = { | ||
51 | /* memory-mapped extra io and CS8900A Ethernet chip */ | ||
52 | /* ethernet chip */ | ||
53 | { | ||
54 | .virtual = AUTCPU12_VIRT_CS8900A, | ||
55 | .pfn = __phys_to_pfn(AUTCPU12_PHYS_CS8900A), | ||
56 | .length = SZ_1M, | ||
57 | .type = MT_DEVICE | ||
58 | } | ||
59 | }; | ||
60 | |||
61 | void __init autcpu12_map_io(void) | ||
62 | { | ||
63 | clps711x_map_io(); | ||
64 | iotable_init(autcpu12_io_desc, ARRAY_SIZE(autcpu12_io_desc)); | ||
65 | } | ||
66 | |||
67 | static struct resource autcpu12_nvram_resource[] __initdata = { | ||
68 | DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), | ||
69 | }; | ||
70 | |||
71 | static struct platform_device autcpu12_nvram_pdev __initdata = { | ||
72 | .name = "autcpu12_nvram", | ||
73 | .id = -1, | ||
74 | .resource = autcpu12_nvram_resource, | ||
75 | .num_resources = ARRAY_SIZE(autcpu12_nvram_resource), | ||
76 | }; | ||
77 | |||
78 | static void __init autcpu12_init(void) | ||
79 | { | ||
80 | platform_device_register(&autcpu12_nvram_pdev); | ||
81 | } | ||
82 | |||
83 | MACHINE_START(AUTCPU12, "autronix autcpu12") | ||
84 | /* Maintainer: Thomas Gleixner */ | ||
85 | .atag_offset = 0x20000, | ||
86 | .init_machine = autcpu12_init, | ||
87 | .map_io = autcpu12_map_io, | ||
88 | .init_irq = clps711x_init_irq, | ||
89 | .timer = &clps711x_timer, | ||
90 | .restart = clps711x_restart, | ||
91 | MACHINE_END | ||
92 | |||
diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c new file mode 100644 index 000000000000..3fbf43f72589 --- /dev/null +++ b/arch/arm/mach-clps711x/board-autcpu12.c | |||
@@ -0,0 +1,179 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/autcpu12.c | ||
3 | * | ||
4 | * (c) 2001 Thomas Gleixner, autronix automation <gleixner@autronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/ioport.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | #include <linux/mtd/partitions.h> | ||
30 | #include <linux/mtd/nand-gpio.h> | ||
31 | #include <linux/platform_device.h> | ||
32 | #include <linux/basic_mmio_gpio.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <asm/sizes.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/pgtable.h> | ||
40 | #include <asm/page.h> | ||
41 | |||
42 | #include <asm/mach/map.h> | ||
43 | #include <mach/autcpu12.h> | ||
44 | |||
45 | #include "common.h" | ||
46 | |||
47 | #define AUTCPU12_CS8900_BASE (CS2_PHYS_BASE + 0x300) | ||
48 | #define AUTCPU12_CS8900_IRQ (IRQ_EINT3) | ||
49 | |||
50 | #define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000) | ||
51 | #define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10) | ||
52 | |||
53 | #define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO) | ||
54 | #define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */ | ||
55 | #define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2) | ||
56 | #define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3) | ||
57 | #define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3) | ||
58 | |||
59 | static struct resource autcpu12_cs8900_resource[] __initdata = { | ||
60 | DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), | ||
61 | DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), | ||
62 | }; | ||
63 | |||
64 | static struct resource autcpu12_nvram_resource[] __initdata = { | ||
65 | DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), | ||
66 | }; | ||
67 | |||
68 | static struct platform_device autcpu12_nvram_pdev __initdata = { | ||
69 | .name = "autcpu12_nvram", | ||
70 | .id = -1, | ||
71 | .resource = autcpu12_nvram_resource, | ||
72 | .num_resources = ARRAY_SIZE(autcpu12_nvram_resource), | ||
73 | }; | ||
74 | |||
75 | static struct resource autcpu12_nand_resource[] __initdata = { | ||
76 | DEFINE_RES_MEM(AUTCPU12_SMC_BASE, SZ_16), | ||
77 | }; | ||
78 | |||
79 | static struct mtd_partition autcpu12_nand_parts[] __initdata = { | ||
80 | { | ||
81 | .name = "Flash partition 1", | ||
82 | .offset = 0, | ||
83 | .size = SZ_8M, | ||
84 | }, | ||
85 | { | ||
86 | .name = "Flash partition 2", | ||
87 | .offset = MTDPART_OFS_APPEND, | ||
88 | .size = MTDPART_SIZ_FULL, | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static void __init autcpu12_adjust_parts(struct gpio_nand_platdata *pdata, | ||
93 | size_t sz) | ||
94 | { | ||
95 | switch (sz) { | ||
96 | case SZ_16M: | ||
97 | case SZ_32M: | ||
98 | break; | ||
99 | case SZ_64M: | ||
100 | case SZ_128M: | ||
101 | pdata->parts[0].size = SZ_16M; | ||
102 | break; | ||
103 | default: | ||
104 | pr_warn("Unsupported SmartMedia device size %u\n", sz); | ||
105 | break; | ||
106 | } | ||
107 | } | ||
108 | |||
109 | static struct gpio_nand_platdata autcpu12_nand_pdata __initdata = { | ||
110 | .gpio_rdy = AUTCPU12_SMC_RDY, | ||
111 | .gpio_nce = AUTCPU12_SMC_NCE, | ||
112 | .gpio_ale = AUTCPU12_SMC_ALE, | ||
113 | .gpio_cle = AUTCPU12_SMC_CLE, | ||
114 | .gpio_nwp = -1, | ||
115 | .chip_delay = 20, | ||
116 | .parts = autcpu12_nand_parts, | ||
117 | .num_parts = ARRAY_SIZE(autcpu12_nand_parts), | ||
118 | .adjust_parts = autcpu12_adjust_parts, | ||
119 | }; | ||
120 | |||
121 | static struct platform_device autcpu12_nand_pdev __initdata = { | ||
122 | .name = "gpio-nand", | ||
123 | .id = -1, | ||
124 | .resource = autcpu12_nand_resource, | ||
125 | .num_resources = ARRAY_SIZE(autcpu12_nand_resource), | ||
126 | .dev = { | ||
127 | .platform_data = &autcpu12_nand_pdata, | ||
128 | }, | ||
129 | }; | ||
130 | |||
131 | static struct resource autcpu12_mmgpio_resource[] __initdata = { | ||
132 | DEFINE_RES_MEM_NAMED(AUTCPU12_SMC_SEL_BASE, SZ_1, "dat"), | ||
133 | }; | ||
134 | |||
135 | static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = { | ||
136 | .base = AUTCPU12_MMGPIO_BASE, | ||
137 | .ngpio = 8, | ||
138 | }; | ||
139 | |||
140 | static struct platform_device autcpu12_mmgpio_pdev __initdata = { | ||
141 | .name = "basic-mmio-gpio", | ||
142 | .id = -1, | ||
143 | .resource = autcpu12_mmgpio_resource, | ||
144 | .num_resources = ARRAY_SIZE(autcpu12_mmgpio_resource), | ||
145 | .dev = { | ||
146 | .platform_data = &autcpu12_mmgpio_pdata, | ||
147 | }, | ||
148 | }; | ||
149 | |||
150 | static void __init autcpu12_init(void) | ||
151 | { | ||
152 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | ||
153 | platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource, | ||
154 | ARRAY_SIZE(autcpu12_cs8900_resource)); | ||
155 | platform_device_register(&autcpu12_mmgpio_pdev); | ||
156 | platform_device_register(&autcpu12_nvram_pdev); | ||
157 | } | ||
158 | |||
159 | static void __init autcpu12_init_late(void) | ||
160 | { | ||
161 | if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) { | ||
162 | /* We are need both drivers to handle NAND */ | ||
163 | platform_device_register(&autcpu12_nand_pdev); | ||
164 | } | ||
165 | } | ||
166 | |||
167 | MACHINE_START(AUTCPU12, "autronix autcpu12") | ||
168 | /* Maintainer: Thomas Gleixner */ | ||
169 | .atag_offset = 0x20000, | ||
170 | .nr_irqs = CLPS711X_NR_IRQS, | ||
171 | .map_io = clps711x_map_io, | ||
172 | .init_irq = clps711x_init_irq, | ||
173 | .timer = &clps711x_timer, | ||
174 | .init_machine = autcpu12_init, | ||
175 | .init_late = autcpu12_init_late, | ||
176 | .handle_irq = clps711x_handle_irq, | ||
177 | .restart = clps711x_restart, | ||
178 | MACHINE_END | ||
179 | |||
diff --git a/arch/arm/mach-clps711x/board-cdb89712.c b/arch/arm/mach-clps711x/board-cdb89712.c new file mode 100644 index 000000000000..60900ddf97c9 --- /dev/null +++ b/arch/arm/mach-clps711x/board-cdb89712.c | |||
@@ -0,0 +1,147 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/cdb89712.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | |||
29 | #include <linux/mtd/physmap.h> | ||
30 | #include <linux/mtd/plat-ram.h> | ||
31 | #include <linux/mtd/partitions.h> | ||
32 | |||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/pgtable.h> | ||
35 | #include <asm/page.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/mach/map.h> | ||
40 | |||
41 | #include "common.h" | ||
42 | |||
43 | #define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300) | ||
44 | #define CDB89712_CS8900_IRQ (IRQ_EINT3) | ||
45 | |||
46 | static struct resource cdb89712_cs8900_resource[] __initdata = { | ||
47 | DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K), | ||
48 | DEFINE_RES_IRQ(CDB89712_CS8900_IRQ), | ||
49 | }; | ||
50 | |||
51 | static struct mtd_partition cdb89712_flash_partitions[] __initdata = { | ||
52 | { | ||
53 | .name = "Flash", | ||
54 | .offset = 0, | ||
55 | .size = MTDPART_SIZ_FULL, | ||
56 | }, | ||
57 | }; | ||
58 | |||
59 | static struct physmap_flash_data cdb89712_flash_pdata __initdata = { | ||
60 | .width = 4, | ||
61 | .probe_type = "map_rom", | ||
62 | .parts = cdb89712_flash_partitions, | ||
63 | .nr_parts = ARRAY_SIZE(cdb89712_flash_partitions), | ||
64 | }; | ||
65 | |||
66 | static struct resource cdb89712_flash_resources[] __initdata = { | ||
67 | DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M), | ||
68 | }; | ||
69 | |||
70 | static struct platform_device cdb89712_flash_pdev __initdata = { | ||
71 | .name = "physmap-flash", | ||
72 | .id = 0, | ||
73 | .resource = cdb89712_flash_resources, | ||
74 | .num_resources = ARRAY_SIZE(cdb89712_flash_resources), | ||
75 | .dev = { | ||
76 | .platform_data = &cdb89712_flash_pdata, | ||
77 | }, | ||
78 | }; | ||
79 | |||
80 | static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = { | ||
81 | { | ||
82 | .name = "BootROM", | ||
83 | .offset = 0, | ||
84 | .size = MTDPART_SIZ_FULL, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | static struct physmap_flash_data cdb89712_bootrom_pdata __initdata = { | ||
89 | .width = 4, | ||
90 | .probe_type = "map_rom", | ||
91 | .parts = cdb89712_bootrom_partitions, | ||
92 | .nr_parts = ARRAY_SIZE(cdb89712_bootrom_partitions), | ||
93 | }; | ||
94 | |||
95 | static struct resource cdb89712_bootrom_resources[] __initdata = { | ||
96 | DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM | | ||
97 | IORESOURCE_CACHEABLE | IORESOURCE_READONLY), | ||
98 | }; | ||
99 | |||
100 | static struct platform_device cdb89712_bootrom_pdev __initdata = { | ||
101 | .name = "physmap-flash", | ||
102 | .id = 1, | ||
103 | .resource = cdb89712_bootrom_resources, | ||
104 | .num_resources = ARRAY_SIZE(cdb89712_bootrom_resources), | ||
105 | .dev = { | ||
106 | .platform_data = &cdb89712_bootrom_pdata, | ||
107 | }, | ||
108 | }; | ||
109 | |||
110 | static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = { | ||
111 | .bankwidth = 4, | ||
112 | }; | ||
113 | |||
114 | static struct resource cdb89712_sram_resources[] __initdata = { | ||
115 | DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE), | ||
116 | }; | ||
117 | |||
118 | static struct platform_device cdb89712_sram_pdev __initdata = { | ||
119 | .name = "mtd-ram", | ||
120 | .id = 0, | ||
121 | .resource = cdb89712_sram_resources, | ||
122 | .num_resources = ARRAY_SIZE(cdb89712_sram_resources), | ||
123 | .dev = { | ||
124 | .platform_data = &cdb89712_sram_pdata, | ||
125 | }, | ||
126 | }; | ||
127 | |||
128 | static void __init cdb89712_init(void) | ||
129 | { | ||
130 | platform_device_register(&cdb89712_flash_pdev); | ||
131 | platform_device_register(&cdb89712_bootrom_pdev); | ||
132 | platform_device_register(&cdb89712_sram_pdev); | ||
133 | platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource, | ||
134 | ARRAY_SIZE(cdb89712_cs8900_resource)); | ||
135 | } | ||
136 | |||
137 | MACHINE_START(CDB89712, "Cirrus-CDB89712") | ||
138 | /* Maintainer: Ray Lehtiniemi */ | ||
139 | .atag_offset = 0x100, | ||
140 | .nr_irqs = CLPS711X_NR_IRQS, | ||
141 | .map_io = clps711x_map_io, | ||
142 | .init_irq = clps711x_init_irq, | ||
143 | .timer = &clps711x_timer, | ||
144 | .init_machine = cdb89712_init, | ||
145 | .handle_irq = clps711x_handle_irq, | ||
146 | .restart = clps711x_restart, | ||
147 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/clep7312.c b/arch/arm/mach-clps711x/board-clep7312.c index dbc7842639dc..0b32a487183b 100644 --- a/arch/arm/mach-clps711x/clep7312.c +++ b/arch/arm/mach-clps711x/board-clep7312.c | |||
@@ -33,14 +33,14 @@ fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi) | |||
33 | mi->bank[0].size = 0x01000000; | 33 | mi->bank[0].size = 0x01000000; |
34 | } | 34 | } |
35 | 35 | ||
36 | |||
37 | MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") | 36 | MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") |
38 | /* Maintainer: Nobody */ | 37 | /* Maintainer: Nobody */ |
39 | .atag_offset = 0x0100, | 38 | .atag_offset = 0x0100, |
39 | .nr_irqs = CLPS711X_NR_IRQS, | ||
40 | .fixup = fixup_clep7312, | 40 | .fixup = fixup_clep7312, |
41 | .map_io = clps711x_map_io, | 41 | .map_io = clps711x_map_io, |
42 | .init_irq = clps711x_init_irq, | 42 | .init_irq = clps711x_init_irq, |
43 | .timer = &clps711x_timer, | 43 | .timer = &clps711x_timer, |
44 | .handle_irq = clps711x_handle_irq, | ||
44 | .restart = clps711x_restart, | 45 | .restart = clps711x_restart, |
45 | MACHINE_END | 46 | MACHINE_END |
46 | |||
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c new file mode 100644 index 000000000000..71aa5cf2c0d3 --- /dev/null +++ b/arch/arm/mach-clps711x/board-edb7211.c | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #include <linux/init.h> | ||
11 | #include <linux/gpio.h> | ||
12 | #include <linux/delay.h> | ||
13 | #include <linux/memblock.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/backlight.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/mtd/partitions.h> | ||
21 | |||
22 | #include <asm/setup.h> | ||
23 | #include <asm/mach/map.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | |||
27 | #include <video/platform_lcd.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | |||
31 | #include "common.h" | ||
32 | |||
33 | #define VIDEORAM_SIZE SZ_128K | ||
34 | |||
35 | #define EDB7211_LCD_DC_DC_EN CLPS711X_GPIO(3, 1) | ||
36 | #define EDB7211_LCDEN CLPS711X_GPIO(3, 2) | ||
37 | #define EDB7211_LCDBL CLPS711X_GPIO(3, 3) | ||
38 | |||
39 | #define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) | ||
40 | #define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) | ||
41 | #define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300) | ||
42 | #define EDB7211_CS8900_IRQ (IRQ_EINT3) | ||
43 | |||
44 | static struct resource edb7211_cs8900_resource[] __initdata = { | ||
45 | DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), | ||
46 | DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), | ||
47 | }; | ||
48 | |||
49 | static struct mtd_partition edb7211_flash_partitions[] __initdata = { | ||
50 | { | ||
51 | .name = "Flash", | ||
52 | .offset = 0, | ||
53 | .size = MTDPART_SIZ_FULL, | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | static struct physmap_flash_data edb7211_flash_pdata __initdata = { | ||
58 | .width = 4, | ||
59 | .parts = edb7211_flash_partitions, | ||
60 | .nr_parts = ARRAY_SIZE(edb7211_flash_partitions), | ||
61 | }; | ||
62 | |||
63 | static struct resource edb7211_flash_resources[] __initdata = { | ||
64 | DEFINE_RES_MEM(EDB7211_FLASH0_BASE, SZ_8M), | ||
65 | DEFINE_RES_MEM(EDB7211_FLASH1_BASE, SZ_8M), | ||
66 | }; | ||
67 | |||
68 | static struct platform_device edb7211_flash_pdev __initdata = { | ||
69 | .name = "physmap-flash", | ||
70 | .id = 0, | ||
71 | .resource = edb7211_flash_resources, | ||
72 | .num_resources = ARRAY_SIZE(edb7211_flash_resources), | ||
73 | .dev = { | ||
74 | .platform_data = &edb7211_flash_pdata, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static void edb7211_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | ||
79 | { | ||
80 | if (power) { | ||
81 | gpio_set_value(EDB7211_LCDEN, 1); | ||
82 | udelay(100); | ||
83 | gpio_set_value(EDB7211_LCD_DC_DC_EN, 1); | ||
84 | } else { | ||
85 | gpio_set_value(EDB7211_LCD_DC_DC_EN, 0); | ||
86 | udelay(100); | ||
87 | gpio_set_value(EDB7211_LCDEN, 0); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | static struct plat_lcd_data edb7211_lcd_power_pdata = { | ||
92 | .set_power = edb7211_lcd_power_set, | ||
93 | }; | ||
94 | |||
95 | static void edb7211_lcd_backlight_set_intensity(int intensity) | ||
96 | { | ||
97 | gpio_set_value(EDB7211_LCDBL, intensity); | ||
98 | } | ||
99 | |||
100 | static struct generic_bl_info edb7211_lcd_backlight_pdata = { | ||
101 | .name = "lcd-backlight.0", | ||
102 | .default_intensity = 0x01, | ||
103 | .max_intensity = 0x01, | ||
104 | .set_bl_intensity = edb7211_lcd_backlight_set_intensity, | ||
105 | }; | ||
106 | |||
107 | static struct gpio edb7211_gpios[] __initconst = { | ||
108 | { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, | ||
109 | { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, | ||
110 | { EDB7211_LCDBL, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT" }, | ||
111 | }; | ||
112 | |||
113 | static struct map_desc edb7211_io_desc[] __initdata = { | ||
114 | { /* Memory-mapped extra keyboard row */ | ||
115 | .virtual = IO_ADDRESS(EP7211_PHYS_EXTKBD), | ||
116 | .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), | ||
117 | .length = SZ_1M, | ||
118 | .type = MT_DEVICE, | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | void __init edb7211_map_io(void) | ||
123 | { | ||
124 | clps711x_map_io(); | ||
125 | iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc)); | ||
126 | } | ||
127 | |||
128 | /* Reserve screen memory region at the start of main system memory. */ | ||
129 | static void __init edb7211_reserve(void) | ||
130 | { | ||
131 | memblock_reserve(PHYS_OFFSET, VIDEORAM_SIZE); | ||
132 | } | ||
133 | |||
134 | static void __init | ||
135 | fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) | ||
136 | { | ||
137 | /* | ||
138 | * Bank start addresses are not present in the information | ||
139 | * passed in from the boot loader. We could potentially | ||
140 | * detect them, but instead we hard-code them. | ||
141 | * | ||
142 | * Banks sizes _are_ present in the param block, but we're | ||
143 | * not using that information yet. | ||
144 | */ | ||
145 | mi->bank[0].start = 0xc0000000; | ||
146 | mi->bank[0].size = SZ_8M; | ||
147 | mi->bank[1].start = 0xc1000000; | ||
148 | mi->bank[1].size = SZ_8M; | ||
149 | mi->nr_banks = 2; | ||
150 | } | ||
151 | |||
152 | static void __init edb7211_init(void) | ||
153 | { | ||
154 | gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios)); | ||
155 | |||
156 | platform_device_register(&edb7211_flash_pdev); | ||
157 | platform_device_register_data(&platform_bus, "platform-lcd", 0, | ||
158 | &edb7211_lcd_power_pdata, | ||
159 | sizeof(edb7211_lcd_power_pdata)); | ||
160 | platform_device_register_data(&platform_bus, "generic-bl", 0, | ||
161 | &edb7211_lcd_backlight_pdata, | ||
162 | sizeof(edb7211_lcd_backlight_pdata)); | ||
163 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | ||
164 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, | ||
165 | ARRAY_SIZE(edb7211_cs8900_resource)); | ||
166 | } | ||
167 | |||
168 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | ||
169 | /* Maintainer: Jon McClintock */ | ||
170 | .atag_offset = VIDEORAM_SIZE + 0x100, | ||
171 | .nr_irqs = CLPS711X_NR_IRQS, | ||
172 | .fixup = fixup_edb7211, | ||
173 | .reserve = edb7211_reserve, | ||
174 | .map_io = edb7211_map_io, | ||
175 | .init_irq = clps711x_init_irq, | ||
176 | .timer = &clps711x_timer, | ||
177 | .init_machine = edb7211_init, | ||
178 | .handle_irq = clps711x_handle_irq, | ||
179 | .restart = clps711x_restart, | ||
180 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/board-fortunet.c index 3a3f0b702cb4..7d0125580366 100644 --- a/arch/arm/mach-clps711x/fortunet.c +++ b/arch/arm/mach-clps711x/board-fortunet.c | |||
@@ -74,9 +74,11 @@ fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) | |||
74 | 74 | ||
75 | MACHINE_START(FORTUNET, "ARM-FortuNet") | 75 | MACHINE_START(FORTUNET, "ARM-FortuNet") |
76 | /* Maintainer: FortuNet Inc. */ | 76 | /* Maintainer: FortuNet Inc. */ |
77 | .nr_irqs = CLPS711X_NR_IRQS, | ||
77 | .fixup = fortunet_fixup, | 78 | .fixup = fortunet_fixup, |
78 | .map_io = clps711x_map_io, | 79 | .map_io = clps711x_map_io, |
79 | .init_irq = clps711x_init_irq, | 80 | .init_irq = clps711x_init_irq, |
80 | .timer = &clps711x_timer, | 81 | .timer = &clps711x_timer, |
82 | .handle_irq = clps711x_handle_irq, | ||
81 | .restart = clps711x_restart, | 83 | .restart = clps711x_restart, |
82 | MACHINE_END | 84 | MACHINE_END |
diff --git a/arch/arm/mach-clps711x/board-p720t.c b/arch/arm/mach-clps711x/board-p720t.c new file mode 100644 index 000000000000..1518fc83babd --- /dev/null +++ b/arch/arm/mach-clps711x/board-p720t.c | |||
@@ -0,0 +1,232 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/p720t.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/slab.h> | ||
27 | #include <linux/leds.h> | ||
28 | #include <linux/sizes.h> | ||
29 | #include <linux/backlight.h> | ||
30 | #include <linux/platform_device.h> | ||
31 | #include <linux/mtd/partitions.h> | ||
32 | #include <linux/mtd/nand-gpio.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/page.h> | ||
37 | #include <asm/setup.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | #include <asm/mach/arch.h> | ||
40 | #include <asm/mach/map.h> | ||
41 | #include <mach/syspld.h> | ||
42 | |||
43 | #include <video/platform_lcd.h> | ||
44 | |||
45 | #include "common.h" | ||
46 | |||
47 | #define P720T_USERLED CLPS711X_GPIO(3, 0) | ||
48 | #define P720T_NAND_CLE CLPS711X_GPIO(4, 0) | ||
49 | #define P720T_NAND_ALE CLPS711X_GPIO(4, 1) | ||
50 | #define P720T_NAND_NCE CLPS711X_GPIO(4, 2) | ||
51 | |||
52 | #define P720T_NAND_BASE (CLPS711X_SDRAM1_BASE) | ||
53 | |||
54 | static struct resource p720t_nand_resource[] __initdata = { | ||
55 | DEFINE_RES_MEM(P720T_NAND_BASE, SZ_4), | ||
56 | }; | ||
57 | |||
58 | static struct mtd_partition p720t_nand_parts[] __initdata = { | ||
59 | { | ||
60 | .name = "Flash partition 1", | ||
61 | .offset = 0, | ||
62 | .size = SZ_2M, | ||
63 | }, | ||
64 | { | ||
65 | .name = "Flash partition 2", | ||
66 | .offset = MTDPART_OFS_APPEND, | ||
67 | .size = MTDPART_SIZ_FULL, | ||
68 | }, | ||
69 | }; | ||
70 | |||
71 | static struct gpio_nand_platdata p720t_nand_pdata __initdata = { | ||
72 | .gpio_rdy = -1, | ||
73 | .gpio_nce = P720T_NAND_NCE, | ||
74 | .gpio_ale = P720T_NAND_ALE, | ||
75 | .gpio_cle = P720T_NAND_CLE, | ||
76 | .gpio_nwp = -1, | ||
77 | .chip_delay = 15, | ||
78 | .parts = p720t_nand_parts, | ||
79 | .num_parts = ARRAY_SIZE(p720t_nand_parts), | ||
80 | }; | ||
81 | |||
82 | static struct platform_device p720t_nand_pdev __initdata = { | ||
83 | .name = "gpio-nand", | ||
84 | .id = -1, | ||
85 | .resource = p720t_nand_resource, | ||
86 | .num_resources = ARRAY_SIZE(p720t_nand_resource), | ||
87 | .dev = { | ||
88 | .platform_data = &p720t_nand_pdata, | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | ||
93 | { | ||
94 | if (power) { | ||
95 | PLD_LCDEN = PLD_LCDEN_EN; | ||
96 | PLD_PWR |= PLD_S4_ON | PLD_S2_ON | PLD_S1_ON; | ||
97 | } else { | ||
98 | PLD_PWR &= ~(PLD_S4_ON | PLD_S2_ON | PLD_S1_ON); | ||
99 | PLD_LCDEN = 0; | ||
100 | } | ||
101 | } | ||
102 | |||
103 | static struct plat_lcd_data p720t_lcd_power_pdata = { | ||
104 | .set_power = p720t_lcd_power_set, | ||
105 | }; | ||
106 | |||
107 | static void p720t_lcd_backlight_set_intensity(int intensity) | ||
108 | { | ||
109 | if (intensity) | ||
110 | PLD_PWR |= PLD_S3_ON; | ||
111 | else | ||
112 | PLD_PWR = 0; | ||
113 | } | ||
114 | |||
115 | static struct generic_bl_info p720t_lcd_backlight_pdata = { | ||
116 | .name = "lcd-backlight.0", | ||
117 | .default_intensity = 0x01, | ||
118 | .max_intensity = 0x01, | ||
119 | .set_bl_intensity = p720t_lcd_backlight_set_intensity, | ||
120 | }; | ||
121 | |||
122 | /* | ||
123 | * Map the P720T system PLD. It occupies two address spaces: | ||
124 | * 0x10000000 and 0x10400000. We map both regions as one. | ||
125 | */ | ||
126 | static struct map_desc p720t_io_desc[] __initdata = { | ||
127 | { | ||
128 | .virtual = SYSPLD_VIRT_BASE, | ||
129 | .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | ||
130 | .length = SZ_8M, | ||
131 | .type = MT_DEVICE, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | static void __init | ||
136 | fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) | ||
137 | { | ||
138 | /* | ||
139 | * Our bootloader doesn't setup any tags (yet). | ||
140 | */ | ||
141 | if (tag->hdr.tag != ATAG_CORE) { | ||
142 | tag->hdr.tag = ATAG_CORE; | ||
143 | tag->hdr.size = tag_size(tag_core); | ||
144 | tag->u.core.flags = 0; | ||
145 | tag->u.core.pagesize = PAGE_SIZE; | ||
146 | tag->u.core.rootdev = 0x0100; | ||
147 | |||
148 | tag = tag_next(tag); | ||
149 | tag->hdr.tag = ATAG_MEM; | ||
150 | tag->hdr.size = tag_size(tag_mem32); | ||
151 | tag->u.mem.size = 4096; | ||
152 | tag->u.mem.start = PHYS_OFFSET; | ||
153 | |||
154 | tag = tag_next(tag); | ||
155 | tag->hdr.tag = ATAG_NONE; | ||
156 | tag->hdr.size = 0; | ||
157 | } | ||
158 | } | ||
159 | |||
160 | static void __init p720t_map_io(void) | ||
161 | { | ||
162 | clps711x_map_io(); | ||
163 | iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); | ||
164 | } | ||
165 | |||
166 | static void __init p720t_init_early(void) | ||
167 | { | ||
168 | /* | ||
169 | * Power down as much as possible in case we don't | ||
170 | * have the drivers loaded. | ||
171 | */ | ||
172 | PLD_LCDEN = 0; | ||
173 | PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | ||
174 | |||
175 | PLD_KBD = 0; | ||
176 | PLD_IO = 0; | ||
177 | PLD_IRDA = 0; | ||
178 | PLD_CODEC = 0; | ||
179 | PLD_TCH = 0; | ||
180 | PLD_SPI = 0; | ||
181 | if (!IS_ENABLED(CONFIG_DEBUG_LL)) { | ||
182 | PLD_COM2 = 0; | ||
183 | PLD_COM1 = 0; | ||
184 | } | ||
185 | } | ||
186 | |||
187 | static struct gpio_led p720t_gpio_leds[] = { | ||
188 | { | ||
189 | .name = "User LED", | ||
190 | .default_trigger = "heartbeat", | ||
191 | .gpio = P720T_USERLED, | ||
192 | }, | ||
193 | }; | ||
194 | |||
195 | static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = { | ||
196 | .leds = p720t_gpio_leds, | ||
197 | .num_leds = ARRAY_SIZE(p720t_gpio_leds), | ||
198 | }; | ||
199 | |||
200 | static void __init p720t_init(void) | ||
201 | { | ||
202 | platform_device_register(&p720t_nand_pdev); | ||
203 | platform_device_register_data(&platform_bus, "platform-lcd", 0, | ||
204 | &p720t_lcd_power_pdata, | ||
205 | sizeof(p720t_lcd_power_pdata)); | ||
206 | platform_device_register_data(&platform_bus, "generic-bl", 0, | ||
207 | &p720t_lcd_backlight_pdata, | ||
208 | sizeof(p720t_lcd_backlight_pdata)); | ||
209 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | ||
210 | } | ||
211 | |||
212 | static void __init p720t_init_late(void) | ||
213 | { | ||
214 | platform_device_register_data(&platform_bus, "leds-gpio", 0, | ||
215 | &p720t_gpio_led_pdata, | ||
216 | sizeof(p720t_gpio_led_pdata)); | ||
217 | } | ||
218 | |||
219 | MACHINE_START(P720T, "ARM-Prospector720T") | ||
220 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | ||
221 | .atag_offset = 0x100, | ||
222 | .nr_irqs = CLPS711X_NR_IRQS, | ||
223 | .fixup = fixup_p720t, | ||
224 | .map_io = p720t_map_io, | ||
225 | .init_early = p720t_init_early, | ||
226 | .init_irq = clps711x_init_irq, | ||
227 | .timer = &clps711x_timer, | ||
228 | .init_machine = p720t_init, | ||
229 | .init_late = p720t_init_late, | ||
230 | .handle_irq = clps711x_handle_irq, | ||
231 | .restart = clps711x_restart, | ||
232 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c deleted file mode 100644 index c314f49d6ef6..000000000000 --- a/arch/arm/mach-clps711x/cdb89712.c +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/cdb89712.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | |||
27 | #include <mach/hardware.h> | ||
28 | #include <asm/pgtable.h> | ||
29 | #include <asm/page.h> | ||
30 | #include <asm/setup.h> | ||
31 | #include <asm/mach-types.h> | ||
32 | #include <asm/mach/arch.h> | ||
33 | #include <asm/mach/map.h> | ||
34 | |||
35 | #include "common.h" | ||
36 | |||
37 | /* | ||
38 | * Map the CS89712 Ethernet port. That should be moved to the | ||
39 | * ethernet driver, perhaps. | ||
40 | */ | ||
41 | static struct map_desc cdb89712_io_desc[] __initdata = { | ||
42 | { | ||
43 | .virtual = ETHER_BASE, | ||
44 | .pfn =__phys_to_pfn(ETHER_START), | ||
45 | .length = ETHER_SIZE, | ||
46 | .type = MT_DEVICE | ||
47 | } | ||
48 | }; | ||
49 | |||
50 | static void __init cdb89712_map_io(void) | ||
51 | { | ||
52 | clps711x_map_io(); | ||
53 | iotable_init(cdb89712_io_desc, ARRAY_SIZE(cdb89712_io_desc)); | ||
54 | } | ||
55 | |||
56 | MACHINE_START(CDB89712, "Cirrus-CDB89712") | ||
57 | /* Maintainer: Ray Lehtiniemi */ | ||
58 | .atag_offset = 0x100, | ||
59 | .map_io = cdb89712_map_io, | ||
60 | .init_irq = clps711x_init_irq, | ||
61 | .timer = &clps711x_timer, | ||
62 | .restart = clps711x_restart, | ||
63 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c index 509243d89a32..e046439573ee 100644 --- a/arch/arm/mach-clps711x/common.c +++ b/arch/arm/mach-clps711x/common.c | |||
@@ -21,13 +21,16 @@ | |||
21 | */ | 21 | */ |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/sizes.h> | ||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
26 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
27 | #include <linux/clkdev.h> | 28 | #include <linux/clkdev.h> |
29 | #include <linux/clockchips.h> | ||
28 | #include <linux/clk-provider.h> | 30 | #include <linux/clk-provider.h> |
29 | 31 | ||
30 | #include <asm/sizes.h> | 32 | #include <asm/exception.h> |
33 | #include <asm/mach/irq.h> | ||
31 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
32 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
33 | #include <asm/system_misc.h> | 36 | #include <asm/system_misc.h> |
@@ -36,7 +39,6 @@ | |||
36 | 39 | ||
37 | static struct clk *clk_pll, *clk_bus, *clk_uart, *clk_timerl, *clk_timerh, | 40 | static struct clk *clk_pll, *clk_bus, *clk_uart, *clk_timerl, *clk_timerh, |
38 | *clk_tint, *clk_spi; | 41 | *clk_tint, *clk_spi; |
39 | static unsigned long latch; | ||
40 | 42 | ||
41 | /* | 43 | /* |
42 | * This maps the generic CLPS711x registers | 44 | * This maps the generic CLPS711x registers |
@@ -45,7 +47,7 @@ static struct map_desc clps711x_io_desc[] __initdata = { | |||
45 | { | 47 | { |
46 | .virtual = (unsigned long)CLPS711X_VIRT_BASE, | 48 | .virtual = (unsigned long)CLPS711X_VIRT_BASE, |
47 | .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE), | 49 | .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE), |
48 | .length = SZ_1M, | 50 | .length = SZ_64K, |
49 | .type = MT_DEVICE | 51 | .type = MT_DEVICE |
50 | } | 52 | } |
51 | }; | 53 | }; |
@@ -64,7 +66,7 @@ static void int1_mask(struct irq_data *d) | |||
64 | clps_writel(intmr1, INTMR1); | 66 | clps_writel(intmr1, INTMR1); |
65 | } | 67 | } |
66 | 68 | ||
67 | static void int1_ack(struct irq_data *d) | 69 | static void int1_eoi(struct irq_data *d) |
68 | { | 70 | { |
69 | switch (d->irq) { | 71 | switch (d->irq) { |
70 | case IRQ_CSINT: clps_writel(0, COEOI); break; | 72 | case IRQ_CSINT: clps_writel(0, COEOI); break; |
@@ -86,7 +88,8 @@ static void int1_unmask(struct irq_data *d) | |||
86 | } | 88 | } |
87 | 89 | ||
88 | static struct irq_chip int1_chip = { | 90 | static struct irq_chip int1_chip = { |
89 | .irq_ack = int1_ack, | 91 | .name = "Interrupt Vector 1", |
92 | .irq_eoi = int1_eoi, | ||
90 | .irq_mask = int1_mask, | 93 | .irq_mask = int1_mask, |
91 | .irq_unmask = int1_unmask, | 94 | .irq_unmask = int1_unmask, |
92 | }; | 95 | }; |
@@ -100,7 +103,7 @@ static void int2_mask(struct irq_data *d) | |||
100 | clps_writel(intmr2, INTMR2); | 103 | clps_writel(intmr2, INTMR2); |
101 | } | 104 | } |
102 | 105 | ||
103 | static void int2_ack(struct irq_data *d) | 106 | static void int2_eoi(struct irq_data *d) |
104 | { | 107 | { |
105 | switch (d->irq) { | 108 | switch (d->irq) { |
106 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; | 109 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; |
@@ -117,73 +120,160 @@ static void int2_unmask(struct irq_data *d) | |||
117 | } | 120 | } |
118 | 121 | ||
119 | static struct irq_chip int2_chip = { | 122 | static struct irq_chip int2_chip = { |
120 | .irq_ack = int2_ack, | 123 | .name = "Interrupt Vector 2", |
124 | .irq_eoi = int2_eoi, | ||
121 | .irq_mask = int2_mask, | 125 | .irq_mask = int2_mask, |
122 | .irq_unmask = int2_unmask, | 126 | .irq_unmask = int2_unmask, |
123 | }; | 127 | }; |
124 | 128 | ||
129 | static void int3_mask(struct irq_data *d) | ||
130 | { | ||
131 | u32 intmr3; | ||
132 | |||
133 | intmr3 = clps_readl(INTMR3); | ||
134 | intmr3 &= ~(1 << (d->irq - 32)); | ||
135 | clps_writel(intmr3, INTMR3); | ||
136 | } | ||
137 | |||
138 | static void int3_unmask(struct irq_data *d) | ||
139 | { | ||
140 | u32 intmr3; | ||
141 | |||
142 | intmr3 = clps_readl(INTMR3); | ||
143 | intmr3 |= 1 << (d->irq - 32); | ||
144 | clps_writel(intmr3, INTMR3); | ||
145 | } | ||
146 | |||
147 | static struct irq_chip int3_chip = { | ||
148 | .name = "Interrupt Vector 3", | ||
149 | .irq_mask = int3_mask, | ||
150 | .irq_unmask = int3_unmask, | ||
151 | }; | ||
152 | |||
153 | static struct { | ||
154 | int nr; | ||
155 | struct irq_chip *chip; | ||
156 | irq_flow_handler_t handle; | ||
157 | } clps711x_irqdescs[] __initdata = { | ||
158 | { IRQ_CSINT, &int1_chip, handle_fasteoi_irq, }, | ||
159 | { IRQ_EINT1, &int1_chip, handle_level_irq, }, | ||
160 | { IRQ_EINT2, &int1_chip, handle_level_irq, }, | ||
161 | { IRQ_EINT3, &int1_chip, handle_level_irq, }, | ||
162 | { IRQ_TC1OI, &int1_chip, handle_fasteoi_irq, }, | ||
163 | { IRQ_TC2OI, &int1_chip, handle_fasteoi_irq, }, | ||
164 | { IRQ_RTCMI, &int1_chip, handle_fasteoi_irq, }, | ||
165 | { IRQ_TINT, &int1_chip, handle_fasteoi_irq, }, | ||
166 | { IRQ_UTXINT1, &int1_chip, handle_level_irq, }, | ||
167 | { IRQ_URXINT1, &int1_chip, handle_level_irq, }, | ||
168 | { IRQ_UMSINT, &int1_chip, handle_fasteoi_irq, }, | ||
169 | { IRQ_SSEOTI, &int1_chip, handle_level_irq, }, | ||
170 | { IRQ_KBDINT, &int2_chip, handle_fasteoi_irq, }, | ||
171 | { IRQ_SS2RX, &int2_chip, handle_level_irq, }, | ||
172 | { IRQ_SS2TX, &int2_chip, handle_level_irq, }, | ||
173 | { IRQ_UTXINT2, &int2_chip, handle_level_irq, }, | ||
174 | { IRQ_URXINT2, &int2_chip, handle_level_irq, }, | ||
175 | }; | ||
176 | |||
125 | void __init clps711x_init_irq(void) | 177 | void __init clps711x_init_irq(void) |
126 | { | 178 | { |
127 | unsigned int i; | 179 | unsigned int i; |
128 | 180 | ||
129 | for (i = 0; i < NR_IRQS; i++) { | 181 | /* Disable interrupts */ |
130 | if (INT1_IRQS & (1 << i)) { | ||
131 | irq_set_chip_and_handler(i, &int1_chip, | ||
132 | handle_level_irq); | ||
133 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | ||
134 | } | ||
135 | if (INT2_IRQS & (1 << i)) { | ||
136 | irq_set_chip_and_handler(i, &int2_chip, | ||
137 | handle_level_irq); | ||
138 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | ||
139 | } | ||
140 | } | ||
141 | |||
142 | /* | ||
143 | * Disable interrupts | ||
144 | */ | ||
145 | clps_writel(0, INTMR1); | 182 | clps_writel(0, INTMR1); |
146 | clps_writel(0, INTMR2); | 183 | clps_writel(0, INTMR2); |
184 | clps_writel(0, INTMR3); | ||
147 | 185 | ||
148 | /* | 186 | /* Clear down any pending interrupts */ |
149 | * Clear down any pending interrupts | 187 | clps_writel(0, BLEOI); |
150 | */ | 188 | clps_writel(0, MCEOI); |
151 | clps_writel(0, COEOI); | 189 | clps_writel(0, COEOI); |
152 | clps_writel(0, TC1EOI); | 190 | clps_writel(0, TC1EOI); |
153 | clps_writel(0, TC2EOI); | 191 | clps_writel(0, TC2EOI); |
154 | clps_writel(0, RTCEOI); | 192 | clps_writel(0, RTCEOI); |
155 | clps_writel(0, TEOI); | 193 | clps_writel(0, TEOI); |
156 | clps_writel(0, UMSEOI); | 194 | clps_writel(0, UMSEOI); |
157 | clps_writel(0, SYNCIO); | ||
158 | clps_writel(0, KBDEOI); | 195 | clps_writel(0, KBDEOI); |
196 | clps_writel(0, SRXEOF); | ||
197 | clps_writel(0xffffffff, DAISR); | ||
198 | |||
199 | for (i = 0; i < ARRAY_SIZE(clps711x_irqdescs); i++) { | ||
200 | irq_set_chip_and_handler(clps711x_irqdescs[i].nr, | ||
201 | clps711x_irqdescs[i].chip, | ||
202 | clps711x_irqdescs[i].handle); | ||
203 | set_irq_flags(clps711x_irqdescs[i].nr, | ||
204 | IRQF_VALID | IRQF_PROBE); | ||
205 | } | ||
206 | |||
207 | if (IS_ENABLED(CONFIG_FIQ)) { | ||
208 | init_FIQ(0); | ||
209 | irq_set_chip_and_handler(IRQ_DAIINT, &int3_chip, | ||
210 | handle_bad_irq); | ||
211 | set_irq_flags(IRQ_DAIINT, | ||
212 | IRQF_VALID | IRQF_PROBE | IRQF_NOAUTOEN); | ||
213 | } | ||
159 | } | 214 | } |
160 | 215 | ||
161 | /* | 216 | inline u32 fls16(u32 x) |
162 | * gettimeoffset() returns time since last timer tick, in usecs. | ||
163 | * | ||
164 | * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. | ||
165 | * 'tick' is usecs per jiffy. | ||
166 | */ | ||
167 | static unsigned long clps711x_gettimeoffset(void) | ||
168 | { | 217 | { |
169 | unsigned long hwticks; | 218 | u32 r = 15; |
170 | hwticks = latch - (clps_readl(TC2D) & 0xffff); | 219 | |
171 | return (hwticks * (tick_nsec / 1000)) / latch; | 220 | if (!(x & 0xff00)) { |
221 | x <<= 8; | ||
222 | r -= 8; | ||
223 | } | ||
224 | if (!(x & 0xf000)) { | ||
225 | x <<= 4; | ||
226 | r -= 4; | ||
227 | } | ||
228 | if (!(x & 0xc000)) { | ||
229 | x <<= 2; | ||
230 | r -= 2; | ||
231 | } | ||
232 | if (!(x & 0x8000)) | ||
233 | r--; | ||
234 | |||
235 | return r; | ||
172 | } | 236 | } |
173 | 237 | ||
174 | /* | 238 | asmlinkage void __exception_irq_entry clps711x_handle_irq(struct pt_regs *regs) |
175 | * IRQ handler for the timer | ||
176 | */ | ||
177 | static irqreturn_t p720t_timer_interrupt(int irq, void *dev_id) | ||
178 | { | 239 | { |
179 | timer_tick(); | 240 | u32 irqstat; |
241 | void __iomem *base = CLPS711X_VIRT_BASE; | ||
242 | |||
243 | irqstat = readl_relaxed(base + INTSR1) & readl_relaxed(base + INTMR1); | ||
244 | if (irqstat) { | ||
245 | handle_IRQ(fls16(irqstat), regs); | ||
246 | return; | ||
247 | } | ||
248 | |||
249 | irqstat = readl_relaxed(base + INTSR2) & readl_relaxed(base + INTMR2); | ||
250 | if (likely(irqstat)) | ||
251 | handle_IRQ(fls16(irqstat) + 16, regs); | ||
252 | } | ||
253 | |||
254 | static void clps711x_clockevent_set_mode(enum clock_event_mode mode, | ||
255 | struct clock_event_device *evt) | ||
256 | { | ||
257 | } | ||
258 | |||
259 | static struct clock_event_device clockevent_clps711x = { | ||
260 | .name = "CLPS711x Clockevents", | ||
261 | .rating = 300, | ||
262 | .features = CLOCK_EVT_FEAT_PERIODIC, | ||
263 | .set_mode = clps711x_clockevent_set_mode, | ||
264 | }; | ||
265 | |||
266 | static irqreturn_t clps711x_timer_interrupt(int irq, void *dev_id) | ||
267 | { | ||
268 | clockevent_clps711x.event_handler(&clockevent_clps711x); | ||
269 | |||
180 | return IRQ_HANDLED; | 270 | return IRQ_HANDLED; |
181 | } | 271 | } |
182 | 272 | ||
183 | static struct irqaction clps711x_timer_irq = { | 273 | static struct irqaction clps711x_timer_irq = { |
184 | .name = "CLPS711x Timer Tick", | 274 | .name = "CLPS711x Timer Tick", |
185 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 275 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
186 | .handler = p720t_timer_interrupt, | 276 | .handler = clps711x_timer_interrupt, |
187 | }; | 277 | }; |
188 | 278 | ||
189 | static void add_fixed_clk(struct clk *clk, const char *name, int rate) | 279 | static void add_fixed_clk(struct clk *clk, const char *name, int rate) |
@@ -244,20 +334,19 @@ static void __init clps711x_timer_init(void) | |||
244 | 334 | ||
245 | pr_info("CPU frequency set at %i Hz.\n", cpu); | 335 | pr_info("CPU frequency set at %i Hz.\n", cpu); |
246 | 336 | ||
247 | latch = (timh + HZ / 2) / HZ; | 337 | clps_writew(DIV_ROUND_CLOSEST(timh, HZ), TC2D); |
248 | 338 | ||
249 | tmp = clps_readl(SYSCON1); | 339 | tmp = clps_readl(SYSCON1); |
250 | tmp |= SYSCON1_TC2S | SYSCON1_TC2M; | 340 | tmp |= SYSCON1_TC2S | SYSCON1_TC2M; |
251 | clps_writel(tmp, SYSCON1); | 341 | clps_writel(tmp, SYSCON1); |
252 | 342 | ||
253 | clps_writel(latch - 1, TC2D); | 343 | clockevents_config_and_register(&clockevent_clps711x, timh, 1, 0xffff); |
254 | 344 | ||
255 | setup_irq(IRQ_TC2OI, &clps711x_timer_irq); | 345 | setup_irq(IRQ_TC2OI, &clps711x_timer_irq); |
256 | } | 346 | } |
257 | 347 | ||
258 | struct sys_timer clps711x_timer = { | 348 | struct sys_timer clps711x_timer = { |
259 | .init = clps711x_timer_init, | 349 | .init = clps711x_timer_init, |
260 | .offset = clps711x_gettimeoffset, | ||
261 | }; | 350 | }; |
262 | 351 | ||
263 | void clps711x_restart(char mode, const char *cmd) | 352 | void clps711x_restart(char mode, const char *cmd) |
diff --git a/arch/arm/mach-clps711x/common.h b/arch/arm/mach-clps711x/common.h index fc0f0650dcb5..b7c0c75c90c0 100644 --- a/arch/arm/mach-clps711x/common.h +++ b/arch/arm/mach-clps711x/common.h | |||
@@ -4,9 +4,14 @@ | |||
4 | * Common bits. | 4 | * Common bits. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define CLPS711X_NR_IRQS (33) | ||
8 | #define CLPS711X_NR_GPIO (4 * 8 + 3) | ||
9 | #define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) | ||
10 | |||
7 | struct sys_timer; | 11 | struct sys_timer; |
8 | 12 | ||
9 | extern void clps711x_map_io(void); | 13 | extern void clps711x_map_io(void); |
10 | extern void clps711x_init_irq(void); | 14 | extern void clps711x_init_irq(void); |
11 | extern struct sys_timer clps711x_timer; | 15 | extern void clps711x_handle_irq(struct pt_regs *regs); |
12 | extern void clps711x_restart(char mode, const char *cmd); | 16 | extern void clps711x_restart(char mode, const char *cmd); |
17 | extern struct sys_timer clps711x_timer; | ||
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c deleted file mode 100644 index 5fad0b4f40ad..000000000000 --- a/arch/arm/mach-clps711x/edb7211-arch.c +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/arch-edb7211.c | ||
3 | * | ||
4 | * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/memblock.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | |||
25 | #include <asm/setup.h> | ||
26 | #include <asm/mach-types.h> | ||
27 | #include <asm/mach/arch.h> | ||
28 | |||
29 | #include "common.h" | ||
30 | |||
31 | extern void edb7211_map_io(void); | ||
32 | |||
33 | /* Reserve screen memory region at the start of main system memory. */ | ||
34 | static void __init edb7211_reserve(void) | ||
35 | { | ||
36 | memblock_reserve(PHYS_OFFSET, 0x00020000); | ||
37 | } | ||
38 | |||
39 | static void __init | ||
40 | fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) | ||
41 | { | ||
42 | /* | ||
43 | * Bank start addresses are not present in the information | ||
44 | * passed in from the boot loader. We could potentially | ||
45 | * detect them, but instead we hard-code them. | ||
46 | * | ||
47 | * Banks sizes _are_ present in the param block, but we're | ||
48 | * not using that information yet. | ||
49 | */ | ||
50 | mi->bank[0].start = 0xc0000000; | ||
51 | mi->bank[0].size = 8*1024*1024; | ||
52 | mi->bank[1].start = 0xc1000000; | ||
53 | mi->bank[1].size = 8*1024*1024; | ||
54 | mi->nr_banks = 2; | ||
55 | } | ||
56 | |||
57 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | ||
58 | /* Maintainer: Jon McClintock */ | ||
59 | .atag_offset = 0x20100, /* 0xc0000000 - 0xc001ffff can be video RAM */ | ||
60 | .fixup = fixup_edb7211, | ||
61 | .map_io = edb7211_map_io, | ||
62 | .reserve = edb7211_reserve, | ||
63 | .init_irq = clps711x_init_irq, | ||
64 | .timer = &clps711x_timer, | ||
65 | .restart = clps711x_restart, | ||
66 | MACHINE_END | ||
diff --git a/arch/arm/mach-clps711x/edb7211-mm.c b/arch/arm/mach-clps711x/edb7211-mm.c deleted file mode 100644 index 4372f06c9929..000000000000 --- a/arch/arm/mach-clps711x/edb7211-mm.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/mm.c | ||
3 | * | ||
4 | * Extra MM routines for the EDB7211 board | ||
5 | * | ||
6 | * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/bug.h> | ||
25 | |||
26 | #include <mach/hardware.h> | ||
27 | #include <asm/page.h> | ||
28 | #include <asm/sizes.h> | ||
29 | |||
30 | #include <asm/mach/map.h> | ||
31 | |||
32 | extern void clps711x_map_io(void); | ||
33 | |||
34 | /* | ||
35 | * The on-chip registers are given a size of 1MB so that a section can | ||
36 | * be used to map them; this saves a page table. This is the place to | ||
37 | * add mappings for ROM, expansion memory, PCMCIA, etc. (if static | ||
38 | * mappings are chosen for those areas). | ||
39 | * | ||
40 | * Here is a physical memory map (to be fleshed out later): | ||
41 | * | ||
42 | * Physical Address Size Description | ||
43 | * ----------------- ----- --------------------------------- | ||
44 | * c0000000-c001ffff 128KB reserved for video RAM [1] | ||
45 | * c0020000-c0023fff 16KB parameters (see Documentation/arm/Setup) | ||
46 | * c0024000-c0027fff 16KB swapper_pg_dir (task 0 page directory) | ||
47 | * c0028000-... kernel image (TEXTADDR) | ||
48 | * | ||
49 | * [1] Unused pages should be given back to the VM; they are not yet. | ||
50 | * The parameter block should also be released (not sure if this | ||
51 | * happens). | ||
52 | */ | ||
53 | static struct map_desc edb7211_io_desc[] __initdata = { | ||
54 | { /* memory-mapped extra keyboard row */ | ||
55 | .virtual = EP7211_VIRT_EXTKBD, | ||
56 | .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), | ||
57 | .length = SZ_1M, | ||
58 | .type = MT_DEVICE, | ||
59 | }, { /* and CS8900A Ethernet chip */ | ||
60 | .virtual = EP7211_VIRT_CS8900A, | ||
61 | .pfn = __phys_to_pfn(EP7211_PHYS_CS8900A), | ||
62 | .length = SZ_1M, | ||
63 | .type = MT_DEVICE, | ||
64 | }, { /* flash banks */ | ||
65 | .virtual = EP7211_VIRT_FLASH1, | ||
66 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH1), | ||
67 | .length = SZ_8M, | ||
68 | .type = MT_DEVICE, | ||
69 | }, { | ||
70 | .virtual = EP7211_VIRT_FLASH2, | ||
71 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH2), | ||
72 | .length = SZ_8M, | ||
73 | .type = MT_DEVICE, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | void __init edb7211_map_io(void) | ||
78 | { | ||
79 | clps711x_map_io(); | ||
80 | iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc)); | ||
81 | } | ||
82 | |||
diff --git a/arch/arm/mach-clps711x/include/mach/autcpu12.h b/arch/arm/mach-clps711x/include/mach/autcpu12.h index 1588a365f610..0452f5f3f034 100644 --- a/arch/arm/mach-clps711x/include/mach/autcpu12.h +++ b/arch/arm/mach-clps711x/include/mach/autcpu12.h | |||
@@ -21,24 +21,15 @@ | |||
21 | #define __ASM_ARCH_AUTCPU12_H | 21 | #define __ASM_ARCH_AUTCPU12_H |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * The CS8900A ethernet chip has its I/O registers wired to chip select 2 | ||
25 | * (nCS2). This is the mapping for it. | ||
26 | */ | ||
27 | #define AUTCPU12_PHYS_CS8900A CS2_PHYS_BASE /* physical */ | ||
28 | #define AUTCPU12_VIRT_CS8900A (0xfe000000) /* virtual */ | ||
29 | |||
30 | /* | ||
31 | * The flash bank is wired to chip select 0 | 24 | * The flash bank is wired to chip select 0 |
32 | */ | 25 | */ |
33 | #define AUTCPU12_PHYS_FLASH CS0_PHYS_BASE /* physical */ | 26 | #define AUTCPU12_PHYS_FLASH CS0_PHYS_BASE /* physical */ |
34 | 27 | ||
35 | /* offset for device specific information structure */ | 28 | /* offset for device specific information structure */ |
36 | #define AUTCPU12_LCDINFO_OFFS (0x00010000) | 29 | #define AUTCPU12_LCDINFO_OFFS (0x00010000) |
37 | /* | 30 | |
38 | * Videomemory is the internal SRAM (CS 6) | 31 | /* Videomemory in the internal SRAM (CS 6) */ |
39 | */ | ||
40 | #define AUTCPU12_PHYS_VIDEO CS6_PHYS_BASE | 32 | #define AUTCPU12_PHYS_VIDEO CS6_PHYS_BASE |
41 | #define AUTCPU12_VIRT_VIDEO (0xfd000000) | ||
42 | 33 | ||
43 | /* | 34 | /* |
44 | * All special IO's are tied to CS1 | 35 | * All special IO's are tied to CS1 |
@@ -49,8 +40,6 @@ | |||
49 | 40 | ||
50 | #define AUTCPU12_PHYS_CSAUX1 CS1_PHYS_BASE +0x04000000 /* physical */ | 41 | #define AUTCPU12_PHYS_CSAUX1 CS1_PHYS_BASE +0x04000000 /* physical */ |
51 | 42 | ||
52 | #define AUTCPU12_PHYS_SMC CS1_PHYS_BASE +0x06000000 /* physical */ | ||
53 | |||
54 | #define AUTCPU12_PHYS_CAN CS1_PHYS_BASE +0x08000000 /* physical */ | 43 | #define AUTCPU12_PHYS_CAN CS1_PHYS_BASE +0x08000000 /* physical */ |
55 | 44 | ||
56 | #define AUTCPU12_PHYS_TOUCH CS1_PHYS_BASE +0x0A000000 /* physical */ | 45 | #define AUTCPU12_PHYS_TOUCH CS1_PHYS_BASE +0x0A000000 /* physical */ |
@@ -59,14 +48,6 @@ | |||
59 | 48 | ||
60 | #define AUTCPU12_PHYS_LPT CS1_PHYS_BASE +0x0E000000 /* physical */ | 49 | #define AUTCPU12_PHYS_LPT CS1_PHYS_BASE +0x0E000000 /* physical */ |
61 | 50 | ||
62 | /* | ||
63 | * defines for smartmedia card access | ||
64 | */ | ||
65 | #define AUTCPU12_SMC_RDY (1<<2) | ||
66 | #define AUTCPU12_SMC_ALE (1<<3) | ||
67 | #define AUTCPU12_SMC_CLE (1<<4) | ||
68 | #define AUTCPU12_SMC_PORT_OFFSET PBDR | ||
69 | #define AUTCPU12_SMC_SELECT_OFFSET 0x10 | ||
70 | /* | 51 | /* |
71 | * defines for lcd contrast | 52 | * defines for lcd contrast |
72 | */ | 53 | */ |
diff --git a/arch/arm/mach-clps711x/include/mach/clps711x.h b/arch/arm/mach-clps711x/include/mach/clps711x.h index c82e21ca49c7..01d1b9559710 100644 --- a/arch/arm/mach-clps711x/include/mach/clps711x.h +++ b/arch/arm/mach-clps711x/include/mach/clps711x.h | |||
@@ -257,6 +257,9 @@ | |||
257 | #define MEMCFG_BUS_WIDTH_16 (0) | 257 | #define MEMCFG_BUS_WIDTH_16 (0) |
258 | #define MEMCFG_BUS_WIDTH_8 (3) | 258 | #define MEMCFG_BUS_WIDTH_8 (3) |
259 | 259 | ||
260 | #define MEMCFG_SQAEN (1 << 6) | ||
261 | #define MEMCFG_CLKENB (1 << 7) | ||
262 | |||
260 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) | 263 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) |
261 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) | 264 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) |
262 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) | 265 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) |
@@ -274,4 +277,28 @@ | |||
274 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) | 277 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) |
275 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) | 278 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) |
276 | 279 | ||
280 | /* INTSR1 Interrupts */ | ||
281 | #define IRQ_CSINT (4) | ||
282 | #define IRQ_EINT1 (5) | ||
283 | #define IRQ_EINT2 (6) | ||
284 | #define IRQ_EINT3 (7) | ||
285 | #define IRQ_TC1OI (8) | ||
286 | #define IRQ_TC2OI (9) | ||
287 | #define IRQ_RTCMI (10) | ||
288 | #define IRQ_TINT (11) | ||
289 | #define IRQ_UTXINT1 (12) | ||
290 | #define IRQ_URXINT1 (13) | ||
291 | #define IRQ_UMSINT (14) | ||
292 | #define IRQ_SSEOTI (15) | ||
293 | |||
294 | /* INTSR2 Interrupts */ | ||
295 | #define IRQ_KBDINT (16 + 0) | ||
296 | #define IRQ_SS2RX (16 + 1) | ||
297 | #define IRQ_SS2TX (16 + 2) | ||
298 | #define IRQ_UTXINT2 (16 + 12) | ||
299 | #define IRQ_URXINT2 (16 + 13) | ||
300 | |||
301 | /* INTSR3 Interrupts */ | ||
302 | #define IRQ_DAIINT (32 + 0) | ||
303 | |||
277 | #endif /* __MACH_CLPS711X_H */ | 304 | #endif /* __MACH_CLPS711X_H */ |
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S deleted file mode 100644 index 56e5c2c23504..000000000000 --- a/arch/arm/mach-clps711x/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for CLPS711X-based platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <mach/hardware.h> | ||
11 | |||
12 | .macro get_irqnr_preamble, base, tmp | ||
13 | .endm | ||
14 | |||
15 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) | ||
16 | #error INTSR stride != INTMR stride | ||
17 | #endif | ||
18 | |||
19 | .macro get_irqnr_and_base, irqnr, stat, base, mask | ||
20 | mov \base, #CLPS711X_VIRT_BASE | ||
21 | ldr \stat, [\base, #INTSR1] | ||
22 | ldr \mask, [\base, #INTMR1] | ||
23 | mov \irqnr, #4 | ||
24 | mov \mask, \mask, lsl #16 | ||
25 | and \stat, \stat, \mask, lsr #16 | ||
26 | movs \stat, \stat, lsr #4 | ||
27 | bne 1001f | ||
28 | |||
29 | add \base, \base, #INTSR2 - INTSR1 | ||
30 | ldr \stat, [\base, #INTSR1] | ||
31 | ldr \mask, [\base, #INTMR1] | ||
32 | mov \irqnr, #16 | ||
33 | mov \mask, \mask, lsl #16 | ||
34 | and \stat, \stat, \mask, lsr #16 | ||
35 | |||
36 | 1001: tst \stat, #255 | ||
37 | addeq \irqnr, \irqnr, #8 | ||
38 | moveq \stat, \stat, lsr #8 | ||
39 | tst \stat, #15 | ||
40 | addeq \irqnr, \irqnr, #4 | ||
41 | moveq \stat, \stat, lsr #4 | ||
42 | tst \stat, #3 | ||
43 | addeq \irqnr, \irqnr, #2 | ||
44 | moveq \stat, \stat, lsr #2 | ||
45 | tst \stat, #1 | ||
46 | addeq \irqnr, \irqnr, #1 | ||
47 | moveq \stat, \stat, lsr #1 | ||
48 | tst \stat, #1 @ bit 0 should be set | ||
49 | .endm | ||
50 | |||
51 | |||
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h index 8497775d6ee5..2f23dd5d73e4 100644 --- a/arch/arm/mach-clps711x/include/mach/hardware.h +++ b/arch/arm/mach-clps711x/include/mach/hardware.h | |||
@@ -24,7 +24,10 @@ | |||
24 | 24 | ||
25 | #include <mach/clps711x.h> | 25 | #include <mach/clps711x.h> |
26 | 26 | ||
27 | #define CLPS711X_VIRT_BASE IOMEM(0xff000000) | 27 | #define IO_ADDRESS(x) (0xdc000000 + (((x) & 0x03ffffff) | \ |
28 | (((x) >> 2) & 0x3c000000))) | ||
29 | |||
30 | #define CLPS711X_VIRT_BASE IOMEM(IO_ADDRESS(CLPS711X_PHYS_BASE)) | ||
28 | 31 | ||
29 | #ifndef __ASSEMBLY__ | 32 | #ifndef __ASSEMBLY__ |
30 | #define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off)) | 33 | #define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off)) |
@@ -61,67 +64,17 @@ | |||
61 | #define CS7_PHYS_BASE (0x00000000) | 64 | #define CS7_PHYS_BASE (0x00000000) |
62 | #endif | 65 | #endif |
63 | 66 | ||
64 | #define SYSPLD_VIRT_BASE 0xfe000000 | 67 | #define CLPS711X_SRAM_BASE CS6_PHYS_BASE |
65 | #define SYSPLD_BASE SYSPLD_VIRT_BASE | 68 | #define CLPS711X_SRAM_SIZE (48 * 1024) |
66 | |||
67 | #if defined (CONFIG_ARCH_CDB89712) | ||
68 | |||
69 | #define ETHER_START 0x20000000 | ||
70 | #define ETHER_SIZE 0x1000 | ||
71 | #define ETHER_BASE 0xfe000000 | ||
72 | |||
73 | #endif | ||
74 | 69 | ||
70 | #define CLPS711X_SDRAM0_BASE (0xc0000000) | ||
71 | #define CLPS711X_SDRAM1_BASE (0xd0000000) | ||
75 | 72 | ||
76 | #if defined (CONFIG_ARCH_EDB7211) | 73 | #if defined (CONFIG_ARCH_EDB7211) |
77 | 74 | ||
78 | /* | 75 | /* The extra 8 lines of the keyboard matrix are wired to chip select 3 */ |
79 | * The extra 8 lines of the keyboard matrix are wired to chip select 3 (nCS3) | 76 | #define EP7211_PHYS_EXTKBD CS3_PHYS_BASE |
80 | * and repeat across it. This is the mapping for it. | ||
81 | * | ||
82 | * In jumpered boot mode, nCS3 is mapped to 0x4000000, not 0x3000000. This | ||
83 | * was cause for much consternation and headscratching. This should probably | ||
84 | * be made a compile/run time kernel option. | ||
85 | */ | ||
86 | #define EP7211_PHYS_EXTKBD CS3_PHYS_BASE /* physical */ | ||
87 | |||
88 | #define EP7211_VIRT_EXTKBD (0xfd000000) /* virtual */ | ||
89 | |||
90 | |||
91 | /* | ||
92 | * The CS8900A ethernet chip has its I/O registers wired to chip select 2 | ||
93 | * (nCS2). This is the mapping for it. | ||
94 | * | ||
95 | * In jumpered boot mode, nCS2 is mapped to 0x5000000, not 0x2000000. This | ||
96 | * was cause for much consternation and headscratching. This should probably | ||
97 | * be made a compile/run time kernel option. | ||
98 | */ | ||
99 | #define EP7211_PHYS_CS8900A CS2_PHYS_BASE /* physical */ | ||
100 | |||
101 | #define EP7211_VIRT_CS8900A (0xfc000000) /* virtual */ | ||
102 | |||
103 | |||
104 | /* | ||
105 | * The two flash banks are wired to chip selects 0 and 1. This is the mapping | ||
106 | * for them. | ||
107 | * | ||
108 | * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running | ||
109 | * in jumpered boot mode. | ||
110 | */ | ||
111 | #define EP7211_PHYS_FLASH1 CS0_PHYS_BASE /* physical */ | ||
112 | #define EP7211_PHYS_FLASH2 CS1_PHYS_BASE /* physical */ | ||
113 | |||
114 | #define EP7211_VIRT_FLASH1 (0xfa000000) /* virtual */ | ||
115 | #define EP7211_VIRT_FLASH2 (0xfb000000) /* virtual */ | ||
116 | 77 | ||
117 | #endif /* CONFIG_ARCH_EDB7211 */ | 78 | #endif /* CONFIG_ARCH_EDB7211 */ |
118 | 79 | ||
119 | /* | ||
120 | * Relevant bits in port D, which controls power to the various parts of | ||
121 | * the LCD on the EDB7211. | ||
122 | */ | ||
123 | #define EDB_PD1_LCD_DC_DC_EN (1<<1) | ||
124 | #define EDB_PD2_LCDEN (1<<2) | ||
125 | #define EDB_PD3_LCDBL (1<<3) | ||
126 | |||
127 | #endif | 80 | #endif |
diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h deleted file mode 100644 index 14d215f8ca81..000000000000 --- a/arch/arm/mach-clps711x/include/mach/irqs.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | * Interrupts from INTSR1 | ||
23 | */ | ||
24 | #define IRQ_CSINT 4 | ||
25 | #define IRQ_EINT1 5 | ||
26 | #define IRQ_EINT2 6 | ||
27 | #define IRQ_EINT3 7 | ||
28 | #define IRQ_TC1OI 8 | ||
29 | #define IRQ_TC2OI 9 | ||
30 | #define IRQ_RTCMI 10 | ||
31 | #define IRQ_TINT 11 | ||
32 | #define IRQ_UTXINT1 12 | ||
33 | #define IRQ_URXINT1 13 | ||
34 | #define IRQ_UMSINT 14 | ||
35 | #define IRQ_SSEOTI 15 | ||
36 | |||
37 | #define INT1_IRQS (0x0000fff0) | ||
38 | |||
39 | /* | ||
40 | * Interrupts from INTSR2 | ||
41 | */ | ||
42 | #define IRQ_KBDINT (16+0) /* bit 0 */ | ||
43 | #define IRQ_SS2RX (16+1) /* bit 1 */ | ||
44 | #define IRQ_SS2TX (16+2) /* bit 2 */ | ||
45 | #define IRQ_UTXINT2 (16+12) /* bit 12 */ | ||
46 | #define IRQ_URXINT2 (16+13) /* bit 13 */ | ||
47 | |||
48 | #define INT2_IRQS (0x30070000) | ||
49 | |||
50 | #define NR_IRQS 30 | ||
diff --git a/arch/arm/mach-clps711x/include/mach/syspld.h b/arch/arm/mach-clps711x/include/mach/syspld.h index f7f4c1201898..9a433155bf58 100644 --- a/arch/arm/mach-clps711x/include/mach/syspld.h +++ b/arch/arm/mach-clps711x/include/mach/syspld.h | |||
@@ -23,14 +23,9 @@ | |||
23 | #define __ASM_ARCH_SYSPLD_H | 23 | #define __ASM_ARCH_SYSPLD_H |
24 | 24 | ||
25 | #define SYSPLD_PHYS_BASE (0x10000000) | 25 | #define SYSPLD_PHYS_BASE (0x10000000) |
26 | #define SYSPLD_VIRT_BASE IO_ADDRESS(SYSPLD_PHYS_BASE) | ||
26 | 27 | ||
27 | #ifndef __ASSEMBLY__ | 28 | #define SYSPLD_REG(type, off) (*(volatile type *)(SYSPLD_VIRT_BASE + (off))) |
28 | #include <asm/types.h> | ||
29 | |||
30 | #define SYSPLD_REG(type,off) (*(volatile type *)(SYSPLD_BASE + off)) | ||
31 | #else | ||
32 | #define SYSPLD_REG(type,off) (off) | ||
33 | #endif | ||
34 | 29 | ||
35 | #define PLD_INT SYSPLD_REG(u32, 0x000000) | 30 | #define PLD_INT SYSPLD_REG(u32, 0x000000) |
36 | #define PLD_INT_PENIRQ (1 << 5) | 31 | #define PLD_INT_PENIRQ (1 << 5) |
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c deleted file mode 100644 index b752b586fc2f..000000000000 --- a/arch/arm/mach-clps711x/p720t.c +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/p720t.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/slab.h> | ||
27 | #include <linux/leds.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/page.h> | ||
32 | #include <asm/setup.h> | ||
33 | #include <asm/sizes.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <mach/syspld.h> | ||
38 | |||
39 | #include <asm/hardware/clps7111.h> | ||
40 | |||
41 | #include "common.h" | ||
42 | |||
43 | /* | ||
44 | * Map the P720T system PLD. It occupies two address spaces: | ||
45 | * SYSPLD_PHYS_BASE and SYSPLD_PHYS_BASE + 0x00400000 | ||
46 | * We map both here. | ||
47 | */ | ||
48 | static struct map_desc p720t_io_desc[] __initdata = { | ||
49 | { | ||
50 | .virtual = SYSPLD_VIRT_BASE, | ||
51 | .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | ||
52 | .length = SZ_1M, | ||
53 | .type = MT_DEVICE | ||
54 | }, { | ||
55 | .virtual = 0xfe400000, | ||
56 | .pfn = __phys_to_pfn(0x10400000), | ||
57 | .length = SZ_1M, | ||
58 | .type = MT_DEVICE | ||
59 | } | ||
60 | }; | ||
61 | |||
62 | static void __init | ||
63 | fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) | ||
64 | { | ||
65 | /* | ||
66 | * Our bootloader doesn't setup any tags (yet). | ||
67 | */ | ||
68 | if (tag->hdr.tag != ATAG_CORE) { | ||
69 | tag->hdr.tag = ATAG_CORE; | ||
70 | tag->hdr.size = tag_size(tag_core); | ||
71 | tag->u.core.flags = 0; | ||
72 | tag->u.core.pagesize = PAGE_SIZE; | ||
73 | tag->u.core.rootdev = 0x0100; | ||
74 | |||
75 | tag = tag_next(tag); | ||
76 | tag->hdr.tag = ATAG_MEM; | ||
77 | tag->hdr.size = tag_size(tag_mem32); | ||
78 | tag->u.mem.size = 4096; | ||
79 | tag->u.mem.start = PHYS_OFFSET; | ||
80 | |||
81 | tag = tag_next(tag); | ||
82 | tag->hdr.tag = ATAG_NONE; | ||
83 | tag->hdr.size = 0; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | static void __init p720t_map_io(void) | ||
88 | { | ||
89 | clps711x_map_io(); | ||
90 | iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); | ||
91 | } | ||
92 | |||
93 | static void __init p720t_init_early(void) | ||
94 | { | ||
95 | /* | ||
96 | * Power down as much as possible in case we don't | ||
97 | * have the drivers loaded. | ||
98 | */ | ||
99 | PLD_LCDEN = 0; | ||
100 | PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | ||
101 | |||
102 | PLD_KBD = 0; | ||
103 | PLD_IO = 0; | ||
104 | PLD_IRDA = 0; | ||
105 | PLD_CODEC = 0; | ||
106 | PLD_TCH = 0; | ||
107 | PLD_SPI = 0; | ||
108 | if (!IS_ENABLED(CONFIG_DEBUG_LL)) { | ||
109 | PLD_COM2 = 0; | ||
110 | PLD_COM1 = 0; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | /* | ||
115 | * LED controled by CPLD | ||
116 | */ | ||
117 | #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) | ||
118 | static void p720t_led_set(struct led_classdev *cdev, | ||
119 | enum led_brightness b) | ||
120 | { | ||
121 | u8 reg = clps_readb(PDDR); | ||
122 | |||
123 | if (b != LED_OFF) | ||
124 | reg |= 0x1; | ||
125 | else | ||
126 | reg &= ~0x1; | ||
127 | |||
128 | clps_writeb(reg, PDDR); | ||
129 | } | ||
130 | |||
131 | static enum led_brightness p720t_led_get(struct led_classdev *cdev) | ||
132 | { | ||
133 | u8 reg = clps_readb(PDDR); | ||
134 | |||
135 | return (reg & 0x1) ? LED_FULL : LED_OFF; | ||
136 | } | ||
137 | |||
138 | static int __init p720t_leds_init(void) | ||
139 | { | ||
140 | |||
141 | struct led_classdev *cdev; | ||
142 | int ret; | ||
143 | |||
144 | if (!machine_is_p720t()) | ||
145 | return -ENODEV; | ||
146 | |||
147 | cdev = kzalloc(sizeof(*cdev), GFP_KERNEL); | ||
148 | if (!cdev) | ||
149 | return -ENOMEM; | ||
150 | |||
151 | cdev->name = "p720t:0"; | ||
152 | cdev->brightness_set = p720t_led_set; | ||
153 | cdev->brightness_get = p720t_led_get; | ||
154 | cdev->default_trigger = "heartbeat"; | ||
155 | |||
156 | ret = led_classdev_register(NULL, cdev); | ||
157 | if (ret < 0) { | ||
158 | kfree(cdev); | ||
159 | return ret; | ||
160 | } | ||
161 | |||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | /* | ||
166 | * Since we may have triggers on any subsystem, defer registration | ||
167 | * until after subsystem_init. | ||
168 | */ | ||
169 | fs_initcall(p720t_leds_init); | ||
170 | #endif | ||
171 | |||
172 | MACHINE_START(P720T, "ARM-Prospector720T") | ||
173 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | ||
174 | .atag_offset = 0x100, | ||
175 | .fixup = fixup_p720t, | ||
176 | .init_early = p720t_init_early, | ||
177 | .map_io = p720t_map_io, | ||
178 | .init_irq = clps711x_init_irq, | ||
179 | .timer = &clps711x_timer, | ||
180 | .restart = clps711x_restart, | ||
181 | MACHINE_END | ||
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 88ebea89abdf..cdf8d0746e79 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -324,7 +324,7 @@ static __init void dm355_evm_init(void) | |||
324 | if (IS_ERR(aemif)) | 324 | if (IS_ERR(aemif)) |
325 | WARN("%s: unable to get AEMIF clock\n", __func__); | 325 | WARN("%s: unable to get AEMIF clock\n", __func__); |
326 | else | 326 | else |
327 | clk_enable(aemif); | 327 | clk_prepare_enable(aemif); |
328 | 328 | ||
329 | platform_add_devices(davinci_evm_devices, | 329 | platform_add_devices(davinci_evm_devices, |
330 | ARRAY_SIZE(davinci_evm_devices)); | 330 | ARRAY_SIZE(davinci_evm_devices)); |
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index 2f88103c6459..d41954507fc2 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -246,7 +246,7 @@ static __init void dm355_leopard_init(void) | |||
246 | if (IS_ERR(aemif)) | 246 | if (IS_ERR(aemif)) |
247 | WARN("%s: unable to get AEMIF clock\n", __func__); | 247 | WARN("%s: unable to get AEMIF clock\n", __func__); |
248 | else | 248 | else |
249 | clk_enable(aemif); | 249 | clk_prepare_enable(aemif); |
250 | 250 | ||
251 | platform_add_devices(davinci_leopard_devices, | 251 | platform_add_devices(davinci_leopard_devices, |
252 | ARRAY_SIZE(davinci_leopard_devices)); | 252 | ARRAY_SIZE(davinci_leopard_devices)); |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 1b4a8adcfdc9..5d49c75388ca 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -478,7 +478,7 @@ static void __init evm_init_cpld(void) | |||
478 | aemif_clk = clk_get(NULL, "aemif"); | 478 | aemif_clk = clk_get(NULL, "aemif"); |
479 | if (IS_ERR(aemif_clk)) | 479 | if (IS_ERR(aemif_clk)) |
480 | return; | 480 | return; |
481 | clk_enable(aemif_clk); | 481 | clk_prepare_enable(aemif_clk); |
482 | 482 | ||
483 | if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE, | 483 | if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE, |
484 | "cpld") == NULL) | 484 | "cpld") == NULL) |
@@ -489,7 +489,7 @@ static void __init evm_init_cpld(void) | |||
489 | SECTION_SIZE); | 489 | SECTION_SIZE); |
490 | fail: | 490 | fail: |
491 | pr_err("ERROR: can't map CPLD\n"); | 491 | pr_err("ERROR: can't map CPLD\n"); |
492 | clk_disable(aemif_clk); | 492 | clk_disable_unprepare(aemif_clk); |
493 | return; | 493 | return; |
494 | } | 494 | } |
495 | 495 | ||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index f8a99ee6bffc..f5e018de7fa5 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -777,7 +777,7 @@ static __init void davinci_evm_init(void) | |||
777 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 777 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
778 | 778 | ||
779 | aemif_clk = clk_get(NULL, "aemif"); | 779 | aemif_clk = clk_get(NULL, "aemif"); |
780 | clk_enable(aemif_clk); | 780 | clk_prepare_enable(aemif_clk); |
781 | 781 | ||
782 | if (HAS_ATA) { | 782 | if (HAS_ATA) { |
783 | if (HAS_NAND || HAS_NOR) | 783 | if (HAS_NAND || HAS_NOR) |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 144bf31d68dd..3e3e3afebf88 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -188,7 +188,7 @@ static __init void davinci_ntosd2_init(void) | |||
188 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 188 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
189 | 189 | ||
190 | aemif_clk = clk_get(NULL, "aemif"); | 190 | aemif_clk = clk_get(NULL, "aemif"); |
191 | clk_enable(aemif_clk); | 191 | clk_prepare_enable(aemif_clk); |
192 | 192 | ||
193 | if (HAS_ATA) { | 193 | if (HAS_ATA) { |
194 | if (HAS_NAND) | 194 | if (HAS_NAND) |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index b90c172d5541..68c5fe01857c 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -212,6 +212,12 @@ static struct clk tptc2_clk = { | |||
212 | .flags = ALWAYS_ENABLED, | 212 | .flags = ALWAYS_ENABLED, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static struct clk pruss_clk = { | ||
216 | .name = "pruss", | ||
217 | .parent = &pll0_sysclk2, | ||
218 | .lpsc = DA8XX_LPSC0_PRUSS, | ||
219 | }; | ||
220 | |||
215 | static struct clk uart0_clk = { | 221 | static struct clk uart0_clk = { |
216 | .name = "uart0", | 222 | .name = "uart0", |
217 | .parent = &pll0_sysclk2, | 223 | .parent = &pll0_sysclk2, |
@@ -385,6 +391,7 @@ static struct clk_lookup da850_clks[] = { | |||
385 | CLK(NULL, "tptc1", &tptc1_clk), | 391 | CLK(NULL, "tptc1", &tptc1_clk), |
386 | CLK(NULL, "tpcc1", &tpcc1_clk), | 392 | CLK(NULL, "tpcc1", &tpcc1_clk), |
387 | CLK(NULL, "tptc2", &tptc2_clk), | 393 | CLK(NULL, "tptc2", &tptc2_clk), |
394 | CLK("pruss_uio", "pruss", &pruss_clk), | ||
388 | CLK(NULL, "uart0", &uart0_clk), | 395 | CLK(NULL, "uart0", &uart0_clk), |
389 | CLK(NULL, "uart1", &uart1_clk), | 396 | CLK(NULL, "uart1", &uart1_clk), |
390 | CLK(NULL, "uart2", &uart2_clk), | 397 | CLK(NULL, "uart2", &uart2_clk), |
@@ -781,12 +788,6 @@ static struct map_desc da850_io_desc[] = { | |||
781 | .length = DA8XX_CP_INTC_SIZE, | 788 | .length = DA8XX_CP_INTC_SIZE, |
782 | .type = MT_DEVICE | 789 | .type = MT_DEVICE |
783 | }, | 790 | }, |
784 | { | ||
785 | .virtual = SRAM_VIRT, | ||
786 | .pfn = __phys_to_pfn(DA8XX_ARM_RAM_BASE), | ||
787 | .length = SZ_8K, | ||
788 | .type = MT_DEVICE | ||
789 | }, | ||
790 | }; | 791 | }; |
791 | 792 | ||
792 | static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE }; | 793 | static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE }; |
@@ -1239,8 +1240,8 @@ static struct davinci_soc_info davinci_soc_info_da850 = { | |||
1239 | .gpio_irq = IRQ_DA8XX_GPIO0, | 1240 | .gpio_irq = IRQ_DA8XX_GPIO0, |
1240 | .serial_dev = &da8xx_serial_device, | 1241 | .serial_dev = &da8xx_serial_device, |
1241 | .emac_pdata = &da8xx_emac_pdata, | 1242 | .emac_pdata = &da8xx_emac_pdata, |
1242 | .sram_dma = DA8XX_ARM_RAM_BASE, | 1243 | .sram_dma = DA8XX_SHARED_RAM_BASE, |
1243 | .sram_len = SZ_8K, | 1244 | .sram_len = SZ_128K, |
1244 | }; | 1245 | }; |
1245 | 1246 | ||
1246 | void __init da850_init(void) | 1247 | void __init da850_init(void) |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index bd2f72b414bc..46c9a0c09ae5 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <mach/time.h> | 22 | #include <mach/time.h> |
23 | #include <mach/da8xx.h> | 23 | #include <mach/da8xx.h> |
24 | #include <mach/cpuidle.h> | 24 | #include <mach/cpuidle.h> |
25 | #include <mach/sram.h> | ||
25 | 26 | ||
26 | #include "clock.h" | 27 | #include "clock.h" |
27 | #include "asp.h" | 28 | #include "asp.h" |
@@ -32,6 +33,7 @@ | |||
32 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ | 33 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ |
33 | #define DA8XX_I2C0_BASE 0x01c22000 | 34 | #define DA8XX_I2C0_BASE 0x01c22000 |
34 | #define DA8XX_RTC_BASE 0x01c23000 | 35 | #define DA8XX_RTC_BASE 0x01c23000 |
36 | #define DA8XX_PRUSS_MEM_BASE 0x01c30000 | ||
35 | #define DA8XX_MMCSD0_BASE 0x01c40000 | 37 | #define DA8XX_MMCSD0_BASE 0x01c40000 |
36 | #define DA8XX_SPI0_BASE 0x01c41000 | 38 | #define DA8XX_SPI0_BASE 0x01c41000 |
37 | #define DA830_SPI1_BASE 0x01e12000 | 39 | #define DA830_SPI1_BASE 0x01e12000 |
@@ -518,6 +520,75 @@ void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata) | |||
518 | } | 520 | } |
519 | } | 521 | } |
520 | 522 | ||
523 | static struct resource da8xx_pruss_resources[] = { | ||
524 | { | ||
525 | .start = DA8XX_PRUSS_MEM_BASE, | ||
526 | .end = DA8XX_PRUSS_MEM_BASE + 0xFFFF, | ||
527 | .flags = IORESOURCE_MEM, | ||
528 | }, | ||
529 | { | ||
530 | .start = IRQ_DA8XX_EVTOUT0, | ||
531 | .end = IRQ_DA8XX_EVTOUT0, | ||
532 | .flags = IORESOURCE_IRQ, | ||
533 | }, | ||
534 | { | ||
535 | .start = IRQ_DA8XX_EVTOUT1, | ||
536 | .end = IRQ_DA8XX_EVTOUT1, | ||
537 | .flags = IORESOURCE_IRQ, | ||
538 | }, | ||
539 | { | ||
540 | .start = IRQ_DA8XX_EVTOUT2, | ||
541 | .end = IRQ_DA8XX_EVTOUT2, | ||
542 | .flags = IORESOURCE_IRQ, | ||
543 | }, | ||
544 | { | ||
545 | .start = IRQ_DA8XX_EVTOUT3, | ||
546 | .end = IRQ_DA8XX_EVTOUT3, | ||
547 | .flags = IORESOURCE_IRQ, | ||
548 | }, | ||
549 | { | ||
550 | .start = IRQ_DA8XX_EVTOUT4, | ||
551 | .end = IRQ_DA8XX_EVTOUT4, | ||
552 | .flags = IORESOURCE_IRQ, | ||
553 | }, | ||
554 | { | ||
555 | .start = IRQ_DA8XX_EVTOUT5, | ||
556 | .end = IRQ_DA8XX_EVTOUT5, | ||
557 | .flags = IORESOURCE_IRQ, | ||
558 | }, | ||
559 | { | ||
560 | .start = IRQ_DA8XX_EVTOUT6, | ||
561 | .end = IRQ_DA8XX_EVTOUT6, | ||
562 | .flags = IORESOURCE_IRQ, | ||
563 | }, | ||
564 | { | ||
565 | .start = IRQ_DA8XX_EVTOUT7, | ||
566 | .end = IRQ_DA8XX_EVTOUT7, | ||
567 | .flags = IORESOURCE_IRQ, | ||
568 | }, | ||
569 | }; | ||
570 | |||
571 | static struct uio_pruss_pdata da8xx_uio_pruss_pdata = { | ||
572 | .pintc_base = 0x4000, | ||
573 | }; | ||
574 | |||
575 | static struct platform_device da8xx_uio_pruss_dev = { | ||
576 | .name = "pruss_uio", | ||
577 | .id = -1, | ||
578 | .num_resources = ARRAY_SIZE(da8xx_pruss_resources), | ||
579 | .resource = da8xx_pruss_resources, | ||
580 | .dev = { | ||
581 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
582 | .platform_data = &da8xx_uio_pruss_pdata, | ||
583 | } | ||
584 | }; | ||
585 | |||
586 | int __init da8xx_register_uio_pruss(void) | ||
587 | { | ||
588 | da8xx_uio_pruss_pdata.sram_pool = sram_get_gen_pool(); | ||
589 | return platform_device_register(&da8xx_uio_pruss_dev); | ||
590 | } | ||
591 | |||
521 | static const struct display_panel disp_panel = { | 592 | static const struct display_panel disp_panel = { |
522 | QVGA, | 593 | QVGA, |
523 | 16, | 594 | 16, |
@@ -900,7 +971,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr) | |||
900 | if (IS_ERR(da850_sata_clk)) | 971 | if (IS_ERR(da850_sata_clk)) |
901 | return PTR_ERR(da850_sata_clk); | 972 | return PTR_ERR(da850_sata_clk); |
902 | 973 | ||
903 | ret = clk_enable(da850_sata_clk); | 974 | ret = clk_prepare_enable(da850_sata_clk); |
904 | if (ret) | 975 | if (ret) |
905 | goto err0; | 976 | goto err0; |
906 | 977 | ||
@@ -931,7 +1002,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr) | |||
931 | return 0; | 1002 | return 0; |
932 | 1003 | ||
933 | err1: | 1004 | err1: |
934 | clk_disable(da850_sata_clk); | 1005 | clk_disable_unprepare(da850_sata_clk); |
935 | err0: | 1006 | err0: |
936 | clk_put(da850_sata_clk); | 1007 | clk_put(da850_sata_clk); |
937 | return ret; | 1008 | return ret; |
@@ -939,7 +1010,7 @@ err0: | |||
939 | 1010 | ||
940 | static void da850_sata_exit(struct device *dev) | 1011 | static void da850_sata_exit(struct device *dev) |
941 | { | 1012 | { |
942 | clk_disable(da850_sata_clk); | 1013 | clk_disable_unprepare(da850_sata_clk); |
943 | clk_put(da850_sata_clk); | 1014 | clk_put(da850_sata_clk); |
944 | } | 1015 | } |
945 | 1016 | ||
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index a255434908db..b49c3b77d55e 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -758,12 +758,6 @@ static struct map_desc dm355_io_desc[] = { | |||
758 | .length = IO_SIZE, | 758 | .length = IO_SIZE, |
759 | .type = MT_DEVICE | 759 | .type = MT_DEVICE |
760 | }, | 760 | }, |
761 | { | ||
762 | .virtual = SRAM_VIRT, | ||
763 | .pfn = __phys_to_pfn(0x00010000), | ||
764 | .length = SZ_32K, | ||
765 | .type = MT_MEMORY_NONCACHED, | ||
766 | }, | ||
767 | }; | 761 | }; |
768 | 762 | ||
769 | /* Contents of JTAG ID register used to identify exact cpu type */ | 763 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index b680c832e0ba..6c3980540be0 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -985,12 +985,6 @@ static struct map_desc dm365_io_desc[] = { | |||
985 | .length = IO_SIZE, | 985 | .length = IO_SIZE, |
986 | .type = MT_DEVICE | 986 | .type = MT_DEVICE |
987 | }, | 987 | }, |
988 | { | ||
989 | .virtual = SRAM_VIRT, | ||
990 | .pfn = __phys_to_pfn(0x00010000), | ||
991 | .length = SZ_32K, | ||
992 | .type = MT_MEMORY_NONCACHED, | ||
993 | }, | ||
994 | }; | 988 | }; |
995 | 989 | ||
996 | static struct resource dm365_ks_resources[] = { | 990 | static struct resource dm365_ks_resources[] = { |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 14e9947bad6e..11c79a3362ef 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -785,12 +785,6 @@ static struct map_desc dm644x_io_desc[] = { | |||
785 | .length = IO_SIZE, | 785 | .length = IO_SIZE, |
786 | .type = MT_DEVICE | 786 | .type = MT_DEVICE |
787 | }, | 787 | }, |
788 | { | ||
789 | .virtual = SRAM_VIRT, | ||
790 | .pfn = __phys_to_pfn(0x00008000), | ||
791 | .length = SZ_16K, | ||
792 | .type = MT_MEMORY_NONCACHED, | ||
793 | }, | ||
794 | }; | 788 | }; |
795 | 789 | ||
796 | /* Contents of JTAG ID register used to identify exact cpu type */ | 790 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 97c0f8e555bd..ac7b431c4c8e 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -756,12 +756,6 @@ static struct map_desc dm646x_io_desc[] = { | |||
756 | .length = IO_SIZE, | 756 | .length = IO_SIZE, |
757 | .type = MT_DEVICE | 757 | .type = MT_DEVICE |
758 | }, | 758 | }, |
759 | { | ||
760 | .virtual = SRAM_VIRT, | ||
761 | .pfn = __phys_to_pfn(0x00010000), | ||
762 | .length = SZ_32K, | ||
763 | .type = MT_MEMORY_NONCACHED, | ||
764 | }, | ||
765 | }; | 759 | }; |
766 | 760 | ||
767 | /* Contents of JTAG ID register used to identify exact cpu type */ | 761 | /* Contents of JTAG ID register used to identify exact cpu type */ |
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index bdc4aa8e672a..046c7238a3d6 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h | |||
@@ -104,8 +104,6 @@ int davinci_pm_init(void); | |||
104 | static inline int davinci_pm_init(void) { return 0; } | 104 | static inline int davinci_pm_init(void) { return 0; } |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | /* standard place to map on-chip SRAMs; they *may* support DMA */ | ||
108 | #define SRAM_VIRT 0xfffe0000 | ||
109 | #define SRAM_SIZE SZ_128K | 107 | #define SRAM_SIZE SZ_128K |
110 | 108 | ||
111 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ | 109 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index aaccdc4528fc..700d311c6854 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/platform_data/mmc-davinci.h> | 26 | #include <linux/platform_data/mmc-davinci.h> |
27 | #include <linux/platform_data/usb-davinci.h> | 27 | #include <linux/platform_data/usb-davinci.h> |
28 | #include <linux/platform_data/spi-davinci.h> | 28 | #include <linux/platform_data/spi-davinci.h> |
29 | #include <linux/platform_data/uio_pruss.h> | ||
29 | 30 | ||
30 | #include <media/davinci/vpif_types.h> | 31 | #include <media/davinci/vpif_types.h> |
31 | 32 | ||
@@ -72,6 +73,7 @@ extern unsigned int da850_max_speed; | |||
72 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 | 73 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 |
73 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 | 74 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 |
74 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 | 75 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 |
76 | #define DA8XX_SHARED_RAM_BASE 0x80000000 | ||
75 | #define DA8XX_ARM_RAM_BASE 0xffff0000 | 77 | #define DA8XX_ARM_RAM_BASE 0xffff0000 |
76 | 78 | ||
77 | void __init da830_init(void); | 79 | void __init da830_init(void); |
@@ -86,6 +88,7 @@ int da8xx_register_watchdog(void); | |||
86 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); | 88 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); |
87 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); | 89 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); |
88 | int da8xx_register_emac(void); | 90 | int da8xx_register_emac(void); |
91 | int da8xx_register_uio_pruss(void); | ||
89 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); | 92 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); |
90 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); | 93 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); |
91 | int da850_register_mmcsd1(struct davinci_mmc_config *config); | 94 | int da850_register_mmcsd1(struct davinci_mmc_config *config); |
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 86a01fa6d3fe..62ad300440f5 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -43,6 +43,7 @@ struct davinci_uart_config { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | extern int davinci_serial_init(struct davinci_uart_config *); | 45 | extern int davinci_serial_init(struct davinci_uart_config *); |
46 | extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate); | ||
46 | #endif | 47 | #endif |
47 | 48 | ||
48 | #endif /* __ASM_ARCH_SERIAL_H */ | 49 | #endif /* __ASM_ARCH_SERIAL_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/sram.h b/arch/arm/mach-davinci/include/mach/sram.h index 111f7cc71e07..4e5db56218b8 100644 --- a/arch/arm/mach-davinci/include/mach/sram.h +++ b/arch/arm/mach-davinci/include/mach/sram.h | |||
@@ -24,4 +24,7 @@ | |||
24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); | 24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); |
25 | extern void sram_free(void *addr, size_t len); | 25 | extern void sram_free(void *addr, size_t len); |
26 | 26 | ||
27 | /* Get the struct gen_pool * for use in platform data */ | ||
28 | extern struct gen_pool *sram_get_gen_pool(void); | ||
29 | |||
27 | #endif /* __MACH_SRAM_H */ | 30 | #endif /* __MACH_SRAM_H */ |
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c index 1875740fe27c..f2625814c3c9 100644 --- a/arch/arm/mach-davinci/serial.c +++ b/arch/arm/mach-davinci/serial.c | |||
@@ -70,11 +70,33 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p) | |||
70 | UART_DM646X_SCR_TX_WATERMARK); | 70 | UART_DM646X_SCR_TX_WATERMARK); |
71 | } | 71 | } |
72 | 72 | ||
73 | int __init davinci_serial_init(struct davinci_uart_config *info) | 73 | /* Enable UART clock and obtain its rate */ |
74 | int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate) | ||
74 | { | 75 | { |
75 | int i; | ||
76 | char name[16]; | 76 | char name[16]; |
77 | struct clk *uart_clk; | 77 | struct clk *clk; |
78 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
79 | struct device *dev = &soc_info->serial_dev->dev; | ||
80 | |||
81 | sprintf(name, "uart%d", instance); | ||
82 | clk = clk_get(dev, name); | ||
83 | if (IS_ERR(clk)) { | ||
84 | pr_err("%s:%d: failed to get UART%d clock\n", | ||
85 | __func__, __LINE__, instance); | ||
86 | return PTR_ERR(clk); | ||
87 | } | ||
88 | |||
89 | clk_prepare_enable(clk); | ||
90 | |||
91 | if (rate) | ||
92 | *rate = clk_get_rate(clk); | ||
93 | |||
94 | return 0; | ||
95 | } | ||
96 | |||
97 | int __init davinci_serial_init(struct davinci_uart_config *info) | ||
98 | { | ||
99 | int i, ret; | ||
78 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 100 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
79 | struct device *dev = &soc_info->serial_dev->dev; | 101 | struct device *dev = &soc_info->serial_dev->dev; |
80 | struct plat_serial8250_port *p = dev->platform_data; | 102 | struct plat_serial8250_port *p = dev->platform_data; |
@@ -87,16 +109,9 @@ int __init davinci_serial_init(struct davinci_uart_config *info) | |||
87 | if (!(info->enabled_uarts & (1 << i))) | 109 | if (!(info->enabled_uarts & (1 << i))) |
88 | continue; | 110 | continue; |
89 | 111 | ||
90 | sprintf(name, "uart%d", i); | 112 | ret = davinci_serial_setup_clk(i, &p->uartclk); |
91 | uart_clk = clk_get(dev, name); | 113 | if (ret) |
92 | if (IS_ERR(uart_clk)) { | ||
93 | printk(KERN_ERR "%s:%d: failed to get UART%d clock\n", | ||
94 | __func__, __LINE__, i); | ||
95 | continue; | 114 | continue; |
96 | } | ||
97 | |||
98 | clk_enable(uart_clk); | ||
99 | p->uartclk = clk_get_rate(uart_clk); | ||
100 | 115 | ||
101 | if (!p->membase && p->mapbase) { | 116 | if (!p->membase && p->mapbase) { |
102 | p->membase = ioremap(p->mapbase, SZ_4K); | 117 | p->membase = ioremap(p->mapbase, SZ_4K); |
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c index db0f7787faf1..c5f7ee5cc80a 100644 --- a/arch/arm/mach-davinci/sram.c +++ b/arch/arm/mach-davinci/sram.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | ||
13 | #include <linux/genalloc.h> | 14 | #include <linux/genalloc.h> |
14 | 15 | ||
15 | #include <mach/common.h> | 16 | #include <mach/common.h> |
@@ -17,6 +18,11 @@ | |||
17 | 18 | ||
18 | static struct gen_pool *sram_pool; | 19 | static struct gen_pool *sram_pool; |
19 | 20 | ||
21 | struct gen_pool *sram_get_gen_pool(void) | ||
22 | { | ||
23 | return sram_pool; | ||
24 | } | ||
25 | |||
20 | void *sram_alloc(size_t len, dma_addr_t *dma) | 26 | void *sram_alloc(size_t len, dma_addr_t *dma) |
21 | { | 27 | { |
22 | unsigned long vaddr; | 28 | unsigned long vaddr; |
@@ -32,7 +38,7 @@ void *sram_alloc(size_t len, dma_addr_t *dma) | |||
32 | return NULL; | 38 | return NULL; |
33 | 39 | ||
34 | if (dma) | 40 | if (dma) |
35 | *dma = dma_base + (vaddr - SRAM_VIRT); | 41 | *dma = gen_pool_virt_to_phys(sram_pool, vaddr); |
36 | return (void *)vaddr; | 42 | return (void *)vaddr; |
37 | 43 | ||
38 | } | 44 | } |
@@ -53,8 +59,10 @@ EXPORT_SYMBOL(sram_free); | |||
53 | */ | 59 | */ |
54 | static int __init sram_init(void) | 60 | static int __init sram_init(void) |
55 | { | 61 | { |
62 | phys_addr_t phys = davinci_soc_info.sram_dma; | ||
56 | unsigned len = davinci_soc_info.sram_len; | 63 | unsigned len = davinci_soc_info.sram_len; |
57 | int status = 0; | 64 | int status = 0; |
65 | void *addr; | ||
58 | 66 | ||
59 | if (len) { | 67 | if (len) { |
60 | len = min_t(unsigned, len, SRAM_SIZE); | 68 | len = min_t(unsigned, len, SRAM_SIZE); |
@@ -62,8 +70,17 @@ static int __init sram_init(void) | |||
62 | if (!sram_pool) | 70 | if (!sram_pool) |
63 | status = -ENOMEM; | 71 | status = -ENOMEM; |
64 | } | 72 | } |
65 | if (sram_pool) | 73 | |
66 | status = gen_pool_add(sram_pool, SRAM_VIRT, len, -1); | 74 | if (sram_pool) { |
75 | addr = ioremap(phys, len); | ||
76 | if (!addr) | ||
77 | return -ENOMEM; | ||
78 | status = gen_pool_add_virt(sram_pool, (unsigned)addr, | ||
79 | phys, len, -1); | ||
80 | if (status < 0) | ||
81 | iounmap(addr); | ||
82 | } | ||
83 | |||
67 | WARN_ON(status < 0); | 84 | WARN_ON(status < 0); |
68 | return status; | 85 | return status; |
69 | } | 86 | } |
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index 75da315b6587..9847938785ca 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c | |||
@@ -379,7 +379,7 @@ static void __init davinci_timer_init(void) | |||
379 | 379 | ||
380 | timer_clk = clk_get(NULL, "timer0"); | 380 | timer_clk = clk_get(NULL, "timer0"); |
381 | BUG_ON(IS_ERR(timer_clk)); | 381 | BUG_ON(IS_ERR(timer_clk)); |
382 | clk_enable(timer_clk); | 382 | clk_prepare_enable(timer_clk); |
383 | 383 | ||
384 | /* init timer hw */ | 384 | /* init timer hw */ |
385 | timer_init(); | 385 | timer_init(); |
@@ -429,7 +429,7 @@ void davinci_watchdog_reset(struct platform_device *pdev) | |||
429 | wd_clk = clk_get(&pdev->dev, NULL); | 429 | wd_clk = clk_get(&pdev->dev, NULL); |
430 | if (WARN_ON(IS_ERR(wd_clk))) | 430 | if (WARN_ON(IS_ERR(wd_clk))) |
431 | return; | 431 | return; |
432 | clk_enable(wd_clk); | 432 | clk_prepare_enable(wd_clk); |
433 | 433 | ||
434 | /* disable, internal clock source */ | 434 | /* disable, internal clock source */ |
435 | __raw_writel(0, base + TCR); | 435 | __raw_writel(0, base + TCR); |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 69d10373a410..070c7b6d3d86 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -67,6 +67,15 @@ config SOC_EXYNOS5250 | |||
67 | help | 67 | help |
68 | Enable EXYNOS5250 SoC support | 68 | Enable EXYNOS5250 SoC support |
69 | 69 | ||
70 | config SOC_EXYNOS5440 | ||
71 | bool "SAMSUNG EXYNOS5440" | ||
72 | default y | ||
73 | depends on ARCH_EXYNOS5 | ||
74 | select ARM_ARCH_TIMER | ||
75 | select AUTO_ZRELADDR | ||
76 | help | ||
77 | Enable EXYNOS5440 SoC support | ||
78 | |||
70 | config EXYNOS4_MCT | 79 | config EXYNOS4_MCT |
71 | bool | 80 | bool |
72 | default y | 81 | default y |
@@ -412,9 +421,9 @@ config MACH_EXYNOS4_DT | |||
412 | 421 | ||
413 | config MACH_EXYNOS5_DT | 422 | config MACH_EXYNOS5_DT |
414 | bool "SAMSUNG EXYNOS5 Machine using device tree" | 423 | bool "SAMSUNG EXYNOS5 Machine using device tree" |
424 | default y | ||
415 | depends on ARCH_EXYNOS5 | 425 | depends on ARCH_EXYNOS5 |
416 | select ARM_AMBA | 426 | select ARM_AMBA |
417 | select SOC_EXYNOS5250 | ||
418 | select USE_OF | 427 | select USE_OF |
419 | help | 428 | help |
420 | Machine support for Samsung EXYNOS5 machine with device tree enabled. | 429 | Machine support for Samsung EXYNOS5 machine with device tree enabled. |
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 0c74bdc6b698..66135eedf491 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile | |||
@@ -14,9 +14,9 @@ obj- := | |||
14 | 14 | ||
15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o | 15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o |
16 | obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o | 16 | obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o |
17 | obj-$(CONFIG_ARCH_EXYNOS5) += clock-exynos5.o | ||
18 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o | 17 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o |
19 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o | 18 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o |
19 | obj-$(CONFIG_SOC_EXYNOS5250) += clock-exynos5.o | ||
20 | 20 | ||
21 | obj-$(CONFIG_PM) += pm.o | 21 | obj-$(CONFIG_PM) += pm.o |
22 | obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o | 22 | obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 0dbee7fef9bd..e05f6cca2c9b 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/of_fdt.h> | ||
21 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
22 | #include <linux/export.h> | 23 | #include <linux/export.h> |
23 | #include <linux/irqdomain.h> | 24 | #include <linux/irqdomain.h> |
@@ -58,9 +59,11 @@ static const char name_exynos4210[] = "EXYNOS4210"; | |||
58 | static const char name_exynos4212[] = "EXYNOS4212"; | 59 | static const char name_exynos4212[] = "EXYNOS4212"; |
59 | static const char name_exynos4412[] = "EXYNOS4412"; | 60 | static const char name_exynos4412[] = "EXYNOS4412"; |
60 | static const char name_exynos5250[] = "EXYNOS5250"; | 61 | static const char name_exynos5250[] = "EXYNOS5250"; |
62 | static const char name_exynos5440[] = "EXYNOS5440"; | ||
61 | 63 | ||
62 | static void exynos4_map_io(void); | 64 | static void exynos4_map_io(void); |
63 | static void exynos5_map_io(void); | 65 | static void exynos5_map_io(void); |
66 | static void exynos5440_map_io(void); | ||
64 | static void exynos4_init_clocks(int xtal); | 67 | static void exynos4_init_clocks(int xtal); |
65 | static void exynos5_init_clocks(int xtal); | 68 | static void exynos5_init_clocks(int xtal); |
66 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 69 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
@@ -98,6 +101,12 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
98 | .init_clocks = exynos5_init_clocks, | 101 | .init_clocks = exynos5_init_clocks, |
99 | .init = exynos_init, | 102 | .init = exynos_init, |
100 | .name = name_exynos5250, | 103 | .name = name_exynos5250, |
104 | }, { | ||
105 | .idcode = EXYNOS5440_SOC_ID, | ||
106 | .idmask = EXYNOS5_SOC_MASK, | ||
107 | .map_io = exynos5440_map_io, | ||
108 | .init = exynos_init, | ||
109 | .name = name_exynos5440, | ||
101 | }, | 110 | }, |
102 | }; | 111 | }; |
103 | 112 | ||
@@ -112,6 +121,17 @@ static struct map_desc exynos_iodesc[] __initdata = { | |||
112 | }, | 121 | }, |
113 | }; | 122 | }; |
114 | 123 | ||
124 | #ifdef CONFIG_ARCH_EXYNOS5 | ||
125 | static struct map_desc exynos5440_iodesc[] __initdata = { | ||
126 | { | ||
127 | .virtual = (unsigned long)S5P_VA_CHIPID, | ||
128 | .pfn = __phys_to_pfn(EXYNOS5440_PA_CHIPID), | ||
129 | .length = SZ_4K, | ||
130 | .type = MT_DEVICE, | ||
131 | }, | ||
132 | }; | ||
133 | #endif | ||
134 | |||
115 | static struct map_desc exynos4_iodesc[] __initdata = { | 135 | static struct map_desc exynos4_iodesc[] __initdata = { |
116 | { | 136 | { |
117 | .virtual = (unsigned long)S3C_VA_SYS, | 137 | .virtual = (unsigned long)S3C_VA_SYS, |
@@ -263,6 +283,15 @@ static struct map_desc exynos5_iodesc[] __initdata = { | |||
263 | }, | 283 | }, |
264 | }; | 284 | }; |
265 | 285 | ||
286 | static struct map_desc exynos5440_iodesc0[] __initdata = { | ||
287 | { | ||
288 | .virtual = (unsigned long)S3C_VA_UART, | ||
289 | .pfn = __phys_to_pfn(EXYNOS5440_PA_UART0), | ||
290 | .length = SZ_512K, | ||
291 | .type = MT_DEVICE, | ||
292 | }, | ||
293 | }; | ||
294 | |||
266 | void exynos4_restart(char mode, const char *cmd) | 295 | void exynos4_restart(char mode, const char *cmd) |
267 | { | 296 | { |
268 | __raw_writel(0x1, S5P_SWRESET); | 297 | __raw_writel(0x1, S5P_SWRESET); |
@@ -270,11 +299,29 @@ void exynos4_restart(char mode, const char *cmd) | |||
270 | 299 | ||
271 | void exynos5_restart(char mode, const char *cmd) | 300 | void exynos5_restart(char mode, const char *cmd) |
272 | { | 301 | { |
273 | __raw_writel(0x1, EXYNOS_SWRESET); | 302 | u32 val; |
303 | void __iomem *addr; | ||
304 | |||
305 | if (of_machine_is_compatible("samsung,exynos5250")) { | ||
306 | val = 0x1; | ||
307 | addr = EXYNOS_SWRESET; | ||
308 | } else if (of_machine_is_compatible("samsung,exynos5440")) { | ||
309 | val = (0x10 << 20) | (0x1 << 16); | ||
310 | addr = EXYNOS5440_SWRESET; | ||
311 | } else { | ||
312 | pr_err("%s: cannot support non-DT\n", __func__); | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | __raw_writel(val, addr); | ||
274 | } | 317 | } |
275 | 318 | ||
276 | void __init exynos_init_late(void) | 319 | void __init exynos_init_late(void) |
277 | { | 320 | { |
321 | if (of_machine_is_compatible("samsung,exynos5440")) | ||
322 | /* to be supported later */ | ||
323 | return; | ||
324 | |||
278 | exynos_pm_late_initcall(); | 325 | exynos_pm_late_initcall(); |
279 | } | 326 | } |
280 | 327 | ||
@@ -286,8 +333,20 @@ void __init exynos_init_late(void) | |||
286 | 333 | ||
287 | void __init exynos_init_io(struct map_desc *mach_desc, int size) | 334 | void __init exynos_init_io(struct map_desc *mach_desc, int size) |
288 | { | 335 | { |
336 | struct map_desc *iodesc = exynos_iodesc; | ||
337 | int iodesc_sz = ARRAY_SIZE(exynos_iodesc); | ||
338 | #if defined(CONFIG_OF) && defined(CONFIG_ARCH_EXYNOS5) | ||
339 | unsigned long root = of_get_flat_dt_root(); | ||
340 | |||
289 | /* initialize the io descriptors we need for initialization */ | 341 | /* initialize the io descriptors we need for initialization */ |
290 | iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc)); | 342 | if (of_flat_dt_is_compatible(root, "samsung,exynos5440")) { |
343 | iodesc = exynos5440_iodesc; | ||
344 | iodesc_sz = ARRAY_SIZE(exynos5440_iodesc); | ||
345 | } | ||
346 | #endif | ||
347 | |||
348 | iotable_init(iodesc, iodesc_sz); | ||
349 | |||
291 | if (mach_desc) | 350 | if (mach_desc) |
292 | iotable_init(mach_desc, size); | 351 | iotable_init(mach_desc, size); |
293 | 352 | ||
@@ -356,6 +415,11 @@ static void __init exynos4_init_clocks(int xtal) | |||
356 | exynos4_setup_clocks(); | 415 | exynos4_setup_clocks(); |
357 | } | 416 | } |
358 | 417 | ||
418 | static void __init exynos5440_map_io(void) | ||
419 | { | ||
420 | iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); | ||
421 | } | ||
422 | |||
359 | static void __init exynos5_init_clocks(int xtal) | 423 | static void __init exynos5_init_clocks(int xtal) |
360 | { | 424 | { |
361 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | 425 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); |
@@ -572,8 +636,9 @@ static int __init combiner_of_init(struct device_node *np, | |||
572 | return 0; | 636 | return 0; |
573 | } | 637 | } |
574 | 638 | ||
575 | static const struct of_device_id exynos4_dt_irq_match[] = { | 639 | static const struct of_device_id exynos_dt_irq_match[] = { |
576 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | 640 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, |
641 | { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, }, | ||
577 | { .compatible = "samsung,exynos4210-combiner", | 642 | { .compatible = "samsung,exynos4210-combiner", |
578 | .data = combiner_of_init, }, | 643 | .data = combiner_of_init, }, |
579 | {}, | 644 | {}, |
@@ -590,7 +655,7 @@ void __init exynos4_init_irq(void) | |||
590 | gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL); | 655 | gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL); |
591 | #ifdef CONFIG_OF | 656 | #ifdef CONFIG_OF |
592 | else | 657 | else |
593 | of_irq_init(exynos4_dt_irq_match); | 658 | of_irq_init(exynos_dt_irq_match); |
594 | #endif | 659 | #endif |
595 | 660 | ||
596 | if (!of_have_populated_dt()) | 661 | if (!of_have_populated_dt()) |
@@ -607,7 +672,7 @@ void __init exynos4_init_irq(void) | |||
607 | void __init exynos5_init_irq(void) | 672 | void __init exynos5_init_irq(void) |
608 | { | 673 | { |
609 | #ifdef CONFIG_OF | 674 | #ifdef CONFIG_OF |
610 | of_irq_init(exynos4_dt_irq_match); | 675 | of_irq_init(exynos_dt_irq_match); |
611 | #endif | 676 | #endif |
612 | /* | 677 | /* |
613 | * The parameters of s5p_init_irq() are for VIC init. | 678 | * The parameters of s5p_init_irq() are for VIC init. |
@@ -637,7 +702,7 @@ static int __init exynos4_l2x0_cache_init(void) | |||
637 | { | 702 | { |
638 | int ret; | 703 | int ret; |
639 | 704 | ||
640 | if (soc_is_exynos5250()) | 705 | if (soc_is_exynos5250() || soc_is_exynos5440()) |
641 | return 0; | 706 | return 0; |
642 | 707 | ||
643 | ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); | 708 | ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); |
@@ -968,6 +1033,8 @@ static int __init exynos_init_irq_eint(void) | |||
968 | } | 1033 | } |
969 | } | 1034 | } |
970 | #endif | 1035 | #endif |
1036 | if (soc_is_exynos5440()) | ||
1037 | return 0; | ||
971 | 1038 | ||
972 | if (soc_is_exynos5250()) | 1039 | if (soc_is_exynos5250()) |
973 | exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); | 1040 | exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); |
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index 6da31152de3a..e0f0ae3e0cf9 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h | |||
@@ -328,6 +328,11 @@ | |||
328 | #define EXYNOS5_IRQ_FIMC_LITE1 IRQ_SPI(126) | 328 | #define EXYNOS5_IRQ_FIMC_LITE1 IRQ_SPI(126) |
329 | #define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127) | 329 | #define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127) |
330 | 330 | ||
331 | /* EXYNOS5440 */ | ||
332 | |||
333 | #define EXYNOS5440_IRQ_UART0 IRQ_SPI(2) | ||
334 | #define EXYNOS5440_IRQ_UART1 IRQ_SPI(3) | ||
335 | |||
331 | #define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2) | 336 | #define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2) |
332 | 337 | ||
333 | #define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0) | 338 | #define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0) |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 872840b2ff45..61b74e12d12b 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define EXYNOS4_PA_ONENAND_DMA 0x0C600000 | 53 | #define EXYNOS4_PA_ONENAND_DMA 0x0C600000 |
54 | 54 | ||
55 | #define EXYNOS_PA_CHIPID 0x10000000 | 55 | #define EXYNOS_PA_CHIPID 0x10000000 |
56 | #define EXYNOS5440_PA_CHIPID 0x00160000 | ||
56 | 57 | ||
57 | #define EXYNOS4_PA_SYSCON 0x10010000 | 58 | #define EXYNOS4_PA_SYSCON 0x10010000 |
58 | #define EXYNOS5_PA_SYSCON 0x10050100 | 59 | #define EXYNOS5_PA_SYSCON 0x10050100 |
@@ -281,6 +282,10 @@ | |||
281 | #define EXYNOS5_PA_UART2 0x12C20000 | 282 | #define EXYNOS5_PA_UART2 0x12C20000 |
282 | #define EXYNOS5_PA_UART3 0x12C30000 | 283 | #define EXYNOS5_PA_UART3 0x12C30000 |
283 | 284 | ||
285 | #define EXYNOS5440_PA_UART0 0x000B0000 | ||
286 | #define EXYNOS5440_PA_UART1 0x000C0000 | ||
287 | #define EXYNOS5440_SZ_UART SZ_256 | ||
288 | |||
284 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) | 289 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) |
285 | 290 | ||
286 | #endif /* __ASM_ARCH_MAP_H */ | 291 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index 70b2795f5283..84428e72cf5e 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #define S5P_SWRESET S5P_PMUREG(0x0400) | 32 | #define S5P_SWRESET S5P_PMUREG(0x0400) |
33 | #define EXYNOS_SWRESET S5P_PMUREG(0x0400) | 33 | #define EXYNOS_SWRESET S5P_PMUREG(0x0400) |
34 | #define EXYNOS5440_SWRESET S5P_PMUREG(0x00C4) | ||
34 | 35 | ||
35 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) | 36 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) |
36 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) | 37 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index eadf4b59e7d2..6df99c06419d 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -77,6 +77,7 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = { | |||
77 | "exynos4210-spi.2", NULL), | 77 | "exynos4210-spi.2", NULL), |
78 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), | 78 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), |
79 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), | 79 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), |
80 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_MDMA1, "dma-pl330.2", NULL), | ||
80 | {}, | 81 | {}, |
81 | }; | 82 | }; |
82 | 83 | ||
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index db1cd8eacf28..f1326be80b91 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/of_platform.h> | 12 | #include <linux/of_platform.h> |
13 | #include <linux/of_fdt.h> | ||
13 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
14 | 15 | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
@@ -75,20 +76,35 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { | |||
75 | {}, | 76 | {}, |
76 | }; | 77 | }; |
77 | 78 | ||
78 | static void __init exynos5250_dt_map_io(void) | 79 | static const struct of_dev_auxdata exynos5440_auxdata_lookup[] __initconst = { |
80 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5440_PA_UART0, | ||
81 | "exynos4210-uart.0", NULL), | ||
82 | {}, | ||
83 | }; | ||
84 | |||
85 | static void __init exynos5_dt_map_io(void) | ||
79 | { | 86 | { |
87 | unsigned long root = of_get_flat_dt_root(); | ||
88 | |||
80 | exynos_init_io(NULL, 0); | 89 | exynos_init_io(NULL, 0); |
81 | s3c24xx_init_clocks(24000000); | 90 | |
91 | if (of_flat_dt_is_compatible(root, "samsung,exynos5250")) | ||
92 | s3c24xx_init_clocks(24000000); | ||
82 | } | 93 | } |
83 | 94 | ||
84 | static void __init exynos5250_dt_machine_init(void) | 95 | static void __init exynos5_dt_machine_init(void) |
85 | { | 96 | { |
86 | of_platform_populate(NULL, of_default_bus_match_table, | 97 | if (of_machine_is_compatible("samsung,exynos5250")) |
87 | exynos5250_auxdata_lookup, NULL); | 98 | of_platform_populate(NULL, of_default_bus_match_table, |
99 | exynos5250_auxdata_lookup, NULL); | ||
100 | else if (of_machine_is_compatible("samsung,exynos5440")) | ||
101 | of_platform_populate(NULL, of_default_bus_match_table, | ||
102 | exynos5440_auxdata_lookup, NULL); | ||
88 | } | 103 | } |
89 | 104 | ||
90 | static char const *exynos5250_dt_compat[] __initdata = { | 105 | static char const *exynos5_dt_compat[] __initdata = { |
91 | "samsung,exynos5250", | 106 | "samsung,exynos5250", |
107 | "samsung,exynos5440", | ||
92 | NULL | 108 | NULL |
93 | }; | 109 | }; |
94 | 110 | ||
@@ -96,11 +112,11 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") | |||
96 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 112 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
97 | .init_irq = exynos5_init_irq, | 113 | .init_irq = exynos5_init_irq, |
98 | .smp = smp_ops(exynos_smp_ops), | 114 | .smp = smp_ops(exynos_smp_ops), |
99 | .map_io = exynos5250_dt_map_io, | 115 | .map_io = exynos5_dt_map_io, |
100 | .handle_irq = gic_handle_irq, | 116 | .handle_irq = gic_handle_irq, |
101 | .init_machine = exynos5250_dt_machine_init, | 117 | .init_machine = exynos5_dt_machine_init, |
102 | .init_late = exynos_init_late, | 118 | .init_late = exynos_init_late, |
103 | .timer = &exynos4_timer, | 119 | .timer = &exynos4_timer, |
104 | .dt_compat = exynos5250_dt_compat, | 120 | .dt_compat = exynos5_dt_compat, |
105 | .restart = exynos5_restart, | 121 | .restart = exynos5_restart, |
106 | MACHINE_END | 122 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c index b601fb8a408b..57668eb68e75 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/arch/arm/mach-exynos/mct.c | |||
@@ -19,7 +19,9 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
22 | #include <linux/of.h> | ||
22 | 23 | ||
24 | #include <asm/arch_timer.h> | ||
23 | #include <asm/hardware/gic.h> | 25 | #include <asm/hardware/gic.h> |
24 | #include <asm/localtimer.h> | 26 | #include <asm/localtimer.h> |
25 | 27 | ||
@@ -476,8 +478,13 @@ static void __init exynos4_timer_resources(void) | |||
476 | #endif /* CONFIG_LOCAL_TIMERS */ | 478 | #endif /* CONFIG_LOCAL_TIMERS */ |
477 | } | 479 | } |
478 | 480 | ||
479 | static void __init exynos4_timer_init(void) | 481 | static void __init exynos_timer_init(void) |
480 | { | 482 | { |
483 | if (soc_is_exynos5440()) { | ||
484 | arch_timer_of_register(); | ||
485 | return; | ||
486 | } | ||
487 | |||
481 | if ((soc_is_exynos4210()) || (soc_is_exynos5250())) | 488 | if ((soc_is_exynos4210()) || (soc_is_exynos5250())) |
482 | mct_int_type = MCT_INT_SPI; | 489 | mct_int_type = MCT_INT_SPI; |
483 | else | 490 | else |
@@ -489,5 +496,5 @@ static void __init exynos4_timer_init(void) | |||
489 | } | 496 | } |
490 | 497 | ||
491 | struct sys_timer exynos4_timer = { | 498 | struct sys_timer exynos4_timer = { |
492 | .init = exynos4_timer_init, | 499 | .init = exynos_timer_init, |
493 | }; | 500 | }; |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index f93d820ecab5..4ca8ff14a5bf 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -36,8 +36,22 @@ | |||
36 | 36 | ||
37 | extern void exynos4_secondary_startup(void); | 37 | extern void exynos4_secondary_startup(void); |
38 | 38 | ||
39 | #define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ | 39 | static inline void __iomem *cpu_boot_reg_base(void) |
40 | S5P_INFORM5 : S5P_VA_SYSRAM) | 40 | { |
41 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) | ||
42 | return S5P_INFORM5; | ||
43 | return S5P_VA_SYSRAM; | ||
44 | } | ||
45 | |||
46 | static inline void __iomem *cpu_boot_reg(int cpu) | ||
47 | { | ||
48 | void __iomem *boot_reg; | ||
49 | |||
50 | boot_reg = cpu_boot_reg_base(); | ||
51 | if (soc_is_exynos4412()) | ||
52 | boot_reg += 4*cpu; | ||
53 | return boot_reg; | ||
54 | } | ||
41 | 55 | ||
42 | /* | 56 | /* |
43 | * Write pen_release in a way that is guaranteed to be visible to all | 57 | * Write pen_release in a way that is guaranteed to be visible to all |
@@ -84,6 +98,7 @@ static void __cpuinit exynos_secondary_init(unsigned int cpu) | |||
84 | static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) | 98 | static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) |
85 | { | 99 | { |
86 | unsigned long timeout; | 100 | unsigned long timeout; |
101 | unsigned long phys_cpu = cpu_logical_map(cpu); | ||
87 | 102 | ||
88 | /* | 103 | /* |
89 | * Set synchronisation state between this boot processor | 104 | * Set synchronisation state between this boot processor |
@@ -99,7 +114,7 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct | |||
99 | * Note that "pen_release" is the hardware CPU ID, whereas | 114 | * Note that "pen_release" is the hardware CPU ID, whereas |
100 | * "cpu" is Linux's internal ID. | 115 | * "cpu" is Linux's internal ID. |
101 | */ | 116 | */ |
102 | write_pen_release(cpu_logical_map(cpu)); | 117 | write_pen_release(phys_cpu); |
103 | 118 | ||
104 | if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { | 119 | if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { |
105 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | 120 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, |
@@ -133,7 +148,7 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct | |||
133 | smp_rmb(); | 148 | smp_rmb(); |
134 | 149 | ||
135 | __raw_writel(virt_to_phys(exynos4_secondary_startup), | 150 | __raw_writel(virt_to_phys(exynos4_secondary_startup), |
136 | CPU1_BOOT_REG); | 151 | cpu_boot_reg(phys_cpu)); |
137 | gic_raise_softirq(cpumask_of(cpu), 0); | 152 | gic_raise_softirq(cpumask_of(cpu), 0); |
138 | 153 | ||
139 | if (pen_release == -1) | 154 | if (pen_release == -1) |
@@ -181,6 +196,8 @@ static void __init exynos_smp_init_cpus(void) | |||
181 | 196 | ||
182 | static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) | 197 | static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) |
183 | { | 198 | { |
199 | int i; | ||
200 | |||
184 | if (!soc_is_exynos5250()) | 201 | if (!soc_is_exynos5250()) |
185 | scu_enable(scu_base_addr()); | 202 | scu_enable(scu_base_addr()); |
186 | 203 | ||
@@ -190,8 +207,9 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) | |||
190 | * until it receives a soft interrupt, and then the | 207 | * until it receives a soft interrupt, and then the |
191 | * secondary CPU branches to this address. | 208 | * secondary CPU branches to this address. |
192 | */ | 209 | */ |
193 | __raw_writel(virt_to_phys(exynos4_secondary_startup), | 210 | for (i = 1; i < max_cpus; ++i) |
194 | CPU1_BOOT_REG); | 211 | __raw_writel(virt_to_phys(exynos4_secondary_startup), |
212 | cpu_boot_reg(cpu_logical_map(i))); | ||
195 | } | 213 | } |
196 | 214 | ||
197 | struct smp_operations exynos_smp_ops __initdata = { | 215 | struct smp_operations exynos_smp_ops __initdata = { |
diff --git a/arch/arm/mach-exynos/setup-i2c0.c b/arch/arm/mach-exynos/setup-i2c0.c index 5700f23629f7..e2d9dfbf102c 100644 --- a/arch/arm/mach-exynos/setup-i2c0.c +++ b/arch/arm/mach-exynos/setup-i2c0.c | |||
@@ -20,7 +20,7 @@ struct platform_device; /* don't need the contents */ | |||
20 | 20 | ||
21 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | 21 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) |
22 | { | 22 | { |
23 | if (soc_is_exynos5250()) | 23 | if (soc_is_exynos5250() || soc_is_exynos5440()) |
24 | /* will be implemented with gpio function */ | 24 | /* will be implemented with gpio function */ |
25 | return; | 25 | return; |
26 | 26 | ||
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig index 0e1d0a42a3ea..551c97e87a78 100644 --- a/arch/arm/mach-highbank/Kconfig +++ b/arch/arm/mach-highbank/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | config ARCH_HIGHBANK | 1 | config ARCH_HIGHBANK |
2 | bool "Calxeda ECX-1000 (Highbank)" if ARCH_MULTI_V7 | 2 | bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7 |
3 | select ARCH_WANT_OPTIONAL_GPIOLIB | 3 | select ARCH_WANT_OPTIONAL_GPIOLIB |
4 | select ARM_AMBA | 4 | select ARM_AMBA |
5 | select ARM_GIC | 5 | select ARM_GIC |
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile index 3ec8bdd25d09..8a1ef576d79f 100644 --- a/arch/arm/mach-highbank/Makefile +++ b/arch/arm/mach-highbank/Makefile | |||
@@ -3,7 +3,6 @@ obj-y := highbank.o system.o smc.o | |||
3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) | 3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) |
4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) | 4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) |
5 | 5 | ||
6 | obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o | ||
7 | obj-$(CONFIG_SMP) += platsmp.o | 6 | obj-$(CONFIG_SMP) += platsmp.o |
8 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 7 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
9 | obj-$(CONFIG_PM_SLEEP) += pm.o | 8 | obj-$(CONFIG_PM_SLEEP) += pm.o |
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index 286ec82a4f63..80235b46cb58 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
@@ -1,12 +1,10 @@ | |||
1 | #ifndef __HIGHBANK_CORE_H | ||
2 | #define __HIGHBANK_CORE_H | ||
3 | |||
1 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | 4 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); |
2 | extern void highbank_clocks_init(void); | 5 | extern void highbank_clocks_init(void); |
3 | extern void highbank_restart(char, const char *); | 6 | extern void highbank_restart(char, const char *); |
4 | extern void __iomem *scu_base_addr; | 7 | extern void __iomem *scu_base_addr; |
5 | #ifdef CONFIG_DEBUG_HIGHBANK_UART | ||
6 | extern void highbank_lluart_map_io(void); | ||
7 | #else | ||
8 | static inline void highbank_lluart_map_io(void) {} | ||
9 | #endif | ||
10 | 8 | ||
11 | #ifdef CONFIG_PM_SLEEP | 9 | #ifdef CONFIG_PM_SLEEP |
12 | extern void highbank_pm_init(void); | 10 | extern void highbank_pm_init(void); |
@@ -18,3 +16,5 @@ extern void highbank_smc1(int fn, int arg); | |||
18 | extern void highbank_cpu_die(unsigned int cpu); | 16 | extern void highbank_cpu_die(unsigned int cpu); |
19 | 17 | ||
20 | extern struct smp_operations highbank_smp_ops; | 18 | extern struct smp_operations highbank_smp_ops; |
19 | |||
20 | #endif | ||
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 40e36a50304c..dc248167d206 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -26,9 +26,9 @@ | |||
26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
27 | #include <linux/amba/bus.h> | 27 | #include <linux/amba/bus.h> |
28 | 28 | ||
29 | #include <asm/arch_timer.h> | ||
29 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
30 | #include <asm/smp_plat.h> | 31 | #include <asm/smp_plat.h> |
31 | #include <asm/smp_scu.h> | ||
32 | #include <asm/smp_twd.h> | 32 | #include <asm/smp_twd.h> |
33 | #include <asm/hardware/arm_timer.h> | 33 | #include <asm/hardware/arm_timer.h> |
34 | #include <asm/hardware/timer-sp.h> | 34 | #include <asm/hardware/timer-sp.h> |
@@ -42,16 +42,7 @@ | |||
42 | #include "sysregs.h" | 42 | #include "sysregs.h" |
43 | 43 | ||
44 | void __iomem *sregs_base; | 44 | void __iomem *sregs_base; |
45 | 45 | void __iomem *scu_base_addr; | |
46 | #define HB_SCU_VIRT_BASE 0xfee00000 | ||
47 | void __iomem *scu_base_addr = ((void __iomem *)(HB_SCU_VIRT_BASE)); | ||
48 | |||
49 | static struct map_desc scu_io_desc __initdata = { | ||
50 | .virtual = HB_SCU_VIRT_BASE, | ||
51 | .pfn = 0, /* run-time */ | ||
52 | .length = SZ_4K, | ||
53 | .type = MT_DEVICE, | ||
54 | }; | ||
55 | 46 | ||
56 | static void __init highbank_scu_map_io(void) | 47 | static void __init highbank_scu_map_io(void) |
57 | { | 48 | { |
@@ -60,14 +51,7 @@ static void __init highbank_scu_map_io(void) | |||
60 | /* Get SCU base */ | 51 | /* Get SCU base */ |
61 | asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base)); | 52 | asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base)); |
62 | 53 | ||
63 | scu_io_desc.pfn = __phys_to_pfn(base); | 54 | scu_base_addr = ioremap(base, SZ_4K); |
64 | iotable_init(&scu_io_desc, 1); | ||
65 | } | ||
66 | |||
67 | static void __init highbank_map_io(void) | ||
68 | { | ||
69 | highbank_scu_map_io(); | ||
70 | highbank_lluart_map_io(); | ||
71 | } | 55 | } |
72 | 56 | ||
73 | #define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) | 57 | #define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) |
@@ -83,6 +67,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr) | |||
83 | } | 67 | } |
84 | 68 | ||
85 | const static struct of_device_id irq_match[] = { | 69 | const static struct of_device_id irq_match[] = { |
70 | { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, }, | ||
86 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | 71 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, |
87 | {} | 72 | {} |
88 | }; | 73 | }; |
@@ -99,6 +84,9 @@ static void __init highbank_init_irq(void) | |||
99 | { | 84 | { |
100 | of_irq_init(irq_match); | 85 | of_irq_init(irq_match); |
101 | 86 | ||
87 | if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) | ||
88 | highbank_scu_map_io(); | ||
89 | |||
102 | #ifdef CONFIG_CACHE_L2X0 | 90 | #ifdef CONFIG_CACHE_L2X0 |
103 | /* Enable PL310 L2 Cache controller */ | 91 | /* Enable PL310 L2 Cache controller */ |
104 | highbank_smc1(0x102, 0x1); | 92 | highbank_smc1(0x102, 0x1); |
@@ -136,6 +124,9 @@ static void __init highbank_timer_init(void) | |||
136 | sp804_clockevents_init(timer_base, irq, "timer0"); | 124 | sp804_clockevents_init(timer_base, irq, "timer0"); |
137 | 125 | ||
138 | twd_local_timer_of_register(); | 126 | twd_local_timer_of_register(); |
127 | |||
128 | arch_timer_of_register(); | ||
129 | arch_timer_sched_clock_init(); | ||
139 | } | 130 | } |
140 | 131 | ||
141 | static struct sys_timer highbank_timer = { | 132 | static struct sys_timer highbank_timer = { |
@@ -145,7 +136,6 @@ static struct sys_timer highbank_timer = { | |||
145 | static void highbank_power_off(void) | 136 | static void highbank_power_off(void) |
146 | { | 137 | { |
147 | hignbank_set_pwr_shutdown(); | 138 | hignbank_set_pwr_shutdown(); |
148 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
149 | 139 | ||
150 | while (1) | 140 | while (1) |
151 | cpu_do_idle(); | 141 | cpu_do_idle(); |
@@ -211,12 +201,13 @@ static void __init highbank_init(void) | |||
211 | 201 | ||
212 | static const char *highbank_match[] __initconst = { | 202 | static const char *highbank_match[] __initconst = { |
213 | "calxeda,highbank", | 203 | "calxeda,highbank", |
204 | "calxeda,ecx-2000", | ||
214 | NULL, | 205 | NULL, |
215 | }; | 206 | }; |
216 | 207 | ||
217 | DT_MACHINE_START(HIGHBANK, "Highbank") | 208 | DT_MACHINE_START(HIGHBANK, "Highbank") |
218 | .smp = smp_ops(highbank_smp_ops), | 209 | .smp = smp_ops(highbank_smp_ops), |
219 | .map_io = highbank_map_io, | 210 | .map_io = debug_ll_io_init, |
220 | .init_irq = highbank_init_irq, | 211 | .init_irq = highbank_init_irq, |
221 | .timer = &highbank_timer, | 212 | .timer = &highbank_timer, |
222 | .handle_irq = gic_handle_irq, | 213 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c index 2c1b8c3c8e45..7b60faccd551 100644 --- a/arch/arm/mach-highbank/hotplug.c +++ b/arch/arm/mach-highbank/hotplug.c | |||
@@ -14,13 +14,11 @@ | |||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/errno.h> | ||
18 | #include <linux/smp.h> | ||
19 | 17 | ||
20 | #include <asm/smp_scu.h> | ||
21 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
22 | 19 | ||
23 | #include "core.h" | 20 | #include "core.h" |
21 | #include "sysregs.h" | ||
24 | 22 | ||
25 | extern void secondary_startup(void); | 23 | extern void secondary_startup(void); |
26 | 24 | ||
@@ -33,7 +31,7 @@ void __ref highbank_cpu_die(unsigned int cpu) | |||
33 | flush_cache_all(); | 31 | flush_cache_all(); |
34 | 32 | ||
35 | highbank_set_cpu_jump(cpu, secondary_startup); | 33 | highbank_set_cpu_jump(cpu, secondary_startup); |
36 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | 34 | highbank_set_core_pwr(); |
37 | 35 | ||
38 | cpu_do_idle(); | 36 | cpu_do_idle(); |
39 | 37 | ||
diff --git a/arch/arm/mach-highbank/lluart.c b/arch/arm/mach-highbank/lluart.c deleted file mode 100644 index 371575019f33..000000000000 --- a/arch/arm/mach-highbank/lluart.c +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <asm/page.h> | ||
18 | #include <asm/sizes.h> | ||
19 | #include <asm/mach/map.h> | ||
20 | |||
21 | #define HB_DEBUG_LL_PHYS_BASE 0xfff36000 | ||
22 | #define HB_DEBUG_LL_VIRT_BASE 0xfee36000 | ||
23 | |||
24 | static struct map_desc lluart_io_desc __initdata = { | ||
25 | .virtual = HB_DEBUG_LL_VIRT_BASE, | ||
26 | .pfn = __phys_to_pfn(HB_DEBUG_LL_PHYS_BASE), | ||
27 | .length = SZ_4K, | ||
28 | .type = MT_DEVICE, | ||
29 | }; | ||
30 | |||
31 | void __init highbank_lluart_map_io(void) | ||
32 | { | ||
33 | iotable_init(&lluart_io_desc, 1); | ||
34 | } | ||
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c index fa9560ec6e70..1129957f6c1d 100644 --- a/arch/arm/mach-highbank/platsmp.c +++ b/arch/arm/mach-highbank/platsmp.c | |||
@@ -42,9 +42,7 @@ static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struc | |||
42 | */ | 42 | */ |
43 | static void __init highbank_smp_init_cpus(void) | 43 | static void __init highbank_smp_init_cpus(void) |
44 | { | 44 | { |
45 | unsigned int i, ncores; | 45 | unsigned int i, ncores = 4; |
46 | |||
47 | ncores = scu_get_core_count(scu_base_addr); | ||
48 | 46 | ||
49 | /* sanity check */ | 47 | /* sanity check */ |
50 | if (ncores > NR_CPUS) { | 48 | if (ncores > NR_CPUS) { |
@@ -65,7 +63,8 @@ static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) | |||
65 | { | 63 | { |
66 | int i; | 64 | int i; |
67 | 65 | ||
68 | scu_enable(scu_base_addr); | 66 | if (scu_base_addr) |
67 | scu_enable(scu_base_addr); | ||
69 | 68 | ||
70 | /* | 69 | /* |
71 | * Write the address of secondary startup into the jump table | 70 | * Write the address of secondary startup into the jump table |
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index de866f21331f..74aa135966f0 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/suspend.h> | 19 | #include <linux/suspend.h> |
20 | 20 | ||
21 | #include <asm/proc-fns.h> | 21 | #include <asm/proc-fns.h> |
22 | #include <asm/smp_scu.h> | ||
23 | #include <asm/suspend.h> | 22 | #include <asm/suspend.h> |
24 | 23 | ||
25 | #include "core.h" | 24 | #include "core.h" |
@@ -35,8 +34,6 @@ static int highbank_pm_enter(suspend_state_t state) | |||
35 | { | 34 | { |
36 | hignbank_set_pwr_suspend(); | 35 | hignbank_set_pwr_suspend(); |
37 | highbank_set_cpu_jump(0, cpu_resume); | 36 | highbank_set_cpu_jump(0, cpu_resume); |
38 | |||
39 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
40 | cpu_suspend(0, highbank_suspend_finish); | 37 | cpu_suspend(0, highbank_suspend_finish); |
41 | 38 | ||
42 | return 0; | 39 | return 0; |
diff --git a/arch/arm/mach-highbank/sysregs.h b/arch/arm/mach-highbank/sysregs.h index 0e913389f445..e13e8ea7c6cb 100644 --- a/arch/arm/mach-highbank/sysregs.h +++ b/arch/arm/mach-highbank/sysregs.h | |||
@@ -17,6 +17,10 @@ | |||
17 | #define _MACH_HIGHBANK__SYSREGS_H_ | 17 | #define _MACH_HIGHBANK__SYSREGS_H_ |
18 | 18 | ||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/smp.h> | ||
21 | #include <asm/smp_plat.h> | ||
22 | #include <asm/smp_scu.h> | ||
23 | #include "core.h" | ||
20 | 24 | ||
21 | extern void __iomem *sregs_base; | 25 | extern void __iomem *sregs_base; |
22 | 26 | ||
@@ -29,24 +33,39 @@ extern void __iomem *sregs_base; | |||
29 | #define HB_PWR_HARD_RESET 2 | 33 | #define HB_PWR_HARD_RESET 2 |
30 | #define HB_PWR_SHUTDOWN 3 | 34 | #define HB_PWR_SHUTDOWN 3 |
31 | 35 | ||
36 | #define SREG_CPU_PWR_CTRL(c) (0x200 + ((c) * 4)) | ||
37 | |||
38 | static inline void highbank_set_core_pwr(void) | ||
39 | { | ||
40 | int cpu = cpu_logical_map(smp_processor_id()); | ||
41 | if (scu_base_addr) | ||
42 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
43 | else | ||
44 | writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); | ||
45 | } | ||
46 | |||
32 | static inline void hignbank_set_pwr_suspend(void) | 47 | static inline void hignbank_set_pwr_suspend(void) |
33 | { | 48 | { |
34 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); | 49 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); |
50 | highbank_set_core_pwr(); | ||
35 | } | 51 | } |
36 | 52 | ||
37 | static inline void hignbank_set_pwr_shutdown(void) | 53 | static inline void hignbank_set_pwr_shutdown(void) |
38 | { | 54 | { |
39 | writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); | 55 | writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); |
56 | highbank_set_core_pwr(); | ||
40 | } | 57 | } |
41 | 58 | ||
42 | static inline void hignbank_set_pwr_soft_reset(void) | 59 | static inline void hignbank_set_pwr_soft_reset(void) |
43 | { | 60 | { |
44 | writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); | 61 | writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); |
62 | highbank_set_core_pwr(); | ||
45 | } | 63 | } |
46 | 64 | ||
47 | static inline void hignbank_set_pwr_hard_reset(void) | 65 | static inline void hignbank_set_pwr_hard_reset(void) |
48 | { | 66 | { |
49 | writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); | 67 | writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); |
68 | highbank_set_core_pwr(); | ||
50 | } | 69 | } |
51 | 70 | ||
52 | #endif | 71 | #endif |
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c index 86e37cd9376c..aed96ad9bd4a 100644 --- a/arch/arm/mach-highbank/system.c +++ b/arch/arm/mach-highbank/system.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <asm/smp_scu.h> | ||
18 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
19 | 18 | ||
20 | #include "core.h" | 19 | #include "core.h" |
@@ -27,7 +26,6 @@ void highbank_restart(char mode, const char *cmd) | |||
27 | else | 26 | else |
28 | hignbank_set_pwr_soft_reset(); | 27 | hignbank_set_pwr_soft_reset(); |
29 | 28 | ||
30 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | ||
31 | while (1) | 29 | while (1) |
32 | cpu_do_idle(); | 30 | cpu_do_idle(); |
33 | } | 31 | } |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index f1bf610e2900..4e24b8c77eb4 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -394,6 +394,7 @@ config MACH_IMX27_VISSTRIM_M10 | |||
394 | select IMX_HAVE_PLATFORM_IMX_SSI | 394 | select IMX_HAVE_PLATFORM_IMX_SSI |
395 | select IMX_HAVE_PLATFORM_IMX_UART | 395 | select IMX_HAVE_PLATFORM_IMX_UART |
396 | select IMX_HAVE_PLATFORM_MX2_CAMERA | 396 | select IMX_HAVE_PLATFORM_MX2_CAMERA |
397 | select IMX_HAVE_PLATFORM_MX2_EMMA | ||
397 | select IMX_HAVE_PLATFORM_MXC_EHCI | 398 | select IMX_HAVE_PLATFORM_MXC_EHCI |
398 | select IMX_HAVE_PLATFORM_MXC_MMC | 399 | select IMX_HAVE_PLATFORM_MXC_MMC |
399 | select LEDS_GPIO_REGISTER | 400 | select LEDS_GPIO_REGISTER |
@@ -820,6 +821,7 @@ config SOC_IMX53 | |||
820 | select ARCH_MX5 | 821 | select ARCH_MX5 |
821 | select ARCH_MX53 | 822 | select ARCH_MX53 |
822 | select HAVE_CAN_FLEXCAN if CAN | 823 | select HAVE_CAN_FLEXCAN if CAN |
824 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
823 | select PINCTRL | 825 | select PINCTRL |
824 | select PINCTRL_IMX53 | 826 | select PINCTRL_IMX53 |
825 | select SOC_IMX5 | 827 | select SOC_IMX5 |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 585ab256c58f..4c1d1e4efc74 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -51,8 +51,10 @@ | |||
51 | 51 | ||
52 | static const char *vpu_sel_clks[] = { "spll", "mpll_main2", }; | 52 | static const char *vpu_sel_clks[] = { "spll", "mpll_main2", }; |
53 | static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", }; | 53 | static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", }; |
54 | static const char *mpll_sel_clks[] = { "fpm", "mpll_osc_sel", }; | ||
55 | static const char *mpll_osc_sel_clks[] = { "ckih", "ckih_div1p5", }; | ||
54 | static const char *clko_sel_clks[] = { | 56 | static const char *clko_sel_clks[] = { |
55 | "ckil", "prem", "ckih", "ckih", | 57 | "ckil", "fpm", "ckih", "ckih", |
56 | "ckih", "mpll", "spll", "cpu_div", | 58 | "ckih", "mpll", "spll", "cpu_div", |
57 | "ahb", "ipg", "per1_div", "per2_div", | 59 | "ahb", "ipg", "per1_div", "per2_div", |
58 | "per3_div", "per4_div", "ssi1_div", "ssi2_div", | 60 | "per3_div", "per4_div", "ssi1_div", "ssi2_div", |
@@ -79,7 +81,8 @@ enum mx27_clks { | |||
79 | vpu_ahb_gate, fec_ahb_gate, emma_ahb_gate, emi_ahb_gate, dma_ahb_gate, | 81 | vpu_ahb_gate, fec_ahb_gate, emma_ahb_gate, emi_ahb_gate, dma_ahb_gate, |
80 | csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate, | 82 | csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate, |
81 | uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate, | 83 | uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate, |
82 | uart2_ipg_gate, uart1_ipg_gate, clk_max | 84 | uart2_ipg_gate, uart1_ipg_gate, ckih_div1p5, fpm, mpll_osc_sel, |
85 | mpll_sel, clk_max | ||
83 | }; | 86 | }; |
84 | 87 | ||
85 | static struct clk *clk[clk_max]; | 88 | static struct clk *clk[clk_max]; |
@@ -91,7 +94,15 @@ int __init mx27_clocks_init(unsigned long fref) | |||
91 | clk[dummy] = imx_clk_fixed("dummy", 0); | 94 | clk[dummy] = imx_clk_fixed("dummy", 0); |
92 | clk[ckih] = imx_clk_fixed("ckih", fref); | 95 | clk[ckih] = imx_clk_fixed("ckih", fref); |
93 | clk[ckil] = imx_clk_fixed("ckil", 32768); | 96 | clk[ckil] = imx_clk_fixed("ckil", 32768); |
94 | clk[mpll] = imx_clk_pllv1("mpll", "ckih", CCM_MPCTL0); | 97 | clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1); |
98 | clk[ckih_div1p5] = imx_clk_fixed_factor("ckih_div1p5", "ckih", 2, 3); | ||
99 | |||
100 | clk[mpll_osc_sel] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, | ||
101 | mpll_osc_sel_clks, | ||
102 | ARRAY_SIZE(mpll_osc_sel_clks)); | ||
103 | clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, | ||
104 | ARRAY_SIZE(mpll_sel_clks)); | ||
105 | clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); | ||
95 | clk[spll] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0); | 106 | clk[spll] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0); |
96 | clk[mpll_main2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3); | 107 | clk[mpll_main2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3); |
97 | 108 | ||
@@ -224,6 +235,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
224 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); | 235 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); |
225 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); | 236 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); |
226 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); | 237 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); |
238 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); | ||
227 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 239 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); |
228 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); | 240 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); |
229 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); | 241 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index abb71f6b4d60..e8c0473c7568 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -87,6 +87,7 @@ enum imx5_clks { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | static struct clk *clk[clk_max]; | 89 | static struct clk *clk[clk_max]; |
90 | static struct clk_onecell_data clk_data; | ||
90 | 91 | ||
91 | static void __init mx5_clocks_common_init(unsigned long rate_ckil, | 92 | static void __init mx5_clocks_common_init(unsigned long rate_ckil, |
92 | unsigned long rate_osc, unsigned long rate_ckih1, | 93 | unsigned long rate_osc, unsigned long rate_ckih1, |
@@ -305,6 +306,10 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
305 | clk_prepare_enable(clk[spba]); | 306 | clk_prepare_enable(clk[spba]); |
306 | clk_prepare_enable(clk[emi_fast_gate]); /* fec */ | 307 | clk_prepare_enable(clk[emi_fast_gate]); /* fec */ |
307 | clk_prepare_enable(clk[emi_slow_gate]); /* eim */ | 308 | clk_prepare_enable(clk[emi_slow_gate]); /* eim */ |
309 | clk_prepare_enable(clk[mipi_hsc1_gate]); | ||
310 | clk_prepare_enable(clk[mipi_hsc2_gate]); | ||
311 | clk_prepare_enable(clk[mipi_esc_gate]); | ||
312 | clk_prepare_enable(clk[mipi_hsp_gate]); | ||
308 | clk_prepare_enable(clk[tmax1]); | 313 | clk_prepare_enable(clk[tmax1]); |
309 | clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ | 314 | clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ |
310 | clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ | 315 | clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ |
@@ -314,6 +319,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
314 | unsigned long rate_ckih1, unsigned long rate_ckih2) | 319 | unsigned long rate_ckih1, unsigned long rate_ckih2) |
315 | { | 320 | { |
316 | int i; | 321 | int i; |
322 | struct device_node *np; | ||
317 | 323 | ||
318 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); | 324 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); |
319 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); | 325 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); |
@@ -342,16 +348,20 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
342 | pr_err("i.MX51 clk %d: register failed with %ld\n", | 348 | pr_err("i.MX51 clk %d: register failed with %ld\n", |
343 | i, PTR_ERR(clk[i])); | 349 | i, PTR_ERR(clk[i])); |
344 | 350 | ||
351 | np = of_find_compatible_node(NULL, NULL, "fsl,imx51-ccm"); | ||
352 | clk_data.clks = clk; | ||
353 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
354 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
355 | |||
345 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | 356 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); |
346 | 357 | ||
347 | clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); | 358 | clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); |
348 | clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); | 359 | clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); |
349 | clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); | 360 | clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); |
350 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); | 361 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); |
351 | clk_register_clkdev(clk[ipu_gate], "bus", "imx51-ipu"); | 362 | clk_register_clkdev(clk[ipu_gate], "bus", "40000000.ipu"); |
352 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx51-ipu"); | 363 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "40000000.ipu"); |
353 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "imx51-ipu"); | 364 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "40000000.ipu"); |
354 | clk_register_clkdev(clk[ipu_gate], "hsp", "imx51-ipu"); | ||
355 | clk_register_clkdev(clk[usb_phy_gate], "phy", "mxc-ehci.0"); | 365 | clk_register_clkdev(clk[usb_phy_gate], "phy", "mxc-ehci.0"); |
356 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx51.0"); | 366 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx51.0"); |
357 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.0"); | 367 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.0"); |
@@ -365,10 +375,6 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
365 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); | 375 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); |
366 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); | 376 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); |
367 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); | 377 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); |
368 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "83fcc000.ssi"); | ||
369 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "70014000.ssi"); | ||
370 | clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "83fe8000.ssi"); | ||
371 | clk_register_clkdev(clk[nfc_gate], NULL, "83fdb000.nand"); | ||
372 | 378 | ||
373 | /* set the usboh3 parent to pll2_sw */ | 379 | /* set the usboh3 parent to pll2_sw */ |
374 | clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); | 380 | clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); |
@@ -392,6 +398,7 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
392 | { | 398 | { |
393 | int i; | 399 | int i; |
394 | unsigned long r; | 400 | unsigned long r; |
401 | struct device_node *np; | ||
395 | 402 | ||
396 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); | 403 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); |
397 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); | 404 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); |
@@ -436,15 +443,20 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
436 | pr_err("i.MX53 clk %d: register failed with %ld\n", | 443 | pr_err("i.MX53 clk %d: register failed with %ld\n", |
437 | i, PTR_ERR(clk[i])); | 444 | i, PTR_ERR(clk[i])); |
438 | 445 | ||
446 | np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm"); | ||
447 | clk_data.clks = clk; | ||
448 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
449 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
450 | |||
439 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | 451 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); |
440 | 452 | ||
441 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); | 453 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); |
442 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); | 454 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); |
443 | clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); | 455 | clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); |
444 | clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu"); | 456 | clk_register_clkdev(clk[ipu_gate], "bus", "18000000.ipu"); |
445 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu"); | 457 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "18000000.ipu"); |
446 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "imx53-ipu"); | 458 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "18000000.ipu"); |
447 | clk_register_clkdev(clk[ipu_gate], "hsp", "imx53-ipu"); | 459 | clk_register_clkdev(clk[ipu_gate], "hsp", "18000000.ipu"); |
448 | clk_register_clkdev(clk[usb_phy1_gate], "usb_phy1", "mxc-ehci.0"); | 460 | clk_register_clkdev(clk[usb_phy1_gate], "usb_phy1", "mxc-ehci.0"); |
449 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx53.0"); | 461 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx53.0"); |
450 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.0"); | 462 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.0"); |
@@ -458,14 +470,6 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
458 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); | 470 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); |
459 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); | 471 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); |
460 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); | 472 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); |
461 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "63fcc000.ssi"); | ||
462 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "50014000.ssi"); | ||
463 | clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "63fd0000.ssi"); | ||
464 | clk_register_clkdev(clk[nfc_gate], NULL, "63fdb000.nand"); | ||
465 | clk_register_clkdev(clk[can1_ipg_gate], "ipg", "53fc8000.can"); | ||
466 | clk_register_clkdev(clk[can1_serial_gate], "per", "53fc8000.can"); | ||
467 | clk_register_clkdev(clk[can2_ipg_gate], "ipg", "53fcc000.can"); | ||
468 | clk_register_clkdev(clk[can2_serial_gate], "per", "53fcc000.can"); | ||
469 | 473 | ||
470 | /* set SDHC root clock to 200MHZ*/ | 474 | /* set SDHC root clock to 200MHZ*/ |
471 | clk_set_rate(clk[esdhc_a_podf], 200000000); | 475 | clk_set_rate(clk[esdhc_a_podf], 200000000); |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index e5a82bb95b52..448476958e7f 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -105,7 +105,7 @@ static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m" | |||
105 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; | 105 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; |
106 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; | 106 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; |
107 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; | 107 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; |
108 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 108 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_pfd1_540m", }; |
109 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 109 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; |
110 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 110 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
111 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 111 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
@@ -152,8 +152,9 @@ enum mx6q_clks { | |||
152 | gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, | 152 | gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, |
153 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | 153 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, |
154 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | 154 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, |
155 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, | 155 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, |
156 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, | 156 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, |
157 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, | ||
157 | clk_max | 158 | clk_max |
158 | }; | 159 | }; |
159 | 160 | ||
@@ -164,6 +165,13 @@ static enum mx6q_clks const clks_init_on[] __initconst = { | |||
164 | mmdc_ch0_axi, rom, | 165 | mmdc_ch0_axi, rom, |
165 | }; | 166 | }; |
166 | 167 | ||
168 | static struct clk_div_table clk_enet_ref_table[] = { | ||
169 | { .val = 0, .div = 20, }, | ||
170 | { .val = 1, .div = 10, }, | ||
171 | { .val = 2, .div = 5, }, | ||
172 | { .val = 3, .div = 4, }, | ||
173 | }; | ||
174 | |||
167 | int __init mx6q_clocks_init(void) | 175 | int __init mx6q_clocks_init(void) |
168 | { | 176 | { |
169 | struct device_node *np; | 177 | struct device_node *np; |
@@ -190,19 +198,29 @@ int __init mx6q_clocks_init(void) | |||
190 | base = of_iomap(np, 0); | 198 | base = of_iomap(np, 0); |
191 | WARN_ON(!base); | 199 | WARN_ON(!base); |
192 | 200 | ||
193 | /* type name parent_name base gate_mask div_mask */ | 201 | /* type name parent_name base div_mask */ |
194 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x2000, 0x7f); | 202 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); |
195 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x2000, 0x1); | 203 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); |
196 | clk[pll3_usb_otg] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x2000, 0x3); | 204 | clk[pll3_usb_otg] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); |
197 | clk[pll4_audio] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x2000, 0x7f); | 205 | clk[pll4_audio] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); |
198 | clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x2000, 0x7f); | 206 | clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); |
199 | clk[pll6_mlb] = imx_clk_pllv3(IMX_PLLV3_MLB, "pll6_mlb", "osc", base + 0xd0, 0x2000, 0x0); | 207 | clk[pll6_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); |
200 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x2000, 0x3); | 208 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3); |
201 | clk[pll8_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll8_enet", "osc", base + 0xe0, 0x182000, 0x3); | 209 | clk[pll8_mlb] = imx_clk_pllv3(IMX_PLLV3_MLB, "pll8_mlb", "osc", base + 0xd0, 0x0); |
202 | 210 | ||
203 | clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6); | 211 | clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6); |
204 | clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6); | 212 | clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6); |
205 | 213 | ||
214 | clk[sata_ref] = imx_clk_fixed_factor("sata_ref", "pll6_enet", 1, 5); | ||
215 | clk[pcie_ref] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 4); | ||
216 | |||
217 | clk[sata_ref_100m] = imx_clk_gate("sata_ref_100m", "sata_ref", base + 0xe0, 20); | ||
218 | clk[pcie_ref_125m] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); | ||
219 | |||
220 | clk[enet_ref] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, | ||
221 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, | ||
222 | &imx_ccm_lock); | ||
223 | |||
206 | /* name parent_name reg idx */ | 224 | /* name parent_name reg idx */ |
207 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); | 225 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); |
208 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); | 226 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); |
@@ -358,7 +376,7 @@ int __init mx6q_clocks_init(void) | |||
358 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); | 376 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); |
359 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); | 377 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); |
360 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); | 378 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); |
361 | clk[mlb] = imx_clk_gate2("mlb", "pll6_mlb", base + 0x74, 18); | 379 | clk[mlb] = imx_clk_gate2("mlb", "pll8_mlb", base + 0x74, 18); |
362 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); | 380 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); |
363 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); | 381 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); |
364 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); | 382 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); |
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c index 36aac947bce1..d09bc3df9a7a 100644 --- a/arch/arm/mach-imx/clk-pllv3.c +++ b/arch/arm/mach-imx/clk-pllv3.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * @clk_hw: clock source | 31 | * @clk_hw: clock source |
32 | * @base: base address of PLL registers | 32 | * @base: base address of PLL registers |
33 | * @powerup_set: set POWER bit to power up the PLL | 33 | * @powerup_set: set POWER bit to power up the PLL |
34 | * @gate_mask: mask of gate bits | ||
35 | * @div_mask: mask of divider bits | 34 | * @div_mask: mask of divider bits |
36 | * | 35 | * |
37 | * IMX PLL clock version 3, found on i.MX6 series. Divider for pllv3 | 36 | * IMX PLL clock version 3, found on i.MX6 series. Divider for pllv3 |
@@ -41,7 +40,6 @@ struct clk_pllv3 { | |||
41 | struct clk_hw hw; | 40 | struct clk_hw hw; |
42 | void __iomem *base; | 41 | void __iomem *base; |
43 | bool powerup_set; | 42 | bool powerup_set; |
44 | u32 gate_mask; | ||
45 | u32 div_mask; | 43 | u32 div_mask; |
46 | }; | 44 | }; |
47 | 45 | ||
@@ -89,7 +87,7 @@ static int clk_pllv3_enable(struct clk_hw *hw) | |||
89 | u32 val; | 87 | u32 val; |
90 | 88 | ||
91 | val = readl_relaxed(pll->base); | 89 | val = readl_relaxed(pll->base); |
92 | val |= pll->gate_mask; | 90 | val |= BM_PLL_ENABLE; |
93 | writel_relaxed(val, pll->base); | 91 | writel_relaxed(val, pll->base); |
94 | 92 | ||
95 | return 0; | 93 | return 0; |
@@ -101,7 +99,7 @@ static void clk_pllv3_disable(struct clk_hw *hw) | |||
101 | u32 val; | 99 | u32 val; |
102 | 100 | ||
103 | val = readl_relaxed(pll->base); | 101 | val = readl_relaxed(pll->base); |
104 | val &= ~pll->gate_mask; | 102 | val &= ~BM_PLL_ENABLE; |
105 | writel_relaxed(val, pll->base); | 103 | writel_relaxed(val, pll->base); |
106 | } | 104 | } |
107 | 105 | ||
@@ -287,66 +285,7 @@ static const struct clk_ops clk_pllv3_av_ops = { | |||
287 | static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, | 285 | static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, |
288 | unsigned long parent_rate) | 286 | unsigned long parent_rate) |
289 | { | 287 | { |
290 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | 288 | return 500000000; |
291 | u32 div = readl_relaxed(pll->base) & pll->div_mask; | ||
292 | |||
293 | switch (div) { | ||
294 | case 0: | ||
295 | return 25000000; | ||
296 | case 1: | ||
297 | return 50000000; | ||
298 | case 2: | ||
299 | return 100000000; | ||
300 | case 3: | ||
301 | return 125000000; | ||
302 | } | ||
303 | |||
304 | return 0; | ||
305 | } | ||
306 | |||
307 | static long clk_pllv3_enet_round_rate(struct clk_hw *hw, unsigned long rate, | ||
308 | unsigned long *prate) | ||
309 | { | ||
310 | if (rate >= 125000000) | ||
311 | rate = 125000000; | ||
312 | else if (rate >= 100000000) | ||
313 | rate = 100000000; | ||
314 | else if (rate >= 50000000) | ||
315 | rate = 50000000; | ||
316 | else | ||
317 | rate = 25000000; | ||
318 | return rate; | ||
319 | } | ||
320 | |||
321 | static int clk_pllv3_enet_set_rate(struct clk_hw *hw, unsigned long rate, | ||
322 | unsigned long parent_rate) | ||
323 | { | ||
324 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
325 | u32 val, div; | ||
326 | |||
327 | switch (rate) { | ||
328 | case 25000000: | ||
329 | div = 0; | ||
330 | break; | ||
331 | case 50000000: | ||
332 | div = 1; | ||
333 | break; | ||
334 | case 100000000: | ||
335 | div = 2; | ||
336 | break; | ||
337 | case 125000000: | ||
338 | div = 3; | ||
339 | break; | ||
340 | default: | ||
341 | return -EINVAL; | ||
342 | } | ||
343 | |||
344 | val = readl_relaxed(pll->base); | ||
345 | val &= ~pll->div_mask; | ||
346 | val |= div; | ||
347 | writel_relaxed(val, pll->base); | ||
348 | |||
349 | return 0; | ||
350 | } | 289 | } |
351 | 290 | ||
352 | static const struct clk_ops clk_pllv3_enet_ops = { | 291 | static const struct clk_ops clk_pllv3_enet_ops = { |
@@ -355,8 +294,6 @@ static const struct clk_ops clk_pllv3_enet_ops = { | |||
355 | .enable = clk_pllv3_enable, | 294 | .enable = clk_pllv3_enable, |
356 | .disable = clk_pllv3_disable, | 295 | .disable = clk_pllv3_disable, |
357 | .recalc_rate = clk_pllv3_enet_recalc_rate, | 296 | .recalc_rate = clk_pllv3_enet_recalc_rate, |
358 | .round_rate = clk_pllv3_enet_round_rate, | ||
359 | .set_rate = clk_pllv3_enet_set_rate, | ||
360 | }; | 297 | }; |
361 | 298 | ||
362 | static const struct clk_ops clk_pllv3_mlb_ops = { | 299 | static const struct clk_ops clk_pllv3_mlb_ops = { |
@@ -368,7 +305,7 @@ static const struct clk_ops clk_pllv3_mlb_ops = { | |||
368 | 305 | ||
369 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | 306 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, |
370 | const char *parent_name, void __iomem *base, | 307 | const char *parent_name, void __iomem *base, |
371 | u32 gate_mask, u32 div_mask) | 308 | u32 div_mask) |
372 | { | 309 | { |
373 | struct clk_pllv3 *pll; | 310 | struct clk_pllv3 *pll; |
374 | const struct clk_ops *ops; | 311 | const struct clk_ops *ops; |
@@ -400,7 +337,6 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | |||
400 | ops = &clk_pllv3_ops; | 337 | ops = &clk_pllv3_ops; |
401 | } | 338 | } |
402 | pll->base = base; | 339 | pll->base = base; |
403 | pll->gate_mask = gate_mask; | ||
404 | pll->div_mask = div_mask; | 340 | pll->div_mask = div_mask; |
405 | 341 | ||
406 | init.name = name; | 342 | init.name = name; |
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h index 5f2d8acca25f..9d1f3b99d1d3 100644 --- a/arch/arm/mach-imx/clk.h +++ b/arch/arm/mach-imx/clk.h | |||
@@ -22,8 +22,7 @@ enum imx_pllv3_type { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | 24 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, |
25 | const char *parent_name, void __iomem *base, u32 gate_mask, | 25 | const char *parent_name, void __iomem *base, u32 div_mask); |
26 | u32 div_mask); | ||
27 | 26 | ||
28 | struct clk *clk_register_gate2(struct device *dev, const char *name, | 27 | struct clk *clk_register_gate2(struct device *dev, const char *name, |
29 | const char *parent_name, unsigned long flags, | 28 | const char *parent_name, unsigned long flags, |
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 8a1ad7972d4c..130962519751 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -53,8 +53,10 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[]; | |||
53 | extern const struct imx_mx2_camera_data imx27_mx2_camera_data; | 53 | extern const struct imx_mx2_camera_data imx27_mx2_camera_data; |
54 | #define imx27_add_mx2_camera(pdata) \ | 54 | #define imx27_add_mx2_camera(pdata) \ |
55 | imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) | 55 | imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) |
56 | |||
57 | extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data; | ||
56 | #define imx27_add_mx2_emmaprp() \ | 58 | #define imx27_add_mx2_emmaprp() \ |
57 | imx_add_mx2_emmaprp(&imx27_mx2_camera_data) | 59 | imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_data) |
58 | 60 | ||
59 | extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data; | 61 | extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data; |
60 | #define imx27_add_mxc_ehci_otg(pdata) \ | 62 | #define imx27_add_mxc_ehci_otg(pdata) \ |
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig index a35d9841f494..9a8f1ca7bcb1 100644 --- a/arch/arm/mach-imx/devices/Kconfig +++ b/arch/arm/mach-imx/devices/Kconfig | |||
@@ -56,6 +56,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA | |||
56 | config IMX_HAVE_PLATFORM_MX2_CAMERA | 56 | config IMX_HAVE_PLATFORM_MX2_CAMERA |
57 | bool | 57 | bool |
58 | 58 | ||
59 | config IMX_HAVE_PLATFORM_MX2_EMMA | ||
60 | bool | ||
61 | |||
59 | config IMX_HAVE_PLATFORM_MXC_EHCI | 62 | config IMX_HAVE_PLATFORM_MXC_EHCI |
60 | bool | 63 | bool |
61 | 64 | ||
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile index 2abe2a5144d0..6acf37e0c119 100644 --- a/arch/arm/mach-imx/devices/Makefile +++ b/arch/arm/mach-imx/devices/Makefile | |||
@@ -30,3 +30,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o | |||
30 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o | 30 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o |
31 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o | 31 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o |
32 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o | 32 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o |
33 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o | ||
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index e4b790b9e2aa..6277baf1b7be 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -232,8 +232,15 @@ struct imx_mx2_camera_data { | |||
232 | struct platform_device *__init imx_add_mx2_camera( | 232 | struct platform_device *__init imx_add_mx2_camera( |
233 | const struct imx_mx2_camera_data *data, | 233 | const struct imx_mx2_camera_data *data, |
234 | const struct mx2_camera_platform_data *pdata); | 234 | const struct mx2_camera_platform_data *pdata); |
235 | |||
236 | |||
237 | struct imx_mx2_emma_data { | ||
238 | resource_size_t iobase; | ||
239 | resource_size_t iosize; | ||
240 | resource_size_t irq; | ||
241 | }; | ||
235 | struct platform_device *__init imx_add_mx2_emmaprp( | 242 | struct platform_device *__init imx_add_mx2_emmaprp( |
236 | const struct imx_mx2_camera_data *data); | 243 | const struct imx_mx2_emma_data *data); |
237 | 244 | ||
238 | #include <linux/platform_data/usb-ehci-mxc.h> | 245 | #include <linux/platform_data/usb-ehci-mxc.h> |
239 | struct imx_mxc_ehci_data { | 246 | struct imx_mxc_ehci_data { |
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c index f4910160346b..b53e1f348f51 100644 --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c | |||
@@ -65,20 +65,3 @@ struct platform_device *__init imx_add_mx2_camera( | |||
65 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | 65 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
66 | } | 66 | } |
67 | 67 | ||
68 | struct platform_device *__init imx_add_mx2_emmaprp( | ||
69 | const struct imx_mx2_camera_data *data) | ||
70 | { | ||
71 | struct resource res[] = { | ||
72 | { | ||
73 | .start = data->iobaseemmaprp, | ||
74 | .end = data->iobaseemmaprp + data->iosizeemmaprp - 1, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, { | ||
77 | .start = data->irqemmaprp, | ||
78 | .end = data->irqemmaprp, | ||
79 | .flags = IORESOURCE_IRQ, | ||
80 | }, | ||
81 | }; | ||
82 | return imx_add_platform_device_dmamask("m2m-emmaprp", 0, | ||
83 | res, 2, NULL, 0, DMA_BIT_MASK(32)); | ||
84 | } | ||
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index 50742990a136..5ffa40c673f8 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c | |||
@@ -19,35 +19,9 @@ | |||
19 | #include "common.h" | 19 | #include "common.h" |
20 | #include "mx51.h" | 20 | #include "mx51.h" |
21 | 21 | ||
22 | /* | ||
23 | * Lookup table for attaching a specific name and platform_data pointer to | ||
24 | * devices as they get created by of_platform_populate(). Ideally this table | ||
25 | * would not exist, but the current clock implementation depends on some devices | ||
26 | * having a specific name. | ||
27 | */ | ||
28 | static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { | ||
29 | OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART1_BASE_ADDR, "imx21-uart.0", NULL), | ||
30 | OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART2_BASE_ADDR, "imx21-uart.1", NULL), | ||
31 | OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART3_BASE_ADDR, "imx21-uart.2", NULL), | ||
32 | OF_DEV_AUXDATA("fsl,imx51-fec", MX51_FEC_BASE_ADDR, "imx27-fec.0", NULL), | ||
33 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC1_BASE_ADDR, "sdhci-esdhc-imx51.0", NULL), | ||
34 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC2_BASE_ADDR, "sdhci-esdhc-imx51.1", NULL), | ||
35 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC3_BASE_ADDR, "sdhci-esdhc-imx51.2", NULL), | ||
36 | OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC4_BASE_ADDR, "sdhci-esdhc-imx51.3", NULL), | ||
37 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), | ||
38 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), | ||
39 | OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), | ||
40 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), | ||
41 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), | ||
42 | OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL), | ||
43 | OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), | ||
44 | { /* sentinel */ } | ||
45 | }; | ||
46 | |||
47 | static void __init imx51_dt_init(void) | 22 | static void __init imx51_dt_init(void) |
48 | { | 23 | { |
49 | of_platform_populate(NULL, of_default_bus_match_table, | 24 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
50 | imx51_auxdata_lookup, NULL); | ||
51 | } | 25 | } |
52 | 26 | ||
53 | static void __init imx51_timer_init(void) | 27 | static void __init imx51_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index e71e62610eba..860284dea0e7 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
@@ -23,34 +23,6 @@ | |||
23 | #include "common.h" | 23 | #include "common.h" |
24 | #include "mx53.h" | 24 | #include "mx53.h" |
25 | 25 | ||
26 | /* | ||
27 | * Lookup table for attaching a specific name and platform_data pointer to | ||
28 | * devices as they get created by of_platform_populate(). Ideally this table | ||
29 | * would not exist, but the current clock implementation depends on some devices | ||
30 | * having a specific name. | ||
31 | */ | ||
32 | static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { | ||
33 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART1_BASE_ADDR, "imx21-uart.0", NULL), | ||
34 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART2_BASE_ADDR, "imx21-uart.1", NULL), | ||
35 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART3_BASE_ADDR, "imx21-uart.2", NULL), | ||
36 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART4_BASE_ADDR, "imx21-uart.3", NULL), | ||
37 | OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART5_BASE_ADDR, "imx21-uart.4", NULL), | ||
38 | OF_DEV_AUXDATA("fsl,imx53-fec", MX53_FEC_BASE_ADDR, "imx25-fec.0", NULL), | ||
39 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC1_BASE_ADDR, "sdhci-esdhc-imx53.0", NULL), | ||
40 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC2_BASE_ADDR, "sdhci-esdhc-imx53.1", NULL), | ||
41 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC3_BASE_ADDR, "sdhci-esdhc-imx53.2", NULL), | ||
42 | OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC4_BASE_ADDR, "sdhci-esdhc-imx53.3", NULL), | ||
43 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), | ||
44 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), | ||
45 | OF_DEV_AUXDATA("fsl,imx53-cspi", MX53_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), | ||
46 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), | ||
47 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), | ||
48 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx21-i2c.2", NULL), | ||
49 | OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", NULL), | ||
50 | OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), | ||
51 | { /* sentinel */ } | ||
52 | }; | ||
53 | |||
54 | static void __init imx53_qsb_init(void) | 26 | static void __init imx53_qsb_init(void) |
55 | { | 27 | { |
56 | struct clk *clk; | 28 | struct clk *clk; |
@@ -69,8 +41,7 @@ static void __init imx53_dt_init(void) | |||
69 | if (of_machine_is_compatible("fsl,imx53-qsb")) | 41 | if (of_machine_is_compatible("fsl,imx53-qsb")) |
70 | imx53_qsb_init(); | 42 | imx53_qsb_init(); |
71 | 43 | ||
72 | of_platform_populate(NULL, of_default_bus_match_table, | 44 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
73 | imx53_auxdata_lookup, NULL); | ||
74 | } | 45 | } |
75 | 46 | ||
76 | static void __init imx53_timer_init(void) | 47 | static void __init imx53_timer_init(void) |
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index f92caf1b30ba..79d71cf23a1d 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c | |||
@@ -81,8 +81,28 @@ void __init imx50_init_early(void) | |||
81 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); | 81 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); |
82 | } | 82 | } |
83 | 83 | ||
84 | /* | ||
85 | * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by | ||
86 | * the Freescale marketing division. However this did not remove the | ||
87 | * hardware from the chip which still needs to be configured for proper | ||
88 | * IPU support. | ||
89 | */ | ||
90 | static void __init imx51_ipu_mipi_setup(void) | ||
91 | { | ||
92 | void __iomem *hsc_addr; | ||
93 | hsc_addr = MX51_IO_ADDRESS(MX51_MIPI_HSC_BASE_ADDR); | ||
94 | |||
95 | /* setup MIPI module to legacy mode */ | ||
96 | __raw_writel(0xf00, hsc_addr); | ||
97 | |||
98 | /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */ | ||
99 | __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff, | ||
100 | hsc_addr + 0x800); | ||
101 | } | ||
102 | |||
84 | void __init imx51_init_early(void) | 103 | void __init imx51_init_early(void) |
85 | { | 104 | { |
105 | imx51_ipu_mipi_setup(); | ||
86 | mxc_set_cpu_type(MXC_CPU_MX51); | 106 | mxc_set_cpu_type(MXC_CPU_MX51); |
87 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | 107 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); |
88 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); | 108 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); |
diff --git a/arch/arm/mach-integrator/include/mach/irqs.h b/arch/arm/mach-integrator/include/mach/irqs.h index 7371018455d2..eff0adad9ae3 100644 --- a/arch/arm/mach-integrator/include/mach/irqs.h +++ b/arch/arm/mach-integrator/include/mach/irqs.h | |||
@@ -19,64 +19,63 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Interrupt numbers | 23 | * Interrupt numbers, all of the above are just static reservations |
24 | * used so they can be encoded into device resources. They will finally | ||
25 | * be done away with when switching to device tree. | ||
24 | */ | 26 | */ |
25 | #define IRQ_PIC_START 1 | 27 | #define IRQ_PIC_START 64 |
26 | #define IRQ_SOFTINT 1 | 28 | #define IRQ_SOFTINT (IRQ_PIC_START+0) |
27 | #define IRQ_UARTINT0 2 | 29 | #define IRQ_UARTINT0 (IRQ_PIC_START+1) |
28 | #define IRQ_UARTINT1 3 | 30 | #define IRQ_UARTINT1 (IRQ_PIC_START+2) |
29 | #define IRQ_KMIINT0 4 | 31 | #define IRQ_KMIINT0 (IRQ_PIC_START+3) |
30 | #define IRQ_KMIINT1 5 | 32 | #define IRQ_KMIINT1 (IRQ_PIC_START+4) |
31 | #define IRQ_TIMERINT0 6 | 33 | #define IRQ_TIMERINT0 (IRQ_PIC_START+5) |
32 | #define IRQ_TIMERINT1 7 | 34 | #define IRQ_TIMERINT1 (IRQ_PIC_START+6) |
33 | #define IRQ_TIMERINT2 8 | 35 | #define IRQ_TIMERINT2 (IRQ_PIC_START+7) |
34 | #define IRQ_RTCINT 9 | 36 | #define IRQ_RTCINT (IRQ_PIC_START+8) |
35 | #define IRQ_AP_EXPINT0 10 | 37 | #define IRQ_AP_EXPINT0 (IRQ_PIC_START+9) |
36 | #define IRQ_AP_EXPINT1 11 | 38 | #define IRQ_AP_EXPINT1 (IRQ_PIC_START+10) |
37 | #define IRQ_AP_EXPINT2 12 | 39 | #define IRQ_AP_EXPINT2 (IRQ_PIC_START+11) |
38 | #define IRQ_AP_EXPINT3 13 | 40 | #define IRQ_AP_EXPINT3 (IRQ_PIC_START+12) |
39 | #define IRQ_AP_PCIINT0 14 | 41 | #define IRQ_AP_PCIINT0 (IRQ_PIC_START+13) |
40 | #define IRQ_AP_PCIINT1 15 | 42 | #define IRQ_AP_PCIINT1 (IRQ_PIC_START+14) |
41 | #define IRQ_AP_PCIINT2 16 | 43 | #define IRQ_AP_PCIINT2 (IRQ_PIC_START+15) |
42 | #define IRQ_AP_PCIINT3 17 | 44 | #define IRQ_AP_PCIINT3 (IRQ_PIC_START+16) |
43 | #define IRQ_AP_V3INT 18 | 45 | #define IRQ_AP_V3INT (IRQ_PIC_START+17) |
44 | #define IRQ_AP_CPINT0 19 | 46 | #define IRQ_AP_CPINT0 (IRQ_PIC_START+18) |
45 | #define IRQ_AP_CPINT1 20 | 47 | #define IRQ_AP_CPINT1 (IRQ_PIC_START+19) |
46 | #define IRQ_AP_LBUSTIMEOUT 21 | 48 | #define IRQ_AP_LBUSTIMEOUT (IRQ_PIC_START+20) |
47 | #define IRQ_AP_APCINT 22 | 49 | #define IRQ_AP_APCINT (IRQ_PIC_START+21) |
48 | #define IRQ_CP_CLCDCINT 23 | 50 | #define IRQ_CP_CLCDCINT (IRQ_PIC_START+22) |
49 | #define IRQ_CP_MMCIINT0 24 | 51 | #define IRQ_CP_MMCIINT0 (IRQ_PIC_START+23) |
50 | #define IRQ_CP_MMCIINT1 25 | 52 | #define IRQ_CP_MMCIINT1 (IRQ_PIC_START+24) |
51 | #define IRQ_CP_AACIINT 26 | 53 | #define IRQ_CP_AACIINT (IRQ_PIC_START+25) |
52 | #define IRQ_CP_CPPLDINT 27 | 54 | #define IRQ_CP_CPPLDINT (IRQ_PIC_START+26) |
53 | #define IRQ_CP_ETHINT 28 | 55 | #define IRQ_CP_ETHINT (IRQ_PIC_START+27) |
54 | #define IRQ_CP_TSPENINT 29 | 56 | #define IRQ_CP_TSPENINT (IRQ_PIC_START+28) |
55 | #define IRQ_PIC_END 29 | 57 | #define IRQ_PIC_END (IRQ_PIC_START+28) |
56 | 58 | ||
57 | #define IRQ_CIC_START 32 | 59 | #define IRQ_CIC_START (IRQ_PIC_END+1) |
58 | #define IRQ_CM_SOFTINT 32 | 60 | #define IRQ_CM_SOFTINT (IRQ_CIC_START+0) |
59 | #define IRQ_CM_COMMRX 33 | 61 | #define IRQ_CM_COMMRX (IRQ_CIC_START+1) |
60 | #define IRQ_CM_COMMTX 34 | 62 | #define IRQ_CM_COMMTX (IRQ_CIC_START+2) |
61 | #define IRQ_CIC_END 34 | 63 | #define IRQ_CIC_END (IRQ_CIC_START+2) |
62 | 64 | ||
63 | /* | 65 | /* |
64 | * IntegratorCP only | 66 | * IntegratorCP only |
65 | */ | 67 | */ |
66 | #define IRQ_SIC_START 35 | 68 | #define IRQ_SIC_START (IRQ_CIC_END+1) |
67 | #define IRQ_SIC_CP_SOFTINT 35 | 69 | #define IRQ_SIC_CP_SOFTINT (IRQ_SIC_START+0) |
68 | #define IRQ_SIC_CP_RI0 36 | 70 | #define IRQ_SIC_CP_RI0 (IRQ_SIC_START+1) |
69 | #define IRQ_SIC_CP_RI1 37 | 71 | #define IRQ_SIC_CP_RI1 (IRQ_SIC_START+2) |
70 | #define IRQ_SIC_CP_CARDIN 38 | 72 | #define IRQ_SIC_CP_CARDIN (IRQ_SIC_START+3) |
71 | #define IRQ_SIC_CP_LMINT0 39 | 73 | #define IRQ_SIC_CP_LMINT0 (IRQ_SIC_START+4) |
72 | #define IRQ_SIC_CP_LMINT1 40 | 74 | #define IRQ_SIC_CP_LMINT1 (IRQ_SIC_START+5) |
73 | #define IRQ_SIC_CP_LMINT2 41 | 75 | #define IRQ_SIC_CP_LMINT2 (IRQ_SIC_START+6) |
74 | #define IRQ_SIC_CP_LMINT3 42 | 76 | #define IRQ_SIC_CP_LMINT3 (IRQ_SIC_START+7) |
75 | #define IRQ_SIC_CP_LMINT4 43 | 77 | #define IRQ_SIC_CP_LMINT4 (IRQ_SIC_START+8) |
76 | #define IRQ_SIC_CP_LMINT5 44 | 78 | #define IRQ_SIC_CP_LMINT5 (IRQ_SIC_START+9) |
77 | #define IRQ_SIC_CP_LMINT6 45 | 79 | #define IRQ_SIC_CP_LMINT6 (IRQ_SIC_START+10) |
78 | #define IRQ_SIC_CP_LMINT7 46 | 80 | #define IRQ_SIC_CP_LMINT7 (IRQ_SIC_START+11) |
79 | #define IRQ_SIC_END 46 | 81 | #define IRQ_SIC_END (IRQ_SIC_START+11) |
80 | |||
81 | #define NR_IRQS_INTEGRATOR_AP 34 | ||
82 | #define NR_IRQS_INTEGRATOR_CP 47 | ||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index a0a7cbbb7a70..11e2a4145807 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/clockchips.h> | 31 | #include <linux/clockchips.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/irqchip/versatile-fpga.h> | ||
34 | #include <linux/mtd/physmap.h> | 35 | #include <linux/mtd/physmap.h> |
35 | #include <linux/clk.h> | 36 | #include <linux/clk.h> |
36 | #include <linux/platform_data/clk-integrator.h> | 37 | #include <linux/platform_data/clk-integrator.h> |
@@ -59,8 +60,6 @@ | |||
59 | #include <asm/mach/pci.h> | 60 | #include <asm/mach/pci.h> |
60 | #include <asm/mach/time.h> | 61 | #include <asm/mach/time.h> |
61 | 62 | ||
62 | #include <plat/fpga-irq.h> | ||
63 | |||
64 | #include "common.h" | 63 | #include "common.h" |
65 | 64 | ||
66 | /* Base address to the AP system controller */ | 65 | /* Base address to the AP system controller */ |
@@ -584,7 +583,6 @@ static const char * ap_dt_board_compat[] = { | |||
584 | DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") | 583 | DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") |
585 | .reserve = integrator_reserve, | 584 | .reserve = integrator_reserve, |
586 | .map_io = ap_map_io, | 585 | .map_io = ap_map_io, |
587 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | ||
588 | .init_early = ap_init_early, | 586 | .init_early = ap_init_early, |
589 | .init_irq = ap_init_irq_of, | 587 | .init_irq = ap_init_irq_of, |
590 | .handle_irq = fpga_handle_irq, | 588 | .handle_irq = fpga_handle_irq, |
@@ -715,7 +713,6 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") | |||
715 | .atag_offset = 0x100, | 713 | .atag_offset = 0x100, |
716 | .reserve = integrator_reserve, | 714 | .reserve = integrator_reserve, |
717 | .map_io = ap_map_io_atag, | 715 | .map_io = ap_map_io_atag, |
718 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | ||
719 | .init_early = ap_init_early, | 716 | .init_early = ap_init_early, |
720 | .init_irq = ap_init_irq, | 717 | .init_irq = ap_init_irq, |
721 | .handle_irq = fpga_handle_irq, | 718 | .handle_irq = fpga_handle_irq, |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 29df06b35d0d..7322838c0447 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/amba/clcd.h> | 20 | #include <linux/amba/clcd.h> |
21 | #include <linux/amba/mmci.h> | 21 | #include <linux/amba/mmci.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irqchip/versatile-fpga.h> | ||
23 | #include <linux/gfp.h> | 24 | #include <linux/gfp.h> |
24 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
25 | #include <linux/platform_data/clk-integrator.h> | 26 | #include <linux/platform_data/clk-integrator.h> |
@@ -47,7 +48,6 @@ | |||
47 | #include <asm/hardware/timer-sp.h> | 48 | #include <asm/hardware/timer-sp.h> |
48 | 49 | ||
49 | #include <plat/clcd.h> | 50 | #include <plat/clcd.h> |
50 | #include <plat/fpga-irq.h> | ||
51 | #include <plat/sched_clock.h> | 51 | #include <plat/sched_clock.h> |
52 | 52 | ||
53 | #include "common.h" | 53 | #include "common.h" |
@@ -387,7 +387,6 @@ static const char * intcp_dt_board_compat[] = { | |||
387 | DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") | 387 | DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") |
388 | .reserve = integrator_reserve, | 388 | .reserve = integrator_reserve, |
389 | .map_io = intcp_map_io, | 389 | .map_io = intcp_map_io, |
390 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | ||
391 | .init_early = intcp_init_early, | 390 | .init_early = intcp_init_early, |
392 | .init_irq = intcp_init_irq_of, | 391 | .init_irq = intcp_init_irq_of, |
393 | .handle_irq = fpga_handle_irq, | 392 | .handle_irq = fpga_handle_irq, |
@@ -482,7 +481,7 @@ static void __init intcp_init_irq(void) | |||
482 | u32 pic_mask, cic_mask, sic_mask; | 481 | u32 pic_mask, cic_mask, sic_mask; |
483 | 482 | ||
484 | /* These masks are for the HW IRQ registers */ | 483 | /* These masks are for the HW IRQ registers */ |
485 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); | 484 | pic_mask = ~((~0u) << (11 - 0)); |
486 | pic_mask |= (~((~0u) << (29 - 22))) << 22; | 485 | pic_mask |= (~((~0u) << (29 - 22))) << 22; |
487 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); | 486 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); |
488 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); | 487 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); |
@@ -563,7 +562,6 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | |||
563 | .atag_offset = 0x100, | 562 | .atag_offset = 0x100, |
564 | .reserve = integrator_reserve, | 563 | .reserve = integrator_reserve, |
565 | .map_io = intcp_map_io_atag, | 564 | .map_io = intcp_map_io_atag, |
566 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | ||
567 | .init_early = intcp_init_early, | 565 | .init_early = intcp_init_early, |
568 | .init_irq = intcp_init_irq, | 566 | .init_irq = intcp_init_irq, |
569 | .handle_irq = fpga_handle_irq, | 567 | .handle_irq = fpga_handle_irq, |
diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c index f48c2e961b84..dd5d6f532e8c 100644 --- a/arch/arm/mach-lpc32xx/clock.c +++ b/arch/arm/mach-lpc32xx/clock.c | |||
@@ -585,6 +585,13 @@ static struct clk clk_timer3 = { | |||
585 | .enable_mask = LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN, | 585 | .enable_mask = LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN, |
586 | .get_rate = local_return_parent_rate, | 586 | .get_rate = local_return_parent_rate, |
587 | }; | 587 | }; |
588 | static struct clk clk_mpwm = { | ||
589 | .parent = &clk_pclk, | ||
590 | .enable = local_onoff_enable, | ||
591 | .enable_reg = LPC32XX_CLKPWR_TIMERS_PWMS_CLK_CTRL_1, | ||
592 | .enable_mask = LPC32XX_CLKPWR_TMRPWMCLK_MPWM_EN, | ||
593 | .get_rate = local_return_parent_rate, | ||
594 | }; | ||
588 | static struct clk clk_wdt = { | 595 | static struct clk clk_wdt = { |
589 | .parent = &clk_pclk, | 596 | .parent = &clk_pclk, |
590 | .enable = local_onoff_enable, | 597 | .enable = local_onoff_enable, |
@@ -1202,6 +1209,7 @@ static struct clk_lookup lookups[] = { | |||
1202 | CLKDEV_INIT("pl08xdmac", NULL, &clk_dma), | 1209 | CLKDEV_INIT("pl08xdmac", NULL, &clk_dma), |
1203 | CLKDEV_INIT("4003c000.watchdog", NULL, &clk_wdt), | 1210 | CLKDEV_INIT("4003c000.watchdog", NULL, &clk_wdt), |
1204 | CLKDEV_INIT("4005c000.pwm", NULL, &clk_pwm), | 1211 | CLKDEV_INIT("4005c000.pwm", NULL, &clk_pwm), |
1212 | CLKDEV_INIT("400e8000.mpwm", NULL, &clk_mpwm), | ||
1205 | CLKDEV_INIT(NULL, "uart3_ck", &clk_uart3), | 1213 | CLKDEV_INIT(NULL, "uart3_ck", &clk_uart3), |
1206 | CLKDEV_INIT(NULL, "uart4_ck", &clk_uart4), | 1214 | CLKDEV_INIT(NULL, "uart4_ck", &clk_uart4), |
1207 | CLKDEV_INIT(NULL, "uart5_ck", &clk_uart5), | 1215 | CLKDEV_INIT(NULL, "uart5_ck", &clk_uart5), |
diff --git a/arch/arm/mach-lpc32xx/include/mach/platform.h b/arch/arm/mach-lpc32xx/include/mach/platform.h index acc4aabf1c7b..b5612a1d1839 100644 --- a/arch/arm/mach-lpc32xx/include/mach/platform.h +++ b/arch/arm/mach-lpc32xx/include/mach/platform.h | |||
@@ -515,6 +515,7 @@ | |||
515 | /* | 515 | /* |
516 | * clkpwr_timers_pwms_clk_ctrl_1 register definitions | 516 | * clkpwr_timers_pwms_clk_ctrl_1 register definitions |
517 | */ | 517 | */ |
518 | #define LPC32XX_CLKPWR_TMRPWMCLK_MPWM_EN 0x40 | ||
518 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN 0x20 | 519 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER3_EN 0x20 |
519 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER2_EN 0x10 | 520 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER2_EN 0x10 |
520 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER1_EN 0x08 | 521 | #define LPC32XX_CLKPWR_TMRPWMCLK_TIMER1_EN 0x08 |
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index 3c6332753358..9ecb8f9c4ef5 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
@@ -412,7 +412,6 @@ static const struct of_device_id mic_of_match[] __initconst = { | |||
412 | void __init lpc32xx_init_irq(void) | 412 | void __init lpc32xx_init_irq(void) |
413 | { | 413 | { |
414 | unsigned int i; | 414 | unsigned int i; |
415 | int irq_base; | ||
416 | 415 | ||
417 | /* Setup MIC */ | 416 | /* Setup MIC */ |
418 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); | 417 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); |
@@ -443,15 +442,6 @@ void __init lpc32xx_init_irq(void) | |||
443 | lpc32xx_set_default_mappings(SIC1_APR_DEFAULT, SIC1_ATR_DEFAULT, 32); | 442 | lpc32xx_set_default_mappings(SIC1_APR_DEFAULT, SIC1_ATR_DEFAULT, 32); |
444 | lpc32xx_set_default_mappings(SIC2_APR_DEFAULT, SIC2_ATR_DEFAULT, 64); | 443 | lpc32xx_set_default_mappings(SIC2_APR_DEFAULT, SIC2_ATR_DEFAULT, 64); |
445 | 444 | ||
446 | /* mask all interrupts except SUBIRQ */ | ||
447 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); | ||
448 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE)); | ||
449 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE)); | ||
450 | |||
451 | /* MIC SUBIRQx interrupts will route handling to the chain handlers */ | ||
452 | irq_set_chained_handler(IRQ_LPC32XX_SUB1IRQ, lpc32xx_sic1_handler); | ||
453 | irq_set_chained_handler(IRQ_LPC32XX_SUB2IRQ, lpc32xx_sic2_handler); | ||
454 | |||
455 | /* Initially disable all wake events */ | 445 | /* Initially disable all wake events */ |
456 | __raw_writel(0, LPC32XX_CLKPWR_P01_ER); | 446 | __raw_writel(0, LPC32XX_CLKPWR_P01_ER); |
457 | __raw_writel(0, LPC32XX_CLKPWR_INT_ER); | 447 | __raw_writel(0, LPC32XX_CLKPWR_INT_ER); |
@@ -475,16 +465,13 @@ void __init lpc32xx_init_irq(void) | |||
475 | 465 | ||
476 | of_irq_init(mic_of_match); | 466 | of_irq_init(mic_of_match); |
477 | 467 | ||
478 | irq_base = irq_alloc_descs(-1, 0, NR_IRQS, 0); | ||
479 | if (irq_base < 0) { | ||
480 | pr_warn("Cannot allocate irq_descs, assuming pre-allocated\n"); | ||
481 | irq_base = 0; | ||
482 | } | ||
483 | |||
484 | lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS, | 468 | lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS, |
485 | irq_base, 0, | 469 | 0, 0, &irq_domain_simple_ops, |
486 | &irq_domain_simple_ops, | ||
487 | NULL); | 470 | NULL); |
488 | if (!lpc32xx_mic_domain) | 471 | if (!lpc32xx_mic_domain) |
489 | panic("Unable to add MIC irq domain\n"); | 472 | panic("Unable to add MIC irq domain\n"); |
473 | |||
474 | /* MIC SUBIRQx interrupts will route handling to the chain handlers */ | ||
475 | irq_set_chained_handler(IRQ_LPC32XX_SUB1IRQ, lpc32xx_sic1_handler); | ||
476 | irq_set_chained_handler(IRQ_LPC32XX_SUB2IRQ, lpc32xx_sic2_handler); | ||
490 | } | 477 | } |
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index d7a13d1771a3..25df14a9e268 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -405,6 +405,7 @@ config MACH_MINI2440 | |||
405 | select NEW_LEDS | 405 | select NEW_LEDS |
406 | select S3C_DEV_NAND | 406 | select S3C_DEV_NAND |
407 | select S3C_DEV_USB_HOST | 407 | select S3C_DEV_USB_HOST |
408 | select S3C_SETUP_CAMIF | ||
408 | help | 409 | help |
409 | Say Y here to select support for the MINI2440. Is a 10cm x 10cm board | 410 | Say Y here to select support for the MINI2440. Is a 10cm x 10cm board |
410 | available via various sources. It can come with a 3.5" or 7" touch LCD. | 411 | available via various sources. It can come with a 3.5" or 7" touch LCD. |
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c index 4407b1730539..04b87ec92537 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2440.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c | |||
@@ -161,6 +161,7 @@ static struct clk_lookup s3c2440_clk_lookup[] = { | |||
161 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), | 161 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), |
162 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), | 162 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), |
163 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), | 163 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), |
164 | CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll), | ||
164 | }; | 165 | }; |
165 | 166 | ||
166 | static int __init_refok s3c2440_clk_add(struct device *dev, struct subsys_interface *sif) | 167 | static int __init_refok s3c2440_clk_add(struct device *dev, struct subsys_interface *sif) |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 8ae100cc655c..546e40a9dcaf 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -2,18 +2,6 @@ if ARCH_SHMOBILE | |||
2 | 2 | ||
3 | comment "SH-Mobile System Type" | 3 | comment "SH-Mobile System Type" |
4 | 4 | ||
5 | config ARCH_SH7367 | ||
6 | bool "SH-Mobile G3 (SH7367)" | ||
7 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
8 | select CPU_V6 | ||
9 | select SH_CLK_CPG | ||
10 | |||
11 | config ARCH_SH7377 | ||
12 | bool "SH-Mobile G4 (SH7377)" | ||
13 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
14 | select CPU_V7 | ||
15 | select SH_CLK_CPG | ||
16 | |||
17 | config ARCH_SH7372 | 5 | config ARCH_SH7372 |
18 | bool "SH-Mobile AP4 (SH7372)" | 6 | bool "SH-Mobile AP4 (SH7372)" |
19 | select ARCH_WANT_OPTIONAL_GPIOLIB | 7 | select ARCH_WANT_OPTIONAL_GPIOLIB |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index fe2c97c179d1..f4fd247bde61 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -6,8 +6,6 @@ | |||
6 | obj-y := timer.o console.o clock.o | 6 | obj-y := timer.o console.o clock.o |
7 | 7 | ||
8 | # CPU objects | 8 | # CPU objects |
9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o | ||
10 | obj-$(CONFIG_ARCH_SH7377) += setup-sh7377.o clock-sh7377.o intc-sh7377.o | ||
11 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o | 9 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o |
12 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o | 10 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o |
13 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o | 11 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o |
@@ -23,16 +21,12 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o | |||
23 | 21 | ||
24 | # Pinmux setup | 22 | # Pinmux setup |
25 | pfc-y := | 23 | pfc-y := |
26 | pfc-$(CONFIG_ARCH_SH7367) += pfc-sh7367.o | ||
27 | pfc-$(CONFIG_ARCH_SH7377) += pfc-sh7377.o | ||
28 | pfc-$(CONFIG_ARCH_SH7372) += pfc-sh7372.o | 24 | pfc-$(CONFIG_ARCH_SH7372) += pfc-sh7372.o |
29 | pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o | 25 | pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o |
30 | pfc-$(CONFIG_ARCH_R8A7740) += pfc-r8a7740.o | 26 | pfc-$(CONFIG_ARCH_R8A7740) += pfc-r8a7740.o |
31 | pfc-$(CONFIG_ARCH_R8A7779) += pfc-r8a7779.o | 27 | pfc-$(CONFIG_ARCH_R8A7779) += pfc-r8a7779.o |
32 | 28 | ||
33 | # IRQ objects | 29 | # IRQ objects |
34 | obj-$(CONFIG_ARCH_SH7367) += entry-intc.o | ||
35 | obj-$(CONFIG_ARCH_SH7377) += entry-intc.o | ||
36 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | 30 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o |
37 | obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o | 31 | obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o |
38 | 32 | ||
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 790dc68c4312..cefdd030361d 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -728,7 +728,7 @@ fsia_ick_out: | |||
728 | static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) | 728 | static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) |
729 | { | 729 | { |
730 | struct clk *fsib_clk; | 730 | struct clk *fsib_clk; |
731 | struct clk *fdiv_clk = &sh7372_fsidivb_clk; | 731 | struct clk *fdiv_clk = clk_get(NULL, "fsidivb"); |
732 | long fsib_rate = 0; | 732 | long fsib_rate = 0; |
733 | long fdiv_rate = 0; | 733 | long fdiv_rate = 0; |
734 | int ackmd_bpfmd; | 734 | int ackmd_bpfmd; |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 0c27c810cf99..c826d77ab8a6 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -882,7 +882,7 @@ static int __fsi_set_round_rate(struct clk *clk, long rate, int enable) | |||
882 | static int fsi_b_set_rate(struct device *dev, int rate, int enable) | 882 | static int fsi_b_set_rate(struct device *dev, int rate, int enable) |
883 | { | 883 | { |
884 | struct clk *fsib_clk; | 884 | struct clk *fsib_clk; |
885 | struct clk *fdiv_clk = &sh7372_fsidivb_clk; | 885 | struct clk *fdiv_clk = clk_get(NULL, "fsidivb"); |
886 | long fsib_rate = 0; | 886 | long fsib_rate = 0; |
887 | long fdiv_rate = 0; | 887 | long fdiv_rate = 0; |
888 | int ackmd_bpfmd; | 888 | int ackmd_bpfmd; |
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index 6729e0032180..eac49d59782f 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -65,6 +65,9 @@ | |||
65 | #define SMSTPCR3 IOMEM(0xe615013c) | 65 | #define SMSTPCR3 IOMEM(0xe615013c) |
66 | #define SMSTPCR4 IOMEM(0xe6150140) | 66 | #define SMSTPCR4 IOMEM(0xe6150140) |
67 | 67 | ||
68 | #define FSIDIVA IOMEM(0xFE1F8000) | ||
69 | #define FSIDIVB IOMEM(0xFE1F8008) | ||
70 | |||
68 | /* Fixed 32 KHz root clock from EXTALR pin */ | 71 | /* Fixed 32 KHz root clock from EXTALR pin */ |
69 | static struct clk extalr_clk = { | 72 | static struct clk extalr_clk = { |
70 | .rate = 32768, | 73 | .rate = 32768, |
@@ -188,6 +191,22 @@ static struct clk pllc1_div2_clk = { | |||
188 | }; | 191 | }; |
189 | 192 | ||
190 | /* USB clock */ | 193 | /* USB clock */ |
194 | /* | ||
195 | * USBCKCR is controlling usb24 clock | ||
196 | * bit[7] : parent clock | ||
197 | * bit[6] : clock divide rate | ||
198 | * And this bit[7] is used as a "usb24s" from other devices. | ||
199 | * (Video clock / Sub clock / SPU clock) | ||
200 | * You can controll this clock as a below. | ||
201 | * | ||
202 | * struct clk *usb24 = clk_get(dev, "usb24"); | ||
203 | * struct clk *usb24s = clk_get(NULL, "usb24s"); | ||
204 | * struct clk *system = clk_get(NULL, "system_clk"); | ||
205 | * int rate = clk_get_rate(system); | ||
206 | * | ||
207 | * clk_set_parent(usb24s, system); // for bit[7] | ||
208 | * clk_set_rate(usb24, rate / 2); // for bit[6] | ||
209 | */ | ||
191 | static struct clk *usb24s_parents[] = { | 210 | static struct clk *usb24s_parents[] = { |
192 | [0] = &system_clk, | 211 | [0] = &system_clk, |
193 | [1] = &extal2_clk | 212 | [1] = &extal2_clk |
@@ -427,6 +446,14 @@ static struct clk *late_main_clks[] = { | |||
427 | &hdmi2_clk, | 446 | &hdmi2_clk, |
428 | }; | 447 | }; |
429 | 448 | ||
449 | /* FSI DIV */ | ||
450 | enum { FSIDIV_A, FSIDIV_B, FSIDIV_REPARENT_NR }; | ||
451 | |||
452 | static struct clk fsidivs[] = { | ||
453 | [FSIDIV_A] = SH_CLK_FSIDIV(FSIDIVA, &div6_reparent_clks[DIV6_FSIA]), | ||
454 | [FSIDIV_B] = SH_CLK_FSIDIV(FSIDIVB, &div6_reparent_clks[DIV6_FSIB]), | ||
455 | }; | ||
456 | |||
430 | /* MSTP */ | 457 | /* MSTP */ |
431 | enum { | 458 | enum { |
432 | DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_HP, | 459 | DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_HP, |
@@ -596,6 +623,10 @@ static struct clk_lookup lookups[] = { | |||
596 | 623 | ||
597 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 624 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
598 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 625 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
626 | CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]), | ||
627 | CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]), | ||
628 | CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk), | ||
629 | CLKDEV_ICK_ID("xckb", "sh_fsi2", &fsibck_clk), | ||
599 | }; | 630 | }; |
600 | 631 | ||
601 | void __init r8a7740_clock_init(u8 md_ck) | 632 | void __init r8a7740_clock_init(u8 md_ck) |
@@ -641,6 +672,9 @@ void __init r8a7740_clock_init(u8 md_ck) | |||
641 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) | 672 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) |
642 | ret = clk_register(late_main_clks[k]); | 673 | ret = clk_register(late_main_clks[k]); |
643 | 674 | ||
675 | if (!ret) | ||
676 | ret = sh_clk_fsidiv_register(fsidivs, FSIDIV_REPARENT_NR); | ||
677 | |||
644 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 678 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
645 | 679 | ||
646 | if (!ret) | 680 | if (!ret) |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 37b2a3133b3b..c019609da660 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -87,8 +87,11 @@ static struct clk div4_clks[DIV4_NR] = { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | enum { MSTP323, MSTP322, MSTP321, MSTP320, | 89 | enum { MSTP323, MSTP322, MSTP321, MSTP320, |
90 | MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | 90 | MSTP101, MSTP100, |
91 | MSTP030, | ||
92 | MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | ||
91 | MSTP016, MSTP015, MSTP014, | 93 | MSTP016, MSTP015, MSTP014, |
94 | MSTP007, | ||
92 | MSTP_NR }; | 95 | MSTP_NR }; |
93 | 96 | ||
94 | static struct clk mstp_clks[MSTP_NR] = { | 97 | static struct clk mstp_clks[MSTP_NR] = { |
@@ -96,6 +99,12 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
96 | [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */ | 99 | [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */ |
97 | [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */ | 100 | [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */ |
98 | [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */ | 101 | [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */ |
102 | [MSTP101] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 1, 0), /* USB2 */ | ||
103 | [MSTP100] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 0, 0), /* USB0/1 */ | ||
104 | [MSTP030] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 30, 0), /* I2C0 */ | ||
105 | [MSTP029] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 29, 0), /* I2C1 */ | ||
106 | [MSTP028] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 28, 0), /* I2C2 */ | ||
107 | [MSTP027] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 27, 0), /* I2C3 */ | ||
99 | [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */ | 108 | [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */ |
100 | [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */ | 109 | [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */ |
101 | [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */ | 110 | [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */ |
@@ -105,6 +114,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
105 | [MSTP016] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 16, 0), /* TMU0 */ | 114 | [MSTP016] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 16, 0), /* TMU0 */ |
106 | [MSTP015] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 15, 0), /* TMU1 */ | 115 | [MSTP015] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 15, 0), /* TMU1 */ |
107 | [MSTP014] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 14, 0), /* TMU2 */ | 116 | [MSTP014] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 14, 0), /* TMU2 */ |
117 | [MSTP007] = SH_CLK_MSTP32(&div4_clks[DIV4_S], MSTPCR0, 7, 0), /* HSPI */ | ||
108 | }; | 118 | }; |
109 | 119 | ||
110 | static unsigned long mul4_recalc(struct clk *clk) | 120 | static unsigned long mul4_recalc(struct clk *clk) |
@@ -146,14 +156,25 @@ static struct clk_lookup lookups[] = { | |||
146 | CLKDEV_CON_ID("peripheral_clk", &div4_clks[DIV4_P]), | 156 | CLKDEV_CON_ID("peripheral_clk", &div4_clks[DIV4_P]), |
147 | 157 | ||
148 | /* MSTP32 clocks */ | 158 | /* MSTP32 clocks */ |
159 | CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */ | ||
160 | CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */ | ||
161 | CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ | ||
162 | CLKDEV_DEV_ID("ohci-platform.0", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ | ||
149 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ | 163 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ |
150 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ | 164 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ |
165 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ | ||
166 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ | ||
167 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ | ||
168 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ | ||
151 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ | 169 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ |
152 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ | 170 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ |
153 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ | 171 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ |
154 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ | 172 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ |
155 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ | 173 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ |
156 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ | 174 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ |
175 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ | ||
176 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ | ||
177 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ | ||
157 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ | 178 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ |
158 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | 179 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ |
159 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | 180 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ |
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c deleted file mode 100644 index ef0a95e592c4..000000000000 --- a/arch/arm/mach-shmobile/clock-sh7367.c +++ /dev/null | |||
@@ -1,355 +0,0 @@ | |||
1 | /* | ||
2 | * SH7367 clock framework support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/sh_clk.h> | ||
23 | #include <linux/clkdev.h> | ||
24 | #include <mach/common.h> | ||
25 | |||
26 | /* SH7367 registers */ | ||
27 | #define RTFRQCR IOMEM(0xe6150000) | ||
28 | #define SYFRQCR IOMEM(0xe6150004) | ||
29 | #define CMFRQCR IOMEM(0xe61500E0) | ||
30 | #define VCLKCR1 IOMEM(0xe6150008) | ||
31 | #define VCLKCR2 IOMEM(0xe615000C) | ||
32 | #define VCLKCR3 IOMEM(0xe615001C) | ||
33 | #define SCLKACR IOMEM(0xe6150010) | ||
34 | #define SCLKBCR IOMEM(0xe6150014) | ||
35 | #define SUBUSBCKCR IOMEM(0xe6158080) | ||
36 | #define SPUCKCR IOMEM(0xe6150084) | ||
37 | #define MSUCKCR IOMEM(0xe6150088) | ||
38 | #define MVI3CKCR IOMEM(0xe6150090) | ||
39 | #define VOUCKCR IOMEM(0xe6150094) | ||
40 | #define MFCK1CR IOMEM(0xe6150098) | ||
41 | #define MFCK2CR IOMEM(0xe615009C) | ||
42 | #define PLLC1CR IOMEM(0xe6150028) | ||
43 | #define PLLC2CR IOMEM(0xe615002C) | ||
44 | #define RTMSTPCR0 IOMEM(0xe6158030) | ||
45 | #define RTMSTPCR2 IOMEM(0xe6158038) | ||
46 | #define SYMSTPCR0 IOMEM(0xe6158040) | ||
47 | #define SYMSTPCR2 IOMEM(0xe6158048) | ||
48 | #define CMMSTPCR0 IOMEM(0xe615804c) | ||
49 | |||
50 | /* Fixed 32 KHz root clock from EXTALR pin */ | ||
51 | static struct clk r_clk = { | ||
52 | .rate = 32768, | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * 26MHz default rate for the EXTALB1 root input clock. | ||
57 | * If needed, reset this with clk_set_rate() from the platform code. | ||
58 | */ | ||
59 | struct clk sh7367_extalb1_clk = { | ||
60 | .rate = 26666666, | ||
61 | }; | ||
62 | |||
63 | /* | ||
64 | * 48MHz default rate for the EXTAL2 root input clock. | ||
65 | * If needed, reset this with clk_set_rate() from the platform code. | ||
66 | */ | ||
67 | struct clk sh7367_extal2_clk = { | ||
68 | .rate = 48000000, | ||
69 | }; | ||
70 | |||
71 | /* A fixed divide-by-2 block */ | ||
72 | static unsigned long div2_recalc(struct clk *clk) | ||
73 | { | ||
74 | return clk->parent->rate / 2; | ||
75 | } | ||
76 | |||
77 | static struct sh_clk_ops div2_clk_ops = { | ||
78 | .recalc = div2_recalc, | ||
79 | }; | ||
80 | |||
81 | /* Divide extalb1 by two */ | ||
82 | static struct clk extalb1_div2_clk = { | ||
83 | .ops = &div2_clk_ops, | ||
84 | .parent = &sh7367_extalb1_clk, | ||
85 | }; | ||
86 | |||
87 | /* Divide extal2 by two */ | ||
88 | static struct clk extal2_div2_clk = { | ||
89 | .ops = &div2_clk_ops, | ||
90 | .parent = &sh7367_extal2_clk, | ||
91 | }; | ||
92 | |||
93 | /* PLLC1 */ | ||
94 | static unsigned long pllc1_recalc(struct clk *clk) | ||
95 | { | ||
96 | unsigned long mult = 1; | ||
97 | |||
98 | if (__raw_readl(PLLC1CR) & (1 << 14)) | ||
99 | mult = (((__raw_readl(RTFRQCR) >> 24) & 0x3f) + 1) * 2; | ||
100 | |||
101 | return clk->parent->rate * mult; | ||
102 | } | ||
103 | |||
104 | static struct sh_clk_ops pllc1_clk_ops = { | ||
105 | .recalc = pllc1_recalc, | ||
106 | }; | ||
107 | |||
108 | static struct clk pllc1_clk = { | ||
109 | .ops = &pllc1_clk_ops, | ||
110 | .flags = CLK_ENABLE_ON_INIT, | ||
111 | .parent = &extalb1_div2_clk, | ||
112 | }; | ||
113 | |||
114 | /* Divide PLLC1 by two */ | ||
115 | static struct clk pllc1_div2_clk = { | ||
116 | .ops = &div2_clk_ops, | ||
117 | .parent = &pllc1_clk, | ||
118 | }; | ||
119 | |||
120 | /* PLLC2 */ | ||
121 | static unsigned long pllc2_recalc(struct clk *clk) | ||
122 | { | ||
123 | unsigned long mult = 1; | ||
124 | |||
125 | if (__raw_readl(PLLC2CR) & (1 << 31)) | ||
126 | mult = (((__raw_readl(PLLC2CR) >> 24) & 0x3f) + 1) * 2; | ||
127 | |||
128 | return clk->parent->rate * mult; | ||
129 | } | ||
130 | |||
131 | static struct sh_clk_ops pllc2_clk_ops = { | ||
132 | .recalc = pllc2_recalc, | ||
133 | }; | ||
134 | |||
135 | static struct clk pllc2_clk = { | ||
136 | .ops = &pllc2_clk_ops, | ||
137 | .flags = CLK_ENABLE_ON_INIT, | ||
138 | .parent = &extalb1_div2_clk, | ||
139 | }; | ||
140 | |||
141 | static struct clk *main_clks[] = { | ||
142 | &r_clk, | ||
143 | &sh7367_extalb1_clk, | ||
144 | &sh7367_extal2_clk, | ||
145 | &extalb1_div2_clk, | ||
146 | &extal2_div2_clk, | ||
147 | &pllc1_clk, | ||
148 | &pllc1_div2_clk, | ||
149 | &pllc2_clk, | ||
150 | }; | ||
151 | |||
152 | static void div4_kick(struct clk *clk) | ||
153 | { | ||
154 | unsigned long value; | ||
155 | |||
156 | /* set KICK bit in SYFRQCR to update hardware setting */ | ||
157 | value = __raw_readl(SYFRQCR); | ||
158 | value |= (1 << 31); | ||
159 | __raw_writel(value, SYFRQCR); | ||
160 | } | ||
161 | |||
162 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, | ||
163 | 24, 32, 36, 48, 0, 72, 0, 0 }; | ||
164 | |||
165 | static struct clk_div_mult_table div4_div_mult_table = { | ||
166 | .divisors = divisors, | ||
167 | .nr_divisors = ARRAY_SIZE(divisors), | ||
168 | }; | ||
169 | |||
170 | static struct clk_div4_table div4_table = { | ||
171 | .div_mult_table = &div4_div_mult_table, | ||
172 | .kick = div4_kick, | ||
173 | }; | ||
174 | |||
175 | enum { DIV4_I, DIV4_G, DIV4_S, DIV4_B, | ||
176 | DIV4_ZX, DIV4_ZT, DIV4_Z, DIV4_ZD, DIV4_HP, | ||
177 | DIV4_ZS, DIV4_ZB, DIV4_ZB3, DIV4_CP, DIV4_NR }; | ||
178 | |||
179 | #define DIV4(_reg, _bit, _mask, _flags) \ | ||
180 | SH_CLK_DIV4(&pllc1_clk, _reg, _bit, _mask, _flags) | ||
181 | |||
182 | static struct clk div4_clks[DIV4_NR] = { | ||
183 | [DIV4_I] = DIV4(RTFRQCR, 20, 0x6fff, CLK_ENABLE_ON_INIT), | ||
184 | [DIV4_G] = DIV4(RTFRQCR, 16, 0x6fff, CLK_ENABLE_ON_INIT), | ||
185 | [DIV4_S] = DIV4(RTFRQCR, 12, 0x6fff, CLK_ENABLE_ON_INIT), | ||
186 | [DIV4_B] = DIV4(RTFRQCR, 8, 0x6fff, CLK_ENABLE_ON_INIT), | ||
187 | [DIV4_ZX] = DIV4(SYFRQCR, 20, 0x6fff, 0), | ||
188 | [DIV4_ZT] = DIV4(SYFRQCR, 16, 0x6fff, 0), | ||
189 | [DIV4_Z] = DIV4(SYFRQCR, 12, 0x6fff, 0), | ||
190 | [DIV4_ZD] = DIV4(SYFRQCR, 8, 0x6fff, 0), | ||
191 | [DIV4_HP] = DIV4(SYFRQCR, 4, 0x6fff, 0), | ||
192 | [DIV4_ZS] = DIV4(CMFRQCR, 12, 0x6fff, 0), | ||
193 | [DIV4_ZB] = DIV4(CMFRQCR, 8, 0x6fff, 0), | ||
194 | [DIV4_ZB3] = DIV4(CMFRQCR, 4, 0x6fff, 0), | ||
195 | [DIV4_CP] = DIV4(CMFRQCR, 0, 0x6fff, 0), | ||
196 | }; | ||
197 | |||
198 | enum { DIV6_SUB, DIV6_SIUA, DIV6_SIUB, DIV6_MSU, DIV6_SPU, | ||
199 | DIV6_MVI3, DIV6_MF1, DIV6_MF2, | ||
200 | DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_VOU, | ||
201 | DIV6_NR }; | ||
202 | |||
203 | static struct clk div6_clks[DIV6_NR] = { | ||
204 | [DIV6_SUB] = SH_CLK_DIV6(&sh7367_extal2_clk, SUBUSBCKCR, 0), | ||
205 | [DIV6_SIUA] = SH_CLK_DIV6(&pllc1_div2_clk, SCLKACR, 0), | ||
206 | [DIV6_SIUB] = SH_CLK_DIV6(&pllc1_div2_clk, SCLKBCR, 0), | ||
207 | [DIV6_MSU] = SH_CLK_DIV6(&pllc1_div2_clk, MSUCKCR, 0), | ||
208 | [DIV6_SPU] = SH_CLK_DIV6(&pllc1_div2_clk, SPUCKCR, 0), | ||
209 | [DIV6_MVI3] = SH_CLK_DIV6(&pllc1_div2_clk, MVI3CKCR, 0), | ||
210 | [DIV6_MF1] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK1CR, 0), | ||
211 | [DIV6_MF2] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK2CR, 0), | ||
212 | [DIV6_VCK1] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR1, 0), | ||
213 | [DIV6_VCK2] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR2, 0), | ||
214 | [DIV6_VCK3] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR3, 0), | ||
215 | [DIV6_VOU] = SH_CLK_DIV6(&pllc1_div2_clk, VOUCKCR, 0), | ||
216 | }; | ||
217 | |||
218 | enum { RTMSTP001, | ||
219 | RTMSTP231, RTMSTP230, RTMSTP229, RTMSTP228, RTMSTP226, | ||
220 | RTMSTP216, RTMSTP206, RTMSTP205, RTMSTP201, | ||
221 | SYMSTP023, SYMSTP007, SYMSTP006, SYMSTP004, | ||
222 | SYMSTP003, SYMSTP002, SYMSTP001, SYMSTP000, | ||
223 | SYMSTP231, SYMSTP229, SYMSTP225, SYMSTP223, SYMSTP222, | ||
224 | SYMSTP215, SYMSTP214, SYMSTP213, SYMSTP211, | ||
225 | CMMSTP003, | ||
226 | MSTP_NR }; | ||
227 | |||
228 | #define MSTP(_parent, _reg, _bit, _flags) \ | ||
229 | SH_CLK_MSTP32(_parent, _reg, _bit, _flags) | ||
230 | |||
231 | static struct clk mstp_clks[MSTP_NR] = { | ||
232 | [RTMSTP001] = MSTP(&div6_clks[DIV6_SUB], RTMSTPCR0, 1, 0), /* IIC2 */ | ||
233 | [RTMSTP231] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 31, 0), /* VEU3 */ | ||
234 | [RTMSTP230] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 30, 0), /* VEU2 */ | ||
235 | [RTMSTP229] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 29, 0), /* VEU1 */ | ||
236 | [RTMSTP228] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 28, 0), /* VEU0 */ | ||
237 | [RTMSTP226] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 26, 0), /* VEU2H */ | ||
238 | [RTMSTP216] = MSTP(&div6_clks[DIV6_SUB], RTMSTPCR2, 16, 0), /* IIC0 */ | ||
239 | [RTMSTP206] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 6, 0), /* JPU */ | ||
240 | [RTMSTP205] = MSTP(&div6_clks[DIV6_VOU], RTMSTPCR2, 5, 0), /* VOU */ | ||
241 | [RTMSTP201] = MSTP(&div4_clks[DIV4_B], RTMSTPCR2, 1, 0), /* VPU */ | ||
242 | [SYMSTP023] = MSTP(&div6_clks[DIV6_SPU], SYMSTPCR0, 23, 0), /* SPU1 */ | ||
243 | [SYMSTP007] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 7, 0), /* SCIFA5 */ | ||
244 | [SYMSTP006] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 6, 0), /* SCIFB */ | ||
245 | [SYMSTP004] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 4, 0), /* SCIFA0 */ | ||
246 | [SYMSTP003] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 3, 0), /* SCIFA1 */ | ||
247 | [SYMSTP002] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 2, 0), /* SCIFA2 */ | ||
248 | [SYMSTP001] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 1, 0), /* SCIFA3 */ | ||
249 | [SYMSTP000] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR0, 0, 0), /* SCIFA4 */ | ||
250 | [SYMSTP231] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 31, 0), /* SIU */ | ||
251 | [SYMSTP229] = MSTP(&r_clk, SYMSTPCR2, 29, 0), /* CMT10 */ | ||
252 | [SYMSTP225] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 25, 0), /* IRDA */ | ||
253 | [SYMSTP223] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 23, 0), /* IIC1 */ | ||
254 | [SYMSTP222] = MSTP(&div6_clks[DIV6_SUB], SYMSTPCR2, 22, 0), /* USBHS */ | ||
255 | [SYMSTP215] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 15, 0), /* FLCTL */ | ||
256 | [SYMSTP214] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 14, 0), /* SDHI0 */ | ||
257 | [SYMSTP213] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 13, 0), /* SDHI1 */ | ||
258 | [SYMSTP211] = MSTP(&div4_clks[DIV4_HP], SYMSTPCR2, 11, 0), /* SDHI2 */ | ||
259 | [CMMSTP003] = MSTP(&r_clk, CMMSTPCR0, 3, 0), /* KEYSC */ | ||
260 | }; | ||
261 | |||
262 | static struct clk_lookup lookups[] = { | ||
263 | /* main clocks */ | ||
264 | CLKDEV_CON_ID("r_clk", &r_clk), | ||
265 | CLKDEV_CON_ID("extalb1", &sh7367_extalb1_clk), | ||
266 | CLKDEV_CON_ID("extal2", &sh7367_extal2_clk), | ||
267 | CLKDEV_CON_ID("extalb1_div2_clk", &extalb1_div2_clk), | ||
268 | CLKDEV_CON_ID("extal2_div2_clk", &extal2_div2_clk), | ||
269 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), | ||
270 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), | ||
271 | CLKDEV_CON_ID("pllc2_clk", &pllc2_clk), | ||
272 | |||
273 | /* DIV4 clocks */ | ||
274 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | ||
275 | CLKDEV_CON_ID("g_clk", &div4_clks[DIV4_G]), | ||
276 | CLKDEV_CON_ID("b_clk", &div4_clks[DIV4_B]), | ||
277 | CLKDEV_CON_ID("zx_clk", &div4_clks[DIV4_ZX]), | ||
278 | CLKDEV_CON_ID("zt_clk", &div4_clks[DIV4_ZT]), | ||
279 | CLKDEV_CON_ID("z_clk", &div4_clks[DIV4_Z]), | ||
280 | CLKDEV_CON_ID("zd_clk", &div4_clks[DIV4_ZD]), | ||
281 | CLKDEV_CON_ID("hp_clk", &div4_clks[DIV4_HP]), | ||
282 | CLKDEV_CON_ID("zs_clk", &div4_clks[DIV4_ZS]), | ||
283 | CLKDEV_CON_ID("zb_clk", &div4_clks[DIV4_ZB]), | ||
284 | CLKDEV_CON_ID("zb3_clk", &div4_clks[DIV4_ZB3]), | ||
285 | CLKDEV_CON_ID("cp_clk", &div4_clks[DIV4_CP]), | ||
286 | |||
287 | /* DIV6 clocks */ | ||
288 | CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]), | ||
289 | CLKDEV_CON_ID("siua_clk", &div6_clks[DIV6_SIUA]), | ||
290 | CLKDEV_CON_ID("siub_clk", &div6_clks[DIV6_SIUB]), | ||
291 | CLKDEV_CON_ID("msu_clk", &div6_clks[DIV6_MSU]), | ||
292 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | ||
293 | CLKDEV_CON_ID("mvi3_clk", &div6_clks[DIV6_MVI3]), | ||
294 | CLKDEV_CON_ID("mf1_clk", &div6_clks[DIV6_MF1]), | ||
295 | CLKDEV_CON_ID("mf2_clk", &div6_clks[DIV6_MF2]), | ||
296 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), | ||
297 | CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]), | ||
298 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), | ||
299 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), | ||
300 | |||
301 | /* MSTP32 clocks */ | ||
302 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[RTMSTP001]), /* IIC2 */ | ||
303 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[RTMSTP231]), /* VEU3 */ | ||
304 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[RTMSTP230]), /* VEU2 */ | ||
305 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[RTMSTP229]), /* VEU1 */ | ||
306 | CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[RTMSTP228]), /* VEU0 */ | ||
307 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[RTMSTP226]), /* VEU2H */ | ||
308 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[RTMSTP216]), /* IIC0 */ | ||
309 | CLKDEV_DEV_ID("uio_pdrv_genirq.6", &mstp_clks[RTMSTP206]), /* JPU */ | ||
310 | CLKDEV_DEV_ID("sh-vou", &mstp_clks[RTMSTP205]), /* VOU */ | ||
311 | CLKDEV_DEV_ID("uio_pdrv_genirq.0", &mstp_clks[RTMSTP201]), /* VPU */ | ||
312 | CLKDEV_DEV_ID("uio_pdrv_genirq.7", &mstp_clks[SYMSTP023]), /* SPU1 */ | ||
313 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[SYMSTP007]), /* SCIFA5 */ | ||
314 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[SYMSTP006]), /* SCIFB */ | ||
315 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[SYMSTP004]), /* SCIFA0 */ | ||
316 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[SYMSTP003]), /* SCIFA1 */ | ||
317 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[SYMSTP002]), /* SCIFA2 */ | ||
318 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[SYMSTP001]), /* SCIFA3 */ | ||
319 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[SYMSTP000]), /* SCIFA4 */ | ||
320 | CLKDEV_DEV_ID("sh_siu", &mstp_clks[SYMSTP231]), /* SIU */ | ||
321 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[SYMSTP229]), /* CMT10 */ | ||
322 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[SYMSTP225]), /* IRDA */ | ||
323 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[SYMSTP223]), /* IIC1 */ | ||
324 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[SYMSTP222]), /* USBHS */ | ||
325 | CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[SYMSTP222]), /* USBHS */ | ||
326 | CLKDEV_DEV_ID("sh_flctl", &mstp_clks[SYMSTP215]), /* FLCTL */ | ||
327 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[SYMSTP214]), /* SDHI0 */ | ||
328 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[SYMSTP213]), /* SDHI1 */ | ||
329 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[SYMSTP211]), /* SDHI2 */ | ||
330 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[CMMSTP003]), /* KEYSC */ | ||
331 | }; | ||
332 | |||
333 | void __init sh7367_clock_init(void) | ||
334 | { | ||
335 | int k, ret = 0; | ||
336 | |||
337 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | ||
338 | ret = clk_register(main_clks[k]); | ||
339 | |||
340 | if (!ret) | ||
341 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | ||
342 | |||
343 | if (!ret) | ||
344 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); | ||
345 | |||
346 | if (!ret) | ||
347 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | ||
348 | |||
349 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
350 | |||
351 | if (!ret) | ||
352 | shmobile_clk_init(); | ||
353 | else | ||
354 | panic("failed to setup sh7367 clocks\n"); | ||
355 | } | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 430a90ffa120..4d57e342537b 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -420,87 +420,11 @@ static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { | |||
420 | }; | 420 | }; |
421 | 421 | ||
422 | /* FSI DIV */ | 422 | /* FSI DIV */ |
423 | static unsigned long fsidiv_recalc(struct clk *clk) | 423 | enum { FSIDIV_A, FSIDIV_B, FSIDIV_REPARENT_NR }; |
424 | { | ||
425 | unsigned long value; | ||
426 | |||
427 | value = __raw_readl(clk->mapping->base); | ||
428 | |||
429 | value >>= 16; | ||
430 | if (value < 2) | ||
431 | return 0; | ||
432 | |||
433 | return clk->parent->rate / value; | ||
434 | } | ||
435 | |||
436 | static long fsidiv_round_rate(struct clk *clk, unsigned long rate) | ||
437 | { | ||
438 | return clk_rate_div_range_round(clk, 2, 0xffff, rate); | ||
439 | } | ||
440 | |||
441 | static void fsidiv_disable(struct clk *clk) | ||
442 | { | ||
443 | __raw_writel(0, clk->mapping->base); | ||
444 | } | ||
445 | |||
446 | static int fsidiv_enable(struct clk *clk) | ||
447 | { | ||
448 | unsigned long value; | ||
449 | |||
450 | value = __raw_readl(clk->mapping->base) >> 16; | ||
451 | if (value < 2) | ||
452 | return -EIO; | ||
453 | |||
454 | __raw_writel((value << 16) | 0x3, clk->mapping->base); | ||
455 | |||
456 | return 0; | ||
457 | } | ||
458 | 424 | ||
459 | static int fsidiv_set_rate(struct clk *clk, unsigned long rate) | 425 | static struct clk fsidivs[] = { |
460 | { | 426 | [FSIDIV_A] = SH_CLK_FSIDIV(FSIDIVA, &div6_reparent_clks[DIV6_FSIA]), |
461 | int idx; | 427 | [FSIDIV_B] = SH_CLK_FSIDIV(FSIDIVB, &div6_reparent_clks[DIV6_FSIB]), |
462 | |||
463 | idx = (clk->parent->rate / rate) & 0xffff; | ||
464 | if (idx < 2) | ||
465 | return -EINVAL; | ||
466 | |||
467 | __raw_writel(idx << 16, clk->mapping->base); | ||
468 | return 0; | ||
469 | } | ||
470 | |||
471 | static struct sh_clk_ops fsidiv_clk_ops = { | ||
472 | .recalc = fsidiv_recalc, | ||
473 | .round_rate = fsidiv_round_rate, | ||
474 | .set_rate = fsidiv_set_rate, | ||
475 | .enable = fsidiv_enable, | ||
476 | .disable = fsidiv_disable, | ||
477 | }; | ||
478 | |||
479 | static struct clk_mapping fsidiva_clk_mapping = { | ||
480 | .phys = FSIDIVA, | ||
481 | .len = 8, | ||
482 | }; | ||
483 | |||
484 | struct clk sh7372_fsidiva_clk = { | ||
485 | .ops = &fsidiv_clk_ops, | ||
486 | .parent = &div6_reparent_clks[DIV6_FSIA], /* late install */ | ||
487 | .mapping = &fsidiva_clk_mapping, | ||
488 | }; | ||
489 | |||
490 | static struct clk_mapping fsidivb_clk_mapping = { | ||
491 | .phys = FSIDIVB, | ||
492 | .len = 8, | ||
493 | }; | ||
494 | |||
495 | struct clk sh7372_fsidivb_clk = { | ||
496 | .ops = &fsidiv_clk_ops, | ||
497 | .parent = &div6_reparent_clks[DIV6_FSIB], /* late install */ | ||
498 | .mapping = &fsidivb_clk_mapping, | ||
499 | }; | ||
500 | |||
501 | static struct clk *late_main_clks[] = { | ||
502 | &sh7372_fsidiva_clk, | ||
503 | &sh7372_fsidivb_clk, | ||
504 | }; | 428 | }; |
505 | 429 | ||
506 | enum { MSTP001, MSTP000, | 430 | enum { MSTP001, MSTP000, |
@@ -583,6 +507,8 @@ static struct clk_lookup lookups[] = { | |||
583 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), | 507 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), |
584 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), | 508 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), |
585 | CLKDEV_CON_ID("pllc2_clk", &sh7372_pllc2_clk), | 509 | CLKDEV_CON_ID("pllc2_clk", &sh7372_pllc2_clk), |
510 | CLKDEV_CON_ID("fsidiva", &fsidivs[FSIDIV_A]), | ||
511 | CLKDEV_CON_ID("fsidivb", &fsidivs[FSIDIV_B]), | ||
586 | 512 | ||
587 | /* DIV4 clocks */ | 513 | /* DIV4 clocks */ |
588 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | 514 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), |
@@ -678,6 +604,10 @@ static struct clk_lookup lookups[] = { | |||
678 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 604 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
679 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 605 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
680 | CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]), | 606 | CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]), |
607 | CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]), | ||
608 | CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]), | ||
609 | CLKDEV_ICK_ID("xcka", "sh_fsi2", &sh7372_fsiack_clk), | ||
610 | CLKDEV_ICK_ID("xckb", "sh_fsi2", &sh7372_fsibck_clk), | ||
681 | }; | 611 | }; |
682 | 612 | ||
683 | void __init sh7372_clock_init(void) | 613 | void __init sh7372_clock_init(void) |
@@ -706,8 +636,8 @@ void __init sh7372_clock_init(void) | |||
706 | if (!ret) | 636 | if (!ret) |
707 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | 637 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); |
708 | 638 | ||
709 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) | 639 | if (!ret) |
710 | ret = clk_register(late_main_clks[k]); | 640 | ret = sh_clk_fsidiv_register(fsidivs, FSIDIV_REPARENT_NR); |
711 | 641 | ||
712 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 642 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
713 | 643 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c deleted file mode 100644 index b8480d19e1c8..000000000000 --- a/arch/arm/mach-shmobile/clock-sh7377.c +++ /dev/null | |||
@@ -1,366 +0,0 @@ | |||
1 | /* | ||
2 | * SH7377 clock framework support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/sh_clk.h> | ||
23 | #include <linux/clkdev.h> | ||
24 | #include <mach/common.h> | ||
25 | |||
26 | /* SH7377 registers */ | ||
27 | #define RTFRQCR IOMEM(0xe6150000) | ||
28 | #define SYFRQCR IOMEM(0xe6150004) | ||
29 | #define CMFRQCR IOMEM(0xe61500E0) | ||
30 | #define VCLKCR1 IOMEM(0xe6150008) | ||
31 | #define VCLKCR2 IOMEM(0xe615000C) | ||
32 | #define VCLKCR3 IOMEM(0xe615001C) | ||
33 | #define FMSICKCR IOMEM(0xe6150010) | ||
34 | #define FMSOCKCR IOMEM(0xe6150014) | ||
35 | #define FSICKCR IOMEM(0xe6150018) | ||
36 | #define PLLC1CR IOMEM(0xe6150028) | ||
37 | #define PLLC2CR IOMEM(0xe615002C) | ||
38 | #define SUBUSBCKCR IOMEM(0xe6150080) | ||
39 | #define SPUCKCR IOMEM(0xe6150084) | ||
40 | #define MSUCKCR IOMEM(0xe6150088) | ||
41 | #define MVI3CKCR IOMEM(0xe6150090) | ||
42 | #define HDMICKCR IOMEM(0xe6150094) | ||
43 | #define MFCK1CR IOMEM(0xe6150098) | ||
44 | #define MFCK2CR IOMEM(0xe615009C) | ||
45 | #define DSITCKCR IOMEM(0xe6150060) | ||
46 | #define DSIPCKCR IOMEM(0xe6150064) | ||
47 | #define SMSTPCR0 IOMEM(0xe6150130) | ||
48 | #define SMSTPCR1 IOMEM(0xe6150134) | ||
49 | #define SMSTPCR2 IOMEM(0xe6150138) | ||
50 | #define SMSTPCR3 IOMEM(0xe615013C) | ||
51 | #define SMSTPCR4 IOMEM(0xe6150140) | ||
52 | |||
53 | /* Fixed 32 KHz root clock from EXTALR pin */ | ||
54 | static struct clk r_clk = { | ||
55 | .rate = 32768, | ||
56 | }; | ||
57 | |||
58 | /* | ||
59 | * 26MHz default rate for the EXTALC1 root input clock. | ||
60 | * If needed, reset this with clk_set_rate() from the platform code. | ||
61 | */ | ||
62 | struct clk sh7377_extalc1_clk = { | ||
63 | .rate = 26666666, | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * 48MHz default rate for the EXTAL2 root input clock. | ||
68 | * If needed, reset this with clk_set_rate() from the platform code. | ||
69 | */ | ||
70 | struct clk sh7377_extal2_clk = { | ||
71 | .rate = 48000000, | ||
72 | }; | ||
73 | |||
74 | /* A fixed divide-by-2 block */ | ||
75 | static unsigned long div2_recalc(struct clk *clk) | ||
76 | { | ||
77 | return clk->parent->rate / 2; | ||
78 | } | ||
79 | |||
80 | static struct sh_clk_ops div2_clk_ops = { | ||
81 | .recalc = div2_recalc, | ||
82 | }; | ||
83 | |||
84 | /* Divide extalc1 by two */ | ||
85 | static struct clk extalc1_div2_clk = { | ||
86 | .ops = &div2_clk_ops, | ||
87 | .parent = &sh7377_extalc1_clk, | ||
88 | }; | ||
89 | |||
90 | /* Divide extal2 by two */ | ||
91 | static struct clk extal2_div2_clk = { | ||
92 | .ops = &div2_clk_ops, | ||
93 | .parent = &sh7377_extal2_clk, | ||
94 | }; | ||
95 | |||
96 | /* Divide extal2 by four */ | ||
97 | static struct clk extal2_div4_clk = { | ||
98 | .ops = &div2_clk_ops, | ||
99 | .parent = &extal2_div2_clk, | ||
100 | }; | ||
101 | |||
102 | /* PLLC1 */ | ||
103 | static unsigned long pllc1_recalc(struct clk *clk) | ||
104 | { | ||
105 | unsigned long mult = 1; | ||
106 | |||
107 | if (__raw_readl(PLLC1CR) & (1 << 14)) | ||
108 | mult = (((__raw_readl(RTFRQCR) >> 24) & 0x3f) + 1) * 2; | ||
109 | |||
110 | return clk->parent->rate * mult; | ||
111 | } | ||
112 | |||
113 | static struct sh_clk_ops pllc1_clk_ops = { | ||
114 | .recalc = pllc1_recalc, | ||
115 | }; | ||
116 | |||
117 | static struct clk pllc1_clk = { | ||
118 | .ops = &pllc1_clk_ops, | ||
119 | .flags = CLK_ENABLE_ON_INIT, | ||
120 | .parent = &extalc1_div2_clk, | ||
121 | }; | ||
122 | |||
123 | /* Divide PLLC1 by two */ | ||
124 | static struct clk pllc1_div2_clk = { | ||
125 | .ops = &div2_clk_ops, | ||
126 | .parent = &pllc1_clk, | ||
127 | }; | ||
128 | |||
129 | /* PLLC2 */ | ||
130 | static unsigned long pllc2_recalc(struct clk *clk) | ||
131 | { | ||
132 | unsigned long mult = 1; | ||
133 | |||
134 | if (__raw_readl(PLLC2CR) & (1 << 31)) | ||
135 | mult = (((__raw_readl(PLLC2CR) >> 24) & 0x3f) + 1) * 2; | ||
136 | |||
137 | return clk->parent->rate * mult; | ||
138 | } | ||
139 | |||
140 | static struct sh_clk_ops pllc2_clk_ops = { | ||
141 | .recalc = pllc2_recalc, | ||
142 | }; | ||
143 | |||
144 | static struct clk pllc2_clk = { | ||
145 | .ops = &pllc2_clk_ops, | ||
146 | .flags = CLK_ENABLE_ON_INIT, | ||
147 | .parent = &extalc1_div2_clk, | ||
148 | }; | ||
149 | |||
150 | static struct clk *main_clks[] = { | ||
151 | &r_clk, | ||
152 | &sh7377_extalc1_clk, | ||
153 | &sh7377_extal2_clk, | ||
154 | &extalc1_div2_clk, | ||
155 | &extal2_div2_clk, | ||
156 | &extal2_div4_clk, | ||
157 | &pllc1_clk, | ||
158 | &pllc1_div2_clk, | ||
159 | &pllc2_clk, | ||
160 | }; | ||
161 | |||
162 | static void div4_kick(struct clk *clk) | ||
163 | { | ||
164 | unsigned long value; | ||
165 | |||
166 | /* set KICK bit in SYFRQCR to update hardware setting */ | ||
167 | value = __raw_readl(SYFRQCR); | ||
168 | value |= (1 << 31); | ||
169 | __raw_writel(value, SYFRQCR); | ||
170 | } | ||
171 | |||
172 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, | ||
173 | 24, 32, 36, 48, 0, 72, 96, 0 }; | ||
174 | |||
175 | static struct clk_div_mult_table div4_div_mult_table = { | ||
176 | .divisors = divisors, | ||
177 | .nr_divisors = ARRAY_SIZE(divisors), | ||
178 | }; | ||
179 | |||
180 | static struct clk_div4_table div4_table = { | ||
181 | .div_mult_table = &div4_div_mult_table, | ||
182 | .kick = div4_kick, | ||
183 | }; | ||
184 | |||
185 | enum { DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_CSIR, | ||
186 | DIV4_ZTR, DIV4_ZT, DIV4_Z, DIV4_HP, | ||
187 | DIV4_ZS, DIV4_ZB, DIV4_ZB3, DIV4_CP, DIV4_NR }; | ||
188 | |||
189 | #define DIV4(_reg, _bit, _mask, _flags) \ | ||
190 | SH_CLK_DIV4(&pllc1_clk, _reg, _bit, _mask, _flags) | ||
191 | |||
192 | static struct clk div4_clks[DIV4_NR] = { | ||
193 | [DIV4_I] = DIV4(RTFRQCR, 20, 0x6fff, CLK_ENABLE_ON_INIT), | ||
194 | [DIV4_ZG] = DIV4(RTFRQCR, 16, 0x6fff, CLK_ENABLE_ON_INIT), | ||
195 | [DIV4_B] = DIV4(RTFRQCR, 8, 0x6fff, CLK_ENABLE_ON_INIT), | ||
196 | [DIV4_M1] = DIV4(RTFRQCR, 4, 0x6fff, CLK_ENABLE_ON_INIT), | ||
197 | [DIV4_CSIR] = DIV4(RTFRQCR, 0, 0x6fff, 0), | ||
198 | [DIV4_ZTR] = DIV4(SYFRQCR, 20, 0x6fff, 0), | ||
199 | [DIV4_ZT] = DIV4(SYFRQCR, 16, 0x6fff, 0), | ||
200 | [DIV4_Z] = DIV4(SYFRQCR, 12, 0x6fff, 0), | ||
201 | [DIV4_HP] = DIV4(SYFRQCR, 4, 0x6fff, 0), | ||
202 | [DIV4_ZS] = DIV4(CMFRQCR, 12, 0x6fff, 0), | ||
203 | [DIV4_ZB] = DIV4(CMFRQCR, 8, 0x6fff, 0), | ||
204 | [DIV4_ZB3] = DIV4(CMFRQCR, 4, 0x6fff, 0), | ||
205 | [DIV4_CP] = DIV4(CMFRQCR, 0, 0x6fff, 0), | ||
206 | }; | ||
207 | |||
208 | enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_FMSI, DIV6_FMSO, | ||
209 | DIV6_FSI, DIV6_SUB, DIV6_SPU, DIV6_MSU, DIV6_MVI3, DIV6_HDMI, | ||
210 | DIV6_MF1, DIV6_MF2, DIV6_DSIT, DIV6_DSIP, | ||
211 | DIV6_NR }; | ||
212 | |||
213 | static struct clk div6_clks[] = { | ||
214 | [DIV6_VCK1] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR1, 0), | ||
215 | [DIV6_VCK2] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR2, 0), | ||
216 | [DIV6_VCK3] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR3, 0), | ||
217 | [DIV6_FMSI] = SH_CLK_DIV6(&pllc1_div2_clk, FMSICKCR, 0), | ||
218 | [DIV6_FMSO] = SH_CLK_DIV6(&pllc1_div2_clk, FMSOCKCR, 0), | ||
219 | [DIV6_FSI] = SH_CLK_DIV6(&pllc1_div2_clk, FSICKCR, 0), | ||
220 | [DIV6_SUB] = SH_CLK_DIV6(&sh7377_extal2_clk, SUBUSBCKCR, 0), | ||
221 | [DIV6_SPU] = SH_CLK_DIV6(&pllc1_div2_clk, SPUCKCR, 0), | ||
222 | [DIV6_MSU] = SH_CLK_DIV6(&pllc1_div2_clk, MSUCKCR, 0), | ||
223 | [DIV6_MVI3] = SH_CLK_DIV6(&pllc1_div2_clk, MVI3CKCR, 0), | ||
224 | [DIV6_HDMI] = SH_CLK_DIV6(&pllc1_div2_clk, HDMICKCR, 0), | ||
225 | [DIV6_MF1] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK1CR, 0), | ||
226 | [DIV6_MF2] = SH_CLK_DIV6(&pllc1_div2_clk, MFCK2CR, 0), | ||
227 | [DIV6_DSIT] = SH_CLK_DIV6(&pllc1_div2_clk, DSITCKCR, 0), | ||
228 | [DIV6_DSIP] = SH_CLK_DIV6(&pllc1_div2_clk, DSIPCKCR, 0), | ||
229 | }; | ||
230 | |||
231 | enum { MSTP001, | ||
232 | MSTP131, MSTP130, MSTP129, MSTP128, MSTP116, MSTP106, MSTP101, | ||
233 | MSTP223, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | ||
234 | MSTP331, MSTP329, MSTP325, MSTP323, MSTP322, | ||
235 | MSTP315, MSTP314, MSTP313, | ||
236 | MSTP403, | ||
237 | MSTP_NR }; | ||
238 | |||
239 | #define MSTP(_parent, _reg, _bit, _flags) \ | ||
240 | SH_CLK_MSTP32(_parent, _reg, _bit, _flags) | ||
241 | |||
242 | static struct clk mstp_clks[] = { | ||
243 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ | ||
244 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ | ||
245 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ | ||
246 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ | ||
247 | [MSTP128] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 28, 0), /* VEU0 */ | ||
248 | [MSTP116] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ | ||
249 | [MSTP106] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 6, 0), /* JPU */ | ||
250 | [MSTP101] = MSTP(&div4_clks[DIV4_M1], SMSTPCR1, 1, 0), /* VPU */ | ||
251 | [MSTP223] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR2, 23, 0), /* SPU2 */ | ||
252 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ | ||
253 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ | ||
254 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ | ||
255 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ | ||
256 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ | ||
257 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ | ||
258 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | ||
259 | [MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */ | ||
260 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | ||
261 | [MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IRDA */ | ||
262 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ | ||
263 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ | ||
264 | [MSTP315] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 15, 0), /* FLCTL */ | ||
265 | [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ | ||
266 | [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ | ||
267 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ | ||
268 | }; | ||
269 | |||
270 | static struct clk_lookup lookups[] = { | ||
271 | /* main clocks */ | ||
272 | CLKDEV_CON_ID("r_clk", &r_clk), | ||
273 | CLKDEV_CON_ID("extalc1", &sh7377_extalc1_clk), | ||
274 | CLKDEV_CON_ID("extal2", &sh7377_extal2_clk), | ||
275 | CLKDEV_CON_ID("extalc1_div2_clk", &extalc1_div2_clk), | ||
276 | CLKDEV_CON_ID("extal2_div2_clk", &extal2_div2_clk), | ||
277 | CLKDEV_CON_ID("extal2_div4_clk", &extal2_div4_clk), | ||
278 | CLKDEV_CON_ID("pllc1_clk", &pllc1_clk), | ||
279 | CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk), | ||
280 | CLKDEV_CON_ID("pllc2_clk", &pllc2_clk), | ||
281 | |||
282 | /* DIV4 clocks */ | ||
283 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | ||
284 | CLKDEV_CON_ID("zg_clk", &div4_clks[DIV4_ZG]), | ||
285 | CLKDEV_CON_ID("b_clk", &div4_clks[DIV4_B]), | ||
286 | CLKDEV_CON_ID("m1_clk", &div4_clks[DIV4_M1]), | ||
287 | CLKDEV_CON_ID("csir_clk", &div4_clks[DIV4_CSIR]), | ||
288 | CLKDEV_CON_ID("ztr_clk", &div4_clks[DIV4_ZTR]), | ||
289 | CLKDEV_CON_ID("zt_clk", &div4_clks[DIV4_ZT]), | ||
290 | CLKDEV_CON_ID("z_clk", &div4_clks[DIV4_Z]), | ||
291 | CLKDEV_CON_ID("hp_clk", &div4_clks[DIV4_HP]), | ||
292 | CLKDEV_CON_ID("zs_clk", &div4_clks[DIV4_ZS]), | ||
293 | CLKDEV_CON_ID("zb_clk", &div4_clks[DIV4_ZB]), | ||
294 | CLKDEV_CON_ID("zb3_clk", &div4_clks[DIV4_ZB3]), | ||
295 | CLKDEV_CON_ID("cp_clk", &div4_clks[DIV4_CP]), | ||
296 | |||
297 | /* DIV6 clocks */ | ||
298 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), | ||
299 | CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]), | ||
300 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), | ||
301 | CLKDEV_CON_ID("fmsi_clk", &div6_clks[DIV6_FMSI]), | ||
302 | CLKDEV_CON_ID("fmso_clk", &div6_clks[DIV6_FMSO]), | ||
303 | CLKDEV_CON_ID("fsi_clk", &div6_clks[DIV6_FSI]), | ||
304 | CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]), | ||
305 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | ||
306 | CLKDEV_CON_ID("msu_clk", &div6_clks[DIV6_MSU]), | ||
307 | CLKDEV_CON_ID("mvi3_clk", &div6_clks[DIV6_MVI3]), | ||
308 | CLKDEV_CON_ID("hdmi_clk", &div6_clks[DIV6_HDMI]), | ||
309 | CLKDEV_CON_ID("mf1_clk", &div6_clks[DIV6_MF1]), | ||
310 | CLKDEV_CON_ID("mf2_clk", &div6_clks[DIV6_MF2]), | ||
311 | CLKDEV_CON_ID("dsit_clk", &div6_clks[DIV6_DSIT]), | ||
312 | CLKDEV_CON_ID("dsip_clk", &div6_clks[DIV6_DSIP]), | ||
313 | |||
314 | /* MSTP32 clocks */ | ||
315 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | ||
316 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ | ||
317 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ | ||
318 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ | ||
319 | CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */ | ||
320 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ | ||
321 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ | ||
322 | CLKDEV_DEV_ID("uio_pdrv_genirq.0", &mstp_clks[MSTP101]), /* VPU */ | ||
323 | CLKDEV_DEV_ID("uio_pdrv_genirq.6", &mstp_clks[MSTP223]), /* SPU2DSP0 */ | ||
324 | CLKDEV_DEV_ID("uio_pdrv_genirq.7", &mstp_clks[MSTP223]), /* SPU2DSP1 */ | ||
325 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | ||
326 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP206]), /* SCIFB */ | ||
327 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | ||
328 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | ||
329 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ | ||
330 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | ||
331 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | ||
332 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ | ||
333 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | ||
334 | CLKDEV_DEV_ID("sh_irda", &mstp_clks[MSTP325]), /* IRDA */ | ||
335 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ | ||
336 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USBHS */ | ||
337 | CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP322]), /* USBHS */ | ||
338 | CLKDEV_DEV_ID("sh_flctl", &mstp_clks[MSTP315]), /* FLCTL */ | ||
339 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ | ||
340 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ | ||
341 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | ||
342 | }; | ||
343 | |||
344 | void __init sh7377_clock_init(void) | ||
345 | { | ||
346 | int k, ret = 0; | ||
347 | |||
348 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | ||
349 | ret = clk_register(main_clks[k]); | ||
350 | |||
351 | if (!ret) | ||
352 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | ||
353 | |||
354 | if (!ret) | ||
355 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); | ||
356 | |||
357 | if (!ret) | ||
358 | ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | ||
359 | |||
360 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
361 | |||
362 | if (!ret) | ||
363 | shmobile_clk_init(); | ||
364 | else | ||
365 | panic("failed to setup sh7377 clocks\n"); | ||
366 | } | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index d47e215aca87..dfeca79e9e96 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -18,24 +18,6 @@ extern int shmobile_enter_wfi(struct cpuidle_device *dev, | |||
18 | struct cpuidle_driver *drv, int index); | 18 | struct cpuidle_driver *drv, int index); |
19 | extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); | 19 | extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); |
20 | 20 | ||
21 | extern void sh7367_init_irq(void); | ||
22 | extern void sh7367_map_io(void); | ||
23 | extern void sh7367_add_early_devices(void); | ||
24 | extern void sh7367_add_standard_devices(void); | ||
25 | extern void sh7367_clock_init(void); | ||
26 | extern void sh7367_pinmux_init(void); | ||
27 | extern struct clk sh7367_extalb1_clk; | ||
28 | extern struct clk sh7367_extal2_clk; | ||
29 | |||
30 | extern void sh7377_init_irq(void); | ||
31 | extern void sh7377_map_io(void); | ||
32 | extern void sh7377_add_early_devices(void); | ||
33 | extern void sh7377_add_standard_devices(void); | ||
34 | extern void sh7377_clock_init(void); | ||
35 | extern void sh7377_pinmux_init(void); | ||
36 | extern struct clk sh7377_extalc1_clk; | ||
37 | extern struct clk sh7377_extal2_clk; | ||
38 | |||
39 | extern void sh7372_init_irq(void); | 21 | extern void sh7372_init_irq(void); |
40 | extern void sh7372_map_io(void); | 22 | extern void sh7372_map_io(void); |
41 | extern void sh7372_add_early_devices(void); | 23 | extern void sh7372_add_early_devices(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index 499f52d2a4a1..8ab0cd6ad6b0 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -71,7 +71,7 @@ enum { | |||
71 | GPIO_FN_A19, | 71 | GPIO_FN_A19, |
72 | 72 | ||
73 | /* IPSR0 */ | 73 | /* IPSR0 */ |
74 | GPIO_FN_PENC2, GPIO_FN_SCK0, GPIO_FN_PWM1, GPIO_FN_PWMFSW0, | 74 | GPIO_FN_USB_PENC2, GPIO_FN_SCK0, GPIO_FN_PWM1, GPIO_FN_PWMFSW0, |
75 | GPIO_FN_SCIF_CLK, GPIO_FN_TCLK0_C, GPIO_FN_BS, GPIO_FN_SD1_DAT2, | 75 | GPIO_FN_SCIF_CLK, GPIO_FN_TCLK0_C, GPIO_FN_BS, GPIO_FN_SD1_DAT2, |
76 | GPIO_FN_MMC0_D2, GPIO_FN_FD2, GPIO_FN_ATADIR0, GPIO_FN_SDSELF, | 76 | GPIO_FN_MMC0_D2, GPIO_FN_FD2, GPIO_FN_ATADIR0, GPIO_FN_SDSELF, |
77 | GPIO_FN_HCTS1, GPIO_FN_TX4_C, GPIO_FN_A0, GPIO_FN_SD1_DAT3, | 77 | GPIO_FN_HCTS1, GPIO_FN_TX4_C, GPIO_FN_A0, GPIO_FN_SD1_DAT3, |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7367.h b/arch/arm/mach-shmobile/include/mach/sh7367.h deleted file mode 100644 index 52d0de686f68..000000000000 --- a/arch/arm/mach-shmobile/include/mach/sh7367.h +++ /dev/null | |||
@@ -1,332 +0,0 @@ | |||
1 | #ifndef __ASM_SH7367_H__ | ||
2 | #define __ASM_SH7367_H__ | ||
3 | |||
4 | /* Pin Function Controller: | ||
5 | * GPIO_FN_xx - GPIO used to select pin function | ||
6 | * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU | ||
7 | */ | ||
8 | enum { | ||
9 | /* 49-1 -> 49-6 (GPIO) */ | ||
10 | GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, | ||
11 | GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, | ||
12 | |||
13 | GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, | ||
14 | GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, | ||
15 | |||
16 | GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, | ||
17 | GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, | ||
18 | |||
19 | GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, | ||
20 | GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, | ||
21 | |||
22 | GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, | ||
23 | GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, | ||
24 | |||
25 | GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, | ||
26 | GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, | ||
27 | |||
28 | GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, | ||
29 | GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, | ||
30 | |||
31 | GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, | ||
32 | GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, | ||
33 | |||
34 | GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, | ||
35 | GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, | ||
36 | |||
37 | GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, | ||
38 | GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, | ||
39 | |||
40 | GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, | ||
41 | GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, | ||
42 | |||
43 | GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, | ||
44 | GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119, | ||
45 | |||
46 | GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124, | ||
47 | GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129, | ||
48 | |||
49 | GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, | ||
50 | GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, | ||
51 | |||
52 | GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, | ||
53 | GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, | ||
54 | |||
55 | GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, | ||
56 | GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, | ||
57 | |||
58 | GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, | ||
59 | GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169, | ||
60 | |||
61 | GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174, | ||
62 | GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179, | ||
63 | |||
64 | GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184, | ||
65 | GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189, | ||
66 | |||
67 | GPIO_PORT190, GPIO_PORT191, GPIO_PORT192, GPIO_PORT193, GPIO_PORT194, | ||
68 | GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199, | ||
69 | |||
70 | GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204, | ||
71 | GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209, | ||
72 | |||
73 | GPIO_PORT210, GPIO_PORT211, GPIO_PORT212, GPIO_PORT213, GPIO_PORT214, | ||
74 | GPIO_PORT215, GPIO_PORT216, GPIO_PORT217, GPIO_PORT218, GPIO_PORT219, | ||
75 | |||
76 | GPIO_PORT220, GPIO_PORT221, GPIO_PORT222, GPIO_PORT223, GPIO_PORT224, | ||
77 | GPIO_PORT225, GPIO_PORT226, GPIO_PORT227, GPIO_PORT228, GPIO_PORT229, | ||
78 | |||
79 | GPIO_PORT230, GPIO_PORT231, GPIO_PORT232, GPIO_PORT233, GPIO_PORT234, | ||
80 | GPIO_PORT235, GPIO_PORT236, GPIO_PORT237, GPIO_PORT238, GPIO_PORT239, | ||
81 | |||
82 | GPIO_PORT240, GPIO_PORT241, GPIO_PORT242, GPIO_PORT243, GPIO_PORT244, | ||
83 | GPIO_PORT245, GPIO_PORT246, GPIO_PORT247, GPIO_PORT248, GPIO_PORT249, | ||
84 | |||
85 | GPIO_PORT250, GPIO_PORT251, GPIO_PORT252, GPIO_PORT253, GPIO_PORT254, | ||
86 | GPIO_PORT255, GPIO_PORT256, GPIO_PORT257, GPIO_PORT258, GPIO_PORT259, | ||
87 | |||
88 | GPIO_PORT260, GPIO_PORT261, GPIO_PORT262, GPIO_PORT263, GPIO_PORT264, | ||
89 | GPIO_PORT265, GPIO_PORT266, GPIO_PORT267, GPIO_PORT268, GPIO_PORT269, | ||
90 | |||
91 | GPIO_PORT270, GPIO_PORT271, GPIO_PORT272, | ||
92 | |||
93 | /* Special Pull-up / Pull-down Functions */ | ||
94 | GPIO_FN_PORT48_KEYIN0_PU, GPIO_FN_PORT49_KEYIN1_PU, | ||
95 | GPIO_FN_PORT50_KEYIN2_PU, GPIO_FN_PORT55_KEYIN3_PU, | ||
96 | GPIO_FN_PORT56_KEYIN4_PU, GPIO_FN_PORT57_KEYIN5_PU, | ||
97 | GPIO_FN_PORT58_KEYIN6_PU, | ||
98 | |||
99 | /* 49-1 (FN) */ | ||
100 | GPIO_FN_VBUS0, GPIO_FN_CPORT0, GPIO_FN_CPORT1, GPIO_FN_CPORT2, | ||
101 | GPIO_FN_CPORT3, GPIO_FN_CPORT4, GPIO_FN_CPORT5, GPIO_FN_CPORT6, | ||
102 | GPIO_FN_CPORT7, GPIO_FN_CPORT8, GPIO_FN_CPORT9, GPIO_FN_CPORT10, | ||
103 | GPIO_FN_CPORT11, GPIO_FN_SIN2, GPIO_FN_CPORT12, GPIO_FN_XCTS2, | ||
104 | GPIO_FN_CPORT13, GPIO_FN_RFSPO4, GPIO_FN_CPORT14, GPIO_FN_RFSPO5, | ||
105 | GPIO_FN_CPORT15, GPIO_FN_CPORT16, GPIO_FN_CPORT17, GPIO_FN_SOUT2, | ||
106 | GPIO_FN_CPORT18, GPIO_FN_XRTS2, GPIO_FN_CPORT19, GPIO_FN_CPORT20, | ||
107 | GPIO_FN_RFSPO6, GPIO_FN_CPORT21, GPIO_FN_STATUS0, GPIO_FN_CPORT22, | ||
108 | GPIO_FN_STATUS1, GPIO_FN_CPORT23, GPIO_FN_STATUS2, GPIO_FN_RFSPO7, | ||
109 | GPIO_FN_MPORT0, GPIO_FN_MPORT1, GPIO_FN_B_SYNLD1, GPIO_FN_B_SYNLD2, | ||
110 | GPIO_FN_XMAINPS, GPIO_FN_XDIVPS, GPIO_FN_XIDRST, GPIO_FN_IDCLK, | ||
111 | GPIO_FN_IDIO, GPIO_FN_SOUT1, GPIO_FN_SCIFA4_TXD, | ||
112 | GPIO_FN_M02_BERDAT, GPIO_FN_SIN1, GPIO_FN_SCIFA4_RXD, GPIO_FN_XWUP, | ||
113 | GPIO_FN_XRTS1, GPIO_FN_SCIFA4_RTS, GPIO_FN_M03_BERCLK, | ||
114 | GPIO_FN_XCTS1, GPIO_FN_SCIFA4_CTS, | ||
115 | |||
116 | /* 49-2 (FN) */ | ||
117 | GPIO_FN_HSU_IQ_AGC6, GPIO_FN_MFG2_IN2, GPIO_FN_MSIOF2_MCK0, | ||
118 | GPIO_FN_HSU_IQ_AGC5, GPIO_FN_MFG2_IN1, GPIO_FN_MSIOF2_MCK1, | ||
119 | GPIO_FN_HSU_IQ_AGC4, GPIO_FN_MSIOF2_RSYNC, | ||
120 | GPIO_FN_HSU_IQ_AGC3, GPIO_FN_MFG2_OUT1, GPIO_FN_MSIOF2_RSCK, | ||
121 | GPIO_FN_HSU_IQ_AGC2, GPIO_FN_PORT42_KEYOUT0, | ||
122 | GPIO_FN_HSU_IQ_AGC1, GPIO_FN_PORT43_KEYOUT1, | ||
123 | GPIO_FN_HSU_IQ_AGC0, GPIO_FN_PORT44_KEYOUT2, | ||
124 | GPIO_FN_HSU_IQ_AGC_ST, GPIO_FN_PORT45_KEYOUT3, | ||
125 | GPIO_FN_HSU_IQ_PDO, GPIO_FN_PORT46_KEYOUT4, | ||
126 | GPIO_FN_HSU_IQ_PYO, GPIO_FN_PORT47_KEYOUT5, | ||
127 | GPIO_FN_HSU_EN_TXMUX_G3MO, GPIO_FN_PORT48_KEYIN0, | ||
128 | GPIO_FN_HSU_I_TXMUX_G3MO, GPIO_FN_PORT49_KEYIN1, | ||
129 | GPIO_FN_HSU_Q_TXMUX_G3MO, GPIO_FN_PORT50_KEYIN2, | ||
130 | GPIO_FN_HSU_SYO, GPIO_FN_PORT51_MSIOF2_TSYNC, | ||
131 | GPIO_FN_HSU_SDO, GPIO_FN_PORT52_MSIOF2_TSCK, | ||
132 | GPIO_FN_HSU_TGTTI_G3MO, GPIO_FN_PORT53_MSIOF2_TXD, | ||
133 | GPIO_FN_B_TIME_STAMP, GPIO_FN_PORT54_MSIOF2_RXD, | ||
134 | GPIO_FN_HSU_SDI, GPIO_FN_PORT55_KEYIN3, | ||
135 | GPIO_FN_HSU_SCO, GPIO_FN_PORT56_KEYIN4, | ||
136 | GPIO_FN_HSU_DREQ, GPIO_FN_PORT57_KEYIN5, | ||
137 | GPIO_FN_HSU_DACK, GPIO_FN_PORT58_KEYIN6, | ||
138 | GPIO_FN_HSU_CLK61M, GPIO_FN_PORT59_MSIOF2_SS1, | ||
139 | GPIO_FN_HSU_XRST, GPIO_FN_PORT60_MSIOF2_SS2, | ||
140 | GPIO_FN_PCMCLKO, GPIO_FN_SYNC8KO, GPIO_FN_DNPCM_A, GPIO_FN_UPPCM_A, | ||
141 | GPIO_FN_XTALB1L, | ||
142 | GPIO_FN_GPS_AGC1, GPIO_FN_SCIFA0_RTS, | ||
143 | GPIO_FN_GPS_AGC2, GPIO_FN_SCIFA0_SCK, | ||
144 | GPIO_FN_GPS_AGC3, GPIO_FN_SCIFA0_TXD, | ||
145 | GPIO_FN_GPS_AGC4, GPIO_FN_SCIFA0_RXD, | ||
146 | GPIO_FN_GPS_PWRD, GPIO_FN_SCIFA0_CTS, | ||
147 | GPIO_FN_GPS_IM, GPIO_FN_GPS_IS, GPIO_FN_GPS_QM, GPIO_FN_GPS_QS, | ||
148 | GPIO_FN_SIUBOMC, GPIO_FN_TPU2TO0, | ||
149 | GPIO_FN_SIUCKB, GPIO_FN_TPU2TO1, | ||
150 | GPIO_FN_SIUBOLR, GPIO_FN_BBIF2_TSYNC, GPIO_FN_TPU2TO2, | ||
151 | GPIO_FN_SIUBOBT, GPIO_FN_BBIF2_TSCK, GPIO_FN_TPU2TO3, | ||
152 | GPIO_FN_SIUBOSLD, GPIO_FN_BBIF2_TXD, GPIO_FN_TPU3TO0, | ||
153 | GPIO_FN_SIUBILR, GPIO_FN_TPU3TO1, | ||
154 | GPIO_FN_SIUBIBT, GPIO_FN_TPU3TO2, | ||
155 | GPIO_FN_SIUBISLD, GPIO_FN_TPU3TO3, | ||
156 | GPIO_FN_NMI, GPIO_FN_TPU4TO0, | ||
157 | GPIO_FN_DNPCM_M, GPIO_FN_TPU4TO1, GPIO_FN_TPU4TO2, GPIO_FN_TPU4TO3, | ||
158 | GPIO_FN_IRQ_TMPB, | ||
159 | GPIO_FN_PWEN, GPIO_FN_MFG1_OUT1, | ||
160 | GPIO_FN_OVCN, GPIO_FN_MFG1_IN1, | ||
161 | GPIO_FN_OVCN2, GPIO_FN_MFG1_IN2, | ||
162 | |||
163 | /* 49-3 (FN) */ | ||
164 | GPIO_FN_RFSPO1, GPIO_FN_RFSPO2, GPIO_FN_RFSPO3, GPIO_FN_PORT93_VIO_CKO2, | ||
165 | GPIO_FN_USBTERM, GPIO_FN_EXTLP, GPIO_FN_IDIN, | ||
166 | GPIO_FN_SCIFA5_CTS, GPIO_FN_MFG0_IN1, | ||
167 | GPIO_FN_SCIFA5_RTS, GPIO_FN_MFG0_IN2, | ||
168 | GPIO_FN_SCIFA5_RXD, | ||
169 | GPIO_FN_SCIFA5_TXD, | ||
170 | GPIO_FN_SCIFA5_SCK, GPIO_FN_MFG0_OUT1, | ||
171 | GPIO_FN_A0_EA0, GPIO_FN_BS, | ||
172 | GPIO_FN_A14_EA14, GPIO_FN_PORT102_KEYOUT0, | ||
173 | GPIO_FN_A15_EA15, GPIO_FN_PORT103_KEYOUT1, GPIO_FN_DV_CLKOL, | ||
174 | GPIO_FN_A16_EA16, GPIO_FN_PORT104_KEYOUT2, | ||
175 | GPIO_FN_DV_VSYNCL, GPIO_FN_MSIOF0_SS1, | ||
176 | GPIO_FN_A17_EA17, GPIO_FN_PORT105_KEYOUT3, | ||
177 | GPIO_FN_DV_HSYNCL, GPIO_FN_MSIOF0_TSYNC, | ||
178 | GPIO_FN_A18_EA18, GPIO_FN_PORT106_KEYOUT4, | ||
179 | GPIO_FN_DV_DL0, GPIO_FN_MSIOF0_TSCK, | ||
180 | GPIO_FN_A19_EA19, GPIO_FN_PORT107_KEYOUT5, | ||
181 | GPIO_FN_DV_DL1, GPIO_FN_MSIOF0_TXD, | ||
182 | GPIO_FN_A20_EA20, GPIO_FN_PORT108_KEYIN0, | ||
183 | GPIO_FN_DV_DL2, GPIO_FN_MSIOF0_RSCK, | ||
184 | GPIO_FN_A21_EA21, GPIO_FN_PORT109_KEYIN1, | ||
185 | GPIO_FN_DV_DL3, GPIO_FN_MSIOF0_RSYNC, | ||
186 | GPIO_FN_A22_EA22, GPIO_FN_PORT110_KEYIN2, | ||
187 | GPIO_FN_DV_DL4, GPIO_FN_MSIOF0_MCK0, | ||
188 | GPIO_FN_A23_EA23, GPIO_FN_PORT111_KEYIN3, | ||
189 | GPIO_FN_DV_DL5, GPIO_FN_MSIOF0_MCK1, | ||
190 | GPIO_FN_A24_EA24, GPIO_FN_PORT112_KEYIN4, | ||
191 | GPIO_FN_DV_DL6, GPIO_FN_MSIOF0_RXD, | ||
192 | GPIO_FN_A25_EA25, GPIO_FN_PORT113_KEYIN5, | ||
193 | GPIO_FN_DV_DL7, GPIO_FN_MSIOF0_SS2, | ||
194 | GPIO_FN_A26, GPIO_FN_PORT113_KEYIN6, GPIO_FN_DV_CLKIL, | ||
195 | GPIO_FN_D0_ED0_NAF0, GPIO_FN_D1_ED1_NAF1, GPIO_FN_D2_ED2_NAF2, | ||
196 | GPIO_FN_D3_ED3_NAF3, GPIO_FN_D4_ED4_NAF4, GPIO_FN_D5_ED5_NAF5, | ||
197 | GPIO_FN_D6_ED6_NAF6, GPIO_FN_D7_ED7_NAF7, GPIO_FN_D8_ED8_NAF8, | ||
198 | GPIO_FN_D9_ED9_NAF9, GPIO_FN_D10_ED10_NAF10, GPIO_FN_D11_ED11_NAF11, | ||
199 | GPIO_FN_D12_ED12_NAF12, GPIO_FN_D13_ED13_NAF13, | ||
200 | GPIO_FN_D14_ED14_NAF14, GPIO_FN_D15_ED15_NAF15, | ||
201 | GPIO_FN_CS4, GPIO_FN_CS5A, GPIO_FN_CS5B, GPIO_FN_FCE1, | ||
202 | GPIO_FN_CS6B, GPIO_FN_XCS2, GPIO_FN_FCE0, GPIO_FN_CS6A, | ||
203 | GPIO_FN_DACK0, GPIO_FN_WAIT, GPIO_FN_DREQ0, GPIO_FN_RD_XRD, | ||
204 | GPIO_FN_A27, GPIO_FN_RDWR_XWE, GPIO_FN_WE0_XWR0_FWE, | ||
205 | GPIO_FN_WE1_XWR1, GPIO_FN_FRB, GPIO_FN_CKO, | ||
206 | GPIO_FN_NBRSTOUT, GPIO_FN_NBRST, | ||
207 | |||
208 | /* 49-4 (FN) */ | ||
209 | GPIO_FN_RFSPO0, GPIO_FN_PORT146_VIO_CKO2, GPIO_FN_TSTMD, | ||
210 | GPIO_FN_VIO_VD, GPIO_FN_VIO_HD, | ||
211 | GPIO_FN_VIO_D0, GPIO_FN_VIO_D1, GPIO_FN_VIO_D2, | ||
212 | GPIO_FN_VIO_D3, GPIO_FN_VIO_D4, GPIO_FN_VIO_D5, | ||
213 | GPIO_FN_VIO_D6, GPIO_FN_VIO_D7, GPIO_FN_VIO_D8, | ||
214 | GPIO_FN_VIO_D9, GPIO_FN_VIO_D10, GPIO_FN_VIO_D11, | ||
215 | GPIO_FN_VIO_D12, GPIO_FN_VIO_D13, GPIO_FN_VIO_D14, | ||
216 | GPIO_FN_VIO_D15, GPIO_FN_VIO_CLK, GPIO_FN_VIO_FIELD, | ||
217 | GPIO_FN_VIO_CKO, | ||
218 | GPIO_FN_MFG3_IN1, GPIO_FN_MFG3_IN2, | ||
219 | GPIO_FN_M9_SLCD_A01, GPIO_FN_MFG3_OUT1, GPIO_FN_TPU0TO0, | ||
220 | GPIO_FN_M10_SLCD_CK1, GPIO_FN_MFG4_IN1, GPIO_FN_TPU0TO1, | ||
221 | GPIO_FN_M11_SLCD_SO1, GPIO_FN_MFG4_IN2, GPIO_FN_TPU0TO2, | ||
222 | GPIO_FN_M12_SLCD_CE1, GPIO_FN_MFG4_OUT1, GPIO_FN_TPU0TO3, | ||
223 | GPIO_FN_LCDD0, GPIO_FN_PORT175_KEYOUT0, GPIO_FN_DV_D0, | ||
224 | GPIO_FN_SIUCKA, GPIO_FN_MFG0_OUT2, | ||
225 | GPIO_FN_LCDD1, GPIO_FN_PORT176_KEYOUT1, GPIO_FN_DV_D1, | ||
226 | GPIO_FN_SIUAOLR, GPIO_FN_BBIF2_TSYNC1, | ||
227 | GPIO_FN_LCDD2, GPIO_FN_PORT177_KEYOUT2, GPIO_FN_DV_D2, | ||
228 | GPIO_FN_SIUAOBT, GPIO_FN_BBIF2_TSCK1, | ||
229 | GPIO_FN_LCDD3, GPIO_FN_PORT178_KEYOUT3, GPIO_FN_DV_D3, | ||
230 | GPIO_FN_SIUAOSLD, GPIO_FN_BBIF2_TXD1, | ||
231 | GPIO_FN_LCDD4, GPIO_FN_PORT179_KEYOUT4, GPIO_FN_DV_D4, | ||
232 | GPIO_FN_SIUAISPD, GPIO_FN_MFG1_OUT2, | ||
233 | GPIO_FN_LCDD5, GPIO_FN_PORT180_KEYOUT5, GPIO_FN_DV_D5, | ||
234 | GPIO_FN_SIUAILR, GPIO_FN_MFG2_OUT2, | ||
235 | GPIO_FN_LCDD6, GPIO_FN_DV_D6, | ||
236 | GPIO_FN_SIUAIBT, GPIO_FN_MFG3_OUT2, GPIO_FN_XWR2, | ||
237 | GPIO_FN_LCDD7, GPIO_FN_DV_D7, | ||
238 | GPIO_FN_SIUAISLD, GPIO_FN_MFG4_OUT2, GPIO_FN_XWR3, | ||
239 | GPIO_FN_LCDD8, GPIO_FN_DV_D8, GPIO_FN_D16, GPIO_FN_ED16, | ||
240 | GPIO_FN_LCDD9, GPIO_FN_DV_D9, GPIO_FN_D17, GPIO_FN_ED17, | ||
241 | GPIO_FN_LCDD10, GPIO_FN_DV_D10, GPIO_FN_D18, GPIO_FN_ED18, | ||
242 | GPIO_FN_LCDD11, GPIO_FN_DV_D11, GPIO_FN_D19, GPIO_FN_ED19, | ||
243 | GPIO_FN_LCDD12, GPIO_FN_DV_D12, GPIO_FN_D20, GPIO_FN_ED20, | ||
244 | GPIO_FN_LCDD13, GPIO_FN_DV_D13, GPIO_FN_D21, GPIO_FN_ED21, | ||
245 | GPIO_FN_LCDD14, GPIO_FN_DV_D14, GPIO_FN_D22, GPIO_FN_ED22, | ||
246 | GPIO_FN_LCDD15, GPIO_FN_DV_D15, GPIO_FN_D23, GPIO_FN_ED23, | ||
247 | GPIO_FN_LCDD16, GPIO_FN_DV_HSYNC, GPIO_FN_D24, GPIO_FN_ED24, | ||
248 | GPIO_FN_LCDD17, GPIO_FN_DV_VSYNC, GPIO_FN_D25, GPIO_FN_ED25, | ||
249 | GPIO_FN_LCDD18, GPIO_FN_DREQ2, GPIO_FN_MSIOF0L_TSCK, | ||
250 | GPIO_FN_D26, GPIO_FN_ED26, | ||
251 | GPIO_FN_LCDD19, GPIO_FN_MSIOF0L_TSYNC, | ||
252 | GPIO_FN_D27, GPIO_FN_ED27, | ||
253 | GPIO_FN_LCDD20, GPIO_FN_TS_SPSYNC1, GPIO_FN_MSIOF0L_MCK0, | ||
254 | GPIO_FN_D28, GPIO_FN_ED28, | ||
255 | GPIO_FN_LCDD21, GPIO_FN_TS_SDAT1, GPIO_FN_MSIOF0L_MCK1, | ||
256 | GPIO_FN_D29, GPIO_FN_ED29, | ||
257 | GPIO_FN_LCDD22, GPIO_FN_TS_SDEN1, GPIO_FN_MSIOF0L_SS1, | ||
258 | GPIO_FN_D30, GPIO_FN_ED30, | ||
259 | GPIO_FN_LCDD23, GPIO_FN_TS_SCK1, GPIO_FN_MSIOF0L_SS2, | ||
260 | GPIO_FN_D31, GPIO_FN_ED31, | ||
261 | GPIO_FN_LCDDCK, GPIO_FN_LCDWR, GPIO_FN_DV_CKO, GPIO_FN_SIUAOSPD, | ||
262 | GPIO_FN_LCDRD, GPIO_FN_DACK2, GPIO_FN_MSIOF0L_RSYNC, | ||
263 | |||
264 | |||
265 | /* 49-5 (FN) */ | ||
266 | GPIO_FN_LCDHSYN, GPIO_FN_LCDCS, GPIO_FN_LCDCS2, GPIO_FN_DACK3, | ||
267 | GPIO_FN_LCDDISP, GPIO_FN_LCDRS, GPIO_FN_DREQ3, GPIO_FN_MSIOF0L_RSCK, | ||
268 | GPIO_FN_LCDCSYN, GPIO_FN_LCDCSYN2, GPIO_FN_DV_CKI, | ||
269 | GPIO_FN_LCDLCLK, GPIO_FN_DREQ1, GPIO_FN_MSIOF0L_RXD, | ||
270 | GPIO_FN_LCDDON, GPIO_FN_LCDDON2, GPIO_FN_DACK1, GPIO_FN_MSIOF0L_TXD, | ||
271 | GPIO_FN_VIO_DR0, GPIO_FN_VIO_DR1, GPIO_FN_VIO_DR2, GPIO_FN_VIO_DR3, | ||
272 | GPIO_FN_VIO_DR4, GPIO_FN_VIO_DR5, GPIO_FN_VIO_DR6, GPIO_FN_VIO_DR7, | ||
273 | GPIO_FN_VIO_VDR, GPIO_FN_VIO_HDR, | ||
274 | GPIO_FN_VIO_CLKR, GPIO_FN_VIO_CKOR, | ||
275 | GPIO_FN_SCIFA1_TXD, GPIO_FN_GPS_PGFA0, | ||
276 | GPIO_FN_SCIFA1_SCK, GPIO_FN_GPS_PGFA1, | ||
277 | GPIO_FN_SCIFA1_RTS, GPIO_FN_GPS_EPPSINMON, | ||
278 | GPIO_FN_SCIFA1_RXD, GPIO_FN_SCIFA1_CTS, | ||
279 | GPIO_FN_MSIOF1_TXD, GPIO_FN_SCIFA1_TXD2, GPIO_FN_GPS_TXD, | ||
280 | GPIO_FN_MSIOF1_TSYNC, GPIO_FN_SCIFA1_CTS2, GPIO_FN_I2C_SDA2, | ||
281 | GPIO_FN_MSIOF1_TSCK, GPIO_FN_SCIFA1_SCK2, | ||
282 | GPIO_FN_MSIOF1_RXD, GPIO_FN_SCIFA1_RXD2, GPIO_FN_GPS_RXD, | ||
283 | GPIO_FN_MSIOF1_RSCK, GPIO_FN_SCIFA1_RTS2, | ||
284 | GPIO_FN_MSIOF1_RSYNC, GPIO_FN_I2C_SCL2, | ||
285 | GPIO_FN_MSIOF1_MCK0, GPIO_FN_MSIOF1_MCK1, | ||
286 | GPIO_FN_MSIOF1_SS1, GPIO_FN_EDBGREQ3, | ||
287 | GPIO_FN_MSIOF1_SS2, | ||
288 | GPIO_FN_PORT236_IROUT, GPIO_FN_IRDA_OUT, | ||
289 | GPIO_FN_IRDA_IN, GPIO_FN_IRDA_FIRSEL, | ||
290 | GPIO_FN_TPU1TO0, GPIO_FN_TS_SPSYNC3, | ||
291 | GPIO_FN_TPU1TO1, GPIO_FN_TS_SDAT3, | ||
292 | GPIO_FN_TPU1TO2, GPIO_FN_TS_SDEN3, GPIO_FN_PORT241_MSIOF2_SS1, | ||
293 | GPIO_FN_TPU1TO3, GPIO_FN_PORT242_MSIOF2_TSCK, | ||
294 | GPIO_FN_M13_BSW, GPIO_FN_PORT243_MSIOF2_TSYNC, | ||
295 | GPIO_FN_M14_GSW, GPIO_FN_PORT244_MSIOF2_TXD, | ||
296 | GPIO_FN_PORT245_IROUT, GPIO_FN_M15_RSW, | ||
297 | GPIO_FN_SOUT3, GPIO_FN_SCIFA2_TXD1, | ||
298 | GPIO_FN_SIN3, GPIO_FN_SCIFA2_RXD1, | ||
299 | GPIO_FN_XRTS3, GPIO_FN_SCIFA2_RTS1, GPIO_FN_PORT248_MSIOF2_SS2, | ||
300 | GPIO_FN_XCTS3, GPIO_FN_SCIFA2_CTS1, GPIO_FN_PORT249_MSIOF2_RXD, | ||
301 | GPIO_FN_DINT, GPIO_FN_SCIFA2_SCK1, GPIO_FN_TS_SCK3, | ||
302 | GPIO_FN_SDHICLK0, GPIO_FN_TCK2, | ||
303 | GPIO_FN_SDHICD0, | ||
304 | GPIO_FN_SDHID0_0, GPIO_FN_TMS2, | ||
305 | GPIO_FN_SDHID0_1, GPIO_FN_TDO2, | ||
306 | GPIO_FN_SDHID0_2, GPIO_FN_TDI2, | ||
307 | GPIO_FN_SDHID0_3, GPIO_FN_RTCK2, | ||
308 | |||
309 | /* 49-6 (FN) */ | ||
310 | GPIO_FN_SDHICMD0, GPIO_FN_TRST2, | ||
311 | GPIO_FN_SDHIWP0, GPIO_FN_EDBGREQ2, | ||
312 | GPIO_FN_SDHICLK1, GPIO_FN_TCK3, | ||
313 | GPIO_FN_SDHID1_0, GPIO_FN_M11_SLCD_SO2, | ||
314 | GPIO_FN_TS_SPSYNC2, GPIO_FN_TMS3, | ||
315 | GPIO_FN_SDHID1_1, GPIO_FN_M9_SLCD_AO2, | ||
316 | GPIO_FN_TS_SDAT2, GPIO_FN_TDO3, | ||
317 | GPIO_FN_SDHID1_2, GPIO_FN_M10_SLCD_CK2, | ||
318 | GPIO_FN_TS_SDEN2, GPIO_FN_TDI3, | ||
319 | GPIO_FN_SDHID1_3, GPIO_FN_M12_SLCD_CE2, | ||
320 | GPIO_FN_TS_SCK2, GPIO_FN_RTCK3, | ||
321 | GPIO_FN_SDHICMD1, GPIO_FN_TRST3, | ||
322 | GPIO_FN_SDHICLK2, GPIO_FN_SCIFB_SCK, | ||
323 | GPIO_FN_SDHID2_0, GPIO_FN_SCIFB_TXD, | ||
324 | GPIO_FN_SDHID2_1, GPIO_FN_SCIFB_CTS, | ||
325 | GPIO_FN_SDHID2_2, GPIO_FN_SCIFB_RXD, | ||
326 | GPIO_FN_SDHID2_3, GPIO_FN_SCIFB_RTS, | ||
327 | GPIO_FN_SDHICMD2, | ||
328 | GPIO_FN_RESETOUTS, | ||
329 | GPIO_FN_DIVLOCK, | ||
330 | }; | ||
331 | |||
332 | #endif /* __ASM_SH7367_H__ */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index eb98b45c5089..26cd1016fad8 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -452,6 +452,10 @@ enum { | |||
452 | SHDMA_SLAVE_SCIF5_RX, | 452 | SHDMA_SLAVE_SCIF5_RX, |
453 | SHDMA_SLAVE_SCIF6_TX, | 453 | SHDMA_SLAVE_SCIF6_TX, |
454 | SHDMA_SLAVE_SCIF6_RX, | 454 | SHDMA_SLAVE_SCIF6_RX, |
455 | SHDMA_SLAVE_FLCTL0_TX, | ||
456 | SHDMA_SLAVE_FLCTL0_RX, | ||
457 | SHDMA_SLAVE_FLCTL1_TX, | ||
458 | SHDMA_SLAVE_FLCTL1_RX, | ||
455 | SHDMA_SLAVE_SDHI0_RX, | 459 | SHDMA_SLAVE_SDHI0_RX, |
456 | SHDMA_SLAVE_SDHI0_TX, | 460 | SHDMA_SLAVE_SDHI0_TX, |
457 | SHDMA_SLAVE_SDHI1_RX, | 461 | SHDMA_SLAVE_SDHI1_RX, |
@@ -475,8 +479,6 @@ extern struct clk sh7372_dv_clki_div2_clk; | |||
475 | extern struct clk sh7372_pllc2_clk; | 479 | extern struct clk sh7372_pllc2_clk; |
476 | extern struct clk sh7372_fsiack_clk; | 480 | extern struct clk sh7372_fsiack_clk; |
477 | extern struct clk sh7372_fsibck_clk; | 481 | extern struct clk sh7372_fsibck_clk; |
478 | extern struct clk sh7372_fsidiva_clk; | ||
479 | extern struct clk sh7372_fsidivb_clk; | ||
480 | 482 | ||
481 | extern void sh7372_intcs_suspend(void); | 483 | extern void sh7372_intcs_suspend(void); |
482 | extern void sh7372_intcs_resume(void); | 484 | extern void sh7372_intcs_resume(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7377.h b/arch/arm/mach-shmobile/include/mach/sh7377.h deleted file mode 100644 index f580e227dd1c..000000000000 --- a/arch/arm/mach-shmobile/include/mach/sh7377.h +++ /dev/null | |||
@@ -1,360 +0,0 @@ | |||
1 | #ifndef __ASM_SH7377_H__ | ||
2 | #define __ASM_SH7377_H__ | ||
3 | |||
4 | /* Pin Function Controller: | ||
5 | * GPIO_FN_xx - GPIO used to select pin function | ||
6 | * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU | ||
7 | */ | ||
8 | enum { | ||
9 | /* 55-1 -> 55-5 (GPIO) */ | ||
10 | GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, | ||
11 | GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, | ||
12 | |||
13 | GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, | ||
14 | GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, | ||
15 | |||
16 | GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, | ||
17 | GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, | ||
18 | |||
19 | GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, | ||
20 | GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, | ||
21 | |||
22 | GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, | ||
23 | GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, | ||
24 | |||
25 | GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, | ||
26 | GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, | ||
27 | |||
28 | GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, | ||
29 | GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, | ||
30 | |||
31 | GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, | ||
32 | GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, | ||
33 | |||
34 | GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, | ||
35 | GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, | ||
36 | |||
37 | GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, | ||
38 | GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, | ||
39 | |||
40 | GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, | ||
41 | GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, | ||
42 | |||
43 | GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, | ||
44 | GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, | ||
45 | |||
46 | GPIO_PORT128, GPIO_PORT129, | ||
47 | |||
48 | GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, | ||
49 | GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, | ||
50 | |||
51 | GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, | ||
52 | GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, | ||
53 | |||
54 | GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, | ||
55 | GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, | ||
56 | |||
57 | GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, | ||
58 | |||
59 | GPIO_PORT192, GPIO_PORT193, GPIO_PORT194, | ||
60 | GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199, | ||
61 | |||
62 | GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204, | ||
63 | GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209, | ||
64 | |||
65 | GPIO_PORT210, GPIO_PORT211, GPIO_PORT212, GPIO_PORT213, GPIO_PORT214, | ||
66 | GPIO_PORT215, GPIO_PORT216, GPIO_PORT217, GPIO_PORT218, GPIO_PORT219, | ||
67 | |||
68 | GPIO_PORT220, GPIO_PORT221, GPIO_PORT222, GPIO_PORT223, GPIO_PORT224, | ||
69 | GPIO_PORT225, GPIO_PORT226, GPIO_PORT227, GPIO_PORT228, GPIO_PORT229, | ||
70 | |||
71 | GPIO_PORT230, GPIO_PORT231, GPIO_PORT232, GPIO_PORT233, GPIO_PORT234, | ||
72 | GPIO_PORT235, GPIO_PORT236, GPIO_PORT237, GPIO_PORT238, GPIO_PORT239, | ||
73 | |||
74 | GPIO_PORT240, GPIO_PORT241, GPIO_PORT242, GPIO_PORT243, GPIO_PORT244, | ||
75 | GPIO_PORT245, GPIO_PORT246, GPIO_PORT247, GPIO_PORT248, GPIO_PORT249, | ||
76 | |||
77 | GPIO_PORT250, GPIO_PORT251, GPIO_PORT252, GPIO_PORT253, GPIO_PORT254, | ||
78 | GPIO_PORT255, GPIO_PORT256, GPIO_PORT257, GPIO_PORT258, GPIO_PORT259, | ||
79 | |||
80 | GPIO_PORT260, GPIO_PORT261, GPIO_PORT262, GPIO_PORT263, GPIO_PORT264, | ||
81 | |||
82 | /* Special Pull-up / Pull-down Functions */ | ||
83 | GPIO_FN_PORT66_KEYIN0_PU, GPIO_FN_PORT67_KEYIN1_PU, | ||
84 | GPIO_FN_PORT68_KEYIN2_PU, GPIO_FN_PORT69_KEYIN3_PU, | ||
85 | GPIO_FN_PORT70_KEYIN4_PU, GPIO_FN_PORT71_KEYIN5_PU, | ||
86 | GPIO_FN_PORT72_KEYIN6_PU, | ||
87 | |||
88 | /* 55-1 (FN) */ | ||
89 | GPIO_FN_VBUS_0, | ||
90 | GPIO_FN_CPORT0, | ||
91 | GPIO_FN_CPORT1, | ||
92 | GPIO_FN_CPORT2, | ||
93 | GPIO_FN_CPORT3, | ||
94 | GPIO_FN_CPORT4, | ||
95 | GPIO_FN_CPORT5, | ||
96 | GPIO_FN_CPORT6, | ||
97 | GPIO_FN_CPORT7, | ||
98 | GPIO_FN_CPORT8, | ||
99 | GPIO_FN_CPORT9, | ||
100 | GPIO_FN_CPORT10, | ||
101 | GPIO_FN_CPORT11, GPIO_FN_SIN2, | ||
102 | GPIO_FN_CPORT12, GPIO_FN_XCTS2, | ||
103 | GPIO_FN_CPORT13, GPIO_FN_RFSPO4, | ||
104 | GPIO_FN_CPORT14, GPIO_FN_RFSPO5, | ||
105 | GPIO_FN_CPORT15, GPIO_FN_SCIFA0_SCK, GPIO_FN_GPS_AGC2, | ||
106 | GPIO_FN_CPORT16, GPIO_FN_SCIFA0_TXD, GPIO_FN_GPS_AGC3, | ||
107 | GPIO_FN_CPORT17_IC_OE, GPIO_FN_SOUT2, | ||
108 | GPIO_FN_CPORT18, GPIO_FN_XRTS2, GPIO_FN_PORT19_VIO_CKO2, | ||
109 | GPIO_FN_CPORT19_MPORT1, | ||
110 | GPIO_FN_CPORT20, GPIO_FN_RFSPO6, | ||
111 | GPIO_FN_CPORT21, GPIO_FN_STATUS0, | ||
112 | GPIO_FN_CPORT22, GPIO_FN_STATUS1, | ||
113 | GPIO_FN_CPORT23, GPIO_FN_STATUS2, GPIO_FN_RFSPO7, | ||
114 | GPIO_FN_B_SYNLD1, | ||
115 | GPIO_FN_B_SYNLD2, GPIO_FN_SYSENMSK, | ||
116 | GPIO_FN_XMAINPS, | ||
117 | GPIO_FN_XDIVPS, | ||
118 | GPIO_FN_XIDRST, | ||
119 | GPIO_FN_IDCLK, GPIO_FN_IC_DP, | ||
120 | GPIO_FN_IDIO, GPIO_FN_IC_DM, | ||
121 | GPIO_FN_SOUT1, GPIO_FN_SCIFA4_TXD, GPIO_FN_M02_BERDAT, | ||
122 | GPIO_FN_SIN1, GPIO_FN_SCIFA4_RXD, GPIO_FN_XWUP, | ||
123 | GPIO_FN_XRTS1, GPIO_FN_SCIFA4_RTS, GPIO_FN_M03_BERCLK, | ||
124 | GPIO_FN_XCTS1, GPIO_FN_SCIFA4_CTS, | ||
125 | GPIO_FN_PCMCLKO, | ||
126 | GPIO_FN_SYNC8KO, | ||
127 | |||
128 | /* 55-2 (FN) */ | ||
129 | GPIO_FN_DNPCM_A, | ||
130 | GPIO_FN_UPPCM_A, | ||
131 | GPIO_FN_VACK, | ||
132 | GPIO_FN_XTALB1L, | ||
133 | GPIO_FN_GPS_AGC1, GPIO_FN_SCIFA0_RTS, | ||
134 | GPIO_FN_GPS_AGC4, GPIO_FN_SCIFA0_RXD, | ||
135 | GPIO_FN_GPS_PWRDOWN, GPIO_FN_SCIFA0_CTS, | ||
136 | GPIO_FN_GPS_IM, | ||
137 | GPIO_FN_GPS_IS, | ||
138 | GPIO_FN_GPS_QM, | ||
139 | GPIO_FN_GPS_QS, | ||
140 | GPIO_FN_FMSOCK, GPIO_FN_PORT49_IRDA_OUT, GPIO_FN_PORT49_IROUT, | ||
141 | GPIO_FN_FMSOOLR, GPIO_FN_BBIF2_TSYNC2, GPIO_FN_TPU2TO2, GPIO_FN_IPORT3, | ||
142 | GPIO_FN_FMSIOLR, | ||
143 | GPIO_FN_FMSOOBT, GPIO_FN_BBIF2_TSCK2, GPIO_FN_TPU2TO3, GPIO_FN_OPORT1, | ||
144 | GPIO_FN_FMSIOBT, | ||
145 | GPIO_FN_FMSOSLD, GPIO_FN_BBIF2_TXD2, GPIO_FN_OPORT2, | ||
146 | GPIO_FN_FMSOILR, GPIO_FN_PORT53_IRDA_IN, GPIO_FN_TPU3TO3, | ||
147 | GPIO_FN_OPORT3, GPIO_FN_FMSIILR, | ||
148 | GPIO_FN_FMSOIBT, GPIO_FN_PORT54_IRDA_FIRSEL, GPIO_FN_TPU3TO2, | ||
149 | GPIO_FN_FMSIIBT, | ||
150 | GPIO_FN_FMSISLD, GPIO_FN_MFG0_OUT1, GPIO_FN_TPU0TO0, | ||
151 | GPIO_FN_A0_EA0, GPIO_FN_BS, | ||
152 | GPIO_FN_A12_EA12, GPIO_FN_PORT58_VIO_CKOR, GPIO_FN_TPU4TO2, | ||
153 | GPIO_FN_A13_EA13, GPIO_FN_PORT59_IROUT, GPIO_FN_MFG0_OUT2, | ||
154 | GPIO_FN_TPU0TO1, | ||
155 | GPIO_FN_A14_EA14, GPIO_FN_PORT60_KEYOUT5, | ||
156 | GPIO_FN_A15_EA15, GPIO_FN_PORT61_KEYOUT4, | ||
157 | GPIO_FN_A16_EA16, GPIO_FN_PORT62_KEYOUT3, GPIO_FN_MSIOF0_SS1, | ||
158 | GPIO_FN_A17_EA17, GPIO_FN_PORT63_KEYOUT2, GPIO_FN_MSIOF0_TSYNC, | ||
159 | GPIO_FN_A18_EA18, GPIO_FN_PORT64_KEYOUT1, GPIO_FN_MSIOF0_TSCK, | ||
160 | GPIO_FN_A19_EA19, GPIO_FN_PORT65_KEYOUT0, GPIO_FN_MSIOF0_TXD, | ||
161 | GPIO_FN_A20_EA20, GPIO_FN_PORT66_KEYIN0, GPIO_FN_MSIOF0_RSCK, | ||
162 | GPIO_FN_A21_EA21, GPIO_FN_PORT67_KEYIN1, GPIO_FN_MSIOF0_RSYNC, | ||
163 | GPIO_FN_A22_EA22, GPIO_FN_PORT68_KEYIN2, GPIO_FN_MSIOF0_MCK0, | ||
164 | GPIO_FN_A23_EA23, GPIO_FN_PORT69_KEYIN3, GPIO_FN_MSIOF0_MCK1, | ||
165 | GPIO_FN_A24_EA24, GPIO_FN_PORT70_KEYIN4, GPIO_FN_MSIOF0_RXD, | ||
166 | GPIO_FN_A25_EA25, GPIO_FN_PORT71_KEYIN5, GPIO_FN_MSIOF0_SS2, | ||
167 | GPIO_FN_A26, GPIO_FN_PORT72_KEYIN6, | ||
168 | GPIO_FN_D0_ED0_NAF0, | ||
169 | GPIO_FN_D1_ED1_NAF1, | ||
170 | GPIO_FN_D2_ED2_NAF2, | ||
171 | GPIO_FN_D3_ED3_NAF3, | ||
172 | GPIO_FN_D4_ED4_NAF4, | ||
173 | GPIO_FN_D5_ED5_NAF5, | ||
174 | GPIO_FN_D6_ED6_NAF6, | ||
175 | GPIO_FN_D7_ED7_NAF7, | ||
176 | GPIO_FN_D8_ED8_NAF8, | ||
177 | GPIO_FN_D9_ED9_NAF9, | ||
178 | GPIO_FN_D10_ED10_NAF10, | ||
179 | GPIO_FN_D11_ED11_NAF11, | ||
180 | GPIO_FN_D12_ED12_NAF12, | ||
181 | GPIO_FN_D13_ED13_NAF13, | ||
182 | GPIO_FN_D14_ED14_NAF14, | ||
183 | GPIO_FN_D15_ED15_NAF15, | ||
184 | GPIO_FN_CS4, | ||
185 | GPIO_FN_CS5A, GPIO_FN_FMSICK, | ||
186 | GPIO_FN_CS5B, GPIO_FN_FCE1, | ||
187 | |||
188 | /* 55-3 (FN) */ | ||
189 | GPIO_FN_CS6B, GPIO_FN_XCS2, GPIO_FN_CS6A, GPIO_FN_DACK0, | ||
190 | GPIO_FN_FCE0, | ||
191 | GPIO_FN_WAIT, GPIO_FN_DREQ0, | ||
192 | GPIO_FN_RD_XRD, | ||
193 | GPIO_FN_WE0_XWR0_FWE, | ||
194 | GPIO_FN_WE1_XWR1, | ||
195 | GPIO_FN_FRB, | ||
196 | GPIO_FN_CKO, | ||
197 | GPIO_FN_NBRSTOUT, | ||
198 | GPIO_FN_NBRST, | ||
199 | GPIO_FN_GPS_EPPSIN, | ||
200 | GPIO_FN_LATCHPULSE, | ||
201 | GPIO_FN_LTESIGNAL, | ||
202 | GPIO_FN_LEGACYSTATE, | ||
203 | GPIO_FN_TCKON, | ||
204 | GPIO_FN_VIO_VD, GPIO_FN_PORT128_KEYOUT0, GPIO_FN_IPORT0, | ||
205 | GPIO_FN_VIO_HD, GPIO_FN_PORT129_KEYOUT1, GPIO_FN_IPORT1, | ||
206 | GPIO_FN_VIO_D0, GPIO_FN_PORT130_KEYOUT2, GPIO_FN_PORT130_MSIOF2_RXD, | ||
207 | GPIO_FN_VIO_D1, GPIO_FN_PORT131_KEYOUT3, GPIO_FN_PORT131_MSIOF2_SS1, | ||
208 | GPIO_FN_VIO_D2, GPIO_FN_PORT132_KEYOUT4, GPIO_FN_PORT132_MSIOF2_SS2, | ||
209 | GPIO_FN_VIO_D3, GPIO_FN_PORT133_KEYOUT5, GPIO_FN_PORT133_MSIOF2_TSYNC, | ||
210 | GPIO_FN_VIO_D4, GPIO_FN_PORT134_KEYIN0, GPIO_FN_PORT134_MSIOF2_TXD, | ||
211 | GPIO_FN_VIO_D5, GPIO_FN_PORT135_KEYIN1, GPIO_FN_PORT135_MSIOF2_TSCK, | ||
212 | GPIO_FN_VIO_D6, GPIO_FN_PORT136_KEYIN2, | ||
213 | GPIO_FN_VIO_D7, GPIO_FN_PORT137_KEYIN3, | ||
214 | GPIO_FN_VIO_D8, GPIO_FN_M9_SLCD_A01, GPIO_FN_PORT138_FSIAOMC, | ||
215 | GPIO_FN_VIO_D9, GPIO_FN_M10_SLCD_CK1, GPIO_FN_PORT139_FSIAOLR, | ||
216 | GPIO_FN_VIO_D10, GPIO_FN_M11_SLCD_SO1, GPIO_FN_TPU0TO2, | ||
217 | GPIO_FN_PORT140_FSIAOBT, | ||
218 | GPIO_FN_VIO_D11, GPIO_FN_M12_SLCD_CE1, GPIO_FN_TPU0TO3, | ||
219 | GPIO_FN_PORT141_FSIAOSLD, | ||
220 | GPIO_FN_VIO_D12, GPIO_FN_M13_BSW, GPIO_FN_PORT142_FSIACK, | ||
221 | GPIO_FN_VIO_D13, GPIO_FN_M14_GSW, GPIO_FN_PORT143_FSIAILR, | ||
222 | GPIO_FN_VIO_D14, GPIO_FN_M15_RSW, GPIO_FN_PORT144_FSIAIBT, | ||
223 | GPIO_FN_VIO_D15, GPIO_FN_TPU1TO3, GPIO_FN_PORT145_FSIAISLD, | ||
224 | GPIO_FN_VIO_CLK, GPIO_FN_PORT146_KEYIN4, GPIO_FN_IPORT2, | ||
225 | GPIO_FN_VIO_FIELD, GPIO_FN_PORT147_KEYIN5, | ||
226 | GPIO_FN_VIO_CKO, GPIO_FN_PORT148_KEYIN6, | ||
227 | GPIO_FN_A27, GPIO_FN_RDWR_XWE, GPIO_FN_MFG0_IN1, | ||
228 | GPIO_FN_MFG0_IN2, | ||
229 | GPIO_FN_TS_SPSYNC3, GPIO_FN_MSIOF2_RSCK, | ||
230 | GPIO_FN_TS_SDAT3, GPIO_FN_MSIOF2_RSYNC, | ||
231 | GPIO_FN_TPU1TO2, GPIO_FN_TS_SDEN3, GPIO_FN_PORT153_MSIOF2_SS1, | ||
232 | GPIO_FN_SOUT3, GPIO_FN_SCIFA2_TXD1, GPIO_FN_MSIOF2_MCK0, | ||
233 | GPIO_FN_SIN3, GPIO_FN_SCIFA2_RXD1, GPIO_FN_MSIOF2_MCK1, | ||
234 | GPIO_FN_XRTS3, GPIO_FN_SCIFA2_RTS1, GPIO_FN_PORT156_MSIOF2_SS2, | ||
235 | GPIO_FN_XCTS3, GPIO_FN_SCIFA2_CTS1, GPIO_FN_PORT157_MSIOF2_RXD, | ||
236 | |||
237 | /* 55-4 (FN) */ | ||
238 | GPIO_FN_DINT, GPIO_FN_SCIFA2_SCK1, GPIO_FN_TS_SCK3, | ||
239 | GPIO_FN_PORT159_SCIFB_SCK, GPIO_FN_PORT159_SCIFA5_SCK, GPIO_FN_NMI, | ||
240 | GPIO_FN_PORT160_SCIFB_TXD, GPIO_FN_PORT160_SCIFA5_TXD, GPIO_FN_SOUT0, | ||
241 | GPIO_FN_PORT161_SCIFB_CTS, GPIO_FN_PORT161_SCIFA5_CTS, GPIO_FN_XCTS0, | ||
242 | GPIO_FN_MFG3_IN2, | ||
243 | GPIO_FN_PORT162_SCIFB_RXD, GPIO_FN_PORT162_SCIFA5_RXD, GPIO_FN_SIN0, | ||
244 | GPIO_FN_MFG3_IN1, | ||
245 | GPIO_FN_PORT163_SCIFB_RTS, GPIO_FN_PORT163_SCIFA5_RTS, GPIO_FN_XRTS0, | ||
246 | GPIO_FN_MFG3_OUT1, | ||
247 | GPIO_FN_TPU3TO0, | ||
248 | GPIO_FN_LCDD0, GPIO_FN_PORT192_KEYOUT0, GPIO_FN_EXT_CKI, | ||
249 | GPIO_FN_LCDD1, GPIO_FN_PORT193_KEYOUT1, GPIO_FN_PORT193_SCIFA5_CTS, | ||
250 | GPIO_FN_BBIF2_TSYNC1, | ||
251 | GPIO_FN_LCDD2, GPIO_FN_PORT194_KEYOUT2, GPIO_FN_PORT194_SCIFA5_RTS, | ||
252 | GPIO_FN_BBIF2_TSCK1, | ||
253 | GPIO_FN_LCDD3, GPIO_FN_PORT195_KEYOUT3, GPIO_FN_PORT195_SCIFA5_RXD, | ||
254 | GPIO_FN_BBIF2_TXD1, | ||
255 | GPIO_FN_LCDD4, GPIO_FN_PORT196_KEYOUT4, GPIO_FN_PORT196_SCIFA5_TXD, | ||
256 | GPIO_FN_LCDD5, GPIO_FN_PORT197_KEYOUT5, GPIO_FN_PORT197_SCIFA5_SCK, | ||
257 | GPIO_FN_MFG2_OUT2, GPIO_FN_TPU2TO1, | ||
258 | GPIO_FN_LCDD6, GPIO_FN_XWR2, | ||
259 | GPIO_FN_LCDD7, GPIO_FN_TPU4TO1, GPIO_FN_MFG4_OUT2, GPIO_FN_XWR3, | ||
260 | GPIO_FN_LCDD8, GPIO_FN_PORT200_KEYIN0, GPIO_FN_VIO_DR0, GPIO_FN_D16, | ||
261 | GPIO_FN_ED16, | ||
262 | GPIO_FN_LCDD9, GPIO_FN_PORT201_KEYIN1, GPIO_FN_VIO_DR1, GPIO_FN_D17, | ||
263 | GPIO_FN_ED17, | ||
264 | GPIO_FN_LCDD10, GPIO_FN_PORT202_KEYIN2, GPIO_FN_VIO_DR2, GPIO_FN_D18, | ||
265 | GPIO_FN_ED18, | ||
266 | GPIO_FN_LCDD11, GPIO_FN_PORT203_KEYIN3, GPIO_FN_VIO_DR3, GPIO_FN_D19, | ||
267 | GPIO_FN_ED19, | ||
268 | GPIO_FN_LCDD12, GPIO_FN_PORT204_KEYIN4, GPIO_FN_VIO_DR4, GPIO_FN_D20, | ||
269 | GPIO_FN_ED20, | ||
270 | GPIO_FN_LCDD13, GPIO_FN_PORT205_KEYIN5, GPIO_FN_VIO_DR5, GPIO_FN_D21, | ||
271 | GPIO_FN_ED21, | ||
272 | GPIO_FN_LCDD14, GPIO_FN_PORT206_KEYIN6, GPIO_FN_VIO_DR6, GPIO_FN_D22, | ||
273 | GPIO_FN_ED22, | ||
274 | GPIO_FN_LCDD15, GPIO_FN_PORT207_MSIOF0L_SS1, GPIO_FN_PORT207_KEYOUT0, | ||
275 | GPIO_FN_VIO_DR7, | ||
276 | GPIO_FN_D23, GPIO_FN_ED23, | ||
277 | GPIO_FN_LCDD16, GPIO_FN_PORT208_MSIOF0L_SS2, GPIO_FN_PORT208_KEYOUT1, | ||
278 | GPIO_FN_VIO_VDR, | ||
279 | GPIO_FN_D24, GPIO_FN_ED24, | ||
280 | GPIO_FN_LCDD17, GPIO_FN_PORT209_KEYOUT2, GPIO_FN_VIO_HDR, GPIO_FN_D25, | ||
281 | GPIO_FN_ED25, | ||
282 | GPIO_FN_LCDD18, GPIO_FN_DREQ2, GPIO_FN_PORT210_MSIOF0L_SS1, GPIO_FN_D26, | ||
283 | GPIO_FN_ED26, | ||
284 | GPIO_FN_LCDD19, GPIO_FN_PORT211_MSIOF0L_SS2, GPIO_FN_D27, GPIO_FN_ED27, | ||
285 | GPIO_FN_LCDD20, GPIO_FN_TS_SPSYNC1, GPIO_FN_MSIOF0L_MCK0, GPIO_FN_D28, | ||
286 | GPIO_FN_ED28, | ||
287 | GPIO_FN_LCDD21, GPIO_FN_TS_SDAT1, GPIO_FN_MSIOF0L_MCK1, GPIO_FN_D29, | ||
288 | GPIO_FN_ED29, | ||
289 | GPIO_FN_LCDD22, GPIO_FN_TS_SDEN1, GPIO_FN_MSIOF0L_RSCK, GPIO_FN_D30, | ||
290 | GPIO_FN_ED30, | ||
291 | GPIO_FN_LCDD23, GPIO_FN_TS_SCK1, GPIO_FN_MSIOF0L_RSYNC, GPIO_FN_D31, | ||
292 | GPIO_FN_ED31, | ||
293 | GPIO_FN_LCDDCK, GPIO_FN_LCDWR, GPIO_FN_PORT216_KEYOUT3, | ||
294 | GPIO_FN_VIO_CLKR, | ||
295 | GPIO_FN_LCDRD, GPIO_FN_DACK2, GPIO_FN_MSIOF0L_TSYNC, | ||
296 | GPIO_FN_LCDHSYN, GPIO_FN_LCDCS, GPIO_FN_LCDCS2, GPIO_FN_DACK3, | ||
297 | GPIO_FN_PORT218_VIO_CKOR, GPIO_FN_PORT218_KEYOUT4, | ||
298 | GPIO_FN_LCDDISP, GPIO_FN_LCDRS, GPIO_FN_DREQ3, GPIO_FN_MSIOF0L_TSCK, | ||
299 | GPIO_FN_LCDVSYN, GPIO_FN_LCDVSYN2, GPIO_FN_PORT220_KEYOUT5, | ||
300 | GPIO_FN_LCDLCLK, GPIO_FN_DREQ1, GPIO_FN_PWEN, GPIO_FN_MSIOF0L_RXD, | ||
301 | GPIO_FN_LCDDON, GPIO_FN_LCDDON2, GPIO_FN_DACK1, GPIO_FN_OVCN, | ||
302 | GPIO_FN_MSIOF0L_TXD, | ||
303 | GPIO_FN_SCIFA1_TXD, GPIO_FN_OVCN2, | ||
304 | GPIO_FN_EXTLP, GPIO_FN_SCIFA1_SCK, GPIO_FN_USBTERM, | ||
305 | GPIO_FN_PORT226_VIO_CKO2, | ||
306 | GPIO_FN_SCIFA1_RTS, GPIO_FN_IDIN, | ||
307 | GPIO_FN_SCIFA1_RXD, | ||
308 | GPIO_FN_SCIFA1_CTS, GPIO_FN_MFG1_IN1, | ||
309 | GPIO_FN_MSIOF1_TXD, GPIO_FN_SCIFA2_TXD2, GPIO_FN_PORT230_FSIAOMC, | ||
310 | GPIO_FN_MSIOF1_TSYNC, GPIO_FN_SCIFA2_CTS2, GPIO_FN_PORT231_FSIAOLR, | ||
311 | GPIO_FN_MSIOF1_TSCK, GPIO_FN_SCIFA2_SCK2, GPIO_FN_PORT232_FSIAOBT, | ||
312 | GPIO_FN_MSIOF1_RXD, GPIO_FN_SCIFA2_RXD2, GPIO_FN_GPS_VCOTRIG, | ||
313 | GPIO_FN_PORT233_FSIACK, | ||
314 | GPIO_FN_MSIOF1_RSCK, GPIO_FN_SCIFA2_RTS2, GPIO_FN_PORT234_FSIAOSLD, | ||
315 | GPIO_FN_MSIOF1_RSYNC, GPIO_FN_OPORT0, GPIO_FN_MFG1_IN2, | ||
316 | GPIO_FN_PORT235_FSIAILR, | ||
317 | GPIO_FN_MSIOF1_MCK0, GPIO_FN_I2C_SDA2, GPIO_FN_PORT236_FSIAIBT, | ||
318 | GPIO_FN_MSIOF1_MCK1, GPIO_FN_I2C_SCL2, GPIO_FN_PORT237_FSIAISLD, | ||
319 | GPIO_FN_MSIOF1_SS1, GPIO_FN_EDBGREQ3, | ||
320 | |||
321 | /* 55-5 (FN) */ | ||
322 | GPIO_FN_MSIOF1_SS2, | ||
323 | GPIO_FN_SCIFA6_TXD, | ||
324 | GPIO_FN_PORT241_IRDA_OUT, GPIO_FN_PORT241_IROUT, GPIO_FN_MFG4_OUT1, | ||
325 | GPIO_FN_TPU4TO0, | ||
326 | GPIO_FN_PORT242_IRDA_IN, GPIO_FN_MFG4_IN2, | ||
327 | GPIO_FN_PORT243_IRDA_FIRSEL, GPIO_FN_PORT243_VIO_CKO2, | ||
328 | GPIO_FN_PORT244_SCIFA5_CTS, GPIO_FN_MFG2_IN1, GPIO_FN_PORT244_SCIFB_CTS, | ||
329 | GPIO_FN_PORT244_MSIOF2_RXD, | ||
330 | GPIO_FN_PORT245_SCIFA5_RTS, GPIO_FN_MFG2_IN2, GPIO_FN_PORT245_SCIFB_RTS, | ||
331 | GPIO_FN_PORT245_MSIOF2_TXD, | ||
332 | GPIO_FN_PORT246_SCIFA5_RXD, GPIO_FN_MFG1_OUT1, | ||
333 | GPIO_FN_PORT246_SCIFB_RXD, GPIO_FN_TPU1TO0, | ||
334 | GPIO_FN_PORT247_SCIFA5_TXD, GPIO_FN_MFG3_OUT2, | ||
335 | GPIO_FN_PORT247_SCIFB_TXD, GPIO_FN_TPU3TO1, | ||
336 | GPIO_FN_PORT248_SCIFA5_SCK, GPIO_FN_MFG2_OUT1, | ||
337 | GPIO_FN_PORT248_SCIFB_SCK, GPIO_FN_TPU2TO0, | ||
338 | GPIO_FN_PORT248_MSIOF2_TSCK, | ||
339 | GPIO_FN_PORT249_IROUT, GPIO_FN_MFG4_IN1, GPIO_FN_PORT249_MSIOF2_TSYNC, | ||
340 | GPIO_FN_SDHICLK0, GPIO_FN_TCK2_SWCLK_MC0, | ||
341 | GPIO_FN_SDHICD0, | ||
342 | GPIO_FN_SDHID0_0, GPIO_FN_TMS2_SWDIO_MC0, | ||
343 | GPIO_FN_SDHID0_1, GPIO_FN_TDO2_SWO0_MC0, | ||
344 | GPIO_FN_SDHID0_2, GPIO_FN_TDI2, | ||
345 | GPIO_FN_SDHID0_3, GPIO_FN_RTCK2_SWO1_MC0, | ||
346 | GPIO_FN_SDHICMD0, GPIO_FN_TRST2, | ||
347 | GPIO_FN_SDHIWP0, GPIO_FN_EDBGREQ2, | ||
348 | GPIO_FN_SDHICLK1, GPIO_FN_TCK3_SWCLK_MC1, | ||
349 | GPIO_FN_SDHID1_0, GPIO_FN_M11_SLCD_SO2, GPIO_FN_TS_SPSYNC2, | ||
350 | GPIO_FN_TMS3_SWDIO_MC1, | ||
351 | GPIO_FN_SDHID1_1, GPIO_FN_M9_SLCD_A02, GPIO_FN_TS_SDAT2, | ||
352 | GPIO_FN_TDO3_SWO0_MC1, | ||
353 | GPIO_FN_SDHID1_2, GPIO_FN_M10_SLCD_CK2, GPIO_FN_TS_SDEN2, GPIO_FN_TDI3, | ||
354 | GPIO_FN_SDHID1_3, GPIO_FN_M12_SLCD_CE2, GPIO_FN_TS_SCK2, | ||
355 | GPIO_FN_RTCK3_SWO1_MC1, | ||
356 | GPIO_FN_SDHICMD1, GPIO_FN_TRST3, | ||
357 | GPIO_FN_RESETOUTS, | ||
358 | }; | ||
359 | |||
360 | #endif /* __ASM_SH7377_H__ */ | ||
diff --git a/arch/arm/mach-shmobile/intc-sh7367.c b/arch/arm/mach-shmobile/intc-sh7367.c deleted file mode 100644 index 5bf776495b75..000000000000 --- a/arch/arm/mach-shmobile/intc-sh7367.c +++ /dev/null | |||
@@ -1,413 +0,0 @@ | |||
1 | /* | ||
2 | * sh7367 processor support - INTC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/sh_intc.h> | ||
25 | #include <mach/intc.h> | ||
26 | #include <mach/irqs.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | |||
30 | enum { | ||
31 | UNUSED_INTCA = 0, | ||
32 | ENABLED, | ||
33 | DISABLED, | ||
34 | |||
35 | /* interrupt sources INTCA */ | ||
36 | DIRC, | ||
37 | CRYPT1_ERR, CRYPT2_STD, | ||
38 | IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1, | ||
39 | ARM11_IRQPMU, ARM11_COMMTX, ARM11_COMMRX, | ||
40 | ETM11_ACQCMP, ETM11_FULL, | ||
41 | MFI_MFIM, MFI_MFIS, | ||
42 | BBIF1, BBIF2, | ||
43 | USBDMAC_USHDMI, | ||
44 | USBHS_USHI0, USBHS_USHI1, | ||
45 | CMT1_CMT10, CMT1_CMT11, CMT1_CMT12, CMT1_CMT13, CMT2, CMT3, | ||
46 | KEYSC_KEY, | ||
47 | SCIFA0, SCIFA1, SCIFA2, SCIFA3, | ||
48 | MSIOF2, MSIOF1, | ||
49 | SCIFA4, SCIFA5, SCIFB, | ||
50 | FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I, | ||
51 | SDHI0, | ||
52 | SDHI1, | ||
53 | MSU_MSU, MSU_MSU2, | ||
54 | IREM, | ||
55 | SIU, | ||
56 | SPU, | ||
57 | IRDA, | ||
58 | TPU0, TPU1, TPU2, TPU3, TPU4, | ||
59 | LCRC, | ||
60 | PINT1, PINT2, | ||
61 | TTI20, | ||
62 | MISTY, | ||
63 | DDM, | ||
64 | SDHI2, | ||
65 | RWDT0, RWDT1, | ||
66 | DMAC_1_DEI0, DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3, | ||
67 | DMAC_2_DEI4, DMAC_2_DEI5, DMAC_2_DADERR, | ||
68 | DMAC2_1_DEI0, DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3, | ||
69 | DMAC2_2_DEI4, DMAC2_2_DEI5, DMAC2_2_DADERR, | ||
70 | DMAC3_1_DEI0, DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3, | ||
71 | DMAC3_2_DEI4, DMAC3_2_DEI5, DMAC3_2_DADERR, | ||
72 | |||
73 | /* interrupt groups INTCA */ | ||
74 | DMAC_1, DMAC_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, | ||
75 | ETM11, ARM11, USBHS, FLCTL, IIC1 | ||
76 | }; | ||
77 | |||
78 | static struct intc_vect intca_vectors[] __initdata = { | ||
79 | INTC_VECT(DIRC, 0x0560), | ||
80 | INTC_VECT(CRYPT1_ERR, 0x05e0), | ||
81 | INTC_VECT(CRYPT2_STD, 0x0700), | ||
82 | INTC_VECT(IIC1_ALI1, 0x0780), INTC_VECT(IIC1_TACKI1, 0x07a0), | ||
83 | INTC_VECT(IIC1_WAITI1, 0x07c0), INTC_VECT(IIC1_DTEI1, 0x07e0), | ||
84 | INTC_VECT(ARM11_IRQPMU, 0x0800), INTC_VECT(ARM11_COMMTX, 0x0840), | ||
85 | INTC_VECT(ARM11_COMMRX, 0x0860), | ||
86 | INTC_VECT(ETM11_ACQCMP, 0x0880), INTC_VECT(ETM11_FULL, 0x08a0), | ||
87 | INTC_VECT(MFI_MFIM, 0x0900), INTC_VECT(MFI_MFIS, 0x0920), | ||
88 | INTC_VECT(BBIF1, 0x0940), INTC_VECT(BBIF2, 0x0960), | ||
89 | INTC_VECT(USBDMAC_USHDMI, 0x0a00), | ||
90 | INTC_VECT(USBHS_USHI0, 0x0a20), INTC_VECT(USBHS_USHI1, 0x0a40), | ||
91 | INTC_VECT(CMT1_CMT10, 0x0b00), INTC_VECT(CMT1_CMT11, 0x0b20), | ||
92 | INTC_VECT(CMT1_CMT12, 0x0b40), INTC_VECT(CMT1_CMT13, 0x0b60), | ||
93 | INTC_VECT(CMT2, 0x0b80), INTC_VECT(CMT3, 0x0ba0), | ||
94 | INTC_VECT(KEYSC_KEY, 0x0be0), | ||
95 | INTC_VECT(SCIFA0, 0x0c00), INTC_VECT(SCIFA1, 0x0c20), | ||
96 | INTC_VECT(SCIFA2, 0x0c40), INTC_VECT(SCIFA3, 0x0c60), | ||
97 | INTC_VECT(MSIOF2, 0x0c80), INTC_VECT(MSIOF1, 0x0d00), | ||
98 | INTC_VECT(SCIFA4, 0x0d20), INTC_VECT(SCIFA5, 0x0d40), | ||
99 | INTC_VECT(SCIFB, 0x0d60), | ||
100 | INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0), | ||
101 | INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0), | ||
102 | INTC_VECT(SDHI0, 0x0e00), INTC_VECT(SDHI0, 0x0e20), | ||
103 | INTC_VECT(SDHI0, 0x0e40), INTC_VECT(SDHI0, 0x0e60), | ||
104 | INTC_VECT(SDHI1, 0x0e80), INTC_VECT(SDHI1, 0x0ea0), | ||
105 | INTC_VECT(SDHI1, 0x0ec0), INTC_VECT(SDHI1, 0x0ee0), | ||
106 | INTC_VECT(MSU_MSU, 0x0f20), INTC_VECT(MSU_MSU2, 0x0f40), | ||
107 | INTC_VECT(IREM, 0x0f60), | ||
108 | INTC_VECT(SIU, 0x0fa0), | ||
109 | INTC_VECT(SPU, 0x0fc0), | ||
110 | INTC_VECT(IRDA, 0x0480), | ||
111 | INTC_VECT(TPU0, 0x04a0), INTC_VECT(TPU1, 0x04c0), | ||
112 | INTC_VECT(TPU2, 0x04e0), INTC_VECT(TPU3, 0x0500), | ||
113 | INTC_VECT(TPU4, 0x0520), | ||
114 | INTC_VECT(LCRC, 0x0540), | ||
115 | INTC_VECT(PINT1, 0x1000), INTC_VECT(PINT2, 0x1020), | ||
116 | INTC_VECT(TTI20, 0x1100), | ||
117 | INTC_VECT(MISTY, 0x1120), | ||
118 | INTC_VECT(DDM, 0x1140), | ||
119 | INTC_VECT(SDHI2, 0x1200), INTC_VECT(SDHI2, 0x1220), | ||
120 | INTC_VECT(SDHI2, 0x1240), INTC_VECT(SDHI2, 0x1260), | ||
121 | INTC_VECT(RWDT0, 0x1280), INTC_VECT(RWDT1, 0x12a0), | ||
122 | INTC_VECT(DMAC_1_DEI0, 0x2000), INTC_VECT(DMAC_1_DEI1, 0x2020), | ||
123 | INTC_VECT(DMAC_1_DEI2, 0x2040), INTC_VECT(DMAC_1_DEI3, 0x2060), | ||
124 | INTC_VECT(DMAC_2_DEI4, 0x2080), INTC_VECT(DMAC_2_DEI5, 0x20a0), | ||
125 | INTC_VECT(DMAC_2_DADERR, 0x20c0), | ||
126 | INTC_VECT(DMAC2_1_DEI0, 0x2100), INTC_VECT(DMAC2_1_DEI1, 0x2120), | ||
127 | INTC_VECT(DMAC2_1_DEI2, 0x2140), INTC_VECT(DMAC2_1_DEI3, 0x2160), | ||
128 | INTC_VECT(DMAC2_2_DEI4, 0x2180), INTC_VECT(DMAC2_2_DEI5, 0x21a0), | ||
129 | INTC_VECT(DMAC2_2_DADERR, 0x21c0), | ||
130 | INTC_VECT(DMAC3_1_DEI0, 0x2200), INTC_VECT(DMAC3_1_DEI1, 0x2220), | ||
131 | INTC_VECT(DMAC3_1_DEI2, 0x2240), INTC_VECT(DMAC3_1_DEI3, 0x2260), | ||
132 | INTC_VECT(DMAC3_2_DEI4, 0x2280), INTC_VECT(DMAC3_2_DEI5, 0x22a0), | ||
133 | INTC_VECT(DMAC3_2_DADERR, 0x22c0), | ||
134 | }; | ||
135 | |||
136 | static struct intc_group intca_groups[] __initdata = { | ||
137 | INTC_GROUP(DMAC_1, DMAC_1_DEI0, | ||
138 | DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3), | ||
139 | INTC_GROUP(DMAC_2, DMAC_2_DEI4, | ||
140 | DMAC_2_DEI5, DMAC_2_DADERR), | ||
141 | INTC_GROUP(DMAC2_1, DMAC2_1_DEI0, | ||
142 | DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3), | ||
143 | INTC_GROUP(DMAC2_2, DMAC2_2_DEI4, | ||
144 | DMAC2_2_DEI5, DMAC2_2_DADERR), | ||
145 | INTC_GROUP(DMAC3_1, DMAC3_1_DEI0, | ||
146 | DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3), | ||
147 | INTC_GROUP(DMAC3_2, DMAC3_2_DEI4, | ||
148 | DMAC3_2_DEI5, DMAC3_2_DADERR), | ||
149 | INTC_GROUP(ETM11, ETM11_ACQCMP, ETM11_FULL), | ||
150 | INTC_GROUP(ARM11, ARM11_IRQPMU, ARM11_COMMTX, ARM11_COMMTX), | ||
151 | INTC_GROUP(USBHS, USBHS_USHI0, USBHS_USHI1), | ||
152 | INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI, | ||
153 | FLCTL_FLTREQ0I, FLCTL_FLTREQ1I), | ||
154 | INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1), | ||
155 | }; | ||
156 | |||
157 | static struct intc_mask_reg intca_mask_registers[] __initdata = { | ||
158 | { 0xe6940080, 0xe69400c0, 8, /* IMR0A / IMCR0A */ | ||
159 | { DMAC2_1_DEI3, DMAC2_1_DEI2, DMAC2_1_DEI1, DMAC2_1_DEI0, | ||
160 | ARM11_IRQPMU, 0, ARM11_COMMTX, ARM11_COMMRX } }, | ||
161 | { 0xe6940084, 0xe69400c4, 8, /* IMR1A / IMCR1A */ | ||
162 | { CRYPT1_ERR, CRYPT2_STD, DIRC, 0, | ||
163 | DMAC_1_DEI3, DMAC_1_DEI2, DMAC_1_DEI1, DMAC_1_DEI0 } }, | ||
164 | { 0xe6940088, 0xe69400c8, 8, /* IMR2A / IMCR2A */ | ||
165 | { PINT1, PINT2, 0, 0, | ||
166 | BBIF1, BBIF2, MFI_MFIS, MFI_MFIM } }, | ||
167 | { 0xe694008c, 0xe69400cc, 8, /* IMR3A / IMCR3A */ | ||
168 | { DMAC3_1_DEI3, DMAC3_1_DEI2, DMAC3_1_DEI1, DMAC3_1_DEI0, | ||
169 | DMAC3_2_DADERR, DMAC3_2_DEI5, DMAC3_2_DEI4, IRDA } }, | ||
170 | { 0xe6940090, 0xe69400d0, 8, /* IMR4A / IMCR4A */ | ||
171 | { DDM, 0, 0, 0, | ||
172 | 0, 0, ETM11_FULL, ETM11_ACQCMP } }, | ||
173 | { 0xe6940094, 0xe69400d4, 8, /* IMR5A / IMCR5A */ | ||
174 | { KEYSC_KEY, DMAC_2_DADERR, DMAC_2_DEI5, DMAC_2_DEI4, | ||
175 | SCIFA3, SCIFA2, SCIFA1, SCIFA0 } }, | ||
176 | { 0xe6940098, 0xe69400d8, 8, /* IMR6A / IMCR6A */ | ||
177 | { SCIFB, SCIFA5, SCIFA4, MSIOF1, | ||
178 | 0, 0, MSIOF2, 0 } }, | ||
179 | { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ | ||
180 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
181 | FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, | ||
182 | { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ | ||
183 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
184 | TTI20, USBDMAC_USHDMI, SPU, SIU } }, | ||
185 | { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ | ||
186 | { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, | ||
187 | CMT2, USBHS_USHI1, USBHS_USHI0, 0 } }, | ||
188 | { 0xe69400a8, 0xe69400e8, 8, /* IMR10A / IMCR10A */ | ||
189 | { 0, DMAC2_2_DADERR, DMAC2_2_DEI5, DMAC2_2_DEI4, | ||
190 | 0, 0, 0, 0 } }, | ||
191 | { 0xe69400ac, 0xe69400ec, 8, /* IMR11A / IMCR11A */ | ||
192 | { IIC1_DTEI1, IIC1_WAITI1, IIC1_TACKI1, IIC1_ALI1, | ||
193 | LCRC, MSU_MSU2, IREM, MSU_MSU } }, | ||
194 | { 0xe69400b0, 0xe69400f0, 8, /* IMR12A / IMCR12A */ | ||
195 | { 0, 0, TPU0, TPU1, | ||
196 | TPU2, TPU3, TPU4, 0 } }, | ||
197 | { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ | ||
198 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
199 | MISTY, CMT3, RWDT1, RWDT0 } }, | ||
200 | }; | ||
201 | |||
202 | static struct intc_prio_reg intca_prio_registers[] __initdata = { | ||
203 | { 0xe6940000, 0, 16, 4, /* IPRAA */ { DMAC3_1, DMAC3_2, CMT2, LCRC } }, | ||
204 | { 0xe6940004, 0, 16, 4, /* IPRBA */ { IRDA, ETM11, BBIF1, BBIF2 } }, | ||
205 | { 0xe6940008, 0, 16, 4, /* IPRCA */ { CRYPT1_ERR, CRYPT2_STD, | ||
206 | CMT1_CMT11, ARM11 } }, | ||
207 | { 0xe694000c, 0, 16, 4, /* IPRDA */ { PINT1, PINT2, | ||
208 | CMT1_CMT12, TPU4 } }, | ||
209 | { 0xe6940010, 0, 16, 4, /* IPREA */ { DMAC_1, MFI_MFIS, | ||
210 | MFI_MFIM, USBHS } }, | ||
211 | { 0xe6940014, 0, 16, 4, /* IPRFA */ { KEYSC_KEY, DMAC_2, | ||
212 | 0, CMT1_CMT10 } }, | ||
213 | { 0xe6940018, 0, 16, 4, /* IPRGA */ { SCIFA0, SCIFA1, | ||
214 | SCIFA2, SCIFA3 } }, | ||
215 | { 0xe694001c, 0, 16, 4, /* IPRGH */ { MSIOF2, USBDMAC_USHDMI, | ||
216 | FLCTL, SDHI0 } }, | ||
217 | { 0xe6940020, 0, 16, 4, /* IPRIA */ { MSIOF1, SCIFA4, MSU_MSU, IIC1 } }, | ||
218 | { 0xe6940024, 0, 16, 4, /* IPRJA */ { DMAC2_1, DMAC2_2, SIU, TTI20 } }, | ||
219 | { 0xe6940028, 0, 16, 4, /* IPRKA */ { 0, CMT1_CMT13, IREM, SDHI1 } }, | ||
220 | { 0xe694002c, 0, 16, 4, /* IPRLA */ { TPU0, TPU1, TPU2, TPU3 } }, | ||
221 | { 0xe6940030, 0, 16, 4, /* IPRMA */ { MISTY, CMT3, RWDT1, RWDT0 } }, | ||
222 | { 0xe6940034, 0, 16, 4, /* IPRNA */ { SCIFB, SCIFA5, SPU, DDM } }, | ||
223 | { 0xe6940038, 0, 16, 4, /* IPROA */ { 0, 0, DIRC, SDHI2 } }, | ||
224 | }; | ||
225 | |||
226 | static struct intc_desc intca_desc __initdata = { | ||
227 | .name = "sh7367-intca", | ||
228 | .force_enable = ENABLED, | ||
229 | .force_disable = DISABLED, | ||
230 | .hw = INTC_HW_DESC(intca_vectors, intca_groups, | ||
231 | intca_mask_registers, intca_prio_registers, | ||
232 | NULL, NULL), | ||
233 | }; | ||
234 | |||
235 | INTC_IRQ_PINS_16(intca_irq_pins, 0xe6900000, | ||
236 | INTC_VECT, "sh7367-intca-irq-pins"); | ||
237 | |||
238 | enum { | ||
239 | UNUSED_INTCS = 0, | ||
240 | |||
241 | INTCS, | ||
242 | |||
243 | /* interrupt sources INTCS */ | ||
244 | VIO2_VEU0, VIO2_VEU1, VIO2_VEU2, VIO2_VEU3, | ||
245 | VIO3_VOU, | ||
246 | RTDMAC_1_DEI0, RTDMAC_1_DEI1, RTDMAC_1_DEI2, RTDMAC_1_DEI3, | ||
247 | VIO1_CEU, VIO1_BEU0, VIO1_BEU1, VIO1_BEU2, | ||
248 | VPU, | ||
249 | SGX530, | ||
250 | _2DDMAC_2DDM0, _2DDMAC_2DDM1, _2DDMAC_2DDM2, _2DDMAC_2DDM3, | ||
251 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | ||
252 | IPMMU_IPMMUB, IPMMU_IPMMUS, | ||
253 | RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR, | ||
254 | MSIOF, | ||
255 | IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0, | ||
256 | TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, | ||
257 | CMT, | ||
258 | TSIF, | ||
259 | IPMMUI, | ||
260 | MVI3, | ||
261 | ICB, | ||
262 | PEP, | ||
263 | ASA, | ||
264 | BEM, | ||
265 | VE2HO, | ||
266 | HQE, | ||
267 | JPEG, | ||
268 | LCDC, | ||
269 | |||
270 | /* interrupt groups INTCS */ | ||
271 | _2DDMAC, RTDMAC_1, RTDMAC_2, VEU, BEU, IIC0, IPMMU, IIC2, | ||
272 | }; | ||
273 | |||
274 | static struct intc_vect intcs_vectors[] = { | ||
275 | INTCS_VECT(VIO2_VEU0, 0x700), INTCS_VECT(VIO2_VEU1, 0x720), | ||
276 | INTCS_VECT(VIO2_VEU2, 0x740), INTCS_VECT(VIO2_VEU3, 0x760), | ||
277 | INTCS_VECT(VIO3_VOU, 0x780), | ||
278 | INTCS_VECT(RTDMAC_1_DEI0, 0x800), INTCS_VECT(RTDMAC_1_DEI1, 0x820), | ||
279 | INTCS_VECT(RTDMAC_1_DEI2, 0x840), INTCS_VECT(RTDMAC_1_DEI3, 0x860), | ||
280 | INTCS_VECT(VIO1_CEU, 0x880), INTCS_VECT(VIO1_BEU0, 0x8a0), | ||
281 | INTCS_VECT(VIO1_BEU1, 0x8c0), INTCS_VECT(VIO1_BEU2, 0x8e0), | ||
282 | INTCS_VECT(VPU, 0x980), | ||
283 | INTCS_VECT(SGX530, 0x9e0), | ||
284 | INTCS_VECT(_2DDMAC_2DDM0, 0xa00), INTCS_VECT(_2DDMAC_2DDM1, 0xa20), | ||
285 | INTCS_VECT(_2DDMAC_2DDM2, 0xa40), INTCS_VECT(_2DDMAC_2DDM3, 0xa60), | ||
286 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), | ||
287 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), | ||
288 | INTCS_VECT(IPMMU_IPMMUB, 0xb20), INTCS_VECT(IPMMU_IPMMUS, 0xb60), | ||
289 | INTCS_VECT(RTDMAC_2_DEI4, 0xb80), INTCS_VECT(RTDMAC_2_DEI5, 0xba0), | ||
290 | INTCS_VECT(RTDMAC_2_DADERR, 0xbc0), | ||
291 | INTCS_VECT(MSIOF, 0xd20), | ||
292 | INTCS_VECT(IIC0_ALI0, 0xe00), INTCS_VECT(IIC0_TACKI0, 0xe20), | ||
293 | INTCS_VECT(IIC0_WAITI0, 0xe40), INTCS_VECT(IIC0_DTEI0, 0xe60), | ||
294 | INTCS_VECT(TMU_TUNI0, 0xe80), INTCS_VECT(TMU_TUNI1, 0xea0), | ||
295 | INTCS_VECT(TMU_TUNI2, 0xec0), | ||
296 | INTCS_VECT(CMT, 0xf00), | ||
297 | INTCS_VECT(TSIF, 0xf20), | ||
298 | INTCS_VECT(IPMMUI, 0xf60), | ||
299 | INTCS_VECT(MVI3, 0x420), | ||
300 | INTCS_VECT(ICB, 0x480), | ||
301 | INTCS_VECT(PEP, 0x4a0), | ||
302 | INTCS_VECT(ASA, 0x4c0), | ||
303 | INTCS_VECT(BEM, 0x4e0), | ||
304 | INTCS_VECT(VE2HO, 0x520), | ||
305 | INTCS_VECT(HQE, 0x540), | ||
306 | INTCS_VECT(JPEG, 0x560), | ||
307 | INTCS_VECT(LCDC, 0x580), | ||
308 | |||
309 | INTC_VECT(INTCS, 0xf80), | ||
310 | }; | ||
311 | |||
312 | static struct intc_group intcs_groups[] __initdata = { | ||
313 | INTC_GROUP(_2DDMAC, _2DDMAC_2DDM0, _2DDMAC_2DDM1, | ||
314 | _2DDMAC_2DDM2, _2DDMAC_2DDM3), | ||
315 | INTC_GROUP(RTDMAC_1, RTDMAC_1_DEI0, RTDMAC_1_DEI1, | ||
316 | RTDMAC_1_DEI2, RTDMAC_1_DEI3), | ||
317 | INTC_GROUP(RTDMAC_2, RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR), | ||
318 | INTC_GROUP(VEU, VIO2_VEU0, VIO2_VEU1, VIO2_VEU2, VIO2_VEU3), | ||
319 | INTC_GROUP(BEU, VIO1_BEU0, VIO1_BEU1, VIO1_BEU2), | ||
320 | INTC_GROUP(IIC0, IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0), | ||
321 | INTC_GROUP(IPMMU, IPMMU_IPMMUS, IPMMU_IPMMUB), | ||
322 | INTC_GROUP(IIC2, IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2), | ||
323 | }; | ||
324 | |||
325 | static struct intc_mask_reg intcs_mask_registers[] = { | ||
326 | { 0xffd20184, 0xffd201c4, 8, /* IMR1SA / IMCR1SA */ | ||
327 | { VIO1_BEU2, VIO1_BEU1, VIO1_BEU0, VIO1_CEU, | ||
328 | VIO2_VEU3, VIO2_VEU2, VIO2_VEU1, VIO2_VEU0 } }, | ||
329 | { 0xffd20188, 0xffd201c8, 8, /* IMR2SA / IMCR2SA */ | ||
330 | { VIO3_VOU, 0, VE2HO, VPU, | ||
331 | 0, 0, 0, 0 } }, | ||
332 | { 0xffd2018c, 0xffd201cc, 8, /* IMR3SA / IMCR3SA */ | ||
333 | { _2DDMAC_2DDM3, _2DDMAC_2DDM2, _2DDMAC_2DDM1, _2DDMAC_2DDM0, | ||
334 | BEM, ASA, PEP, ICB } }, | ||
335 | { 0xffd20190, 0xffd201d0, 8, /* IMR4SA / IMCR4SA */ | ||
336 | { 0, 0, MVI3, 0, | ||
337 | JPEG, HQE, 0, LCDC } }, | ||
338 | { 0xffd20194, 0xffd201d4, 8, /* IMR5SA / IMCR5SA */ | ||
339 | { 0, RTDMAC_2_DADERR, RTDMAC_2_DEI5, RTDMAC_2_DEI4, | ||
340 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, | ||
341 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ | ||
342 | { 0, 0, MSIOF, 0, | ||
343 | SGX530, 0, 0, 0 } }, | ||
344 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ | ||
345 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, | ||
346 | 0, 0, 0, 0 } }, | ||
347 | { 0xffd201a4, 0xffd201e4, 8, /* IMR9SA / IMCR9SA */ | ||
348 | { 0, 0, 0, CMT, | ||
349 | IIC2_DTEI2, IIC2_WAITI2, IIC2_TACKI2, IIC2_ALI2 } }, | ||
350 | { 0xffd201a8, 0xffd201e8, 8, /* IMR10SA / IMCR10SA */ | ||
351 | { IPMMU_IPMMUS, 0, IPMMU_IPMMUB, 0, | ||
352 | 0, 0, 0, 0 } }, | ||
353 | { 0xffd201ac, 0xffd201ec, 8, /* IMR11SA / IMCR11SA */ | ||
354 | { IIC0_DTEI0, IIC0_WAITI0, IIC0_TACKI0, IIC0_ALI0, | ||
355 | 0, 0, IPMMUI, TSIF } }, | ||
356 | { 0xffd20104, 0, 16, /* INTAMASK */ | ||
357 | { 0, 0, 0, 0, 0, 0, 0, 0, | ||
358 | 0, 0, 0, 0, 0, 0, 0, INTCS } }, | ||
359 | }; | ||
360 | |||
361 | /* Priority is needed for INTCA to receive the INTCS interrupt */ | ||
362 | static struct intc_prio_reg intcs_prio_registers[] = { | ||
363 | { 0xffd20000, 0, 16, 4, /* IPRAS */ { 0, MVI3, _2DDMAC, ICB } }, | ||
364 | { 0xffd20004, 0, 16, 4, /* IPRBS */ { JPEG, LCDC, 0, 0 } }, | ||
365 | { 0xffd20008, 0, 16, 4, /* IPRCS */ { BBIF2, 0, 0, 0 } }, | ||
366 | { 0xffd20010, 0, 16, 4, /* IPRES */ { RTDMAC_1, VIO1_CEU, 0, VPU } }, | ||
367 | { 0xffd20014, 0, 16, 4, /* IPRFS */ { 0, RTDMAC_2, 0, CMT } }, | ||
368 | { 0xffd20018, 0, 16, 4, /* IPRGS */ { TMU_TUNI0, TMU_TUNI1, | ||
369 | TMU_TUNI2, 0 } }, | ||
370 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, VIO3_VOU, VEU, BEU } }, | ||
371 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF, IIC0 } }, | ||
372 | { 0xffd20024, 0, 16, 4, /* IPRJS */ { 0, SGX530, 0, 0 } }, | ||
373 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { BEM, ASA, IPMMUI, PEP } }, | ||
374 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, VE2HO, HQE } }, | ||
375 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, | ||
376 | }; | ||
377 | |||
378 | static struct resource intcs_resources[] __initdata = { | ||
379 | [0] = { | ||
380 | .start = 0xffd20000, | ||
381 | .end = 0xffd2ffff, | ||
382 | .flags = IORESOURCE_MEM, | ||
383 | } | ||
384 | }; | ||
385 | |||
386 | static struct intc_desc intcs_desc __initdata = { | ||
387 | .name = "sh7367-intcs", | ||
388 | .resource = intcs_resources, | ||
389 | .num_resources = ARRAY_SIZE(intcs_resources), | ||
390 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers, | ||
391 | intcs_prio_registers, NULL, NULL), | ||
392 | }; | ||
393 | |||
394 | static void intcs_demux(unsigned int irq, struct irq_desc *desc) | ||
395 | { | ||
396 | void __iomem *reg = (void *)irq_get_handler_data(irq); | ||
397 | unsigned int evtcodeas = ioread32(reg); | ||
398 | |||
399 | generic_handle_irq(intcs_evt2irq(evtcodeas)); | ||
400 | } | ||
401 | |||
402 | void __init sh7367_init_irq(void) | ||
403 | { | ||
404 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); | ||
405 | |||
406 | register_intc_controller(&intca_desc); | ||
407 | register_intc_controller(&intca_irq_pins_desc); | ||
408 | register_intc_controller(&intcs_desc); | ||
409 | |||
410 | /* demux using INTEVTSA */ | ||
411 | irq_set_handler_data(evt2irq(0xf80), (void *)intevtsa); | ||
412 | irq_set_chained_handler(evt2irq(0xf80), intcs_demux); | ||
413 | } | ||
diff --git a/arch/arm/mach-shmobile/intc-sh7377.c b/arch/arm/mach-shmobile/intc-sh7377.c deleted file mode 100644 index b84a460a3405..000000000000 --- a/arch/arm/mach-shmobile/intc-sh7377.c +++ /dev/null | |||
@@ -1,592 +0,0 @@ | |||
1 | /* | ||
2 | * sh7377 processor support - INTC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/sh_intc.h> | ||
25 | #include <mach/intc.h> | ||
26 | #include <mach/irqs.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | |||
30 | enum { | ||
31 | UNUSED_INTCA = 0, | ||
32 | ENABLED, | ||
33 | DISABLED, | ||
34 | |||
35 | /* interrupt sources INTCA */ | ||
36 | DIRC, | ||
37 | _2DG, | ||
38 | CRYPT_STD, | ||
39 | IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1, | ||
40 | AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMRX, | ||
41 | MFI_MFIM, MFI_MFIS, | ||
42 | BBIF1, BBIF2, | ||
43 | USBDMAC_USHDMI, | ||
44 | USBHS_USHI0, USBHS_USHI1, | ||
45 | _3DG_SGX540, | ||
46 | CMT1_CMT10, CMT1_CMT11, CMT1_CMT12, CMT1_CMT13, CMT2, CMT3, | ||
47 | KEYSC_KEY, | ||
48 | SCIFA0, SCIFA1, SCIFA2, SCIFA3, | ||
49 | MSIOF2, MSIOF1, | ||
50 | SCIFA4, SCIFA5, SCIFB, | ||
51 | FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I, | ||
52 | SDHI0, | ||
53 | SDHI1, | ||
54 | MSU_MSU, MSU_MSU2, | ||
55 | IRREM, | ||
56 | MSUG, | ||
57 | IRDA, | ||
58 | TPU0, TPU1, TPU2, TPU3, TPU4, | ||
59 | LCRC, | ||
60 | PINTCA_PINT1, PINTCA_PINT2, | ||
61 | TTI20, | ||
62 | MISTY, | ||
63 | DDM, | ||
64 | RWDT0, RWDT1, | ||
65 | DMAC_1_DEI0, DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3, | ||
66 | DMAC_2_DEI4, DMAC_2_DEI5, DMAC_2_DADERR, | ||
67 | DMAC2_1_DEI0, DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3, | ||
68 | DMAC2_2_DEI4, DMAC2_2_DEI5, DMAC2_2_DADERR, | ||
69 | DMAC3_1_DEI0, DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3, | ||
70 | DMAC3_2_DEI4, DMAC3_2_DEI5, DMAC3_2_DADERR, | ||
71 | SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, | ||
72 | ICUSB_ICUSB0, ICUSB_ICUSB1, | ||
73 | ICUDMC_ICUDMC1, ICUDMC_ICUDMC2, | ||
74 | SPU2_SPU0, SPU2_SPU1, | ||
75 | FSI, | ||
76 | FMSI, | ||
77 | SCUV, | ||
78 | IPMMU_IPMMUB, | ||
79 | AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ, AP_ARM_DMAIRQ, AP_ARM_DMASIRQ, | ||
80 | MFIS2, | ||
81 | CPORTR2S, | ||
82 | CMT14, CMT15, | ||
83 | SCIFA6, | ||
84 | |||
85 | /* interrupt groups INTCA */ | ||
86 | DMAC_1, DMAC_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, SHWYSTAT, | ||
87 | AP_ARM1, AP_ARM2, USBHS, SPU2, FLCTL, IIC1, | ||
88 | ICUSB, ICUDMC | ||
89 | }; | ||
90 | |||
91 | static struct intc_vect intca_vectors[] __initdata = { | ||
92 | INTC_VECT(DIRC, 0x0560), | ||
93 | INTC_VECT(_2DG, 0x05e0), | ||
94 | INTC_VECT(CRYPT_STD, 0x0700), | ||
95 | INTC_VECT(IIC1_ALI1, 0x0780), INTC_VECT(IIC1_TACKI1, 0x07a0), | ||
96 | INTC_VECT(IIC1_WAITI1, 0x07c0), INTC_VECT(IIC1_DTEI1, 0x07e0), | ||
97 | INTC_VECT(AP_ARM_IRQPMU, 0x0800), INTC_VECT(AP_ARM_COMMTX, 0x0840), | ||
98 | INTC_VECT(AP_ARM_COMMRX, 0x0860), | ||
99 | INTC_VECT(MFI_MFIM, 0x0900), INTC_VECT(MFI_MFIS, 0x0920), | ||
100 | INTC_VECT(BBIF1, 0x0940), INTC_VECT(BBIF2, 0x0960), | ||
101 | INTC_VECT(USBDMAC_USHDMI, 0x0a00), | ||
102 | INTC_VECT(USBHS_USHI0, 0x0a20), INTC_VECT(USBHS_USHI1, 0x0a40), | ||
103 | INTC_VECT(_3DG_SGX540, 0x0a60), | ||
104 | INTC_VECT(CMT1_CMT10, 0x0b00), INTC_VECT(CMT1_CMT11, 0x0b20), | ||
105 | INTC_VECT(CMT1_CMT12, 0x0b40), INTC_VECT(CMT1_CMT13, 0x0b60), | ||
106 | INTC_VECT(CMT2, 0x0b80), INTC_VECT(CMT3, 0x0ba0), | ||
107 | INTC_VECT(KEYSC_KEY, 0x0be0), | ||
108 | INTC_VECT(SCIFA0, 0x0c00), INTC_VECT(SCIFA1, 0x0c20), | ||
109 | INTC_VECT(SCIFA2, 0x0c40), INTC_VECT(SCIFA3, 0x0c60), | ||
110 | INTC_VECT(MSIOF2, 0x0c80), INTC_VECT(MSIOF1, 0x0d00), | ||
111 | INTC_VECT(SCIFA4, 0x0d20), INTC_VECT(SCIFA5, 0x0d40), | ||
112 | INTC_VECT(SCIFB, 0x0d60), | ||
113 | INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0), | ||
114 | INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0), | ||
115 | INTC_VECT(SDHI0, 0x0e00), INTC_VECT(SDHI0, 0x0e20), | ||
116 | INTC_VECT(SDHI0, 0x0e40), INTC_VECT(SDHI0, 0x0e60), | ||
117 | INTC_VECT(SDHI1, 0x0e80), INTC_VECT(SDHI1, 0x0ea0), | ||
118 | INTC_VECT(SDHI1, 0x0ec0), INTC_VECT(SDHI1, 0x0ee0), | ||
119 | INTC_VECT(MSU_MSU, 0x0f20), INTC_VECT(MSU_MSU2, 0x0f40), | ||
120 | INTC_VECT(IRREM, 0x0f60), | ||
121 | INTC_VECT(MSUG, 0x0fa0), | ||
122 | INTC_VECT(IRDA, 0x0480), | ||
123 | INTC_VECT(TPU0, 0x04a0), INTC_VECT(TPU1, 0x04c0), | ||
124 | INTC_VECT(TPU2, 0x04e0), INTC_VECT(TPU3, 0x0500), | ||
125 | INTC_VECT(TPU4, 0x0520), | ||
126 | INTC_VECT(LCRC, 0x0540), | ||
127 | INTC_VECT(PINTCA_PINT1, 0x1000), INTC_VECT(PINTCA_PINT2, 0x1020), | ||
128 | INTC_VECT(TTI20, 0x1100), | ||
129 | INTC_VECT(MISTY, 0x1120), | ||
130 | INTC_VECT(DDM, 0x1140), | ||
131 | INTC_VECT(RWDT0, 0x1280), INTC_VECT(RWDT1, 0x12a0), | ||
132 | INTC_VECT(DMAC_1_DEI0, 0x2000), INTC_VECT(DMAC_1_DEI1, 0x2020), | ||
133 | INTC_VECT(DMAC_1_DEI2, 0x2040), INTC_VECT(DMAC_1_DEI3, 0x2060), | ||
134 | INTC_VECT(DMAC_2_DEI4, 0x2080), INTC_VECT(DMAC_2_DEI5, 0x20a0), | ||
135 | INTC_VECT(DMAC_2_DADERR, 0x20c0), | ||
136 | INTC_VECT(DMAC2_1_DEI0, 0x2100), INTC_VECT(DMAC2_1_DEI1, 0x2120), | ||
137 | INTC_VECT(DMAC2_1_DEI2, 0x2140), INTC_VECT(DMAC2_1_DEI3, 0x2160), | ||
138 | INTC_VECT(DMAC2_2_DEI4, 0x2180), INTC_VECT(DMAC2_2_DEI5, 0x21a0), | ||
139 | INTC_VECT(DMAC2_2_DADERR, 0x21c0), | ||
140 | INTC_VECT(DMAC3_1_DEI0, 0x2200), INTC_VECT(DMAC3_1_DEI1, 0x2220), | ||
141 | INTC_VECT(DMAC3_1_DEI2, 0x2240), INTC_VECT(DMAC3_1_DEI3, 0x2260), | ||
142 | INTC_VECT(DMAC3_2_DEI4, 0x2280), INTC_VECT(DMAC3_2_DEI5, 0x22a0), | ||
143 | INTC_VECT(DMAC3_2_DADERR, 0x22c0), | ||
144 | INTC_VECT(SHWYSTAT_RT, 0x1300), INTC_VECT(SHWYSTAT_HS, 0x1d20), | ||
145 | INTC_VECT(SHWYSTAT_COM, 0x1340), | ||
146 | INTC_VECT(ICUSB_ICUSB0, 0x1700), INTC_VECT(ICUSB_ICUSB1, 0x1720), | ||
147 | INTC_VECT(ICUDMC_ICUDMC1, 0x1780), INTC_VECT(ICUDMC_ICUDMC2, 0x17a0), | ||
148 | INTC_VECT(SPU2_SPU0, 0x1800), INTC_VECT(SPU2_SPU1, 0x1820), | ||
149 | INTC_VECT(FSI, 0x1840), | ||
150 | INTC_VECT(FMSI, 0x1860), | ||
151 | INTC_VECT(SCUV, 0x1880), | ||
152 | INTC_VECT(IPMMU_IPMMUB, 0x1900), | ||
153 | INTC_VECT(AP_ARM_CTIIRQ, 0x1980), | ||
154 | INTC_VECT(AP_ARM_DMAEXTERRIRQ, 0x19a0), | ||
155 | INTC_VECT(AP_ARM_DMAIRQ, 0x19c0), | ||
156 | INTC_VECT(AP_ARM_DMASIRQ, 0x19e0), | ||
157 | INTC_VECT(MFIS2, 0x1a00), | ||
158 | INTC_VECT(CPORTR2S, 0x1a20), | ||
159 | INTC_VECT(CMT14, 0x1a40), INTC_VECT(CMT15, 0x1a60), | ||
160 | INTC_VECT(SCIFA6, 0x1a80), | ||
161 | }; | ||
162 | |||
163 | static struct intc_group intca_groups[] __initdata = { | ||
164 | INTC_GROUP(DMAC_1, DMAC_1_DEI0, | ||
165 | DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3), | ||
166 | INTC_GROUP(DMAC_2, DMAC_2_DEI4, | ||
167 | DMAC_2_DEI5, DMAC_2_DADERR), | ||
168 | INTC_GROUP(DMAC2_1, DMAC2_1_DEI0, | ||
169 | DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3), | ||
170 | INTC_GROUP(DMAC2_2, DMAC2_2_DEI4, | ||
171 | DMAC2_2_DEI5, DMAC2_2_DADERR), | ||
172 | INTC_GROUP(DMAC3_1, DMAC3_1_DEI0, | ||
173 | DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3), | ||
174 | INTC_GROUP(DMAC3_2, DMAC3_2_DEI4, | ||
175 | DMAC3_2_DEI5, DMAC3_2_DADERR), | ||
176 | INTC_GROUP(AP_ARM1, AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMTX), | ||
177 | INTC_GROUP(USBHS, USBHS_USHI0, USBHS_USHI1), | ||
178 | INTC_GROUP(SPU2, SPU2_SPU0, SPU2_SPU1), | ||
179 | INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI, | ||
180 | FLCTL_FLTREQ0I, FLCTL_FLTREQ1I), | ||
181 | INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1), | ||
182 | INTC_GROUP(SHWYSTAT, SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM), | ||
183 | INTC_GROUP(ICUSB, ICUSB_ICUSB0, ICUSB_ICUSB1), | ||
184 | INTC_GROUP(ICUDMC, ICUDMC_ICUDMC1, ICUDMC_ICUDMC2), | ||
185 | }; | ||
186 | |||
187 | static struct intc_mask_reg intca_mask_registers[] __initdata = { | ||
188 | { 0xe6940080, 0xe69400c0, 8, /* IMR0A / IMCR0A */ | ||
189 | { DMAC2_1_DEI3, DMAC2_1_DEI2, DMAC2_1_DEI1, DMAC2_1_DEI0, | ||
190 | AP_ARM_IRQPMU, 0, AP_ARM_COMMTX, AP_ARM_COMMRX } }, | ||
191 | { 0xe6940084, 0xe69400c4, 8, /* IMR1A / IMCR1A */ | ||
192 | { _2DG, CRYPT_STD, DIRC, 0, | ||
193 | DMAC_1_DEI3, DMAC_1_DEI2, DMAC_1_DEI1, DMAC_1_DEI0 } }, | ||
194 | { 0xe6940088, 0xe69400c8, 8, /* IMR2A / IMCR2A */ | ||
195 | { PINTCA_PINT1, PINTCA_PINT2, 0, 0, | ||
196 | BBIF1, BBIF2, MFI_MFIS, MFI_MFIM } }, | ||
197 | { 0xe694008c, 0xe69400cc, 8, /* IMR3A / IMCR3A */ | ||
198 | { DMAC3_1_DEI3, DMAC3_1_DEI2, DMAC3_1_DEI1, DMAC3_1_DEI0, | ||
199 | DMAC3_2_DADERR, DMAC3_2_DEI5, DMAC3_2_DEI4, IRDA } }, | ||
200 | { 0xe6940090, 0xe69400d0, 8, /* IMR4A / IMCR4A */ | ||
201 | { DDM, 0, 0, 0, | ||
202 | 0, 0, 0, 0 } }, | ||
203 | { 0xe6940094, 0xe69400d4, 8, /* IMR5A / IMCR5A */ | ||
204 | { KEYSC_KEY, DMAC_2_DADERR, DMAC_2_DEI5, DMAC_2_DEI4, | ||
205 | SCIFA3, SCIFA2, SCIFA1, SCIFA0 } }, | ||
206 | { 0xe6940098, 0xe69400d8, 8, /* IMR6A / IMCR6A */ | ||
207 | { SCIFB, SCIFA5, SCIFA4, MSIOF1, | ||
208 | 0, 0, MSIOF2, 0 } }, | ||
209 | { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ | ||
210 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
211 | FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, | ||
212 | { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ | ||
213 | { DISABLED, ENABLED, ENABLED, ENABLED, | ||
214 | TTI20, USBDMAC_USHDMI, 0, MSUG } }, | ||
215 | { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ | ||
216 | { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, | ||
217 | CMT2, USBHS_USHI1, USBHS_USHI0, _3DG_SGX540 } }, | ||
218 | { 0xe69400a8, 0xe69400e8, 8, /* IMR10A / IMCR10A */ | ||
219 | { 0, DMAC2_2_DADERR, DMAC2_2_DEI5, DMAC2_2_DEI4, | ||
220 | 0, 0, 0, 0 } }, | ||
221 | { 0xe69400ac, 0xe69400ec, 8, /* IMR11A / IMCR11A */ | ||
222 | { IIC1_DTEI1, IIC1_WAITI1, IIC1_TACKI1, IIC1_ALI1, | ||
223 | LCRC, MSU_MSU2, IRREM, MSU_MSU } }, | ||
224 | { 0xe69400b0, 0xe69400f0, 8, /* IMR12A / IMCR12A */ | ||
225 | { 0, 0, TPU0, TPU1, | ||
226 | TPU2, TPU3, TPU4, 0 } }, | ||
227 | { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ | ||
228 | { 0, 0, 0, 0, | ||
229 | MISTY, CMT3, RWDT1, RWDT0 } }, | ||
230 | { 0xe6950080, 0xe69500c0, 8, /* IMR0A3 / IMCR0A3 */ | ||
231 | { SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, 0, | ||
232 | 0, 0, 0, 0 } }, | ||
233 | { 0xe6950090, 0xe69500d0, 8, /* IMR4A3 / IMCR4A3 */ | ||
234 | { ICUSB_ICUSB0, ICUSB_ICUSB1, 0, 0, | ||
235 | ICUDMC_ICUDMC1, ICUDMC_ICUDMC2, 0, 0 } }, | ||
236 | { 0xe6950094, 0xe69500d4, 8, /* IMR5A3 / IMCR5A3 */ | ||
237 | { SPU2_SPU0, SPU2_SPU1, FSI, FMSI, | ||
238 | SCUV, 0, 0, 0 } }, | ||
239 | { 0xe6950098, 0xe69500d8, 8, /* IMR6A3 / IMCR6A3 */ | ||
240 | { IPMMU_IPMMUB, 0, 0, 0, | ||
241 | AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ, | ||
242 | AP_ARM_DMAIRQ, AP_ARM_DMASIRQ } }, | ||
243 | { 0xe695009c, 0xe69500dc, 8, /* IMR7A3 / IMCR7A3 */ | ||
244 | { MFIS2, CPORTR2S, CMT14, CMT15, | ||
245 | SCIFA6, 0, 0, 0 } }, | ||
246 | }; | ||
247 | |||
248 | static struct intc_prio_reg intca_prio_registers[] __initdata = { | ||
249 | { 0xe6940000, 0, 16, 4, /* IPRAA */ { DMAC3_1, DMAC3_2, CMT2, LCRC } }, | ||
250 | { 0xe6940004, 0, 16, 4, /* IPRBA */ { IRDA, 0, BBIF1, BBIF2 } }, | ||
251 | { 0xe6940008, 0, 16, 4, /* IPRCA */ { _2DG, CRYPT_STD, | ||
252 | CMT1_CMT11, AP_ARM1 } }, | ||
253 | { 0xe694000c, 0, 16, 4, /* IPRDA */ { PINTCA_PINT1, PINTCA_PINT2, | ||
254 | CMT1_CMT12, TPU4 } }, | ||
255 | { 0xe6940010, 0, 16, 4, /* IPREA */ { DMAC_1, MFI_MFIS, | ||
256 | MFI_MFIM, USBHS } }, | ||
257 | { 0xe6940014, 0, 16, 4, /* IPRFA */ { KEYSC_KEY, DMAC_2, | ||
258 | _3DG_SGX540, CMT1_CMT10 } }, | ||
259 | { 0xe6940018, 0, 16, 4, /* IPRGA */ { SCIFA0, SCIFA1, | ||
260 | SCIFA2, SCIFA3 } }, | ||
261 | { 0xe694001c, 0, 16, 4, /* IPRGH */ { MSIOF2, USBDMAC_USHDMI, | ||
262 | FLCTL, SDHI0 } }, | ||
263 | { 0xe6940020, 0, 16, 4, /* IPRIA */ { MSIOF1, SCIFA4, MSU_MSU, IIC1 } }, | ||
264 | { 0xe6940024, 0, 16, 4, /* IPRJA */ { DMAC2_1, DMAC2_2, MSUG, TTI20 } }, | ||
265 | { 0xe6940028, 0, 16, 4, /* IPRKA */ { 0, CMT1_CMT13, IRREM, SDHI1 } }, | ||
266 | { 0xe694002c, 0, 16, 4, /* IPRLA */ { TPU0, TPU1, TPU2, TPU3 } }, | ||
267 | { 0xe6940030, 0, 16, 4, /* IPRMA */ { MISTY, CMT3, RWDT1, RWDT0 } }, | ||
268 | { 0xe6940034, 0, 16, 4, /* IPRNA */ { SCIFB, SCIFA5, 0, DDM } }, | ||
269 | { 0xe6940038, 0, 16, 4, /* IPROA */ { 0, 0, DIRC, 0 } }, | ||
270 | { 0xe6950000, 0, 16, 4, /* IPRAA3 */ { SHWYSTAT, 0, 0, 0 } }, | ||
271 | { 0xe6950020, 0, 16, 4, /* IPRIA3 */ { ICUSB, 0, 0, 0 } }, | ||
272 | { 0xe6950024, 0, 16, 4, /* IPRJA3 */ { ICUDMC, 0, 0, 0 } }, | ||
273 | { 0xe6950028, 0, 16, 4, /* IPRKA3 */ { SPU2, 0, FSI, FMSI } }, | ||
274 | { 0xe695002c, 0, 16, 4, /* IPRLA3 */ { SCUV, 0, 0, 0 } }, | ||
275 | { 0xe6950030, 0, 16, 4, /* IPRMA3 */ { IPMMU_IPMMUB, 0, 0, 0 } }, | ||
276 | { 0xe6950034, 0, 16, 4, /* IPRNA3 */ { AP_ARM2, 0, 0, 0 } }, | ||
277 | { 0xe6950038, 0, 16, 4, /* IPROA3 */ { MFIS2, CPORTR2S, | ||
278 | CMT14, CMT15 } }, | ||
279 | { 0xe694003c, 0, 16, 4, /* IPRPA3 */ { SCIFA6, 0, 0, 0 } }, | ||
280 | }; | ||
281 | |||
282 | static struct intc_desc intca_desc __initdata = { | ||
283 | .name = "sh7377-intca", | ||
284 | .force_enable = ENABLED, | ||
285 | .force_disable = DISABLED, | ||
286 | .hw = INTC_HW_DESC(intca_vectors, intca_groups, | ||
287 | intca_mask_registers, intca_prio_registers, | ||
288 | NULL, NULL), | ||
289 | }; | ||
290 | |||
291 | INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000, | ||
292 | INTC_VECT, "sh7377-intca-irq-pins"); | ||
293 | |||
294 | /* this macro ignore entry which is also in INTCA */ | ||
295 | #define __IGNORE(a...) | ||
296 | #define __IGNORE0(a...) 0 | ||
297 | |||
298 | enum { | ||
299 | UNUSED_INTCS = 0, | ||
300 | |||
301 | INTCS, | ||
302 | |||
303 | /* interrupt sources INTCS */ | ||
304 | VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3, | ||
305 | RTDMAC1_1_DEI0, RTDMAC1_1_DEI1, RTDMAC1_1_DEI2, RTDMAC1_1_DEI3, | ||
306 | CEU, | ||
307 | BEU_BEU0, BEU_BEU1, BEU_BEU2, | ||
308 | __IGNORE(MFI) | ||
309 | __IGNORE(BBIF2) | ||
310 | VPU, | ||
311 | TSIF1, | ||
312 | __IGNORE(SGX540) | ||
313 | _2DDMAC, | ||
314 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | ||
315 | IPMMU_IPMMUR, IPMMU_IPMMUR2, | ||
316 | RTDMAC1_2_DEI4, RTDMAC1_2_DEI5, RTDMAC1_2_DADERR, | ||
317 | __IGNORE(KEYSC) | ||
318 | __IGNORE(TTI20) | ||
319 | __IGNORE(MSIOF) | ||
320 | IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0, | ||
321 | TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, | ||
322 | CMT0, | ||
323 | TSIF0, | ||
324 | __IGNORE(CMT2) | ||
325 | LMB, | ||
326 | __IGNORE(MSUG) | ||
327 | __IGNORE(MSU_MSU, MSU_MSU2) | ||
328 | __IGNORE(CTI) | ||
329 | MVI3, | ||
330 | __IGNORE(RWDT0) | ||
331 | __IGNORE(RWDT1) | ||
332 | ICB, | ||
333 | PEP, | ||
334 | ASA, | ||
335 | __IGNORE(_2DG) | ||
336 | HQE, | ||
337 | JPU, | ||
338 | LCDC0, | ||
339 | __IGNORE(LCRC) | ||
340 | RTDMAC2_1_DEI0, RTDMAC2_1_DEI1, RTDMAC2_1_DEI2, RTDMAC2_1_DEI3, | ||
341 | RTDMAC2_2_DEI4, RTDMAC2_2_DEI5, RTDMAC2_2_DADERR, | ||
342 | FRC, | ||
343 | LCDC1, | ||
344 | CSIRX, | ||
345 | DSITX_DSITX0, DSITX_DSITX1, | ||
346 | __IGNORE(SPU2_SPU0, SPU2_SPU1) | ||
347 | __IGNORE(FSI) | ||
348 | __IGNORE(FMSI) | ||
349 | __IGNORE(SCUV) | ||
350 | TMU1_TUNI10, TMU1_TUNI11, TMU1_TUNI12, | ||
351 | TSIF2, | ||
352 | CMT4, | ||
353 | __IGNORE(MFIS2) | ||
354 | CPORTS2R, | ||
355 | |||
356 | /* interrupt groups INTCS */ | ||
357 | RTDMAC1_1, RTDMAC1_2, VEU, BEU, IIC0, __IGNORE(MSU) IPMMU, | ||
358 | IIC2, RTDMAC2_1, RTDMAC2_2, DSITX, __IGNORE(SPU2) TMU1, | ||
359 | }; | ||
360 | |||
361 | #define INTCS_INTVECT 0x0F80 | ||
362 | static struct intc_vect intcs_vectors[] __initdata = { | ||
363 | INTCS_VECT(VEU_VEU0, 0x0700), INTCS_VECT(VEU_VEU1, 0x0720), | ||
364 | INTCS_VECT(VEU_VEU2, 0x0740), INTCS_VECT(VEU_VEU3, 0x0760), | ||
365 | INTCS_VECT(RTDMAC1_1_DEI0, 0x0800), INTCS_VECT(RTDMAC1_1_DEI1, 0x0820), | ||
366 | INTCS_VECT(RTDMAC1_1_DEI2, 0x0840), INTCS_VECT(RTDMAC1_1_DEI3, 0x0860), | ||
367 | INTCS_VECT(CEU, 0x0880), | ||
368 | INTCS_VECT(BEU_BEU0, 0x08A0), | ||
369 | INTCS_VECT(BEU_BEU1, 0x08C0), | ||
370 | INTCS_VECT(BEU_BEU2, 0x08E0), | ||
371 | __IGNORE(INTCS_VECT(MFI, 0x0900)) | ||
372 | __IGNORE(INTCS_VECT(BBIF2, 0x0960)) | ||
373 | INTCS_VECT(VPU, 0x0980), | ||
374 | INTCS_VECT(TSIF1, 0x09A0), | ||
375 | __IGNORE(INTCS_VECT(SGX540, 0x09E0)) | ||
376 | INTCS_VECT(_2DDMAC, 0x0A00), | ||
377 | INTCS_VECT(IIC2_ALI2, 0x0A80), INTCS_VECT(IIC2_TACKI2, 0x0AA0), | ||
378 | INTCS_VECT(IIC2_WAITI2, 0x0AC0), INTCS_VECT(IIC2_DTEI2, 0x0AE0), | ||
379 | INTCS_VECT(IPMMU_IPMMUR, 0x0B00), INTCS_VECT(IPMMU_IPMMUR2, 0x0B20), | ||
380 | INTCS_VECT(RTDMAC1_2_DEI4, 0x0B80), | ||
381 | INTCS_VECT(RTDMAC1_2_DEI5, 0x0BA0), | ||
382 | INTCS_VECT(RTDMAC1_2_DADERR, 0x0BC0), | ||
383 | __IGNORE(INTCS_VECT(KEYSC 0x0BE0)) | ||
384 | __IGNORE(INTCS_VECT(TTI20, 0x0C80)) | ||
385 | __IGNORE(INTCS_VECT(MSIOF, 0x0D20)) | ||
386 | INTCS_VECT(IIC0_ALI0, 0x0E00), INTCS_VECT(IIC0_TACKI0, 0x0E20), | ||
387 | INTCS_VECT(IIC0_WAITI0, 0x0E40), INTCS_VECT(IIC0_DTEI0, 0x0E60), | ||
388 | INTCS_VECT(TMU_TUNI0, 0x0E80), | ||
389 | INTCS_VECT(TMU_TUNI1, 0x0EA0), | ||
390 | INTCS_VECT(TMU_TUNI2, 0x0EC0), | ||
391 | INTCS_VECT(CMT0, 0x0F00), | ||
392 | INTCS_VECT(TSIF0, 0x0F20), | ||
393 | __IGNORE(INTCS_VECT(CMT2, 0x0F40)) | ||
394 | INTCS_VECT(LMB, 0x0F60), | ||
395 | __IGNORE(INTCS_VECT(MSUG, 0x0F80)) | ||
396 | __IGNORE(INTCS_VECT(MSU_MSU, 0x0FA0)) | ||
397 | __IGNORE(INTCS_VECT(MSU_MSU2, 0x0FC0)) | ||
398 | __IGNORE(INTCS_VECT(CTI, 0x0400)) | ||
399 | INTCS_VECT(MVI3, 0x0420), | ||
400 | __IGNORE(INTCS_VECT(RWDT0, 0x0440)) | ||
401 | __IGNORE(INTCS_VECT(RWDT1, 0x0460)) | ||
402 | INTCS_VECT(ICB, 0x0480), | ||
403 | INTCS_VECT(PEP, 0x04A0), | ||
404 | INTCS_VECT(ASA, 0x04C0), | ||
405 | __IGNORE(INTCS_VECT(_2DG, 0x04E0)) | ||
406 | INTCS_VECT(HQE, 0x0540), | ||
407 | INTCS_VECT(JPU, 0x0560), | ||
408 | INTCS_VECT(LCDC0, 0x0580), | ||
409 | __IGNORE(INTCS_VECT(LCRC, 0x05A0)) | ||
410 | INTCS_VECT(RTDMAC2_1_DEI0, 0x1300), INTCS_VECT(RTDMAC2_1_DEI1, 0x1320), | ||
411 | INTCS_VECT(RTDMAC2_1_DEI2, 0x1340), INTCS_VECT(RTDMAC2_1_DEI3, 0x1360), | ||
412 | INTCS_VECT(RTDMAC2_2_DEI4, 0x1380), INTCS_VECT(RTDMAC2_2_DEI5, 0x13A0), | ||
413 | INTCS_VECT(RTDMAC2_2_DADERR, 0x13C0), | ||
414 | INTCS_VECT(FRC, 0x1700), | ||
415 | INTCS_VECT(LCDC1, 0x1780), | ||
416 | INTCS_VECT(CSIRX, 0x17A0), | ||
417 | INTCS_VECT(DSITX_DSITX0, 0x17C0), INTCS_VECT(DSITX_DSITX1, 0x17E0), | ||
418 | __IGNORE(INTCS_VECT(SPU2_SPU0, 0x1800)) | ||
419 | __IGNORE(INTCS_VECT(SPU2_SPU1, 0x1820)) | ||
420 | __IGNORE(INTCS_VECT(FSI, 0x1840)) | ||
421 | __IGNORE(INTCS_VECT(FMSI, 0x1860)) | ||
422 | __IGNORE(INTCS_VECT(SCUV, 0x1880)) | ||
423 | INTCS_VECT(TMU1_TUNI10, 0x1900), INTCS_VECT(TMU1_TUNI11, 0x1920), | ||
424 | INTCS_VECT(TMU1_TUNI12, 0x1940), | ||
425 | INTCS_VECT(TSIF2, 0x1960), | ||
426 | INTCS_VECT(CMT4, 0x1980), | ||
427 | __IGNORE(INTCS_VECT(MFIS2, 0x1A00)) | ||
428 | INTCS_VECT(CPORTS2R, 0x1A20), | ||
429 | |||
430 | INTC_VECT(INTCS, INTCS_INTVECT), | ||
431 | }; | ||
432 | |||
433 | static struct intc_group intcs_groups[] __initdata = { | ||
434 | INTC_GROUP(RTDMAC1_1, | ||
435 | RTDMAC1_1_DEI0, RTDMAC1_1_DEI1, | ||
436 | RTDMAC1_1_DEI2, RTDMAC1_1_DEI3), | ||
437 | INTC_GROUP(RTDMAC1_2, | ||
438 | RTDMAC1_2_DEI4, RTDMAC1_2_DEI5, RTDMAC1_2_DADERR), | ||
439 | INTC_GROUP(VEU, VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3), | ||
440 | INTC_GROUP(BEU, BEU_BEU0, BEU_BEU1, BEU_BEU2), | ||
441 | INTC_GROUP(IIC0, IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0), | ||
442 | __IGNORE(INTC_GROUP(MSU, MSU_MSU, MSU_MSU2)) | ||
443 | INTC_GROUP(IPMMU, IPMMU_IPMMUR, IPMMU_IPMMUR2), | ||
444 | INTC_GROUP(IIC2, IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2), | ||
445 | INTC_GROUP(RTDMAC2_1, | ||
446 | RTDMAC2_1_DEI0, RTDMAC2_1_DEI1, | ||
447 | RTDMAC2_1_DEI2, RTDMAC2_1_DEI3), | ||
448 | INTC_GROUP(RTDMAC2_2, RTDMAC2_2_DEI4, RTDMAC2_2_DEI5, RTDMAC2_2_DADERR), | ||
449 | INTC_GROUP(DSITX, DSITX_DSITX0, DSITX_DSITX1), | ||
450 | __IGNORE(INTC_GROUP(SPU2, SPU2_SPU0, SPU2_SPU1)) | ||
451 | INTC_GROUP(TMU1, TMU1_TUNI10, TMU1_TUNI11, TMU1_TUNI12), | ||
452 | }; | ||
453 | |||
454 | static struct intc_mask_reg intcs_mask_registers[] __initdata = { | ||
455 | { 0xE6940184, 0xE69401C4, 8, /* IMR1AS / IMCR1AS */ | ||
456 | { BEU_BEU2, BEU_BEU1, BEU_BEU0, CEU, | ||
457 | VEU_VEU3, VEU_VEU2, VEU_VEU1, VEU_VEU0 } }, | ||
458 | { 0xE6940188, 0xE69401C8, 8, /* IMR2AS / IMCR2AS */ | ||
459 | { 0, 0, 0, VPU, | ||
460 | __IGNORE0(BBIF2), 0, 0, __IGNORE0(MFI) } }, | ||
461 | { 0xE694018C, 0xE69401CC, 8, /* IMR3AS / IMCR3AS */ | ||
462 | { 0, 0, 0, _2DDMAC, | ||
463 | __IGNORE0(_2DG), ASA, PEP, ICB } }, | ||
464 | { 0xE6940190, 0xE69401D0, 8, /* IMR4AS / IMCR4AS */ | ||
465 | { 0, 0, MVI3, __IGNORE0(CTI), | ||
466 | JPU, HQE, __IGNORE0(LCRC), LCDC0 } }, | ||
467 | { 0xE6940194, 0xE69401D4, 8, /* IMR5AS / IMCR5AS */ | ||
468 | { __IGNORE0(KEYSC), RTDMAC1_2_DADERR, RTDMAC1_2_DEI5, RTDMAC1_2_DEI4, | ||
469 | RTDMAC1_1_DEI3, RTDMAC1_1_DEI2, RTDMAC1_1_DEI1, RTDMAC1_1_DEI0 } }, | ||
470 | __IGNORE({ 0xE6940198, 0xE69401D8, 8, /* IMR6AS / IMCR6AS */ | ||
471 | { 0, 0, MSIOF, 0, | ||
472 | SGX540, 0, TTI20, 0 } }) | ||
473 | { 0xE694019C, 0xE69401DC, 8, /* IMR7AS / IMCR7AS */ | ||
474 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, | ||
475 | 0, 0, 0, 0 } }, | ||
476 | __IGNORE({ 0xE69401A0, 0xE69401E0, 8, /* IMR8AS / IMCR8AS */ | ||
477 | { 0, 0, 0, 0, | ||
478 | 0, MSU_MSU, MSU_MSU2, MSUG } }) | ||
479 | { 0xE69401A4, 0xE69401E4, 8, /* IMR9AS / IMCR9AS */ | ||
480 | { __IGNORE0(RWDT1), __IGNORE0(RWDT0), __IGNORE0(CMT2), CMT0, | ||
481 | IIC2_DTEI2, IIC2_WAITI2, IIC2_TACKI2, IIC2_ALI2 } }, | ||
482 | { 0xE69401A8, 0xE69401E8, 8, /* IMR10AS / IMCR10AS */ | ||
483 | { 0, 0, IPMMU_IPMMUR, IPMMU_IPMMUR2, | ||
484 | 0, 0, 0, 0 } }, | ||
485 | { 0xE69401AC, 0xE69401EC, 8, /* IMR11AS / IMCR11AS */ | ||
486 | { IIC0_DTEI0, IIC0_WAITI0, IIC0_TACKI0, IIC0_ALI0, | ||
487 | 0, TSIF1, LMB, TSIF0 } }, | ||
488 | { 0xE6950180, 0xE69501C0, 8, /* IMR0AS3 / IMCR0AS3 */ | ||
489 | { RTDMAC2_1_DEI0, RTDMAC2_1_DEI1, RTDMAC2_1_DEI2, RTDMAC2_1_DEI3, | ||
490 | RTDMAC2_2_DEI4, RTDMAC2_2_DEI5, RTDMAC2_2_DADERR, 0 } }, | ||
491 | { 0xE6950190, 0xE69501D0, 8, /* IMR4AS3 / IMCR4AS3 */ | ||
492 | { FRC, 0, 0, 0, | ||
493 | LCDC1, CSIRX, DSITX_DSITX0, DSITX_DSITX1 } }, | ||
494 | __IGNORE({ 0xE6950194, 0xE69501D4, 8, /* IMR5AS3 / IMCR5AS3 */ | ||
495 | {SPU2_SPU0, SPU2_SPU1, FSI, FMSI, | ||
496 | SCUV, 0, 0, 0 } }) | ||
497 | { 0xE6950198, 0xE69501D8, 8, /* IMR6AS3 / IMCR6AS3 */ | ||
498 | { TMU1_TUNI10, TMU1_TUNI11, TMU1_TUNI12, TSIF2, | ||
499 | CMT4, 0, 0, 0 } }, | ||
500 | { 0xE695019C, 0xE69501DC, 8, /* IMR7AS3 / IMCR7AS3 */ | ||
501 | { __IGNORE0(MFIS2), CPORTS2R, 0, 0, | ||
502 | 0, 0, 0, 0 } }, | ||
503 | { 0xFFD20104, 0, 16, /* INTAMASK */ | ||
504 | { 0, 0, 0, 0, 0, 0, 0, 0, | ||
505 | 0, 0, 0, 0, 0, 0, 0, INTCS } } | ||
506 | }; | ||
507 | |||
508 | static struct intc_prio_reg intcs_prio_registers[] __initdata = { | ||
509 | /* IPRAS */ | ||
510 | { 0xFFD20000, 0, 16, 4, { __IGNORE0(CTI), MVI3, _2DDMAC, ICB } }, | ||
511 | /* IPRBS */ | ||
512 | { 0xFFD20004, 0, 16, 4, { JPU, LCDC0, 0, __IGNORE0(LCRC) } }, | ||
513 | /* IPRCS */ | ||
514 | __IGNORE({ 0xFFD20008, 0, 16, 4, { BBIF2, 0, 0, 0 } }) | ||
515 | /* IPRES */ | ||
516 | { 0xFFD20010, 0, 16, 4, { RTDMAC1_1, CEU, __IGNORE0(MFI), VPU } }, | ||
517 | /* IPRFS */ | ||
518 | { 0xFFD20014, 0, 16, 4, | ||
519 | { __IGNORE0(KEYSC), RTDMAC1_2, __IGNORE0(CMT2), CMT0 } }, | ||
520 | /* IPRGS */ | ||
521 | { 0xFFD20018, 0, 16, 4, { TMU_TUNI0, TMU_TUNI1, TMU_TUNI2, TSIF1 } }, | ||
522 | /* IPRHS */ | ||
523 | { 0xFFD2001C, 0, 16, 4, { __IGNORE0(TTI20), 0, VEU, BEU } }, | ||
524 | /* IPRIS */ | ||
525 | { 0xFFD20020, 0, 16, 4, { 0, __IGNORE0(MSIOF), TSIF0, IIC0 } }, | ||
526 | /* IPRJS */ | ||
527 | __IGNORE({ 0xFFD20024, 0, 16, 4, { 0, SGX540, MSUG, MSU } }) | ||
528 | /* IPRKS */ | ||
529 | { 0xFFD20028, 0, 16, 4, { __IGNORE0(_2DG), ASA, LMB, PEP } }, | ||
530 | /* IPRLS */ | ||
531 | { 0xFFD2002C, 0, 16, 4, { IPMMU, 0, 0, HQE } }, | ||
532 | /* IPRMS */ | ||
533 | { 0xFFD20030, 0, 16, 4, | ||
534 | { IIC2, 0, __IGNORE0(RWDT1), __IGNORE0(RWDT0) } }, | ||
535 | /* IPRAS3 */ | ||
536 | { 0xFFD50000, 0, 16, 4, { RTDMAC2_1, 0, 0, 0 } }, | ||
537 | /* IPRBS3 */ | ||
538 | { 0xFFD50004, 0, 16, 4, { RTDMAC2_2, 0, 0, 0 } }, | ||
539 | /* IPRIS3 */ | ||
540 | { 0xFFD50020, 0, 16, 4, { FRC, 0, 0, 0 } }, | ||
541 | /* IPRJS3 */ | ||
542 | { 0xFFD50024, 0, 16, 4, { LCDC1, CSIRX, DSITX, 0 } }, | ||
543 | /* IPRKS3 */ | ||
544 | __IGNORE({ 0xFFD50028, 0, 16, 4, { SPU2, 0, FSI, FMSI } }) | ||
545 | /* IPRLS3 */ | ||
546 | __IGNORE({ 0xFFD5002C, 0, 16, 4, { SCUV, 0, 0, 0 } }) | ||
547 | /* IPRMS3 */ | ||
548 | { 0xFFD50030, 0, 16, 4, { TMU1, 0, 0, TSIF2 } }, | ||
549 | /* IPRNS3 */ | ||
550 | { 0xFFD50034, 0, 16, 4, { CMT4, 0, 0, 0 } }, | ||
551 | /* IPROS3 */ | ||
552 | { 0xFFD50038, 0, 16, 4, { __IGNORE0(MFIS2), CPORTS2R, 0, 0 } }, | ||
553 | }; | ||
554 | |||
555 | static struct resource intcs_resources[] __initdata = { | ||
556 | [0] = { | ||
557 | .start = 0xffd20000, | ||
558 | .end = 0xffd500ff, | ||
559 | .flags = IORESOURCE_MEM, | ||
560 | } | ||
561 | }; | ||
562 | |||
563 | static struct intc_desc intcs_desc __initdata = { | ||
564 | .name = "sh7377-intcs", | ||
565 | .resource = intcs_resources, | ||
566 | .num_resources = ARRAY_SIZE(intcs_resources), | ||
567 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, | ||
568 | intcs_mask_registers, intcs_prio_registers, | ||
569 | NULL, NULL), | ||
570 | }; | ||
571 | |||
572 | static void intcs_demux(unsigned int irq, struct irq_desc *desc) | ||
573 | { | ||
574 | void __iomem *reg = (void *)irq_get_handler_data(irq); | ||
575 | unsigned int evtcodeas = ioread32(reg); | ||
576 | |||
577 | generic_handle_irq(intcs_evt2irq(evtcodeas)); | ||
578 | } | ||
579 | |||
580 | #define INTEVTSA 0xFFD20100 | ||
581 | void __init sh7377_init_irq(void) | ||
582 | { | ||
583 | void __iomem *intevtsa = ioremap_nocache(INTEVTSA, PAGE_SIZE); | ||
584 | |||
585 | register_intc_controller(&intca_desc); | ||
586 | register_intc_controller(&intca_irq_pins_desc); | ||
587 | register_intc_controller(&intcs_desc); | ||
588 | |||
589 | /* demux using INTEVTSA */ | ||
590 | irq_set_handler_data(evt2irq(INTCS_INTVECT), (void *)intevtsa); | ||
591 | irq_set_chained_handler(evt2irq(INTCS_INTVECT), intcs_demux); | ||
592 | } | ||
diff --git a/arch/arm/mach-shmobile/pfc-r8a7779.c b/arch/arm/mach-shmobile/pfc-r8a7779.c index cbc26ba2a0a2..9513234d322b 100644 --- a/arch/arm/mach-shmobile/pfc-r8a7779.c +++ b/arch/arm/mach-shmobile/pfc-r8a7779.c | |||
@@ -140,7 +140,7 @@ enum { | |||
140 | FN_IP7_3_2, FN_IP7_6_4, FN_IP7_9_7, FN_IP7_12_10, | 140 | FN_IP7_3_2, FN_IP7_6_4, FN_IP7_9_7, FN_IP7_12_10, |
141 | FN_IP7_14_13, FN_IP2_7_4, FN_IP2_11_8, FN_IP2_15_12, | 141 | FN_IP7_14_13, FN_IP2_7_4, FN_IP2_11_8, FN_IP2_15_12, |
142 | FN_IP1_28_25, FN_IP2_3_0, FN_IP8_3_0, FN_IP8_7_4, | 142 | FN_IP1_28_25, FN_IP2_3_0, FN_IP8_3_0, FN_IP8_7_4, |
143 | FN_IP8_11_8, FN_IP8_15_12, FN_PENC0, FN_PENC1, | 143 | FN_IP8_11_8, FN_IP8_15_12, FN_USB_PENC0, FN_USB_PENC1, |
144 | FN_IP0_2_0, FN_IP8_17_16, FN_IP8_18, FN_IP8_19, | 144 | FN_IP0_2_0, FN_IP8_17_16, FN_IP8_18, FN_IP8_19, |
145 | 145 | ||
146 | /* GPSR5 */ | 146 | /* GPSR5 */ |
@@ -176,7 +176,7 @@ enum { | |||
176 | FN_A0, FN_SD1_DAT3, FN_MMC0_D3, FN_FD3, | 176 | FN_A0, FN_SD1_DAT3, FN_MMC0_D3, FN_FD3, |
177 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, | 177 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, |
178 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, | 178 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, |
179 | FN_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, | 179 | FN_USB_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, |
180 | FN_SCIF_CLK, FN_TCLK0_C, | 180 | FN_SCIF_CLK, FN_TCLK0_C, |
181 | 181 | ||
182 | /* IPSR1 */ | 182 | /* IPSR1 */ |
@@ -447,7 +447,7 @@ enum { | |||
447 | A0_MARK, SD1_DAT3_MARK, MMC0_D3_MARK, FD3_MARK, | 447 | A0_MARK, SD1_DAT3_MARK, MMC0_D3_MARK, FD3_MARK, |
448 | BS_MARK, SD1_DAT2_MARK, MMC0_D2_MARK, FD2_MARK, | 448 | BS_MARK, SD1_DAT2_MARK, MMC0_D2_MARK, FD2_MARK, |
449 | ATADIR0_MARK, SDSELF_MARK, HCTS1_MARK, TX4_C_MARK, | 449 | ATADIR0_MARK, SDSELF_MARK, HCTS1_MARK, TX4_C_MARK, |
450 | PENC2_MARK, SCK0_MARK, PWM1_MARK, PWMFSW0_MARK, | 450 | USB_PENC2_MARK, SCK0_MARK, PWM1_MARK, PWMFSW0_MARK, |
451 | SCIF_CLK_MARK, TCLK0_C_MARK, | 451 | SCIF_CLK_MARK, TCLK0_C_MARK, |
452 | 452 | ||
453 | EX_CS0_MARK, RX3_C_IRDA_RX_C_MARK, MMC0_D6_MARK, | 453 | EX_CS0_MARK, RX3_C_IRDA_RX_C_MARK, MMC0_D6_MARK, |
@@ -658,7 +658,7 @@ static pinmux_enum_t pinmux_data[] = { | |||
658 | PINMUX_DATA(A18_MARK, FN_A18), | 658 | PINMUX_DATA(A18_MARK, FN_A18), |
659 | PINMUX_DATA(A19_MARK, FN_A19), | 659 | PINMUX_DATA(A19_MARK, FN_A19), |
660 | 660 | ||
661 | PINMUX_IPSR_DATA(IP0_2_0, PENC2), | 661 | PINMUX_IPSR_DATA(IP0_2_0, USB_PENC2), |
662 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, SCK0, SEL_SCIF0_0), | 662 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, SCK0, SEL_SCIF0_0), |
663 | PINMUX_IPSR_DATA(IP0_2_0, PWM1), | 663 | PINMUX_IPSR_DATA(IP0_2_0, PWM1), |
664 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, PWMFSW0, SEL_PWMFSW_0), | 664 | PINMUX_IPSR_MODSEL_DATA(IP0_2_0, PWMFSW0, SEL_PWMFSW_0), |
@@ -1456,7 +1456,7 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
1456 | GPIO_FN(A19), | 1456 | GPIO_FN(A19), |
1457 | 1457 | ||
1458 | /* IPSR0 */ | 1458 | /* IPSR0 */ |
1459 | GPIO_FN(PENC2), GPIO_FN(SCK0), GPIO_FN(PWM1), GPIO_FN(PWMFSW0), | 1459 | GPIO_FN(USB_PENC2), GPIO_FN(SCK0), GPIO_FN(PWM1), GPIO_FN(PWMFSW0), |
1460 | GPIO_FN(SCIF_CLK), GPIO_FN(TCLK0_C), GPIO_FN(BS), GPIO_FN(SD1_DAT2), | 1460 | GPIO_FN(SCIF_CLK), GPIO_FN(TCLK0_C), GPIO_FN(BS), GPIO_FN(SD1_DAT2), |
1461 | GPIO_FN(MMC0_D2), GPIO_FN(FD2), GPIO_FN(ATADIR0), GPIO_FN(SDSELF), | 1461 | GPIO_FN(MMC0_D2), GPIO_FN(FD2), GPIO_FN(ATADIR0), GPIO_FN(SDSELF), |
1462 | GPIO_FN(HCTS1), GPIO_FN(TX4_C), GPIO_FN(A0), GPIO_FN(SD1_DAT3), | 1462 | GPIO_FN(HCTS1), GPIO_FN(TX4_C), GPIO_FN(A0), GPIO_FN(SD1_DAT3), |
@@ -1865,8 +1865,8 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = { | |||
1865 | GP_4_30_FN, FN_IP8_18, | 1865 | GP_4_30_FN, FN_IP8_18, |
1866 | GP_4_29_FN, FN_IP8_17_16, | 1866 | GP_4_29_FN, FN_IP8_17_16, |
1867 | GP_4_28_FN, FN_IP0_2_0, | 1867 | GP_4_28_FN, FN_IP0_2_0, |
1868 | GP_4_27_FN, FN_PENC1, | 1868 | GP_4_27_FN, FN_USB_PENC1, |
1869 | GP_4_26_FN, FN_PENC0, | 1869 | GP_4_26_FN, FN_USB_PENC0, |
1870 | GP_4_25_FN, FN_IP8_15_12, | 1870 | GP_4_25_FN, FN_IP8_15_12, |
1871 | GP_4_24_FN, FN_IP8_11_8, | 1871 | GP_4_24_FN, FN_IP8_11_8, |
1872 | GP_4_23_FN, FN_IP8_7_4, | 1872 | GP_4_23_FN, FN_IP8_7_4, |
@@ -1981,7 +1981,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = { | |||
1981 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, | 1981 | FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2, |
1982 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, | 1982 | FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C, |
1983 | /* IP0_2_0 [3] */ | 1983 | /* IP0_2_0 [3] */ |
1984 | FN_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, | 1984 | FN_USB_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0, |
1985 | FN_SCIF_CLK, FN_TCLK0_C, 0, 0 } | 1985 | FN_SCIF_CLK, FN_TCLK0_C, 0, 0 } |
1986 | }, | 1986 | }, |
1987 | { PINMUX_CFG_REG_VAR("IPSR1", 0xfffc0024, 32, | 1987 | { PINMUX_CFG_REG_VAR("IPSR1", 0xfffc0024, 32, |
diff --git a/arch/arm/mach-shmobile/pfc-sh7367.c b/arch/arm/mach-shmobile/pfc-sh7367.c deleted file mode 100644 index c0c137f39052..000000000000 --- a/arch/arm/mach-shmobile/pfc-sh7367.c +++ /dev/null | |||
@@ -1,1727 +0,0 @@ | |||
1 | /* | ||
2 | * sh7367 processor support - PFC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/sh_pfc.h> | ||
22 | #include <mach/sh7367.h> | ||
23 | |||
24 | #define CPU_ALL_PORT(fn, pfx, sfx) \ | ||
25 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | ||
26 | PORT_10(fn, pfx##10, sfx), PORT_90(fn, pfx##1, sfx), \ | ||
27 | PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \ | ||
28 | PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \ | ||
29 | PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \ | ||
30 | PORT_10(fn, pfx##26, sfx), PORT_1(fn, pfx##270, sfx), \ | ||
31 | PORT_1(fn, pfx##271, sfx), PORT_1(fn, pfx##272, sfx) | ||
32 | |||
33 | enum { | ||
34 | PINMUX_RESERVED = 0, | ||
35 | |||
36 | PINMUX_DATA_BEGIN, | ||
37 | PORT_ALL(DATA), /* PORT0_DATA -> PORT272_DATA */ | ||
38 | PINMUX_DATA_END, | ||
39 | |||
40 | PINMUX_INPUT_BEGIN, | ||
41 | PORT_ALL(IN), /* PORT0_IN -> PORT272_IN */ | ||
42 | PINMUX_INPUT_END, | ||
43 | |||
44 | PINMUX_INPUT_PULLUP_BEGIN, | ||
45 | PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT272_IN_PU */ | ||
46 | PINMUX_INPUT_PULLUP_END, | ||
47 | |||
48 | PINMUX_INPUT_PULLDOWN_BEGIN, | ||
49 | PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT272_IN_PD */ | ||
50 | PINMUX_INPUT_PULLDOWN_END, | ||
51 | |||
52 | PINMUX_OUTPUT_BEGIN, | ||
53 | PORT_ALL(OUT), /* PORT0_OUT -> PORT272_OUT */ | ||
54 | PINMUX_OUTPUT_END, | ||
55 | |||
56 | PINMUX_FUNCTION_BEGIN, | ||
57 | PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT272_FN_IN */ | ||
58 | PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT272_FN_OUT */ | ||
59 | PORT_ALL(FN0), /* PORT0_FN0 -> PORT272_FN0 */ | ||
60 | PORT_ALL(FN1), /* PORT0_FN1 -> PORT272_FN1 */ | ||
61 | PORT_ALL(FN2), /* PORT0_FN2 -> PORT272_FN2 */ | ||
62 | PORT_ALL(FN3), /* PORT0_FN3 -> PORT272_FN3 */ | ||
63 | PORT_ALL(FN4), /* PORT0_FN4 -> PORT272_FN4 */ | ||
64 | PORT_ALL(FN5), /* PORT0_FN5 -> PORT272_FN5 */ | ||
65 | PORT_ALL(FN6), /* PORT0_FN6 -> PORT272_FN6 */ | ||
66 | PORT_ALL(FN7), /* PORT0_FN7 -> PORT272_FN7 */ | ||
67 | |||
68 | MSELBCR_MSEL2_1, MSELBCR_MSEL2_0, | ||
69 | PINMUX_FUNCTION_END, | ||
70 | |||
71 | PINMUX_MARK_BEGIN, | ||
72 | /* Special Pull-up / Pull-down Functions */ | ||
73 | PORT48_KEYIN0_PU_MARK, PORT49_KEYIN1_PU_MARK, | ||
74 | PORT50_KEYIN2_PU_MARK, PORT55_KEYIN3_PU_MARK, | ||
75 | PORT56_KEYIN4_PU_MARK, PORT57_KEYIN5_PU_MARK, | ||
76 | PORT58_KEYIN6_PU_MARK, | ||
77 | |||
78 | /* 49-1 */ | ||
79 | VBUS0_MARK, CPORT0_MARK, CPORT1_MARK, CPORT2_MARK, | ||
80 | CPORT3_MARK, CPORT4_MARK, CPORT5_MARK, CPORT6_MARK, | ||
81 | CPORT7_MARK, CPORT8_MARK, CPORT9_MARK, CPORT10_MARK, | ||
82 | CPORT11_MARK, SIN2_MARK, CPORT12_MARK, XCTS2_MARK, | ||
83 | CPORT13_MARK, RFSPO4_MARK, CPORT14_MARK, RFSPO5_MARK, | ||
84 | CPORT15_MARK, CPORT16_MARK, CPORT17_MARK, SOUT2_MARK, | ||
85 | CPORT18_MARK, XRTS2_MARK, CPORT19_MARK, CPORT20_MARK, | ||
86 | RFSPO6_MARK, CPORT21_MARK, STATUS0_MARK, CPORT22_MARK, | ||
87 | STATUS1_MARK, CPORT23_MARK, STATUS2_MARK, RFSPO7_MARK, | ||
88 | MPORT0_MARK, MPORT1_MARK, B_SYNLD1_MARK, B_SYNLD2_MARK, | ||
89 | XMAINPS_MARK, XDIVPS_MARK, XIDRST_MARK, IDCLK_MARK, | ||
90 | IDIO_MARK, SOUT1_MARK, SCIFA4_TXD_MARK, | ||
91 | M02_BERDAT_MARK, SIN1_MARK, SCIFA4_RXD_MARK, XWUP_MARK, | ||
92 | XRTS1_MARK, SCIFA4_RTS_MARK, M03_BERCLK_MARK, | ||
93 | XCTS1_MARK, SCIFA4_CTS_MARK, | ||
94 | |||
95 | /* 49-2 */ | ||
96 | HSU_IQ_AGC6_MARK, MFG2_IN2_MARK, MSIOF2_MCK0_MARK, | ||
97 | HSU_IQ_AGC5_MARK, MFG2_IN1_MARK, MSIOF2_MCK1_MARK, | ||
98 | HSU_IQ_AGC4_MARK, MSIOF2_RSYNC_MARK, | ||
99 | HSU_IQ_AGC3_MARK, MFG2_OUT1_MARK, MSIOF2_RSCK_MARK, | ||
100 | HSU_IQ_AGC2_MARK, PORT42_KEYOUT0_MARK, | ||
101 | HSU_IQ_AGC1_MARK, PORT43_KEYOUT1_MARK, | ||
102 | HSU_IQ_AGC0_MARK, PORT44_KEYOUT2_MARK, | ||
103 | HSU_IQ_AGC_ST_MARK, PORT45_KEYOUT3_MARK, | ||
104 | HSU_IQ_PDO_MARK, PORT46_KEYOUT4_MARK, | ||
105 | HSU_IQ_PYO_MARK, PORT47_KEYOUT5_MARK, | ||
106 | HSU_EN_TXMUX_G3MO_MARK, PORT48_KEYIN0_MARK, | ||
107 | HSU_I_TXMUX_G3MO_MARK, PORT49_KEYIN1_MARK, | ||
108 | HSU_Q_TXMUX_G3MO_MARK, PORT50_KEYIN2_MARK, | ||
109 | HSU_SYO_MARK, PORT51_MSIOF2_TSYNC_MARK, | ||
110 | HSU_SDO_MARK, PORT52_MSIOF2_TSCK_MARK, | ||
111 | HSU_TGTTI_G3MO_MARK, PORT53_MSIOF2_TXD_MARK, | ||
112 | B_TIME_STAMP_MARK, PORT54_MSIOF2_RXD_MARK, | ||
113 | HSU_SDI_MARK, PORT55_KEYIN3_MARK, | ||
114 | HSU_SCO_MARK, PORT56_KEYIN4_MARK, | ||
115 | HSU_DREQ_MARK, PORT57_KEYIN5_MARK, | ||
116 | HSU_DACK_MARK, PORT58_KEYIN6_MARK, | ||
117 | HSU_CLK61M_MARK, PORT59_MSIOF2_SS1_MARK, | ||
118 | HSU_XRST_MARK, PORT60_MSIOF2_SS2_MARK, | ||
119 | PCMCLKO_MARK, SYNC8KO_MARK, DNPCM_A_MARK, UPPCM_A_MARK, | ||
120 | XTALB1L_MARK, | ||
121 | GPS_AGC1_MARK, SCIFA0_RTS_MARK, | ||
122 | GPS_AGC2_MARK, SCIFA0_SCK_MARK, | ||
123 | GPS_AGC3_MARK, SCIFA0_TXD_MARK, | ||
124 | GPS_AGC4_MARK, SCIFA0_RXD_MARK, | ||
125 | GPS_PWRD_MARK, SCIFA0_CTS_MARK, | ||
126 | GPS_IM_MARK, GPS_IS_MARK, GPS_QM_MARK, GPS_QS_MARK, | ||
127 | SIUBOMC_MARK, TPU2TO0_MARK, | ||
128 | SIUCKB_MARK, TPU2TO1_MARK, | ||
129 | SIUBOLR_MARK, BBIF2_TSYNC_MARK, TPU2TO2_MARK, | ||
130 | SIUBOBT_MARK, BBIF2_TSCK_MARK, TPU2TO3_MARK, | ||
131 | SIUBOSLD_MARK, BBIF2_TXD_MARK, TPU3TO0_MARK, | ||
132 | SIUBILR_MARK, TPU3TO1_MARK, | ||
133 | SIUBIBT_MARK, TPU3TO2_MARK, | ||
134 | SIUBISLD_MARK, TPU3TO3_MARK, | ||
135 | NMI_MARK, TPU4TO0_MARK, | ||
136 | DNPCM_M_MARK, TPU4TO1_MARK, TPU4TO2_MARK, TPU4TO3_MARK, | ||
137 | IRQ_TMPB_MARK, | ||
138 | PWEN_MARK, MFG1_OUT1_MARK, | ||
139 | OVCN_MARK, MFG1_IN1_MARK, | ||
140 | OVCN2_MARK, MFG1_IN2_MARK, | ||
141 | |||
142 | /* 49-3 */ | ||
143 | RFSPO1_MARK, RFSPO2_MARK, RFSPO3_MARK, PORT93_VIO_CKO2_MARK, | ||
144 | USBTERM_MARK, EXTLP_MARK, IDIN_MARK, | ||
145 | SCIFA5_CTS_MARK, MFG0_IN1_MARK, | ||
146 | SCIFA5_RTS_MARK, MFG0_IN2_MARK, | ||
147 | SCIFA5_RXD_MARK, | ||
148 | SCIFA5_TXD_MARK, | ||
149 | SCIFA5_SCK_MARK, MFG0_OUT1_MARK, | ||
150 | A0_EA0_MARK, BS_MARK, | ||
151 | A14_EA14_MARK, PORT102_KEYOUT0_MARK, | ||
152 | A15_EA15_MARK, PORT103_KEYOUT1_MARK, DV_CLKOL_MARK, | ||
153 | A16_EA16_MARK, PORT104_KEYOUT2_MARK, | ||
154 | DV_VSYNCL_MARK, MSIOF0_SS1_MARK, | ||
155 | A17_EA17_MARK, PORT105_KEYOUT3_MARK, | ||
156 | DV_HSYNCL_MARK, MSIOF0_TSYNC_MARK, | ||
157 | A18_EA18_MARK, PORT106_KEYOUT4_MARK, | ||
158 | DV_DL0_MARK, MSIOF0_TSCK_MARK, | ||
159 | A19_EA19_MARK, PORT107_KEYOUT5_MARK, | ||
160 | DV_DL1_MARK, MSIOF0_TXD_MARK, | ||
161 | A20_EA20_MARK, PORT108_KEYIN0_MARK, | ||
162 | DV_DL2_MARK, MSIOF0_RSCK_MARK, | ||
163 | A21_EA21_MARK, PORT109_KEYIN1_MARK, | ||
164 | DV_DL3_MARK, MSIOF0_RSYNC_MARK, | ||
165 | A22_EA22_MARK, PORT110_KEYIN2_MARK, | ||
166 | DV_DL4_MARK, MSIOF0_MCK0_MARK, | ||
167 | A23_EA23_MARK, PORT111_KEYIN3_MARK, | ||
168 | DV_DL5_MARK, MSIOF0_MCK1_MARK, | ||
169 | A24_EA24_MARK, PORT112_KEYIN4_MARK, | ||
170 | DV_DL6_MARK, MSIOF0_RXD_MARK, | ||
171 | A25_EA25_MARK, PORT113_KEYIN5_MARK, | ||
172 | DV_DL7_MARK, MSIOF0_SS2_MARK, | ||
173 | A26_MARK, PORT113_KEYIN6_MARK, DV_CLKIL_MARK, | ||
174 | D0_ED0_NAF0_MARK, D1_ED1_NAF1_MARK, D2_ED2_NAF2_MARK, | ||
175 | D3_ED3_NAF3_MARK, D4_ED4_NAF4_MARK, D5_ED5_NAF5_MARK, | ||
176 | D6_ED6_NAF6_MARK, D7_ED7_NAF7_MARK, D8_ED8_NAF8_MARK, | ||
177 | D9_ED9_NAF9_MARK, D10_ED10_NAF10_MARK, D11_ED11_NAF11_MARK, | ||
178 | D12_ED12_NAF12_MARK, D13_ED13_NAF13_MARK, | ||
179 | D14_ED14_NAF14_MARK, D15_ED15_NAF15_MARK, | ||
180 | CS4_MARK, CS5A_MARK, CS5B_MARK, FCE1_MARK, | ||
181 | CS6B_MARK, XCS2_MARK, FCE0_MARK, CS6A_MARK, | ||
182 | DACK0_MARK, WAIT_MARK, DREQ0_MARK, RD_XRD_MARK, | ||
183 | A27_MARK, RDWR_XWE_MARK, WE0_XWR0_FWE_MARK, | ||
184 | WE1_XWR1_MARK, FRB_MARK, CKO_MARK, | ||
185 | NBRSTOUT_MARK, NBRST_MARK, | ||
186 | |||
187 | /* 49-4 */ | ||
188 | RFSPO0_MARK, PORT146_VIO_CKO2_MARK, TSTMD_MARK, | ||
189 | VIO_VD_MARK, VIO_HD_MARK, | ||
190 | VIO_D0_MARK, VIO_D1_MARK, VIO_D2_MARK, | ||
191 | VIO_D3_MARK, VIO_D4_MARK, VIO_D5_MARK, | ||
192 | VIO_D6_MARK, VIO_D7_MARK, VIO_D8_MARK, | ||
193 | VIO_D9_MARK, VIO_D10_MARK, VIO_D11_MARK, | ||
194 | VIO_D12_MARK, VIO_D13_MARK, VIO_D14_MARK, | ||
195 | VIO_D15_MARK, VIO_CLK_MARK, VIO_FIELD_MARK, | ||
196 | VIO_CKO_MARK, | ||
197 | MFG3_IN1_MARK, MFG3_IN2_MARK, | ||
198 | M9_SLCD_A01_MARK, MFG3_OUT1_MARK, TPU0TO0_MARK, | ||
199 | M10_SLCD_CK1_MARK, MFG4_IN1_MARK, TPU0TO1_MARK, | ||
200 | M11_SLCD_SO1_MARK, MFG4_IN2_MARK, TPU0TO2_MARK, | ||
201 | M12_SLCD_CE1_MARK, MFG4_OUT1_MARK, TPU0TO3_MARK, | ||
202 | LCDD0_MARK, PORT175_KEYOUT0_MARK, DV_D0_MARK, | ||
203 | SIUCKA_MARK, MFG0_OUT2_MARK, | ||
204 | LCDD1_MARK, PORT176_KEYOUT1_MARK, DV_D1_MARK, | ||
205 | SIUAOLR_MARK, BBIF2_TSYNC1_MARK, | ||
206 | LCDD2_MARK, PORT177_KEYOUT2_MARK, DV_D2_MARK, | ||
207 | SIUAOBT_MARK, BBIF2_TSCK1_MARK, | ||
208 | LCDD3_MARK, PORT178_KEYOUT3_MARK, DV_D3_MARK, | ||
209 | SIUAOSLD_MARK, BBIF2_TXD1_MARK, | ||
210 | LCDD4_MARK, PORT179_KEYOUT4_MARK, DV_D4_MARK, | ||
211 | SIUAISPD_MARK, MFG1_OUT2_MARK, | ||
212 | LCDD5_MARK, PORT180_KEYOUT5_MARK, DV_D5_MARK, | ||
213 | SIUAILR_MARK, MFG2_OUT2_MARK, | ||
214 | LCDD6_MARK, DV_D6_MARK, | ||
215 | SIUAIBT_MARK, MFG3_OUT2_MARK, XWR2_MARK, | ||
216 | LCDD7_MARK, DV_D7_MARK, | ||
217 | SIUAISLD_MARK, MFG4_OUT2_MARK, XWR3_MARK, | ||
218 | LCDD8_MARK, DV_D8_MARK, D16_MARK, ED16_MARK, | ||
219 | LCDD9_MARK, DV_D9_MARK, D17_MARK, ED17_MARK, | ||
220 | LCDD10_MARK, DV_D10_MARK, D18_MARK, ED18_MARK, | ||
221 | LCDD11_MARK, DV_D11_MARK, D19_MARK, ED19_MARK, | ||
222 | LCDD12_MARK, DV_D12_MARK, D20_MARK, ED20_MARK, | ||
223 | LCDD13_MARK, DV_D13_MARK, D21_MARK, ED21_MARK, | ||
224 | LCDD14_MARK, DV_D14_MARK, D22_MARK, ED22_MARK, | ||
225 | LCDD15_MARK, DV_D15_MARK, D23_MARK, ED23_MARK, | ||
226 | LCDD16_MARK, DV_HSYNC_MARK, D24_MARK, ED24_MARK, | ||
227 | LCDD17_MARK, DV_VSYNC_MARK, D25_MARK, ED25_MARK, | ||
228 | LCDD18_MARK, DREQ2_MARK, MSIOF0L_TSCK_MARK, | ||
229 | D26_MARK, ED26_MARK, | ||
230 | LCDD19_MARK, MSIOF0L_TSYNC_MARK, | ||
231 | D27_MARK, ED27_MARK, | ||
232 | LCDD20_MARK, TS_SPSYNC1_MARK, MSIOF0L_MCK0_MARK, | ||
233 | D28_MARK, ED28_MARK, | ||
234 | LCDD21_MARK, TS_SDAT1_MARK, MSIOF0L_MCK1_MARK, | ||
235 | D29_MARK, ED29_MARK, | ||
236 | LCDD22_MARK, TS_SDEN1_MARK, MSIOF0L_SS1_MARK, | ||
237 | D30_MARK, ED30_MARK, | ||
238 | LCDD23_MARK, TS_SCK1_MARK, MSIOF0L_SS2_MARK, | ||
239 | D31_MARK, ED31_MARK, | ||
240 | LCDDCK_MARK, LCDWR_MARK, DV_CKO_MARK, SIUAOSPD_MARK, | ||
241 | LCDRD_MARK, DACK2_MARK, MSIOF0L_RSYNC_MARK, | ||
242 | |||
243 | /* 49-5 */ | ||
244 | LCDHSYN_MARK, LCDCS_MARK, LCDCS2_MARK, DACK3_MARK, | ||
245 | LCDDISP_MARK, LCDRS_MARK, DREQ3_MARK, MSIOF0L_RSCK_MARK, | ||
246 | LCDCSYN_MARK, LCDCSYN2_MARK, DV_CKI_MARK, | ||
247 | LCDLCLK_MARK, DREQ1_MARK, MSIOF0L_RXD_MARK, | ||
248 | LCDDON_MARK, LCDDON2_MARK, DACK1_MARK, MSIOF0L_TXD_MARK, | ||
249 | VIO_DR0_MARK, VIO_DR1_MARK, VIO_DR2_MARK, VIO_DR3_MARK, | ||
250 | VIO_DR4_MARK, VIO_DR5_MARK, VIO_DR6_MARK, VIO_DR7_MARK, | ||
251 | VIO_VDR_MARK, VIO_HDR_MARK, | ||
252 | VIO_CLKR_MARK, VIO_CKOR_MARK, | ||
253 | SCIFA1_TXD_MARK, GPS_PGFA0_MARK, | ||
254 | SCIFA1_SCK_MARK, GPS_PGFA1_MARK, | ||
255 | SCIFA1_RTS_MARK, GPS_EPPSINMON_MARK, | ||
256 | SCIFA1_RXD_MARK, SCIFA1_CTS_MARK, | ||
257 | MSIOF1_TXD_MARK, SCIFA1_TXD2_MARK, GPS_TXD_MARK, | ||
258 | MSIOF1_TSYNC_MARK, SCIFA1_CTS2_MARK, I2C_SDA2_MARK, | ||
259 | MSIOF1_TSCK_MARK, SCIFA1_SCK2_MARK, | ||
260 | MSIOF1_RXD_MARK, SCIFA1_RXD2_MARK, GPS_RXD_MARK, | ||
261 | MSIOF1_RSCK_MARK, SCIFA1_RTS2_MARK, | ||
262 | MSIOF1_RSYNC_MARK, I2C_SCL2_MARK, | ||
263 | MSIOF1_MCK0_MARK, MSIOF1_MCK1_MARK, | ||
264 | MSIOF1_SS1_MARK, EDBGREQ3_MARK, | ||
265 | MSIOF1_SS2_MARK, | ||
266 | PORT236_IROUT_MARK, IRDA_OUT_MARK, | ||
267 | IRDA_IN_MARK, IRDA_FIRSEL_MARK, | ||
268 | TPU1TO0_MARK, TS_SPSYNC3_MARK, | ||
269 | TPU1TO1_MARK, TS_SDAT3_MARK, | ||
270 | TPU1TO2_MARK, TS_SDEN3_MARK, PORT241_MSIOF2_SS1_MARK, | ||
271 | TPU1TO3_MARK, PORT242_MSIOF2_TSCK_MARK, | ||
272 | M13_BSW_MARK, PORT243_MSIOF2_TSYNC_MARK, | ||
273 | M14_GSW_MARK, PORT244_MSIOF2_TXD_MARK, | ||
274 | PORT245_IROUT_MARK, M15_RSW_MARK, | ||
275 | SOUT3_MARK, SCIFA2_TXD1_MARK, | ||
276 | SIN3_MARK, SCIFA2_RXD1_MARK, | ||
277 | XRTS3_MARK, SCIFA2_RTS1_MARK, PORT248_MSIOF2_SS2_MARK, | ||
278 | XCTS3_MARK, SCIFA2_CTS1_MARK, PORT249_MSIOF2_RXD_MARK, | ||
279 | DINT_MARK, SCIFA2_SCK1_MARK, TS_SCK3_MARK, | ||
280 | SDHICLK0_MARK, TCK2_MARK, | ||
281 | SDHICD0_MARK, | ||
282 | SDHID0_0_MARK, TMS2_MARK, | ||
283 | SDHID0_1_MARK, TDO2_MARK, | ||
284 | SDHID0_2_MARK, TDI2_MARK, | ||
285 | SDHID0_3_MARK, RTCK2_MARK, | ||
286 | |||
287 | /* 49-6 */ | ||
288 | SDHICMD0_MARK, TRST2_MARK, | ||
289 | SDHIWP0_MARK, EDBGREQ2_MARK, | ||
290 | SDHICLK1_MARK, TCK3_MARK, | ||
291 | SDHID1_0_MARK, M11_SLCD_SO2_MARK, | ||
292 | TS_SPSYNC2_MARK, TMS3_MARK, | ||
293 | SDHID1_1_MARK, M9_SLCD_AO2_MARK, | ||
294 | TS_SDAT2_MARK, TDO3_MARK, | ||
295 | SDHID1_2_MARK, M10_SLCD_CK2_MARK, | ||
296 | TS_SDEN2_MARK, TDI3_MARK, | ||
297 | SDHID1_3_MARK, M12_SLCD_CE2_MARK, | ||
298 | TS_SCK2_MARK, RTCK3_MARK, | ||
299 | SDHICMD1_MARK, TRST3_MARK, | ||
300 | SDHICLK2_MARK, SCIFB_SCK_MARK, | ||
301 | SDHID2_0_MARK, SCIFB_TXD_MARK, | ||
302 | SDHID2_1_MARK, SCIFB_CTS_MARK, | ||
303 | SDHID2_2_MARK, SCIFB_RXD_MARK, | ||
304 | SDHID2_3_MARK, SCIFB_RTS_MARK, | ||
305 | SDHICMD2_MARK, | ||
306 | RESETOUTS_MARK, | ||
307 | DIVLOCK_MARK, | ||
308 | PINMUX_MARK_END, | ||
309 | }; | ||
310 | |||
311 | static pinmux_enum_t pinmux_data[] = { | ||
312 | |||
313 | /* specify valid pin states for each pin in GPIO mode */ | ||
314 | |||
315 | /* 49-1 (GPIO) */ | ||
316 | PORT_DATA_I_PD(0), | ||
317 | PORT_DATA_I_PU(1), PORT_DATA_I_PU(2), PORT_DATA_I_PU(3), | ||
318 | PORT_DATA_I_PU(4), PORT_DATA_I_PU(5), PORT_DATA_I_PU(6), | ||
319 | PORT_DATA_I_PU(7), PORT_DATA_I_PU(8), PORT_DATA_I_PU(9), | ||
320 | PORT_DATA_I_PU(10), PORT_DATA_I_PU(11), PORT_DATA_I_PU(12), | ||
321 | PORT_DATA_I_PU(13), | ||
322 | PORT_DATA_IO_PU_PD(14), PORT_DATA_IO_PU_PD(15), | ||
323 | PORT_DATA_O(16), PORT_DATA_O(17), PORT_DATA_O(18), PORT_DATA_O(19), | ||
324 | PORT_DATA_O(20), PORT_DATA_O(21), PORT_DATA_O(22), PORT_DATA_O(23), | ||
325 | PORT_DATA_O(24), PORT_DATA_O(25), PORT_DATA_O(26), | ||
326 | PORT_DATA_I_PD(27), PORT_DATA_I_PD(28), | ||
327 | PORT_DATA_O(29), PORT_DATA_O(30), PORT_DATA_O(31), PORT_DATA_O(32), | ||
328 | PORT_DATA_IO_PU(33), | ||
329 | PORT_DATA_O(34), | ||
330 | PORT_DATA_I_PU(35), | ||
331 | PORT_DATA_O(36), | ||
332 | PORT_DATA_I_PU_PD(37), | ||
333 | |||
334 | /* 49-2 (GPIO) */ | ||
335 | PORT_DATA_IO_PU_PD(38), | ||
336 | PORT_DATA_IO_PD(39), PORT_DATA_IO_PD(40), PORT_DATA_IO_PD(41), | ||
337 | PORT_DATA_O(42), PORT_DATA_O(43), PORT_DATA_O(44), PORT_DATA_O(45), | ||
338 | PORT_DATA_O(46), PORT_DATA_O(47), | ||
339 | PORT_DATA_I_PU_PD(48), PORT_DATA_I_PU_PD(49), PORT_DATA_I_PU_PD(50), | ||
340 | PORT_DATA_IO_PD(51), PORT_DATA_IO_PD(52), | ||
341 | PORT_DATA_O(53), | ||
342 | PORT_DATA_IO_PD(54), | ||
343 | PORT_DATA_I_PU_PD(55), | ||
344 | PORT_DATA_IO_PU_PD(56), | ||
345 | PORT_DATA_I_PU_PD(57), | ||
346 | PORT_DATA_IO_PU_PD(58), | ||
347 | PORT_DATA_O(59), PORT_DATA_O(60), PORT_DATA_O(61), PORT_DATA_O(62), | ||
348 | PORT_DATA_O(63), | ||
349 | PORT_DATA_I_PU(64), | ||
350 | PORT_DATA_O(65), PORT_DATA_O(66), PORT_DATA_O(67), PORT_DATA_O(68), | ||
351 | PORT_DATA_IO_PD(69), PORT_DATA_IO_PD(70), | ||
352 | PORT_DATA_I_PD(71), PORT_DATA_I_PD(72), PORT_DATA_I_PD(73), | ||
353 | PORT_DATA_I_PD(74), | ||
354 | PORT_DATA_IO_PU_PD(75), PORT_DATA_IO_PU_PD(76), | ||
355 | PORT_DATA_IO_PD(77), PORT_DATA_IO_PD(78), | ||
356 | PORT_DATA_O(79), | ||
357 | PORT_DATA_IO_PD(80), PORT_DATA_IO_PD(81), PORT_DATA_IO_PD(82), | ||
358 | PORT_DATA_IO_PU_PD(83), PORT_DATA_IO_PU_PD(84), | ||
359 | PORT_DATA_IO_PU_PD(85), PORT_DATA_IO_PU_PD(86), | ||
360 | PORT_DATA_I_PD(87), | ||
361 | PORT_DATA_IO_PU_PD(88), | ||
362 | PORT_DATA_I_PU_PD(89), PORT_DATA_I_PU_PD(90), | ||
363 | |||
364 | /* 49-3 (GPIO) */ | ||
365 | PORT_DATA_O(91), PORT_DATA_O(92), PORT_DATA_O(93), PORT_DATA_O(94), | ||
366 | PORT_DATA_I_PU_PD(95), | ||
367 | PORT_DATA_IO_PU_PD(96), PORT_DATA_IO_PU_PD(97), PORT_DATA_IO_PU_PD(98), | ||
368 | PORT_DATA_IO_PU_PD(99), PORT_DATA_IO_PU_PD(100), | ||
369 | PORT_DATA_IO(101), PORT_DATA_IO(102), PORT_DATA_IO(103), | ||
370 | PORT_DATA_IO_PD(104), PORT_DATA_IO_PD(105), PORT_DATA_IO_PD(106), | ||
371 | PORT_DATA_IO_PD(107), | ||
372 | PORT_DATA_IO_PU_PD(108), PORT_DATA_IO_PU_PD(109), | ||
373 | PORT_DATA_IO_PU_PD(110), PORT_DATA_IO_PU_PD(111), | ||
374 | PORT_DATA_IO_PU_PD(112), PORT_DATA_IO_PU_PD(113), | ||
375 | PORT_DATA_IO_PU_PD(114), | ||
376 | PORT_DATA_IO_PU(115), PORT_DATA_IO_PU(116), PORT_DATA_IO_PU(117), | ||
377 | PORT_DATA_IO_PU(118), PORT_DATA_IO_PU(119), PORT_DATA_IO_PU(120), | ||
378 | PORT_DATA_IO_PU(121), PORT_DATA_IO_PU(122), PORT_DATA_IO_PU(123), | ||
379 | PORT_DATA_IO_PU(124), PORT_DATA_IO_PU(125), PORT_DATA_IO_PU(126), | ||
380 | PORT_DATA_IO_PU(127), PORT_DATA_IO_PU(128), PORT_DATA_IO_PU(129), | ||
381 | PORT_DATA_IO_PU(130), | ||
382 | PORT_DATA_O(131), PORT_DATA_O(132), PORT_DATA_O(133), | ||
383 | PORT_DATA_IO_PU(134), | ||
384 | PORT_DATA_O(135), PORT_DATA_O(136), | ||
385 | PORT_DATA_I_PU_PD(137), | ||
386 | PORT_DATA_IO(138), | ||
387 | PORT_DATA_IO_PU_PD(139), | ||
388 | PORT_DATA_IO(140), PORT_DATA_IO(141), | ||
389 | PORT_DATA_I_PU(142), | ||
390 | PORT_DATA_O(143), PORT_DATA_O(144), | ||
391 | PORT_DATA_I_PU(145), | ||
392 | |||
393 | /* 49-4 (GPIO) */ | ||
394 | PORT_DATA_O(146), | ||
395 | PORT_DATA_I_PU_PD(147), | ||
396 | PORT_DATA_I_PD(148), PORT_DATA_I_PD(149), | ||
397 | PORT_DATA_IO_PD(150), PORT_DATA_IO_PD(151), PORT_DATA_IO_PD(152), | ||
398 | PORT_DATA_IO_PD(153), PORT_DATA_IO_PD(154), PORT_DATA_IO_PD(155), | ||
399 | PORT_DATA_IO_PD(156), PORT_DATA_IO_PD(157), PORT_DATA_IO_PD(158), | ||
400 | PORT_DATA_IO_PD(159), PORT_DATA_IO_PD(160), PORT_DATA_IO_PD(161), | ||
401 | PORT_DATA_IO_PD(162), PORT_DATA_IO_PD(163), PORT_DATA_IO_PD(164), | ||
402 | PORT_DATA_IO_PD(165), PORT_DATA_IO_PD(166), | ||
403 | PORT_DATA_IO_PU_PD(167), | ||
404 | PORT_DATA_O(168), | ||
405 | PORT_DATA_I_PD(169), PORT_DATA_I_PD(170), | ||
406 | PORT_DATA_O(171), | ||
407 | PORT_DATA_IO_PD(172), PORT_DATA_IO_PD(173), | ||
408 | PORT_DATA_O(174), | ||
409 | PORT_DATA_IO_PD(175), PORT_DATA_IO_PD(176), PORT_DATA_IO_PD(177), | ||
410 | PORT_DATA_IO_PD(178), PORT_DATA_IO_PD(179), PORT_DATA_IO_PD(180), | ||
411 | PORT_DATA_IO_PD(181), PORT_DATA_IO_PD(182), PORT_DATA_IO_PD(183), | ||
412 | PORT_DATA_IO_PD(184), PORT_DATA_IO_PD(185), PORT_DATA_IO_PD(186), | ||
413 | PORT_DATA_IO_PD(187), PORT_DATA_IO_PD(188), PORT_DATA_IO_PD(189), | ||
414 | PORT_DATA_IO_PD(190), PORT_DATA_IO_PD(191), PORT_DATA_IO_PD(192), | ||
415 | PORT_DATA_IO_PD(193), PORT_DATA_IO_PD(194), PORT_DATA_IO_PD(195), | ||
416 | PORT_DATA_IO_PD(196), PORT_DATA_IO_PD(197), PORT_DATA_IO_PD(198), | ||
417 | PORT_DATA_O(199), | ||
418 | PORT_DATA_IO_PD(200), | ||
419 | |||
420 | /* 49-5 (GPIO) */ | ||
421 | PORT_DATA_O(201), | ||
422 | PORT_DATA_IO_PD(202), PORT_DATA_IO_PD(203), | ||
423 | PORT_DATA_I(204), | ||
424 | PORT_DATA_O(205), | ||
425 | PORT_DATA_IO_PD(206), PORT_DATA_IO_PD(207), PORT_DATA_IO_PD(208), | ||
426 | PORT_DATA_IO_PD(209), PORT_DATA_IO_PD(210), PORT_DATA_IO_PD(211), | ||
427 | PORT_DATA_IO_PD(212), PORT_DATA_IO_PD(213), PORT_DATA_IO_PD(214), | ||
428 | PORT_DATA_IO_PD(215), PORT_DATA_IO_PD(216), | ||
429 | PORT_DATA_O(217), | ||
430 | PORT_DATA_I_PU_PD(218), PORT_DATA_I_PU_PD(219), | ||
431 | PORT_DATA_O(220), PORT_DATA_O(221), PORT_DATA_O(222), | ||
432 | PORT_DATA_I_PD(223), | ||
433 | PORT_DATA_I_PU_PD(224), | ||
434 | PORT_DATA_O(225), | ||
435 | PORT_DATA_IO_PD(226), | ||
436 | PORT_DATA_IO_PU_PD(227), | ||
437 | PORT_DATA_I_PD(228), | ||
438 | PORT_DATA_IO_PD(229), PORT_DATA_IO_PD(230), | ||
439 | PORT_DATA_I_PU_PD(231), PORT_DATA_I_PU_PD(232), | ||
440 | PORT_DATA_IO_PU_PD(233), PORT_DATA_IO_PU_PD(234), | ||
441 | PORT_DATA_I_PU_PD(235), | ||
442 | PORT_DATA_O(236), | ||
443 | PORT_DATA_I_PD(237), | ||
444 | PORT_DATA_IO_PU_PD(238), PORT_DATA_IO_PU_PD(239), | ||
445 | PORT_DATA_IO_PD(240), PORT_DATA_IO_PD(241), | ||
446 | PORT_DATA_IO_PD(242), PORT_DATA_IO_PD(243), | ||
447 | PORT_DATA_O(244), | ||
448 | PORT_DATA_IO_PU_PD(245), | ||
449 | PORT_DATA_O(246), | ||
450 | PORT_DATA_I_PD(247), | ||
451 | PORT_DATA_IO_PU_PD(248), | ||
452 | PORT_DATA_I_PU_PD(249), | ||
453 | PORT_DATA_IO_PD(250), PORT_DATA_IO_PD(251), | ||
454 | PORT_DATA_IO_PU_PD(252), PORT_DATA_IO_PU_PD(253), | ||
455 | PORT_DATA_IO_PU_PD(254), PORT_DATA_IO_PU_PD(255), | ||
456 | PORT_DATA_IO_PU_PD(256), | ||
457 | |||
458 | /* 49-6 (GPIO) */ | ||
459 | PORT_DATA_IO_PU_PD(257), PORT_DATA_IO_PU_PD(258), | ||
460 | PORT_DATA_IO_PD(259), | ||
461 | PORT_DATA_IO_PU(260), PORT_DATA_IO_PU(261), PORT_DATA_IO_PU(262), | ||
462 | PORT_DATA_IO_PU(263), PORT_DATA_IO_PU(264), | ||
463 | PORT_DATA_O(265), | ||
464 | PORT_DATA_IO_PU(266), PORT_DATA_IO_PU(267), PORT_DATA_IO_PU(268), | ||
465 | PORT_DATA_IO_PU(269), PORT_DATA_IO_PU(270), | ||
466 | PORT_DATA_O(271), | ||
467 | PORT_DATA_I_PD(272), | ||
468 | |||
469 | /* Special Pull-up / Pull-down Functions */ | ||
470 | PINMUX_DATA(PORT48_KEYIN0_PU_MARK, MSELBCR_MSEL2_1, | ||
471 | PORT48_FN2, PORT48_IN_PU), | ||
472 | PINMUX_DATA(PORT49_KEYIN1_PU_MARK, MSELBCR_MSEL2_1, | ||
473 | PORT49_FN2, PORT49_IN_PU), | ||
474 | PINMUX_DATA(PORT50_KEYIN2_PU_MARK, MSELBCR_MSEL2_1, | ||
475 | PORT50_FN2, PORT50_IN_PU), | ||
476 | PINMUX_DATA(PORT55_KEYIN3_PU_MARK, MSELBCR_MSEL2_1, | ||
477 | PORT55_FN2, PORT55_IN_PU), | ||
478 | PINMUX_DATA(PORT56_KEYIN4_PU_MARK, MSELBCR_MSEL2_1, | ||
479 | PORT56_FN2, PORT56_IN_PU), | ||
480 | PINMUX_DATA(PORT57_KEYIN5_PU_MARK, MSELBCR_MSEL2_1, | ||
481 | PORT57_FN2, PORT57_IN_PU), | ||
482 | PINMUX_DATA(PORT58_KEYIN6_PU_MARK, MSELBCR_MSEL2_1, | ||
483 | PORT58_FN2, PORT58_IN_PU), | ||
484 | |||
485 | /* 49-1 (FN) */ | ||
486 | PINMUX_DATA(VBUS0_MARK, PORT0_FN1), | ||
487 | PINMUX_DATA(CPORT0_MARK, PORT1_FN1), | ||
488 | PINMUX_DATA(CPORT1_MARK, PORT2_FN1), | ||
489 | PINMUX_DATA(CPORT2_MARK, PORT3_FN1), | ||
490 | PINMUX_DATA(CPORT3_MARK, PORT4_FN1), | ||
491 | PINMUX_DATA(CPORT4_MARK, PORT5_FN1), | ||
492 | PINMUX_DATA(CPORT5_MARK, PORT6_FN1), | ||
493 | PINMUX_DATA(CPORT6_MARK, PORT7_FN1), | ||
494 | PINMUX_DATA(CPORT7_MARK, PORT8_FN1), | ||
495 | PINMUX_DATA(CPORT8_MARK, PORT9_FN1), | ||
496 | PINMUX_DATA(CPORT9_MARK, PORT10_FN1), | ||
497 | PINMUX_DATA(CPORT10_MARK, PORT11_FN1), | ||
498 | PINMUX_DATA(CPORT11_MARK, PORT12_FN1), | ||
499 | PINMUX_DATA(SIN2_MARK, PORT12_FN2), | ||
500 | PINMUX_DATA(CPORT12_MARK, PORT13_FN1), | ||
501 | PINMUX_DATA(XCTS2_MARK, PORT13_FN2), | ||
502 | PINMUX_DATA(CPORT13_MARK, PORT14_FN1), | ||
503 | PINMUX_DATA(RFSPO4_MARK, PORT14_FN2), | ||
504 | PINMUX_DATA(CPORT14_MARK, PORT15_FN1), | ||
505 | PINMUX_DATA(RFSPO5_MARK, PORT15_FN2), | ||
506 | PINMUX_DATA(CPORT15_MARK, PORT16_FN1), | ||
507 | PINMUX_DATA(CPORT16_MARK, PORT17_FN1), | ||
508 | PINMUX_DATA(CPORT17_MARK, PORT18_FN1), | ||
509 | PINMUX_DATA(SOUT2_MARK, PORT18_FN2), | ||
510 | PINMUX_DATA(CPORT18_MARK, PORT19_FN1), | ||
511 | PINMUX_DATA(XRTS2_MARK, PORT19_FN1), | ||
512 | PINMUX_DATA(CPORT19_MARK, PORT20_FN1), | ||
513 | PINMUX_DATA(CPORT20_MARK, PORT21_FN1), | ||
514 | PINMUX_DATA(RFSPO6_MARK, PORT21_FN2), | ||
515 | PINMUX_DATA(CPORT21_MARK, PORT22_FN1), | ||
516 | PINMUX_DATA(STATUS0_MARK, PORT22_FN2), | ||
517 | PINMUX_DATA(CPORT22_MARK, PORT23_FN1), | ||
518 | PINMUX_DATA(STATUS1_MARK, PORT23_FN2), | ||
519 | PINMUX_DATA(CPORT23_MARK, PORT24_FN1), | ||
520 | PINMUX_DATA(STATUS2_MARK, PORT24_FN2), | ||
521 | PINMUX_DATA(RFSPO7_MARK, PORT24_FN3), | ||
522 | PINMUX_DATA(MPORT0_MARK, PORT25_FN1), | ||
523 | PINMUX_DATA(MPORT1_MARK, PORT26_FN1), | ||
524 | PINMUX_DATA(B_SYNLD1_MARK, PORT27_FN1), | ||
525 | PINMUX_DATA(B_SYNLD2_MARK, PORT28_FN1), | ||
526 | PINMUX_DATA(XMAINPS_MARK, PORT29_FN1), | ||
527 | PINMUX_DATA(XDIVPS_MARK, PORT30_FN1), | ||
528 | PINMUX_DATA(XIDRST_MARK, PORT31_FN1), | ||
529 | PINMUX_DATA(IDCLK_MARK, PORT32_FN1), | ||
530 | PINMUX_DATA(IDIO_MARK, PORT33_FN1), | ||
531 | PINMUX_DATA(SOUT1_MARK, PORT34_FN1), | ||
532 | PINMUX_DATA(SCIFA4_TXD_MARK, PORT34_FN2), | ||
533 | PINMUX_DATA(M02_BERDAT_MARK, PORT34_FN3), | ||
534 | PINMUX_DATA(SIN1_MARK, PORT35_FN1), | ||
535 | PINMUX_DATA(SCIFA4_RXD_MARK, PORT35_FN2), | ||
536 | PINMUX_DATA(XWUP_MARK, PORT35_FN3), | ||
537 | PINMUX_DATA(XRTS1_MARK, PORT36_FN1), | ||
538 | PINMUX_DATA(SCIFA4_RTS_MARK, PORT36_FN2), | ||
539 | PINMUX_DATA(M03_BERCLK_MARK, PORT36_FN3), | ||
540 | PINMUX_DATA(XCTS1_MARK, PORT37_FN1), | ||
541 | PINMUX_DATA(SCIFA4_CTS_MARK, PORT37_FN2), | ||
542 | |||
543 | /* 49-2 (FN) */ | ||
544 | PINMUX_DATA(HSU_IQ_AGC6_MARK, PORT38_FN1), | ||
545 | PINMUX_DATA(MFG2_IN2_MARK, PORT38_FN2), | ||
546 | PINMUX_DATA(MSIOF2_MCK0_MARK, PORT38_FN3), | ||
547 | PINMUX_DATA(HSU_IQ_AGC5_MARK, PORT39_FN1), | ||
548 | PINMUX_DATA(MFG2_IN1_MARK, PORT39_FN2), | ||
549 | PINMUX_DATA(MSIOF2_MCK1_MARK, PORT39_FN3), | ||
550 | PINMUX_DATA(HSU_IQ_AGC4_MARK, PORT40_FN1), | ||
551 | PINMUX_DATA(MSIOF2_RSYNC_MARK, PORT40_FN3), | ||
552 | PINMUX_DATA(HSU_IQ_AGC3_MARK, PORT41_FN1), | ||
553 | PINMUX_DATA(MFG2_OUT1_MARK, PORT41_FN2), | ||
554 | PINMUX_DATA(MSIOF2_RSCK_MARK, PORT41_FN3), | ||
555 | PINMUX_DATA(HSU_IQ_AGC2_MARK, PORT42_FN1), | ||
556 | PINMUX_DATA(PORT42_KEYOUT0_MARK, MSELBCR_MSEL2_1, PORT42_FN2), | ||
557 | PINMUX_DATA(HSU_IQ_AGC1_MARK, PORT43_FN1), | ||
558 | PINMUX_DATA(PORT43_KEYOUT1_MARK, MSELBCR_MSEL2_1, PORT43_FN2), | ||
559 | PINMUX_DATA(HSU_IQ_AGC0_MARK, PORT44_FN1), | ||
560 | PINMUX_DATA(PORT44_KEYOUT2_MARK, MSELBCR_MSEL2_1, PORT44_FN2), | ||
561 | PINMUX_DATA(HSU_IQ_AGC_ST_MARK, PORT45_FN1), | ||
562 | PINMUX_DATA(PORT45_KEYOUT3_MARK, MSELBCR_MSEL2_1, PORT45_FN2), | ||
563 | PINMUX_DATA(HSU_IQ_PDO_MARK, PORT46_FN1), | ||
564 | PINMUX_DATA(PORT46_KEYOUT4_MARK, MSELBCR_MSEL2_1, PORT46_FN2), | ||
565 | PINMUX_DATA(HSU_IQ_PYO_MARK, PORT47_FN1), | ||
566 | PINMUX_DATA(PORT47_KEYOUT5_MARK, MSELBCR_MSEL2_1, PORT47_FN2), | ||
567 | PINMUX_DATA(HSU_EN_TXMUX_G3MO_MARK, PORT48_FN1), | ||
568 | PINMUX_DATA(PORT48_KEYIN0_MARK, MSELBCR_MSEL2_1, PORT48_FN2), | ||
569 | PINMUX_DATA(HSU_I_TXMUX_G3MO_MARK, PORT49_FN1), | ||
570 | PINMUX_DATA(PORT49_KEYIN1_MARK, MSELBCR_MSEL2_1, PORT49_FN2), | ||
571 | PINMUX_DATA(HSU_Q_TXMUX_G3MO_MARK, PORT50_FN1), | ||
572 | PINMUX_DATA(PORT50_KEYIN2_MARK, MSELBCR_MSEL2_1, PORT50_FN2), | ||
573 | PINMUX_DATA(HSU_SYO_MARK, PORT51_FN1), | ||
574 | PINMUX_DATA(PORT51_MSIOF2_TSYNC_MARK, PORT51_FN2), | ||
575 | PINMUX_DATA(HSU_SDO_MARK, PORT52_FN1), | ||
576 | PINMUX_DATA(PORT52_MSIOF2_TSCK_MARK, PORT52_FN2), | ||
577 | PINMUX_DATA(HSU_TGTTI_G3MO_MARK, PORT53_FN1), | ||
578 | PINMUX_DATA(PORT53_MSIOF2_TXD_MARK, PORT53_FN2), | ||
579 | PINMUX_DATA(B_TIME_STAMP_MARK, PORT54_FN1), | ||
580 | PINMUX_DATA(PORT54_MSIOF2_RXD_MARK, PORT54_FN2), | ||
581 | PINMUX_DATA(HSU_SDI_MARK, PORT55_FN1), | ||
582 | PINMUX_DATA(PORT55_KEYIN3_MARK, MSELBCR_MSEL2_1, PORT55_FN2), | ||
583 | PINMUX_DATA(HSU_SCO_MARK, PORT56_FN1), | ||
584 | PINMUX_DATA(PORT56_KEYIN4_MARK, MSELBCR_MSEL2_1, PORT56_FN2), | ||
585 | PINMUX_DATA(HSU_DREQ_MARK, PORT57_FN1), | ||
586 | PINMUX_DATA(PORT57_KEYIN5_MARK, MSELBCR_MSEL2_1, PORT57_FN2), | ||
587 | PINMUX_DATA(HSU_DACK_MARK, PORT58_FN1), | ||
588 | PINMUX_DATA(PORT58_KEYIN6_MARK, MSELBCR_MSEL2_1, PORT58_FN2), | ||
589 | PINMUX_DATA(HSU_CLK61M_MARK, PORT59_FN1), | ||
590 | PINMUX_DATA(PORT59_MSIOF2_SS1_MARK, PORT59_FN2), | ||
591 | PINMUX_DATA(HSU_XRST_MARK, PORT60_FN1), | ||
592 | PINMUX_DATA(PORT60_MSIOF2_SS2_MARK, PORT60_FN2), | ||
593 | PINMUX_DATA(PCMCLKO_MARK, PORT61_FN1), | ||
594 | PINMUX_DATA(SYNC8KO_MARK, PORT62_FN1), | ||
595 | PINMUX_DATA(DNPCM_A_MARK, PORT63_FN1), | ||
596 | PINMUX_DATA(UPPCM_A_MARK, PORT64_FN1), | ||
597 | PINMUX_DATA(XTALB1L_MARK, PORT65_FN1), | ||
598 | PINMUX_DATA(GPS_AGC1_MARK, PORT66_FN1), | ||
599 | PINMUX_DATA(SCIFA0_RTS_MARK, PORT66_FN2), | ||
600 | PINMUX_DATA(GPS_AGC2_MARK, PORT67_FN1), | ||
601 | PINMUX_DATA(SCIFA0_SCK_MARK, PORT67_FN2), | ||
602 | PINMUX_DATA(GPS_AGC3_MARK, PORT68_FN1), | ||
603 | PINMUX_DATA(SCIFA0_TXD_MARK, PORT68_FN2), | ||
604 | PINMUX_DATA(GPS_AGC4_MARK, PORT69_FN1), | ||
605 | PINMUX_DATA(SCIFA0_RXD_MARK, PORT69_FN2), | ||
606 | PINMUX_DATA(GPS_PWRD_MARK, PORT70_FN1), | ||
607 | PINMUX_DATA(SCIFA0_CTS_MARK, PORT70_FN2), | ||
608 | PINMUX_DATA(GPS_IM_MARK, PORT71_FN1), | ||
609 | PINMUX_DATA(GPS_IS_MARK, PORT72_FN1), | ||
610 | PINMUX_DATA(GPS_QM_MARK, PORT73_FN1), | ||
611 | PINMUX_DATA(GPS_QS_MARK, PORT74_FN1), | ||
612 | PINMUX_DATA(SIUBOMC_MARK, PORT75_FN1), | ||
613 | PINMUX_DATA(TPU2TO0_MARK, PORT75_FN3), | ||
614 | PINMUX_DATA(SIUCKB_MARK, PORT76_FN1), | ||
615 | PINMUX_DATA(TPU2TO1_MARK, PORT76_FN3), | ||
616 | PINMUX_DATA(SIUBOLR_MARK, PORT77_FN1), | ||
617 | PINMUX_DATA(BBIF2_TSYNC_MARK, PORT77_FN2), | ||
618 | PINMUX_DATA(TPU2TO2_MARK, PORT77_FN3), | ||
619 | PINMUX_DATA(SIUBOBT_MARK, PORT78_FN1), | ||
620 | PINMUX_DATA(BBIF2_TSCK_MARK, PORT78_FN2), | ||
621 | PINMUX_DATA(TPU2TO3_MARK, PORT78_FN3), | ||
622 | PINMUX_DATA(SIUBOSLD_MARK, PORT79_FN1), | ||
623 | PINMUX_DATA(BBIF2_TXD_MARK, PORT79_FN2), | ||
624 | PINMUX_DATA(TPU3TO0_MARK, PORT79_FN3), | ||
625 | PINMUX_DATA(SIUBILR_MARK, PORT80_FN1), | ||
626 | PINMUX_DATA(TPU3TO1_MARK, PORT80_FN3), | ||
627 | PINMUX_DATA(SIUBIBT_MARK, PORT81_FN1), | ||
628 | PINMUX_DATA(TPU3TO2_MARK, PORT81_FN3), | ||
629 | PINMUX_DATA(SIUBISLD_MARK, PORT82_FN1), | ||
630 | PINMUX_DATA(TPU3TO3_MARK, PORT82_FN3), | ||
631 | PINMUX_DATA(NMI_MARK, PORT83_FN1), | ||
632 | PINMUX_DATA(TPU4TO0_MARK, PORT83_FN3), | ||
633 | PINMUX_DATA(DNPCM_M_MARK, PORT84_FN1), | ||
634 | PINMUX_DATA(TPU4TO1_MARK, PORT84_FN3), | ||
635 | PINMUX_DATA(TPU4TO2_MARK, PORT85_FN3), | ||
636 | PINMUX_DATA(TPU4TO3_MARK, PORT86_FN3), | ||
637 | PINMUX_DATA(IRQ_TMPB_MARK, PORT87_FN1), | ||
638 | PINMUX_DATA(PWEN_MARK, PORT88_FN1), | ||
639 | PINMUX_DATA(MFG1_OUT1_MARK, PORT88_FN2), | ||
640 | PINMUX_DATA(OVCN_MARK, PORT89_FN1), | ||
641 | PINMUX_DATA(MFG1_IN1_MARK, PORT89_FN2), | ||
642 | PINMUX_DATA(OVCN2_MARK, PORT90_FN1), | ||
643 | PINMUX_DATA(MFG1_IN2_MARK, PORT90_FN2), | ||
644 | |||
645 | /* 49-3 (FN) */ | ||
646 | PINMUX_DATA(RFSPO1_MARK, PORT91_FN1), | ||
647 | PINMUX_DATA(RFSPO2_MARK, PORT92_FN1), | ||
648 | PINMUX_DATA(RFSPO3_MARK, PORT93_FN1), | ||
649 | PINMUX_DATA(PORT93_VIO_CKO2_MARK, PORT93_FN2), | ||
650 | PINMUX_DATA(USBTERM_MARK, PORT94_FN1), | ||
651 | PINMUX_DATA(EXTLP_MARK, PORT94_FN2), | ||
652 | PINMUX_DATA(IDIN_MARK, PORT95_FN1), | ||
653 | PINMUX_DATA(SCIFA5_CTS_MARK, PORT96_FN1), | ||
654 | PINMUX_DATA(MFG0_IN1_MARK, PORT96_FN2), | ||
655 | PINMUX_DATA(SCIFA5_RTS_MARK, PORT97_FN1), | ||
656 | PINMUX_DATA(MFG0_IN2_MARK, PORT97_FN2), | ||
657 | PINMUX_DATA(SCIFA5_RXD_MARK, PORT98_FN1), | ||
658 | PINMUX_DATA(SCIFA5_TXD_MARK, PORT99_FN1), | ||
659 | PINMUX_DATA(SCIFA5_SCK_MARK, PORT100_FN1), | ||
660 | PINMUX_DATA(MFG0_OUT1_MARK, PORT100_FN2), | ||
661 | PINMUX_DATA(A0_EA0_MARK, PORT101_FN1), | ||
662 | PINMUX_DATA(BS_MARK, PORT101_FN2), | ||
663 | PINMUX_DATA(A14_EA14_MARK, PORT102_FN1), | ||
664 | PINMUX_DATA(PORT102_KEYOUT0_MARK, MSELBCR_MSEL2_0, PORT102_FN2), | ||
665 | PINMUX_DATA(A15_EA15_MARK, PORT103_FN1), | ||
666 | PINMUX_DATA(PORT103_KEYOUT1_MARK, MSELBCR_MSEL2_0, PORT103_FN2), | ||
667 | PINMUX_DATA(DV_CLKOL_MARK, PORT103_FN3), | ||
668 | PINMUX_DATA(A16_EA16_MARK, PORT104_FN1), | ||
669 | PINMUX_DATA(PORT104_KEYOUT2_MARK, MSELBCR_MSEL2_0, PORT104_FN2), | ||
670 | PINMUX_DATA(DV_VSYNCL_MARK, PORT104_FN3), | ||
671 | PINMUX_DATA(MSIOF0_SS1_MARK, PORT104_FN4), | ||
672 | PINMUX_DATA(A17_EA17_MARK, PORT105_FN1), | ||
673 | PINMUX_DATA(PORT105_KEYOUT3_MARK, MSELBCR_MSEL2_0, PORT105_FN2), | ||
674 | PINMUX_DATA(DV_HSYNCL_MARK, PORT105_FN3), | ||
675 | PINMUX_DATA(MSIOF0_TSYNC_MARK, PORT105_FN4), | ||
676 | PINMUX_DATA(A18_EA18_MARK, PORT106_FN1), | ||
677 | PINMUX_DATA(PORT106_KEYOUT4_MARK, MSELBCR_MSEL2_0, PORT106_FN2), | ||
678 | PINMUX_DATA(DV_DL0_MARK, PORT106_FN3), | ||
679 | PINMUX_DATA(MSIOF0_TSCK_MARK, PORT106_FN4), | ||
680 | PINMUX_DATA(A19_EA19_MARK, PORT107_FN1), | ||
681 | PINMUX_DATA(PORT107_KEYOUT5_MARK, MSELBCR_MSEL2_0, PORT107_FN2), | ||
682 | PINMUX_DATA(DV_DL1_MARK, PORT107_FN3), | ||
683 | PINMUX_DATA(MSIOF0_TXD_MARK, PORT107_FN4), | ||
684 | PINMUX_DATA(A20_EA20_MARK, PORT108_FN1), | ||
685 | PINMUX_DATA(PORT108_KEYIN0_MARK, MSELBCR_MSEL2_0, PORT108_FN2), | ||
686 | PINMUX_DATA(DV_DL2_MARK, PORT108_FN3), | ||
687 | PINMUX_DATA(MSIOF0_RSCK_MARK, PORT108_FN4), | ||
688 | PINMUX_DATA(A21_EA21_MARK, PORT109_FN1), | ||
689 | PINMUX_DATA(PORT109_KEYIN1_MARK, MSELBCR_MSEL2_0, PORT109_FN2), | ||
690 | PINMUX_DATA(DV_DL3_MARK, PORT109_FN3), | ||
691 | PINMUX_DATA(MSIOF0_RSYNC_MARK, PORT109_FN4), | ||
692 | PINMUX_DATA(A22_EA22_MARK, PORT110_FN1), | ||
693 | PINMUX_DATA(PORT110_KEYIN2_MARK, MSELBCR_MSEL2_0, PORT110_FN2), | ||
694 | PINMUX_DATA(DV_DL4_MARK, PORT110_FN3), | ||
695 | PINMUX_DATA(MSIOF0_MCK0_MARK, PORT110_FN4), | ||
696 | PINMUX_DATA(A23_EA23_MARK, PORT111_FN1), | ||
697 | PINMUX_DATA(PORT111_KEYIN3_MARK, MSELBCR_MSEL2_0, PORT111_FN2), | ||
698 | PINMUX_DATA(DV_DL5_MARK, PORT111_FN3), | ||
699 | PINMUX_DATA(MSIOF0_MCK1_MARK, PORT111_FN4), | ||
700 | PINMUX_DATA(A24_EA24_MARK, PORT112_FN1), | ||
701 | PINMUX_DATA(PORT112_KEYIN4_MARK, MSELBCR_MSEL2_0, PORT112_FN2), | ||
702 | PINMUX_DATA(DV_DL6_MARK, PORT112_FN3), | ||
703 | PINMUX_DATA(MSIOF0_RXD_MARK, PORT112_FN4), | ||
704 | PINMUX_DATA(A25_EA25_MARK, PORT113_FN1), | ||
705 | PINMUX_DATA(PORT113_KEYIN5_MARK, MSELBCR_MSEL2_0, PORT113_FN2), | ||
706 | PINMUX_DATA(DV_DL7_MARK, PORT113_FN3), | ||
707 | PINMUX_DATA(MSIOF0_SS2_MARK, PORT113_FN4), | ||
708 | PINMUX_DATA(A26_MARK, PORT114_FN1), | ||
709 | PINMUX_DATA(PORT113_KEYIN6_MARK, MSELBCR_MSEL2_0, PORT114_FN2), | ||
710 | PINMUX_DATA(DV_CLKIL_MARK, PORT114_FN3), | ||
711 | PINMUX_DATA(D0_ED0_NAF0_MARK, PORT115_FN1), | ||
712 | PINMUX_DATA(D1_ED1_NAF1_MARK, PORT116_FN1), | ||
713 | PINMUX_DATA(D2_ED2_NAF2_MARK, PORT117_FN1), | ||
714 | PINMUX_DATA(D3_ED3_NAF3_MARK, PORT118_FN1), | ||
715 | PINMUX_DATA(D4_ED4_NAF4_MARK, PORT119_FN1), | ||
716 | PINMUX_DATA(D5_ED5_NAF5_MARK, PORT120_FN1), | ||
717 | PINMUX_DATA(D6_ED6_NAF6_MARK, PORT121_FN1), | ||
718 | PINMUX_DATA(D7_ED7_NAF7_MARK, PORT122_FN1), | ||
719 | PINMUX_DATA(D8_ED8_NAF8_MARK, PORT123_FN1), | ||
720 | PINMUX_DATA(D9_ED9_NAF9_MARK, PORT124_FN1), | ||
721 | PINMUX_DATA(D10_ED10_NAF10_MARK, PORT125_FN1), | ||
722 | PINMUX_DATA(D11_ED11_NAF11_MARK, PORT126_FN1), | ||
723 | PINMUX_DATA(D12_ED12_NAF12_MARK, PORT127_FN1), | ||
724 | PINMUX_DATA(D13_ED13_NAF13_MARK, PORT128_FN1), | ||
725 | PINMUX_DATA(D14_ED14_NAF14_MARK, PORT129_FN1), | ||
726 | PINMUX_DATA(D15_ED15_NAF15_MARK, PORT130_FN1), | ||
727 | PINMUX_DATA(CS4_MARK, PORT131_FN1), | ||
728 | PINMUX_DATA(CS5A_MARK, PORT132_FN1), | ||
729 | PINMUX_DATA(CS5B_MARK, PORT133_FN1), | ||
730 | PINMUX_DATA(FCE1_MARK, PORT133_FN2), | ||
731 | PINMUX_DATA(CS6B_MARK, PORT134_FN1), | ||
732 | PINMUX_DATA(XCS2_MARK, PORT134_FN2), | ||
733 | PINMUX_DATA(FCE0_MARK, PORT135_FN1), | ||
734 | PINMUX_DATA(CS6A_MARK, PORT136_FN1), | ||
735 | PINMUX_DATA(DACK0_MARK, PORT136_FN2), | ||
736 | PINMUX_DATA(WAIT_MARK, PORT137_FN1), | ||
737 | PINMUX_DATA(DREQ0_MARK, PORT137_FN2), | ||
738 | PINMUX_DATA(RD_XRD_MARK, PORT138_FN1), | ||
739 | PINMUX_DATA(A27_MARK, PORT139_FN1), | ||
740 | PINMUX_DATA(RDWR_XWE_MARK, PORT139_FN2), | ||
741 | PINMUX_DATA(WE0_XWR0_FWE_MARK, PORT140_FN1), | ||
742 | PINMUX_DATA(WE1_XWR1_MARK, PORT141_FN1), | ||
743 | PINMUX_DATA(FRB_MARK, PORT142_FN1), | ||
744 | PINMUX_DATA(CKO_MARK, PORT143_FN1), | ||
745 | PINMUX_DATA(NBRSTOUT_MARK, PORT144_FN1), | ||
746 | PINMUX_DATA(NBRST_MARK, PORT145_FN1), | ||
747 | |||
748 | /* 49-4 (FN) */ | ||
749 | PINMUX_DATA(RFSPO0_MARK, PORT146_FN1), | ||
750 | PINMUX_DATA(PORT146_VIO_CKO2_MARK, PORT146_FN2), | ||
751 | PINMUX_DATA(TSTMD_MARK, PORT147_FN1), | ||
752 | PINMUX_DATA(VIO_VD_MARK, PORT148_FN1), | ||
753 | PINMUX_DATA(VIO_HD_MARK, PORT149_FN1), | ||
754 | PINMUX_DATA(VIO_D0_MARK, PORT150_FN1), | ||
755 | PINMUX_DATA(VIO_D1_MARK, PORT151_FN1), | ||
756 | PINMUX_DATA(VIO_D2_MARK, PORT152_FN1), | ||
757 | PINMUX_DATA(VIO_D3_MARK, PORT153_FN1), | ||
758 | PINMUX_DATA(VIO_D4_MARK, PORT154_FN1), | ||
759 | PINMUX_DATA(VIO_D5_MARK, PORT155_FN1), | ||
760 | PINMUX_DATA(VIO_D6_MARK, PORT156_FN1), | ||
761 | PINMUX_DATA(VIO_D7_MARK, PORT157_FN1), | ||
762 | PINMUX_DATA(VIO_D8_MARK, PORT158_FN1), | ||
763 | PINMUX_DATA(VIO_D9_MARK, PORT159_FN1), | ||
764 | PINMUX_DATA(VIO_D10_MARK, PORT160_FN1), | ||
765 | PINMUX_DATA(VIO_D11_MARK, PORT161_FN1), | ||
766 | PINMUX_DATA(VIO_D12_MARK, PORT162_FN1), | ||
767 | PINMUX_DATA(VIO_D13_MARK, PORT163_FN1), | ||
768 | PINMUX_DATA(VIO_D14_MARK, PORT164_FN1), | ||
769 | PINMUX_DATA(VIO_D15_MARK, PORT165_FN1), | ||
770 | PINMUX_DATA(VIO_CLK_MARK, PORT166_FN1), | ||
771 | PINMUX_DATA(VIO_FIELD_MARK, PORT167_FN1), | ||
772 | PINMUX_DATA(VIO_CKO_MARK, PORT168_FN1), | ||
773 | PINMUX_DATA(MFG3_IN1_MARK, PORT169_FN2), | ||
774 | PINMUX_DATA(MFG3_IN2_MARK, PORT170_FN2), | ||
775 | PINMUX_DATA(M9_SLCD_A01_MARK, PORT171_FN1), | ||
776 | PINMUX_DATA(MFG3_OUT1_MARK, PORT171_FN2), | ||
777 | PINMUX_DATA(TPU0TO0_MARK, PORT171_FN3), | ||
778 | PINMUX_DATA(M10_SLCD_CK1_MARK, PORT172_FN1), | ||
779 | PINMUX_DATA(MFG4_IN1_MARK, PORT172_FN2), | ||
780 | PINMUX_DATA(TPU0TO1_MARK, PORT172_FN3), | ||
781 | PINMUX_DATA(M11_SLCD_SO1_MARK, PORT173_FN1), | ||
782 | PINMUX_DATA(MFG4_IN2_MARK, PORT173_FN2), | ||
783 | PINMUX_DATA(TPU0TO2_MARK, PORT173_FN3), | ||
784 | PINMUX_DATA(M12_SLCD_CE1_MARK, PORT174_FN1), | ||
785 | PINMUX_DATA(MFG4_OUT1_MARK, PORT174_FN2), | ||
786 | PINMUX_DATA(TPU0TO3_MARK, PORT174_FN3), | ||
787 | PINMUX_DATA(LCDD0_MARK, PORT175_FN1), | ||
788 | PINMUX_DATA(PORT175_KEYOUT0_MARK, PORT175_FN2), | ||
789 | PINMUX_DATA(DV_D0_MARK, PORT175_FN3), | ||
790 | PINMUX_DATA(SIUCKA_MARK, PORT175_FN4), | ||
791 | PINMUX_DATA(MFG0_OUT2_MARK, PORT175_FN5), | ||
792 | PINMUX_DATA(LCDD1_MARK, PORT176_FN1), | ||
793 | PINMUX_DATA(PORT176_KEYOUT1_MARK, PORT176_FN2), | ||
794 | PINMUX_DATA(DV_D1_MARK, PORT176_FN3), | ||
795 | PINMUX_DATA(SIUAOLR_MARK, PORT176_FN4), | ||
796 | PINMUX_DATA(BBIF2_TSYNC1_MARK, PORT176_FN5), | ||
797 | PINMUX_DATA(LCDD2_MARK, PORT177_FN1), | ||
798 | PINMUX_DATA(PORT177_KEYOUT2_MARK, PORT177_FN2), | ||
799 | PINMUX_DATA(DV_D2_MARK, PORT177_FN3), | ||
800 | PINMUX_DATA(SIUAOBT_MARK, PORT177_FN4), | ||
801 | PINMUX_DATA(BBIF2_TSCK1_MARK, PORT177_FN5), | ||
802 | PINMUX_DATA(LCDD3_MARK, PORT178_FN1), | ||
803 | PINMUX_DATA(PORT178_KEYOUT3_MARK, PORT178_FN2), | ||
804 | PINMUX_DATA(DV_D3_MARK, PORT178_FN3), | ||
805 | PINMUX_DATA(SIUAOSLD_MARK, PORT178_FN4), | ||
806 | PINMUX_DATA(BBIF2_TXD1_MARK, PORT178_FN5), | ||
807 | PINMUX_DATA(LCDD4_MARK, PORT179_FN1), | ||
808 | PINMUX_DATA(PORT179_KEYOUT4_MARK, PORT179_FN2), | ||
809 | PINMUX_DATA(DV_D4_MARK, PORT179_FN3), | ||
810 | PINMUX_DATA(SIUAISPD_MARK, PORT179_FN4), | ||
811 | PINMUX_DATA(MFG1_OUT2_MARK, PORT179_FN5), | ||
812 | PINMUX_DATA(LCDD5_MARK, PORT180_FN1), | ||
813 | PINMUX_DATA(PORT180_KEYOUT5_MARK, PORT180_FN2), | ||
814 | PINMUX_DATA(DV_D5_MARK, PORT180_FN3), | ||
815 | PINMUX_DATA(SIUAILR_MARK, PORT180_FN4), | ||
816 | PINMUX_DATA(MFG2_OUT2_MARK, PORT180_FN5), | ||
817 | PINMUX_DATA(LCDD6_MARK, PORT181_FN1), | ||
818 | PINMUX_DATA(DV_D6_MARK, PORT181_FN3), | ||
819 | PINMUX_DATA(SIUAIBT_MARK, PORT181_FN4), | ||
820 | PINMUX_DATA(MFG3_OUT2_MARK, PORT181_FN5), | ||
821 | PINMUX_DATA(XWR2_MARK, PORT181_FN7), | ||
822 | PINMUX_DATA(LCDD7_MARK, PORT182_FN1), | ||
823 | PINMUX_DATA(DV_D7_MARK, PORT182_FN3), | ||
824 | PINMUX_DATA(SIUAISLD_MARK, PORT182_FN4), | ||
825 | PINMUX_DATA(MFG4_OUT2_MARK, PORT182_FN5), | ||
826 | PINMUX_DATA(XWR3_MARK, PORT182_FN7), | ||
827 | PINMUX_DATA(LCDD8_MARK, PORT183_FN1), | ||
828 | PINMUX_DATA(DV_D8_MARK, PORT183_FN3), | ||
829 | PINMUX_DATA(D16_MARK, PORT183_FN6), | ||
830 | PINMUX_DATA(ED16_MARK, PORT183_FN7), | ||
831 | PINMUX_DATA(LCDD9_MARK, PORT184_FN1), | ||
832 | PINMUX_DATA(DV_D9_MARK, PORT184_FN3), | ||
833 | PINMUX_DATA(D17_MARK, PORT184_FN6), | ||
834 | PINMUX_DATA(ED17_MARK, PORT184_FN7), | ||
835 | PINMUX_DATA(LCDD10_MARK, PORT185_FN1), | ||
836 | PINMUX_DATA(DV_D10_MARK, PORT185_FN3), | ||
837 | PINMUX_DATA(D18_MARK, PORT185_FN6), | ||
838 | PINMUX_DATA(ED18_MARK, PORT185_FN7), | ||
839 | PINMUX_DATA(LCDD11_MARK, PORT186_FN1), | ||
840 | PINMUX_DATA(DV_D11_MARK, PORT186_FN3), | ||
841 | PINMUX_DATA(D19_MARK, PORT186_FN6), | ||
842 | PINMUX_DATA(ED19_MARK, PORT186_FN7), | ||
843 | PINMUX_DATA(LCDD12_MARK, PORT187_FN1), | ||
844 | PINMUX_DATA(DV_D12_MARK, PORT187_FN3), | ||
845 | PINMUX_DATA(D20_MARK, PORT187_FN6), | ||
846 | PINMUX_DATA(ED20_MARK, PORT187_FN7), | ||
847 | PINMUX_DATA(LCDD13_MARK, PORT188_FN1), | ||
848 | PINMUX_DATA(DV_D13_MARK, PORT188_FN3), | ||
849 | PINMUX_DATA(D21_MARK, PORT188_FN6), | ||
850 | PINMUX_DATA(ED21_MARK, PORT188_FN7), | ||
851 | PINMUX_DATA(LCDD14_MARK, PORT189_FN1), | ||
852 | PINMUX_DATA(DV_D14_MARK, PORT189_FN3), | ||
853 | PINMUX_DATA(D22_MARK, PORT189_FN6), | ||
854 | PINMUX_DATA(ED22_MARK, PORT189_FN7), | ||
855 | PINMUX_DATA(LCDD15_MARK, PORT190_FN1), | ||
856 | PINMUX_DATA(DV_D15_MARK, PORT190_FN3), | ||
857 | PINMUX_DATA(D23_MARK, PORT190_FN6), | ||
858 | PINMUX_DATA(ED23_MARK, PORT190_FN7), | ||
859 | PINMUX_DATA(LCDD16_MARK, PORT191_FN1), | ||
860 | PINMUX_DATA(DV_HSYNC_MARK, PORT191_FN3), | ||
861 | PINMUX_DATA(D24_MARK, PORT191_FN6), | ||
862 | PINMUX_DATA(ED24_MARK, PORT191_FN7), | ||
863 | PINMUX_DATA(LCDD17_MARK, PORT192_FN1), | ||
864 | PINMUX_DATA(DV_VSYNC_MARK, PORT192_FN3), | ||
865 | PINMUX_DATA(D25_MARK, PORT192_FN6), | ||
866 | PINMUX_DATA(ED25_MARK, PORT192_FN7), | ||
867 | PINMUX_DATA(LCDD18_MARK, PORT193_FN1), | ||
868 | PINMUX_DATA(DREQ2_MARK, PORT193_FN2), | ||
869 | PINMUX_DATA(MSIOF0L_TSCK_MARK, PORT193_FN5), | ||
870 | PINMUX_DATA(D26_MARK, PORT193_FN6), | ||
871 | PINMUX_DATA(ED26_MARK, PORT193_FN7), | ||
872 | PINMUX_DATA(LCDD19_MARK, PORT194_FN1), | ||
873 | PINMUX_DATA(MSIOF0L_TSYNC_MARK, PORT194_FN5), | ||
874 | PINMUX_DATA(D27_MARK, PORT194_FN6), | ||
875 | PINMUX_DATA(ED27_MARK, PORT194_FN7), | ||
876 | PINMUX_DATA(LCDD20_MARK, PORT195_FN1), | ||
877 | PINMUX_DATA(TS_SPSYNC1_MARK, PORT195_FN2), | ||
878 | PINMUX_DATA(MSIOF0L_MCK0_MARK, PORT195_FN5), | ||
879 | PINMUX_DATA(D28_MARK, PORT195_FN6), | ||
880 | PINMUX_DATA(ED28_MARK, PORT195_FN7), | ||
881 | PINMUX_DATA(LCDD21_MARK, PORT196_FN1), | ||
882 | PINMUX_DATA(TS_SDAT1_MARK, PORT196_FN2), | ||
883 | PINMUX_DATA(MSIOF0L_MCK1_MARK, PORT196_FN5), | ||
884 | PINMUX_DATA(D29_MARK, PORT196_FN6), | ||
885 | PINMUX_DATA(ED29_MARK, PORT196_FN7), | ||
886 | PINMUX_DATA(LCDD22_MARK, PORT197_FN1), | ||
887 | PINMUX_DATA(TS_SDEN1_MARK, PORT197_FN2), | ||
888 | PINMUX_DATA(MSIOF0L_SS1_MARK, PORT197_FN5), | ||
889 | PINMUX_DATA(D30_MARK, PORT197_FN6), | ||
890 | PINMUX_DATA(ED30_MARK, PORT197_FN7), | ||
891 | PINMUX_DATA(LCDD23_MARK, PORT198_FN1), | ||
892 | PINMUX_DATA(TS_SCK1_MARK, PORT198_FN2), | ||
893 | PINMUX_DATA(MSIOF0L_SS2_MARK, PORT198_FN5), | ||
894 | PINMUX_DATA(D31_MARK, PORT198_FN6), | ||
895 | PINMUX_DATA(ED31_MARK, PORT198_FN7), | ||
896 | PINMUX_DATA(LCDDCK_MARK, PORT199_FN1), | ||
897 | PINMUX_DATA(LCDWR_MARK, PORT199_FN2), | ||
898 | PINMUX_DATA(DV_CKO_MARK, PORT199_FN3), | ||
899 | PINMUX_DATA(SIUAOSPD_MARK, PORT199_FN4), | ||
900 | PINMUX_DATA(LCDRD_MARK, PORT200_FN1), | ||
901 | PINMUX_DATA(DACK2_MARK, PORT200_FN2), | ||
902 | PINMUX_DATA(MSIOF0L_RSYNC_MARK, PORT200_FN5), | ||
903 | |||
904 | /* 49-5 (FN) */ | ||
905 | PINMUX_DATA(LCDHSYN_MARK, PORT201_FN1), | ||
906 | PINMUX_DATA(LCDCS_MARK, PORT201_FN2), | ||
907 | PINMUX_DATA(LCDCS2_MARK, PORT201_FN3), | ||
908 | PINMUX_DATA(DACK3_MARK, PORT201_FN4), | ||
909 | PINMUX_DATA(LCDDISP_MARK, PORT202_FN1), | ||
910 | PINMUX_DATA(LCDRS_MARK, PORT202_FN2), | ||
911 | PINMUX_DATA(DREQ3_MARK, PORT202_FN4), | ||
912 | PINMUX_DATA(MSIOF0L_RSCK_MARK, PORT202_FN5), | ||
913 | PINMUX_DATA(LCDCSYN_MARK, PORT203_FN1), | ||
914 | PINMUX_DATA(LCDCSYN2_MARK, PORT203_FN2), | ||
915 | PINMUX_DATA(DV_CKI_MARK, PORT203_FN3), | ||
916 | PINMUX_DATA(LCDLCLK_MARK, PORT204_FN1), | ||
917 | PINMUX_DATA(DREQ1_MARK, PORT204_FN3), | ||
918 | PINMUX_DATA(MSIOF0L_RXD_MARK, PORT204_FN5), | ||
919 | PINMUX_DATA(LCDDON_MARK, PORT205_FN1), | ||
920 | PINMUX_DATA(LCDDON2_MARK, PORT205_FN2), | ||
921 | PINMUX_DATA(DACK1_MARK, PORT205_FN3), | ||
922 | PINMUX_DATA(MSIOF0L_TXD_MARK, PORT205_FN5), | ||
923 | PINMUX_DATA(VIO_DR0_MARK, PORT206_FN1), | ||
924 | PINMUX_DATA(VIO_DR1_MARK, PORT207_FN1), | ||
925 | PINMUX_DATA(VIO_DR2_MARK, PORT208_FN1), | ||
926 | PINMUX_DATA(VIO_DR3_MARK, PORT209_FN1), | ||
927 | PINMUX_DATA(VIO_DR4_MARK, PORT210_FN1), | ||
928 | PINMUX_DATA(VIO_DR5_MARK, PORT211_FN1), | ||
929 | PINMUX_DATA(VIO_DR6_MARK, PORT212_FN1), | ||
930 | PINMUX_DATA(VIO_DR7_MARK, PORT213_FN1), | ||
931 | PINMUX_DATA(VIO_VDR_MARK, PORT214_FN1), | ||
932 | PINMUX_DATA(VIO_HDR_MARK, PORT215_FN1), | ||
933 | PINMUX_DATA(VIO_CLKR_MARK, PORT216_FN1), | ||
934 | PINMUX_DATA(VIO_CKOR_MARK, PORT217_FN1), | ||
935 | PINMUX_DATA(SCIFA1_TXD_MARK, PORT220_FN2), | ||
936 | PINMUX_DATA(GPS_PGFA0_MARK, PORT220_FN3), | ||
937 | PINMUX_DATA(SCIFA1_SCK_MARK, PORT221_FN2), | ||
938 | PINMUX_DATA(GPS_PGFA1_MARK, PORT221_FN3), | ||
939 | PINMUX_DATA(SCIFA1_RTS_MARK, PORT222_FN2), | ||
940 | PINMUX_DATA(GPS_EPPSINMON_MARK, PORT222_FN3), | ||
941 | PINMUX_DATA(SCIFA1_RXD_MARK, PORT223_FN2), | ||
942 | PINMUX_DATA(SCIFA1_CTS_MARK, PORT224_FN2), | ||
943 | PINMUX_DATA(MSIOF1_TXD_MARK, PORT225_FN1), | ||
944 | PINMUX_DATA(SCIFA1_TXD2_MARK, PORT225_FN2), | ||
945 | PINMUX_DATA(GPS_TXD_MARK, PORT225_FN3), | ||
946 | PINMUX_DATA(MSIOF1_TSYNC_MARK, PORT226_FN1), | ||
947 | PINMUX_DATA(SCIFA1_CTS2_MARK, PORT226_FN2), | ||
948 | PINMUX_DATA(I2C_SDA2_MARK, PORT226_FN3), | ||
949 | PINMUX_DATA(MSIOF1_TSCK_MARK, PORT227_FN1), | ||
950 | PINMUX_DATA(SCIFA1_SCK2_MARK, PORT227_FN2), | ||
951 | PINMUX_DATA(MSIOF1_RXD_MARK, PORT228_FN1), | ||
952 | PINMUX_DATA(SCIFA1_RXD2_MARK, PORT228_FN2), | ||
953 | PINMUX_DATA(GPS_RXD_MARK, PORT228_FN3), | ||
954 | PINMUX_DATA(MSIOF1_RSCK_MARK, PORT229_FN1), | ||
955 | PINMUX_DATA(SCIFA1_RTS2_MARK, PORT229_FN2), | ||
956 | PINMUX_DATA(MSIOF1_RSYNC_MARK, PORT230_FN1), | ||
957 | PINMUX_DATA(I2C_SCL2_MARK, PORT230_FN3), | ||
958 | PINMUX_DATA(MSIOF1_MCK0_MARK, PORT231_FN1), | ||
959 | PINMUX_DATA(MSIOF1_MCK1_MARK, PORT232_FN1), | ||
960 | PINMUX_DATA(MSIOF1_SS1_MARK, PORT233_FN1), | ||
961 | PINMUX_DATA(EDBGREQ3_MARK, PORT233_FN2), | ||
962 | PINMUX_DATA(MSIOF1_SS2_MARK, PORT234_FN1), | ||
963 | PINMUX_DATA(PORT236_IROUT_MARK, PORT236_FN1), | ||
964 | PINMUX_DATA(IRDA_OUT_MARK, PORT236_FN2), | ||
965 | PINMUX_DATA(IRDA_IN_MARK, PORT237_FN2), | ||
966 | PINMUX_DATA(IRDA_FIRSEL_MARK, PORT238_FN1), | ||
967 | PINMUX_DATA(TPU1TO0_MARK, PORT239_FN3), | ||
968 | PINMUX_DATA(TS_SPSYNC3_MARK, PORT239_FN4), | ||
969 | PINMUX_DATA(TPU1TO1_MARK, PORT240_FN3), | ||
970 | PINMUX_DATA(TS_SDAT3_MARK, PORT240_FN4), | ||
971 | PINMUX_DATA(TPU1TO2_MARK, PORT241_FN3), | ||
972 | PINMUX_DATA(TS_SDEN3_MARK, PORT241_FN4), | ||
973 | PINMUX_DATA(PORT241_MSIOF2_SS1_MARK, PORT241_FN5), | ||
974 | PINMUX_DATA(TPU1TO3_MARK, PORT242_FN3), | ||
975 | PINMUX_DATA(PORT242_MSIOF2_TSCK_MARK, PORT242_FN5), | ||
976 | PINMUX_DATA(M13_BSW_MARK, PORT243_FN2), | ||
977 | PINMUX_DATA(PORT243_MSIOF2_TSYNC_MARK, PORT243_FN5), | ||
978 | PINMUX_DATA(M14_GSW_MARK, PORT244_FN2), | ||
979 | PINMUX_DATA(PORT244_MSIOF2_TXD_MARK, PORT244_FN5), | ||
980 | PINMUX_DATA(PORT245_IROUT_MARK, PORT245_FN1), | ||
981 | PINMUX_DATA(M15_RSW_MARK, PORT245_FN2), | ||
982 | PINMUX_DATA(SOUT3_MARK, PORT246_FN1), | ||
983 | PINMUX_DATA(SCIFA2_TXD1_MARK, PORT246_FN2), | ||
984 | PINMUX_DATA(SIN3_MARK, PORT247_FN1), | ||
985 | PINMUX_DATA(SCIFA2_RXD1_MARK, PORT247_FN2), | ||
986 | PINMUX_DATA(XRTS3_MARK, PORT248_FN1), | ||
987 | PINMUX_DATA(SCIFA2_RTS1_MARK, PORT248_FN2), | ||
988 | PINMUX_DATA(PORT248_MSIOF2_SS2_MARK, PORT248_FN5), | ||
989 | PINMUX_DATA(XCTS3_MARK, PORT249_FN1), | ||
990 | PINMUX_DATA(SCIFA2_CTS1_MARK, PORT249_FN2), | ||
991 | PINMUX_DATA(PORT249_MSIOF2_RXD_MARK, PORT249_FN5), | ||
992 | PINMUX_DATA(DINT_MARK, PORT250_FN1), | ||
993 | PINMUX_DATA(SCIFA2_SCK1_MARK, PORT250_FN2), | ||
994 | PINMUX_DATA(TS_SCK3_MARK, PORT250_FN4), | ||
995 | PINMUX_DATA(SDHICLK0_MARK, PORT251_FN1), | ||
996 | PINMUX_DATA(TCK2_MARK, PORT251_FN2), | ||
997 | PINMUX_DATA(SDHICD0_MARK, PORT252_FN1), | ||
998 | PINMUX_DATA(SDHID0_0_MARK, PORT253_FN1), | ||
999 | PINMUX_DATA(TMS2_MARK, PORT253_FN2), | ||
1000 | PINMUX_DATA(SDHID0_1_MARK, PORT254_FN1), | ||
1001 | PINMUX_DATA(TDO2_MARK, PORT254_FN2), | ||
1002 | PINMUX_DATA(SDHID0_2_MARK, PORT255_FN1), | ||
1003 | PINMUX_DATA(TDI2_MARK, PORT255_FN2), | ||
1004 | PINMUX_DATA(SDHID0_3_MARK, PORT256_FN1), | ||
1005 | PINMUX_DATA(RTCK2_MARK, PORT256_FN2), | ||
1006 | |||
1007 | /* 49-6 (FN) */ | ||
1008 | PINMUX_DATA(SDHICMD0_MARK, PORT257_FN1), | ||
1009 | PINMUX_DATA(TRST2_MARK, PORT257_FN2), | ||
1010 | PINMUX_DATA(SDHIWP0_MARK, PORT258_FN1), | ||
1011 | PINMUX_DATA(EDBGREQ2_MARK, PORT258_FN2), | ||
1012 | PINMUX_DATA(SDHICLK1_MARK, PORT259_FN1), | ||
1013 | PINMUX_DATA(TCK3_MARK, PORT259_FN4), | ||
1014 | PINMUX_DATA(SDHID1_0_MARK, PORT260_FN1), | ||
1015 | PINMUX_DATA(M11_SLCD_SO2_MARK, PORT260_FN2), | ||
1016 | PINMUX_DATA(TS_SPSYNC2_MARK, PORT260_FN3), | ||
1017 | PINMUX_DATA(TMS3_MARK, PORT260_FN4), | ||
1018 | PINMUX_DATA(SDHID1_1_MARK, PORT261_FN1), | ||
1019 | PINMUX_DATA(M9_SLCD_AO2_MARK, PORT261_FN2), | ||
1020 | PINMUX_DATA(TS_SDAT2_MARK, PORT261_FN3), | ||
1021 | PINMUX_DATA(TDO3_MARK, PORT261_FN4), | ||
1022 | PINMUX_DATA(SDHID1_2_MARK, PORT262_FN1), | ||
1023 | PINMUX_DATA(M10_SLCD_CK2_MARK, PORT262_FN2), | ||
1024 | PINMUX_DATA(TS_SDEN2_MARK, PORT262_FN3), | ||
1025 | PINMUX_DATA(TDI3_MARK, PORT262_FN4), | ||
1026 | PINMUX_DATA(SDHID1_3_MARK, PORT263_FN1), | ||
1027 | PINMUX_DATA(M12_SLCD_CE2_MARK, PORT263_FN2), | ||
1028 | PINMUX_DATA(TS_SCK2_MARK, PORT263_FN3), | ||
1029 | PINMUX_DATA(RTCK3_MARK, PORT263_FN4), | ||
1030 | PINMUX_DATA(SDHICMD1_MARK, PORT264_FN1), | ||
1031 | PINMUX_DATA(TRST3_MARK, PORT264_FN4), | ||
1032 | PINMUX_DATA(SDHICLK2_MARK, PORT265_FN1), | ||
1033 | PINMUX_DATA(SCIFB_SCK_MARK, PORT265_FN2), | ||
1034 | PINMUX_DATA(SDHID2_0_MARK, PORT266_FN1), | ||
1035 | PINMUX_DATA(SCIFB_TXD_MARK, PORT266_FN2), | ||
1036 | PINMUX_DATA(SDHID2_1_MARK, PORT267_FN1), | ||
1037 | PINMUX_DATA(SCIFB_CTS_MARK, PORT267_FN2), | ||
1038 | PINMUX_DATA(SDHID2_2_MARK, PORT268_FN1), | ||
1039 | PINMUX_DATA(SCIFB_RXD_MARK, PORT268_FN2), | ||
1040 | PINMUX_DATA(SDHID2_3_MARK, PORT269_FN1), | ||
1041 | PINMUX_DATA(SCIFB_RTS_MARK, PORT269_FN2), | ||
1042 | PINMUX_DATA(SDHICMD2_MARK, PORT270_FN1), | ||
1043 | PINMUX_DATA(RESETOUTS_MARK, PORT271_FN1), | ||
1044 | PINMUX_DATA(DIVLOCK_MARK, PORT272_FN1), | ||
1045 | }; | ||
1046 | |||
1047 | static struct pinmux_gpio pinmux_gpios[] = { | ||
1048 | /* 49-1 -> 49-6 (GPIO) */ | ||
1049 | GPIO_PORT_ALL(), | ||
1050 | |||
1051 | /* Special Pull-up / Pull-down Functions */ | ||
1052 | GPIO_FN(PORT48_KEYIN0_PU), GPIO_FN(PORT49_KEYIN1_PU), | ||
1053 | GPIO_FN(PORT50_KEYIN2_PU), GPIO_FN(PORT55_KEYIN3_PU), | ||
1054 | GPIO_FN(PORT56_KEYIN4_PU), GPIO_FN(PORT57_KEYIN5_PU), | ||
1055 | GPIO_FN(PORT58_KEYIN6_PU), | ||
1056 | |||
1057 | /* 49-1 (FN) */ | ||
1058 | GPIO_FN(VBUS0), GPIO_FN(CPORT0), GPIO_FN(CPORT1), GPIO_FN(CPORT2), | ||
1059 | GPIO_FN(CPORT3), GPIO_FN(CPORT4), GPIO_FN(CPORT5), GPIO_FN(CPORT6), | ||
1060 | GPIO_FN(CPORT7), GPIO_FN(CPORT8), GPIO_FN(CPORT9), GPIO_FN(CPORT10), | ||
1061 | GPIO_FN(CPORT11), GPIO_FN(SIN2), GPIO_FN(CPORT12), GPIO_FN(XCTS2), | ||
1062 | GPIO_FN(CPORT13), GPIO_FN(RFSPO4), GPIO_FN(CPORT14), GPIO_FN(RFSPO5), | ||
1063 | GPIO_FN(CPORT15), GPIO_FN(CPORT16), GPIO_FN(CPORT17), GPIO_FN(SOUT2), | ||
1064 | GPIO_FN(CPORT18), GPIO_FN(XRTS2), GPIO_FN(CPORT19), GPIO_FN(CPORT20), | ||
1065 | GPIO_FN(RFSPO6), GPIO_FN(CPORT21), GPIO_FN(STATUS0), GPIO_FN(CPORT22), | ||
1066 | GPIO_FN(STATUS1), GPIO_FN(CPORT23), GPIO_FN(STATUS2), GPIO_FN(RFSPO7), | ||
1067 | GPIO_FN(MPORT0), GPIO_FN(MPORT1), GPIO_FN(B_SYNLD1), GPIO_FN(B_SYNLD2), | ||
1068 | GPIO_FN(XMAINPS), GPIO_FN(XDIVPS), GPIO_FN(XIDRST), GPIO_FN(IDCLK), | ||
1069 | GPIO_FN(IDIO), GPIO_FN(SOUT1), GPIO_FN(SCIFA4_TXD), | ||
1070 | GPIO_FN(M02_BERDAT), GPIO_FN(SIN1), GPIO_FN(SCIFA4_RXD), GPIO_FN(XWUP), | ||
1071 | GPIO_FN(XRTS1), GPIO_FN(SCIFA4_RTS), GPIO_FN(M03_BERCLK), | ||
1072 | GPIO_FN(XCTS1), GPIO_FN(SCIFA4_CTS), | ||
1073 | |||
1074 | /* 49-2 (FN) */ | ||
1075 | GPIO_FN(HSU_IQ_AGC6), GPIO_FN(MFG2_IN2), GPIO_FN(MSIOF2_MCK0), | ||
1076 | GPIO_FN(HSU_IQ_AGC5), GPIO_FN(MFG2_IN1), GPIO_FN(MSIOF2_MCK1), | ||
1077 | GPIO_FN(HSU_IQ_AGC4), GPIO_FN(MSIOF2_RSYNC), | ||
1078 | GPIO_FN(HSU_IQ_AGC3), GPIO_FN(MFG2_OUT1), GPIO_FN(MSIOF2_RSCK), | ||
1079 | GPIO_FN(HSU_IQ_AGC2), GPIO_FN(PORT42_KEYOUT0), | ||
1080 | GPIO_FN(HSU_IQ_AGC1), GPIO_FN(PORT43_KEYOUT1), | ||
1081 | GPIO_FN(HSU_IQ_AGC0), GPIO_FN(PORT44_KEYOUT2), | ||
1082 | GPIO_FN(HSU_IQ_AGC_ST), GPIO_FN(PORT45_KEYOUT3), | ||
1083 | GPIO_FN(HSU_IQ_PDO), GPIO_FN(PORT46_KEYOUT4), | ||
1084 | GPIO_FN(HSU_IQ_PYO), GPIO_FN(PORT47_KEYOUT5), | ||
1085 | GPIO_FN(HSU_EN_TXMUX_G3MO), GPIO_FN(PORT48_KEYIN0), | ||
1086 | GPIO_FN(HSU_I_TXMUX_G3MO), GPIO_FN(PORT49_KEYIN1), | ||
1087 | GPIO_FN(HSU_Q_TXMUX_G3MO), GPIO_FN(PORT50_KEYIN2), | ||
1088 | GPIO_FN(HSU_SYO), GPIO_FN(PORT51_MSIOF2_TSYNC), | ||
1089 | GPIO_FN(HSU_SDO), GPIO_FN(PORT52_MSIOF2_TSCK), | ||
1090 | GPIO_FN(HSU_TGTTI_G3MO), GPIO_FN(PORT53_MSIOF2_TXD), | ||
1091 | GPIO_FN(B_TIME_STAMP), GPIO_FN(PORT54_MSIOF2_RXD), | ||
1092 | GPIO_FN(HSU_SDI), GPIO_FN(PORT55_KEYIN3), | ||
1093 | GPIO_FN(HSU_SCO), GPIO_FN(PORT56_KEYIN4), | ||
1094 | GPIO_FN(HSU_DREQ), GPIO_FN(PORT57_KEYIN5), | ||
1095 | GPIO_FN(HSU_DACK), GPIO_FN(PORT58_KEYIN6), | ||
1096 | GPIO_FN(HSU_CLK61M), GPIO_FN(PORT59_MSIOF2_SS1), | ||
1097 | GPIO_FN(HSU_XRST), GPIO_FN(PORT60_MSIOF2_SS2), | ||
1098 | GPIO_FN(PCMCLKO), GPIO_FN(SYNC8KO), GPIO_FN(DNPCM_A), GPIO_FN(UPPCM_A), | ||
1099 | GPIO_FN(XTALB1L), | ||
1100 | GPIO_FN(GPS_AGC1), GPIO_FN(SCIFA0_RTS), | ||
1101 | GPIO_FN(GPS_AGC2), GPIO_FN(SCIFA0_SCK), | ||
1102 | GPIO_FN(GPS_AGC3), GPIO_FN(SCIFA0_TXD), | ||
1103 | GPIO_FN(GPS_AGC4), GPIO_FN(SCIFA0_RXD), | ||
1104 | GPIO_FN(GPS_PWRD), GPIO_FN(SCIFA0_CTS), | ||
1105 | GPIO_FN(GPS_IM), GPIO_FN(GPS_IS), GPIO_FN(GPS_QM), GPIO_FN(GPS_QS), | ||
1106 | GPIO_FN(SIUBOMC), GPIO_FN(TPU2TO0), | ||
1107 | GPIO_FN(SIUCKB), GPIO_FN(TPU2TO1), | ||
1108 | GPIO_FN(SIUBOLR), GPIO_FN(BBIF2_TSYNC), GPIO_FN(TPU2TO2), | ||
1109 | GPIO_FN(SIUBOBT), GPIO_FN(BBIF2_TSCK), GPIO_FN(TPU2TO3), | ||
1110 | GPIO_FN(SIUBOSLD), GPIO_FN(BBIF2_TXD), GPIO_FN(TPU3TO0), | ||
1111 | GPIO_FN(SIUBILR), GPIO_FN(TPU3TO1), | ||
1112 | GPIO_FN(SIUBIBT), GPIO_FN(TPU3TO2), | ||
1113 | GPIO_FN(SIUBISLD), GPIO_FN(TPU3TO3), | ||
1114 | GPIO_FN(NMI), GPIO_FN(TPU4TO0), | ||
1115 | GPIO_FN(DNPCM_M), GPIO_FN(TPU4TO1), GPIO_FN(TPU4TO2), GPIO_FN(TPU4TO3), | ||
1116 | GPIO_FN(IRQ_TMPB), | ||
1117 | GPIO_FN(PWEN), GPIO_FN(MFG1_OUT1), | ||
1118 | GPIO_FN(OVCN), GPIO_FN(MFG1_IN1), | ||
1119 | GPIO_FN(OVCN2), GPIO_FN(MFG1_IN2), | ||
1120 | |||
1121 | /* 49-3 (FN) */ | ||
1122 | GPIO_FN(RFSPO1), GPIO_FN(RFSPO2), GPIO_FN(RFSPO3), | ||
1123 | GPIO_FN(PORT93_VIO_CKO2), | ||
1124 | GPIO_FN(USBTERM), GPIO_FN(EXTLP), GPIO_FN(IDIN), | ||
1125 | GPIO_FN(SCIFA5_CTS), GPIO_FN(MFG0_IN1), | ||
1126 | GPIO_FN(SCIFA5_RTS), GPIO_FN(MFG0_IN2), | ||
1127 | GPIO_FN(SCIFA5_RXD), | ||
1128 | GPIO_FN(SCIFA5_TXD), | ||
1129 | GPIO_FN(SCIFA5_SCK), GPIO_FN(MFG0_OUT1), | ||
1130 | GPIO_FN(A0_EA0), GPIO_FN(BS), | ||
1131 | GPIO_FN(A14_EA14), GPIO_FN(PORT102_KEYOUT0), | ||
1132 | GPIO_FN(A15_EA15), GPIO_FN(PORT103_KEYOUT1), GPIO_FN(DV_CLKOL), | ||
1133 | GPIO_FN(A16_EA16), GPIO_FN(PORT104_KEYOUT2), | ||
1134 | GPIO_FN(DV_VSYNCL), GPIO_FN(MSIOF0_SS1), | ||
1135 | GPIO_FN(A17_EA17), GPIO_FN(PORT105_KEYOUT3), | ||
1136 | GPIO_FN(DV_HSYNCL), GPIO_FN(MSIOF0_TSYNC), | ||
1137 | GPIO_FN(A18_EA18), GPIO_FN(PORT106_KEYOUT4), | ||
1138 | GPIO_FN(DV_DL0), GPIO_FN(MSIOF0_TSCK), | ||
1139 | GPIO_FN(A19_EA19), GPIO_FN(PORT107_KEYOUT5), | ||
1140 | GPIO_FN(DV_DL1), GPIO_FN(MSIOF0_TXD), | ||
1141 | GPIO_FN(A20_EA20), GPIO_FN(PORT108_KEYIN0), | ||
1142 | GPIO_FN(DV_DL2), GPIO_FN(MSIOF0_RSCK), | ||
1143 | GPIO_FN(A21_EA21), GPIO_FN(PORT109_KEYIN1), | ||
1144 | GPIO_FN(DV_DL3), GPIO_FN(MSIOF0_RSYNC), | ||
1145 | GPIO_FN(A22_EA22), GPIO_FN(PORT110_KEYIN2), | ||
1146 | GPIO_FN(DV_DL4), GPIO_FN(MSIOF0_MCK0), | ||
1147 | GPIO_FN(A23_EA23), GPIO_FN(PORT111_KEYIN3), | ||
1148 | GPIO_FN(DV_DL5), GPIO_FN(MSIOF0_MCK1), | ||
1149 | GPIO_FN(A24_EA24), GPIO_FN(PORT112_KEYIN4), | ||
1150 | GPIO_FN(DV_DL6), GPIO_FN(MSIOF0_RXD), | ||
1151 | GPIO_FN(A25_EA25), GPIO_FN(PORT113_KEYIN5), | ||
1152 | GPIO_FN(DV_DL7), GPIO_FN(MSIOF0_SS2), | ||
1153 | GPIO_FN(A26), GPIO_FN(PORT113_KEYIN6), GPIO_FN(DV_CLKIL), | ||
1154 | GPIO_FN(D0_ED0_NAF0), GPIO_FN(D1_ED1_NAF1), GPIO_FN(D2_ED2_NAF2), | ||
1155 | GPIO_FN(D3_ED3_NAF3), GPIO_FN(D4_ED4_NAF4), GPIO_FN(D5_ED5_NAF5), | ||
1156 | GPIO_FN(D6_ED6_NAF6), GPIO_FN(D7_ED7_NAF7), GPIO_FN(D8_ED8_NAF8), | ||
1157 | GPIO_FN(D9_ED9_NAF9), GPIO_FN(D10_ED10_NAF10), GPIO_FN(D11_ED11_NAF11), | ||
1158 | GPIO_FN(D12_ED12_NAF12), GPIO_FN(D13_ED13_NAF13), | ||
1159 | GPIO_FN(D14_ED14_NAF14), GPIO_FN(D15_ED15_NAF15), | ||
1160 | GPIO_FN(CS4), GPIO_FN(CS5A), GPIO_FN(CS5B), GPIO_FN(FCE1), | ||
1161 | GPIO_FN(CS6B), GPIO_FN(XCS2), GPIO_FN(FCE0), GPIO_FN(CS6A), | ||
1162 | GPIO_FN(DACK0), GPIO_FN(WAIT), GPIO_FN(DREQ0), GPIO_FN(RD_XRD), | ||
1163 | GPIO_FN(A27), GPIO_FN(RDWR_XWE), GPIO_FN(WE0_XWR0_FWE), | ||
1164 | GPIO_FN(WE1_XWR1), GPIO_FN(FRB), GPIO_FN(CKO), | ||
1165 | GPIO_FN(NBRSTOUT), GPIO_FN(NBRST), | ||
1166 | |||
1167 | /* 49-4 (FN) */ | ||
1168 | GPIO_FN(RFSPO0), GPIO_FN(PORT146_VIO_CKO2), GPIO_FN(TSTMD), | ||
1169 | GPIO_FN(VIO_VD), GPIO_FN(VIO_HD), | ||
1170 | GPIO_FN(VIO_D0), GPIO_FN(VIO_D1), GPIO_FN(VIO_D2), | ||
1171 | GPIO_FN(VIO_D3), GPIO_FN(VIO_D4), GPIO_FN(VIO_D5), | ||
1172 | GPIO_FN(VIO_D6), GPIO_FN(VIO_D7), GPIO_FN(VIO_D8), | ||
1173 | GPIO_FN(VIO_D9), GPIO_FN(VIO_D10), GPIO_FN(VIO_D11), | ||
1174 | GPIO_FN(VIO_D12), GPIO_FN(VIO_D13), GPIO_FN(VIO_D14), | ||
1175 | GPIO_FN(VIO_D15), GPIO_FN(VIO_CLK), GPIO_FN(VIO_FIELD), | ||
1176 | GPIO_FN(VIO_CKO), | ||
1177 | GPIO_FN(MFG3_IN1), GPIO_FN(MFG3_IN2), | ||
1178 | GPIO_FN(M9_SLCD_A01), GPIO_FN(MFG3_OUT1), GPIO_FN(TPU0TO0), | ||
1179 | GPIO_FN(M10_SLCD_CK1), GPIO_FN(MFG4_IN1), GPIO_FN(TPU0TO1), | ||
1180 | GPIO_FN(M11_SLCD_SO1), GPIO_FN(MFG4_IN2), GPIO_FN(TPU0TO2), | ||
1181 | GPIO_FN(M12_SLCD_CE1), GPIO_FN(MFG4_OUT1), GPIO_FN(TPU0TO3), | ||
1182 | GPIO_FN(LCDD0), GPIO_FN(PORT175_KEYOUT0), GPIO_FN(DV_D0), | ||
1183 | GPIO_FN(SIUCKA), GPIO_FN(MFG0_OUT2), | ||
1184 | GPIO_FN(LCDD1), GPIO_FN(PORT176_KEYOUT1), GPIO_FN(DV_D1), | ||
1185 | GPIO_FN(SIUAOLR), GPIO_FN(BBIF2_TSYNC1), | ||
1186 | GPIO_FN(LCDD2), GPIO_FN(PORT177_KEYOUT2), GPIO_FN(DV_D2), | ||
1187 | GPIO_FN(SIUAOBT), GPIO_FN(BBIF2_TSCK1), | ||
1188 | GPIO_FN(LCDD3), GPIO_FN(PORT178_KEYOUT3), GPIO_FN(DV_D3), | ||
1189 | GPIO_FN(SIUAOSLD), GPIO_FN(BBIF2_TXD1), | ||
1190 | GPIO_FN(LCDD4), GPIO_FN(PORT179_KEYOUT4), GPIO_FN(DV_D4), | ||
1191 | GPIO_FN(SIUAISPD), GPIO_FN(MFG1_OUT2), | ||
1192 | GPIO_FN(LCDD5), GPIO_FN(PORT180_KEYOUT5), GPIO_FN(DV_D5), | ||
1193 | GPIO_FN(SIUAILR), GPIO_FN(MFG2_OUT2), | ||
1194 | GPIO_FN(LCDD6), GPIO_FN(DV_D6), | ||
1195 | GPIO_FN(SIUAIBT), GPIO_FN(MFG3_OUT2), GPIO_FN(XWR2), | ||
1196 | GPIO_FN(LCDD7), GPIO_FN(DV_D7), | ||
1197 | GPIO_FN(SIUAISLD), GPIO_FN(MFG4_OUT2), GPIO_FN(XWR3), | ||
1198 | GPIO_FN(LCDD8), GPIO_FN(DV_D8), GPIO_FN(D16), GPIO_FN(ED16), | ||
1199 | GPIO_FN(LCDD9), GPIO_FN(DV_D9), GPIO_FN(D17), GPIO_FN(ED17), | ||
1200 | GPIO_FN(LCDD10), GPIO_FN(DV_D10), GPIO_FN(D18), GPIO_FN(ED18), | ||
1201 | GPIO_FN(LCDD11), GPIO_FN(DV_D11), GPIO_FN(D19), GPIO_FN(ED19), | ||
1202 | GPIO_FN(LCDD12), GPIO_FN(DV_D12), GPIO_FN(D20), GPIO_FN(ED20), | ||
1203 | GPIO_FN(LCDD13), GPIO_FN(DV_D13), GPIO_FN(D21), GPIO_FN(ED21), | ||
1204 | GPIO_FN(LCDD14), GPIO_FN(DV_D14), GPIO_FN(D22), GPIO_FN(ED22), | ||
1205 | GPIO_FN(LCDD15), GPIO_FN(DV_D15), GPIO_FN(D23), GPIO_FN(ED23), | ||
1206 | GPIO_FN(LCDD16), GPIO_FN(DV_HSYNC), GPIO_FN(D24), GPIO_FN(ED24), | ||
1207 | GPIO_FN(LCDD17), GPIO_FN(DV_VSYNC), GPIO_FN(D25), GPIO_FN(ED25), | ||
1208 | GPIO_FN(LCDD18), GPIO_FN(DREQ2), GPIO_FN(MSIOF0L_TSCK), | ||
1209 | GPIO_FN(D26), GPIO_FN(ED26), | ||
1210 | GPIO_FN(LCDD19), GPIO_FN(MSIOF0L_TSYNC), | ||
1211 | GPIO_FN(D27), GPIO_FN(ED27), | ||
1212 | GPIO_FN(LCDD20), GPIO_FN(TS_SPSYNC1), GPIO_FN(MSIOF0L_MCK0), | ||
1213 | GPIO_FN(D28), GPIO_FN(ED28), | ||
1214 | GPIO_FN(LCDD21), GPIO_FN(TS_SDAT1), GPIO_FN(MSIOF0L_MCK1), | ||
1215 | GPIO_FN(D29), GPIO_FN(ED29), | ||
1216 | GPIO_FN(LCDD22), GPIO_FN(TS_SDEN1), GPIO_FN(MSIOF0L_SS1), | ||
1217 | GPIO_FN(D30), GPIO_FN(ED30), | ||
1218 | GPIO_FN(LCDD23), GPIO_FN(TS_SCK1), GPIO_FN(MSIOF0L_SS2), | ||
1219 | GPIO_FN(D31), GPIO_FN(ED31), | ||
1220 | GPIO_FN(LCDDCK), GPIO_FN(LCDWR), GPIO_FN(DV_CKO), GPIO_FN(SIUAOSPD), | ||
1221 | GPIO_FN(LCDRD), GPIO_FN(DACK2), GPIO_FN(MSIOF0L_RSYNC), | ||
1222 | |||
1223 | /* 49-5 (FN) */ | ||
1224 | GPIO_FN(LCDHSYN), GPIO_FN(LCDCS), GPIO_FN(LCDCS2), GPIO_FN(DACK3), | ||
1225 | GPIO_FN(LCDDISP), GPIO_FN(LCDRS), GPIO_FN(DREQ3), GPIO_FN(MSIOF0L_RSCK), | ||
1226 | GPIO_FN(LCDCSYN), GPIO_FN(LCDCSYN2), GPIO_FN(DV_CKI), | ||
1227 | GPIO_FN(LCDLCLK), GPIO_FN(DREQ1), GPIO_FN(MSIOF0L_RXD), | ||
1228 | GPIO_FN(LCDDON), GPIO_FN(LCDDON2), GPIO_FN(DACK1), GPIO_FN(MSIOF0L_TXD), | ||
1229 | GPIO_FN(VIO_DR0), GPIO_FN(VIO_DR1), GPIO_FN(VIO_DR2), GPIO_FN(VIO_DR3), | ||
1230 | GPIO_FN(VIO_DR4), GPIO_FN(VIO_DR5), GPIO_FN(VIO_DR6), GPIO_FN(VIO_DR7), | ||
1231 | GPIO_FN(VIO_VDR), GPIO_FN(VIO_HDR), | ||
1232 | GPIO_FN(VIO_CLKR), GPIO_FN(VIO_CKOR), | ||
1233 | GPIO_FN(SCIFA1_TXD), GPIO_FN(GPS_PGFA0), | ||
1234 | GPIO_FN(SCIFA1_SCK), GPIO_FN(GPS_PGFA1), | ||
1235 | GPIO_FN(SCIFA1_RTS), GPIO_FN(GPS_EPPSINMON), | ||
1236 | GPIO_FN(SCIFA1_RXD), GPIO_FN(SCIFA1_CTS), | ||
1237 | GPIO_FN(MSIOF1_TXD), GPIO_FN(SCIFA1_TXD2), GPIO_FN(GPS_TXD), | ||
1238 | GPIO_FN(MSIOF1_TSYNC), GPIO_FN(SCIFA1_CTS2), GPIO_FN(I2C_SDA2), | ||
1239 | GPIO_FN(MSIOF1_TSCK), GPIO_FN(SCIFA1_SCK2), | ||
1240 | GPIO_FN(MSIOF1_RXD), GPIO_FN(SCIFA1_RXD2), GPIO_FN(GPS_RXD), | ||
1241 | GPIO_FN(MSIOF1_RSCK), GPIO_FN(SCIFA1_RTS2), | ||
1242 | GPIO_FN(MSIOF1_RSYNC), GPIO_FN(I2C_SCL2), | ||
1243 | GPIO_FN(MSIOF1_MCK0), GPIO_FN(MSIOF1_MCK1), | ||
1244 | GPIO_FN(MSIOF1_SS1), GPIO_FN(EDBGREQ3), | ||
1245 | GPIO_FN(MSIOF1_SS2), | ||
1246 | GPIO_FN(PORT236_IROUT), GPIO_FN(IRDA_OUT), | ||
1247 | GPIO_FN(IRDA_IN), GPIO_FN(IRDA_FIRSEL), | ||
1248 | GPIO_FN(TPU1TO0), GPIO_FN(TS_SPSYNC3), | ||
1249 | GPIO_FN(TPU1TO1), GPIO_FN(TS_SDAT3), | ||
1250 | GPIO_FN(TPU1TO2), GPIO_FN(TS_SDEN3), GPIO_FN(PORT241_MSIOF2_SS1), | ||
1251 | GPIO_FN(TPU1TO3), GPIO_FN(PORT242_MSIOF2_TSCK), | ||
1252 | GPIO_FN(M13_BSW), GPIO_FN(PORT243_MSIOF2_TSYNC), | ||
1253 | GPIO_FN(M14_GSW), GPIO_FN(PORT244_MSIOF2_TXD), | ||
1254 | GPIO_FN(PORT245_IROUT), GPIO_FN(M15_RSW), | ||
1255 | GPIO_FN(SOUT3), GPIO_FN(SCIFA2_TXD1), | ||
1256 | GPIO_FN(SIN3), GPIO_FN(SCIFA2_RXD1), | ||
1257 | GPIO_FN(XRTS3), GPIO_FN(SCIFA2_RTS1), GPIO_FN(PORT248_MSIOF2_SS2), | ||
1258 | GPIO_FN(XCTS3), GPIO_FN(SCIFA2_CTS1), GPIO_FN(PORT249_MSIOF2_RXD), | ||
1259 | GPIO_FN(DINT), GPIO_FN(SCIFA2_SCK1), GPIO_FN(TS_SCK3), | ||
1260 | GPIO_FN(SDHICLK0), GPIO_FN(TCK2), | ||
1261 | GPIO_FN(SDHICD0), | ||
1262 | GPIO_FN(SDHID0_0), GPIO_FN(TMS2), | ||
1263 | GPIO_FN(SDHID0_1), GPIO_FN(TDO2), | ||
1264 | GPIO_FN(SDHID0_2), GPIO_FN(TDI2), | ||
1265 | GPIO_FN(SDHID0_3), GPIO_FN(RTCK2), | ||
1266 | |||
1267 | /* 49-6 (FN) */ | ||
1268 | GPIO_FN(SDHICMD0), GPIO_FN(TRST2), | ||
1269 | GPIO_FN(SDHIWP0), GPIO_FN(EDBGREQ2), | ||
1270 | GPIO_FN(SDHICLK1), GPIO_FN(TCK3), | ||
1271 | GPIO_FN(SDHID1_0), GPIO_FN(M11_SLCD_SO2), | ||
1272 | GPIO_FN(TS_SPSYNC2), GPIO_FN(TMS3), | ||
1273 | GPIO_FN(SDHID1_1), GPIO_FN(M9_SLCD_AO2), | ||
1274 | GPIO_FN(TS_SDAT2), GPIO_FN(TDO3), | ||
1275 | GPIO_FN(SDHID1_2), GPIO_FN(M10_SLCD_CK2), | ||
1276 | GPIO_FN(TS_SDEN2), GPIO_FN(TDI3), | ||
1277 | GPIO_FN(SDHID1_3), GPIO_FN(M12_SLCD_CE2), | ||
1278 | GPIO_FN(TS_SCK2), GPIO_FN(RTCK3), | ||
1279 | GPIO_FN(SDHICMD1), GPIO_FN(TRST3), | ||
1280 | GPIO_FN(SDHICLK2), GPIO_FN(SCIFB_SCK), | ||
1281 | GPIO_FN(SDHID2_0), GPIO_FN(SCIFB_TXD), | ||
1282 | GPIO_FN(SDHID2_1), GPIO_FN(SCIFB_CTS), | ||
1283 | GPIO_FN(SDHID2_2), GPIO_FN(SCIFB_RXD), | ||
1284 | GPIO_FN(SDHID2_3), GPIO_FN(SCIFB_RTS), | ||
1285 | GPIO_FN(SDHICMD2), | ||
1286 | GPIO_FN(RESETOUTS), | ||
1287 | GPIO_FN(DIVLOCK), | ||
1288 | }; | ||
1289 | |||
1290 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | ||
1291 | PORTCR(0, 0xe6050000), /* PORT0CR */ | ||
1292 | PORTCR(1, 0xe6050001), /* PORT1CR */ | ||
1293 | PORTCR(2, 0xe6050002), /* PORT2CR */ | ||
1294 | PORTCR(3, 0xe6050003), /* PORT3CR */ | ||
1295 | PORTCR(4, 0xe6050004), /* PORT4CR */ | ||
1296 | PORTCR(5, 0xe6050005), /* PORT5CR */ | ||
1297 | PORTCR(6, 0xe6050006), /* PORT6CR */ | ||
1298 | PORTCR(7, 0xe6050007), /* PORT7CR */ | ||
1299 | PORTCR(8, 0xe6050008), /* PORT8CR */ | ||
1300 | PORTCR(9, 0xe6050009), /* PORT9CR */ | ||
1301 | |||
1302 | PORTCR(10, 0xe605000a), /* PORT10CR */ | ||
1303 | PORTCR(11, 0xe605000b), /* PORT11CR */ | ||
1304 | PORTCR(12, 0xe605000c), /* PORT12CR */ | ||
1305 | PORTCR(13, 0xe605000d), /* PORT13CR */ | ||
1306 | PORTCR(14, 0xe605000e), /* PORT14CR */ | ||
1307 | PORTCR(15, 0xe605000f), /* PORT15CR */ | ||
1308 | PORTCR(16, 0xe6050010), /* PORT16CR */ | ||
1309 | PORTCR(17, 0xe6050011), /* PORT17CR */ | ||
1310 | PORTCR(18, 0xe6050012), /* PORT18CR */ | ||
1311 | PORTCR(19, 0xe6050013), /* PORT19CR */ | ||
1312 | |||
1313 | PORTCR(20, 0xe6050014), /* PORT20CR */ | ||
1314 | PORTCR(21, 0xe6050015), /* PORT21CR */ | ||
1315 | PORTCR(22, 0xe6050016), /* PORT22CR */ | ||
1316 | PORTCR(23, 0xe6050017), /* PORT23CR */ | ||
1317 | PORTCR(24, 0xe6050018), /* PORT24CR */ | ||
1318 | PORTCR(25, 0xe6050019), /* PORT25CR */ | ||
1319 | PORTCR(26, 0xe605001a), /* PORT26CR */ | ||
1320 | PORTCR(27, 0xe605001b), /* PORT27CR */ | ||
1321 | PORTCR(28, 0xe605001c), /* PORT28CR */ | ||
1322 | PORTCR(29, 0xe605001d), /* PORT29CR */ | ||
1323 | |||
1324 | PORTCR(30, 0xe605001e), /* PORT30CR */ | ||
1325 | PORTCR(31, 0xe605001f), /* PORT31CR */ | ||
1326 | PORTCR(32, 0xe6050020), /* PORT32CR */ | ||
1327 | PORTCR(33, 0xe6050021), /* PORT33CR */ | ||
1328 | PORTCR(34, 0xe6050022), /* PORT34CR */ | ||
1329 | PORTCR(35, 0xe6050023), /* PORT35CR */ | ||
1330 | PORTCR(36, 0xe6050024), /* PORT36CR */ | ||
1331 | PORTCR(37, 0xe6050025), /* PORT37CR */ | ||
1332 | PORTCR(38, 0xe6050026), /* PORT38CR */ | ||
1333 | PORTCR(39, 0xe6050027), /* PORT39CR */ | ||
1334 | |||
1335 | PORTCR(40, 0xe6050028), /* PORT40CR */ | ||
1336 | PORTCR(41, 0xe6050029), /* PORT41CR */ | ||
1337 | PORTCR(42, 0xe605002a), /* PORT42CR */ | ||
1338 | PORTCR(43, 0xe605002b), /* PORT43CR */ | ||
1339 | PORTCR(44, 0xe605002c), /* PORT44CR */ | ||
1340 | PORTCR(45, 0xe605002d), /* PORT45CR */ | ||
1341 | PORTCR(46, 0xe605002e), /* PORT46CR */ | ||
1342 | PORTCR(47, 0xe605002f), /* PORT47CR */ | ||
1343 | PORTCR(48, 0xe6050030), /* PORT48CR */ | ||
1344 | PORTCR(49, 0xe6050031), /* PORT49CR */ | ||
1345 | |||
1346 | PORTCR(50, 0xe6050032), /* PORT50CR */ | ||
1347 | PORTCR(51, 0xe6050033), /* PORT51CR */ | ||
1348 | PORTCR(52, 0xe6050034), /* PORT52CR */ | ||
1349 | PORTCR(53, 0xe6050035), /* PORT53CR */ | ||
1350 | PORTCR(54, 0xe6050036), /* PORT54CR */ | ||
1351 | PORTCR(55, 0xe6050037), /* PORT55CR */ | ||
1352 | PORTCR(56, 0xe6050038), /* PORT56CR */ | ||
1353 | PORTCR(57, 0xe6050039), /* PORT57CR */ | ||
1354 | PORTCR(58, 0xe605003a), /* PORT58CR */ | ||
1355 | PORTCR(59, 0xe605003b), /* PORT59CR */ | ||
1356 | |||
1357 | PORTCR(60, 0xe605003c), /* PORT60CR */ | ||
1358 | PORTCR(61, 0xe605003d), /* PORT61CR */ | ||
1359 | PORTCR(62, 0xe605003e), /* PORT62CR */ | ||
1360 | PORTCR(63, 0xe605003f), /* PORT63CR */ | ||
1361 | PORTCR(64, 0xe6050040), /* PORT64CR */ | ||
1362 | PORTCR(65, 0xe6050041), /* PORT65CR */ | ||
1363 | PORTCR(66, 0xe6050042), /* PORT66CR */ | ||
1364 | PORTCR(67, 0xe6050043), /* PORT67CR */ | ||
1365 | PORTCR(68, 0xe6050044), /* PORT68CR */ | ||
1366 | PORTCR(69, 0xe6050045), /* PORT69CR */ | ||
1367 | |||
1368 | PORTCR(70, 0xe6050046), /* PORT70CR */ | ||
1369 | PORTCR(71, 0xe6050047), /* PORT71CR */ | ||
1370 | PORTCR(72, 0xe6050048), /* PORT72CR */ | ||
1371 | PORTCR(73, 0xe6050049), /* PORT73CR */ | ||
1372 | PORTCR(74, 0xe605004a), /* PORT74CR */ | ||
1373 | PORTCR(75, 0xe605004b), /* PORT75CR */ | ||
1374 | PORTCR(76, 0xe605004c), /* PORT76CR */ | ||
1375 | PORTCR(77, 0xe605004d), /* PORT77CR */ | ||
1376 | PORTCR(78, 0xe605004e), /* PORT78CR */ | ||
1377 | PORTCR(79, 0xe605004f), /* PORT79CR */ | ||
1378 | |||
1379 | PORTCR(80, 0xe6050050), /* PORT80CR */ | ||
1380 | PORTCR(81, 0xe6050051), /* PORT81CR */ | ||
1381 | PORTCR(82, 0xe6050052), /* PORT82CR */ | ||
1382 | PORTCR(83, 0xe6050053), /* PORT83CR */ | ||
1383 | PORTCR(84, 0xe6050054), /* PORT84CR */ | ||
1384 | PORTCR(85, 0xe6050055), /* PORT85CR */ | ||
1385 | PORTCR(86, 0xe6050056), /* PORT86CR */ | ||
1386 | PORTCR(87, 0xe6050057), /* PORT87CR */ | ||
1387 | PORTCR(88, 0xe6051058), /* PORT88CR */ | ||
1388 | PORTCR(89, 0xe6051059), /* PORT89CR */ | ||
1389 | |||
1390 | PORTCR(90, 0xe605105a), /* PORT90CR */ | ||
1391 | PORTCR(91, 0xe605105b), /* PORT91CR */ | ||
1392 | PORTCR(92, 0xe605105c), /* PORT92CR */ | ||
1393 | PORTCR(93, 0xe605105d), /* PORT93CR */ | ||
1394 | PORTCR(94, 0xe605105e), /* PORT94CR */ | ||
1395 | PORTCR(95, 0xe605105f), /* PORT95CR */ | ||
1396 | PORTCR(96, 0xe6051060), /* PORT96CR */ | ||
1397 | PORTCR(97, 0xe6051061), /* PORT97CR */ | ||
1398 | PORTCR(98, 0xe6051062), /* PORT98CR */ | ||
1399 | PORTCR(99, 0xe6051063), /* PORT99CR */ | ||
1400 | |||
1401 | PORTCR(100, 0xe6051064), /* PORT100CR */ | ||
1402 | PORTCR(101, 0xe6051065), /* PORT101CR */ | ||
1403 | PORTCR(102, 0xe6051066), /* PORT102CR */ | ||
1404 | PORTCR(103, 0xe6051067), /* PORT103CR */ | ||
1405 | PORTCR(104, 0xe6051068), /* PORT104CR */ | ||
1406 | PORTCR(105, 0xe6051069), /* PORT105CR */ | ||
1407 | PORTCR(106, 0xe605106a), /* PORT106CR */ | ||
1408 | PORTCR(107, 0xe605106b), /* PORT107CR */ | ||
1409 | PORTCR(108, 0xe605106c), /* PORT108CR */ | ||
1410 | PORTCR(109, 0xe605106d), /* PORT109CR */ | ||
1411 | |||
1412 | PORTCR(110, 0xe605106e), /* PORT110CR */ | ||
1413 | PORTCR(111, 0xe605106f), /* PORT111CR */ | ||
1414 | PORTCR(112, 0xe6051070), /* PORT112CR */ | ||
1415 | PORTCR(113, 0xe6051071), /* PORT113CR */ | ||
1416 | PORTCR(114, 0xe6051072), /* PORT114CR */ | ||
1417 | PORTCR(115, 0xe6051073), /* PORT115CR */ | ||
1418 | PORTCR(116, 0xe6051074), /* PORT116CR */ | ||
1419 | PORTCR(117, 0xe6051075), /* PORT117CR */ | ||
1420 | PORTCR(118, 0xe6051076), /* PORT118CR */ | ||
1421 | PORTCR(119, 0xe6051077), /* PORT119CR */ | ||
1422 | |||
1423 | PORTCR(120, 0xe6051078), /* PORT120CR */ | ||
1424 | PORTCR(121, 0xe6051079), /* PORT121CR */ | ||
1425 | PORTCR(122, 0xe605107a), /* PORT122CR */ | ||
1426 | PORTCR(123, 0xe605107b), /* PORT123CR */ | ||
1427 | PORTCR(124, 0xe605107c), /* PORT124CR */ | ||
1428 | PORTCR(125, 0xe605107d), /* PORT125CR */ | ||
1429 | PORTCR(126, 0xe605107e), /* PORT126CR */ | ||
1430 | PORTCR(127, 0xe605107f), /* PORT127CR */ | ||
1431 | PORTCR(128, 0xe6051080), /* PORT128CR */ | ||
1432 | PORTCR(129, 0xe6051081), /* PORT129CR */ | ||
1433 | |||
1434 | PORTCR(130, 0xe6051082), /* PORT130CR */ | ||
1435 | PORTCR(131, 0xe6051083), /* PORT131CR */ | ||
1436 | PORTCR(132, 0xe6051084), /* PORT132CR */ | ||
1437 | PORTCR(133, 0xe6051085), /* PORT133CR */ | ||
1438 | PORTCR(134, 0xe6051086), /* PORT134CR */ | ||
1439 | PORTCR(135, 0xe6051087), /* PORT135CR */ | ||
1440 | PORTCR(136, 0xe6051088), /* PORT136CR */ | ||
1441 | PORTCR(137, 0xe6051089), /* PORT137CR */ | ||
1442 | PORTCR(138, 0xe605108a), /* PORT138CR */ | ||
1443 | PORTCR(139, 0xe605108b), /* PORT139CR */ | ||
1444 | |||
1445 | PORTCR(140, 0xe605108c), /* PORT140CR */ | ||
1446 | PORTCR(141, 0xe605108d), /* PORT141CR */ | ||
1447 | PORTCR(142, 0xe605108e), /* PORT142CR */ | ||
1448 | PORTCR(143, 0xe605108f), /* PORT143CR */ | ||
1449 | PORTCR(144, 0xe6051090), /* PORT144CR */ | ||
1450 | PORTCR(145, 0xe6051091), /* PORT145CR */ | ||
1451 | PORTCR(146, 0xe6051092), /* PORT146CR */ | ||
1452 | PORTCR(147, 0xe6051093), /* PORT147CR */ | ||
1453 | PORTCR(148, 0xe6051094), /* PORT148CR */ | ||
1454 | PORTCR(149, 0xe6051095), /* PORT149CR */ | ||
1455 | |||
1456 | PORTCR(150, 0xe6051096), /* PORT150CR */ | ||
1457 | PORTCR(151, 0xe6051097), /* PORT151CR */ | ||
1458 | PORTCR(152, 0xe6051098), /* PORT152CR */ | ||
1459 | PORTCR(153, 0xe6051099), /* PORT153CR */ | ||
1460 | PORTCR(154, 0xe605109a), /* PORT154CR */ | ||
1461 | PORTCR(155, 0xe605109b), /* PORT155CR */ | ||
1462 | PORTCR(156, 0xe605109c), /* PORT156CR */ | ||
1463 | PORTCR(157, 0xe605109d), /* PORT157CR */ | ||
1464 | PORTCR(158, 0xe605109e), /* PORT158CR */ | ||
1465 | PORTCR(159, 0xe605109f), /* PORT159CR */ | ||
1466 | |||
1467 | PORTCR(160, 0xe60510a0), /* PORT160CR */ | ||
1468 | PORTCR(161, 0xe60510a1), /* PORT161CR */ | ||
1469 | PORTCR(162, 0xe60510a2), /* PORT162CR */ | ||
1470 | PORTCR(163, 0xe60510a3), /* PORT163CR */ | ||
1471 | PORTCR(164, 0xe60510a4), /* PORT164CR */ | ||
1472 | PORTCR(165, 0xe60510a5), /* PORT165CR */ | ||
1473 | PORTCR(166, 0xe60510a6), /* PORT166CR */ | ||
1474 | PORTCR(167, 0xe60510a7), /* PORT167CR */ | ||
1475 | PORTCR(168, 0xe60510a8), /* PORT168CR */ | ||
1476 | PORTCR(169, 0xe60510a9), /* PORT169CR */ | ||
1477 | |||
1478 | PORTCR(170, 0xe60510aa), /* PORT170CR */ | ||
1479 | PORTCR(171, 0xe60510ab), /* PORT171CR */ | ||
1480 | PORTCR(172, 0xe60510ac), /* PORT172CR */ | ||
1481 | PORTCR(173, 0xe60510ad), /* PORT173CR */ | ||
1482 | PORTCR(174, 0xe60510ae), /* PORT174CR */ | ||
1483 | PORTCR(175, 0xe60520af), /* PORT175CR */ | ||
1484 | PORTCR(176, 0xe60520b0), /* PORT176CR */ | ||
1485 | PORTCR(177, 0xe60520b1), /* PORT177CR */ | ||
1486 | PORTCR(178, 0xe60520b2), /* PORT178CR */ | ||
1487 | PORTCR(179, 0xe60520b3), /* PORT179CR */ | ||
1488 | |||
1489 | PORTCR(180, 0xe60520b4), /* PORT180CR */ | ||
1490 | PORTCR(181, 0xe60520b5), /* PORT181CR */ | ||
1491 | PORTCR(182, 0xe60520b6), /* PORT182CR */ | ||
1492 | PORTCR(183, 0xe60520b7), /* PORT183CR */ | ||
1493 | PORTCR(184, 0xe60520b8), /* PORT184CR */ | ||
1494 | PORTCR(185, 0xe60520b9), /* PORT185CR */ | ||
1495 | PORTCR(186, 0xe60520ba), /* PORT186CR */ | ||
1496 | PORTCR(187, 0xe60520bb), /* PORT187CR */ | ||
1497 | PORTCR(188, 0xe60520bc), /* PORT188CR */ | ||
1498 | PORTCR(189, 0xe60520bd), /* PORT189CR */ | ||
1499 | |||
1500 | PORTCR(190, 0xe60520be), /* PORT190CR */ | ||
1501 | PORTCR(191, 0xe60520bf), /* PORT191CR */ | ||
1502 | PORTCR(192, 0xe60520c0), /* PORT192CR */ | ||
1503 | PORTCR(193, 0xe60520c1), /* PORT193CR */ | ||
1504 | PORTCR(194, 0xe60520c2), /* PORT194CR */ | ||
1505 | PORTCR(195, 0xe60520c3), /* PORT195CR */ | ||
1506 | PORTCR(196, 0xe60520c4), /* PORT196CR */ | ||
1507 | PORTCR(197, 0xe60520c5), /* PORT197CR */ | ||
1508 | PORTCR(198, 0xe60520c6), /* PORT198CR */ | ||
1509 | PORTCR(199, 0xe60520c7), /* PORT199CR */ | ||
1510 | |||
1511 | PORTCR(200, 0xe60520c8), /* PORT200CR */ | ||
1512 | PORTCR(201, 0xe60520c9), /* PORT201CR */ | ||
1513 | PORTCR(202, 0xe60520ca), /* PORT202CR */ | ||
1514 | PORTCR(203, 0xe60520cb), /* PORT203CR */ | ||
1515 | PORTCR(204, 0xe60520cc), /* PORT204CR */ | ||
1516 | PORTCR(205, 0xe60520cd), /* PORT205CR */ | ||
1517 | PORTCR(206, 0xe60520ce), /* PORT206CR */ | ||
1518 | PORTCR(207, 0xe60520cf), /* PORT207CR */ | ||
1519 | PORTCR(208, 0xe60520d0), /* PORT208CR */ | ||
1520 | PORTCR(209, 0xe60520d1), /* PORT209CR */ | ||
1521 | |||
1522 | PORTCR(210, 0xe60520d2), /* PORT210CR */ | ||
1523 | PORTCR(211, 0xe60520d3), /* PORT211CR */ | ||
1524 | PORTCR(212, 0xe60520d4), /* PORT212CR */ | ||
1525 | PORTCR(213, 0xe60520d5), /* PORT213CR */ | ||
1526 | PORTCR(214, 0xe60520d6), /* PORT214CR */ | ||
1527 | PORTCR(215, 0xe60520d7), /* PORT215CR */ | ||
1528 | PORTCR(216, 0xe60520d8), /* PORT216CR */ | ||
1529 | PORTCR(217, 0xe60520d9), /* PORT217CR */ | ||
1530 | PORTCR(218, 0xe60520da), /* PORT218CR */ | ||
1531 | PORTCR(219, 0xe60520db), /* PORT219CR */ | ||
1532 | |||
1533 | PORTCR(220, 0xe60520dc), /* PORT220CR */ | ||
1534 | PORTCR(221, 0xe60520dd), /* PORT221CR */ | ||
1535 | PORTCR(222, 0xe60520de), /* PORT222CR */ | ||
1536 | PORTCR(223, 0xe60520df), /* PORT223CR */ | ||
1537 | PORTCR(224, 0xe60520e0), /* PORT224CR */ | ||
1538 | PORTCR(225, 0xe60520e1), /* PORT225CR */ | ||
1539 | PORTCR(226, 0xe60520e2), /* PORT226CR */ | ||
1540 | PORTCR(227, 0xe60520e3), /* PORT227CR */ | ||
1541 | PORTCR(228, 0xe60520e4), /* PORT228CR */ | ||
1542 | PORTCR(229, 0xe60520e5), /* PORT229CR */ | ||
1543 | |||
1544 | PORTCR(230, 0xe60520e6), /* PORT230CR */ | ||
1545 | PORTCR(231, 0xe60520e7), /* PORT231CR */ | ||
1546 | PORTCR(232, 0xe60520e8), /* PORT232CR */ | ||
1547 | PORTCR(233, 0xe60520e9), /* PORT233CR */ | ||
1548 | PORTCR(234, 0xe60520ea), /* PORT234CR */ | ||
1549 | PORTCR(235, 0xe60520eb), /* PORT235CR */ | ||
1550 | PORTCR(236, 0xe60530ec), /* PORT236CR */ | ||
1551 | PORTCR(237, 0xe60530ed), /* PORT237CR */ | ||
1552 | PORTCR(238, 0xe60530ee), /* PORT238CR */ | ||
1553 | PORTCR(239, 0xe60530ef), /* PORT239CR */ | ||
1554 | |||
1555 | PORTCR(240, 0xe60530f0), /* PORT240CR */ | ||
1556 | PORTCR(241, 0xe60530f1), /* PORT241CR */ | ||
1557 | PORTCR(242, 0xe60530f2), /* PORT242CR */ | ||
1558 | PORTCR(243, 0xe60530f3), /* PORT243CR */ | ||
1559 | PORTCR(244, 0xe60530f4), /* PORT244CR */ | ||
1560 | PORTCR(245, 0xe60530f5), /* PORT245CR */ | ||
1561 | PORTCR(246, 0xe60530f6), /* PORT246CR */ | ||
1562 | PORTCR(247, 0xe60530f7), /* PORT247CR */ | ||
1563 | PORTCR(248, 0xe60530f8), /* PORT248CR */ | ||
1564 | PORTCR(249, 0xe60530f9), /* PORT249CR */ | ||
1565 | |||
1566 | PORTCR(250, 0xe60530fa), /* PORT250CR */ | ||
1567 | PORTCR(251, 0xe60530fb), /* PORT251CR */ | ||
1568 | PORTCR(252, 0xe60530fc), /* PORT252CR */ | ||
1569 | PORTCR(253, 0xe60530fd), /* PORT253CR */ | ||
1570 | PORTCR(254, 0xe60530fe), /* PORT254CR */ | ||
1571 | PORTCR(255, 0xe60530ff), /* PORT255CR */ | ||
1572 | PORTCR(256, 0xe6053100), /* PORT256CR */ | ||
1573 | PORTCR(257, 0xe6053101), /* PORT257CR */ | ||
1574 | PORTCR(258, 0xe6053102), /* PORT258CR */ | ||
1575 | PORTCR(259, 0xe6053103), /* PORT259CR */ | ||
1576 | |||
1577 | PORTCR(260, 0xe6053104), /* PORT260CR */ | ||
1578 | PORTCR(261, 0xe6053105), /* PORT261CR */ | ||
1579 | PORTCR(262, 0xe6053106), /* PORT262CR */ | ||
1580 | PORTCR(263, 0xe6053107), /* PORT263CR */ | ||
1581 | PORTCR(264, 0xe6053108), /* PORT264CR */ | ||
1582 | PORTCR(265, 0xe6053109), /* PORT265CR */ | ||
1583 | PORTCR(266, 0xe605310a), /* PORT266CR */ | ||
1584 | PORTCR(267, 0xe605310b), /* PORT267CR */ | ||
1585 | PORTCR(268, 0xe605310c), /* PORT268CR */ | ||
1586 | PORTCR(269, 0xe605310d), /* PORT269CR */ | ||
1587 | |||
1588 | PORTCR(270, 0xe605310e), /* PORT270CR */ | ||
1589 | PORTCR(271, 0xe605310f), /* PORT271CR */ | ||
1590 | PORTCR(272, 0xe6053110), /* PORT272CR */ | ||
1591 | |||
1592 | { PINMUX_CFG_REG("MSELBCR", 0xe6058024, 32, 1) { | ||
1593 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1594 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1595 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1596 | 0, 0, | ||
1597 | 0, 0, | ||
1598 | 0, 0, | ||
1599 | 0, 0, | ||
1600 | 0, 0, | ||
1601 | MSELBCR_MSEL2_0, MSELBCR_MSEL2_1, | ||
1602 | 0, 0, | ||
1603 | 0, 0 } | ||
1604 | }, | ||
1605 | { }, | ||
1606 | }; | ||
1607 | |||
1608 | static struct pinmux_data_reg pinmux_data_regs[] = { | ||
1609 | { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) { | ||
1610 | PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, | ||
1611 | PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, | ||
1612 | PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA, | ||
1613 | PORT19_DATA, PORT18_DATA, PORT17_DATA, PORT16_DATA, | ||
1614 | PORT15_DATA, PORT14_DATA, PORT13_DATA, PORT12_DATA, | ||
1615 | PORT11_DATA, PORT10_DATA, PORT9_DATA, PORT8_DATA, | ||
1616 | PORT7_DATA, PORT6_DATA, PORT5_DATA, PORT4_DATA, | ||
1617 | PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA } | ||
1618 | }, | ||
1619 | { PINMUX_DATA_REG("PORTL063_032DR", 0xe6054004, 32) { | ||
1620 | PORT63_DATA, PORT62_DATA, PORT61_DATA, PORT60_DATA, | ||
1621 | PORT59_DATA, PORT58_DATA, PORT57_DATA, PORT56_DATA, | ||
1622 | PORT55_DATA, PORT54_DATA, PORT53_DATA, PORT52_DATA, | ||
1623 | PORT51_DATA, PORT50_DATA, PORT49_DATA, PORT48_DATA, | ||
1624 | PORT47_DATA, PORT46_DATA, PORT45_DATA, PORT44_DATA, | ||
1625 | PORT43_DATA, PORT42_DATA, PORT41_DATA, PORT40_DATA, | ||
1626 | PORT39_DATA, PORT38_DATA, PORT37_DATA, PORT36_DATA, | ||
1627 | PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA } | ||
1628 | }, | ||
1629 | { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054008, 32) { | ||
1630 | PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA, | ||
1631 | PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA, | ||
1632 | PORT87_DATA, PORT86_DATA, PORT85_DATA, PORT84_DATA, | ||
1633 | PORT83_DATA, PORT82_DATA, PORT81_DATA, PORT80_DATA, | ||
1634 | PORT79_DATA, PORT78_DATA, PORT77_DATA, PORT76_DATA, | ||
1635 | PORT75_DATA, PORT74_DATA, PORT73_DATA, PORT72_DATA, | ||
1636 | PORT71_DATA, PORT70_DATA, PORT69_DATA, PORT68_DATA, | ||
1637 | PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA } | ||
1638 | }, | ||
1639 | { PINMUX_DATA_REG("PORTD127_096DR", 0xe6055004, 32) { | ||
1640 | PORT127_DATA, PORT126_DATA, PORT125_DATA, PORT124_DATA, | ||
1641 | PORT123_DATA, PORT122_DATA, PORT121_DATA, PORT120_DATA, | ||
1642 | PORT119_DATA, PORT118_DATA, PORT117_DATA, PORT116_DATA, | ||
1643 | PORT115_DATA, PORT114_DATA, PORT113_DATA, PORT112_DATA, | ||
1644 | PORT111_DATA, PORT110_DATA, PORT109_DATA, PORT108_DATA, | ||
1645 | PORT107_DATA, PORT106_DATA, PORT105_DATA, PORT104_DATA, | ||
1646 | PORT103_DATA, PORT102_DATA, PORT101_DATA, PORT100_DATA, | ||
1647 | PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA } | ||
1648 | }, | ||
1649 | { PINMUX_DATA_REG("PORTD159_128DR", 0xe6055008, 32) { | ||
1650 | PORT159_DATA, PORT158_DATA, PORT157_DATA, PORT156_DATA, | ||
1651 | PORT155_DATA, PORT154_DATA, PORT153_DATA, PORT152_DATA, | ||
1652 | PORT151_DATA, PORT150_DATA, PORT149_DATA, PORT148_DATA, | ||
1653 | PORT147_DATA, PORT146_DATA, PORT145_DATA, PORT144_DATA, | ||
1654 | PORT143_DATA, PORT142_DATA, PORT141_DATA, PORT140_DATA, | ||
1655 | PORT139_DATA, PORT138_DATA, PORT137_DATA, PORT136_DATA, | ||
1656 | PORT135_DATA, PORT134_DATA, PORT133_DATA, PORT132_DATA, | ||
1657 | PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA } | ||
1658 | }, | ||
1659 | { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056000, 32) { | ||
1660 | PORT191_DATA, PORT190_DATA, PORT189_DATA, PORT188_DATA, | ||
1661 | PORT187_DATA, PORT186_DATA, PORT185_DATA, PORT184_DATA, | ||
1662 | PORT183_DATA, PORT182_DATA, PORT181_DATA, PORT180_DATA, | ||
1663 | PORT179_DATA, PORT178_DATA, PORT177_DATA, PORT176_DATA, | ||
1664 | PORT175_DATA, PORT174_DATA, PORT173_DATA, PORT172_DATA, | ||
1665 | PORT171_DATA, PORT170_DATA, PORT169_DATA, PORT168_DATA, | ||
1666 | PORT167_DATA, PORT166_DATA, PORT165_DATA, PORT164_DATA, | ||
1667 | PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA } | ||
1668 | }, | ||
1669 | { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056004, 32) { | ||
1670 | PORT223_DATA, PORT222_DATA, PORT221_DATA, PORT220_DATA, | ||
1671 | PORT219_DATA, PORT218_DATA, PORT217_DATA, PORT216_DATA, | ||
1672 | PORT215_DATA, PORT214_DATA, PORT213_DATA, PORT212_DATA, | ||
1673 | PORT211_DATA, PORT210_DATA, PORT209_DATA, PORT208_DATA, | ||
1674 | PORT207_DATA, PORT206_DATA, PORT205_DATA, PORT204_DATA, | ||
1675 | PORT203_DATA, PORT202_DATA, PORT201_DATA, PORT200_DATA, | ||
1676 | PORT199_DATA, PORT198_DATA, PORT197_DATA, PORT196_DATA, | ||
1677 | PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA } | ||
1678 | }, | ||
1679 | { PINMUX_DATA_REG("PORTU255_224DR", 0xe6057000, 32) { | ||
1680 | PORT255_DATA, PORT254_DATA, PORT253_DATA, PORT252_DATA, | ||
1681 | PORT251_DATA, PORT250_DATA, PORT249_DATA, PORT248_DATA, | ||
1682 | PORT247_DATA, PORT246_DATA, PORT245_DATA, PORT244_DATA, | ||
1683 | PORT243_DATA, PORT242_DATA, PORT241_DATA, PORT240_DATA, | ||
1684 | PORT239_DATA, PORT238_DATA, PORT237_DATA, PORT236_DATA, | ||
1685 | PORT235_DATA, PORT234_DATA, PORT233_DATA, PORT232_DATA, | ||
1686 | PORT231_DATA, PORT230_DATA, PORT229_DATA, PORT228_DATA, | ||
1687 | PORT227_DATA, PORT226_DATA, PORT225_DATA, PORT224_DATA } | ||
1688 | }, | ||
1689 | { PINMUX_DATA_REG("PORTU287_256DR", 0xe6057004, 32) { | ||
1690 | 0, 0, 0, 0, | ||
1691 | 0, 0, 0, 0, | ||
1692 | 0, 0, 0, 0, | ||
1693 | 0, 0, 0, PORT272_DATA, | ||
1694 | PORT271_DATA, PORT270_DATA, PORT269_DATA, PORT268_DATA, | ||
1695 | PORT267_DATA, PORT266_DATA, PORT265_DATA, PORT264_DATA, | ||
1696 | PORT263_DATA, PORT262_DATA, PORT261_DATA, PORT260_DATA, | ||
1697 | PORT259_DATA, PORT258_DATA, PORT257_DATA, PORT256_DATA } | ||
1698 | }, | ||
1699 | { }, | ||
1700 | }; | ||
1701 | |||
1702 | static struct pinmux_info sh7367_pinmux_info = { | ||
1703 | .name = "sh7367_pfc", | ||
1704 | .reserved_id = PINMUX_RESERVED, | ||
1705 | .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END }, | ||
1706 | .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, | ||
1707 | .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, | ||
1708 | .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END }, | ||
1709 | .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, | ||
1710 | .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END }, | ||
1711 | .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, | ||
1712 | |||
1713 | .first_gpio = GPIO_PORT0, | ||
1714 | .last_gpio = GPIO_FN_DIVLOCK, | ||
1715 | |||
1716 | .gpios = pinmux_gpios, | ||
1717 | .cfg_regs = pinmux_config_regs, | ||
1718 | .data_regs = pinmux_data_regs, | ||
1719 | |||
1720 | .gpio_data = pinmux_data, | ||
1721 | .gpio_data_size = ARRAY_SIZE(pinmux_data), | ||
1722 | }; | ||
1723 | |||
1724 | void sh7367_pinmux_init(void) | ||
1725 | { | ||
1726 | register_pinmux(&sh7367_pinmux_info); | ||
1727 | } | ||
diff --git a/arch/arm/mach-shmobile/pfc-sh7377.c b/arch/arm/mach-shmobile/pfc-sh7377.c deleted file mode 100644 index f3117f67fa25..000000000000 --- a/arch/arm/mach-shmobile/pfc-sh7377.c +++ /dev/null | |||
@@ -1,1688 +0,0 @@ | |||
1 | /* | ||
2 | * sh7377 processor support - PFC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 NISHIMOTO Hiroki | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation; version 2 of the | ||
9 | * License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/sh_pfc.h> | ||
23 | #include <mach/sh7377.h> | ||
24 | |||
25 | #define CPU_ALL_PORT(fn, pfx, sfx) \ | ||
26 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | ||
27 | PORT_10(fn, pfx##10, sfx), \ | ||
28 | PORT_1(fn, pfx##110, sfx), PORT_1(fn, pfx##111, sfx), \ | ||
29 | PORT_1(fn, pfx##112, sfx), PORT_1(fn, pfx##113, sfx), \ | ||
30 | PORT_1(fn, pfx##114, sfx), PORT_1(fn, pfx##115, sfx), \ | ||
31 | PORT_1(fn, pfx##116, sfx), PORT_1(fn, pfx##117, sfx), \ | ||
32 | PORT_1(fn, pfx##118, sfx), \ | ||
33 | PORT_1(fn, pfx##128, sfx), PORT_1(fn, pfx##129, sfx), \ | ||
34 | PORT_10(fn, pfx##13, sfx), PORT_10(fn, pfx##14, sfx), \ | ||
35 | PORT_10(fn, pfx##15, sfx), \ | ||
36 | PORT_1(fn, pfx##160, sfx), PORT_1(fn, pfx##161, sfx), \ | ||
37 | PORT_1(fn, pfx##162, sfx), PORT_1(fn, pfx##163, sfx), \ | ||
38 | PORT_1(fn, pfx##164, sfx), \ | ||
39 | PORT_1(fn, pfx##192, sfx), PORT_1(fn, pfx##193, sfx), \ | ||
40 | PORT_1(fn, pfx##194, sfx), PORT_1(fn, pfx##195, sfx), \ | ||
41 | PORT_1(fn, pfx##196, sfx), PORT_1(fn, pfx##197, sfx), \ | ||
42 | PORT_1(fn, pfx##198, sfx), PORT_1(fn, pfx##199, sfx), \ | ||
43 | PORT_10(fn, pfx##20, sfx), PORT_10(fn, pfx##21, sfx), \ | ||
44 | PORT_10(fn, pfx##22, sfx), PORT_10(fn, pfx##23, sfx), \ | ||
45 | PORT_10(fn, pfx##24, sfx), PORT_10(fn, pfx##25, sfx), \ | ||
46 | PORT_1(fn, pfx##260, sfx), PORT_1(fn, pfx##261, sfx), \ | ||
47 | PORT_1(fn, pfx##262, sfx), PORT_1(fn, pfx##263, sfx), \ | ||
48 | PORT_1(fn, pfx##264, sfx) | ||
49 | |||
50 | enum { | ||
51 | PINMUX_RESERVED = 0, | ||
52 | |||
53 | PINMUX_DATA_BEGIN, | ||
54 | PORT_ALL(DATA), /* PORT0_DATA -> PORT264_DATA */ | ||
55 | PINMUX_DATA_END, | ||
56 | |||
57 | PINMUX_INPUT_BEGIN, | ||
58 | PORT_ALL(IN), /* PORT0_IN -> PORT264_IN */ | ||
59 | PINMUX_INPUT_END, | ||
60 | |||
61 | PINMUX_INPUT_PULLUP_BEGIN, | ||
62 | PORT_ALL(IN_PU), /* PORT0_IN_PU -> PORT264_IN_PU */ | ||
63 | PINMUX_INPUT_PULLUP_END, | ||
64 | |||
65 | PINMUX_INPUT_PULLDOWN_BEGIN, | ||
66 | PORT_ALL(IN_PD), /* PORT0_IN_PD -> PORT264_IN_PD */ | ||
67 | PINMUX_INPUT_PULLDOWN_END, | ||
68 | |||
69 | PINMUX_OUTPUT_BEGIN, | ||
70 | PORT_ALL(OUT), /* PORT0_OUT -> PORT264_OUT */ | ||
71 | PINMUX_OUTPUT_END, | ||
72 | |||
73 | PINMUX_FUNCTION_BEGIN, | ||
74 | PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT264_FN_IN */ | ||
75 | PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT264_FN_OUT */ | ||
76 | PORT_ALL(FN0), /* PORT0_FN0 -> PORT264_FN0 */ | ||
77 | PORT_ALL(FN1), /* PORT0_FN1 -> PORT264_FN1 */ | ||
78 | PORT_ALL(FN2), /* PORT0_FN2 -> PORT264_FN2 */ | ||
79 | PORT_ALL(FN3), /* PORT0_FN3 -> PORT264_FN3 */ | ||
80 | PORT_ALL(FN4), /* PORT0_FN4 -> PORT264_FN4 */ | ||
81 | PORT_ALL(FN5), /* PORT0_FN5 -> PORT264_FN5 */ | ||
82 | PORT_ALL(FN6), /* PORT0_FN6 -> PORT264_FN6 */ | ||
83 | PORT_ALL(FN7), /* PORT0_FN7 -> PORT264_FN7 */ | ||
84 | |||
85 | MSELBCR_MSEL17_1, MSELBCR_MSEL17_0, | ||
86 | MSELBCR_MSEL16_1, MSELBCR_MSEL16_0, | ||
87 | PINMUX_FUNCTION_END, | ||
88 | |||
89 | PINMUX_MARK_BEGIN, | ||
90 | /* Special Pull-up / Pull-down Functions */ | ||
91 | PORT66_KEYIN0_PU_MARK, PORT67_KEYIN1_PU_MARK, | ||
92 | PORT68_KEYIN2_PU_MARK, PORT69_KEYIN3_PU_MARK, | ||
93 | PORT70_KEYIN4_PU_MARK, PORT71_KEYIN5_PU_MARK, | ||
94 | PORT72_KEYIN6_PU_MARK, | ||
95 | |||
96 | /* 55-1 */ | ||
97 | VBUS_0_MARK, | ||
98 | CPORT0_MARK, | ||
99 | CPORT1_MARK, | ||
100 | CPORT2_MARK, | ||
101 | CPORT3_MARK, | ||
102 | CPORT4_MARK, | ||
103 | CPORT5_MARK, | ||
104 | CPORT6_MARK, | ||
105 | CPORT7_MARK, | ||
106 | CPORT8_MARK, | ||
107 | CPORT9_MARK, | ||
108 | CPORT10_MARK, | ||
109 | CPORT11_MARK, SIN2_MARK, | ||
110 | CPORT12_MARK, XCTS2_MARK, | ||
111 | CPORT13_MARK, RFSPO4_MARK, | ||
112 | CPORT14_MARK, RFSPO5_MARK, | ||
113 | CPORT15_MARK, SCIFA0_SCK_MARK, GPS_AGC2_MARK, | ||
114 | CPORT16_MARK, SCIFA0_TXD_MARK, GPS_AGC3_MARK, | ||
115 | CPORT17_IC_OE_MARK, SOUT2_MARK, | ||
116 | CPORT18_MARK, XRTS2_MARK, PORT19_VIO_CKO2_MARK, | ||
117 | CPORT19_MPORT1_MARK, | ||
118 | CPORT20_MARK, RFSPO6_MARK, | ||
119 | CPORT21_MARK, STATUS0_MARK, | ||
120 | CPORT22_MARK, STATUS1_MARK, | ||
121 | CPORT23_MARK, STATUS2_MARK, RFSPO7_MARK, | ||
122 | B_SYNLD1_MARK, | ||
123 | B_SYNLD2_MARK, SYSENMSK_MARK, | ||
124 | XMAINPS_MARK, | ||
125 | XDIVPS_MARK, | ||
126 | XIDRST_MARK, | ||
127 | IDCLK_MARK, IC_DP_MARK, | ||
128 | IDIO_MARK, IC_DM_MARK, | ||
129 | SOUT1_MARK, SCIFA4_TXD_MARK, M02_BERDAT_MARK, | ||
130 | SIN1_MARK, SCIFA4_RXD_MARK, XWUP_MARK, | ||
131 | XRTS1_MARK, SCIFA4_RTS_MARK, M03_BERCLK_MARK, | ||
132 | XCTS1_MARK, SCIFA4_CTS_MARK, | ||
133 | PCMCLKO_MARK, | ||
134 | SYNC8KO_MARK, | ||
135 | |||
136 | /* 55-2 */ | ||
137 | DNPCM_A_MARK, | ||
138 | UPPCM_A_MARK, | ||
139 | VACK_MARK, | ||
140 | XTALB1L_MARK, | ||
141 | GPS_AGC1_MARK, SCIFA0_RTS_MARK, | ||
142 | GPS_AGC4_MARK, SCIFA0_RXD_MARK, | ||
143 | GPS_PWRDOWN_MARK, SCIFA0_CTS_MARK, | ||
144 | GPS_IM_MARK, | ||
145 | GPS_IS_MARK, | ||
146 | GPS_QM_MARK, | ||
147 | GPS_QS_MARK, | ||
148 | FMSOCK_MARK, PORT49_IRDA_OUT_MARK, PORT49_IROUT_MARK, | ||
149 | FMSOOLR_MARK, BBIF2_TSYNC2_MARK, TPU2TO2_MARK, IPORT3_MARK, | ||
150 | FMSIOLR_MARK, | ||
151 | FMSOOBT_MARK, BBIF2_TSCK2_MARK, TPU2TO3_MARK, OPORT1_MARK, | ||
152 | FMSIOBT_MARK, | ||
153 | FMSOSLD_MARK, BBIF2_TXD2_MARK, OPORT2_MARK, | ||
154 | FMSOILR_MARK, PORT53_IRDA_IN_MARK, TPU3TO3_MARK, OPORT3_MARK, | ||
155 | FMSIILR_MARK, | ||
156 | FMSOIBT_MARK, PORT54_IRDA_FIRSEL_MARK, TPU3TO2_MARK, FMSIIBT_MARK, | ||
157 | FMSISLD_MARK, MFG0_OUT1_MARK, TPU0TO0_MARK, | ||
158 | A0_EA0_MARK, BS_MARK, | ||
159 | A12_EA12_MARK, PORT58_VIO_CKOR_MARK, TPU4TO2_MARK, | ||
160 | A13_EA13_MARK, PORT59_IROUT_MARK, MFG0_OUT2_MARK, TPU0TO1_MARK, | ||
161 | A14_EA14_MARK, PORT60_KEYOUT5_MARK, | ||
162 | A15_EA15_MARK, PORT61_KEYOUT4_MARK, | ||
163 | A16_EA16_MARK, PORT62_KEYOUT3_MARK, MSIOF0_SS1_MARK, | ||
164 | A17_EA17_MARK, PORT63_KEYOUT2_MARK, MSIOF0_TSYNC_MARK, | ||
165 | A18_EA18_MARK, PORT64_KEYOUT1_MARK, MSIOF0_TSCK_MARK, | ||
166 | A19_EA19_MARK, PORT65_KEYOUT0_MARK, MSIOF0_TXD_MARK, | ||
167 | A20_EA20_MARK, PORT66_KEYIN0_MARK, MSIOF0_RSCK_MARK, | ||
168 | A21_EA21_MARK, PORT67_KEYIN1_MARK, MSIOF0_RSYNC_MARK, | ||
169 | A22_EA22_MARK, PORT68_KEYIN2_MARK, MSIOF0_MCK0_MARK, | ||
170 | A23_EA23_MARK, PORT69_KEYIN3_MARK, MSIOF0_MCK1_MARK, | ||
171 | A24_EA24_MARK, PORT70_KEYIN4_MARK, MSIOF0_RXD_MARK, | ||
172 | A25_EA25_MARK, PORT71_KEYIN5_MARK, MSIOF0_SS2_MARK, | ||
173 | A26_MARK, PORT72_KEYIN6_MARK, | ||
174 | D0_ED0_NAF0_MARK, | ||
175 | D1_ED1_NAF1_MARK, | ||
176 | D2_ED2_NAF2_MARK, | ||
177 | D3_ED3_NAF3_MARK, | ||
178 | D4_ED4_NAF4_MARK, | ||
179 | D5_ED5_NAF5_MARK, | ||
180 | D6_ED6_NAF6_MARK, | ||
181 | D7_ED7_NAF7_MARK, | ||
182 | D8_ED8_NAF8_MARK, | ||
183 | D9_ED9_NAF9_MARK, | ||
184 | D10_ED10_NAF10_MARK, | ||
185 | D11_ED11_NAF11_MARK, | ||
186 | D12_ED12_NAF12_MARK, | ||
187 | D13_ED13_NAF13_MARK, | ||
188 | D14_ED14_NAF14_MARK, | ||
189 | D15_ED15_NAF15_MARK, | ||
190 | CS4_MARK, | ||
191 | CS5A_MARK, FMSICK_MARK, | ||
192 | CS5B_MARK, FCE1_MARK, | ||
193 | |||
194 | /* 55-3 */ | ||
195 | CS6B_MARK, XCS2_MARK, CS6A_MARK, DACK0_MARK, | ||
196 | FCE0_MARK, | ||
197 | WAIT_MARK, DREQ0_MARK, | ||
198 | RD_XRD_MARK, | ||
199 | WE0_XWR0_FWE_MARK, | ||
200 | WE1_XWR1_MARK, | ||
201 | FRB_MARK, | ||
202 | CKO_MARK, | ||
203 | NBRSTOUT_MARK, | ||
204 | NBRST_MARK, | ||
205 | GPS_EPPSIN_MARK, | ||
206 | LATCHPULSE_MARK, | ||
207 | LTESIGNAL_MARK, | ||
208 | LEGACYSTATE_MARK, | ||
209 | TCKON_MARK, | ||
210 | VIO_VD_MARK, PORT128_KEYOUT0_MARK, IPORT0_MARK, | ||
211 | VIO_HD_MARK, PORT129_KEYOUT1_MARK, IPORT1_MARK, | ||
212 | VIO_D0_MARK, PORT130_KEYOUT2_MARK, PORT130_MSIOF2_RXD_MARK, | ||
213 | VIO_D1_MARK, PORT131_KEYOUT3_MARK, PORT131_MSIOF2_SS1_MARK, | ||
214 | VIO_D2_MARK, PORT132_KEYOUT4_MARK, PORT132_MSIOF2_SS2_MARK, | ||
215 | VIO_D3_MARK, PORT133_KEYOUT5_MARK, PORT133_MSIOF2_TSYNC_MARK, | ||
216 | VIO_D4_MARK, PORT134_KEYIN0_MARK, PORT134_MSIOF2_TXD_MARK, | ||
217 | VIO_D5_MARK, PORT135_KEYIN1_MARK, PORT135_MSIOF2_TSCK_MARK, | ||
218 | VIO_D6_MARK, PORT136_KEYIN2_MARK, | ||
219 | VIO_D7_MARK, PORT137_KEYIN3_MARK, | ||
220 | VIO_D8_MARK, M9_SLCD_A01_MARK, PORT138_FSIAOMC_MARK, | ||
221 | VIO_D9_MARK, M10_SLCD_CK1_MARK, PORT139_FSIAOLR_MARK, | ||
222 | VIO_D10_MARK, M11_SLCD_SO1_MARK, TPU0TO2_MARK, PORT140_FSIAOBT_MARK, | ||
223 | VIO_D11_MARK, M12_SLCD_CE1_MARK, TPU0TO3_MARK, PORT141_FSIAOSLD_MARK, | ||
224 | VIO_D12_MARK, M13_BSW_MARK, PORT142_FSIACK_MARK, | ||
225 | VIO_D13_MARK, M14_GSW_MARK, PORT143_FSIAILR_MARK, | ||
226 | VIO_D14_MARK, M15_RSW_MARK, PORT144_FSIAIBT_MARK, | ||
227 | VIO_D15_MARK, TPU1TO3_MARK, PORT145_FSIAISLD_MARK, | ||
228 | VIO_CLK_MARK, PORT146_KEYIN4_MARK, IPORT2_MARK, | ||
229 | VIO_FIELD_MARK, PORT147_KEYIN5_MARK, | ||
230 | VIO_CKO_MARK, PORT148_KEYIN6_MARK, | ||
231 | A27_MARK, RDWR_XWE_MARK, MFG0_IN1_MARK, | ||
232 | MFG0_IN2_MARK, | ||
233 | TS_SPSYNC3_MARK, MSIOF2_RSCK_MARK, | ||
234 | TS_SDAT3_MARK, MSIOF2_RSYNC_MARK, | ||
235 | TPU1TO2_MARK, TS_SDEN3_MARK, PORT153_MSIOF2_SS1_MARK, | ||
236 | SOUT3_MARK, SCIFA2_TXD1_MARK, MSIOF2_MCK0_MARK, | ||
237 | SIN3_MARK, SCIFA2_RXD1_MARK, MSIOF2_MCK1_MARK, | ||
238 | XRTS3_MARK, SCIFA2_RTS1_MARK, PORT156_MSIOF2_SS2_MARK, | ||
239 | XCTS3_MARK, SCIFA2_CTS1_MARK, PORT157_MSIOF2_RXD_MARK, | ||
240 | |||
241 | /* 55-4 */ | ||
242 | DINT_MARK, SCIFA2_SCK1_MARK, TS_SCK3_MARK, | ||
243 | PORT159_SCIFB_SCK_MARK, PORT159_SCIFA5_SCK_MARK, NMI_MARK, | ||
244 | PORT160_SCIFB_TXD_MARK, PORT160_SCIFA5_TXD_MARK, SOUT0_MARK, | ||
245 | PORT161_SCIFB_CTS_MARK, PORT161_SCIFA5_CTS_MARK, XCTS0_MARK, | ||
246 | MFG3_IN2_MARK, | ||
247 | PORT162_SCIFB_RXD_MARK, PORT162_SCIFA5_RXD_MARK, SIN0_MARK, | ||
248 | MFG3_IN1_MARK, | ||
249 | PORT163_SCIFB_RTS_MARK, PORT163_SCIFA5_RTS_MARK, XRTS0_MARK, | ||
250 | MFG3_OUT1_MARK, TPU3TO0_MARK, | ||
251 | LCDD0_MARK, PORT192_KEYOUT0_MARK, EXT_CKI_MARK, | ||
252 | LCDD1_MARK, PORT193_KEYOUT1_MARK, PORT193_SCIFA5_CTS_MARK, | ||
253 | BBIF2_TSYNC1_MARK, | ||
254 | LCDD2_MARK, PORT194_KEYOUT2_MARK, PORT194_SCIFA5_RTS_MARK, | ||
255 | BBIF2_TSCK1_MARK, | ||
256 | LCDD3_MARK, PORT195_KEYOUT3_MARK, PORT195_SCIFA5_RXD_MARK, | ||
257 | BBIF2_TXD1_MARK, | ||
258 | LCDD4_MARK, PORT196_KEYOUT4_MARK, PORT196_SCIFA5_TXD_MARK, | ||
259 | LCDD5_MARK, PORT197_KEYOUT5_MARK, PORT197_SCIFA5_SCK_MARK, | ||
260 | MFG2_OUT2_MARK, | ||
261 | TPU2TO1_MARK, | ||
262 | LCDD6_MARK, XWR2_MARK, | ||
263 | LCDD7_MARK, TPU4TO1_MARK, MFG4_OUT2_MARK, XWR3_MARK, | ||
264 | LCDD8_MARK, PORT200_KEYIN0_MARK, VIO_DR0_MARK, D16_MARK, ED16_MARK, | ||
265 | LCDD9_MARK, PORT201_KEYIN1_MARK, VIO_DR1_MARK, D17_MARK, ED17_MARK, | ||
266 | LCDD10_MARK, PORT202_KEYIN2_MARK, VIO_DR2_MARK, D18_MARK, ED18_MARK, | ||
267 | LCDD11_MARK, PORT203_KEYIN3_MARK, VIO_DR3_MARK, D19_MARK, ED19_MARK, | ||
268 | LCDD12_MARK, PORT204_KEYIN4_MARK, VIO_DR4_MARK, D20_MARK, ED20_MARK, | ||
269 | LCDD13_MARK, PORT205_KEYIN5_MARK, VIO_DR5_MARK, D21_MARK, ED21_MARK, | ||
270 | LCDD14_MARK, PORT206_KEYIN6_MARK, VIO_DR6_MARK, D22_MARK, ED22_MARK, | ||
271 | LCDD15_MARK, PORT207_MSIOF0L_SS1_MARK, PORT207_KEYOUT0_MARK, | ||
272 | VIO_DR7_MARK, D23_MARK, ED23_MARK, | ||
273 | LCDD16_MARK, PORT208_MSIOF0L_SS2_MARK, PORT208_KEYOUT1_MARK, | ||
274 | VIO_VDR_MARK, D24_MARK, ED24_MARK, | ||
275 | LCDD17_MARK, PORT209_KEYOUT2_MARK, VIO_HDR_MARK, D25_MARK, ED25_MARK, | ||
276 | LCDD18_MARK, DREQ2_MARK, PORT210_MSIOF0L_SS1_MARK, D26_MARK, ED26_MARK, | ||
277 | LCDD19_MARK, PORT211_MSIOF0L_SS2_MARK, D27_MARK, ED27_MARK, | ||
278 | LCDD20_MARK, TS_SPSYNC1_MARK, MSIOF0L_MCK0_MARK, D28_MARK, ED28_MARK, | ||
279 | LCDD21_MARK, TS_SDAT1_MARK, MSIOF0L_MCK1_MARK, D29_MARK, ED29_MARK, | ||
280 | LCDD22_MARK, TS_SDEN1_MARK, MSIOF0L_RSCK_MARK, D30_MARK, ED30_MARK, | ||
281 | LCDD23_MARK, TS_SCK1_MARK, MSIOF0L_RSYNC_MARK, D31_MARK, ED31_MARK, | ||
282 | LCDDCK_MARK, LCDWR_MARK, PORT216_KEYOUT3_MARK, VIO_CLKR_MARK, | ||
283 | LCDRD_MARK, DACK2_MARK, MSIOF0L_TSYNC_MARK, | ||
284 | LCDHSYN_MARK, LCDCS_MARK, LCDCS2_MARK, DACK3_MARK, | ||
285 | PORT218_VIO_CKOR_MARK, PORT218_KEYOUT4_MARK, | ||
286 | LCDDISP_MARK, LCDRS_MARK, DREQ3_MARK, MSIOF0L_TSCK_MARK, | ||
287 | LCDVSYN_MARK, LCDVSYN2_MARK, PORT220_KEYOUT5_MARK, | ||
288 | LCDLCLK_MARK, DREQ1_MARK, PWEN_MARK, MSIOF0L_RXD_MARK, | ||
289 | LCDDON_MARK, LCDDON2_MARK, DACK1_MARK, OVCN_MARK, MSIOF0L_TXD_MARK, | ||
290 | SCIFA1_TXD_MARK, OVCN2_MARK, | ||
291 | EXTLP_MARK, SCIFA1_SCK_MARK, USBTERM_MARK, PORT226_VIO_CKO2_MARK, | ||
292 | SCIFA1_RTS_MARK, IDIN_MARK, | ||
293 | SCIFA1_RXD_MARK, | ||
294 | SCIFA1_CTS_MARK, MFG1_IN1_MARK, | ||
295 | MSIOF1_TXD_MARK, SCIFA2_TXD2_MARK, PORT230_FSIAOMC_MARK, | ||
296 | MSIOF1_TSYNC_MARK, SCIFA2_CTS2_MARK, PORT231_FSIAOLR_MARK, | ||
297 | MSIOF1_TSCK_MARK, SCIFA2_SCK2_MARK, PORT232_FSIAOBT_MARK, | ||
298 | MSIOF1_RXD_MARK, SCIFA2_RXD2_MARK, GPS_VCOTRIG_MARK, | ||
299 | PORT233_FSIACK_MARK, | ||
300 | MSIOF1_RSCK_MARK, SCIFA2_RTS2_MARK, PORT234_FSIAOSLD_MARK, | ||
301 | MSIOF1_RSYNC_MARK, OPORT0_MARK, MFG1_IN2_MARK, PORT235_FSIAILR_MARK, | ||
302 | MSIOF1_MCK0_MARK, I2C_SDA2_MARK, PORT236_FSIAIBT_MARK, | ||
303 | MSIOF1_MCK1_MARK, I2C_SCL2_MARK, PORT237_FSIAISLD_MARK, | ||
304 | MSIOF1_SS1_MARK, EDBGREQ3_MARK, | ||
305 | |||
306 | /* 55-5 */ | ||
307 | MSIOF1_SS2_MARK, | ||
308 | SCIFA6_TXD_MARK, | ||
309 | PORT241_IRDA_OUT_MARK, PORT241_IROUT_MARK, MFG4_OUT1_MARK, | ||
310 | TPU4TO0_MARK, | ||
311 | PORT242_IRDA_IN_MARK, MFG4_IN2_MARK, | ||
312 | PORT243_IRDA_FIRSEL_MARK, PORT243_VIO_CKO2_MARK, | ||
313 | PORT244_SCIFA5_CTS_MARK, MFG2_IN1_MARK, PORT244_SCIFB_CTS_MARK, | ||
314 | PORT244_MSIOF2_RXD_MARK, | ||
315 | PORT245_SCIFA5_RTS_MARK, MFG2_IN2_MARK, PORT245_SCIFB_RTS_MARK, | ||
316 | PORT245_MSIOF2_TXD_MARK, | ||
317 | PORT246_SCIFA5_RXD_MARK, MFG1_OUT1_MARK, PORT246_SCIFB_RXD_MARK, | ||
318 | TPU1TO0_MARK, | ||
319 | PORT247_SCIFA5_TXD_MARK, MFG3_OUT2_MARK, PORT247_SCIFB_TXD_MARK, | ||
320 | TPU3TO1_MARK, | ||
321 | PORT248_SCIFA5_SCK_MARK, MFG2_OUT1_MARK, PORT248_SCIFB_SCK_MARK, | ||
322 | TPU2TO0_MARK, | ||
323 | PORT248_MSIOF2_TSCK_MARK, | ||
324 | PORT249_IROUT_MARK, MFG4_IN1_MARK, PORT249_MSIOF2_TSYNC_MARK, | ||
325 | SDHICLK0_MARK, TCK2_SWCLK_MC0_MARK, | ||
326 | SDHICD0_MARK, | ||
327 | SDHID0_0_MARK, TMS2_SWDIO_MC0_MARK, | ||
328 | SDHID0_1_MARK, TDO2_SWO0_MC0_MARK, | ||
329 | SDHID0_2_MARK, TDI2_MARK, | ||
330 | SDHID0_3_MARK, RTCK2_SWO1_MC0_MARK, | ||
331 | SDHICMD0_MARK, TRST2_MARK, | ||
332 | SDHIWP0_MARK, EDBGREQ2_MARK, | ||
333 | SDHICLK1_MARK, TCK3_SWCLK_MC1_MARK, | ||
334 | SDHID1_0_MARK, M11_SLCD_SO2_MARK, TS_SPSYNC2_MARK, | ||
335 | TMS3_SWDIO_MC1_MARK, | ||
336 | SDHID1_1_MARK, M9_SLCD_A02_MARK, TS_SDAT2_MARK, TDO3_SWO0_MC1_MARK, | ||
337 | SDHID1_2_MARK, M10_SLCD_CK2_MARK, TS_SDEN2_MARK, TDI3_MARK, | ||
338 | SDHID1_3_MARK, M12_SLCD_CE2_MARK, TS_SCK2_MARK, RTCK3_SWO1_MC1_MARK, | ||
339 | SDHICMD1_MARK, TRST3_MARK, | ||
340 | RESETOUTS_MARK, | ||
341 | PINMUX_MARK_END, | ||
342 | }; | ||
343 | |||
344 | static pinmux_enum_t pinmux_data[] = { | ||
345 | /* specify valid pin states for each pin in GPIO mode */ | ||
346 | /* 55-1 (GPIO) */ | ||
347 | PORT_DATA_I_PD(0), PORT_DATA_I_PU(1), | ||
348 | PORT_DATA_I_PU(2), PORT_DATA_I_PU(3), | ||
349 | PORT_DATA_I_PU(4), PORT_DATA_I_PU(5), | ||
350 | PORT_DATA_I_PU(6), PORT_DATA_I_PU(7), | ||
351 | PORT_DATA_I_PU(8), PORT_DATA_I_PU(9), | ||
352 | PORT_DATA_I_PU(10), PORT_DATA_I_PU(11), | ||
353 | PORT_DATA_IO_PU(12), PORT_DATA_IO_PU(13), | ||
354 | PORT_DATA_IO_PU_PD(14), PORT_DATA_IO_PU_PD(15), | ||
355 | PORT_DATA_O(16), PORT_DATA_IO(17), | ||
356 | PORT_DATA_O(18), PORT_DATA_O(19), | ||
357 | PORT_DATA_O(20), PORT_DATA_O(21), | ||
358 | PORT_DATA_O(22), PORT_DATA_O(23), | ||
359 | PORT_DATA_O(24), PORT_DATA_I_PD(25), | ||
360 | PORT_DATA_I_PD(26), PORT_DATA_O(27), | ||
361 | PORT_DATA_O(28), PORT_DATA_O(29), | ||
362 | PORT_DATA_IO(30), PORT_DATA_IO_PU(31), | ||
363 | PORT_DATA_IO_PD(32), PORT_DATA_I_PU(33), | ||
364 | PORT_DATA_IO_PD(34), PORT_DATA_I_PU_PD(35), | ||
365 | PORT_DATA_O(36), PORT_DATA_IO(37), | ||
366 | |||
367 | /* 55-2 (GPIO) */ | ||
368 | PORT_DATA_O(38), PORT_DATA_I_PU(39), | ||
369 | PORT_DATA_I_PU_PD(40), PORT_DATA_O(41), | ||
370 | PORT_DATA_IO_PD(42), PORT_DATA_IO_PD(43), | ||
371 | PORT_DATA_IO_PD(44), PORT_DATA_I_PD(45), | ||
372 | PORT_DATA_I_PD(46), PORT_DATA_I_PD(47), | ||
373 | PORT_DATA_I_PD(48), PORT_DATA_IO_PU_PD(49), | ||
374 | PORT_DATA_IO_PD(50), PORT_DATA_IO_PD(51), | ||
375 | PORT_DATA_O(52), PORT_DATA_IO_PU_PD(53), | ||
376 | PORT_DATA_IO_PU_PD(54), PORT_DATA_IO_PD(55), | ||
377 | PORT_DATA_I_PU_PD(56), PORT_DATA_IO(57), | ||
378 | PORT_DATA_IO(58), PORT_DATA_IO(59), | ||
379 | PORT_DATA_IO(60), PORT_DATA_IO(61), | ||
380 | PORT_DATA_IO_PD(62), PORT_DATA_IO_PD(63), | ||
381 | PORT_DATA_IO_PD(64), PORT_DATA_IO_PD(65), | ||
382 | PORT_DATA_IO_PU_PD(66), PORT_DATA_IO_PU_PD(67), | ||
383 | PORT_DATA_IO_PU_PD(68), PORT_DATA_IO_PU_PD(69), | ||
384 | PORT_DATA_IO_PU_PD(70), PORT_DATA_IO_PU_PD(71), | ||
385 | PORT_DATA_IO_PU_PD(72), PORT_DATA_I_PU_PD(73), | ||
386 | PORT_DATA_IO_PU(74), PORT_DATA_IO_PU(75), | ||
387 | PORT_DATA_IO_PU(76), PORT_DATA_IO_PU(77), | ||
388 | PORT_DATA_IO_PU(78), PORT_DATA_IO_PU(79), | ||
389 | PORT_DATA_IO_PU(80), PORT_DATA_IO_PU(81), | ||
390 | PORT_DATA_IO_PU(82), PORT_DATA_IO_PU(83), | ||
391 | PORT_DATA_IO_PU(84), PORT_DATA_IO_PU(85), | ||
392 | PORT_DATA_IO_PU(86), PORT_DATA_IO_PU(87), | ||
393 | PORT_DATA_IO_PU(88), PORT_DATA_IO_PU(89), | ||
394 | PORT_DATA_O(90), PORT_DATA_IO_PU(91), | ||
395 | PORT_DATA_O(92), | ||
396 | |||
397 | /* 55-3 (GPIO) */ | ||
398 | PORT_DATA_IO_PU(93), | ||
399 | PORT_DATA_O(94), | ||
400 | PORT_DATA_I_PU_PD(95), | ||
401 | PORT_DATA_IO(96), PORT_DATA_IO(97), | ||
402 | PORT_DATA_IO(98), PORT_DATA_I_PU(99), | ||
403 | PORT_DATA_O(100), PORT_DATA_O(101), | ||
404 | PORT_DATA_I_PU(102), PORT_DATA_IO_PD(103), | ||
405 | PORT_DATA_I_PD(104), PORT_DATA_I_PD(105), | ||
406 | PORT_DATA_I_PD(106), PORT_DATA_I_PD(107), | ||
407 | PORT_DATA_I_PD(108), PORT_DATA_IO_PD(109), | ||
408 | PORT_DATA_IO_PD(110), PORT_DATA_I_PD(111), | ||
409 | PORT_DATA_IO_PD(112), PORT_DATA_IO_PD(113), | ||
410 | PORT_DATA_IO_PD(114), PORT_DATA_I_PD(115), | ||
411 | PORT_DATA_I_PD(116), PORT_DATA_IO_PD(117), | ||
412 | PORT_DATA_I_PD(118), PORT_DATA_IO_PD(128), | ||
413 | PORT_DATA_IO_PD(129), PORT_DATA_IO_PD(130), | ||
414 | PORT_DATA_IO_PD(131), PORT_DATA_IO_PD(132), | ||
415 | PORT_DATA_IO_PD(133), PORT_DATA_IO_PU_PD(134), | ||
416 | PORT_DATA_IO_PU_PD(135), PORT_DATA_IO_PU_PD(136), | ||
417 | PORT_DATA_IO_PU_PD(137), PORT_DATA_IO_PD(138), | ||
418 | PORT_DATA_IO_PD(139), PORT_DATA_IO_PD(140), | ||
419 | PORT_DATA_IO_PD(141), PORT_DATA_IO_PD(142), | ||
420 | PORT_DATA_IO_PD(143), PORT_DATA_IO_PU_PD(144), | ||
421 | PORT_DATA_IO_PD(145), PORT_DATA_IO_PU_PD(146), | ||
422 | PORT_DATA_IO_PU_PD(147), PORT_DATA_IO_PU_PD(148), | ||
423 | PORT_DATA_IO_PU_PD(149), PORT_DATA_I_PD(150), | ||
424 | PORT_DATA_IO_PU_PD(151), PORT_DATA_IO_PD(152), | ||
425 | PORT_DATA_IO_PD(153), PORT_DATA_IO_PD(154), | ||
426 | PORT_DATA_I_PD(155), PORT_DATA_IO_PU_PD(156), | ||
427 | PORT_DATA_I_PD(157), PORT_DATA_IO_PD(158), | ||
428 | |||
429 | /* 55-4 (GPIO) */ | ||
430 | PORT_DATA_IO_PU_PD(159), PORT_DATA_IO_PU_PD(160), | ||
431 | PORT_DATA_I_PU_PD(161), PORT_DATA_I_PU_PD(162), | ||
432 | PORT_DATA_IO_PU_PD(163), PORT_DATA_I_PU_PD(164), | ||
433 | PORT_DATA_IO_PD(192), PORT_DATA_IO_PD(193), | ||
434 | PORT_DATA_IO_PD(194), PORT_DATA_IO_PD(195), | ||
435 | PORT_DATA_IO_PD(196), PORT_DATA_IO_PD(197), | ||
436 | PORT_DATA_IO_PD(198), PORT_DATA_IO_PD(199), | ||
437 | PORT_DATA_IO_PU_PD(200), PORT_DATA_IO_PU_PD(201), | ||
438 | PORT_DATA_IO_PU_PD(202), PORT_DATA_IO_PU_PD(203), | ||
439 | PORT_DATA_IO_PU_PD(204), PORT_DATA_IO_PU_PD(205), | ||
440 | PORT_DATA_IO_PU_PD(206), PORT_DATA_IO_PD(207), | ||
441 | PORT_DATA_IO_PD(208), PORT_DATA_IO_PD(209), | ||
442 | PORT_DATA_IO_PD(210), PORT_DATA_IO_PD(211), | ||
443 | PORT_DATA_IO_PD(212), PORT_DATA_IO_PD(213), | ||
444 | PORT_DATA_IO_PD(214), PORT_DATA_IO_PD(215), | ||
445 | PORT_DATA_IO_PD(216), PORT_DATA_IO_PD(217), | ||
446 | PORT_DATA_O(218), PORT_DATA_IO_PD(219), | ||
447 | PORT_DATA_IO_PD(220), PORT_DATA_IO_PD(221), | ||
448 | PORT_DATA_IO_PU_PD(222), | ||
449 | PORT_DATA_I_PU_PD(223), PORT_DATA_I_PU_PD(224), | ||
450 | PORT_DATA_IO_PU_PD(225), PORT_DATA_O(226), | ||
451 | PORT_DATA_IO_PU_PD(227), PORT_DATA_I_PD(228), | ||
452 | PORT_DATA_I_PD(229), PORT_DATA_IO(230), | ||
453 | PORT_DATA_IO_PD(231), PORT_DATA_IO_PU_PD(232), | ||
454 | PORT_DATA_I_PD(233), PORT_DATA_IO_PU_PD(234), | ||
455 | PORT_DATA_IO_PU_PD(235), PORT_DATA_IO_PU_PD(236), | ||
456 | PORT_DATA_IO_PD(237), PORT_DATA_IO_PU_PD(238), | ||
457 | |||
458 | /* 55-5 (GPIO) */ | ||
459 | PORT_DATA_IO_PU_PD(239), PORT_DATA_IO_PU_PD(240), | ||
460 | PORT_DATA_O(241), PORT_DATA_I_PD(242), | ||
461 | PORT_DATA_IO_PU_PD(243), PORT_DATA_IO_PU_PD(244), | ||
462 | PORT_DATA_IO_PU_PD(245), PORT_DATA_IO_PU_PD(246), | ||
463 | PORT_DATA_IO_PU_PD(247), PORT_DATA_IO_PU_PD(248), | ||
464 | PORT_DATA_IO_PU_PD(249), PORT_DATA_IO_PD(250), | ||
465 | PORT_DATA_IO_PU_PD(251), PORT_DATA_IO_PU_PD(252), | ||
466 | PORT_DATA_IO_PU_PD(253), PORT_DATA_IO_PU_PD(254), | ||
467 | PORT_DATA_IO_PU_PD(255), PORT_DATA_IO_PU_PD(256), | ||
468 | PORT_DATA_IO_PU_PD(257), PORT_DATA_IO_PD(258), | ||
469 | PORT_DATA_IO_PU_PD(259), PORT_DATA_IO_PU_PD(260), | ||
470 | PORT_DATA_IO_PU_PD(261), PORT_DATA_IO_PU_PD(262), | ||
471 | PORT_DATA_IO_PU_PD(263), | ||
472 | |||
473 | /* Special Pull-up / Pull-down Functions */ | ||
474 | PINMUX_DATA(PORT66_KEYIN0_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
475 | PORT66_FN2, PORT66_IN_PU), | ||
476 | PINMUX_DATA(PORT67_KEYIN1_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
477 | PORT67_FN2, PORT67_IN_PU), | ||
478 | PINMUX_DATA(PORT68_KEYIN2_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
479 | PORT68_FN2, PORT68_IN_PU), | ||
480 | PINMUX_DATA(PORT69_KEYIN3_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
481 | PORT69_FN2, PORT69_IN_PU), | ||
482 | PINMUX_DATA(PORT70_KEYIN4_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
483 | PORT70_FN2, PORT70_IN_PU), | ||
484 | PINMUX_DATA(PORT71_KEYIN5_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
485 | PORT71_FN2, PORT71_IN_PU), | ||
486 | PINMUX_DATA(PORT72_KEYIN6_PU_MARK, MSELBCR_MSEL17_0, MSELBCR_MSEL16_0, | ||
487 | PORT72_FN2, PORT72_IN_PU), | ||
488 | |||
489 | |||
490 | /* 55-1 (FN) */ | ||
491 | PINMUX_DATA(VBUS_0_MARK, PORT0_FN1), | ||
492 | PINMUX_DATA(CPORT0_MARK, PORT1_FN1), | ||
493 | PINMUX_DATA(CPORT1_MARK, PORT2_FN1), | ||
494 | PINMUX_DATA(CPORT2_MARK, PORT3_FN1), | ||
495 | PINMUX_DATA(CPORT3_MARK, PORT4_FN1), | ||
496 | PINMUX_DATA(CPORT4_MARK, PORT5_FN1), | ||
497 | PINMUX_DATA(CPORT5_MARK, PORT6_FN1), | ||
498 | PINMUX_DATA(CPORT6_MARK, PORT7_FN1), | ||
499 | PINMUX_DATA(CPORT7_MARK, PORT8_FN1), | ||
500 | PINMUX_DATA(CPORT8_MARK, PORT9_FN1), | ||
501 | PINMUX_DATA(CPORT9_MARK, PORT10_FN1), | ||
502 | PINMUX_DATA(CPORT10_MARK, PORT11_FN1), | ||
503 | PINMUX_DATA(CPORT11_MARK, PORT12_FN1), | ||
504 | PINMUX_DATA(SIN2_MARK, PORT12_FN2), | ||
505 | PINMUX_DATA(CPORT12_MARK, PORT13_FN1), | ||
506 | PINMUX_DATA(XCTS2_MARK, PORT13_FN2), | ||
507 | PINMUX_DATA(CPORT13_MARK, PORT14_FN1), | ||
508 | PINMUX_DATA(RFSPO4_MARK, PORT14_FN2), | ||
509 | PINMUX_DATA(CPORT14_MARK, PORT15_FN1), | ||
510 | PINMUX_DATA(RFSPO5_MARK, PORT15_FN2), | ||
511 | PINMUX_DATA(CPORT15_MARK, PORT16_FN1), | ||
512 | PINMUX_DATA(SCIFA0_SCK_MARK, PORT16_FN2), | ||
513 | PINMUX_DATA(GPS_AGC2_MARK, PORT16_FN3), | ||
514 | PINMUX_DATA(CPORT16_MARK, PORT17_FN1), | ||
515 | PINMUX_DATA(SCIFA0_TXD_MARK, PORT17_FN2), | ||
516 | PINMUX_DATA(GPS_AGC3_MARK, PORT17_FN3), | ||
517 | PINMUX_DATA(CPORT17_IC_OE_MARK, PORT18_FN1), | ||
518 | PINMUX_DATA(SOUT2_MARK, PORT18_FN2), | ||
519 | PINMUX_DATA(CPORT18_MARK, PORT19_FN1), | ||
520 | PINMUX_DATA(XRTS2_MARK, PORT19_FN2), | ||
521 | PINMUX_DATA(PORT19_VIO_CKO2_MARK, PORT19_FN3), | ||
522 | PINMUX_DATA(CPORT19_MPORT1_MARK, PORT20_FN1), | ||
523 | PINMUX_DATA(CPORT20_MARK, PORT21_FN1), | ||
524 | PINMUX_DATA(RFSPO6_MARK, PORT21_FN2), | ||
525 | PINMUX_DATA(CPORT21_MARK, PORT22_FN1), | ||
526 | PINMUX_DATA(STATUS0_MARK, PORT22_FN2), | ||
527 | PINMUX_DATA(CPORT22_MARK, PORT23_FN1), | ||
528 | PINMUX_DATA(STATUS1_MARK, PORT23_FN2), | ||
529 | PINMUX_DATA(CPORT23_MARK, PORT24_FN1), | ||
530 | PINMUX_DATA(STATUS2_MARK, PORT24_FN2), | ||
531 | PINMUX_DATA(RFSPO7_MARK, PORT24_FN3), | ||
532 | PINMUX_DATA(B_SYNLD1_MARK, PORT25_FN1), | ||
533 | PINMUX_DATA(B_SYNLD2_MARK, PORT26_FN1), | ||
534 | PINMUX_DATA(SYSENMSK_MARK, PORT26_FN2), | ||
535 | PINMUX_DATA(XMAINPS_MARK, PORT27_FN1), | ||
536 | PINMUX_DATA(XDIVPS_MARK, PORT28_FN1), | ||
537 | PINMUX_DATA(XIDRST_MARK, PORT29_FN1), | ||
538 | PINMUX_DATA(IDCLK_MARK, PORT30_FN1), | ||
539 | PINMUX_DATA(IC_DP_MARK, PORT30_FN2), | ||
540 | PINMUX_DATA(IDIO_MARK, PORT31_FN1), | ||
541 | PINMUX_DATA(IC_DM_MARK, PORT31_FN2), | ||
542 | PINMUX_DATA(SOUT1_MARK, PORT32_FN1), | ||
543 | PINMUX_DATA(SCIFA4_TXD_MARK, PORT32_FN2), | ||
544 | PINMUX_DATA(M02_BERDAT_MARK, PORT32_FN3), | ||
545 | PINMUX_DATA(SIN1_MARK, PORT33_FN1), | ||
546 | PINMUX_DATA(SCIFA4_RXD_MARK, PORT33_FN2), | ||
547 | PINMUX_DATA(XWUP_MARK, PORT33_FN3), | ||
548 | PINMUX_DATA(XRTS1_MARK, PORT34_FN1), | ||
549 | PINMUX_DATA(SCIFA4_RTS_MARK, PORT34_FN2), | ||
550 | PINMUX_DATA(M03_BERCLK_MARK, PORT34_FN3), | ||
551 | PINMUX_DATA(XCTS1_MARK, PORT35_FN1), | ||
552 | PINMUX_DATA(SCIFA4_CTS_MARK, PORT35_FN2), | ||
553 | PINMUX_DATA(PCMCLKO_MARK, PORT36_FN1), | ||
554 | PINMUX_DATA(SYNC8KO_MARK, PORT37_FN1), | ||
555 | |||
556 | /* 55-2 (FN) */ | ||
557 | PINMUX_DATA(DNPCM_A_MARK, PORT38_FN1), | ||
558 | PINMUX_DATA(UPPCM_A_MARK, PORT39_FN1), | ||
559 | PINMUX_DATA(VACK_MARK, PORT40_FN1), | ||
560 | PINMUX_DATA(XTALB1L_MARK, PORT41_FN1), | ||
561 | PINMUX_DATA(GPS_AGC1_MARK, PORT42_FN1), | ||
562 | PINMUX_DATA(SCIFA0_RTS_MARK, PORT42_FN2), | ||
563 | PINMUX_DATA(GPS_AGC4_MARK, PORT43_FN1), | ||
564 | PINMUX_DATA(SCIFA0_RXD_MARK, PORT43_FN2), | ||
565 | PINMUX_DATA(GPS_PWRDOWN_MARK, PORT44_FN1), | ||
566 | PINMUX_DATA(SCIFA0_CTS_MARK, PORT44_FN2), | ||
567 | PINMUX_DATA(GPS_IM_MARK, PORT45_FN1), | ||
568 | PINMUX_DATA(GPS_IS_MARK, PORT46_FN1), | ||
569 | PINMUX_DATA(GPS_QM_MARK, PORT47_FN1), | ||
570 | PINMUX_DATA(GPS_QS_MARK, PORT48_FN1), | ||
571 | PINMUX_DATA(FMSOCK_MARK, PORT49_FN1), | ||
572 | PINMUX_DATA(PORT49_IRDA_OUT_MARK, PORT49_FN2), | ||
573 | PINMUX_DATA(PORT49_IROUT_MARK, PORT49_FN3), | ||
574 | PINMUX_DATA(FMSOOLR_MARK, PORT50_FN1), | ||
575 | PINMUX_DATA(BBIF2_TSYNC2_MARK, PORT50_FN2), | ||
576 | PINMUX_DATA(TPU2TO2_MARK, PORT50_FN3), | ||
577 | PINMUX_DATA(IPORT3_MARK, PORT50_FN4), | ||
578 | PINMUX_DATA(FMSIOLR_MARK, PORT50_FN5), | ||
579 | PINMUX_DATA(FMSOOBT_MARK, PORT51_FN1), | ||
580 | PINMUX_DATA(BBIF2_TSCK2_MARK, PORT51_FN2), | ||
581 | PINMUX_DATA(TPU2TO3_MARK, PORT51_FN3), | ||
582 | PINMUX_DATA(OPORT1_MARK, PORT51_FN4), | ||
583 | PINMUX_DATA(FMSIOBT_MARK, PORT51_FN5), | ||
584 | PINMUX_DATA(FMSOSLD_MARK, PORT52_FN1), | ||
585 | PINMUX_DATA(BBIF2_TXD2_MARK, PORT52_FN2), | ||
586 | PINMUX_DATA(OPORT2_MARK, PORT52_FN3), | ||
587 | PINMUX_DATA(FMSOILR_MARK, PORT53_FN1), | ||
588 | PINMUX_DATA(PORT53_IRDA_IN_MARK, PORT53_FN2), | ||
589 | PINMUX_DATA(TPU3TO3_MARK, PORT53_FN3), | ||
590 | PINMUX_DATA(OPORT3_MARK, PORT53_FN4), | ||
591 | PINMUX_DATA(FMSIILR_MARK, PORT53_FN5), | ||
592 | PINMUX_DATA(FMSOIBT_MARK, PORT54_FN1), | ||
593 | PINMUX_DATA(PORT54_IRDA_FIRSEL_MARK, PORT54_FN2), | ||
594 | PINMUX_DATA(TPU3TO2_MARK, PORT54_FN3), | ||
595 | PINMUX_DATA(FMSIIBT_MARK, PORT54_FN4), | ||
596 | PINMUX_DATA(FMSISLD_MARK, PORT55_FN1), | ||
597 | PINMUX_DATA(MFG0_OUT1_MARK, PORT55_FN2), | ||
598 | PINMUX_DATA(TPU0TO0_MARK, PORT55_FN3), | ||
599 | PINMUX_DATA(A0_EA0_MARK, PORT57_FN1), | ||
600 | PINMUX_DATA(BS_MARK, PORT57_FN2), | ||
601 | PINMUX_DATA(A12_EA12_MARK, PORT58_FN1), | ||
602 | PINMUX_DATA(PORT58_VIO_CKOR_MARK, PORT58_FN2), | ||
603 | PINMUX_DATA(TPU4TO2_MARK, PORT58_FN3), | ||
604 | PINMUX_DATA(A13_EA13_MARK, PORT59_FN1), | ||
605 | PINMUX_DATA(PORT59_IROUT_MARK, PORT59_FN2), | ||
606 | PINMUX_DATA(MFG0_OUT2_MARK, PORT59_FN3), | ||
607 | PINMUX_DATA(TPU0TO1_MARK, PORT59_FN4), | ||
608 | PINMUX_DATA(A14_EA14_MARK, PORT60_FN1), | ||
609 | PINMUX_DATA(PORT60_KEYOUT5_MARK, PORT60_FN2), | ||
610 | PINMUX_DATA(A15_EA15_MARK, PORT61_FN1), | ||
611 | PINMUX_DATA(PORT61_KEYOUT4_MARK, PORT61_FN2), | ||
612 | PINMUX_DATA(A16_EA16_MARK, PORT62_FN1), | ||
613 | PINMUX_DATA(PORT62_KEYOUT3_MARK, PORT62_FN2), | ||
614 | PINMUX_DATA(MSIOF0_SS1_MARK, PORT62_FN3), | ||
615 | PINMUX_DATA(A17_EA17_MARK, PORT63_FN1), | ||
616 | PINMUX_DATA(PORT63_KEYOUT2_MARK, PORT63_FN2), | ||
617 | PINMUX_DATA(MSIOF0_TSYNC_MARK, PORT63_FN3), | ||
618 | PINMUX_DATA(A18_EA18_MARK, PORT64_FN1), | ||
619 | PINMUX_DATA(PORT64_KEYOUT1_MARK, PORT64_FN2), | ||
620 | PINMUX_DATA(MSIOF0_TSCK_MARK, PORT64_FN3), | ||
621 | PINMUX_DATA(A19_EA19_MARK, PORT65_FN1), | ||
622 | PINMUX_DATA(PORT65_KEYOUT0_MARK, PORT65_FN2), | ||
623 | PINMUX_DATA(MSIOF0_TXD_MARK, PORT65_FN3), | ||
624 | PINMUX_DATA(A20_EA20_MARK, PORT66_FN1), | ||
625 | PINMUX_DATA(PORT66_KEYIN0_MARK, PORT66_FN2), | ||
626 | PINMUX_DATA(MSIOF0_RSCK_MARK, PORT66_FN3), | ||
627 | PINMUX_DATA(A21_EA21_MARK, PORT67_FN1), | ||
628 | PINMUX_DATA(PORT67_KEYIN1_MARK, PORT67_FN2), | ||
629 | PINMUX_DATA(MSIOF0_RSYNC_MARK, PORT67_FN3), | ||
630 | PINMUX_DATA(A22_EA22_MARK, PORT68_FN1), | ||
631 | PINMUX_DATA(PORT68_KEYIN2_MARK, PORT68_FN2), | ||
632 | PINMUX_DATA(MSIOF0_MCK0_MARK, PORT68_FN3), | ||
633 | PINMUX_DATA(A23_EA23_MARK, PORT69_FN1), | ||
634 | PINMUX_DATA(PORT69_KEYIN3_MARK, PORT69_FN2), | ||
635 | PINMUX_DATA(MSIOF0_MCK1_MARK, PORT69_FN3), | ||
636 | PINMUX_DATA(A24_EA24_MARK, PORT70_FN1), | ||
637 | PINMUX_DATA(PORT70_KEYIN4_MARK, PORT70_FN2), | ||
638 | PINMUX_DATA(MSIOF0_RXD_MARK, PORT70_FN3), | ||
639 | PINMUX_DATA(A25_EA25_MARK, PORT71_FN1), | ||
640 | PINMUX_DATA(PORT71_KEYIN5_MARK, PORT71_FN2), | ||
641 | PINMUX_DATA(MSIOF0_SS2_MARK, PORT71_FN3), | ||
642 | PINMUX_DATA(A26_MARK, PORT72_FN1), | ||
643 | PINMUX_DATA(PORT72_KEYIN6_MARK, PORT72_FN2), | ||
644 | PINMUX_DATA(D0_ED0_NAF0_MARK, PORT74_FN1), | ||
645 | PINMUX_DATA(D1_ED1_NAF1_MARK, PORT75_FN1), | ||
646 | PINMUX_DATA(D2_ED2_NAF2_MARK, PORT76_FN1), | ||
647 | PINMUX_DATA(D3_ED3_NAF3_MARK, PORT77_FN1), | ||
648 | PINMUX_DATA(D4_ED4_NAF4_MARK, PORT78_FN1), | ||
649 | PINMUX_DATA(D5_ED5_NAF5_MARK, PORT79_FN1), | ||
650 | PINMUX_DATA(D6_ED6_NAF6_MARK, PORT80_FN1), | ||
651 | PINMUX_DATA(D7_ED7_NAF7_MARK, PORT81_FN1), | ||
652 | PINMUX_DATA(D8_ED8_NAF8_MARK, PORT82_FN1), | ||
653 | PINMUX_DATA(D9_ED9_NAF9_MARK, PORT83_FN1), | ||
654 | PINMUX_DATA(D10_ED10_NAF10_MARK, PORT84_FN1), | ||
655 | PINMUX_DATA(D11_ED11_NAF11_MARK, PORT85_FN1), | ||
656 | PINMUX_DATA(D12_ED12_NAF12_MARK, PORT86_FN1), | ||
657 | PINMUX_DATA(D13_ED13_NAF13_MARK, PORT87_FN1), | ||
658 | PINMUX_DATA(D14_ED14_NAF14_MARK, PORT88_FN1), | ||
659 | PINMUX_DATA(D15_ED15_NAF15_MARK, PORT89_FN1), | ||
660 | PINMUX_DATA(CS4_MARK, PORT90_FN1), | ||
661 | PINMUX_DATA(CS5A_MARK, PORT91_FN1), | ||
662 | PINMUX_DATA(FMSICK_MARK, PORT91_FN2), | ||
663 | PINMUX_DATA(CS5B_MARK, PORT92_FN1), | ||
664 | PINMUX_DATA(FCE1_MARK, PORT92_FN2), | ||
665 | |||
666 | /* 55-3 (FN) */ | ||
667 | PINMUX_DATA(CS6B_MARK, PORT93_FN1), | ||
668 | PINMUX_DATA(XCS2_MARK, PORT93_FN2), | ||
669 | PINMUX_DATA(CS6A_MARK, PORT93_FN3), | ||
670 | PINMUX_DATA(DACK0_MARK, PORT93_FN4), | ||
671 | PINMUX_DATA(FCE0_MARK, PORT94_FN1), | ||
672 | PINMUX_DATA(WAIT_MARK, PORT95_FN1), | ||
673 | PINMUX_DATA(DREQ0_MARK, PORT95_FN2), | ||
674 | PINMUX_DATA(RD_XRD_MARK, PORT96_FN1), | ||
675 | PINMUX_DATA(WE0_XWR0_FWE_MARK, PORT97_FN1), | ||
676 | PINMUX_DATA(WE1_XWR1_MARK, PORT98_FN1), | ||
677 | PINMUX_DATA(FRB_MARK, PORT99_FN1), | ||
678 | PINMUX_DATA(CKO_MARK, PORT100_FN1), | ||
679 | PINMUX_DATA(NBRSTOUT_MARK, PORT101_FN1), | ||
680 | PINMUX_DATA(NBRST_MARK, PORT102_FN1), | ||
681 | PINMUX_DATA(GPS_EPPSIN_MARK, PORT106_FN1), | ||
682 | PINMUX_DATA(LATCHPULSE_MARK, PORT110_FN1), | ||
683 | PINMUX_DATA(LTESIGNAL_MARK, PORT111_FN1), | ||
684 | PINMUX_DATA(LEGACYSTATE_MARK, PORT112_FN1), | ||
685 | PINMUX_DATA(TCKON_MARK, PORT118_FN1), | ||
686 | PINMUX_DATA(VIO_VD_MARK, PORT128_FN1), | ||
687 | PINMUX_DATA(PORT128_KEYOUT0_MARK, PORT128_FN2), | ||
688 | PINMUX_DATA(IPORT0_MARK, PORT128_FN3), | ||
689 | PINMUX_DATA(VIO_HD_MARK, PORT129_FN1), | ||
690 | PINMUX_DATA(PORT129_KEYOUT1_MARK, PORT129_FN2), | ||
691 | PINMUX_DATA(IPORT1_MARK, PORT129_FN3), | ||
692 | PINMUX_DATA(VIO_D0_MARK, PORT130_FN1), | ||
693 | PINMUX_DATA(PORT130_KEYOUT2_MARK, PORT130_FN2), | ||
694 | PINMUX_DATA(PORT130_MSIOF2_RXD_MARK, PORT130_FN3), | ||
695 | PINMUX_DATA(VIO_D1_MARK, PORT131_FN1), | ||
696 | PINMUX_DATA(PORT131_KEYOUT3_MARK, PORT131_FN2), | ||
697 | PINMUX_DATA(PORT131_MSIOF2_SS1_MARK, PORT131_FN3), | ||
698 | PINMUX_DATA(VIO_D2_MARK, PORT132_FN1), | ||
699 | PINMUX_DATA(PORT132_KEYOUT4_MARK, PORT132_FN2), | ||
700 | PINMUX_DATA(PORT132_MSIOF2_SS2_MARK, PORT132_FN3), | ||
701 | PINMUX_DATA(VIO_D3_MARK, PORT133_FN1), | ||
702 | PINMUX_DATA(PORT133_KEYOUT5_MARK, PORT133_FN2), | ||
703 | PINMUX_DATA(PORT133_MSIOF2_TSYNC_MARK, PORT133_FN3), | ||
704 | PINMUX_DATA(VIO_D4_MARK, PORT134_FN1), | ||
705 | PINMUX_DATA(PORT134_KEYIN0_MARK, PORT134_FN2), | ||
706 | PINMUX_DATA(PORT134_MSIOF2_TXD_MARK, PORT134_FN3), | ||
707 | PINMUX_DATA(VIO_D5_MARK, PORT135_FN1), | ||
708 | PINMUX_DATA(PORT135_KEYIN1_MARK, PORT135_FN2), | ||
709 | PINMUX_DATA(PORT135_MSIOF2_TSCK_MARK, PORT135_FN3), | ||
710 | PINMUX_DATA(VIO_D6_MARK, PORT136_FN1), | ||
711 | PINMUX_DATA(PORT136_KEYIN2_MARK, PORT136_FN2), | ||
712 | PINMUX_DATA(VIO_D7_MARK, PORT137_FN1), | ||
713 | PINMUX_DATA(PORT137_KEYIN3_MARK, PORT137_FN2), | ||
714 | PINMUX_DATA(VIO_D8_MARK, PORT138_FN1), | ||
715 | PINMUX_DATA(M9_SLCD_A01_MARK, PORT138_FN2), | ||
716 | PINMUX_DATA(PORT138_FSIAOMC_MARK, PORT138_FN3), | ||
717 | PINMUX_DATA(VIO_D9_MARK, PORT139_FN1), | ||
718 | PINMUX_DATA(M10_SLCD_CK1_MARK, PORT139_FN2), | ||
719 | PINMUX_DATA(PORT139_FSIAOLR_MARK, PORT139_FN3), | ||
720 | PINMUX_DATA(VIO_D10_MARK, PORT140_FN1), | ||
721 | PINMUX_DATA(M11_SLCD_SO1_MARK, PORT140_FN2), | ||
722 | PINMUX_DATA(TPU0TO2_MARK, PORT140_FN3), | ||
723 | PINMUX_DATA(PORT140_FSIAOBT_MARK, PORT140_FN4), | ||
724 | PINMUX_DATA(VIO_D11_MARK, PORT141_FN1), | ||
725 | PINMUX_DATA(M12_SLCD_CE1_MARK, PORT141_FN2), | ||
726 | PINMUX_DATA(TPU0TO3_MARK, PORT141_FN3), | ||
727 | PINMUX_DATA(PORT141_FSIAOSLD_MARK, PORT141_FN4), | ||
728 | PINMUX_DATA(VIO_D12_MARK, PORT142_FN1), | ||
729 | PINMUX_DATA(M13_BSW_MARK, PORT142_FN2), | ||
730 | PINMUX_DATA(PORT142_FSIACK_MARK, PORT142_FN3), | ||
731 | PINMUX_DATA(VIO_D13_MARK, PORT143_FN1), | ||
732 | PINMUX_DATA(M14_GSW_MARK, PORT143_FN2), | ||
733 | PINMUX_DATA(PORT143_FSIAILR_MARK, PORT143_FN3), | ||
734 | PINMUX_DATA(VIO_D14_MARK, PORT144_FN1), | ||
735 | PINMUX_DATA(M15_RSW_MARK, PORT144_FN2), | ||
736 | PINMUX_DATA(PORT144_FSIAIBT_MARK, PORT144_FN3), | ||
737 | PINMUX_DATA(VIO_D15_MARK, PORT145_FN1), | ||
738 | PINMUX_DATA(TPU1TO3_MARK, PORT145_FN2), | ||
739 | PINMUX_DATA(PORT145_FSIAISLD_MARK, PORT145_FN3), | ||
740 | PINMUX_DATA(VIO_CLK_MARK, PORT146_FN1), | ||
741 | PINMUX_DATA(PORT146_KEYIN4_MARK, PORT146_FN2), | ||
742 | PINMUX_DATA(IPORT2_MARK, PORT146_FN3), | ||
743 | PINMUX_DATA(VIO_FIELD_MARK, PORT147_FN1), | ||
744 | PINMUX_DATA(PORT147_KEYIN5_MARK, PORT147_FN2), | ||
745 | PINMUX_DATA(VIO_CKO_MARK, PORT148_FN1), | ||
746 | PINMUX_DATA(PORT148_KEYIN6_MARK, PORT148_FN2), | ||
747 | PINMUX_DATA(A27_MARK, PORT149_FN1), | ||
748 | PINMUX_DATA(RDWR_XWE_MARK, PORT149_FN2), | ||
749 | PINMUX_DATA(MFG0_IN1_MARK, PORT149_FN3), | ||
750 | PINMUX_DATA(MFG0_IN2_MARK, PORT150_FN1), | ||
751 | PINMUX_DATA(TS_SPSYNC3_MARK, PORT151_FN1), | ||
752 | PINMUX_DATA(MSIOF2_RSCK_MARK, PORT151_FN2), | ||
753 | PINMUX_DATA(TS_SDAT3_MARK, PORT152_FN1), | ||
754 | PINMUX_DATA(MSIOF2_RSYNC_MARK, PORT152_FN2), | ||
755 | PINMUX_DATA(TPU1TO2_MARK, PORT153_FN1), | ||
756 | PINMUX_DATA(TS_SDEN3_MARK, PORT153_FN2), | ||
757 | PINMUX_DATA(PORT153_MSIOF2_SS1_MARK, PORT153_FN3), | ||
758 | PINMUX_DATA(SOUT3_MARK, PORT154_FN1), | ||
759 | PINMUX_DATA(SCIFA2_TXD1_MARK, PORT154_FN2), | ||
760 | PINMUX_DATA(MSIOF2_MCK0_MARK, PORT154_FN3), | ||
761 | PINMUX_DATA(SIN3_MARK, PORT155_FN1), | ||
762 | PINMUX_DATA(SCIFA2_RXD1_MARK, PORT155_FN2), | ||
763 | PINMUX_DATA(MSIOF2_MCK1_MARK, PORT155_FN3), | ||
764 | PINMUX_DATA(XRTS3_MARK, PORT156_FN1), | ||
765 | PINMUX_DATA(SCIFA2_RTS1_MARK, PORT156_FN2), | ||
766 | PINMUX_DATA(PORT156_MSIOF2_SS2_MARK, PORT156_FN3), | ||
767 | PINMUX_DATA(XCTS3_MARK, PORT157_FN1), | ||
768 | PINMUX_DATA(SCIFA2_CTS1_MARK, PORT157_FN2), | ||
769 | PINMUX_DATA(PORT157_MSIOF2_RXD_MARK, PORT157_FN3), | ||
770 | |||
771 | /* 55-4 (FN) */ | ||
772 | PINMUX_DATA(DINT_MARK, PORT158_FN1), | ||
773 | PINMUX_DATA(SCIFA2_SCK1_MARK, PORT158_FN2), | ||
774 | PINMUX_DATA(TS_SCK3_MARK, PORT158_FN3), | ||
775 | PINMUX_DATA(PORT159_SCIFB_SCK_MARK, PORT159_FN1), | ||
776 | PINMUX_DATA(PORT159_SCIFA5_SCK_MARK, PORT159_FN2), | ||
777 | PINMUX_DATA(NMI_MARK, PORT159_FN3), | ||
778 | PINMUX_DATA(PORT160_SCIFB_TXD_MARK, PORT160_FN1), | ||
779 | PINMUX_DATA(PORT160_SCIFA5_TXD_MARK, PORT160_FN2), | ||
780 | PINMUX_DATA(SOUT0_MARK, PORT160_FN3), | ||
781 | PINMUX_DATA(PORT161_SCIFB_CTS_MARK, PORT161_FN1), | ||
782 | PINMUX_DATA(PORT161_SCIFA5_CTS_MARK, PORT161_FN2), | ||
783 | PINMUX_DATA(XCTS0_MARK, PORT161_FN3), | ||
784 | PINMUX_DATA(MFG3_IN2_MARK, PORT161_FN4), | ||
785 | PINMUX_DATA(PORT162_SCIFB_RXD_MARK, PORT162_FN1), | ||
786 | PINMUX_DATA(PORT162_SCIFA5_RXD_MARK, PORT162_FN2), | ||
787 | PINMUX_DATA(SIN0_MARK, PORT162_FN3), | ||
788 | PINMUX_DATA(MFG3_IN1_MARK, PORT162_FN4), | ||
789 | PINMUX_DATA(PORT163_SCIFB_RTS_MARK, PORT163_FN1), | ||
790 | PINMUX_DATA(PORT163_SCIFA5_RTS_MARK, PORT163_FN2), | ||
791 | PINMUX_DATA(XRTS0_MARK, PORT163_FN3), | ||
792 | PINMUX_DATA(MFG3_OUT1_MARK, PORT163_FN4), | ||
793 | PINMUX_DATA(TPU3TO0_MARK, PORT163_FN5), | ||
794 | PINMUX_DATA(LCDD0_MARK, PORT192_FN1), | ||
795 | PINMUX_DATA(PORT192_KEYOUT0_MARK, PORT192_FN2), | ||
796 | PINMUX_DATA(EXT_CKI_MARK, PORT192_FN3), | ||
797 | PINMUX_DATA(LCDD1_MARK, PORT193_FN1), | ||
798 | PINMUX_DATA(PORT193_KEYOUT1_MARK, PORT193_FN2), | ||
799 | PINMUX_DATA(PORT193_SCIFA5_CTS_MARK, PORT193_FN3), | ||
800 | PINMUX_DATA(BBIF2_TSYNC1_MARK, PORT193_FN4), | ||
801 | PINMUX_DATA(LCDD2_MARK, PORT194_FN1), | ||
802 | PINMUX_DATA(PORT194_KEYOUT2_MARK, PORT194_FN2), | ||
803 | PINMUX_DATA(PORT194_SCIFA5_RTS_MARK, PORT194_FN3), | ||
804 | PINMUX_DATA(BBIF2_TSCK1_MARK, PORT194_FN4), | ||
805 | PINMUX_DATA(LCDD3_MARK, PORT195_FN1), | ||
806 | PINMUX_DATA(PORT195_KEYOUT3_MARK, PORT195_FN2), | ||
807 | PINMUX_DATA(PORT195_SCIFA5_RXD_MARK, PORT195_FN3), | ||
808 | PINMUX_DATA(BBIF2_TXD1_MARK, PORT195_FN4), | ||
809 | PINMUX_DATA(LCDD4_MARK, PORT196_FN1), | ||
810 | PINMUX_DATA(PORT196_KEYOUT4_MARK, PORT196_FN2), | ||
811 | PINMUX_DATA(PORT196_SCIFA5_TXD_MARK, PORT196_FN3), | ||
812 | PINMUX_DATA(LCDD5_MARK, PORT197_FN1), | ||
813 | PINMUX_DATA(PORT197_KEYOUT5_MARK, PORT197_FN2), | ||
814 | PINMUX_DATA(PORT197_SCIFA5_SCK_MARK, PORT197_FN3), | ||
815 | PINMUX_DATA(MFG2_OUT2_MARK, PORT197_FN4), | ||
816 | PINMUX_DATA(LCDD6_MARK, PORT198_FN1), | ||
817 | PINMUX_DATA(LCDD7_MARK, PORT199_FN1), | ||
818 | PINMUX_DATA(TPU4TO1_MARK, PORT199_FN2), | ||
819 | PINMUX_DATA(MFG4_OUT2_MARK, PORT199_FN3), | ||
820 | PINMUX_DATA(LCDD8_MARK, PORT200_FN1), | ||
821 | PINMUX_DATA(PORT200_KEYIN0_MARK, PORT200_FN2), | ||
822 | PINMUX_DATA(VIO_DR0_MARK, PORT200_FN3), | ||
823 | PINMUX_DATA(D16_MARK, PORT200_FN4), | ||
824 | PINMUX_DATA(LCDD9_MARK, PORT201_FN1), | ||
825 | PINMUX_DATA(PORT201_KEYIN1_MARK, PORT201_FN2), | ||
826 | PINMUX_DATA(VIO_DR1_MARK, PORT201_FN3), | ||
827 | PINMUX_DATA(D17_MARK, PORT201_FN4), | ||
828 | PINMUX_DATA(LCDD10_MARK, PORT202_FN1), | ||
829 | PINMUX_DATA(PORT202_KEYIN2_MARK, PORT202_FN2), | ||
830 | PINMUX_DATA(VIO_DR2_MARK, PORT202_FN3), | ||
831 | PINMUX_DATA(D18_MARK, PORT202_FN4), | ||
832 | PINMUX_DATA(LCDD11_MARK, PORT203_FN1), | ||
833 | PINMUX_DATA(PORT203_KEYIN3_MARK, PORT203_FN2), | ||
834 | PINMUX_DATA(VIO_DR3_MARK, PORT203_FN3), | ||
835 | PINMUX_DATA(D19_MARK, PORT203_FN4), | ||
836 | PINMUX_DATA(LCDD12_MARK, PORT204_FN1), | ||
837 | PINMUX_DATA(PORT204_KEYIN4_MARK, PORT204_FN2), | ||
838 | PINMUX_DATA(VIO_DR4_MARK, PORT204_FN3), | ||
839 | PINMUX_DATA(D20_MARK, PORT204_FN4), | ||
840 | PINMUX_DATA(LCDD13_MARK, PORT205_FN1), | ||
841 | PINMUX_DATA(PORT205_KEYIN5_MARK, PORT205_FN2), | ||
842 | PINMUX_DATA(VIO_DR5_MARK, PORT205_FN3), | ||
843 | PINMUX_DATA(D21_MARK, PORT205_FN4), | ||
844 | PINMUX_DATA(LCDD14_MARK, PORT206_FN1), | ||
845 | PINMUX_DATA(PORT206_KEYIN6_MARK, PORT206_FN2), | ||
846 | PINMUX_DATA(VIO_DR6_MARK, PORT206_FN3), | ||
847 | PINMUX_DATA(D22_MARK, PORT206_FN4), | ||
848 | PINMUX_DATA(LCDD15_MARK, PORT207_FN1), | ||
849 | PINMUX_DATA(PORT207_MSIOF0L_SS1_MARK, PORT207_FN2), | ||
850 | PINMUX_DATA(PORT207_KEYOUT0_MARK, PORT207_FN3), | ||
851 | PINMUX_DATA(VIO_DR7_MARK, PORT207_FN4), | ||
852 | PINMUX_DATA(D23_MARK, PORT207_FN5), | ||
853 | PINMUX_DATA(LCDD16_MARK, PORT208_FN1), | ||
854 | PINMUX_DATA(PORT208_MSIOF0L_SS2_MARK, PORT208_FN2), | ||
855 | PINMUX_DATA(PORT208_KEYOUT1_MARK, PORT208_FN3), | ||
856 | PINMUX_DATA(VIO_VDR_MARK, PORT208_FN4), | ||
857 | PINMUX_DATA(D24_MARK, PORT208_FN5), | ||
858 | PINMUX_DATA(LCDD17_MARK, PORT209_FN1), | ||
859 | PINMUX_DATA(PORT209_KEYOUT2_MARK, PORT209_FN2), | ||
860 | PINMUX_DATA(VIO_HDR_MARK, PORT209_FN3), | ||
861 | PINMUX_DATA(D25_MARK, PORT209_FN4), | ||
862 | PINMUX_DATA(LCDD18_MARK, PORT210_FN1), | ||
863 | PINMUX_DATA(DREQ2_MARK, PORT210_FN2), | ||
864 | PINMUX_DATA(PORT210_MSIOF0L_SS1_MARK, PORT210_FN3), | ||
865 | PINMUX_DATA(D26_MARK, PORT210_FN4), | ||
866 | PINMUX_DATA(LCDD19_MARK, PORT211_FN1), | ||
867 | PINMUX_DATA(PORT211_MSIOF0L_SS2_MARK, PORT211_FN2), | ||
868 | PINMUX_DATA(D27_MARK, PORT211_FN3), | ||
869 | PINMUX_DATA(LCDD20_MARK, PORT212_FN1), | ||
870 | PINMUX_DATA(TS_SPSYNC1_MARK, PORT212_FN2), | ||
871 | PINMUX_DATA(MSIOF0L_MCK0_MARK, PORT212_FN3), | ||
872 | PINMUX_DATA(D28_MARK, PORT212_FN4), | ||
873 | PINMUX_DATA(LCDD21_MARK, PORT213_FN1), | ||
874 | PINMUX_DATA(TS_SDAT1_MARK, PORT213_FN2), | ||
875 | PINMUX_DATA(MSIOF0L_MCK1_MARK, PORT213_FN3), | ||
876 | PINMUX_DATA(D29_MARK, PORT213_FN4), | ||
877 | PINMUX_DATA(LCDD22_MARK, PORT214_FN1), | ||
878 | PINMUX_DATA(TS_SDEN1_MARK, PORT214_FN2), | ||
879 | PINMUX_DATA(MSIOF0L_RSCK_MARK, PORT214_FN3), | ||
880 | PINMUX_DATA(D30_MARK, PORT214_FN4), | ||
881 | PINMUX_DATA(LCDD23_MARK, PORT215_FN1), | ||
882 | PINMUX_DATA(TS_SCK1_MARK, PORT215_FN2), | ||
883 | PINMUX_DATA(MSIOF0L_RSYNC_MARK, PORT215_FN3), | ||
884 | PINMUX_DATA(D31_MARK, PORT215_FN4), | ||
885 | PINMUX_DATA(LCDDCK_MARK, PORT216_FN1), | ||
886 | PINMUX_DATA(LCDWR_MARK, PORT216_FN2), | ||
887 | PINMUX_DATA(PORT216_KEYOUT3_MARK, PORT216_FN3), | ||
888 | PINMUX_DATA(VIO_CLKR_MARK, PORT216_FN4), | ||
889 | PINMUX_DATA(LCDRD_MARK, PORT217_FN1), | ||
890 | PINMUX_DATA(DACK2_MARK, PORT217_FN2), | ||
891 | PINMUX_DATA(MSIOF0L_TSYNC_MARK, PORT217_FN3), | ||
892 | PINMUX_DATA(LCDHSYN_MARK, PORT218_FN1), | ||
893 | PINMUX_DATA(LCDCS_MARK, PORT218_FN2), | ||
894 | PINMUX_DATA(LCDCS2_MARK, PORT218_FN3), | ||
895 | PINMUX_DATA(DACK3_MARK, PORT218_FN4), | ||
896 | PINMUX_DATA(PORT218_VIO_CKOR_MARK, PORT218_FN5), | ||
897 | PINMUX_DATA(PORT218_KEYOUT4_MARK, PORT218_FN6), | ||
898 | PINMUX_DATA(LCDDISP_MARK, PORT219_FN1), | ||
899 | PINMUX_DATA(LCDRS_MARK, PORT219_FN2), | ||
900 | PINMUX_DATA(DREQ3_MARK, PORT219_FN3), | ||
901 | PINMUX_DATA(MSIOF0L_TSCK_MARK, PORT219_FN4), | ||
902 | PINMUX_DATA(LCDVSYN_MARK, PORT220_FN1), | ||
903 | PINMUX_DATA(LCDVSYN2_MARK, PORT220_FN2), | ||
904 | PINMUX_DATA(PORT220_KEYOUT5_MARK, PORT220_FN3), | ||
905 | PINMUX_DATA(LCDLCLK_MARK, PORT221_FN1), | ||
906 | PINMUX_DATA(DREQ1_MARK, PORT221_FN2), | ||
907 | PINMUX_DATA(PWEN_MARK, PORT221_FN3), | ||
908 | PINMUX_DATA(MSIOF0L_RXD_MARK, PORT221_FN4), | ||
909 | PINMUX_DATA(LCDDON_MARK, PORT222_FN1), | ||
910 | PINMUX_DATA(LCDDON2_MARK, PORT222_FN2), | ||
911 | PINMUX_DATA(DACK1_MARK, PORT222_FN3), | ||
912 | PINMUX_DATA(OVCN_MARK, PORT222_FN4), | ||
913 | PINMUX_DATA(MSIOF0L_TXD_MARK, PORT222_FN5), | ||
914 | PINMUX_DATA(SCIFA1_TXD_MARK, PORT225_FN1), | ||
915 | PINMUX_DATA(OVCN2_MARK, PORT225_FN2), | ||
916 | PINMUX_DATA(EXTLP_MARK, PORT226_FN1), | ||
917 | PINMUX_DATA(SCIFA1_SCK_MARK, PORT226_FN2), | ||
918 | PINMUX_DATA(USBTERM_MARK, PORT226_FN3), | ||
919 | PINMUX_DATA(PORT226_VIO_CKO2_MARK, PORT226_FN4), | ||
920 | PINMUX_DATA(SCIFA1_RTS_MARK, PORT227_FN1), | ||
921 | PINMUX_DATA(IDIN_MARK, PORT227_FN2), | ||
922 | PINMUX_DATA(SCIFA1_RXD_MARK, PORT228_FN1), | ||
923 | PINMUX_DATA(SCIFA1_CTS_MARK, PORT229_FN1), | ||
924 | PINMUX_DATA(MFG1_IN1_MARK, PORT229_FN2), | ||
925 | PINMUX_DATA(MSIOF1_TXD_MARK, PORT230_FN1), | ||
926 | PINMUX_DATA(SCIFA2_TXD2_MARK, PORT230_FN2), | ||
927 | PINMUX_DATA(PORT230_FSIAOMC_MARK, PORT230_FN3), | ||
928 | PINMUX_DATA(MSIOF1_TSYNC_MARK, PORT231_FN1), | ||
929 | PINMUX_DATA(SCIFA2_CTS2_MARK, PORT231_FN2), | ||
930 | PINMUX_DATA(PORT231_FSIAOLR_MARK, PORT231_FN3), | ||
931 | PINMUX_DATA(MSIOF1_TSCK_MARK, PORT232_FN1), | ||
932 | PINMUX_DATA(SCIFA2_SCK2_MARK, PORT232_FN2), | ||
933 | PINMUX_DATA(PORT232_FSIAOBT_MARK, PORT232_FN3), | ||
934 | PINMUX_DATA(MSIOF1_RXD_MARK, PORT233_FN1), | ||
935 | PINMUX_DATA(SCIFA2_RXD2_MARK, PORT233_FN2), | ||
936 | PINMUX_DATA(GPS_VCOTRIG_MARK, PORT233_FN3), | ||
937 | PINMUX_DATA(PORT233_FSIACK_MARK, PORT233_FN4), | ||
938 | PINMUX_DATA(MSIOF1_RSCK_MARK, PORT234_FN1), | ||
939 | PINMUX_DATA(SCIFA2_RTS2_MARK, PORT234_FN2), | ||
940 | PINMUX_DATA(PORT234_FSIAOSLD_MARK, PORT234_FN3), | ||
941 | PINMUX_DATA(MSIOF1_RSYNC_MARK, PORT235_FN1), | ||
942 | PINMUX_DATA(OPORT0_MARK, PORT235_FN2), | ||
943 | PINMUX_DATA(MFG1_IN2_MARK, PORT235_FN3), | ||
944 | PINMUX_DATA(PORT235_FSIAILR_MARK, PORT235_FN4), | ||
945 | PINMUX_DATA(MSIOF1_MCK0_MARK, PORT236_FN1), | ||
946 | PINMUX_DATA(I2C_SDA2_MARK, PORT236_FN2), | ||
947 | PINMUX_DATA(PORT236_FSIAIBT_MARK, PORT236_FN3), | ||
948 | PINMUX_DATA(MSIOF1_MCK1_MARK, PORT237_FN1), | ||
949 | PINMUX_DATA(I2C_SCL2_MARK, PORT237_FN2), | ||
950 | PINMUX_DATA(PORT237_FSIAISLD_MARK, PORT237_FN3), | ||
951 | PINMUX_DATA(MSIOF1_SS1_MARK, PORT238_FN1), | ||
952 | PINMUX_DATA(EDBGREQ3_MARK, PORT238_FN2), | ||
953 | |||
954 | /* 55-5 (FN) */ | ||
955 | PINMUX_DATA(MSIOF1_SS2_MARK, PORT239_FN1), | ||
956 | PINMUX_DATA(SCIFA6_TXD_MARK, PORT240_FN1), | ||
957 | PINMUX_DATA(PORT241_IRDA_OUT_MARK, PORT241_FN1), | ||
958 | PINMUX_DATA(PORT241_IROUT_MARK, PORT241_FN2), | ||
959 | PINMUX_DATA(MFG4_OUT1_MARK, PORT241_FN3), | ||
960 | PINMUX_DATA(TPU4TO0_MARK, PORT241_FN4), | ||
961 | PINMUX_DATA(PORT242_IRDA_IN_MARK, PORT242_FN1), | ||
962 | PINMUX_DATA(MFG4_IN2_MARK, PORT242_FN2), | ||
963 | PINMUX_DATA(PORT243_IRDA_FIRSEL_MARK, PORT243_FN1), | ||
964 | PINMUX_DATA(PORT243_VIO_CKO2_MARK, PORT243_FN2), | ||
965 | PINMUX_DATA(PORT244_SCIFA5_CTS_MARK, PORT244_FN1), | ||
966 | PINMUX_DATA(MFG2_IN1_MARK, PORT244_FN2), | ||
967 | PINMUX_DATA(PORT244_SCIFB_CTS_MARK, PORT244_FN3), | ||
968 | PINMUX_DATA(PORT245_SCIFA5_RTS_MARK, PORT245_FN1), | ||
969 | PINMUX_DATA(MFG2_IN2_MARK, PORT245_FN2), | ||
970 | PINMUX_DATA(PORT245_SCIFB_RTS_MARK, PORT245_FN3), | ||
971 | PINMUX_DATA(PORT246_SCIFA5_RXD_MARK, PORT246_FN1), | ||
972 | PINMUX_DATA(MFG1_OUT1_MARK, PORT246_FN2), | ||
973 | PINMUX_DATA(PORT246_SCIFB_RXD_MARK, PORT246_FN3), | ||
974 | PINMUX_DATA(TPU1TO0_MARK, PORT246_FN4), | ||
975 | PINMUX_DATA(PORT247_SCIFA5_TXD_MARK, PORT247_FN1), | ||
976 | PINMUX_DATA(MFG3_OUT2_MARK, PORT247_FN2), | ||
977 | PINMUX_DATA(PORT247_SCIFB_TXD_MARK, PORT247_FN3), | ||
978 | PINMUX_DATA(TPU3TO1_MARK, PORT247_FN4), | ||
979 | PINMUX_DATA(PORT248_SCIFA5_SCK_MARK, PORT248_FN1), | ||
980 | PINMUX_DATA(MFG2_OUT1_MARK, PORT248_FN2), | ||
981 | PINMUX_DATA(PORT248_SCIFB_SCK_MARK, PORT248_FN3), | ||
982 | PINMUX_DATA(TPU2TO0_MARK, PORT248_FN4), | ||
983 | PINMUX_DATA(PORT249_IROUT_MARK, PORT249_FN1), | ||
984 | PINMUX_DATA(MFG4_IN1_MARK, PORT249_FN2), | ||
985 | PINMUX_DATA(SDHICLK0_MARK, PORT250_FN1), | ||
986 | PINMUX_DATA(TCK2_SWCLK_MC0_MARK, PORT250_FN2), | ||
987 | PINMUX_DATA(SDHICD0_MARK, PORT251_FN1), | ||
988 | PINMUX_DATA(SDHID0_0_MARK, PORT252_FN1), | ||
989 | PINMUX_DATA(TMS2_SWDIO_MC0_MARK, PORT252_FN2), | ||
990 | PINMUX_DATA(SDHID0_1_MARK, PORT253_FN1), | ||
991 | PINMUX_DATA(TDO2_SWO0_MC0_MARK, PORT253_FN2), | ||
992 | PINMUX_DATA(SDHID0_2_MARK, PORT254_FN1), | ||
993 | PINMUX_DATA(TDI2_MARK, PORT254_FN2), | ||
994 | PINMUX_DATA(SDHID0_3_MARK, PORT255_FN1), | ||
995 | PINMUX_DATA(RTCK2_SWO1_MC0_MARK, PORT255_FN2), | ||
996 | PINMUX_DATA(SDHICMD0_MARK, PORT256_FN1), | ||
997 | PINMUX_DATA(TRST2_MARK, PORT256_FN2), | ||
998 | PINMUX_DATA(SDHIWP0_MARK, PORT257_FN1), | ||
999 | PINMUX_DATA(EDBGREQ2_MARK, PORT257_FN2), | ||
1000 | PINMUX_DATA(SDHICLK1_MARK, PORT258_FN1), | ||
1001 | PINMUX_DATA(TCK3_SWCLK_MC1_MARK, PORT258_FN2), | ||
1002 | PINMUX_DATA(SDHID1_0_MARK, PORT259_FN1), | ||
1003 | PINMUX_DATA(M11_SLCD_SO2_MARK, PORT259_FN2), | ||
1004 | PINMUX_DATA(TS_SPSYNC2_MARK, PORT259_FN3), | ||
1005 | PINMUX_DATA(TMS3_SWDIO_MC1_MARK, PORT259_FN4), | ||
1006 | PINMUX_DATA(SDHID1_1_MARK, PORT260_FN1), | ||
1007 | PINMUX_DATA(M9_SLCD_A02_MARK, PORT260_FN2), | ||
1008 | PINMUX_DATA(TS_SDAT2_MARK, PORT260_FN3), | ||
1009 | PINMUX_DATA(TDO3_SWO0_MC1_MARK, PORT260_FN4), | ||
1010 | PINMUX_DATA(SDHID1_2_MARK, PORT261_FN1), | ||
1011 | PINMUX_DATA(M10_SLCD_CK2_MARK, PORT261_FN2), | ||
1012 | PINMUX_DATA(TS_SDEN2_MARK, PORT261_FN3), | ||
1013 | PINMUX_DATA(TDI3_MARK, PORT261_FN4), | ||
1014 | PINMUX_DATA(SDHID1_3_MARK, PORT262_FN1), | ||
1015 | PINMUX_DATA(M12_SLCD_CE2_MARK, PORT262_FN2), | ||
1016 | PINMUX_DATA(TS_SCK2_MARK, PORT262_FN3), | ||
1017 | PINMUX_DATA(RTCK3_SWO1_MC1_MARK, PORT262_FN4), | ||
1018 | PINMUX_DATA(SDHICMD1_MARK, PORT263_FN1), | ||
1019 | PINMUX_DATA(TRST3_MARK, PORT263_FN2), | ||
1020 | PINMUX_DATA(RESETOUTS_MARK, PORT264_FN1), | ||
1021 | }; | ||
1022 | |||
1023 | static struct pinmux_gpio pinmux_gpios[] = { | ||
1024 | /* 55-1 -> 55-5 (GPIO) */ | ||
1025 | GPIO_PORT_ALL(), | ||
1026 | |||
1027 | /* Special Pull-up / Pull-down Functions */ | ||
1028 | GPIO_FN(PORT66_KEYIN0_PU), GPIO_FN(PORT67_KEYIN1_PU), | ||
1029 | GPIO_FN(PORT68_KEYIN2_PU), GPIO_FN(PORT69_KEYIN3_PU), | ||
1030 | GPIO_FN(PORT70_KEYIN4_PU), GPIO_FN(PORT71_KEYIN5_PU), | ||
1031 | GPIO_FN(PORT72_KEYIN6_PU), | ||
1032 | |||
1033 | /* 55-1 (FN) */ | ||
1034 | GPIO_FN(VBUS_0), | ||
1035 | GPIO_FN(CPORT0), | ||
1036 | GPIO_FN(CPORT1), | ||
1037 | GPIO_FN(CPORT2), | ||
1038 | GPIO_FN(CPORT3), | ||
1039 | GPIO_FN(CPORT4), | ||
1040 | GPIO_FN(CPORT5), | ||
1041 | GPIO_FN(CPORT6), | ||
1042 | GPIO_FN(CPORT7), | ||
1043 | GPIO_FN(CPORT8), | ||
1044 | GPIO_FN(CPORT9), | ||
1045 | GPIO_FN(CPORT10), | ||
1046 | GPIO_FN(CPORT11), GPIO_FN(SIN2), | ||
1047 | GPIO_FN(CPORT12), GPIO_FN(XCTS2), | ||
1048 | GPIO_FN(CPORT13), GPIO_FN(RFSPO4), | ||
1049 | GPIO_FN(CPORT14), GPIO_FN(RFSPO5), | ||
1050 | GPIO_FN(CPORT15), GPIO_FN(SCIFA0_SCK), GPIO_FN(GPS_AGC2), | ||
1051 | GPIO_FN(CPORT16), GPIO_FN(SCIFA0_TXD), GPIO_FN(GPS_AGC3), | ||
1052 | GPIO_FN(CPORT17_IC_OE), GPIO_FN(SOUT2), | ||
1053 | GPIO_FN(CPORT18), GPIO_FN(XRTS2), GPIO_FN(PORT19_VIO_CKO2), | ||
1054 | GPIO_FN(CPORT19_MPORT1), | ||
1055 | GPIO_FN(CPORT20), GPIO_FN(RFSPO6), | ||
1056 | GPIO_FN(CPORT21), GPIO_FN(STATUS0), | ||
1057 | GPIO_FN(CPORT22), GPIO_FN(STATUS1), | ||
1058 | GPIO_FN(CPORT23), GPIO_FN(STATUS2), GPIO_FN(RFSPO7), | ||
1059 | GPIO_FN(B_SYNLD1), | ||
1060 | GPIO_FN(B_SYNLD2), GPIO_FN(SYSENMSK), | ||
1061 | GPIO_FN(XMAINPS), | ||
1062 | GPIO_FN(XDIVPS), | ||
1063 | GPIO_FN(XIDRST), | ||
1064 | GPIO_FN(IDCLK), GPIO_FN(IC_DP), | ||
1065 | GPIO_FN(IDIO), GPIO_FN(IC_DM), | ||
1066 | GPIO_FN(SOUT1), GPIO_FN(SCIFA4_TXD), GPIO_FN(M02_BERDAT), | ||
1067 | GPIO_FN(SIN1), GPIO_FN(SCIFA4_RXD), GPIO_FN(XWUP), | ||
1068 | GPIO_FN(XRTS1), GPIO_FN(SCIFA4_RTS), GPIO_FN(M03_BERCLK), | ||
1069 | GPIO_FN(XCTS1), GPIO_FN(SCIFA4_CTS), | ||
1070 | GPIO_FN(PCMCLKO), | ||
1071 | GPIO_FN(SYNC8KO), | ||
1072 | |||
1073 | /* 55-2 (FN) */ | ||
1074 | GPIO_FN(DNPCM_A), | ||
1075 | GPIO_FN(UPPCM_A), | ||
1076 | GPIO_FN(VACK), | ||
1077 | GPIO_FN(XTALB1L), | ||
1078 | GPIO_FN(GPS_AGC1), GPIO_FN(SCIFA0_RTS), | ||
1079 | GPIO_FN(GPS_AGC4), GPIO_FN(SCIFA0_RXD), | ||
1080 | GPIO_FN(GPS_PWRDOWN), GPIO_FN(SCIFA0_CTS), | ||
1081 | GPIO_FN(GPS_IM), | ||
1082 | GPIO_FN(GPS_IS), | ||
1083 | GPIO_FN(GPS_QM), | ||
1084 | GPIO_FN(GPS_QS), | ||
1085 | GPIO_FN(FMSOCK), GPIO_FN(PORT49_IRDA_OUT), GPIO_FN(PORT49_IROUT), | ||
1086 | GPIO_FN(FMSOOLR), GPIO_FN(BBIF2_TSYNC2), GPIO_FN(TPU2TO2), | ||
1087 | GPIO_FN(IPORT3), GPIO_FN(FMSIOLR), | ||
1088 | GPIO_FN(FMSOOBT), GPIO_FN(BBIF2_TSCK2), GPIO_FN(TPU2TO3), | ||
1089 | GPIO_FN(OPORT1), GPIO_FN(FMSIOBT), | ||
1090 | GPIO_FN(FMSOSLD), GPIO_FN(BBIF2_TXD2), GPIO_FN(OPORT2), | ||
1091 | GPIO_FN(FMSOILR), GPIO_FN(PORT53_IRDA_IN), GPIO_FN(TPU3TO3), | ||
1092 | GPIO_FN(OPORT3), GPIO_FN(FMSIILR), | ||
1093 | GPIO_FN(FMSOIBT), GPIO_FN(PORT54_IRDA_FIRSEL), GPIO_FN(TPU3TO2), | ||
1094 | GPIO_FN(FMSIIBT), | ||
1095 | GPIO_FN(FMSISLD), GPIO_FN(MFG0_OUT1), GPIO_FN(TPU0TO0), | ||
1096 | GPIO_FN(A0_EA0), GPIO_FN(BS), | ||
1097 | GPIO_FN(A12_EA12), GPIO_FN(PORT58_VIO_CKOR), GPIO_FN(TPU4TO2), | ||
1098 | GPIO_FN(A13_EA13), GPIO_FN(PORT59_IROUT), GPIO_FN(MFG0_OUT2), | ||
1099 | GPIO_FN(TPU0TO1), | ||
1100 | GPIO_FN(A14_EA14), GPIO_FN(PORT60_KEYOUT5), | ||
1101 | GPIO_FN(A15_EA15), GPIO_FN(PORT61_KEYOUT4), | ||
1102 | GPIO_FN(A16_EA16), GPIO_FN(PORT62_KEYOUT3), GPIO_FN(MSIOF0_SS1), | ||
1103 | GPIO_FN(A17_EA17), GPIO_FN(PORT63_KEYOUT2), GPIO_FN(MSIOF0_TSYNC), | ||
1104 | GPIO_FN(A18_EA18), GPIO_FN(PORT64_KEYOUT1), GPIO_FN(MSIOF0_TSCK), | ||
1105 | GPIO_FN(A19_EA19), GPIO_FN(PORT65_KEYOUT0), GPIO_FN(MSIOF0_TXD), | ||
1106 | GPIO_FN(A20_EA20), GPIO_FN(PORT66_KEYIN0), GPIO_FN(MSIOF0_RSCK), | ||
1107 | GPIO_FN(A21_EA21), GPIO_FN(PORT67_KEYIN1), GPIO_FN(MSIOF0_RSYNC), | ||
1108 | GPIO_FN(A22_EA22), GPIO_FN(PORT68_KEYIN2), GPIO_FN(MSIOF0_MCK0), | ||
1109 | GPIO_FN(A23_EA23), GPIO_FN(PORT69_KEYIN3), GPIO_FN(MSIOF0_MCK1), | ||
1110 | GPIO_FN(A24_EA24), GPIO_FN(PORT70_KEYIN4), GPIO_FN(MSIOF0_RXD), | ||
1111 | GPIO_FN(A25_EA25), GPIO_FN(PORT71_KEYIN5), GPIO_FN(MSIOF0_SS2), | ||
1112 | GPIO_FN(A26), GPIO_FN(PORT72_KEYIN6), | ||
1113 | GPIO_FN(D0_ED0_NAF0), | ||
1114 | GPIO_FN(D1_ED1_NAF1), | ||
1115 | GPIO_FN(D2_ED2_NAF2), | ||
1116 | GPIO_FN(D3_ED3_NAF3), | ||
1117 | GPIO_FN(D4_ED4_NAF4), | ||
1118 | GPIO_FN(D5_ED5_NAF5), | ||
1119 | GPIO_FN(D6_ED6_NAF6), | ||
1120 | GPIO_FN(D7_ED7_NAF7), | ||
1121 | GPIO_FN(D8_ED8_NAF8), | ||
1122 | GPIO_FN(D9_ED9_NAF9), | ||
1123 | GPIO_FN(D10_ED10_NAF10), | ||
1124 | GPIO_FN(D11_ED11_NAF11), | ||
1125 | GPIO_FN(D12_ED12_NAF12), | ||
1126 | GPIO_FN(D13_ED13_NAF13), | ||
1127 | GPIO_FN(D14_ED14_NAF14), | ||
1128 | GPIO_FN(D15_ED15_NAF15), | ||
1129 | GPIO_FN(CS4), | ||
1130 | GPIO_FN(CS5A), GPIO_FN(FMSICK), | ||
1131 | |||
1132 | /* 55-3 (FN) */ | ||
1133 | GPIO_FN(CS5B), GPIO_FN(FCE1), | ||
1134 | GPIO_FN(CS6B), GPIO_FN(XCS2), GPIO_FN(CS6A), GPIO_FN(DACK0), | ||
1135 | GPIO_FN(FCE0), | ||
1136 | GPIO_FN(WAIT), GPIO_FN(DREQ0), | ||
1137 | GPIO_FN(RD_XRD), | ||
1138 | GPIO_FN(WE0_XWR0_FWE), | ||
1139 | GPIO_FN(WE1_XWR1), | ||
1140 | GPIO_FN(FRB), | ||
1141 | GPIO_FN(CKO), | ||
1142 | GPIO_FN(NBRSTOUT), | ||
1143 | GPIO_FN(NBRST), | ||
1144 | GPIO_FN(GPS_EPPSIN), | ||
1145 | GPIO_FN(LATCHPULSE), | ||
1146 | GPIO_FN(LTESIGNAL), | ||
1147 | GPIO_FN(LEGACYSTATE), | ||
1148 | GPIO_FN(TCKON), | ||
1149 | GPIO_FN(VIO_VD), GPIO_FN(PORT128_KEYOUT0), GPIO_FN(IPORT0), | ||
1150 | GPIO_FN(VIO_HD), GPIO_FN(PORT129_KEYOUT1), GPIO_FN(IPORT1), | ||
1151 | GPIO_FN(VIO_D0), GPIO_FN(PORT130_KEYOUT2), GPIO_FN(PORT130_MSIOF2_RXD), | ||
1152 | GPIO_FN(VIO_D1), GPIO_FN(PORT131_KEYOUT3), GPIO_FN(PORT131_MSIOF2_SS1), | ||
1153 | GPIO_FN(VIO_D2), GPIO_FN(PORT132_KEYOUT4), GPIO_FN(PORT132_MSIOF2_SS2), | ||
1154 | GPIO_FN(VIO_D3), GPIO_FN(PORT133_KEYOUT5), | ||
1155 | GPIO_FN(PORT133_MSIOF2_TSYNC), | ||
1156 | GPIO_FN(VIO_D4), GPIO_FN(PORT134_KEYIN0), GPIO_FN(PORT134_MSIOF2_TXD), | ||
1157 | GPIO_FN(VIO_D5), GPIO_FN(PORT135_KEYIN1), GPIO_FN(PORT135_MSIOF2_TSCK), | ||
1158 | GPIO_FN(VIO_D6), GPIO_FN(PORT136_KEYIN2), | ||
1159 | GPIO_FN(VIO_D7), GPIO_FN(PORT137_KEYIN3), | ||
1160 | GPIO_FN(VIO_D8), GPIO_FN(M9_SLCD_A01), GPIO_FN(PORT138_FSIAOMC), | ||
1161 | GPIO_FN(VIO_D9), GPIO_FN(M10_SLCD_CK1), GPIO_FN(PORT139_FSIAOLR), | ||
1162 | GPIO_FN(VIO_D10), GPIO_FN(M11_SLCD_SO1), GPIO_FN(TPU0TO2), | ||
1163 | GPIO_FN(PORT140_FSIAOBT), | ||
1164 | GPIO_FN(VIO_D11), GPIO_FN(M12_SLCD_CE1), GPIO_FN(TPU0TO3), | ||
1165 | GPIO_FN(PORT141_FSIAOSLD), | ||
1166 | GPIO_FN(VIO_D12), GPIO_FN(M13_BSW), GPIO_FN(PORT142_FSIACK), | ||
1167 | GPIO_FN(VIO_D13), GPIO_FN(M14_GSW), GPIO_FN(PORT143_FSIAILR), | ||
1168 | GPIO_FN(VIO_D14), GPIO_FN(M15_RSW), GPIO_FN(PORT144_FSIAIBT), | ||
1169 | GPIO_FN(VIO_D15), GPIO_FN(TPU1TO3), GPIO_FN(PORT145_FSIAISLD), | ||
1170 | GPIO_FN(VIO_CLK), GPIO_FN(PORT146_KEYIN4), GPIO_FN(IPORT2), | ||
1171 | GPIO_FN(VIO_FIELD), GPIO_FN(PORT147_KEYIN5), | ||
1172 | GPIO_FN(VIO_CKO), GPIO_FN(PORT148_KEYIN6), | ||
1173 | GPIO_FN(A27), GPIO_FN(RDWR_XWE), GPIO_FN(MFG0_IN1), | ||
1174 | GPIO_FN(MFG0_IN2), | ||
1175 | GPIO_FN(TS_SPSYNC3), GPIO_FN(MSIOF2_RSCK), | ||
1176 | GPIO_FN(TS_SDAT3), GPIO_FN(MSIOF2_RSYNC), | ||
1177 | GPIO_FN(TPU1TO2), GPIO_FN(TS_SDEN3), GPIO_FN(PORT153_MSIOF2_SS1), | ||
1178 | GPIO_FN(SOUT3), GPIO_FN(SCIFA2_TXD1), GPIO_FN(MSIOF2_MCK0), | ||
1179 | GPIO_FN(SIN3), GPIO_FN(SCIFA2_RXD1), GPIO_FN(MSIOF2_MCK1), | ||
1180 | GPIO_FN(XRTS3), GPIO_FN(SCIFA2_RTS1), GPIO_FN(PORT156_MSIOF2_SS2), | ||
1181 | GPIO_FN(XCTS3), GPIO_FN(SCIFA2_CTS1), GPIO_FN(PORT157_MSIOF2_RXD), | ||
1182 | |||
1183 | /* 55-4 (FN) */ | ||
1184 | GPIO_FN(DINT), GPIO_FN(SCIFA2_SCK1), GPIO_FN(TS_SCK3), | ||
1185 | GPIO_FN(PORT159_SCIFB_SCK), GPIO_FN(PORT159_SCIFA5_SCK), GPIO_FN(NMI), | ||
1186 | GPIO_FN(PORT160_SCIFB_TXD), GPIO_FN(PORT160_SCIFA5_TXD), GPIO_FN(SOUT0), | ||
1187 | GPIO_FN(PORT161_SCIFB_CTS), GPIO_FN(PORT161_SCIFA5_CTS), GPIO_FN(XCTS0), | ||
1188 | GPIO_FN(MFG3_IN2), | ||
1189 | GPIO_FN(PORT162_SCIFB_RXD), GPIO_FN(PORT162_SCIFA5_RXD), GPIO_FN(SIN0), | ||
1190 | GPIO_FN(MFG3_IN1), | ||
1191 | GPIO_FN(PORT163_SCIFB_RTS), GPIO_FN(PORT163_SCIFA5_RTS), GPIO_FN(XRTS0), | ||
1192 | GPIO_FN(MFG3_OUT1), GPIO_FN(TPU3TO0), | ||
1193 | GPIO_FN(LCDD0), GPIO_FN(PORT192_KEYOUT0), GPIO_FN(EXT_CKI), | ||
1194 | GPIO_FN(LCDD1), GPIO_FN(PORT193_KEYOUT1), GPIO_FN(PORT193_SCIFA5_CTS), | ||
1195 | GPIO_FN(BBIF2_TSYNC1), | ||
1196 | GPIO_FN(LCDD2), GPIO_FN(PORT194_KEYOUT2), GPIO_FN(PORT194_SCIFA5_RTS), | ||
1197 | GPIO_FN(BBIF2_TSCK1), | ||
1198 | GPIO_FN(LCDD3), GPIO_FN(PORT195_KEYOUT3), GPIO_FN(PORT195_SCIFA5_RXD), | ||
1199 | GPIO_FN(BBIF2_TXD1), | ||
1200 | GPIO_FN(LCDD4), GPIO_FN(PORT196_KEYOUT4), GPIO_FN(PORT196_SCIFA5_TXD), | ||
1201 | GPIO_FN(LCDD5), GPIO_FN(PORT197_KEYOUT5), GPIO_FN(PORT197_SCIFA5_SCK), | ||
1202 | GPIO_FN(MFG2_OUT2), | ||
1203 | GPIO_FN(LCDD6), | ||
1204 | GPIO_FN(LCDD7), GPIO_FN(TPU4TO1), GPIO_FN(MFG4_OUT2), | ||
1205 | GPIO_FN(LCDD8), GPIO_FN(PORT200_KEYIN0), GPIO_FN(VIO_DR0), | ||
1206 | GPIO_FN(D16), | ||
1207 | GPIO_FN(LCDD9), GPIO_FN(PORT201_KEYIN1), GPIO_FN(VIO_DR1), | ||
1208 | GPIO_FN(D17), | ||
1209 | GPIO_FN(LCDD10), GPIO_FN(PORT202_KEYIN2), GPIO_FN(VIO_DR2), | ||
1210 | GPIO_FN(D18), | ||
1211 | GPIO_FN(LCDD11), GPIO_FN(PORT203_KEYIN3), GPIO_FN(VIO_DR3), | ||
1212 | GPIO_FN(D19), | ||
1213 | GPIO_FN(LCDD12), GPIO_FN(PORT204_KEYIN4), GPIO_FN(VIO_DR4), | ||
1214 | GPIO_FN(D20), | ||
1215 | GPIO_FN(LCDD13), GPIO_FN(PORT205_KEYIN5), GPIO_FN(VIO_DR5), | ||
1216 | GPIO_FN(D21), | ||
1217 | GPIO_FN(LCDD14), GPIO_FN(PORT206_KEYIN6), GPIO_FN(VIO_DR6), | ||
1218 | GPIO_FN(D22), | ||
1219 | GPIO_FN(LCDD15), GPIO_FN(PORT207_MSIOF0L_SS1), GPIO_FN(PORT207_KEYOUT0), | ||
1220 | GPIO_FN(VIO_DR7), GPIO_FN(D23), | ||
1221 | GPIO_FN(LCDD16), GPIO_FN(PORT208_MSIOF0L_SS2), GPIO_FN(PORT208_KEYOUT1), | ||
1222 | GPIO_FN(VIO_VDR), GPIO_FN(D24), | ||
1223 | GPIO_FN(LCDD17), GPIO_FN(PORT209_KEYOUT2), GPIO_FN(VIO_HDR), | ||
1224 | GPIO_FN(D25), | ||
1225 | GPIO_FN(LCDD18), GPIO_FN(DREQ2), GPIO_FN(PORT210_MSIOF0L_SS1), | ||
1226 | GPIO_FN(D26), | ||
1227 | GPIO_FN(LCDD19), GPIO_FN(PORT211_MSIOF0L_SS2), GPIO_FN(D27), | ||
1228 | GPIO_FN(LCDD20), GPIO_FN(TS_SPSYNC1), GPIO_FN(MSIOF0L_MCK0), | ||
1229 | GPIO_FN(D28), | ||
1230 | GPIO_FN(LCDD21), GPIO_FN(TS_SDAT1), GPIO_FN(MSIOF0L_MCK1), | ||
1231 | GPIO_FN(D29), | ||
1232 | GPIO_FN(LCDD22), GPIO_FN(TS_SDEN1), GPIO_FN(MSIOF0L_RSCK), | ||
1233 | GPIO_FN(D30), | ||
1234 | GPIO_FN(LCDD23), GPIO_FN(TS_SCK1), GPIO_FN(MSIOF0L_RSYNC), | ||
1235 | GPIO_FN(D31), | ||
1236 | GPIO_FN(LCDDCK), GPIO_FN(LCDWR), GPIO_FN(PORT216_KEYOUT3), | ||
1237 | GPIO_FN(VIO_CLKR), | ||
1238 | GPIO_FN(LCDRD), GPIO_FN(DACK2), GPIO_FN(MSIOF0L_TSYNC), | ||
1239 | GPIO_FN(LCDHSYN), GPIO_FN(LCDCS), GPIO_FN(LCDCS2), GPIO_FN(DACK3), | ||
1240 | GPIO_FN(PORT218_VIO_CKOR), GPIO_FN(PORT218_KEYOUT4), | ||
1241 | GPIO_FN(LCDDISP), GPIO_FN(LCDRS), GPIO_FN(DREQ3), GPIO_FN(MSIOF0L_TSCK), | ||
1242 | GPIO_FN(LCDVSYN), GPIO_FN(LCDVSYN2), GPIO_FN(PORT220_KEYOUT5), | ||
1243 | GPIO_FN(LCDLCLK), GPIO_FN(DREQ1), GPIO_FN(PWEN), GPIO_FN(MSIOF0L_RXD), | ||
1244 | GPIO_FN(LCDDON), GPIO_FN(LCDDON2), GPIO_FN(DACK1), GPIO_FN(OVCN), | ||
1245 | GPIO_FN(MSIOF0L_TXD), | ||
1246 | GPIO_FN(SCIFA1_TXD), GPIO_FN(OVCN2), | ||
1247 | GPIO_FN(EXTLP), GPIO_FN(SCIFA1_SCK), GPIO_FN(USBTERM), | ||
1248 | GPIO_FN(PORT226_VIO_CKO2), | ||
1249 | GPIO_FN(SCIFA1_RTS), GPIO_FN(IDIN), | ||
1250 | GPIO_FN(SCIFA1_RXD), | ||
1251 | GPIO_FN(SCIFA1_CTS), GPIO_FN(MFG1_IN1), | ||
1252 | GPIO_FN(MSIOF1_TXD), GPIO_FN(SCIFA2_TXD2), GPIO_FN(PORT230_FSIAOMC), | ||
1253 | GPIO_FN(MSIOF1_TSYNC), GPIO_FN(SCIFA2_CTS2), GPIO_FN(PORT231_FSIAOLR), | ||
1254 | GPIO_FN(MSIOF1_TSCK), GPIO_FN(SCIFA2_SCK2), GPIO_FN(PORT232_FSIAOBT), | ||
1255 | GPIO_FN(MSIOF1_RXD), GPIO_FN(SCIFA2_RXD2), GPIO_FN(GPS_VCOTRIG), | ||
1256 | GPIO_FN(PORT233_FSIACK), | ||
1257 | GPIO_FN(MSIOF1_RSCK), GPIO_FN(SCIFA2_RTS2), GPIO_FN(PORT234_FSIAOSLD), | ||
1258 | GPIO_FN(MSIOF1_RSYNC), GPIO_FN(OPORT0), GPIO_FN(MFG1_IN2), | ||
1259 | GPIO_FN(PORT235_FSIAILR), | ||
1260 | GPIO_FN(MSIOF1_MCK0), GPIO_FN(I2C_SDA2), GPIO_FN(PORT236_FSIAIBT), | ||
1261 | GPIO_FN(MSIOF1_MCK1), GPIO_FN(I2C_SCL2), GPIO_FN(PORT237_FSIAISLD), | ||
1262 | GPIO_FN(MSIOF1_SS1), GPIO_FN(EDBGREQ3), | ||
1263 | |||
1264 | /* 55-5 (FN) */ | ||
1265 | GPIO_FN(MSIOF1_SS2), | ||
1266 | GPIO_FN(SCIFA6_TXD), | ||
1267 | GPIO_FN(PORT241_IRDA_OUT), GPIO_FN(PORT241_IROUT), GPIO_FN(MFG4_OUT1), | ||
1268 | GPIO_FN(TPU4TO0), | ||
1269 | GPIO_FN(PORT242_IRDA_IN), GPIO_FN(MFG4_IN2), | ||
1270 | GPIO_FN(PORT243_IRDA_FIRSEL), GPIO_FN(PORT243_VIO_CKO2), | ||
1271 | GPIO_FN(PORT244_SCIFA5_CTS), GPIO_FN(MFG2_IN1), | ||
1272 | GPIO_FN(PORT244_SCIFB_CTS), | ||
1273 | GPIO_FN(PORT245_SCIFA5_RTS), GPIO_FN(MFG2_IN2), | ||
1274 | GPIO_FN(PORT245_SCIFB_RTS), | ||
1275 | GPIO_FN(PORT246_SCIFA5_RXD), GPIO_FN(MFG1_OUT1), | ||
1276 | GPIO_FN(PORT246_SCIFB_RXD), GPIO_FN(TPU1TO0), | ||
1277 | GPIO_FN(PORT247_SCIFA5_TXD), GPIO_FN(MFG3_OUT2), | ||
1278 | GPIO_FN(PORT247_SCIFB_TXD), GPIO_FN(TPU3TO1), | ||
1279 | GPIO_FN(PORT248_SCIFA5_SCK), GPIO_FN(MFG2_OUT1), | ||
1280 | GPIO_FN(PORT248_SCIFB_SCK), GPIO_FN(TPU2TO0), | ||
1281 | GPIO_FN(PORT249_IROUT), GPIO_FN(MFG4_IN1), | ||
1282 | GPIO_FN(SDHICLK0), GPIO_FN(TCK2_SWCLK_MC0), | ||
1283 | GPIO_FN(SDHICD0), | ||
1284 | GPIO_FN(SDHID0_0), GPIO_FN(TMS2_SWDIO_MC0), | ||
1285 | GPIO_FN(SDHID0_1), GPIO_FN(TDO2_SWO0_MC0), | ||
1286 | GPIO_FN(SDHID0_2), GPIO_FN(TDI2), | ||
1287 | GPIO_FN(SDHID0_3), GPIO_FN(RTCK2_SWO1_MC0), | ||
1288 | GPIO_FN(SDHICMD0), GPIO_FN(TRST2), | ||
1289 | GPIO_FN(SDHIWP0), GPIO_FN(EDBGREQ2), | ||
1290 | GPIO_FN(SDHICLK1), GPIO_FN(TCK3_SWCLK_MC1), | ||
1291 | GPIO_FN(SDHID1_0), GPIO_FN(M11_SLCD_SO2), GPIO_FN(TS_SPSYNC2), | ||
1292 | GPIO_FN(TMS3_SWDIO_MC1), | ||
1293 | GPIO_FN(SDHID1_1), GPIO_FN(M9_SLCD_A02), GPIO_FN(TS_SDAT2), | ||
1294 | GPIO_FN(TDO3_SWO0_MC1), | ||
1295 | GPIO_FN(SDHID1_2), GPIO_FN(M10_SLCD_CK2), GPIO_FN(TS_SDEN2), | ||
1296 | GPIO_FN(TDI3), | ||
1297 | GPIO_FN(SDHID1_3), GPIO_FN(M12_SLCD_CE2), GPIO_FN(TS_SCK2), | ||
1298 | GPIO_FN(RTCK3_SWO1_MC1), | ||
1299 | GPIO_FN(SDHICMD1), GPIO_FN(TRST3), | ||
1300 | GPIO_FN(RESETOUTS), | ||
1301 | }; | ||
1302 | |||
1303 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | ||
1304 | PORTCR(0, 0xe6050000), /* PORT0CR */ | ||
1305 | PORTCR(1, 0xe6050001), /* PORT1CR */ | ||
1306 | PORTCR(2, 0xe6050002), /* PORT2CR */ | ||
1307 | PORTCR(3, 0xe6050003), /* PORT3CR */ | ||
1308 | PORTCR(4, 0xe6050004), /* PORT4CR */ | ||
1309 | PORTCR(5, 0xe6050005), /* PORT5CR */ | ||
1310 | PORTCR(6, 0xe6050006), /* PORT6CR */ | ||
1311 | PORTCR(7, 0xe6050007), /* PORT7CR */ | ||
1312 | PORTCR(8, 0xe6050008), /* PORT8CR */ | ||
1313 | PORTCR(9, 0xe6050009), /* PORT9CR */ | ||
1314 | |||
1315 | PORTCR(10, 0xe605000a), /* PORT10CR */ | ||
1316 | PORTCR(11, 0xe605000b), /* PORT11CR */ | ||
1317 | PORTCR(12, 0xe605000c), /* PORT12CR */ | ||
1318 | PORTCR(13, 0xe605000d), /* PORT13CR */ | ||
1319 | PORTCR(14, 0xe605000e), /* PORT14CR */ | ||
1320 | PORTCR(15, 0xe605000f), /* PORT15CR */ | ||
1321 | PORTCR(16, 0xe6050010), /* PORT16CR */ | ||
1322 | PORTCR(17, 0xe6050011), /* PORT17CR */ | ||
1323 | PORTCR(18, 0xe6050012), /* PORT18CR */ | ||
1324 | PORTCR(19, 0xe6050013), /* PORT19CR */ | ||
1325 | |||
1326 | PORTCR(20, 0xe6050014), /* PORT20CR */ | ||
1327 | PORTCR(21, 0xe6050015), /* PORT21CR */ | ||
1328 | PORTCR(22, 0xe6050016), /* PORT22CR */ | ||
1329 | PORTCR(23, 0xe6050017), /* PORT23CR */ | ||
1330 | PORTCR(24, 0xe6050018), /* PORT24CR */ | ||
1331 | PORTCR(25, 0xe6050019), /* PORT25CR */ | ||
1332 | PORTCR(26, 0xe605001a), /* PORT26CR */ | ||
1333 | PORTCR(27, 0xe605001b), /* PORT27CR */ | ||
1334 | PORTCR(28, 0xe605001c), /* PORT28CR */ | ||
1335 | PORTCR(29, 0xe605001d), /* PORT29CR */ | ||
1336 | |||
1337 | PORTCR(30, 0xe605001e), /* PORT30CR */ | ||
1338 | PORTCR(31, 0xe605001f), /* PORT31CR */ | ||
1339 | PORTCR(32, 0xe6050020), /* PORT32CR */ | ||
1340 | PORTCR(33, 0xe6050021), /* PORT33CR */ | ||
1341 | PORTCR(34, 0xe6050022), /* PORT34CR */ | ||
1342 | PORTCR(35, 0xe6050023), /* PORT35CR */ | ||
1343 | PORTCR(36, 0xe6050024), /* PORT36CR */ | ||
1344 | PORTCR(37, 0xe6050025), /* PORT37CR */ | ||
1345 | PORTCR(38, 0xe6050026), /* PORT38CR */ | ||
1346 | PORTCR(39, 0xe6050027), /* PORT39CR */ | ||
1347 | |||
1348 | PORTCR(40, 0xe6050028), /* PORT40CR */ | ||
1349 | PORTCR(41, 0xe6050029), /* PORT41CR */ | ||
1350 | PORTCR(42, 0xe605002a), /* PORT42CR */ | ||
1351 | PORTCR(43, 0xe605002b), /* PORT43CR */ | ||
1352 | PORTCR(44, 0xe605002c), /* PORT44CR */ | ||
1353 | PORTCR(45, 0xe605002d), /* PORT45CR */ | ||
1354 | PORTCR(46, 0xe605002e), /* PORT46CR */ | ||
1355 | PORTCR(47, 0xe605002f), /* PORT47CR */ | ||
1356 | PORTCR(48, 0xe6050030), /* PORT48CR */ | ||
1357 | PORTCR(49, 0xe6050031), /* PORT49CR */ | ||
1358 | |||
1359 | PORTCR(50, 0xe6050032), /* PORT50CR */ | ||
1360 | PORTCR(51, 0xe6050033), /* PORT51CR */ | ||
1361 | PORTCR(52, 0xe6050034), /* PORT52CR */ | ||
1362 | PORTCR(53, 0xe6050035), /* PORT53CR */ | ||
1363 | PORTCR(54, 0xe6050036), /* PORT54CR */ | ||
1364 | PORTCR(55, 0xe6050037), /* PORT55CR */ | ||
1365 | PORTCR(56, 0xe6050038), /* PORT56CR */ | ||
1366 | PORTCR(57, 0xe6050039), /* PORT57CR */ | ||
1367 | PORTCR(58, 0xe605003a), /* PORT58CR */ | ||
1368 | PORTCR(59, 0xe605003b), /* PORT59CR */ | ||
1369 | |||
1370 | PORTCR(60, 0xe605003c), /* PORT60CR */ | ||
1371 | PORTCR(61, 0xe605003d), /* PORT61CR */ | ||
1372 | PORTCR(62, 0xe605003e), /* PORT62CR */ | ||
1373 | PORTCR(63, 0xe605003f), /* PORT63CR */ | ||
1374 | PORTCR(64, 0xe6050040), /* PORT64CR */ | ||
1375 | PORTCR(65, 0xe6050041), /* PORT65CR */ | ||
1376 | PORTCR(66, 0xe6050042), /* PORT66CR */ | ||
1377 | PORTCR(67, 0xe6050043), /* PORT67CR */ | ||
1378 | PORTCR(68, 0xe6050044), /* PORT68CR */ | ||
1379 | PORTCR(69, 0xe6050045), /* PORT69CR */ | ||
1380 | |||
1381 | PORTCR(70, 0xe6050046), /* PORT70CR */ | ||
1382 | PORTCR(71, 0xe6050047), /* PORT71CR */ | ||
1383 | PORTCR(72, 0xe6050048), /* PORT72CR */ | ||
1384 | PORTCR(73, 0xe6050049), /* PORT73CR */ | ||
1385 | PORTCR(74, 0xe605004a), /* PORT74CR */ | ||
1386 | PORTCR(75, 0xe605004b), /* PORT75CR */ | ||
1387 | PORTCR(76, 0xe605004c), /* PORT76CR */ | ||
1388 | PORTCR(77, 0xe605004d), /* PORT77CR */ | ||
1389 | PORTCR(78, 0xe605004e), /* PORT78CR */ | ||
1390 | PORTCR(79, 0xe605004f), /* PORT79CR */ | ||
1391 | |||
1392 | PORTCR(80, 0xe6050050), /* PORT80CR */ | ||
1393 | PORTCR(81, 0xe6050051), /* PORT81CR */ | ||
1394 | PORTCR(82, 0xe6050052), /* PORT82CR */ | ||
1395 | PORTCR(83, 0xe6050053), /* PORT83CR */ | ||
1396 | PORTCR(84, 0xe6050054), /* PORT84CR */ | ||
1397 | PORTCR(85, 0xe6050055), /* PORT85CR */ | ||
1398 | PORTCR(86, 0xe6050056), /* PORT86CR */ | ||
1399 | PORTCR(87, 0xe6050057), /* PORT87CR */ | ||
1400 | PORTCR(88, 0xe6050058), /* PORT88CR */ | ||
1401 | PORTCR(89, 0xe6050059), /* PORT89CR */ | ||
1402 | |||
1403 | PORTCR(90, 0xe605005a), /* PORT90CR */ | ||
1404 | PORTCR(91, 0xe605005b), /* PORT91CR */ | ||
1405 | PORTCR(92, 0xe605005c), /* PORT92CR */ | ||
1406 | PORTCR(93, 0xe605005d), /* PORT93CR */ | ||
1407 | PORTCR(94, 0xe605005e), /* PORT94CR */ | ||
1408 | PORTCR(95, 0xe605005f), /* PORT95CR */ | ||
1409 | PORTCR(96, 0xe6050060), /* PORT96CR */ | ||
1410 | PORTCR(97, 0xe6050061), /* PORT97CR */ | ||
1411 | PORTCR(98, 0xe6050062), /* PORT98CR */ | ||
1412 | PORTCR(99, 0xe6050063), /* PORT99CR */ | ||
1413 | |||
1414 | PORTCR(100, 0xe6050064), /* PORT100CR */ | ||
1415 | PORTCR(101, 0xe6050065), /* PORT101CR */ | ||
1416 | PORTCR(102, 0xe6050066), /* PORT102CR */ | ||
1417 | PORTCR(103, 0xe6050067), /* PORT103CR */ | ||
1418 | PORTCR(104, 0xe6050068), /* PORT104CR */ | ||
1419 | PORTCR(105, 0xe6050069), /* PORT105CR */ | ||
1420 | PORTCR(106, 0xe605006a), /* PORT106CR */ | ||
1421 | PORTCR(107, 0xe605006b), /* PORT107CR */ | ||
1422 | PORTCR(108, 0xe605006c), /* PORT108CR */ | ||
1423 | PORTCR(109, 0xe605006d), /* PORT109CR */ | ||
1424 | |||
1425 | PORTCR(110, 0xe605006e), /* PORT110CR */ | ||
1426 | PORTCR(111, 0xe605006f), /* PORT111CR */ | ||
1427 | PORTCR(112, 0xe6050070), /* PORT112CR */ | ||
1428 | PORTCR(113, 0xe6050071), /* PORT113CR */ | ||
1429 | PORTCR(114, 0xe6050072), /* PORT114CR */ | ||
1430 | PORTCR(115, 0xe6050073), /* PORT115CR */ | ||
1431 | PORTCR(116, 0xe6050074), /* PORT116CR */ | ||
1432 | PORTCR(117, 0xe6050075), /* PORT117CR */ | ||
1433 | PORTCR(118, 0xe6050076), /* PORT118CR */ | ||
1434 | |||
1435 | PORTCR(128, 0xe6051080), /* PORT128CR */ | ||
1436 | PORTCR(129, 0xe6051081), /* PORT129CR */ | ||
1437 | |||
1438 | PORTCR(130, 0xe6051082), /* PORT130CR */ | ||
1439 | PORTCR(131, 0xe6051083), /* PORT131CR */ | ||
1440 | PORTCR(132, 0xe6051084), /* PORT132CR */ | ||
1441 | PORTCR(133, 0xe6051085), /* PORT133CR */ | ||
1442 | PORTCR(134, 0xe6051086), /* PORT134CR */ | ||
1443 | PORTCR(135, 0xe6051087), /* PORT135CR */ | ||
1444 | PORTCR(136, 0xe6051088), /* PORT136CR */ | ||
1445 | PORTCR(137, 0xe6051089), /* PORT137CR */ | ||
1446 | PORTCR(138, 0xe605108a), /* PORT138CR */ | ||
1447 | PORTCR(139, 0xe605108b), /* PORT139CR */ | ||
1448 | |||
1449 | PORTCR(140, 0xe605108c), /* PORT140CR */ | ||
1450 | PORTCR(141, 0xe605108d), /* PORT141CR */ | ||
1451 | PORTCR(142, 0xe605108e), /* PORT142CR */ | ||
1452 | PORTCR(143, 0xe605108f), /* PORT143CR */ | ||
1453 | PORTCR(144, 0xe6051090), /* PORT144CR */ | ||
1454 | PORTCR(145, 0xe6051091), /* PORT145CR */ | ||
1455 | PORTCR(146, 0xe6051092), /* PORT146CR */ | ||
1456 | PORTCR(147, 0xe6051093), /* PORT147CR */ | ||
1457 | PORTCR(148, 0xe6051094), /* PORT148CR */ | ||
1458 | PORTCR(149, 0xe6051095), /* PORT149CR */ | ||
1459 | |||
1460 | PORTCR(150, 0xe6051096), /* PORT150CR */ | ||
1461 | PORTCR(151, 0xe6051097), /* PORT151CR */ | ||
1462 | PORTCR(152, 0xe6051098), /* PORT152CR */ | ||
1463 | PORTCR(153, 0xe6051099), /* PORT153CR */ | ||
1464 | PORTCR(154, 0xe605109a), /* PORT154CR */ | ||
1465 | PORTCR(155, 0xe605109b), /* PORT155CR */ | ||
1466 | PORTCR(156, 0xe605109c), /* PORT156CR */ | ||
1467 | PORTCR(157, 0xe605109d), /* PORT157CR */ | ||
1468 | PORTCR(158, 0xe605109e), /* PORT158CR */ | ||
1469 | PORTCR(159, 0xe605109f), /* PORT159CR */ | ||
1470 | |||
1471 | PORTCR(160, 0xe60510a0), /* PORT160CR */ | ||
1472 | PORTCR(161, 0xe60510a1), /* PORT161CR */ | ||
1473 | PORTCR(162, 0xe60510a2), /* PORT162CR */ | ||
1474 | PORTCR(163, 0xe60510a3), /* PORT163CR */ | ||
1475 | PORTCR(164, 0xe60510a4), /* PORT164CR */ | ||
1476 | |||
1477 | PORTCR(192, 0xe60520c0), /* PORT192CR */ | ||
1478 | PORTCR(193, 0xe60520c1), /* PORT193CR */ | ||
1479 | PORTCR(194, 0xe60520c2), /* PORT194CR */ | ||
1480 | PORTCR(195, 0xe60520c3), /* PORT195CR */ | ||
1481 | PORTCR(196, 0xe60520c4), /* PORT196CR */ | ||
1482 | PORTCR(197, 0xe60520c5), /* PORT197CR */ | ||
1483 | PORTCR(198, 0xe60520c6), /* PORT198CR */ | ||
1484 | PORTCR(199, 0xe60520c7), /* PORT199CR */ | ||
1485 | |||
1486 | PORTCR(200, 0xe60520c8), /* PORT200CR */ | ||
1487 | PORTCR(201, 0xe60520c9), /* PORT201CR */ | ||
1488 | PORTCR(202, 0xe60520ca), /* PORT202CR */ | ||
1489 | PORTCR(203, 0xe60520cb), /* PORT203CR */ | ||
1490 | PORTCR(204, 0xe60520cc), /* PORT204CR */ | ||
1491 | PORTCR(205, 0xe60520cd), /* PORT205CR */ | ||
1492 | PORTCR(206, 0xe60520ce), /* PORT206CR */ | ||
1493 | PORTCR(207, 0xe60520cf), /* PORT207CR */ | ||
1494 | PORTCR(208, 0xe60520d0), /* PORT208CR */ | ||
1495 | PORTCR(209, 0xe60520d1), /* PORT209CR */ | ||
1496 | |||
1497 | PORTCR(210, 0xe60520d2), /* PORT210CR */ | ||
1498 | PORTCR(211, 0xe60520d3), /* PORT211CR */ | ||
1499 | PORTCR(212, 0xe60520d4), /* PORT212CR */ | ||
1500 | PORTCR(213, 0xe60520d5), /* PORT213CR */ | ||
1501 | PORTCR(214, 0xe60520d6), /* PORT214CR */ | ||
1502 | PORTCR(215, 0xe60520d7), /* PORT215CR */ | ||
1503 | PORTCR(216, 0xe60520d8), /* PORT216CR */ | ||
1504 | PORTCR(217, 0xe60520d9), /* PORT217CR */ | ||
1505 | PORTCR(218, 0xe60520da), /* PORT218CR */ | ||
1506 | PORTCR(219, 0xe60520db), /* PORT219CR */ | ||
1507 | |||
1508 | PORTCR(220, 0xe60520dc), /* PORT220CR */ | ||
1509 | PORTCR(221, 0xe60520dd), /* PORT221CR */ | ||
1510 | PORTCR(222, 0xe60520de), /* PORT222CR */ | ||
1511 | PORTCR(223, 0xe60520df), /* PORT223CR */ | ||
1512 | PORTCR(224, 0xe60520e0), /* PORT224CR */ | ||
1513 | PORTCR(225, 0xe60520e1), /* PORT225CR */ | ||
1514 | PORTCR(226, 0xe60520e2), /* PORT226CR */ | ||
1515 | PORTCR(227, 0xe60520e3), /* PORT227CR */ | ||
1516 | PORTCR(228, 0xe60520e4), /* PORT228CR */ | ||
1517 | PORTCR(229, 0xe60520e5), /* PORT229CR */ | ||
1518 | |||
1519 | PORTCR(230, 0xe60520e6), /* PORT230CR */ | ||
1520 | PORTCR(231, 0xe60520e7), /* PORT231CR */ | ||
1521 | PORTCR(232, 0xe60520e8), /* PORT232CR */ | ||
1522 | PORTCR(233, 0xe60520e9), /* PORT233CR */ | ||
1523 | PORTCR(234, 0xe60520ea), /* PORT234CR */ | ||
1524 | PORTCR(235, 0xe60520eb), /* PORT235CR */ | ||
1525 | PORTCR(236, 0xe60520ec), /* PORT236CR */ | ||
1526 | PORTCR(237, 0xe60520ed), /* PORT237CR */ | ||
1527 | PORTCR(238, 0xe60520ee), /* PORT238CR */ | ||
1528 | PORTCR(239, 0xe60520ef), /* PORT239CR */ | ||
1529 | |||
1530 | PORTCR(240, 0xe60520f0), /* PORT240CR */ | ||
1531 | PORTCR(241, 0xe60520f1), /* PORT241CR */ | ||
1532 | PORTCR(242, 0xe60520f2), /* PORT242CR */ | ||
1533 | PORTCR(243, 0xe60520f3), /* PORT243CR */ | ||
1534 | PORTCR(244, 0xe60520f4), /* PORT244CR */ | ||
1535 | PORTCR(245, 0xe60520f5), /* PORT245CR */ | ||
1536 | PORTCR(246, 0xe60520f6), /* PORT246CR */ | ||
1537 | PORTCR(247, 0xe60520f7), /* PORT247CR */ | ||
1538 | PORTCR(248, 0xe60520f8), /* PORT248CR */ | ||
1539 | PORTCR(249, 0xe60520f9), /* PORT249CR */ | ||
1540 | |||
1541 | PORTCR(250, 0xe60520fa), /* PORT250CR */ | ||
1542 | PORTCR(251, 0xe60520fb), /* PORT251CR */ | ||
1543 | PORTCR(252, 0xe60520fc), /* PORT252CR */ | ||
1544 | PORTCR(253, 0xe60520fd), /* PORT253CR */ | ||
1545 | PORTCR(254, 0xe60520fe), /* PORT254CR */ | ||
1546 | PORTCR(255, 0xe60520ff), /* PORT255CR */ | ||
1547 | PORTCR(256, 0xe6052100), /* PORT256CR */ | ||
1548 | PORTCR(257, 0xe6052101), /* PORT257CR */ | ||
1549 | PORTCR(258, 0xe6052102), /* PORT258CR */ | ||
1550 | PORTCR(259, 0xe6052103), /* PORT259CR */ | ||
1551 | |||
1552 | PORTCR(260, 0xe6052104), /* PORT260CR */ | ||
1553 | PORTCR(261, 0xe6052105), /* PORT261CR */ | ||
1554 | PORTCR(262, 0xe6052106), /* PORT262CR */ | ||
1555 | PORTCR(263, 0xe6052107), /* PORT263CR */ | ||
1556 | PORTCR(264, 0xe6052108), /* PORT264CR */ | ||
1557 | |||
1558 | { PINMUX_CFG_REG("MSELBCR", 0xe6058024, 32, 1) { | ||
1559 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1560 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1561 | MSELBCR_MSEL17_0, MSELBCR_MSEL17_1, | ||
1562 | MSELBCR_MSEL16_0, MSELBCR_MSEL16_1, | ||
1563 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
1564 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } | ||
1565 | }, | ||
1566 | { }, | ||
1567 | }; | ||
1568 | |||
1569 | static struct pinmux_data_reg pinmux_data_regs[] = { | ||
1570 | { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) { | ||
1571 | PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, | ||
1572 | PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, | ||
1573 | PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA, | ||
1574 | PORT19_DATA, PORT18_DATA, PORT17_DATA, PORT16_DATA, | ||
1575 | PORT15_DATA, PORT14_DATA, PORT13_DATA, PORT12_DATA, | ||
1576 | PORT11_DATA, PORT10_DATA, PORT9_DATA, PORT8_DATA, | ||
1577 | PORT7_DATA, PORT6_DATA, PORT5_DATA, PORT4_DATA, | ||
1578 | PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA } | ||
1579 | }, | ||
1580 | { PINMUX_DATA_REG("PORTL063_032DR", 0xe6054004, 32) { | ||
1581 | PORT63_DATA, PORT62_DATA, PORT61_DATA, PORT60_DATA, | ||
1582 | PORT59_DATA, PORT58_DATA, PORT57_DATA, PORT56_DATA, | ||
1583 | PORT55_DATA, PORT54_DATA, PORT53_DATA, PORT52_DATA, | ||
1584 | PORT51_DATA, PORT50_DATA, PORT49_DATA, PORT48_DATA, | ||
1585 | PORT47_DATA, PORT46_DATA, PORT45_DATA, PORT44_DATA, | ||
1586 | PORT43_DATA, PORT42_DATA, PORT41_DATA, PORT40_DATA, | ||
1587 | PORT39_DATA, PORT38_DATA, PORT37_DATA, PORT36_DATA, | ||
1588 | PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA } | ||
1589 | }, | ||
1590 | { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054008, 32) { | ||
1591 | PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA, | ||
1592 | PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA, | ||
1593 | PORT87_DATA, PORT86_DATA, PORT85_DATA, PORT84_DATA, | ||
1594 | PORT83_DATA, PORT82_DATA, PORT81_DATA, PORT80_DATA, | ||
1595 | PORT79_DATA, PORT78_DATA, PORT77_DATA, PORT76_DATA, | ||
1596 | PORT75_DATA, PORT74_DATA, PORT73_DATA, PORT72_DATA, | ||
1597 | PORT71_DATA, PORT70_DATA, PORT69_DATA, PORT68_DATA, | ||
1598 | PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA } | ||
1599 | }, | ||
1600 | { PINMUX_DATA_REG("PORTD127_096DR", 0xe605400C, 32) { | ||
1601 | 0, 0, 0, 0, | ||
1602 | 0, 0, 0, 0, | ||
1603 | 0, PORT118_DATA, PORT117_DATA, PORT116_DATA, | ||
1604 | PORT115_DATA, PORT114_DATA, PORT113_DATA, PORT112_DATA, | ||
1605 | PORT111_DATA, PORT110_DATA, PORT109_DATA, PORT108_DATA, | ||
1606 | PORT107_DATA, PORT106_DATA, PORT105_DATA, PORT104_DATA, | ||
1607 | PORT103_DATA, PORT102_DATA, PORT101_DATA, PORT100_DATA, | ||
1608 | PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA } | ||
1609 | }, | ||
1610 | { PINMUX_DATA_REG("PORTD159_128DR", 0xe6055000, 32) { | ||
1611 | PORT159_DATA, PORT158_DATA, PORT157_DATA, PORT156_DATA, | ||
1612 | PORT155_DATA, PORT154_DATA, PORT153_DATA, PORT152_DATA, | ||
1613 | PORT151_DATA, PORT150_DATA, PORT149_DATA, PORT148_DATA, | ||
1614 | PORT147_DATA, PORT146_DATA, PORT145_DATA, PORT144_DATA, | ||
1615 | PORT143_DATA, PORT142_DATA, PORT141_DATA, PORT140_DATA, | ||
1616 | PORT139_DATA, PORT138_DATA, PORT137_DATA, PORT136_DATA, | ||
1617 | PORT135_DATA, PORT134_DATA, PORT133_DATA, PORT132_DATA, | ||
1618 | PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA } | ||
1619 | }, | ||
1620 | { PINMUX_DATA_REG("PORTR191_160DR", 0xe6055004, 32) { | ||
1621 | 0, 0, 0, 0, | ||
1622 | 0, 0, 0, 0, | ||
1623 | 0, 0, 0, 0, | ||
1624 | 0, 0, 0, 0, | ||
1625 | 0, 0, 0, 0, | ||
1626 | 0, 0, 0, 0, | ||
1627 | 0, 0, 0, PORT164_DATA, | ||
1628 | PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA } | ||
1629 | }, | ||
1630 | { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056000, 32) { | ||
1631 | PORT223_DATA, PORT222_DATA, PORT221_DATA, PORT220_DATA, | ||
1632 | PORT219_DATA, PORT218_DATA, PORT217_DATA, PORT216_DATA, | ||
1633 | PORT215_DATA, PORT214_DATA, PORT213_DATA, PORT212_DATA, | ||
1634 | PORT211_DATA, PORT210_DATA, PORT209_DATA, PORT208_DATA, | ||
1635 | PORT207_DATA, PORT206_DATA, PORT205_DATA, PORT204_DATA, | ||
1636 | PORT203_DATA, PORT202_DATA, PORT201_DATA, PORT200_DATA, | ||
1637 | PORT199_DATA, PORT198_DATA, PORT197_DATA, PORT196_DATA, | ||
1638 | PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA } | ||
1639 | }, | ||
1640 | { PINMUX_DATA_REG("PORTU255_224DR", 0xe6056004, 32) { | ||
1641 | PORT255_DATA, PORT254_DATA, PORT253_DATA, PORT252_DATA, | ||
1642 | PORT251_DATA, PORT250_DATA, PORT249_DATA, PORT248_DATA, | ||
1643 | PORT247_DATA, PORT246_DATA, PORT245_DATA, PORT244_DATA, | ||
1644 | PORT243_DATA, PORT242_DATA, PORT241_DATA, PORT240_DATA, | ||
1645 | PORT239_DATA, PORT238_DATA, PORT237_DATA, PORT236_DATA, | ||
1646 | PORT235_DATA, PORT234_DATA, PORT233_DATA, PORT232_DATA, | ||
1647 | PORT231_DATA, PORT230_DATA, PORT229_DATA, PORT228_DATA, | ||
1648 | PORT227_DATA, PORT226_DATA, PORT225_DATA, PORT224_DATA } | ||
1649 | }, | ||
1650 | { PINMUX_DATA_REG("PORTU287_256DR", 0xe6056008, 32) { | ||
1651 | 0, 0, 0, 0, | ||
1652 | 0, 0, 0, 0, | ||
1653 | 0, 0, 0, 0, | ||
1654 | 0, 0, 0, 0, | ||
1655 | 0, 0, 0, 0, | ||
1656 | 0, 0, 0, PORT264_DATA, | ||
1657 | PORT263_DATA, PORT262_DATA, PORT261_DATA, PORT260_DATA, | ||
1658 | PORT259_DATA, PORT258_DATA, PORT257_DATA, PORT256_DATA } | ||
1659 | }, | ||
1660 | { }, | ||
1661 | }; | ||
1662 | |||
1663 | static struct pinmux_info sh7377_pinmux_info = { | ||
1664 | .name = "sh7377_pfc", | ||
1665 | .reserved_id = PINMUX_RESERVED, | ||
1666 | .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END }, | ||
1667 | .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, | ||
1668 | .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, | ||
1669 | .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END }, | ||
1670 | .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, | ||
1671 | .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END }, | ||
1672 | .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, | ||
1673 | |||
1674 | .first_gpio = GPIO_PORT0, | ||
1675 | .last_gpio = GPIO_FN_RESETOUTS, | ||
1676 | |||
1677 | .gpios = pinmux_gpios, | ||
1678 | .cfg_regs = pinmux_config_regs, | ||
1679 | .data_regs = pinmux_data_regs, | ||
1680 | |||
1681 | .gpio_data = pinmux_data, | ||
1682 | .gpio_data_size = ARRAY_SIZE(pinmux_data), | ||
1683 | }; | ||
1684 | |||
1685 | void sh7377_pinmux_init(void) | ||
1686 | { | ||
1687 | register_pinmux(&sh7377_pinmux_info); | ||
1688 | } | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 96f11394c7c0..095222469d03 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -584,6 +584,21 @@ static struct platform_device i2c1_device = { | |||
584 | .num_resources = ARRAY_SIZE(i2c1_resources), | 584 | .num_resources = ARRAY_SIZE(i2c1_resources), |
585 | }; | 585 | }; |
586 | 586 | ||
587 | static struct resource pmu_resources[] = { | ||
588 | [0] = { | ||
589 | .start = evt2irq(0x19a0), | ||
590 | .end = evt2irq(0x19a0), | ||
591 | .flags = IORESOURCE_IRQ, | ||
592 | }, | ||
593 | }; | ||
594 | |||
595 | static struct platform_device pmu_device = { | ||
596 | .name = "arm-pmu", | ||
597 | .id = -1, | ||
598 | .num_resources = ARRAY_SIZE(pmu_resources), | ||
599 | .resource = pmu_resources, | ||
600 | }; | ||
601 | |||
587 | static struct platform_device *r8a7740_late_devices[] __initdata = { | 602 | static struct platform_device *r8a7740_late_devices[] __initdata = { |
588 | &i2c0_device, | 603 | &i2c0_device, |
589 | &i2c1_device, | 604 | &i2c1_device, |
@@ -591,6 +606,7 @@ static struct platform_device *r8a7740_late_devices[] __initdata = { | |||
591 | &dma1_device, | 606 | &dma1_device, |
592 | &dma2_device, | 607 | &dma2_device, |
593 | &usb_dma_device, | 608 | &usb_dma_device, |
609 | &pmu_device, | ||
594 | }; | 610 | }; |
595 | 611 | ||
596 | /* | 612 | /* |
@@ -741,7 +757,7 @@ static const char *r8a7740_boards_compat_dt[] __initdata = { | |||
741 | NULL, | 757 | NULL, |
742 | }; | 758 | }; |
743 | 759 | ||
744 | DT_MACHINE_START(SH7372_DT, "Generic R8A7740 (Flattened Device Tree)") | 760 | DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)") |
745 | .map_io = r8a7740_map_io, | 761 | .map_io = r8a7740_map_io, |
746 | .init_early = r8a7740_add_early_devices_dt, | 762 | .init_early = r8a7740_add_early_devices_dt, |
747 | .init_irq = r8a7740_init_irq, | 763 | .init_irq = r8a7740_init_irq, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index ebbffc25f24f..7a1ad4f38539 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -229,6 +229,79 @@ static struct platform_device tmu01_device = { | |||
229 | .num_resources = ARRAY_SIZE(tmu01_resources), | 229 | .num_resources = ARRAY_SIZE(tmu01_resources), |
230 | }; | 230 | }; |
231 | 231 | ||
232 | /* I2C */ | ||
233 | static struct resource rcar_i2c0_res[] = { | ||
234 | { | ||
235 | .start = 0xffc70000, | ||
236 | .end = 0xffc70fff, | ||
237 | .flags = IORESOURCE_MEM, | ||
238 | }, { | ||
239 | .start = gic_spi(79), | ||
240 | .flags = IORESOURCE_IRQ, | ||
241 | }, | ||
242 | }; | ||
243 | |||
244 | static struct platform_device i2c0_device = { | ||
245 | .name = "i2c-rcar", | ||
246 | .id = 0, | ||
247 | .resource = rcar_i2c0_res, | ||
248 | .num_resources = ARRAY_SIZE(rcar_i2c0_res), | ||
249 | }; | ||
250 | |||
251 | static struct resource rcar_i2c1_res[] = { | ||
252 | { | ||
253 | .start = 0xffc71000, | ||
254 | .end = 0xffc71fff, | ||
255 | .flags = IORESOURCE_MEM, | ||
256 | }, { | ||
257 | .start = gic_spi(82), | ||
258 | .flags = IORESOURCE_IRQ, | ||
259 | }, | ||
260 | }; | ||
261 | |||
262 | static struct platform_device i2c1_device = { | ||
263 | .name = "i2c-rcar", | ||
264 | .id = 1, | ||
265 | .resource = rcar_i2c1_res, | ||
266 | .num_resources = ARRAY_SIZE(rcar_i2c1_res), | ||
267 | }; | ||
268 | |||
269 | static struct resource rcar_i2c2_res[] = { | ||
270 | { | ||
271 | .start = 0xffc72000, | ||
272 | .end = 0xffc72fff, | ||
273 | .flags = IORESOURCE_MEM, | ||
274 | }, { | ||
275 | .start = gic_spi(80), | ||
276 | .flags = IORESOURCE_IRQ, | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | static struct platform_device i2c2_device = { | ||
281 | .name = "i2c-rcar", | ||
282 | .id = 2, | ||
283 | .resource = rcar_i2c2_res, | ||
284 | .num_resources = ARRAY_SIZE(rcar_i2c2_res), | ||
285 | }; | ||
286 | |||
287 | static struct resource rcar_i2c3_res[] = { | ||
288 | { | ||
289 | .start = 0xffc73000, | ||
290 | .end = 0xffc73fff, | ||
291 | .flags = IORESOURCE_MEM, | ||
292 | }, { | ||
293 | .start = gic_spi(81), | ||
294 | .flags = IORESOURCE_IRQ, | ||
295 | }, | ||
296 | }; | ||
297 | |||
298 | static struct platform_device i2c3_device = { | ||
299 | .name = "i2c-rcar", | ||
300 | .id = 3, | ||
301 | .resource = rcar_i2c3_res, | ||
302 | .num_resources = ARRAY_SIZE(rcar_i2c3_res), | ||
303 | }; | ||
304 | |||
232 | static struct platform_device *r8a7779_early_devices[] __initdata = { | 305 | static struct platform_device *r8a7779_early_devices[] __initdata = { |
233 | &scif0_device, | 306 | &scif0_device, |
234 | &scif1_device, | 307 | &scif1_device, |
@@ -238,6 +311,10 @@ static struct platform_device *r8a7779_early_devices[] __initdata = { | |||
238 | &scif5_device, | 311 | &scif5_device, |
239 | &tmu00_device, | 312 | &tmu00_device, |
240 | &tmu01_device, | 313 | &tmu01_device, |
314 | &i2c0_device, | ||
315 | &i2c1_device, | ||
316 | &i2c2_device, | ||
317 | &i2c3_device, | ||
241 | }; | 318 | }; |
242 | 319 | ||
243 | static struct platform_device *r8a7779_late_devices[] __initdata = { | 320 | static struct platform_device *r8a7779_late_devices[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c deleted file mode 100644 index e647f5410879..000000000000 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ /dev/null | |||
@@ -1,481 +0,0 @@ | |||
1 | /* | ||
2 | * sh7367 processor support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2008 Yoshihiro Shimoda | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/uio_driver.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/input.h> | ||
28 | #include <linux/io.h> | ||
29 | #include <linux/serial_sci.h> | ||
30 | #include <linux/sh_timer.h> | ||
31 | #include <mach/hardware.h> | ||
32 | #include <mach/common.h> | ||
33 | #include <mach/irqs.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/time.h> | ||
38 | |||
39 | static struct map_desc sh7367_io_desc[] __initdata = { | ||
40 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
41 | * used by CPGA, INTC and PFC. | ||
42 | */ | ||
43 | { | ||
44 | .virtual = 0xe6000000, | ||
45 | .pfn = __phys_to_pfn(0xe6000000), | ||
46 | .length = 256 << 20, | ||
47 | .type = MT_DEVICE_NONSHARED | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | void __init sh7367_map_io(void) | ||
52 | { | ||
53 | iotable_init(sh7367_io_desc, ARRAY_SIZE(sh7367_io_desc)); | ||
54 | } | ||
55 | |||
56 | /* SCIFA0 */ | ||
57 | static struct plat_sci_port scif0_platform_data = { | ||
58 | .mapbase = 0xe6c40000, | ||
59 | .flags = UPF_BOOT_AUTOCONF, | ||
60 | .scscr = SCSCR_RE | SCSCR_TE, | ||
61 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
62 | .type = PORT_SCIFA, | ||
63 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), | ||
64 | evt2irq(0xc00), evt2irq(0xc00) }, | ||
65 | }; | ||
66 | |||
67 | static struct platform_device scif0_device = { | ||
68 | .name = "sh-sci", | ||
69 | .id = 0, | ||
70 | .dev = { | ||
71 | .platform_data = &scif0_platform_data, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | /* SCIFA1 */ | ||
76 | static struct plat_sci_port scif1_platform_data = { | ||
77 | .mapbase = 0xe6c50000, | ||
78 | .flags = UPF_BOOT_AUTOCONF, | ||
79 | .scscr = SCSCR_RE | SCSCR_TE, | ||
80 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
81 | .type = PORT_SCIFA, | ||
82 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), | ||
83 | evt2irq(0xc20), evt2irq(0xc20) }, | ||
84 | }; | ||
85 | |||
86 | static struct platform_device scif1_device = { | ||
87 | .name = "sh-sci", | ||
88 | .id = 1, | ||
89 | .dev = { | ||
90 | .platform_data = &scif1_platform_data, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | /* SCIFA2 */ | ||
95 | static struct plat_sci_port scif2_platform_data = { | ||
96 | .mapbase = 0xe6c60000, | ||
97 | .flags = UPF_BOOT_AUTOCONF, | ||
98 | .scscr = SCSCR_RE | SCSCR_TE, | ||
99 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
100 | .type = PORT_SCIFA, | ||
101 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), | ||
102 | evt2irq(0xc40), evt2irq(0xc40) }, | ||
103 | }; | ||
104 | |||
105 | static struct platform_device scif2_device = { | ||
106 | .name = "sh-sci", | ||
107 | .id = 2, | ||
108 | .dev = { | ||
109 | .platform_data = &scif2_platform_data, | ||
110 | }, | ||
111 | }; | ||
112 | |||
113 | /* SCIFA3 */ | ||
114 | static struct plat_sci_port scif3_platform_data = { | ||
115 | .mapbase = 0xe6c70000, | ||
116 | .flags = UPF_BOOT_AUTOCONF, | ||
117 | .scscr = SCSCR_RE | SCSCR_TE, | ||
118 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
119 | .type = PORT_SCIFA, | ||
120 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), | ||
121 | evt2irq(0xc60), evt2irq(0xc60) }, | ||
122 | }; | ||
123 | |||
124 | static struct platform_device scif3_device = { | ||
125 | .name = "sh-sci", | ||
126 | .id = 3, | ||
127 | .dev = { | ||
128 | .platform_data = &scif3_platform_data, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | /* SCIFA4 */ | ||
133 | static struct plat_sci_port scif4_platform_data = { | ||
134 | .mapbase = 0xe6c80000, | ||
135 | .flags = UPF_BOOT_AUTOCONF, | ||
136 | .scscr = SCSCR_RE | SCSCR_TE, | ||
137 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
138 | .type = PORT_SCIFA, | ||
139 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), | ||
140 | evt2irq(0xd20), evt2irq(0xd20) }, | ||
141 | }; | ||
142 | |||
143 | static struct platform_device scif4_device = { | ||
144 | .name = "sh-sci", | ||
145 | .id = 4, | ||
146 | .dev = { | ||
147 | .platform_data = &scif4_platform_data, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | /* SCIFA5 */ | ||
152 | static struct plat_sci_port scif5_platform_data = { | ||
153 | .mapbase = 0xe6cb0000, | ||
154 | .flags = UPF_BOOT_AUTOCONF, | ||
155 | .scscr = SCSCR_RE | SCSCR_TE, | ||
156 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
157 | .type = PORT_SCIFA, | ||
158 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), | ||
159 | evt2irq(0xd40), evt2irq(0xd40) }, | ||
160 | }; | ||
161 | |||
162 | static struct platform_device scif5_device = { | ||
163 | .name = "sh-sci", | ||
164 | .id = 5, | ||
165 | .dev = { | ||
166 | .platform_data = &scif5_platform_data, | ||
167 | }, | ||
168 | }; | ||
169 | |||
170 | /* SCIFB */ | ||
171 | static struct plat_sci_port scif6_platform_data = { | ||
172 | .mapbase = 0xe6c30000, | ||
173 | .flags = UPF_BOOT_AUTOCONF, | ||
174 | .scscr = SCSCR_RE | SCSCR_TE, | ||
175 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
176 | .type = PORT_SCIFB, | ||
177 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), | ||
178 | evt2irq(0xd60), evt2irq(0xd60) }, | ||
179 | }; | ||
180 | |||
181 | static struct platform_device scif6_device = { | ||
182 | .name = "sh-sci", | ||
183 | .id = 6, | ||
184 | .dev = { | ||
185 | .platform_data = &scif6_platform_data, | ||
186 | }, | ||
187 | }; | ||
188 | |||
189 | static struct sh_timer_config cmt10_platform_data = { | ||
190 | .name = "CMT10", | ||
191 | .channel_offset = 0x10, | ||
192 | .timer_bit = 0, | ||
193 | .clockevent_rating = 125, | ||
194 | .clocksource_rating = 125, | ||
195 | }; | ||
196 | |||
197 | static struct resource cmt10_resources[] = { | ||
198 | [0] = { | ||
199 | .name = "CMT10", | ||
200 | .start = 0xe6138010, | ||
201 | .end = 0xe613801b, | ||
202 | .flags = IORESOURCE_MEM, | ||
203 | }, | ||
204 | [1] = { | ||
205 | .start = evt2irq(0xb00), /* CMT1_CMT10 */ | ||
206 | .flags = IORESOURCE_IRQ, | ||
207 | }, | ||
208 | }; | ||
209 | |||
210 | static struct platform_device cmt10_device = { | ||
211 | .name = "sh_cmt", | ||
212 | .id = 10, | ||
213 | .dev = { | ||
214 | .platform_data = &cmt10_platform_data, | ||
215 | }, | ||
216 | .resource = cmt10_resources, | ||
217 | .num_resources = ARRAY_SIZE(cmt10_resources), | ||
218 | }; | ||
219 | |||
220 | /* VPU */ | ||
221 | static struct uio_info vpu_platform_data = { | ||
222 | .name = "VPU5", | ||
223 | .version = "0", | ||
224 | .irq = intcs_evt2irq(0x980), | ||
225 | }; | ||
226 | |||
227 | static struct resource vpu_resources[] = { | ||
228 | [0] = { | ||
229 | .name = "VPU", | ||
230 | .start = 0xfe900000, | ||
231 | .end = 0xfe902807, | ||
232 | .flags = IORESOURCE_MEM, | ||
233 | }, | ||
234 | }; | ||
235 | |||
236 | static struct platform_device vpu_device = { | ||
237 | .name = "uio_pdrv_genirq", | ||
238 | .id = 0, | ||
239 | .dev = { | ||
240 | .platform_data = &vpu_platform_data, | ||
241 | }, | ||
242 | .resource = vpu_resources, | ||
243 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
244 | }; | ||
245 | |||
246 | /* VEU0 */ | ||
247 | static struct uio_info veu0_platform_data = { | ||
248 | .name = "VEU0", | ||
249 | .version = "0", | ||
250 | .irq = intcs_evt2irq(0x700), | ||
251 | }; | ||
252 | |||
253 | static struct resource veu0_resources[] = { | ||
254 | [0] = { | ||
255 | .name = "VEU0", | ||
256 | .start = 0xfe920000, | ||
257 | .end = 0xfe9200b7, | ||
258 | .flags = IORESOURCE_MEM, | ||
259 | }, | ||
260 | }; | ||
261 | |||
262 | static struct platform_device veu0_device = { | ||
263 | .name = "uio_pdrv_genirq", | ||
264 | .id = 1, | ||
265 | .dev = { | ||
266 | .platform_data = &veu0_platform_data, | ||
267 | }, | ||
268 | .resource = veu0_resources, | ||
269 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
270 | }; | ||
271 | |||
272 | /* VEU1 */ | ||
273 | static struct uio_info veu1_platform_data = { | ||
274 | .name = "VEU1", | ||
275 | .version = "0", | ||
276 | .irq = intcs_evt2irq(0x720), | ||
277 | }; | ||
278 | |||
279 | static struct resource veu1_resources[] = { | ||
280 | [0] = { | ||
281 | .name = "VEU1", | ||
282 | .start = 0xfe924000, | ||
283 | .end = 0xfe9240b7, | ||
284 | .flags = IORESOURCE_MEM, | ||
285 | }, | ||
286 | }; | ||
287 | |||
288 | static struct platform_device veu1_device = { | ||
289 | .name = "uio_pdrv_genirq", | ||
290 | .id = 2, | ||
291 | .dev = { | ||
292 | .platform_data = &veu1_platform_data, | ||
293 | }, | ||
294 | .resource = veu1_resources, | ||
295 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
296 | }; | ||
297 | |||
298 | /* VEU2 */ | ||
299 | static struct uio_info veu2_platform_data = { | ||
300 | .name = "VEU2", | ||
301 | .version = "0", | ||
302 | .irq = intcs_evt2irq(0x740), | ||
303 | }; | ||
304 | |||
305 | static struct resource veu2_resources[] = { | ||
306 | [0] = { | ||
307 | .name = "VEU2", | ||
308 | .start = 0xfe928000, | ||
309 | .end = 0xfe9280b7, | ||
310 | .flags = IORESOURCE_MEM, | ||
311 | }, | ||
312 | }; | ||
313 | |||
314 | static struct platform_device veu2_device = { | ||
315 | .name = "uio_pdrv_genirq", | ||
316 | .id = 3, | ||
317 | .dev = { | ||
318 | .platform_data = &veu2_platform_data, | ||
319 | }, | ||
320 | .resource = veu2_resources, | ||
321 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
322 | }; | ||
323 | |||
324 | /* VEU3 */ | ||
325 | static struct uio_info veu3_platform_data = { | ||
326 | .name = "VEU3", | ||
327 | .version = "0", | ||
328 | .irq = intcs_evt2irq(0x760), | ||
329 | }; | ||
330 | |||
331 | static struct resource veu3_resources[] = { | ||
332 | [0] = { | ||
333 | .name = "VEU3", | ||
334 | .start = 0xfe92c000, | ||
335 | .end = 0xfe92c0b7, | ||
336 | .flags = IORESOURCE_MEM, | ||
337 | }, | ||
338 | }; | ||
339 | |||
340 | static struct platform_device veu3_device = { | ||
341 | .name = "uio_pdrv_genirq", | ||
342 | .id = 4, | ||
343 | .dev = { | ||
344 | .platform_data = &veu3_platform_data, | ||
345 | }, | ||
346 | .resource = veu3_resources, | ||
347 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
348 | }; | ||
349 | |||
350 | /* VEU2H */ | ||
351 | static struct uio_info veu2h_platform_data = { | ||
352 | .name = "VEU2H", | ||
353 | .version = "0", | ||
354 | .irq = intcs_evt2irq(0x520), | ||
355 | }; | ||
356 | |||
357 | static struct resource veu2h_resources[] = { | ||
358 | [0] = { | ||
359 | .name = "VEU2H", | ||
360 | .start = 0xfe93c000, | ||
361 | .end = 0xfe93c27b, | ||
362 | .flags = IORESOURCE_MEM, | ||
363 | }, | ||
364 | }; | ||
365 | |||
366 | static struct platform_device veu2h_device = { | ||
367 | .name = "uio_pdrv_genirq", | ||
368 | .id = 5, | ||
369 | .dev = { | ||
370 | .platform_data = &veu2h_platform_data, | ||
371 | }, | ||
372 | .resource = veu2h_resources, | ||
373 | .num_resources = ARRAY_SIZE(veu2h_resources), | ||
374 | }; | ||
375 | |||
376 | /* JPU */ | ||
377 | static struct uio_info jpu_platform_data = { | ||
378 | .name = "JPU", | ||
379 | .version = "0", | ||
380 | .irq = intcs_evt2irq(0x560), | ||
381 | }; | ||
382 | |||
383 | static struct resource jpu_resources[] = { | ||
384 | [0] = { | ||
385 | .name = "JPU", | ||
386 | .start = 0xfe980000, | ||
387 | .end = 0xfe9902d3, | ||
388 | .flags = IORESOURCE_MEM, | ||
389 | }, | ||
390 | }; | ||
391 | |||
392 | static struct platform_device jpu_device = { | ||
393 | .name = "uio_pdrv_genirq", | ||
394 | .id = 6, | ||
395 | .dev = { | ||
396 | .platform_data = &jpu_platform_data, | ||
397 | }, | ||
398 | .resource = jpu_resources, | ||
399 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
400 | }; | ||
401 | |||
402 | /* SPU1 */ | ||
403 | static struct uio_info spu1_platform_data = { | ||
404 | .name = "SPU1", | ||
405 | .version = "0", | ||
406 | .irq = evt2irq(0xfc0), | ||
407 | }; | ||
408 | |||
409 | static struct resource spu1_resources[] = { | ||
410 | [0] = { | ||
411 | .name = "SPU1", | ||
412 | .start = 0xfe300000, | ||
413 | .end = 0xfe3fffff, | ||
414 | .flags = IORESOURCE_MEM, | ||
415 | }, | ||
416 | }; | ||
417 | |||
418 | static struct platform_device spu1_device = { | ||
419 | .name = "uio_pdrv_genirq", | ||
420 | .id = 7, | ||
421 | .dev = { | ||
422 | .platform_data = &spu1_platform_data, | ||
423 | }, | ||
424 | .resource = spu1_resources, | ||
425 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
426 | }; | ||
427 | |||
428 | static struct platform_device *sh7367_early_devices[] __initdata = { | ||
429 | &scif0_device, | ||
430 | &scif1_device, | ||
431 | &scif2_device, | ||
432 | &scif3_device, | ||
433 | &scif4_device, | ||
434 | &scif5_device, | ||
435 | &scif6_device, | ||
436 | &cmt10_device, | ||
437 | }; | ||
438 | |||
439 | static struct platform_device *sh7367_devices[] __initdata = { | ||
440 | &vpu_device, | ||
441 | &veu0_device, | ||
442 | &veu1_device, | ||
443 | &veu2_device, | ||
444 | &veu3_device, | ||
445 | &veu2h_device, | ||
446 | &jpu_device, | ||
447 | &spu1_device, | ||
448 | }; | ||
449 | |||
450 | void __init sh7367_add_standard_devices(void) | ||
451 | { | ||
452 | platform_add_devices(sh7367_early_devices, | ||
453 | ARRAY_SIZE(sh7367_early_devices)); | ||
454 | |||
455 | platform_add_devices(sh7367_devices, | ||
456 | ARRAY_SIZE(sh7367_devices)); | ||
457 | } | ||
458 | |||
459 | static void __init sh7367_earlytimer_init(void) | ||
460 | { | ||
461 | sh7367_clock_init(); | ||
462 | shmobile_earlytimer_init(); | ||
463 | } | ||
464 | |||
465 | #define SYMSTPCR2 IOMEM(0xe6158048) | ||
466 | #define SYMSTPCR2_CMT1 (1 << 29) | ||
467 | |||
468 | void __init sh7367_add_early_devices(void) | ||
469 | { | ||
470 | /* enable clock to CMT1 */ | ||
471 | __raw_writel(__raw_readl(SYMSTPCR2) & ~SYMSTPCR2_CMT1, SYMSTPCR2); | ||
472 | |||
473 | early_platform_add_devices(sh7367_early_devices, | ||
474 | ARRAY_SIZE(sh7367_early_devices)); | ||
475 | |||
476 | /* setup early console here as well */ | ||
477 | shmobile_setup_console(); | ||
478 | |||
479 | /* override timer setup with soc-specific code */ | ||
480 | shmobile_timer.init = sh7367_earlytimer_init; | ||
481 | } | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index be6f746c97fa..c917882424a7 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -402,6 +402,26 @@ static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = { | |||
402 | .chcr = CHCR_RX(XMIT_SZ_8BIT), | 402 | .chcr = CHCR_RX(XMIT_SZ_8BIT), |
403 | .mid_rid = 0x3e, | 403 | .mid_rid = 0x3e, |
404 | }, { | 404 | }, { |
405 | .slave_id = SHDMA_SLAVE_FLCTL0_TX, | ||
406 | .addr = 0xe6a30050, | ||
407 | .chcr = CHCR_TX(XMIT_SZ_32BIT), | ||
408 | .mid_rid = 0x83, | ||
409 | }, { | ||
410 | .slave_id = SHDMA_SLAVE_FLCTL0_RX, | ||
411 | .addr = 0xe6a30050, | ||
412 | .chcr = CHCR_RX(XMIT_SZ_32BIT), | ||
413 | .mid_rid = 0x83, | ||
414 | }, { | ||
415 | .slave_id = SHDMA_SLAVE_FLCTL1_TX, | ||
416 | .addr = 0xe6a30060, | ||
417 | .chcr = CHCR_TX(XMIT_SZ_32BIT), | ||
418 | .mid_rid = 0x87, | ||
419 | }, { | ||
420 | .slave_id = SHDMA_SLAVE_FLCTL1_RX, | ||
421 | .addr = 0xe6a30060, | ||
422 | .chcr = CHCR_RX(XMIT_SZ_32BIT), | ||
423 | .mid_rid = 0x87, | ||
424 | }, { | ||
405 | .slave_id = SHDMA_SLAVE_SDHI0_TX, | 425 | .slave_id = SHDMA_SLAVE_SDHI0_TX, |
406 | .addr = 0xe6850030, | 426 | .addr = 0xe6850030, |
407 | .chcr = CHCR_TX(XMIT_SZ_16BIT), | 427 | .chcr = CHCR_TX(XMIT_SZ_16BIT), |
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c deleted file mode 100644 index edcf98bb7012..000000000000 --- a/arch/arm/mach-shmobile/setup-sh7377.c +++ /dev/null | |||
@@ -1,549 +0,0 @@ | |||
1 | /* | ||
2 | * sh7377 processor support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2008 Yoshihiro Shimoda | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/of_platform.h> | ||
26 | #include <linux/uio_driver.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/input.h> | ||
29 | #include <linux/io.h> | ||
30 | #include <linux/serial_sci.h> | ||
31 | #include <linux/sh_intc.h> | ||
32 | #include <linux/sh_timer.h> | ||
33 | #include <mach/hardware.h> | ||
34 | #include <mach/common.h> | ||
35 | #include <asm/mach/map.h> | ||
36 | #include <mach/irqs.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/mach/time.h> | ||
40 | |||
41 | static struct map_desc sh7377_io_desc[] __initdata = { | ||
42 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
43 | * used by CPGA, INTC and PFC. | ||
44 | */ | ||
45 | { | ||
46 | .virtual = 0xe6000000, | ||
47 | .pfn = __phys_to_pfn(0xe6000000), | ||
48 | .length = 256 << 20, | ||
49 | .type = MT_DEVICE_NONSHARED | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | void __init sh7377_map_io(void) | ||
54 | { | ||
55 | iotable_init(sh7377_io_desc, ARRAY_SIZE(sh7377_io_desc)); | ||
56 | } | ||
57 | |||
58 | /* SCIFA0 */ | ||
59 | static struct plat_sci_port scif0_platform_data = { | ||
60 | .mapbase = 0xe6c40000, | ||
61 | .flags = UPF_BOOT_AUTOCONF, | ||
62 | .scscr = SCSCR_RE | SCSCR_TE, | ||
63 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
64 | .type = PORT_SCIFA, | ||
65 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), | ||
66 | evt2irq(0xc00), evt2irq(0xc00) }, | ||
67 | }; | ||
68 | |||
69 | static struct platform_device scif0_device = { | ||
70 | .name = "sh-sci", | ||
71 | .id = 0, | ||
72 | .dev = { | ||
73 | .platform_data = &scif0_platform_data, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | /* SCIFA1 */ | ||
78 | static struct plat_sci_port scif1_platform_data = { | ||
79 | .mapbase = 0xe6c50000, | ||
80 | .flags = UPF_BOOT_AUTOCONF, | ||
81 | .scscr = SCSCR_RE | SCSCR_TE, | ||
82 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
83 | .type = PORT_SCIFA, | ||
84 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), | ||
85 | evt2irq(0xc20), evt2irq(0xc20) }, | ||
86 | }; | ||
87 | |||
88 | static struct platform_device scif1_device = { | ||
89 | .name = "sh-sci", | ||
90 | .id = 1, | ||
91 | .dev = { | ||
92 | .platform_data = &scif1_platform_data, | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | /* SCIFA2 */ | ||
97 | static struct plat_sci_port scif2_platform_data = { | ||
98 | .mapbase = 0xe6c60000, | ||
99 | .flags = UPF_BOOT_AUTOCONF, | ||
100 | .scscr = SCSCR_RE | SCSCR_TE, | ||
101 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
102 | .type = PORT_SCIFA, | ||
103 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), | ||
104 | evt2irq(0xc40), evt2irq(0xc40) }, | ||
105 | }; | ||
106 | |||
107 | static struct platform_device scif2_device = { | ||
108 | .name = "sh-sci", | ||
109 | .id = 2, | ||
110 | .dev = { | ||
111 | .platform_data = &scif2_platform_data, | ||
112 | }, | ||
113 | }; | ||
114 | |||
115 | /* SCIFA3 */ | ||
116 | static struct plat_sci_port scif3_platform_data = { | ||
117 | .mapbase = 0xe6c70000, | ||
118 | .flags = UPF_BOOT_AUTOCONF, | ||
119 | .scscr = SCSCR_RE | SCSCR_TE, | ||
120 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
121 | .type = PORT_SCIFA, | ||
122 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), | ||
123 | evt2irq(0xc60), evt2irq(0xc60) }, | ||
124 | }; | ||
125 | |||
126 | static struct platform_device scif3_device = { | ||
127 | .name = "sh-sci", | ||
128 | .id = 3, | ||
129 | .dev = { | ||
130 | .platform_data = &scif3_platform_data, | ||
131 | }, | ||
132 | }; | ||
133 | |||
134 | /* SCIFA4 */ | ||
135 | static struct plat_sci_port scif4_platform_data = { | ||
136 | .mapbase = 0xe6c80000, | ||
137 | .flags = UPF_BOOT_AUTOCONF, | ||
138 | .scscr = SCSCR_RE | SCSCR_TE, | ||
139 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
140 | .type = PORT_SCIFA, | ||
141 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), | ||
142 | evt2irq(0xd20), evt2irq(0xd20) }, | ||
143 | }; | ||
144 | |||
145 | static struct platform_device scif4_device = { | ||
146 | .name = "sh-sci", | ||
147 | .id = 4, | ||
148 | .dev = { | ||
149 | .platform_data = &scif4_platform_data, | ||
150 | }, | ||
151 | }; | ||
152 | |||
153 | /* SCIFA5 */ | ||
154 | static struct plat_sci_port scif5_platform_data = { | ||
155 | .mapbase = 0xe6cb0000, | ||
156 | .flags = UPF_BOOT_AUTOCONF, | ||
157 | .scscr = SCSCR_RE | SCSCR_TE, | ||
158 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
159 | .type = PORT_SCIFA, | ||
160 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), | ||
161 | evt2irq(0xd40), evt2irq(0xd40) }, | ||
162 | }; | ||
163 | |||
164 | static struct platform_device scif5_device = { | ||
165 | .name = "sh-sci", | ||
166 | .id = 5, | ||
167 | .dev = { | ||
168 | .platform_data = &scif5_platform_data, | ||
169 | }, | ||
170 | }; | ||
171 | |||
172 | /* SCIFA6 */ | ||
173 | static struct plat_sci_port scif6_platform_data = { | ||
174 | .mapbase = 0xe6cc0000, | ||
175 | .flags = UPF_BOOT_AUTOCONF, | ||
176 | .scscr = SCSCR_RE | SCSCR_TE, | ||
177 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
178 | .type = PORT_SCIFA, | ||
179 | .irqs = { intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80), | ||
180 | intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80) }, | ||
181 | }; | ||
182 | |||
183 | static struct platform_device scif6_device = { | ||
184 | .name = "sh-sci", | ||
185 | .id = 6, | ||
186 | .dev = { | ||
187 | .platform_data = &scif6_platform_data, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | /* SCIFB */ | ||
192 | static struct plat_sci_port scif7_platform_data = { | ||
193 | .mapbase = 0xe6c30000, | ||
194 | .flags = UPF_BOOT_AUTOCONF, | ||
195 | .scscr = SCSCR_RE | SCSCR_TE, | ||
196 | .scbrr_algo_id = SCBRR_ALGO_4, | ||
197 | .type = PORT_SCIFB, | ||
198 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), | ||
199 | evt2irq(0xd60), evt2irq(0xd60) }, | ||
200 | }; | ||
201 | |||
202 | static struct platform_device scif7_device = { | ||
203 | .name = "sh-sci", | ||
204 | .id = 7, | ||
205 | .dev = { | ||
206 | .platform_data = &scif7_platform_data, | ||
207 | }, | ||
208 | }; | ||
209 | |||
210 | static struct sh_timer_config cmt10_platform_data = { | ||
211 | .name = "CMT10", | ||
212 | .channel_offset = 0x10, | ||
213 | .timer_bit = 0, | ||
214 | .clockevent_rating = 125, | ||
215 | .clocksource_rating = 125, | ||
216 | }; | ||
217 | |||
218 | static struct resource cmt10_resources[] = { | ||
219 | [0] = { | ||
220 | .name = "CMT10", | ||
221 | .start = 0xe6138010, | ||
222 | .end = 0xe613801b, | ||
223 | .flags = IORESOURCE_MEM, | ||
224 | }, | ||
225 | [1] = { | ||
226 | .start = evt2irq(0xb00), /* CMT1_CMT10 */ | ||
227 | .flags = IORESOURCE_IRQ, | ||
228 | }, | ||
229 | }; | ||
230 | |||
231 | static struct platform_device cmt10_device = { | ||
232 | .name = "sh_cmt", | ||
233 | .id = 10, | ||
234 | .dev = { | ||
235 | .platform_data = &cmt10_platform_data, | ||
236 | }, | ||
237 | .resource = cmt10_resources, | ||
238 | .num_resources = ARRAY_SIZE(cmt10_resources), | ||
239 | }; | ||
240 | |||
241 | /* VPU */ | ||
242 | static struct uio_info vpu_platform_data = { | ||
243 | .name = "VPU5HG", | ||
244 | .version = "0", | ||
245 | .irq = intcs_evt2irq(0x980), | ||
246 | }; | ||
247 | |||
248 | static struct resource vpu_resources[] = { | ||
249 | [0] = { | ||
250 | .name = "VPU", | ||
251 | .start = 0xfe900000, | ||
252 | .end = 0xfe900157, | ||
253 | .flags = IORESOURCE_MEM, | ||
254 | }, | ||
255 | }; | ||
256 | |||
257 | static struct platform_device vpu_device = { | ||
258 | .name = "uio_pdrv_genirq", | ||
259 | .id = 0, | ||
260 | .dev = { | ||
261 | .platform_data = &vpu_platform_data, | ||
262 | }, | ||
263 | .resource = vpu_resources, | ||
264 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
265 | }; | ||
266 | |||
267 | /* VEU0 */ | ||
268 | static struct uio_info veu0_platform_data = { | ||
269 | .name = "VEU0", | ||
270 | .version = "0", | ||
271 | .irq = intcs_evt2irq(0x700), | ||
272 | }; | ||
273 | |||
274 | static struct resource veu0_resources[] = { | ||
275 | [0] = { | ||
276 | .name = "VEU0", | ||
277 | .start = 0xfe920000, | ||
278 | .end = 0xfe9200cb, | ||
279 | .flags = IORESOURCE_MEM, | ||
280 | }, | ||
281 | }; | ||
282 | |||
283 | static struct platform_device veu0_device = { | ||
284 | .name = "uio_pdrv_genirq", | ||
285 | .id = 1, | ||
286 | .dev = { | ||
287 | .platform_data = &veu0_platform_data, | ||
288 | }, | ||
289 | .resource = veu0_resources, | ||
290 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
291 | }; | ||
292 | |||
293 | /* VEU1 */ | ||
294 | static struct uio_info veu1_platform_data = { | ||
295 | .name = "VEU1", | ||
296 | .version = "0", | ||
297 | .irq = intcs_evt2irq(0x720), | ||
298 | }; | ||
299 | |||
300 | static struct resource veu1_resources[] = { | ||
301 | [0] = { | ||
302 | .name = "VEU1", | ||
303 | .start = 0xfe924000, | ||
304 | .end = 0xfe9240cb, | ||
305 | .flags = IORESOURCE_MEM, | ||
306 | }, | ||
307 | }; | ||
308 | |||
309 | static struct platform_device veu1_device = { | ||
310 | .name = "uio_pdrv_genirq", | ||
311 | .id = 2, | ||
312 | .dev = { | ||
313 | .platform_data = &veu1_platform_data, | ||
314 | }, | ||
315 | .resource = veu1_resources, | ||
316 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
317 | }; | ||
318 | |||
319 | /* VEU2 */ | ||
320 | static struct uio_info veu2_platform_data = { | ||
321 | .name = "VEU2", | ||
322 | .version = "0", | ||
323 | .irq = intcs_evt2irq(0x740), | ||
324 | }; | ||
325 | |||
326 | static struct resource veu2_resources[] = { | ||
327 | [0] = { | ||
328 | .name = "VEU2", | ||
329 | .start = 0xfe928000, | ||
330 | .end = 0xfe928307, | ||
331 | .flags = IORESOURCE_MEM, | ||
332 | }, | ||
333 | }; | ||
334 | |||
335 | static struct platform_device veu2_device = { | ||
336 | .name = "uio_pdrv_genirq", | ||
337 | .id = 3, | ||
338 | .dev = { | ||
339 | .platform_data = &veu2_platform_data, | ||
340 | }, | ||
341 | .resource = veu2_resources, | ||
342 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
343 | }; | ||
344 | |||
345 | /* VEU3 */ | ||
346 | static struct uio_info veu3_platform_data = { | ||
347 | .name = "VEU3", | ||
348 | .version = "0", | ||
349 | .irq = intcs_evt2irq(0x760), | ||
350 | }; | ||
351 | |||
352 | static struct resource veu3_resources[] = { | ||
353 | [0] = { | ||
354 | .name = "VEU3", | ||
355 | .start = 0xfe92c000, | ||
356 | .end = 0xfe92c307, | ||
357 | .flags = IORESOURCE_MEM, | ||
358 | }, | ||
359 | }; | ||
360 | |||
361 | static struct platform_device veu3_device = { | ||
362 | .name = "uio_pdrv_genirq", | ||
363 | .id = 4, | ||
364 | .dev = { | ||
365 | .platform_data = &veu3_platform_data, | ||
366 | }, | ||
367 | .resource = veu3_resources, | ||
368 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
369 | }; | ||
370 | |||
371 | /* JPU */ | ||
372 | static struct uio_info jpu_platform_data = { | ||
373 | .name = "JPU", | ||
374 | .version = "0", | ||
375 | .irq = intcs_evt2irq(0x560), | ||
376 | }; | ||
377 | |||
378 | static struct resource jpu_resources[] = { | ||
379 | [0] = { | ||
380 | .name = "JPU", | ||
381 | .start = 0xfe980000, | ||
382 | .end = 0xfe9902d3, | ||
383 | .flags = IORESOURCE_MEM, | ||
384 | }, | ||
385 | }; | ||
386 | |||
387 | static struct platform_device jpu_device = { | ||
388 | .name = "uio_pdrv_genirq", | ||
389 | .id = 5, | ||
390 | .dev = { | ||
391 | .platform_data = &jpu_platform_data, | ||
392 | }, | ||
393 | .resource = jpu_resources, | ||
394 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
395 | }; | ||
396 | |||
397 | /* SPU2DSP0 */ | ||
398 | static struct uio_info spu0_platform_data = { | ||
399 | .name = "SPU2DSP0", | ||
400 | .version = "0", | ||
401 | .irq = evt2irq(0x1800), | ||
402 | }; | ||
403 | |||
404 | static struct resource spu0_resources[] = { | ||
405 | [0] = { | ||
406 | .name = "SPU2DSP0", | ||
407 | .start = 0xfe200000, | ||
408 | .end = 0xfe2fffff, | ||
409 | .flags = IORESOURCE_MEM, | ||
410 | }, | ||
411 | }; | ||
412 | |||
413 | static struct platform_device spu0_device = { | ||
414 | .name = "uio_pdrv_genirq", | ||
415 | .id = 6, | ||
416 | .dev = { | ||
417 | .platform_data = &spu0_platform_data, | ||
418 | }, | ||
419 | .resource = spu0_resources, | ||
420 | .num_resources = ARRAY_SIZE(spu0_resources), | ||
421 | }; | ||
422 | |||
423 | /* SPU2DSP1 */ | ||
424 | static struct uio_info spu1_platform_data = { | ||
425 | .name = "SPU2DSP1", | ||
426 | .version = "0", | ||
427 | .irq = evt2irq(0x1820), | ||
428 | }; | ||
429 | |||
430 | static struct resource spu1_resources[] = { | ||
431 | [0] = { | ||
432 | .name = "SPU2DSP1", | ||
433 | .start = 0xfe300000, | ||
434 | .end = 0xfe3fffff, | ||
435 | .flags = IORESOURCE_MEM, | ||
436 | }, | ||
437 | }; | ||
438 | |||
439 | static struct platform_device spu1_device = { | ||
440 | .name = "uio_pdrv_genirq", | ||
441 | .id = 7, | ||
442 | .dev = { | ||
443 | .platform_data = &spu1_platform_data, | ||
444 | }, | ||
445 | .resource = spu1_resources, | ||
446 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
447 | }; | ||
448 | |||
449 | static struct platform_device *sh7377_early_devices[] __initdata = { | ||
450 | &scif0_device, | ||
451 | &scif1_device, | ||
452 | &scif2_device, | ||
453 | &scif3_device, | ||
454 | &scif4_device, | ||
455 | &scif5_device, | ||
456 | &scif6_device, | ||
457 | &scif7_device, | ||
458 | &cmt10_device, | ||
459 | }; | ||
460 | |||
461 | static struct platform_device *sh7377_devices[] __initdata = { | ||
462 | &vpu_device, | ||
463 | &veu0_device, | ||
464 | &veu1_device, | ||
465 | &veu2_device, | ||
466 | &veu3_device, | ||
467 | &jpu_device, | ||
468 | &spu0_device, | ||
469 | &spu1_device, | ||
470 | }; | ||
471 | |||
472 | void __init sh7377_add_standard_devices(void) | ||
473 | { | ||
474 | platform_add_devices(sh7377_early_devices, | ||
475 | ARRAY_SIZE(sh7377_early_devices)); | ||
476 | |||
477 | platform_add_devices(sh7377_devices, | ||
478 | ARRAY_SIZE(sh7377_devices)); | ||
479 | } | ||
480 | |||
481 | static void __init sh7377_earlytimer_init(void) | ||
482 | { | ||
483 | sh7377_clock_init(); | ||
484 | shmobile_earlytimer_init(); | ||
485 | } | ||
486 | |||
487 | #define SMSTPCR3 IOMEM(0xe615013c) | ||
488 | #define SMSTPCR3_CMT1 (1 << 29) | ||
489 | |||
490 | void __init sh7377_add_early_devices(void) | ||
491 | { | ||
492 | /* enable clock to CMT1 */ | ||
493 | __raw_writel(__raw_readl(SMSTPCR3) & ~SMSTPCR3_CMT1, SMSTPCR3); | ||
494 | |||
495 | early_platform_add_devices(sh7377_early_devices, | ||
496 | ARRAY_SIZE(sh7377_early_devices)); | ||
497 | |||
498 | /* setup early console here as well */ | ||
499 | shmobile_setup_console(); | ||
500 | |||
501 | /* override timer setup with soc-specific code */ | ||
502 | shmobile_timer.init = sh7377_earlytimer_init; | ||
503 | } | ||
504 | |||
505 | #ifdef CONFIG_USE_OF | ||
506 | |||
507 | void __init sh7377_add_early_devices_dt(void) | ||
508 | { | ||
509 | shmobile_setup_delay(600, 1, 3); /* Cortex-A8 @ 600MHz */ | ||
510 | |||
511 | early_platform_add_devices(sh7377_early_devices, | ||
512 | ARRAY_SIZE(sh7377_early_devices)); | ||
513 | |||
514 | /* setup early console here as well */ | ||
515 | shmobile_setup_console(); | ||
516 | } | ||
517 | |||
518 | static const struct of_dev_auxdata sh7377_auxdata_lookup[] __initconst = { | ||
519 | { } | ||
520 | }; | ||
521 | |||
522 | void __init sh7377_add_standard_devices_dt(void) | ||
523 | { | ||
524 | /* clocks are setup late during boot in the case of DT */ | ||
525 | sh7377_clock_init(); | ||
526 | |||
527 | platform_add_devices(sh7377_early_devices, | ||
528 | ARRAY_SIZE(sh7377_early_devices)); | ||
529 | |||
530 | of_platform_populate(NULL, of_default_bus_match_table, | ||
531 | sh7377_auxdata_lookup, NULL); | ||
532 | } | ||
533 | |||
534 | static const char *sh7377_boards_compat_dt[] __initdata = { | ||
535 | "renesas,sh7377", | ||
536 | NULL, | ||
537 | }; | ||
538 | |||
539 | DT_MACHINE_START(SH7377_DT, "Generic SH7377 (Flattened Device Tree)") | ||
540 | .map_io = sh7377_map_io, | ||
541 | .init_early = sh7377_add_early_devices_dt, | ||
542 | .init_irq = sh7377_init_irq, | ||
543 | .handle_irq = shmobile_handle_irq_intc, | ||
544 | .init_machine = sh7377_add_standard_devices_dt, | ||
545 | .timer = &shmobile_timer, | ||
546 | .dt_compat = sh7377_boards_compat_dt, | ||
547 | MACHINE_END | ||
548 | |||
549 | #endif /* CONFIG_USE_OF */ | ||
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c index f67456286280..535426c306bd 100644 --- a/arch/arm/mach-shmobile/smp-emev2.c +++ b/arch/arm/mach-shmobile/smp-emev2.c | |||
@@ -32,24 +32,8 @@ | |||
32 | 32 | ||
33 | #define EMEV2_SCU_BASE 0x1e000000 | 33 | #define EMEV2_SCU_BASE 0x1e000000 |
34 | 34 | ||
35 | static DEFINE_SPINLOCK(scu_lock); | ||
36 | static void __iomem *scu_base; | 35 | static void __iomem *scu_base; |
37 | 36 | ||
38 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | ||
39 | { | ||
40 | unsigned long tmp; | ||
41 | |||
42 | /* we assume this code is running on a different cpu | ||
43 | * than the one that is changing coherency setting */ | ||
44 | spin_lock(&scu_lock); | ||
45 | tmp = readl(scu_base + 8); | ||
46 | tmp &= ~clr; | ||
47 | tmp |= set; | ||
48 | writel(tmp, scu_base + 8); | ||
49 | spin_unlock(&scu_lock); | ||
50 | |||
51 | } | ||
52 | |||
53 | static unsigned int __init emev2_get_core_count(void) | 37 | static unsigned int __init emev2_get_core_count(void) |
54 | { | 38 | { |
55 | if (!scu_base) { | 39 | if (!scu_base) { |
@@ -95,7 +79,7 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct * | |||
95 | cpu = cpu_logical_map(cpu); | 79 | cpu = cpu_logical_map(cpu); |
96 | 80 | ||
97 | /* enable cache coherency */ | 81 | /* enable cache coherency */ |
98 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 82 | scu_power_mode(scu_base, 0); |
99 | 83 | ||
100 | /* Tell ROM loader about our vector (in headsmp.S) */ | 84 | /* Tell ROM loader about our vector (in headsmp.S) */ |
101 | emev2_set_boot_vector(__pa(shmobile_secondary_vector)); | 85 | emev2_set_boot_vector(__pa(shmobile_secondary_vector)); |
@@ -106,12 +90,10 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct * | |||
106 | 90 | ||
107 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) | 91 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) |
108 | { | 92 | { |
109 | int cpu = cpu_logical_map(0); | ||
110 | |||
111 | scu_enable(scu_base); | 93 | scu_enable(scu_base); |
112 | 94 | ||
113 | /* enable cache coherency on CPU0 */ | 95 | /* enable cache coherency on CPU0 */ |
114 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 96 | scu_power_mode(scu_base, 0); |
115 | } | 97 | } |
116 | 98 | ||
117 | static void __init emev2_smp_init_cpus(void) | 99 | static void __init emev2_smp_init_cpus(void) |
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index 2ce6af9a6a37..9def0f22bf22 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c | |||
@@ -61,9 +61,6 @@ static void __iomem *scu_base_addr(void) | |||
61 | return (void __iomem *)0xf0000000; | 61 | return (void __iomem *)0xf0000000; |
62 | } | 62 | } |
63 | 63 | ||
64 | static DEFINE_SPINLOCK(scu_lock); | ||
65 | static unsigned long tmp; | ||
66 | |||
67 | #ifdef CONFIG_HAVE_ARM_TWD | 64 | #ifdef CONFIG_HAVE_ARM_TWD |
68 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 65 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
69 | 66 | ||
@@ -73,20 +70,6 @@ void __init r8a7779_register_twd(void) | |||
73 | } | 70 | } |
74 | #endif | 71 | #endif |
75 | 72 | ||
76 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | ||
77 | { | ||
78 | void __iomem *scu_base = scu_base_addr(); | ||
79 | |||
80 | spin_lock(&scu_lock); | ||
81 | tmp = __raw_readl(scu_base + 8); | ||
82 | tmp &= ~clr; | ||
83 | tmp |= set; | ||
84 | spin_unlock(&scu_lock); | ||
85 | |||
86 | /* disable cache coherency after releasing the lock */ | ||
87 | __raw_writel(tmp, scu_base + 8); | ||
88 | } | ||
89 | |||
90 | static unsigned int __init r8a7779_get_core_count(void) | 73 | static unsigned int __init r8a7779_get_core_count(void) |
91 | { | 74 | { |
92 | void __iomem *scu_base = scu_base_addr(); | 75 | void __iomem *scu_base = scu_base_addr(); |
@@ -102,7 +85,7 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu) | |||
102 | cpu = cpu_logical_map(cpu); | 85 | cpu = cpu_logical_map(cpu); |
103 | 86 | ||
104 | /* disable cache coherency */ | 87 | /* disable cache coherency */ |
105 | modify_scu_cpu_psr(3 << (cpu * 8), 0); | 88 | scu_power_mode(scu_base_addr(), 3); |
106 | 89 | ||
107 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) | 90 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) |
108 | ch = r8a7779_ch_cpu[cpu]; | 91 | ch = r8a7779_ch_cpu[cpu]; |
@@ -145,7 +128,7 @@ static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct | |||
145 | cpu = cpu_logical_map(cpu); | 128 | cpu = cpu_logical_map(cpu); |
146 | 129 | ||
147 | /* enable cache coherency */ | 130 | /* enable cache coherency */ |
148 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 131 | scu_power_mode(scu_base_addr(), 0); |
149 | 132 | ||
150 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) | 133 | if (cpu < ARRAY_SIZE(r8a7779_ch_cpu)) |
151 | ch = r8a7779_ch_cpu[cpu]; | 134 | ch = r8a7779_ch_cpu[cpu]; |
@@ -158,15 +141,13 @@ static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct | |||
158 | 141 | ||
159 | static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus) | 142 | static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus) |
160 | { | 143 | { |
161 | int cpu = cpu_logical_map(0); | ||
162 | |||
163 | scu_enable(scu_base_addr()); | 144 | scu_enable(scu_base_addr()); |
164 | 145 | ||
165 | /* Map the reset vector (in headsmp.S) */ | 146 | /* Map the reset vector (in headsmp.S) */ |
166 | __raw_writel(__pa(shmobile_secondary_vector), AVECR); | 147 | __raw_writel(__pa(shmobile_secondary_vector), AVECR); |
167 | 148 | ||
168 | /* enable cache coherency on CPU0 */ | 149 | /* enable cache coherency on CPU0 */ |
169 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 150 | scu_power_mode(scu_base_addr(), 0); |
170 | 151 | ||
171 | r8a7779_pm_init(); | 152 | r8a7779_pm_init(); |
172 | 153 | ||
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index 624f00f70abf..96ddb97babbe 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
@@ -41,9 +41,6 @@ static void __iomem *scu_base_addr(void) | |||
41 | return (void __iomem *)0xf0000000; | 41 | return (void __iomem *)0xf0000000; |
42 | } | 42 | } |
43 | 43 | ||
44 | static DEFINE_SPINLOCK(scu_lock); | ||
45 | static unsigned long tmp; | ||
46 | |||
47 | #ifdef CONFIG_HAVE_ARM_TWD | 44 | #ifdef CONFIG_HAVE_ARM_TWD |
48 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 45 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
49 | void __init sh73a0_register_twd(void) | 46 | void __init sh73a0_register_twd(void) |
@@ -52,20 +49,6 @@ void __init sh73a0_register_twd(void) | |||
52 | } | 49 | } |
53 | #endif | 50 | #endif |
54 | 51 | ||
55 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | ||
56 | { | ||
57 | void __iomem *scu_base = scu_base_addr(); | ||
58 | |||
59 | spin_lock(&scu_lock); | ||
60 | tmp = __raw_readl(scu_base + 8); | ||
61 | tmp &= ~clr; | ||
62 | tmp |= set; | ||
63 | spin_unlock(&scu_lock); | ||
64 | |||
65 | /* disable cache coherency after releasing the lock */ | ||
66 | __raw_writel(tmp, scu_base + 8); | ||
67 | } | ||
68 | |||
69 | static unsigned int __init sh73a0_get_core_count(void) | 52 | static unsigned int __init sh73a0_get_core_count(void) |
70 | { | 53 | { |
71 | void __iomem *scu_base = scu_base_addr(); | 54 | void __iomem *scu_base = scu_base_addr(); |
@@ -83,7 +66,7 @@ static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct | |||
83 | cpu = cpu_logical_map(cpu); | 66 | cpu = cpu_logical_map(cpu); |
84 | 67 | ||
85 | /* enable cache coherency */ | 68 | /* enable cache coherency */ |
86 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 69 | scu_power_mode(scu_base_addr(), 0); |
87 | 70 | ||
88 | if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3) | 71 | if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3) |
89 | __raw_writel(1 << cpu, WUPCR); /* wake up */ | 72 | __raw_writel(1 << cpu, WUPCR); /* wake up */ |
@@ -95,8 +78,6 @@ static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct | |||
95 | 78 | ||
96 | static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) | 79 | static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) |
97 | { | 80 | { |
98 | int cpu = cpu_logical_map(0); | ||
99 | |||
100 | scu_enable(scu_base_addr()); | 81 | scu_enable(scu_base_addr()); |
101 | 82 | ||
102 | /* Map the reset vector (in headsmp.S) */ | 83 | /* Map the reset vector (in headsmp.S) */ |
@@ -104,7 +85,7 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) | |||
104 | __raw_writel(__pa(shmobile_secondary_vector), SBAR); | 85 | __raw_writel(__pa(shmobile_secondary_vector), SBAR); |
105 | 86 | ||
106 | /* enable cache coherency on CPU0 */ | 87 | /* enable cache coherency on CPU0 */ |
107 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 88 | scu_power_mode(scu_base_addr(), 0); |
108 | } | 89 | } |
109 | 90 | ||
110 | static void __init sh73a0_smp_init_cpus(void) | 91 | static void __init sh73a0_smp_init_cpus(void) |
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig new file mode 100644 index 000000000000..3fdd0085e306 --- /dev/null +++ b/arch/arm/mach-sunxi/Kconfig | |||
@@ -0,0 +1,9 @@ | |||
1 | config ARCH_SUNXI | ||
2 | bool "Allwinner A1X SOCs" if ARCH_MULTI_V7 | ||
3 | select CLKSRC_MMIO | ||
4 | select COMMON_CLK | ||
5 | select GENERIC_CLOCKEVENTS | ||
6 | select GENERIC_IRQ_CHIP | ||
7 | select PINCTRL | ||
8 | select SPARSE_IRQ | ||
9 | select SUNXI_TIMER | ||
diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile new file mode 100644 index 000000000000..93bebfc3ff9f --- /dev/null +++ b/arch/arm/mach-sunxi/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-$(CONFIG_ARCH_SUNXI) += sunxi.o | |||
diff --git a/arch/arm/mach-sunxi/Makefile.boot b/arch/arm/mach-sunxi/Makefile.boot new file mode 100644 index 000000000000..46d4cf0841c0 --- /dev/null +++ b/arch/arm/mach-sunxi/Makefile.boot | |||
@@ -0,0 +1 @@ | |||
zreladdr-$(CONFIG_ARCH_SUNXI) += 0x40008000 | |||
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c new file mode 100644 index 000000000000..9be910f7920b --- /dev/null +++ b/arch/arm/mach-sunxi/sunxi.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * Device Tree support for Allwinner A1X SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/delay.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/of_address.h> | ||
17 | #include <linux/of_irq.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/sunxi_timer.h> | ||
21 | |||
22 | #include <linux/irqchip/sunxi.h> | ||
23 | |||
24 | #include <asm/hardware/vic.h> | ||
25 | |||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | #include "sunxi.h" | ||
30 | |||
31 | #define WATCHDOG_CTRL_REG 0x00 | ||
32 | #define WATCHDOG_MODE_REG 0x04 | ||
33 | |||
34 | static void __iomem *wdt_base; | ||
35 | |||
36 | static void sunxi_setup_restart(void) | ||
37 | { | ||
38 | struct device_node *np = of_find_compatible_node(NULL, NULL, | ||
39 | "allwinner,sunxi-wdt"); | ||
40 | if (WARN(!np, "unable to setup watchdog restart")) | ||
41 | return; | ||
42 | |||
43 | wdt_base = of_iomap(np, 0); | ||
44 | WARN(!wdt_base, "failed to map watchdog base address"); | ||
45 | } | ||
46 | |||
47 | static void sunxi_restart(char mode, const char *cmd) | ||
48 | { | ||
49 | if (!wdt_base) | ||
50 | return; | ||
51 | |||
52 | /* Enable timer and set reset bit in the watchdog */ | ||
53 | writel(3, wdt_base + WATCHDOG_MODE_REG); | ||
54 | writel(0xa57 << 1 | 1, wdt_base + WATCHDOG_CTRL_REG); | ||
55 | while(1) { | ||
56 | mdelay(5); | ||
57 | writel(3, wdt_base + WATCHDOG_MODE_REG); | ||
58 | } | ||
59 | } | ||
60 | |||
61 | static struct map_desc sunxi_io_desc[] __initdata = { | ||
62 | { | ||
63 | .virtual = (unsigned long) SUNXI_REGS_VIRT_BASE, | ||
64 | .pfn = __phys_to_pfn(SUNXI_REGS_PHYS_BASE), | ||
65 | .length = SUNXI_REGS_SIZE, | ||
66 | .type = MT_DEVICE, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | void __init sunxi_map_io(void) | ||
71 | { | ||
72 | iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc)); | ||
73 | } | ||
74 | |||
75 | static void __init sunxi_dt_init(void) | ||
76 | { | ||
77 | sunxi_setup_restart(); | ||
78 | |||
79 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
80 | } | ||
81 | |||
82 | static const char * const sunxi_board_dt_compat[] = { | ||
83 | "allwinner,sun4i", | ||
84 | "allwinner,sun5i", | ||
85 | NULL, | ||
86 | }; | ||
87 | |||
88 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") | ||
89 | .init_machine = sunxi_dt_init, | ||
90 | .map_io = sunxi_map_io, | ||
91 | .init_irq = sunxi_init_irq, | ||
92 | .handle_irq = sunxi_handle_irq, | ||
93 | .restart = sunxi_restart, | ||
94 | .timer = &sunxi_timer, | ||
95 | .dt_compat = sunxi_board_dt_compat, | ||
96 | MACHINE_END | ||
diff --git a/arch/arm/mach-sunxi/sunxi.h b/arch/arm/mach-sunxi/sunxi.h new file mode 100644 index 000000000000..33b58712adea --- /dev/null +++ b/arch/arm/mach-sunxi/sunxi.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Generic definitions for Allwinner SunXi SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_SUNXI_H | ||
14 | #define __MACH_SUNXI_H | ||
15 | |||
16 | #define SUNXI_REGS_PHYS_BASE 0x01c00000 | ||
17 | #define SUNXI_REGS_VIRT_BASE IOMEM(0xf1c00000) | ||
18 | #define SUNXI_REGS_SIZE (SZ_2M + SZ_1M) | ||
19 | |||
20 | #endif /* __MACH_SUNXI_H */ | ||
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 9aa653b3eb32..0979e8bba78a 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile | |||
@@ -8,15 +8,24 @@ obj-y += pmc.o | |||
8 | obj-y += flowctrl.o | 8 | obj-y += flowctrl.o |
9 | obj-y += powergate.o | 9 | obj-y += powergate.o |
10 | obj-y += apbio.o | 10 | obj-y += apbio.o |
11 | obj-y += pm.o | ||
11 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 12 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
12 | obj-$(CONFIG_CPU_IDLE) += sleep.o | 13 | obj-$(CONFIG_CPU_IDLE) += sleep.o |
13 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks.o | 14 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks.o |
14 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks_data.o | 15 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_clocks_data.o |
16 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_speedo.o | ||
15 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o | 17 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o |
16 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += sleep-t20.o | 18 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += sleep-tegra20.o |
19 | ifeq ($(CONFIG_CPU_IDLE),y) | ||
20 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += cpuidle-tegra20.o | ||
21 | endif | ||
17 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o | 22 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o |
18 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks_data.o | 23 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks_data.o |
19 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += sleep-t30.o | 24 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_speedo.o |
25 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += sleep-tegra30.o | ||
26 | ifeq ($(CONFIG_CPU_IDLE),y) | ||
27 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += cpuidle-tegra30.o | ||
28 | endif | ||
20 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 29 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
21 | obj-$(CONFIG_SMP) += reset.o | 30 | obj-$(CONFIG_SMP) += reset.o |
22 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 31 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index 71569c01afd2..734d9cc87f2e 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c | |||
@@ -89,6 +89,17 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { | |||
89 | &tegra_ehci3_pdata), | 89 | &tegra_ehci3_pdata), |
90 | OF_DEV_AUXDATA("nvidia,tegra20-apbdma", TEGRA_APB_DMA_BASE, "tegra-apbdma", NULL), | 90 | OF_DEV_AUXDATA("nvidia,tegra20-apbdma", TEGRA_APB_DMA_BASE, "tegra-apbdma", NULL), |
91 | OF_DEV_AUXDATA("nvidia,tegra20-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), | 91 | OF_DEV_AUXDATA("nvidia,tegra20-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), |
92 | OF_DEV_AUXDATA("nvidia,tegra20-sflash", 0x7000c380, "spi", NULL), | ||
93 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D400, "spi_tegra.0", NULL), | ||
94 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D600, "spi_tegra.1", NULL), | ||
95 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D800, "spi_tegra.2", NULL), | ||
96 | OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000DA00, "spi_tegra.3", NULL), | ||
97 | OF_DEV_AUXDATA("nvidia,tegra20-host1x", 0x50000000, "host1x", NULL), | ||
98 | OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54200000, "tegradc.0", NULL), | ||
99 | OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54240000, "tegradc.1", NULL), | ||
100 | OF_DEV_AUXDATA("nvidia,tegra20-hdmi", 0x54280000, "hdmi", NULL), | ||
101 | OF_DEV_AUXDATA("nvidia,tegra20-dsi", 0x54300000, "dsi", NULL), | ||
102 | OF_DEV_AUXDATA("nvidia,tegra20-tvo", 0x542c0000, "tvo", NULL), | ||
92 | {} | 103 | {} |
93 | }; | 104 | }; |
94 | 105 | ||
@@ -102,8 +113,20 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { | |||
102 | { "pll_a", "pll_p_out1", 56448000, true }, | 113 | { "pll_a", "pll_p_out1", 56448000, true }, |
103 | { "pll_a_out0", "pll_a", 11289600, true }, | 114 | { "pll_a_out0", "pll_a", 11289600, true }, |
104 | { "cdev1", NULL, 0, true }, | 115 | { "cdev1", NULL, 0, true }, |
116 | { "blink", "clk_32k", 32768, true }, | ||
105 | { "i2s1", "pll_a_out0", 11289600, false}, | 117 | { "i2s1", "pll_a_out0", 11289600, false}, |
106 | { "i2s2", "pll_a_out0", 11289600, false}, | 118 | { "i2s2", "pll_a_out0", 11289600, false}, |
119 | { "sdmmc1", "pll_p", 48000000, false}, | ||
120 | { "sdmmc3", "pll_p", 48000000, false}, | ||
121 | { "sdmmc4", "pll_p", 48000000, false}, | ||
122 | { "spi", "pll_p", 20000000, false }, | ||
123 | { "sbc1", "pll_p", 100000000, false }, | ||
124 | { "sbc2", "pll_p", 100000000, false }, | ||
125 | { "sbc3", "pll_p", 100000000, false }, | ||
126 | { "sbc4", "pll_p", 100000000, false }, | ||
127 | { "host1x", "pll_c", 150000000, false }, | ||
128 | { "disp1", "pll_p", 600000000, false }, | ||
129 | { "disp2", "pll_p", 600000000, false }, | ||
107 | { NULL, NULL, 0, 0}, | 130 | { NULL, NULL, 0, 0}, |
108 | }; | 131 | }; |
109 | 132 | ||
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c index e56170393a5b..6497d1236b08 100644 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/arch/arm/mach-tegra/board-dt-tegra30.c | |||
@@ -51,6 +51,18 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { | |||
51 | OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL), | 51 | OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL), |
52 | OF_DEV_AUXDATA("nvidia,tegra30-apbdma", 0x6000a000, "tegra-apbdma", NULL), | 52 | OF_DEV_AUXDATA("nvidia,tegra30-apbdma", 0x6000a000, "tegra-apbdma", NULL), |
53 | OF_DEV_AUXDATA("nvidia,tegra30-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), | 53 | OF_DEV_AUXDATA("nvidia,tegra30-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), |
54 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D400, "spi_tegra.0", NULL), | ||
55 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D600, "spi_tegra.1", NULL), | ||
56 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D800, "spi_tegra.2", NULL), | ||
57 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DA00, "spi_tegra.3", NULL), | ||
58 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DC00, "spi_tegra.4", NULL), | ||
59 | OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DE00, "spi_tegra.5", NULL), | ||
60 | OF_DEV_AUXDATA("nvidia,tegra30-host1x", 0x50000000, "host1x", NULL), | ||
61 | OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54200000, "tegradc.0", NULL), | ||
62 | OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54240000, "tegradc.1", NULL), | ||
63 | OF_DEV_AUXDATA("nvidia,tegra30-hdmi", 0x54280000, "hdmi", NULL), | ||
64 | OF_DEV_AUXDATA("nvidia,tegra30-dsi", 0x54300000, "dsi", NULL), | ||
65 | OF_DEV_AUXDATA("nvidia,tegra30-tvo", 0x542c0000, "tvo", NULL), | ||
54 | {} | 66 | {} |
55 | }; | 67 | }; |
56 | 68 | ||
@@ -61,11 +73,24 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { | |||
61 | { "pll_a_out0", "pll_a", 11289600, true }, | 73 | { "pll_a_out0", "pll_a", 11289600, true }, |
62 | { "extern1", "pll_a_out0", 0, true }, | 74 | { "extern1", "pll_a_out0", 0, true }, |
63 | { "clk_out_1", "extern1", 0, true }, | 75 | { "clk_out_1", "extern1", 0, true }, |
76 | { "blink", "clk_32k", 32768, true }, | ||
64 | { "i2s0", "pll_a_out0", 11289600, false}, | 77 | { "i2s0", "pll_a_out0", 11289600, false}, |
65 | { "i2s1", "pll_a_out0", 11289600, false}, | 78 | { "i2s1", "pll_a_out0", 11289600, false}, |
66 | { "i2s2", "pll_a_out0", 11289600, false}, | 79 | { "i2s2", "pll_a_out0", 11289600, false}, |
67 | { "i2s3", "pll_a_out0", 11289600, false}, | 80 | { "i2s3", "pll_a_out0", 11289600, false}, |
68 | { "i2s4", "pll_a_out0", 11289600, false}, | 81 | { "i2s4", "pll_a_out0", 11289600, false}, |
82 | { "sdmmc1", "pll_p", 48000000, false}, | ||
83 | { "sdmmc3", "pll_p", 48000000, false}, | ||
84 | { "sdmmc4", "pll_p", 48000000, false}, | ||
85 | { "sbc1", "pll_p", 100000000, false}, | ||
86 | { "sbc2", "pll_p", 100000000, false}, | ||
87 | { "sbc3", "pll_p", 100000000, false}, | ||
88 | { "sbc4", "pll_p", 100000000, false}, | ||
89 | { "sbc5", "pll_p", 100000000, false}, | ||
90 | { "sbc6", "pll_p", 100000000, false}, | ||
91 | { "host1x", "pll_c", 150000000, false}, | ||
92 | { "disp1", "pll_p", 600000000, false}, | ||
93 | { "disp2", "pll_p", 600000000, false}, | ||
69 | { NULL, NULL, 0, 0}, | 94 | { NULL, NULL, 0, 0}, |
70 | }; | 95 | }; |
71 | 96 | ||
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index f688daa74978..11a74db51e5d 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "pmc.h" | 36 | #include "pmc.h" |
37 | #include "apbio.h" | 37 | #include "apbio.h" |
38 | #include "sleep.h" | 38 | #include "sleep.h" |
39 | #include "pm.h" | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * Storage for debug-macro.S's state. | 42 | * Storage for debug-macro.S's state. |
@@ -104,25 +105,30 @@ static __initdata struct tegra_clk_init_table tegra30_clk_init_table[] = { | |||
104 | { "clk_m", NULL, 0, true }, | 105 | { "clk_m", NULL, 0, true }, |
105 | { "pll_p", "clk_m", 408000000, true }, | 106 | { "pll_p", "clk_m", 408000000, true }, |
106 | { "pll_p_out1", "pll_p", 9600000, true }, | 107 | { "pll_p_out1", "pll_p", 9600000, true }, |
108 | { "pll_p_out4", "pll_p", 102000000, true }, | ||
109 | { "sclk", "pll_p_out4", 102000000, true }, | ||
110 | { "hclk", "sclk", 102000000, true }, | ||
111 | { "pclk", "hclk", 51000000, true }, | ||
112 | { "csite", NULL, 0, true }, | ||
107 | { NULL, NULL, 0, 0}, | 113 | { NULL, NULL, 0, 0}, |
108 | }; | 114 | }; |
109 | #endif | 115 | #endif |
110 | 116 | ||
111 | 117 | ||
112 | static void __init tegra_init_cache(u32 tag_latency, u32 data_latency) | 118 | static void __init tegra_init_cache(void) |
113 | { | 119 | { |
114 | #ifdef CONFIG_CACHE_L2X0 | 120 | #ifdef CONFIG_CACHE_L2X0 |
121 | int ret; | ||
115 | void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000; | 122 | void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000; |
116 | u32 aux_ctrl, cache_type; | 123 | u32 aux_ctrl, cache_type; |
117 | 124 | ||
118 | writel_relaxed(tag_latency, p + L2X0_TAG_LATENCY_CTRL); | ||
119 | writel_relaxed(data_latency, p + L2X0_DATA_LATENCY_CTRL); | ||
120 | |||
121 | cache_type = readl(p + L2X0_CACHE_TYPE); | 125 | cache_type = readl(p + L2X0_CACHE_TYPE); |
122 | aux_ctrl = (cache_type & 0x700) << (17-8); | 126 | aux_ctrl = (cache_type & 0x700) << (17-8); |
123 | aux_ctrl |= 0x6C000001; | 127 | aux_ctrl |= 0x7C400001; |
124 | 128 | ||
125 | l2x0_init(p, aux_ctrl, 0x8200c3fe); | 129 | ret = l2x0_of_init(aux_ctrl, 0x8200c3fe); |
130 | if (!ret) | ||
131 | l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs); | ||
126 | #endif | 132 | #endif |
127 | 133 | ||
128 | } | 134 | } |
@@ -134,7 +140,7 @@ void __init tegra20_init_early(void) | |||
134 | tegra_init_fuse(); | 140 | tegra_init_fuse(); |
135 | tegra2_init_clocks(); | 141 | tegra2_init_clocks(); |
136 | tegra_clk_init_from_table(tegra20_clk_init_table); | 142 | tegra_clk_init_from_table(tegra20_clk_init_table); |
137 | tegra_init_cache(0x331, 0x441); | 143 | tegra_init_cache(); |
138 | tegra_pmc_init(); | 144 | tegra_pmc_init(); |
139 | tegra_powergate_init(); | 145 | tegra_powergate_init(); |
140 | tegra20_hotplug_init(); | 146 | tegra20_hotplug_init(); |
@@ -147,7 +153,7 @@ void __init tegra30_init_early(void) | |||
147 | tegra_init_fuse(); | 153 | tegra_init_fuse(); |
148 | tegra30_init_clocks(); | 154 | tegra30_init_clocks(); |
149 | tegra_clk_init_from_table(tegra30_clk_init_table); | 155 | tegra_clk_init_from_table(tegra30_clk_init_table); |
150 | tegra_init_cache(0x441, 0x551); | 156 | tegra_init_cache(); |
151 | tegra_pmc_init(); | 157 | tegra_pmc_init(); |
152 | tegra_powergate_init(); | 158 | tegra_powergate_init(); |
153 | tegra30_hotplug_init(); | 159 | tegra30_hotplug_init(); |
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c new file mode 100644 index 000000000000..d32e8b0dbd4f --- /dev/null +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * CPU idle driver for Tegra CPUs | ||
3 | * | ||
4 | * Copyright (c) 2010-2012, NVIDIA Corporation. | ||
5 | * Copyright (c) 2011 Google, Inc. | ||
6 | * Author: Colin Cross <ccross@android.com> | ||
7 | * Gary King <gking@nvidia.com> | ||
8 | * | ||
9 | * Rework for 3.3 by Peter De Schrijver <pdeschrijver@nvidia.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
19 | * more details. | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/cpuidle.h> | ||
25 | |||
26 | #include <asm/cpuidle.h> | ||
27 | |||
28 | static struct cpuidle_driver tegra_idle_driver = { | ||
29 | .name = "tegra_idle", | ||
30 | .owner = THIS_MODULE, | ||
31 | .en_core_tk_irqen = 1, | ||
32 | .state_count = 1, | ||
33 | .states = { | ||
34 | [0] = ARM_CPUIDLE_WFI_STATE_PWR(600), | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); | ||
39 | |||
40 | int __init tegra20_cpuidle_init(void) | ||
41 | { | ||
42 | int ret; | ||
43 | unsigned int cpu; | ||
44 | struct cpuidle_device *dev; | ||
45 | struct cpuidle_driver *drv = &tegra_idle_driver; | ||
46 | |||
47 | ret = cpuidle_register_driver(&tegra_idle_driver); | ||
48 | if (ret) { | ||
49 | pr_err("CPUidle driver registration failed\n"); | ||
50 | return ret; | ||
51 | } | ||
52 | |||
53 | for_each_possible_cpu(cpu) { | ||
54 | dev = &per_cpu(tegra_idle_device, cpu); | ||
55 | dev->cpu = cpu; | ||
56 | |||
57 | dev->state_count = drv->state_count; | ||
58 | ret = cpuidle_register_device(dev); | ||
59 | if (ret) { | ||
60 | pr_err("CPU%u: CPUidle device registration failed\n", | ||
61 | cpu); | ||
62 | return ret; | ||
63 | } | ||
64 | } | ||
65 | return 0; | ||
66 | } | ||
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c new file mode 100644 index 000000000000..5e8cbf5b799f --- /dev/null +++ b/arch/arm/mach-tegra/cpuidle-tegra30.c | |||
@@ -0,0 +1,188 @@ | |||
1 | /* | ||
2 | * CPU idle driver for Tegra CPUs | ||
3 | * | ||
4 | * Copyright (c) 2010-2012, NVIDIA Corporation. | ||
5 | * Copyright (c) 2011 Google, Inc. | ||
6 | * Author: Colin Cross <ccross@android.com> | ||
7 | * Gary King <gking@nvidia.com> | ||
8 | * | ||
9 | * Rework for 3.3 by Peter De Schrijver <pdeschrijver@nvidia.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
19 | * more details. | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/cpuidle.h> | ||
25 | #include <linux/cpu_pm.h> | ||
26 | #include <linux/clockchips.h> | ||
27 | |||
28 | #include <asm/cpuidle.h> | ||
29 | #include <asm/proc-fns.h> | ||
30 | #include <asm/suspend.h> | ||
31 | #include <asm/smp_plat.h> | ||
32 | |||
33 | #include "pm.h" | ||
34 | #include "sleep.h" | ||
35 | #include "tegra_cpu_car.h" | ||
36 | |||
37 | #ifdef CONFIG_PM_SLEEP | ||
38 | static int tegra30_idle_lp2(struct cpuidle_device *dev, | ||
39 | struct cpuidle_driver *drv, | ||
40 | int index); | ||
41 | #endif | ||
42 | |||
43 | static struct cpuidle_driver tegra_idle_driver = { | ||
44 | .name = "tegra_idle", | ||
45 | .owner = THIS_MODULE, | ||
46 | .en_core_tk_irqen = 1, | ||
47 | #ifdef CONFIG_PM_SLEEP | ||
48 | .state_count = 2, | ||
49 | #else | ||
50 | .state_count = 1, | ||
51 | #endif | ||
52 | .states = { | ||
53 | [0] = ARM_CPUIDLE_WFI_STATE_PWR(600), | ||
54 | #ifdef CONFIG_PM_SLEEP | ||
55 | [1] = { | ||
56 | .enter = tegra30_idle_lp2, | ||
57 | .exit_latency = 2000, | ||
58 | .target_residency = 2200, | ||
59 | .power_usage = 0, | ||
60 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
61 | .name = "powered-down", | ||
62 | .desc = "CPU power gated", | ||
63 | }, | ||
64 | #endif | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); | ||
69 | |||
70 | #ifdef CONFIG_PM_SLEEP | ||
71 | static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev, | ||
72 | struct cpuidle_driver *drv, | ||
73 | int index) | ||
74 | { | ||
75 | struct cpuidle_state *state = &drv->states[index]; | ||
76 | u32 cpu_on_time = state->exit_latency; | ||
77 | u32 cpu_off_time = state->target_residency - state->exit_latency; | ||
78 | |||
79 | /* All CPUs entering LP2 is not working. | ||
80 | * Don't let CPU0 enter LP2 when any secondary CPU is online. | ||
81 | */ | ||
82 | if (num_online_cpus() > 1 || !tegra_cpu_rail_off_ready()) { | ||
83 | cpu_do_idle(); | ||
84 | return false; | ||
85 | } | ||
86 | |||
87 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); | ||
88 | |||
89 | tegra_idle_lp2_last(cpu_on_time, cpu_off_time); | ||
90 | |||
91 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); | ||
92 | |||
93 | return true; | ||
94 | } | ||
95 | |||
96 | #ifdef CONFIG_SMP | ||
97 | static bool tegra30_cpu_core_power_down(struct cpuidle_device *dev, | ||
98 | struct cpuidle_driver *drv, | ||
99 | int index) | ||
100 | { | ||
101 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu); | ||
102 | |||
103 | smp_wmb(); | ||
104 | |||
105 | save_cpu_arch_register(); | ||
106 | |||
107 | cpu_suspend(0, tegra30_sleep_cpu_secondary_finish); | ||
108 | |||
109 | restore_cpu_arch_register(); | ||
110 | |||
111 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu); | ||
112 | |||
113 | return true; | ||
114 | } | ||
115 | #else | ||
116 | static inline bool tegra30_cpu_core_power_down(struct cpuidle_device *dev, | ||
117 | struct cpuidle_driver *drv, | ||
118 | int index) | ||
119 | { | ||
120 | return true; | ||
121 | } | ||
122 | #endif | ||
123 | |||
124 | static int __cpuinit tegra30_idle_lp2(struct cpuidle_device *dev, | ||
125 | struct cpuidle_driver *drv, | ||
126 | int index) | ||
127 | { | ||
128 | u32 cpu = is_smp() ? cpu_logical_map(dev->cpu) : dev->cpu; | ||
129 | bool entered_lp2 = false; | ||
130 | bool last_cpu; | ||
131 | |||
132 | local_fiq_disable(); | ||
133 | |||
134 | last_cpu = tegra_set_cpu_in_lp2(cpu); | ||
135 | cpu_pm_enter(); | ||
136 | |||
137 | if (cpu == 0) { | ||
138 | if (last_cpu) | ||
139 | entered_lp2 = tegra30_cpu_cluster_power_down(dev, drv, | ||
140 | index); | ||
141 | else | ||
142 | cpu_do_idle(); | ||
143 | } else { | ||
144 | entered_lp2 = tegra30_cpu_core_power_down(dev, drv, index); | ||
145 | } | ||
146 | |||
147 | cpu_pm_exit(); | ||
148 | tegra_clear_cpu_in_lp2(cpu); | ||
149 | |||
150 | local_fiq_enable(); | ||
151 | |||
152 | smp_rmb(); | ||
153 | |||
154 | return (entered_lp2) ? index : 0; | ||
155 | } | ||
156 | #endif | ||
157 | |||
158 | int __init tegra30_cpuidle_init(void) | ||
159 | { | ||
160 | int ret; | ||
161 | unsigned int cpu; | ||
162 | struct cpuidle_device *dev; | ||
163 | struct cpuidle_driver *drv = &tegra_idle_driver; | ||
164 | |||
165 | #ifdef CONFIG_PM_SLEEP | ||
166 | tegra_tear_down_cpu = tegra30_tear_down_cpu; | ||
167 | #endif | ||
168 | |||
169 | ret = cpuidle_register_driver(&tegra_idle_driver); | ||
170 | if (ret) { | ||
171 | pr_err("CPUidle driver registration failed\n"); | ||
172 | return ret; | ||
173 | } | ||
174 | |||
175 | for_each_possible_cpu(cpu) { | ||
176 | dev = &per_cpu(tegra_idle_device, cpu); | ||
177 | dev->cpu = cpu; | ||
178 | |||
179 | dev->state_count = drv->state_count; | ||
180 | ret = cpuidle_register_device(dev); | ||
181 | if (ret) { | ||
182 | pr_err("CPU%u: CPUidle device registration failed\n", | ||
183 | cpu); | ||
184 | return ret; | ||
185 | } | ||
186 | } | ||
187 | return 0; | ||
188 | } | ||
diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c index 9a6f051b382e..d0651397aec7 100644 --- a/arch/arm/mach-tegra/cpuidle.c +++ b/arch/arm/mach-tegra/cpuidle.c | |||
@@ -23,83 +23,26 @@ | |||
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/cpu.h> | ||
27 | #include <linux/cpuidle.h> | ||
28 | #include <linux/hrtimer.h> | ||
29 | 26 | ||
30 | #include <asm/proc-fns.h> | 27 | #include "fuse.h" |
31 | 28 | #include "cpuidle.h" | |
32 | static int tegra_idle_enter_lp3(struct cpuidle_device *dev, | ||
33 | struct cpuidle_driver *drv, int index); | ||
34 | |||
35 | struct cpuidle_driver tegra_idle_driver = { | ||
36 | .name = "tegra_idle", | ||
37 | .owner = THIS_MODULE, | ||
38 | .state_count = 1, | ||
39 | .states = { | ||
40 | [0] = { | ||
41 | .enter = tegra_idle_enter_lp3, | ||
42 | .exit_latency = 10, | ||
43 | .target_residency = 10, | ||
44 | .power_usage = 600, | ||
45 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
46 | .name = "LP3", | ||
47 | .desc = "CPU flow-controlled", | ||
48 | }, | ||
49 | }, | ||
50 | }; | ||
51 | |||
52 | static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); | ||
53 | |||
54 | static int tegra_idle_enter_lp3(struct cpuidle_device *dev, | ||
55 | struct cpuidle_driver *drv, int index) | ||
56 | { | ||
57 | ktime_t enter, exit; | ||
58 | s64 us; | ||
59 | |||
60 | local_irq_disable(); | ||
61 | local_fiq_disable(); | ||
62 | |||
63 | enter = ktime_get(); | ||
64 | |||
65 | cpu_do_idle(); | ||
66 | |||
67 | exit = ktime_sub(ktime_get(), enter); | ||
68 | us = ktime_to_us(exit); | ||
69 | |||
70 | local_fiq_enable(); | ||
71 | local_irq_enable(); | ||
72 | |||
73 | dev->last_residency = us; | ||
74 | |||
75 | return index; | ||
76 | } | ||
77 | 29 | ||
78 | static int __init tegra_cpuidle_init(void) | 30 | static int __init tegra_cpuidle_init(void) |
79 | { | 31 | { |
80 | int ret; | 32 | int ret; |
81 | unsigned int cpu; | ||
82 | struct cpuidle_device *dev; | ||
83 | struct cpuidle_driver *drv = &tegra_idle_driver; | ||
84 | 33 | ||
85 | ret = cpuidle_register_driver(&tegra_idle_driver); | 34 | switch (tegra_chip_id) { |
86 | if (ret) { | 35 | case TEGRA20: |
87 | pr_err("CPUidle driver registration failed\n"); | 36 | ret = tegra20_cpuidle_init(); |
88 | return ret; | 37 | break; |
38 | case TEGRA30: | ||
39 | ret = tegra30_cpuidle_init(); | ||
40 | break; | ||
41 | default: | ||
42 | ret = -ENODEV; | ||
43 | break; | ||
89 | } | 44 | } |
90 | 45 | ||
91 | for_each_possible_cpu(cpu) { | 46 | return ret; |
92 | dev = &per_cpu(tegra_idle_device, cpu); | ||
93 | dev->cpu = cpu; | ||
94 | |||
95 | dev->state_count = drv->state_count; | ||
96 | ret = cpuidle_register_device(dev); | ||
97 | if (ret) { | ||
98 | pr_err("CPU%u: CPUidle device registration failed\n", | ||
99 | cpu); | ||
100 | return ret; | ||
101 | } | ||
102 | } | ||
103 | return 0; | ||
104 | } | 47 | } |
105 | device_initcall(tegra_cpuidle_init); | 48 | device_initcall(tegra_cpuidle_init); |
diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h new file mode 100644 index 000000000000..496204d34e55 --- /dev/null +++ b/arch/arm/mach-tegra/cpuidle.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012, NVIDIA Corporation. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_TEGRA_CPUIDLE_H | ||
18 | #define __MACH_TEGRA_CPUIDLE_H | ||
19 | |||
20 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
21 | int tegra20_cpuidle_init(void); | ||
22 | #else | ||
23 | static inline int tegra20_cpuidle_init(void) { return -ENODEV; } | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | ||
27 | int tegra30_cpuidle_init(void); | ||
28 | #else | ||
29 | static inline int tegra30_cpuidle_init(void) { return -ENODEV; } | ||
30 | #endif | ||
31 | |||
32 | #endif | ||
diff --git a/arch/arm/mach-tegra/flowctrl.c b/arch/arm/mach-tegra/flowctrl.c index ffaa286a71e1..a2250ddae797 100644 --- a/arch/arm/mach-tegra/flowctrl.c +++ b/arch/arm/mach-tegra/flowctrl.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/cpumask.h> | ||
24 | 25 | ||
25 | #include "flowctrl.h" | 26 | #include "flowctrl.h" |
26 | #include "iomap.h" | 27 | #include "iomap.h" |
@@ -50,6 +51,14 @@ static void flowctrl_update(u8 offset, u32 value) | |||
50 | readl_relaxed(addr); | 51 | readl_relaxed(addr); |
51 | } | 52 | } |
52 | 53 | ||
54 | u32 flowctrl_read_cpu_csr(unsigned int cpuid) | ||
55 | { | ||
56 | u8 offset = flowctrl_offset_cpu_csr[cpuid]; | ||
57 | void __iomem *addr = IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + offset; | ||
58 | |||
59 | return readl(addr); | ||
60 | } | ||
61 | |||
53 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) | 62 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) |
54 | { | 63 | { |
55 | return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); | 64 | return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); |
@@ -59,3 +68,41 @@ void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) | |||
59 | { | 68 | { |
60 | return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); | 69 | return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); |
61 | } | 70 | } |
71 | |||
72 | void flowctrl_cpu_suspend_enter(unsigned int cpuid) | ||
73 | { | ||
74 | unsigned int reg; | ||
75 | int i; | ||
76 | |||
77 | reg = flowctrl_read_cpu_csr(cpuid); | ||
78 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP; /* clear wfe bitmap */ | ||
79 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP; /* clear wfi bitmap */ | ||
80 | reg |= FLOW_CTRL_CSR_INTR_FLAG; /* clear intr flag */ | ||
81 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; /* clear event flag */ | ||
82 | reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid; /* pwr gating on wfi */ | ||
83 | reg |= FLOW_CTRL_CSR_ENABLE; /* pwr gating */ | ||
84 | flowctrl_write_cpu_csr(cpuid, reg); | ||
85 | |||
86 | for (i = 0; i < num_possible_cpus(); i++) { | ||
87 | if (i == cpuid) | ||
88 | continue; | ||
89 | reg = flowctrl_read_cpu_csr(i); | ||
90 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; | ||
91 | reg |= FLOW_CTRL_CSR_INTR_FLAG; | ||
92 | flowctrl_write_cpu_csr(i, reg); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | void flowctrl_cpu_suspend_exit(unsigned int cpuid) | ||
97 | { | ||
98 | unsigned int reg; | ||
99 | |||
100 | /* Disable powergating via flow controller for CPU0 */ | ||
101 | reg = flowctrl_read_cpu_csr(cpuid); | ||
102 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP; /* clear wfe bitmap */ | ||
103 | reg &= ~TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP; /* clear wfi bitmap */ | ||
104 | reg &= ~FLOW_CTRL_CSR_ENABLE; /* clear enable */ | ||
105 | reg |= FLOW_CTRL_CSR_INTR_FLAG; /* clear intr */ | ||
106 | reg |= FLOW_CTRL_CSR_EVENT_FLAG; /* clear event */ | ||
107 | flowctrl_write_cpu_csr(cpuid, reg); | ||
108 | } | ||
diff --git a/arch/arm/mach-tegra/flowctrl.h b/arch/arm/mach-tegra/flowctrl.h index 19428173855e..0798dec1832d 100644 --- a/arch/arm/mach-tegra/flowctrl.h +++ b/arch/arm/mach-tegra/flowctrl.h | |||
@@ -34,9 +34,17 @@ | |||
34 | #define FLOW_CTRL_HALT_CPU1_EVENTS 0x14 | 34 | #define FLOW_CTRL_HALT_CPU1_EVENTS 0x14 |
35 | #define FLOW_CTRL_CPU1_CSR 0x18 | 35 | #define FLOW_CTRL_CPU1_CSR 0x18 |
36 | 36 | ||
37 | #define TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 (1 << 8) | ||
38 | #define TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP (0xF << 4) | ||
39 | #define TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP (0xF << 8) | ||
40 | |||
37 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
42 | u32 flowctrl_read_cpu_csr(unsigned int cpuid); | ||
38 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value); | 43 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value); |
39 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value); | 44 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value); |
45 | |||
46 | void flowctrl_cpu_suspend_enter(unsigned int cpuid); | ||
47 | void flowctrl_cpu_suspend_exit(unsigned int cpuid); | ||
40 | #endif | 48 | #endif |
41 | 49 | ||
42 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index 6c752e8f1f06..8121742711fe 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c | |||
@@ -28,14 +28,21 @@ | |||
28 | #define FUSE_UID_LOW 0x108 | 28 | #define FUSE_UID_LOW 0x108 |
29 | #define FUSE_UID_HIGH 0x10c | 29 | #define FUSE_UID_HIGH 0x10c |
30 | #define FUSE_SKU_INFO 0x110 | 30 | #define FUSE_SKU_INFO 0x110 |
31 | #define FUSE_SPARE_BIT 0x200 | 31 | |
32 | #define TEGRA20_FUSE_SPARE_BIT 0x200 | ||
33 | #define TEGRA30_FUSE_SPARE_BIT 0x244 | ||
32 | 34 | ||
33 | int tegra_sku_id; | 35 | int tegra_sku_id; |
34 | int tegra_cpu_process_id; | 36 | int tegra_cpu_process_id; |
35 | int tegra_core_process_id; | 37 | int tegra_core_process_id; |
36 | int tegra_chip_id; | 38 | int tegra_chip_id; |
39 | int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */ | ||
40 | int tegra_soc_speedo_id; | ||
37 | enum tegra_revision tegra_revision; | 41 | enum tegra_revision tegra_revision; |
38 | 42 | ||
43 | static int tegra_fuse_spare_bit; | ||
44 | static void (*tegra_init_speedo_data)(void); | ||
45 | |||
39 | /* The BCT to use at boot is specified by board straps that can be read | 46 | /* The BCT to use at boot is specified by board straps that can be read |
40 | * through a APB misc register and decoded. 2 bits, i.e. 4 possible BCTs. | 47 | * through a APB misc register and decoded. 2 bits, i.e. 4 possible BCTs. |
41 | */ | 48 | */ |
@@ -56,14 +63,14 @@ static const char *tegra_revision_name[TEGRA_REVISION_MAX] = { | |||
56 | [TEGRA_REVISION_A04] = "A04", | 63 | [TEGRA_REVISION_A04] = "A04", |
57 | }; | 64 | }; |
58 | 65 | ||
59 | static inline u32 tegra_fuse_readl(unsigned long offset) | 66 | u32 tegra_fuse_readl(unsigned long offset) |
60 | { | 67 | { |
61 | return tegra_apb_readl(TEGRA_FUSE_BASE + offset); | 68 | return tegra_apb_readl(TEGRA_FUSE_BASE + offset); |
62 | } | 69 | } |
63 | 70 | ||
64 | static inline bool get_spare_fuse(int bit) | 71 | bool tegra_spare_fuse(int bit) |
65 | { | 72 | { |
66 | return tegra_fuse_readl(FUSE_SPARE_BIT + bit * 4); | 73 | return tegra_fuse_readl(tegra_fuse_spare_bit + bit * 4); |
67 | } | 74 | } |
68 | 75 | ||
69 | static enum tegra_revision tegra_get_revision(u32 id) | 76 | static enum tegra_revision tegra_get_revision(u32 id) |
@@ -77,7 +84,7 @@ static enum tegra_revision tegra_get_revision(u32 id) | |||
77 | return TEGRA_REVISION_A02; | 84 | return TEGRA_REVISION_A02; |
78 | case 3: | 85 | case 3: |
79 | if (tegra_chip_id == TEGRA20 && | 86 | if (tegra_chip_id == TEGRA20 && |
80 | (get_spare_fuse(18) || get_spare_fuse(19))) | 87 | (tegra_spare_fuse(18) || tegra_spare_fuse(19))) |
81 | return TEGRA_REVISION_A03p; | 88 | return TEGRA_REVISION_A03p; |
82 | else | 89 | else |
83 | return TEGRA_REVISION_A03; | 90 | return TEGRA_REVISION_A03; |
@@ -88,6 +95,16 @@ static enum tegra_revision tegra_get_revision(u32 id) | |||
88 | } | 95 | } |
89 | } | 96 | } |
90 | 97 | ||
98 | static void tegra_get_process_id(void) | ||
99 | { | ||
100 | u32 reg; | ||
101 | |||
102 | reg = tegra_fuse_readl(tegra_fuse_spare_bit); | ||
103 | tegra_cpu_process_id = (reg >> 6) & 3; | ||
104 | reg = tegra_fuse_readl(tegra_fuse_spare_bit); | ||
105 | tegra_core_process_id = (reg >> 12) & 3; | ||
106 | } | ||
107 | |||
91 | void tegra_init_fuse(void) | 108 | void tegra_init_fuse(void) |
92 | { | 109 | { |
93 | u32 id; | 110 | u32 id; |
@@ -99,19 +116,29 @@ void tegra_init_fuse(void) | |||
99 | reg = tegra_fuse_readl(FUSE_SKU_INFO); | 116 | reg = tegra_fuse_readl(FUSE_SKU_INFO); |
100 | tegra_sku_id = reg & 0xFF; | 117 | tegra_sku_id = reg & 0xFF; |
101 | 118 | ||
102 | reg = tegra_fuse_readl(FUSE_SPARE_BIT); | ||
103 | tegra_cpu_process_id = (reg >> 6) & 3; | ||
104 | |||
105 | reg = tegra_fuse_readl(FUSE_SPARE_BIT); | ||
106 | tegra_core_process_id = (reg >> 12) & 3; | ||
107 | |||
108 | reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT); | 119 | reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT); |
109 | tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT; | 120 | tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT; |
110 | 121 | ||
111 | id = readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804); | 122 | id = readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804); |
112 | tegra_chip_id = (id >> 8) & 0xff; | 123 | tegra_chip_id = (id >> 8) & 0xff; |
113 | 124 | ||
125 | switch (tegra_chip_id) { | ||
126 | case TEGRA20: | ||
127 | tegra_fuse_spare_bit = TEGRA20_FUSE_SPARE_BIT; | ||
128 | tegra_init_speedo_data = &tegra20_init_speedo_data; | ||
129 | break; | ||
130 | case TEGRA30: | ||
131 | tegra_fuse_spare_bit = TEGRA30_FUSE_SPARE_BIT; | ||
132 | tegra_init_speedo_data = &tegra30_init_speedo_data; | ||
133 | break; | ||
134 | default: | ||
135 | pr_warn("Tegra: unknown chip id %d\n", tegra_chip_id); | ||
136 | tegra_fuse_spare_bit = TEGRA20_FUSE_SPARE_BIT; | ||
137 | tegra_init_speedo_data = &tegra_get_process_id; | ||
138 | } | ||
139 | |||
114 | tegra_revision = tegra_get_revision(id); | 140 | tegra_revision = tegra_get_revision(id); |
141 | tegra_init_speedo_data(); | ||
115 | 142 | ||
116 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", | 143 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", |
117 | tegra_revision_name[tegra_revision], | 144 | tegra_revision_name[tegra_revision], |
diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h index d2107b2cb85a..ff1383dd61a7 100644 --- a/arch/arm/mach-tegra/fuse.h +++ b/arch/arm/mach-tegra/fuse.h | |||
@@ -42,11 +42,27 @@ extern int tegra_sku_id; | |||
42 | extern int tegra_cpu_process_id; | 42 | extern int tegra_cpu_process_id; |
43 | extern int tegra_core_process_id; | 43 | extern int tegra_core_process_id; |
44 | extern int tegra_chip_id; | 44 | extern int tegra_chip_id; |
45 | extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */ | ||
46 | extern int tegra_soc_speedo_id; | ||
45 | extern enum tegra_revision tegra_revision; | 47 | extern enum tegra_revision tegra_revision; |
46 | 48 | ||
47 | extern int tegra_bct_strapping; | 49 | extern int tegra_bct_strapping; |
48 | 50 | ||
49 | unsigned long long tegra_chip_uid(void); | 51 | unsigned long long tegra_chip_uid(void); |
50 | void tegra_init_fuse(void); | 52 | void tegra_init_fuse(void); |
53 | bool tegra_spare_fuse(int bit); | ||
54 | u32 tegra_fuse_readl(unsigned long offset); | ||
55 | |||
56 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
57 | void tegra20_init_speedo_data(void); | ||
58 | #else | ||
59 | static inline void tegra20_init_speedo_data(void) {} | ||
60 | #endif | ||
61 | |||
62 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | ||
63 | void tegra30_init_speedo_data(void); | ||
64 | #else | ||
65 | static inline void tegra30_init_speedo_data(void) {} | ||
66 | #endif | ||
51 | 67 | ||
52 | #endif | 68 | #endif |
diff --git a/arch/arm/mach-tegra/headsmp.S b/arch/arm/mach-tegra/headsmp.S index 93f0370cc95b..4a317fae6860 100644 --- a/arch/arm/mach-tegra/headsmp.S +++ b/arch/arm/mach-tegra/headsmp.S | |||
@@ -2,6 +2,8 @@ | |||
2 | #include <linux/init.h> | 2 | #include <linux/init.h> |
3 | 3 | ||
4 | #include <asm/cache.h> | 4 | #include <asm/cache.h> |
5 | #include <asm/asm-offsets.h> | ||
6 | #include <asm/hardware/cache-l2x0.h> | ||
5 | 7 | ||
6 | #include "flowctrl.h" | 8 | #include "flowctrl.h" |
7 | #include "iomap.h" | 9 | #include "iomap.h" |
@@ -68,6 +70,64 @@ ENTRY(tegra_secondary_startup) | |||
68 | b secondary_startup | 70 | b secondary_startup |
69 | ENDPROC(tegra_secondary_startup) | 71 | ENDPROC(tegra_secondary_startup) |
70 | 72 | ||
73 | #ifdef CONFIG_PM_SLEEP | ||
74 | /* | ||
75 | * tegra_resume | ||
76 | * | ||
77 | * CPU boot vector when restarting the a CPU following | ||
78 | * an LP2 transition. Also branched to by LP0 and LP1 resume after | ||
79 | * re-enabling sdram. | ||
80 | */ | ||
81 | ENTRY(tegra_resume) | ||
82 | bl v7_invalidate_l1 | ||
83 | /* Enable coresight */ | ||
84 | mov32 r0, 0xC5ACCE55 | ||
85 | mcr p14, 0, r0, c7, c12, 6 | ||
86 | |||
87 | cpu_id r0 | ||
88 | cmp r0, #0 @ CPU0? | ||
89 | bne cpu_resume @ no | ||
90 | |||
91 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC | ||
92 | /* Are we on Tegra20? */ | ||
93 | mov32 r6, TEGRA_APB_MISC_BASE | ||
94 | ldr r0, [r6, #APB_MISC_GP_HIDREV] | ||
95 | and r0, r0, #0xff00 | ||
96 | cmp r0, #(0x20 << 8) | ||
97 | beq 1f @ Yes | ||
98 | /* Clear the flow controller flags for this CPU. */ | ||
99 | mov32 r2, TEGRA_FLOW_CTRL_BASE + FLOW_CTRL_CPU0_CSR @ CPU0 CSR | ||
100 | ldr r1, [r2] | ||
101 | /* Clear event & intr flag */ | ||
102 | orr r1, r1, \ | ||
103 | #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG | ||
104 | movw r0, #0x0FFD @ enable, cluster_switch, immed, & bitmaps | ||
105 | bic r1, r1, r0 | ||
106 | str r1, [r2] | ||
107 | 1: | ||
108 | #endif | ||
109 | |||
110 | #ifdef CONFIG_HAVE_ARM_SCU | ||
111 | /* enable SCU */ | ||
112 | mov32 r0, TEGRA_ARM_PERIF_BASE | ||
113 | ldr r1, [r0] | ||
114 | orr r1, r1, #1 | ||
115 | str r1, [r0] | ||
116 | #endif | ||
117 | |||
118 | /* L2 cache resume & re-enable */ | ||
119 | l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr | ||
120 | |||
121 | b cpu_resume | ||
122 | ENDPROC(tegra_resume) | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_CACHE_L2X0 | ||
126 | .globl l2x0_saved_regs_addr | ||
127 | l2x0_saved_regs_addr: | ||
128 | .long 0 | ||
129 | #endif | ||
130 | |||
71 | .align L1_CACHE_SHIFT | 131 | .align L1_CACHE_SHIFT |
72 | ENTRY(__tegra_cpu_reset_handler_start) | 132 | ENTRY(__tegra_cpu_reset_handler_start) |
73 | 133 | ||
@@ -121,6 +181,17 @@ ENTRY(__tegra_cpu_reset_handler) | |||
121 | 1: | 181 | 1: |
122 | #endif | 182 | #endif |
123 | 183 | ||
184 | /* Waking up from LP2? */ | ||
185 | ldr r9, [r12, #RESET_DATA(MASK_LP2)] | ||
186 | tst r9, r11 @ if in_lp2 | ||
187 | beq __is_not_lp2 | ||
188 | ldr lr, [r12, #RESET_DATA(STARTUP_LP2)] | ||
189 | cmp lr, #0 | ||
190 | bleq __die @ no LP2 startup handler | ||
191 | bx lr | ||
192 | |||
193 | __is_not_lp2: | ||
194 | |||
124 | #ifdef CONFIG_SMP | 195 | #ifdef CONFIG_SMP |
125 | /* | 196 | /* |
126 | * Can only be secondary boot (initial or hotplug) but CPU 0 | 197 | * Can only be secondary boot (initial or hotplug) but CPU 0 |
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c new file mode 100644 index 000000000000..1b11707eaca0 --- /dev/null +++ b/arch/arm/mach-tegra/pm.c | |||
@@ -0,0 +1,216 @@ | |||
1 | /* | ||
2 | * CPU complex suspend & resume functions for Tegra SoCs | ||
3 | * | ||
4 | * Copyright (c) 2009-2012, NVIDIA Corporation. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms and conditions of the GNU General Public License, | ||
8 | * version 2, as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/cpumask.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/cpu_pm.h> | ||
25 | #include <linux/clk.h> | ||
26 | #include <linux/err.h> | ||
27 | |||
28 | #include <asm/smp_plat.h> | ||
29 | #include <asm/cacheflush.h> | ||
30 | #include <asm/suspend.h> | ||
31 | #include <asm/idmap.h> | ||
32 | #include <asm/proc-fns.h> | ||
33 | #include <asm/tlbflush.h> | ||
34 | |||
35 | #include "iomap.h" | ||
36 | #include "reset.h" | ||
37 | #include "flowctrl.h" | ||
38 | #include "sleep.h" | ||
39 | #include "tegra_cpu_car.h" | ||
40 | |||
41 | #define TEGRA_POWER_CPU_PWRREQ_OE (1 << 16) /* CPU pwr req enable */ | ||
42 | |||
43 | #define PMC_CTRL 0x0 | ||
44 | #define PMC_CPUPWRGOOD_TIMER 0xc8 | ||
45 | #define PMC_CPUPWROFF_TIMER 0xcc | ||
46 | |||
47 | #ifdef CONFIG_PM_SLEEP | ||
48 | static unsigned int g_diag_reg; | ||
49 | static DEFINE_SPINLOCK(tegra_lp2_lock); | ||
50 | static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); | ||
51 | static struct clk *tegra_pclk; | ||
52 | void (*tegra_tear_down_cpu)(void); | ||
53 | |||
54 | void save_cpu_arch_register(void) | ||
55 | { | ||
56 | /* read diagnostic register */ | ||
57 | asm("mrc p15, 0, %0, c15, c0, 1" : "=r"(g_diag_reg) : : "cc"); | ||
58 | return; | ||
59 | } | ||
60 | |||
61 | void restore_cpu_arch_register(void) | ||
62 | { | ||
63 | /* write diagnostic register */ | ||
64 | asm("mcr p15, 0, %0, c15, c0, 1" : : "r"(g_diag_reg) : "cc"); | ||
65 | return; | ||
66 | } | ||
67 | |||
68 | static void set_power_timers(unsigned long us_on, unsigned long us_off) | ||
69 | { | ||
70 | unsigned long long ticks; | ||
71 | unsigned long long pclk; | ||
72 | unsigned long rate; | ||
73 | static unsigned long tegra_last_pclk; | ||
74 | |||
75 | if (tegra_pclk == NULL) { | ||
76 | tegra_pclk = clk_get_sys(NULL, "pclk"); | ||
77 | WARN_ON(IS_ERR(tegra_pclk)); | ||
78 | } | ||
79 | |||
80 | rate = clk_get_rate(tegra_pclk); | ||
81 | |||
82 | if (WARN_ON_ONCE(rate <= 0)) | ||
83 | pclk = 100000000; | ||
84 | else | ||
85 | pclk = rate; | ||
86 | |||
87 | if ((rate != tegra_last_pclk)) { | ||
88 | ticks = (us_on * pclk) + 999999ull; | ||
89 | do_div(ticks, 1000000); | ||
90 | writel((unsigned long)ticks, pmc + PMC_CPUPWRGOOD_TIMER); | ||
91 | |||
92 | ticks = (us_off * pclk) + 999999ull; | ||
93 | do_div(ticks, 1000000); | ||
94 | writel((unsigned long)ticks, pmc + PMC_CPUPWROFF_TIMER); | ||
95 | wmb(); | ||
96 | } | ||
97 | tegra_last_pclk = pclk; | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * restore_cpu_complex | ||
102 | * | ||
103 | * restores cpu clock setting, clears flow controller | ||
104 | * | ||
105 | * Always called on CPU 0. | ||
106 | */ | ||
107 | static void restore_cpu_complex(void) | ||
108 | { | ||
109 | int cpu = smp_processor_id(); | ||
110 | |||
111 | BUG_ON(cpu != 0); | ||
112 | |||
113 | #ifdef CONFIG_SMP | ||
114 | cpu = cpu_logical_map(cpu); | ||
115 | #endif | ||
116 | |||
117 | /* Restore the CPU clock settings */ | ||
118 | tegra_cpu_clock_resume(); | ||
119 | |||
120 | flowctrl_cpu_suspend_exit(cpu); | ||
121 | |||
122 | restore_cpu_arch_register(); | ||
123 | } | ||
124 | |||
125 | /* | ||
126 | * suspend_cpu_complex | ||
127 | * | ||
128 | * saves pll state for use by restart_plls, prepares flow controller for | ||
129 | * transition to suspend state | ||
130 | * | ||
131 | * Must always be called on cpu 0. | ||
132 | */ | ||
133 | static void suspend_cpu_complex(void) | ||
134 | { | ||
135 | int cpu = smp_processor_id(); | ||
136 | |||
137 | BUG_ON(cpu != 0); | ||
138 | |||
139 | #ifdef CONFIG_SMP | ||
140 | cpu = cpu_logical_map(cpu); | ||
141 | #endif | ||
142 | |||
143 | /* Save the CPU clock settings */ | ||
144 | tegra_cpu_clock_suspend(); | ||
145 | |||
146 | flowctrl_cpu_suspend_enter(cpu); | ||
147 | |||
148 | save_cpu_arch_register(); | ||
149 | } | ||
150 | |||
151 | void __cpuinit tegra_clear_cpu_in_lp2(int phy_cpu_id) | ||
152 | { | ||
153 | u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; | ||
154 | |||
155 | spin_lock(&tegra_lp2_lock); | ||
156 | |||
157 | BUG_ON(!(*cpu_in_lp2 & BIT(phy_cpu_id))); | ||
158 | *cpu_in_lp2 &= ~BIT(phy_cpu_id); | ||
159 | |||
160 | spin_unlock(&tegra_lp2_lock); | ||
161 | } | ||
162 | |||
163 | bool __cpuinit tegra_set_cpu_in_lp2(int phy_cpu_id) | ||
164 | { | ||
165 | bool last_cpu = false; | ||
166 | cpumask_t *cpu_lp2_mask = tegra_cpu_lp2_mask; | ||
167 | u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; | ||
168 | |||
169 | spin_lock(&tegra_lp2_lock); | ||
170 | |||
171 | BUG_ON((*cpu_in_lp2 & BIT(phy_cpu_id))); | ||
172 | *cpu_in_lp2 |= BIT(phy_cpu_id); | ||
173 | |||
174 | if ((phy_cpu_id == 0) && cpumask_equal(cpu_lp2_mask, cpu_online_mask)) | ||
175 | last_cpu = true; | ||
176 | |||
177 | spin_unlock(&tegra_lp2_lock); | ||
178 | return last_cpu; | ||
179 | } | ||
180 | |||
181 | static int tegra_sleep_cpu(unsigned long v2p) | ||
182 | { | ||
183 | /* Switch to the identity mapping. */ | ||
184 | cpu_switch_mm(idmap_pgd, &init_mm); | ||
185 | |||
186 | /* Flush the TLB. */ | ||
187 | local_flush_tlb_all(); | ||
188 | |||
189 | tegra_sleep_cpu_finish(v2p); | ||
190 | |||
191 | /* should never here */ | ||
192 | BUG(); | ||
193 | |||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | void tegra_idle_lp2_last(u32 cpu_on_time, u32 cpu_off_time) | ||
198 | { | ||
199 | u32 mode; | ||
200 | |||
201 | /* Only the last cpu down does the final suspend steps */ | ||
202 | mode = readl(pmc + PMC_CTRL); | ||
203 | mode |= TEGRA_POWER_CPU_PWRREQ_OE; | ||
204 | writel(mode, pmc + PMC_CTRL); | ||
205 | |||
206 | set_power_timers(cpu_on_time, cpu_off_time); | ||
207 | |||
208 | cpu_cluster_pm_enter(); | ||
209 | suspend_cpu_complex(); | ||
210 | |||
211 | cpu_suspend(PHYS_OFFSET - PAGE_OFFSET, &tegra_sleep_cpu); | ||
212 | |||
213 | restore_cpu_complex(); | ||
214 | cpu_cluster_pm_exit(); | ||
215 | } | ||
216 | #endif | ||
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h new file mode 100644 index 000000000000..787335cc964c --- /dev/null +++ b/arch/arm/mach-tegra/pm.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Google, Inc. | ||
3 | * Copyright (c) 2010-2012 NVIDIA Corporation. All rights reserved. | ||
4 | * | ||
5 | * Author: | ||
6 | * Colin Cross <ccross@google.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
15 | * more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #ifndef _MACH_TEGRA_PM_H_ | ||
22 | #define _MACH_TEGRA_PM_H_ | ||
23 | |||
24 | extern unsigned long l2x0_saved_regs_addr; | ||
25 | |||
26 | void save_cpu_arch_register(void); | ||
27 | void restore_cpu_arch_register(void); | ||
28 | |||
29 | void tegra_clear_cpu_in_lp2(int phy_cpu_id); | ||
30 | bool tegra_set_cpu_in_lp2(int phy_cpu_id); | ||
31 | |||
32 | void tegra_idle_lp2_last(u32 cpu_on_time, u32 cpu_off_time); | ||
33 | extern void (*tegra_tear_down_cpu)(void); | ||
34 | |||
35 | #endif /* _MACH_TEGRA_PM_H_ */ | ||
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c index e05da7d10c3b..3fd89ecd158e 100644 --- a/arch/arm/mach-tegra/reset.c +++ b/arch/arm/mach-tegra/reset.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "iomap.h" | 25 | #include "iomap.h" |
26 | #include "irammap.h" | 26 | #include "irammap.h" |
27 | #include "reset.h" | 27 | #include "reset.h" |
28 | #include "sleep.h" | ||
28 | #include "fuse.h" | 29 | #include "fuse.h" |
29 | 30 | ||
30 | #define TEGRA_IRAM_RESET_BASE (TEGRA_IRAM_BASE + \ | 31 | #define TEGRA_IRAM_RESET_BASE (TEGRA_IRAM_BASE + \ |
@@ -79,5 +80,10 @@ void __init tegra_cpu_reset_handler_init(void) | |||
79 | virt_to_phys((void *)tegra_secondary_startup); | 80 | virt_to_phys((void *)tegra_secondary_startup); |
80 | #endif | 81 | #endif |
81 | 82 | ||
83 | #ifdef CONFIG_PM_SLEEP | ||
84 | __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP2] = | ||
85 | virt_to_phys((void *)tegra_resume); | ||
86 | #endif | ||
87 | |||
82 | tegra_cpu_reset_handler_enable(); | 88 | tegra_cpu_reset_handler_enable(); |
83 | } | 89 | } |
diff --git a/arch/arm/mach-tegra/reset.h b/arch/arm/mach-tegra/reset.h index de88bf851dd3..c90d8e9c4ad2 100644 --- a/arch/arm/mach-tegra/reset.h +++ b/arch/arm/mach-tegra/reset.h | |||
@@ -29,6 +29,8 @@ | |||
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
31 | 31 | ||
32 | #include "irammap.h" | ||
33 | |||
32 | extern unsigned long __tegra_cpu_reset_handler_data[TEGRA_RESET_DATA_SIZE]; | 34 | extern unsigned long __tegra_cpu_reset_handler_data[TEGRA_RESET_DATA_SIZE]; |
33 | 35 | ||
34 | void __tegra_cpu_reset_handler_start(void); | 36 | void __tegra_cpu_reset_handler_start(void); |
@@ -36,6 +38,13 @@ void __tegra_cpu_reset_handler(void); | |||
36 | void __tegra_cpu_reset_handler_end(void); | 38 | void __tegra_cpu_reset_handler_end(void); |
37 | void tegra_secondary_startup(void); | 39 | void tegra_secondary_startup(void); |
38 | 40 | ||
41 | #ifdef CONFIG_PM_SLEEP | ||
42 | #define tegra_cpu_lp2_mask \ | ||
43 | (IO_ADDRESS(TEGRA_IRAM_BASE + TEGRA_IRAM_RESET_HANDLER_OFFSET + \ | ||
44 | ((u32)&__tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_LP2] - \ | ||
45 | (u32)__tegra_cpu_reset_handler_start))) | ||
46 | #endif | ||
47 | |||
39 | #define tegra_cpu_reset_handler_offset \ | 48 | #define tegra_cpu_reset_handler_offset \ |
40 | ((u32)__tegra_cpu_reset_handler - \ | 49 | ((u32)__tegra_cpu_reset_handler - \ |
41 | (u32)__tegra_cpu_reset_handler_start) | 50 | (u32)__tegra_cpu_reset_handler_start) |
diff --git a/arch/arm/mach-tegra/sleep-t20.S b/arch/arm/mach-tegra/sleep-tegra20.S index 72ce709799da..72ce709799da 100644 --- a/arch/arm/mach-tegra/sleep-t20.S +++ b/arch/arm/mach-tegra/sleep-tegra20.S | |||
diff --git a/arch/arm/mach-tegra/sleep-t30.S b/arch/arm/mach-tegra/sleep-tegra30.S index be7614b7c5cb..562a8e7e413d 100644 --- a/arch/arm/mach-tegra/sleep-t30.S +++ b/arch/arm/mach-tegra/sleep-tegra30.S | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/linkage.h> | 17 | #include <linux/linkage.h> |
18 | 18 | ||
19 | #include <asm/assembler.h> | 19 | #include <asm/assembler.h> |
20 | #include <asm/asm-offsets.h> | ||
20 | 21 | ||
21 | #include "sleep.h" | 22 | #include "sleep.h" |
22 | #include "flowctrl.h" | 23 | #include "flowctrl.h" |
@@ -80,6 +81,7 @@ delay_1: | |||
80 | ldr r3, [r1] @ read CSR | 81 | ldr r3, [r1] @ read CSR |
81 | str r3, [r1] @ clear CSR | 82 | str r3, [r1] @ clear CSR |
82 | tst r0, #TEGRA30_POWER_HOTPLUG_SHUTDOWN | 83 | tst r0, #TEGRA30_POWER_HOTPLUG_SHUTDOWN |
84 | moveq r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT @ For LP2 | ||
83 | movne r3, #FLOW_CTRL_WAITEVENT @ For hotplug | 85 | movne r3, #FLOW_CTRL_WAITEVENT @ For hotplug |
84 | str r3, [r2] | 86 | str r3, [r2] |
85 | ldr r0, [r2] | 87 | ldr r0, [r2] |
@@ -103,3 +105,67 @@ wfe_war: | |||
103 | 105 | ||
104 | ENDPROC(tegra30_cpu_shutdown) | 106 | ENDPROC(tegra30_cpu_shutdown) |
105 | #endif | 107 | #endif |
108 | |||
109 | #ifdef CONFIG_PM_SLEEP | ||
110 | /* | ||
111 | * tegra30_sleep_cpu_secondary_finish(unsigned long v2p) | ||
112 | * | ||
113 | * Enters LP2 on secondary CPU by exiting coherency and powergating the CPU. | ||
114 | */ | ||
115 | ENTRY(tegra30_sleep_cpu_secondary_finish) | ||
116 | mov r7, lr | ||
117 | |||
118 | /* Flush and disable the L1 data cache */ | ||
119 | bl tegra_disable_clean_inv_dcache | ||
120 | |||
121 | /* Powergate this CPU. */ | ||
122 | mov r0, #0 @ power mode flags (!hotplug) | ||
123 | bl tegra30_cpu_shutdown | ||
124 | mov r0, #1 @ never return here | ||
125 | mov pc, r7 | ||
126 | ENDPROC(tegra30_sleep_cpu_secondary_finish) | ||
127 | |||
128 | /* | ||
129 | * tegra30_tear_down_cpu | ||
130 | * | ||
131 | * Switches the CPU to enter sleep. | ||
132 | */ | ||
133 | ENTRY(tegra30_tear_down_cpu) | ||
134 | mov32 r6, TEGRA_FLOW_CTRL_BASE | ||
135 | |||
136 | b tegra30_enter_sleep | ||
137 | ENDPROC(tegra30_tear_down_cpu) | ||
138 | |||
139 | /* | ||
140 | * tegra30_enter_sleep | ||
141 | * | ||
142 | * uses flow controller to enter sleep state | ||
143 | * executes from IRAM with SDRAM in selfrefresh when target state is LP0 or LP1 | ||
144 | * executes from SDRAM with target state is LP2 | ||
145 | * r6 = TEGRA_FLOW_CTRL_BASE | ||
146 | */ | ||
147 | tegra30_enter_sleep: | ||
148 | cpu_id r1 | ||
149 | |||
150 | cpu_to_csr_reg r2, r1 | ||
151 | ldr r0, [r6, r2] | ||
152 | orr r0, r0, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG | ||
153 | orr r0, r0, #FLOW_CTRL_CSR_ENABLE | ||
154 | str r0, [r6, r2] | ||
155 | |||
156 | mov r0, #FLOW_CTRL_WAIT_FOR_INTERRUPT | ||
157 | orr r0, r0, #FLOW_CTRL_HALT_CPU_IRQ | FLOW_CTRL_HALT_CPU_FIQ | ||
158 | cpu_to_halt_reg r2, r1 | ||
159 | str r0, [r6, r2] | ||
160 | dsb | ||
161 | ldr r0, [r6, r2] /* memory barrier */ | ||
162 | |||
163 | halted: | ||
164 | isb | ||
165 | dsb | ||
166 | wfi /* CPU should be power gated here */ | ||
167 | |||
168 | /* !!!FIXME!!! Implement halt failure handler */ | ||
169 | b halted | ||
170 | |||
171 | #endif | ||
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S index 08e9481c049e..26afa7cbed11 100644 --- a/arch/arm/mach-tegra/sleep.S +++ b/arch/arm/mach-tegra/sleep.S | |||
@@ -25,9 +25,87 @@ | |||
25 | #include <linux/linkage.h> | 25 | #include <linux/linkage.h> |
26 | 26 | ||
27 | #include <asm/assembler.h> | 27 | #include <asm/assembler.h> |
28 | #include <asm/cache.h> | ||
29 | #include <asm/cp15.h> | ||
30 | #include <asm/hardware/cache-l2x0.h> | ||
28 | 31 | ||
29 | #include "iomap.h" | 32 | #include "iomap.h" |
30 | 33 | ||
31 | #include "flowctrl.h" | 34 | #include "flowctrl.h" |
32 | #include "sleep.h" | 35 | #include "sleep.h" |
33 | 36 | ||
37 | #ifdef CONFIG_PM_SLEEP | ||
38 | /* | ||
39 | * tegra_disable_clean_inv_dcache | ||
40 | * | ||
41 | * disable, clean & invalidate the D-cache | ||
42 | * | ||
43 | * Corrupted registers: r1-r3, r6, r8, r9-r11 | ||
44 | */ | ||
45 | ENTRY(tegra_disable_clean_inv_dcache) | ||
46 | stmfd sp!, {r0, r4-r5, r7, r9-r11, lr} | ||
47 | dmb @ ensure ordering | ||
48 | |||
49 | /* Disable the D-cache */ | ||
50 | mrc p15, 0, r2, c1, c0, 0 | ||
51 | bic r2, r2, #CR_C | ||
52 | mcr p15, 0, r2, c1, c0, 0 | ||
53 | isb | ||
54 | |||
55 | /* Flush the D-cache */ | ||
56 | bl v7_flush_dcache_louis | ||
57 | |||
58 | /* Trun off coherency */ | ||
59 | exit_smp r4, r5 | ||
60 | |||
61 | ldmfd sp!, {r0, r4-r5, r7, r9-r11, pc} | ||
62 | ENDPROC(tegra_disable_clean_inv_dcache) | ||
63 | |||
64 | /* | ||
65 | * tegra_sleep_cpu_finish(unsigned long v2p) | ||
66 | * | ||
67 | * enters suspend in LP2 by turning off the mmu and jumping to | ||
68 | * tegra?_tear_down_cpu | ||
69 | */ | ||
70 | ENTRY(tegra_sleep_cpu_finish) | ||
71 | /* Flush and disable the L1 data cache */ | ||
72 | bl tegra_disable_clean_inv_dcache | ||
73 | |||
74 | mov32 r6, tegra_tear_down_cpu | ||
75 | ldr r1, [r6] | ||
76 | add r1, r1, r0 | ||
77 | |||
78 | mov32 r3, tegra_shut_off_mmu | ||
79 | add r3, r3, r0 | ||
80 | mov r0, r1 | ||
81 | |||
82 | mov pc, r3 | ||
83 | ENDPROC(tegra_sleep_cpu_finish) | ||
84 | |||
85 | /* | ||
86 | * tegra_shut_off_mmu | ||
87 | * | ||
88 | * r0 = physical address to jump to with mmu off | ||
89 | * | ||
90 | * called with VA=PA mapping | ||
91 | * turns off MMU, icache, dcache and branch prediction | ||
92 | */ | ||
93 | .align L1_CACHE_SHIFT | ||
94 | .pushsection .idmap.text, "ax" | ||
95 | ENTRY(tegra_shut_off_mmu) | ||
96 | mrc p15, 0, r3, c1, c0, 0 | ||
97 | movw r2, #CR_I | CR_Z | CR_C | CR_M | ||
98 | bic r3, r3, r2 | ||
99 | dsb | ||
100 | mcr p15, 0, r3, c1, c0, 0 | ||
101 | isb | ||
102 | #ifdef CONFIG_CACHE_L2X0 | ||
103 | /* Disable L2 cache */ | ||
104 | mov32 r4, TEGRA_ARM_PERIF_BASE + 0x3000 | ||
105 | mov r5, #0 | ||
106 | str r5, [r4, #L2X0_CTRL] | ||
107 | #endif | ||
108 | mov pc, r0 | ||
109 | ENDPROC(tegra_shut_off_mmu) | ||
110 | .popsection | ||
111 | #endif | ||
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h index 4889b281c5f9..9821ee725420 100644 --- a/arch/arm/mach-tegra/sleep.h +++ b/arch/arm/mach-tegra/sleep.h | |||
@@ -71,7 +71,41 @@ | |||
71 | str \tmp2, [\tmp1] @ invalidate SCU tags for CPU | 71 | str \tmp2, [\tmp1] @ invalidate SCU tags for CPU |
72 | dsb | 72 | dsb |
73 | .endm | 73 | .endm |
74 | |||
75 | /* Macro to resume & re-enable L2 cache */ | ||
76 | #ifndef L2X0_CTRL_EN | ||
77 | #define L2X0_CTRL_EN 1 | ||
78 | #endif | ||
79 | |||
80 | #ifdef CONFIG_CACHE_L2X0 | ||
81 | .macro l2_cache_resume, tmp1, tmp2, tmp3, phys_l2x0_saved_regs | ||
82 | adr \tmp1, \phys_l2x0_saved_regs | ||
83 | ldr \tmp1, [\tmp1] | ||
84 | ldr \tmp2, [\tmp1, #L2X0_R_PHY_BASE] | ||
85 | ldr \tmp3, [\tmp2, #L2X0_CTRL] | ||
86 | tst \tmp3, #L2X0_CTRL_EN | ||
87 | bne exit_l2_resume | ||
88 | ldr \tmp3, [\tmp1, #L2X0_R_TAG_LATENCY] | ||
89 | str \tmp3, [\tmp2, #L2X0_TAG_LATENCY_CTRL] | ||
90 | ldr \tmp3, [\tmp1, #L2X0_R_DATA_LATENCY] | ||
91 | str \tmp3, [\tmp2, #L2X0_DATA_LATENCY_CTRL] | ||
92 | ldr \tmp3, [\tmp1, #L2X0_R_PREFETCH_CTRL] | ||
93 | str \tmp3, [\tmp2, #L2X0_PREFETCH_CTRL] | ||
94 | ldr \tmp3, [\tmp1, #L2X0_R_PWR_CTRL] | ||
95 | str \tmp3, [\tmp2, #L2X0_POWER_CTRL] | ||
96 | ldr \tmp3, [\tmp1, #L2X0_R_AUX_CTRL] | ||
97 | str \tmp3, [\tmp2, #L2X0_AUX_CTRL] | ||
98 | mov \tmp3, #L2X0_CTRL_EN | ||
99 | str \tmp3, [\tmp2, #L2X0_CTRL] | ||
100 | exit_l2_resume: | ||
101 | .endm | ||
102 | #else /* CONFIG_CACHE_L2X0 */ | ||
103 | .macro l2_cache_resume, tmp1, tmp2, tmp3, phys_l2x0_saved_regs | ||
104 | .endm | ||
105 | #endif /* CONFIG_CACHE_L2X0 */ | ||
74 | #else | 106 | #else |
107 | void tegra_resume(void); | ||
108 | int tegra_sleep_cpu_finish(unsigned long); | ||
75 | 109 | ||
76 | #ifdef CONFIG_HOTPLUG_CPU | 110 | #ifdef CONFIG_HOTPLUG_CPU |
77 | void tegra20_hotplug_init(void); | 111 | void tegra20_hotplug_init(void); |
@@ -81,5 +115,8 @@ static inline void tegra20_hotplug_init(void) {} | |||
81 | static inline void tegra30_hotplug_init(void) {} | 115 | static inline void tegra30_hotplug_init(void) {} |
82 | #endif | 116 | #endif |
83 | 117 | ||
118 | int tegra30_sleep_cpu_secondary_finish(unsigned long); | ||
119 | void tegra30_tear_down_cpu(void); | ||
120 | |||
84 | #endif | 121 | #endif |
85 | #endif | 122 | #endif |
diff --git a/arch/arm/mach-tegra/tegra20_clocks_data.c b/arch/arm/mach-tegra/tegra20_clocks_data.c index 9615ee39c353..a23a0734e352 100644 --- a/arch/arm/mach-tegra/tegra20_clocks_data.c +++ b/arch/arm/mach-tegra/tegra20_clocks_data.c | |||
@@ -246,11 +246,16 @@ static struct clk_pll_freq_table tegra_pll_d_freq_table[] = { | |||
246 | { 19200000, 216000000, 135, 12, 1, 3}, | 246 | { 19200000, 216000000, 135, 12, 1, 3}, |
247 | { 26000000, 216000000, 216, 26, 1, 4}, | 247 | { 26000000, 216000000, 216, 26, 1, 4}, |
248 | 248 | ||
249 | { 12000000, 297000000, 99, 4, 1, 4 }, | ||
250 | { 12000000, 339000000, 113, 4, 1, 4 }, | ||
251 | |||
249 | { 12000000, 594000000, 594, 12, 1, 8}, | 252 | { 12000000, 594000000, 594, 12, 1, 8}, |
250 | { 13000000, 594000000, 594, 13, 1, 8}, | 253 | { 13000000, 594000000, 594, 13, 1, 8}, |
251 | { 19200000, 594000000, 495, 16, 1, 8}, | 254 | { 19200000, 594000000, 495, 16, 1, 8}, |
252 | { 26000000, 594000000, 594, 26, 1, 8}, | 255 | { 26000000, 594000000, 594, 26, 1, 8}, |
253 | 256 | ||
257 | { 12000000, 616000000, 616, 12, 1, 8}, | ||
258 | |||
254 | { 12000000, 1000000000, 1000, 12, 1, 12}, | 259 | { 12000000, 1000000000, 1000, 12, 1, 12}, |
255 | { 13000000, 1000000000, 1000, 13, 1, 12}, | 260 | { 13000000, 1000000000, 1000, 13, 1, 12}, |
256 | { 19200000, 1000000000, 625, 12, 1, 8}, | 261 | { 19200000, 1000000000, 625, 12, 1, 8}, |
@@ -1036,9 +1041,6 @@ static struct clk_duplicate tegra_clk_duplicates[] = { | |||
1036 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), | 1041 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), |
1037 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), | 1042 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), |
1038 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), | 1043 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), |
1039 | CLK_DUPLICATE("hdmi", "tegradc.0", "hdmi"), | ||
1040 | CLK_DUPLICATE("hdmi", "tegradc.1", "hdmi"), | ||
1041 | CLK_DUPLICATE("host1x", "tegra_grhost", "host1x"), | ||
1042 | CLK_DUPLICATE("2d", "tegra_grhost", "gr2d"), | 1044 | CLK_DUPLICATE("2d", "tegra_grhost", "gr2d"), |
1043 | CLK_DUPLICATE("3d", "tegra_grhost", "gr3d"), | 1045 | CLK_DUPLICATE("3d", "tegra_grhost", "gr3d"), |
1044 | CLK_DUPLICATE("epp", "tegra_grhost", "epp"), | 1046 | CLK_DUPLICATE("epp", "tegra_grhost", "epp"), |
@@ -1051,6 +1053,9 @@ static struct clk_duplicate tegra_clk_duplicates[] = { | |||
1051 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.1", "fast-clk"), | 1053 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.1", "fast-clk"), |
1052 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), | 1054 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), |
1053 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), | 1055 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), |
1056 | CLK_DUPLICATE("pll_p", "tegradc.0", "parent"), | ||
1057 | CLK_DUPLICATE("pll_p", "tegradc.1", "parent"), | ||
1058 | CLK_DUPLICATE("pll_d_out0", "hdmi", "parent"), | ||
1054 | }; | 1059 | }; |
1055 | 1060 | ||
1056 | #define CLK(dev, con, ck) \ | 1061 | #define CLK(dev, con, ck) \ |
diff --git a/arch/arm/mach-tegra/tegra20_speedo.c b/arch/arm/mach-tegra/tegra20_speedo.c new file mode 100644 index 000000000000..fa6eb570623f --- /dev/null +++ b/arch/arm/mach-tegra/tegra20_speedo.c | |||
@@ -0,0 +1,109 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/bug.h> | ||
19 | |||
20 | #include "fuse.h" | ||
21 | |||
22 | #define CPU_SPEEDO_LSBIT 20 | ||
23 | #define CPU_SPEEDO_MSBIT 29 | ||
24 | #define CPU_SPEEDO_REDUND_LSBIT 30 | ||
25 | #define CPU_SPEEDO_REDUND_MSBIT 39 | ||
26 | #define CPU_SPEEDO_REDUND_OFFS (CPU_SPEEDO_REDUND_MSBIT - CPU_SPEEDO_MSBIT) | ||
27 | |||
28 | #define CORE_SPEEDO_LSBIT 40 | ||
29 | #define CORE_SPEEDO_MSBIT 47 | ||
30 | #define CORE_SPEEDO_REDUND_LSBIT 48 | ||
31 | #define CORE_SPEEDO_REDUND_MSBIT 55 | ||
32 | #define CORE_SPEEDO_REDUND_OFFS (CORE_SPEEDO_REDUND_MSBIT - CORE_SPEEDO_MSBIT) | ||
33 | |||
34 | #define SPEEDO_MULT 4 | ||
35 | |||
36 | #define PROCESS_CORNERS_NUM 4 | ||
37 | |||
38 | #define SPEEDO_ID_SELECT_0(rev) ((rev) <= 2) | ||
39 | #define SPEEDO_ID_SELECT_1(sku) \ | ||
40 | (((sku) != 20) && ((sku) != 23) && ((sku) != 24) && \ | ||
41 | ((sku) != 27) && ((sku) != 28)) | ||
42 | |||
43 | enum { | ||
44 | SPEEDO_ID_0, | ||
45 | SPEEDO_ID_1, | ||
46 | SPEEDO_ID_2, | ||
47 | SPEEDO_ID_COUNT, | ||
48 | }; | ||
49 | |||
50 | static const u32 cpu_process_speedos[][PROCESS_CORNERS_NUM] = { | ||
51 | {315, 366, 420, UINT_MAX}, | ||
52 | {303, 368, 419, UINT_MAX}, | ||
53 | {316, 331, 383, UINT_MAX}, | ||
54 | }; | ||
55 | |||
56 | static const u32 core_process_speedos[][PROCESS_CORNERS_NUM] = { | ||
57 | {165, 195, 224, UINT_MAX}, | ||
58 | {165, 195, 224, UINT_MAX}, | ||
59 | {165, 195, 224, UINT_MAX}, | ||
60 | }; | ||
61 | |||
62 | void tegra20_init_speedo_data(void) | ||
63 | { | ||
64 | u32 reg; | ||
65 | u32 val; | ||
66 | int i; | ||
67 | |||
68 | BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != SPEEDO_ID_COUNT); | ||
69 | BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != SPEEDO_ID_COUNT); | ||
70 | |||
71 | if (SPEEDO_ID_SELECT_0(tegra_revision)) | ||
72 | tegra_soc_speedo_id = SPEEDO_ID_0; | ||
73 | else if (SPEEDO_ID_SELECT_1(tegra_sku_id)) | ||
74 | tegra_soc_speedo_id = SPEEDO_ID_1; | ||
75 | else | ||
76 | tegra_soc_speedo_id = SPEEDO_ID_2; | ||
77 | |||
78 | val = 0; | ||
79 | for (i = CPU_SPEEDO_MSBIT; i >= CPU_SPEEDO_LSBIT; i--) { | ||
80 | reg = tegra_spare_fuse(i) | | ||
81 | tegra_spare_fuse(i + CPU_SPEEDO_REDUND_OFFS); | ||
82 | val = (val << 1) | (reg & 0x1); | ||
83 | } | ||
84 | val = val * SPEEDO_MULT; | ||
85 | pr_debug("%s CPU speedo value %u\n", __func__, val); | ||
86 | |||
87 | for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) { | ||
88 | if (val <= cpu_process_speedos[tegra_soc_speedo_id][i]) | ||
89 | break; | ||
90 | } | ||
91 | tegra_cpu_process_id = i; | ||
92 | |||
93 | val = 0; | ||
94 | for (i = CORE_SPEEDO_MSBIT; i >= CORE_SPEEDO_LSBIT; i--) { | ||
95 | reg = tegra_spare_fuse(i) | | ||
96 | tegra_spare_fuse(i + CORE_SPEEDO_REDUND_OFFS); | ||
97 | val = (val << 1) | (reg & 0x1); | ||
98 | } | ||
99 | val = val * SPEEDO_MULT; | ||
100 | pr_debug("%s Core speedo value %u\n", __func__, val); | ||
101 | |||
102 | for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) { | ||
103 | if (val <= core_process_speedos[tegra_soc_speedo_id][i]) | ||
104 | break; | ||
105 | } | ||
106 | tegra_core_process_id = i; | ||
107 | |||
108 | pr_info("Tegra20 Soc Speedo ID %d", tegra_soc_speedo_id); | ||
109 | } | ||
diff --git a/arch/arm/mach-tegra/tegra30_clocks.c b/arch/arm/mach-tegra/tegra30_clocks.c index 000239d68393..efc000e32e1c 100644 --- a/arch/arm/mach-tegra/tegra30_clocks.c +++ b/arch/arm/mach-tegra/tegra30_clocks.c | |||
@@ -31,6 +31,8 @@ | |||
31 | 31 | ||
32 | #include <asm/clkdev.h> | 32 | #include <asm/clkdev.h> |
33 | 33 | ||
34 | #include <mach/powergate.h> | ||
35 | |||
34 | #include "clock.h" | 36 | #include "clock.h" |
35 | #include "fuse.h" | 37 | #include "fuse.h" |
36 | #include "iomap.h" | 38 | #include "iomap.h" |
@@ -309,6 +311,31 @@ | |||
309 | #define CPU_CLOCK(cpu) (0x1 << (8 + cpu)) | 311 | #define CPU_CLOCK(cpu) (0x1 << (8 + cpu)) |
310 | #define CPU_RESET(cpu) (0x1111ul << (cpu)) | 312 | #define CPU_RESET(cpu) (0x1111ul << (cpu)) |
311 | 313 | ||
314 | #define CLK_RESET_CCLK_BURST 0x20 | ||
315 | #define CLK_RESET_CCLK_DIVIDER 0x24 | ||
316 | #define CLK_RESET_PLLX_BASE 0xe0 | ||
317 | #define CLK_RESET_PLLX_MISC 0xe4 | ||
318 | |||
319 | #define CLK_RESET_SOURCE_CSITE 0x1d4 | ||
320 | |||
321 | #define CLK_RESET_CCLK_BURST_POLICY_SHIFT 28 | ||
322 | #define CLK_RESET_CCLK_RUN_POLICY_SHIFT 4 | ||
323 | #define CLK_RESET_CCLK_IDLE_POLICY_SHIFT 0 | ||
324 | #define CLK_RESET_CCLK_IDLE_POLICY 1 | ||
325 | #define CLK_RESET_CCLK_RUN_POLICY 2 | ||
326 | #define CLK_RESET_CCLK_BURST_POLICY_PLLX 8 | ||
327 | |||
328 | #ifdef CONFIG_PM_SLEEP | ||
329 | static struct cpu_clk_suspend_context { | ||
330 | u32 pllx_misc; | ||
331 | u32 pllx_base; | ||
332 | |||
333 | u32 cpu_burst; | ||
334 | u32 clk_csite_src; | ||
335 | u32 cclk_divider; | ||
336 | } tegra30_cpu_clk_sctx; | ||
337 | #endif | ||
338 | |||
312 | /** | 339 | /** |
313 | * Structure defining the fields for USB UTMI clocks Parameters. | 340 | * Structure defining the fields for USB UTMI clocks Parameters. |
314 | */ | 341 | */ |
@@ -791,6 +818,112 @@ struct clk_ops tegra30_twd_ops = { | |||
791 | .recalc_rate = tegra30_twd_clk_recalc_rate, | 818 | .recalc_rate = tegra30_twd_clk_recalc_rate, |
792 | }; | 819 | }; |
793 | 820 | ||
821 | /* bus clock functions */ | ||
822 | static int tegra30_bus_clk_is_enabled(struct clk_hw *hw) | ||
823 | { | ||
824 | struct clk_tegra *c = to_clk_tegra(hw); | ||
825 | u32 val = clk_readl(c->reg); | ||
826 | |||
827 | c->state = ((val >> c->reg_shift) & BUS_CLK_DISABLE) ? OFF : ON; | ||
828 | return c->state; | ||
829 | } | ||
830 | |||
831 | static int tegra30_bus_clk_enable(struct clk_hw *hw) | ||
832 | { | ||
833 | struct clk_tegra *c = to_clk_tegra(hw); | ||
834 | u32 val; | ||
835 | |||
836 | val = clk_readl(c->reg); | ||
837 | val &= ~(BUS_CLK_DISABLE << c->reg_shift); | ||
838 | clk_writel(val, c->reg); | ||
839 | |||
840 | return 0; | ||
841 | } | ||
842 | |||
843 | static void tegra30_bus_clk_disable(struct clk_hw *hw) | ||
844 | { | ||
845 | struct clk_tegra *c = to_clk_tegra(hw); | ||
846 | u32 val; | ||
847 | |||
848 | val = clk_readl(c->reg); | ||
849 | val |= BUS_CLK_DISABLE << c->reg_shift; | ||
850 | clk_writel(val, c->reg); | ||
851 | } | ||
852 | |||
853 | static unsigned long tegra30_bus_clk_recalc_rate(struct clk_hw *hw, | ||
854 | unsigned long prate) | ||
855 | { | ||
856 | struct clk_tegra *c = to_clk_tegra(hw); | ||
857 | u32 val = clk_readl(c->reg); | ||
858 | u64 rate = prate; | ||
859 | |||
860 | c->div = ((val >> c->reg_shift) & BUS_CLK_DIV_MASK) + 1; | ||
861 | c->mul = 1; | ||
862 | |||
863 | if (c->mul != 0 && c->div != 0) { | ||
864 | rate *= c->mul; | ||
865 | rate += c->div - 1; /* round up */ | ||
866 | do_div(rate, c->div); | ||
867 | } | ||
868 | return rate; | ||
869 | } | ||
870 | |||
871 | static int tegra30_bus_clk_set_rate(struct clk_hw *hw, unsigned long rate, | ||
872 | unsigned long parent_rate) | ||
873 | { | ||
874 | struct clk_tegra *c = to_clk_tegra(hw); | ||
875 | int ret = -EINVAL; | ||
876 | u32 val; | ||
877 | int i; | ||
878 | |||
879 | val = clk_readl(c->reg); | ||
880 | for (i = 1; i <= 4; i++) { | ||
881 | if (rate == parent_rate / i) { | ||
882 | val &= ~(BUS_CLK_DIV_MASK << c->reg_shift); | ||
883 | val |= (i - 1) << c->reg_shift; | ||
884 | clk_writel(val, c->reg); | ||
885 | c->div = i; | ||
886 | c->mul = 1; | ||
887 | ret = 0; | ||
888 | break; | ||
889 | } | ||
890 | } | ||
891 | |||
892 | return ret; | ||
893 | } | ||
894 | |||
895 | static long tegra30_bus_clk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
896 | unsigned long *prate) | ||
897 | { | ||
898 | unsigned long parent_rate = *prate; | ||
899 | s64 divider; | ||
900 | |||
901 | if (rate >= parent_rate) | ||
902 | return parent_rate; | ||
903 | |||
904 | divider = parent_rate; | ||
905 | divider += rate - 1; | ||
906 | do_div(divider, rate); | ||
907 | |||
908 | if (divider < 0) | ||
909 | return divider; | ||
910 | |||
911 | if (divider > 4) | ||
912 | divider = 4; | ||
913 | do_div(parent_rate, divider); | ||
914 | |||
915 | return parent_rate; | ||
916 | } | ||
917 | |||
918 | struct clk_ops tegra30_bus_ops = { | ||
919 | .is_enabled = tegra30_bus_clk_is_enabled, | ||
920 | .enable = tegra30_bus_clk_enable, | ||
921 | .disable = tegra30_bus_clk_disable, | ||
922 | .set_rate = tegra30_bus_clk_set_rate, | ||
923 | .round_rate = tegra30_bus_clk_round_rate, | ||
924 | .recalc_rate = tegra30_bus_clk_recalc_rate, | ||
925 | }; | ||
926 | |||
794 | /* Blink output functions */ | 927 | /* Blink output functions */ |
795 | static int tegra30_blink_clk_is_enabled(struct clk_hw *hw) | 928 | static int tegra30_blink_clk_is_enabled(struct clk_hw *hw) |
796 | { | 929 | { |
@@ -2280,12 +2413,93 @@ static void tegra30_disable_cpu_clock(u32 cpu) | |||
2280 | reg_clk_base + TEGRA_CLK_RST_CONTROLLER_CLK_CPU_CMPLX); | 2413 | reg_clk_base + TEGRA_CLK_RST_CONTROLLER_CLK_CPU_CMPLX); |
2281 | } | 2414 | } |
2282 | 2415 | ||
2416 | #ifdef CONFIG_PM_SLEEP | ||
2417 | static bool tegra30_cpu_rail_off_ready(void) | ||
2418 | { | ||
2419 | unsigned int cpu_rst_status; | ||
2420 | int cpu_pwr_status; | ||
2421 | |||
2422 | cpu_rst_status = readl(reg_clk_base + | ||
2423 | TEGRA30_CLK_RST_CONTROLLER_CPU_CMPLX_STATUS); | ||
2424 | cpu_pwr_status = tegra_powergate_is_powered(TEGRA_POWERGATE_CPU1) || | ||
2425 | tegra_powergate_is_powered(TEGRA_POWERGATE_CPU2) || | ||
2426 | tegra_powergate_is_powered(TEGRA_POWERGATE_CPU3); | ||
2427 | |||
2428 | if (((cpu_rst_status & 0xE) != 0xE) || cpu_pwr_status) | ||
2429 | return false; | ||
2430 | |||
2431 | return true; | ||
2432 | } | ||
2433 | |||
2434 | static void tegra30_cpu_clock_suspend(void) | ||
2435 | { | ||
2436 | /* switch coresite to clk_m, save off original source */ | ||
2437 | tegra30_cpu_clk_sctx.clk_csite_src = | ||
2438 | readl(reg_clk_base + CLK_RESET_SOURCE_CSITE); | ||
2439 | writel(3<<30, reg_clk_base + CLK_RESET_SOURCE_CSITE); | ||
2440 | |||
2441 | tegra30_cpu_clk_sctx.cpu_burst = | ||
2442 | readl(reg_clk_base + CLK_RESET_CCLK_BURST); | ||
2443 | tegra30_cpu_clk_sctx.pllx_base = | ||
2444 | readl(reg_clk_base + CLK_RESET_PLLX_BASE); | ||
2445 | tegra30_cpu_clk_sctx.pllx_misc = | ||
2446 | readl(reg_clk_base + CLK_RESET_PLLX_MISC); | ||
2447 | tegra30_cpu_clk_sctx.cclk_divider = | ||
2448 | readl(reg_clk_base + CLK_RESET_CCLK_DIVIDER); | ||
2449 | } | ||
2450 | |||
2451 | static void tegra30_cpu_clock_resume(void) | ||
2452 | { | ||
2453 | unsigned int reg, policy; | ||
2454 | |||
2455 | /* Is CPU complex already running on PLLX? */ | ||
2456 | reg = readl(reg_clk_base + CLK_RESET_CCLK_BURST); | ||
2457 | policy = (reg >> CLK_RESET_CCLK_BURST_POLICY_SHIFT) & 0xF; | ||
2458 | |||
2459 | if (policy == CLK_RESET_CCLK_IDLE_POLICY) | ||
2460 | reg = (reg >> CLK_RESET_CCLK_IDLE_POLICY_SHIFT) & 0xF; | ||
2461 | else if (policy == CLK_RESET_CCLK_RUN_POLICY) | ||
2462 | reg = (reg >> CLK_RESET_CCLK_RUN_POLICY_SHIFT) & 0xF; | ||
2463 | else | ||
2464 | BUG(); | ||
2465 | |||
2466 | if (reg != CLK_RESET_CCLK_BURST_POLICY_PLLX) { | ||
2467 | /* restore PLLX settings if CPU is on different PLL */ | ||
2468 | writel(tegra30_cpu_clk_sctx.pllx_misc, | ||
2469 | reg_clk_base + CLK_RESET_PLLX_MISC); | ||
2470 | writel(tegra30_cpu_clk_sctx.pllx_base, | ||
2471 | reg_clk_base + CLK_RESET_PLLX_BASE); | ||
2472 | |||
2473 | /* wait for PLL stabilization if PLLX was enabled */ | ||
2474 | if (tegra30_cpu_clk_sctx.pllx_base & (1 << 30)) | ||
2475 | udelay(300); | ||
2476 | } | ||
2477 | |||
2478 | /* | ||
2479 | * Restore original burst policy setting for calls resulting from CPU | ||
2480 | * LP2 in idle or system suspend. | ||
2481 | */ | ||
2482 | writel(tegra30_cpu_clk_sctx.cclk_divider, | ||
2483 | reg_clk_base + CLK_RESET_CCLK_DIVIDER); | ||
2484 | writel(tegra30_cpu_clk_sctx.cpu_burst, | ||
2485 | reg_clk_base + CLK_RESET_CCLK_BURST); | ||
2486 | |||
2487 | writel(tegra30_cpu_clk_sctx.clk_csite_src, | ||
2488 | reg_clk_base + CLK_RESET_SOURCE_CSITE); | ||
2489 | } | ||
2490 | #endif | ||
2491 | |||
2283 | static struct tegra_cpu_car_ops tegra30_cpu_car_ops = { | 2492 | static struct tegra_cpu_car_ops tegra30_cpu_car_ops = { |
2284 | .wait_for_reset = tegra30_wait_cpu_in_reset, | 2493 | .wait_for_reset = tegra30_wait_cpu_in_reset, |
2285 | .put_in_reset = tegra30_put_cpu_in_reset, | 2494 | .put_in_reset = tegra30_put_cpu_in_reset, |
2286 | .out_of_reset = tegra30_cpu_out_of_reset, | 2495 | .out_of_reset = tegra30_cpu_out_of_reset, |
2287 | .enable_clock = tegra30_enable_cpu_clock, | 2496 | .enable_clock = tegra30_enable_cpu_clock, |
2288 | .disable_clock = tegra30_disable_cpu_clock, | 2497 | .disable_clock = tegra30_disable_cpu_clock, |
2498 | #ifdef CONFIG_PM_SLEEP | ||
2499 | .rail_off_ready = tegra30_cpu_rail_off_ready, | ||
2500 | .suspend = tegra30_cpu_clock_suspend, | ||
2501 | .resume = tegra30_cpu_clock_resume, | ||
2502 | #endif | ||
2289 | }; | 2503 | }; |
2290 | 2504 | ||
2291 | void __init tegra30_cpu_car_ops_init(void) | 2505 | void __init tegra30_cpu_car_ops_init(void) |
diff --git a/arch/arm/mach-tegra/tegra30_clocks.h b/arch/arm/mach-tegra/tegra30_clocks.h index f2f88fef6b8b..7a34adb2f72d 100644 --- a/arch/arm/mach-tegra/tegra30_clocks.h +++ b/arch/arm/mach-tegra/tegra30_clocks.h | |||
@@ -34,6 +34,7 @@ extern struct clk_ops tegra_clk_out_ops; | |||
34 | extern struct clk_ops tegra30_super_ops; | 34 | extern struct clk_ops tegra30_super_ops; |
35 | extern struct clk_ops tegra30_blink_clk_ops; | 35 | extern struct clk_ops tegra30_blink_clk_ops; |
36 | extern struct clk_ops tegra30_twd_ops; | 36 | extern struct clk_ops tegra30_twd_ops; |
37 | extern struct clk_ops tegra30_bus_ops; | ||
37 | extern struct clk_ops tegra30_periph_clk_ops; | 38 | extern struct clk_ops tegra30_periph_clk_ops; |
38 | extern struct clk_ops tegra30_dsib_clk_ops; | 39 | extern struct clk_ops tegra30_dsib_clk_ops; |
39 | extern struct clk_ops tegra_nand_clk_ops; | 40 | extern struct clk_ops tegra_nand_clk_ops; |
diff --git a/arch/arm/mach-tegra/tegra30_clocks_data.c b/arch/arm/mach-tegra/tegra30_clocks_data.c index 3d2e5532a9ea..6942c7add3bb 100644 --- a/arch/arm/mach-tegra/tegra30_clocks_data.c +++ b/arch/arm/mach-tegra/tegra30_clocks_data.c | |||
@@ -711,6 +711,50 @@ static struct clk tegra_clk_sclk = { | |||
711 | .num_parents = ARRAY_SIZE(mux_sclk), | 711 | .num_parents = ARRAY_SIZE(mux_sclk), |
712 | }; | 712 | }; |
713 | 713 | ||
714 | static const char *tegra_hclk_parent_names[] = { | ||
715 | "tegra_sclk", | ||
716 | }; | ||
717 | |||
718 | static struct clk *tegra_hclk_parents[] = { | ||
719 | &tegra_clk_sclk, | ||
720 | }; | ||
721 | |||
722 | static struct clk tegra_hclk; | ||
723 | static struct clk_tegra tegra_hclk_hw = { | ||
724 | .hw = { | ||
725 | .clk = &tegra_hclk, | ||
726 | }, | ||
727 | .flags = DIV_BUS, | ||
728 | .reg = 0x30, | ||
729 | .reg_shift = 4, | ||
730 | .max_rate = 378000000, | ||
731 | .min_rate = 12000000, | ||
732 | }; | ||
733 | DEFINE_CLK_TEGRA(hclk, 0, &tegra30_bus_ops, 0, tegra_hclk_parent_names, | ||
734 | tegra_hclk_parents, &tegra_clk_sclk); | ||
735 | |||
736 | static const char *tegra_pclk_parent_names[] = { | ||
737 | "tegra_hclk", | ||
738 | }; | ||
739 | |||
740 | static struct clk *tegra_pclk_parents[] = { | ||
741 | &tegra_hclk, | ||
742 | }; | ||
743 | |||
744 | static struct clk tegra_pclk; | ||
745 | static struct clk_tegra tegra_pclk_hw = { | ||
746 | .hw = { | ||
747 | .clk = &tegra_pclk, | ||
748 | }, | ||
749 | .flags = DIV_BUS, | ||
750 | .reg = 0x30, | ||
751 | .reg_shift = 0, | ||
752 | .max_rate = 167000000, | ||
753 | .min_rate = 12000000, | ||
754 | }; | ||
755 | DEFINE_CLK_TEGRA(pclk, 0, &tegra30_bus_ops, 0, tegra_pclk_parent_names, | ||
756 | tegra_pclk_parents, &tegra_hclk); | ||
757 | |||
714 | static const char *mux_blink[] = { | 758 | static const char *mux_blink[] = { |
715 | "clk_32k", | 759 | "clk_32k", |
716 | }; | 760 | }; |
@@ -1254,8 +1298,6 @@ struct clk_duplicate tegra_clk_duplicates[] = { | |||
1254 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), | 1298 | CLK_DUPLICATE("usbd", "utmip-pad", NULL), |
1255 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), | 1299 | CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL), |
1256 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), | 1300 | CLK_DUPLICATE("usbd", "tegra-otg", NULL), |
1257 | CLK_DUPLICATE("hdmi", "tegradc.0", "hdmi"), | ||
1258 | CLK_DUPLICATE("hdmi", "tegradc.1", "hdmi"), | ||
1259 | CLK_DUPLICATE("dsib", "tegradc.0", "dsib"), | 1301 | CLK_DUPLICATE("dsib", "tegradc.0", "dsib"), |
1260 | CLK_DUPLICATE("dsia", "tegradc.1", "dsia"), | 1302 | CLK_DUPLICATE("dsia", "tegradc.1", "dsia"), |
1261 | CLK_DUPLICATE("bsev", "tegra-avp", "bsev"), | 1303 | CLK_DUPLICATE("bsev", "tegra-avp", "bsev"), |
@@ -1293,6 +1335,9 @@ struct clk_duplicate tegra_clk_duplicates[] = { | |||
1293 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), | 1335 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.2", "fast-clk"), |
1294 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), | 1336 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.3", "fast-clk"), |
1295 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.4", "fast-clk"), | 1337 | CLK_DUPLICATE("pll_p_out3", "tegra-i2c.4", "fast-clk"), |
1338 | CLK_DUPLICATE("pll_p", "tegradc.0", "parent"), | ||
1339 | CLK_DUPLICATE("pll_p", "tegradc.1", "parent"), | ||
1340 | CLK_DUPLICATE("pll_d2_out0", "hdmi", "parent"), | ||
1296 | }; | 1341 | }; |
1297 | 1342 | ||
1298 | struct clk *tegra_ptr_clks[] = { | 1343 | struct clk *tegra_ptr_clks[] = { |
@@ -1325,6 +1370,8 @@ struct clk *tegra_ptr_clks[] = { | |||
1325 | &tegra_cml1, | 1370 | &tegra_cml1, |
1326 | &tegra_pciex, | 1371 | &tegra_pciex, |
1327 | &tegra_clk_sclk, | 1372 | &tegra_clk_sclk, |
1373 | &tegra_hclk, | ||
1374 | &tegra_pclk, | ||
1328 | &tegra_clk_blink, | 1375 | &tegra_clk_blink, |
1329 | &tegra30_clk_twd, | 1376 | &tegra30_clk_twd, |
1330 | }; | 1377 | }; |
diff --git a/arch/arm/mach-tegra/tegra30_speedo.c b/arch/arm/mach-tegra/tegra30_speedo.c new file mode 100644 index 000000000000..125cb16424a6 --- /dev/null +++ b/arch/arm/mach-tegra/tegra30_speedo.c | |||
@@ -0,0 +1,292 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/bug.h> | ||
19 | |||
20 | #include "fuse.h" | ||
21 | |||
22 | #define CORE_PROCESS_CORNERS_NUM 1 | ||
23 | #define CPU_PROCESS_CORNERS_NUM 6 | ||
24 | |||
25 | #define FUSE_SPEEDO_CALIB_0 0x114 | ||
26 | #define FUSE_PACKAGE_INFO 0X1FC | ||
27 | #define FUSE_TEST_PROG_VER 0X128 | ||
28 | |||
29 | #define G_SPEEDO_BIT_MINUS1 58 | ||
30 | #define G_SPEEDO_BIT_MINUS1_R 59 | ||
31 | #define G_SPEEDO_BIT_MINUS2 60 | ||
32 | #define G_SPEEDO_BIT_MINUS2_R 61 | ||
33 | #define LP_SPEEDO_BIT_MINUS1 62 | ||
34 | #define LP_SPEEDO_BIT_MINUS1_R 63 | ||
35 | #define LP_SPEEDO_BIT_MINUS2 64 | ||
36 | #define LP_SPEEDO_BIT_MINUS2_R 65 | ||
37 | |||
38 | enum { | ||
39 | THRESHOLD_INDEX_0, | ||
40 | THRESHOLD_INDEX_1, | ||
41 | THRESHOLD_INDEX_2, | ||
42 | THRESHOLD_INDEX_3, | ||
43 | THRESHOLD_INDEX_4, | ||
44 | THRESHOLD_INDEX_5, | ||
45 | THRESHOLD_INDEX_6, | ||
46 | THRESHOLD_INDEX_7, | ||
47 | THRESHOLD_INDEX_8, | ||
48 | THRESHOLD_INDEX_9, | ||
49 | THRESHOLD_INDEX_10, | ||
50 | THRESHOLD_INDEX_11, | ||
51 | THRESHOLD_INDEX_COUNT, | ||
52 | }; | ||
53 | |||
54 | static const u32 core_process_speedos[][CORE_PROCESS_CORNERS_NUM] = { | ||
55 | {180}, | ||
56 | {170}, | ||
57 | {195}, | ||
58 | {180}, | ||
59 | {168}, | ||
60 | {192}, | ||
61 | {180}, | ||
62 | {170}, | ||
63 | {195}, | ||
64 | {180}, | ||
65 | {180}, | ||
66 | {180}, | ||
67 | }; | ||
68 | |||
69 | static const u32 cpu_process_speedos[][CPU_PROCESS_CORNERS_NUM] = { | ||
70 | {306, 338, 360, 376, UINT_MAX}, | ||
71 | {295, 336, 358, 375, UINT_MAX}, | ||
72 | {325, 325, 358, 375, UINT_MAX}, | ||
73 | {325, 325, 358, 375, UINT_MAX}, | ||
74 | {292, 324, 348, 364, UINT_MAX}, | ||
75 | {324, 324, 348, 364, UINT_MAX}, | ||
76 | {324, 324, 348, 364, UINT_MAX}, | ||
77 | {295, 336, 358, 375, UINT_MAX}, | ||
78 | {358, 358, 358, 358, 397, UINT_MAX}, | ||
79 | {364, 364, 364, 364, 397, UINT_MAX}, | ||
80 | {295, 336, 358, 375, 391, UINT_MAX}, | ||
81 | {295, 336, 358, 375, 391, UINT_MAX}, | ||
82 | }; | ||
83 | |||
84 | static int threshold_index; | ||
85 | static int package_id; | ||
86 | |||
87 | static void fuse_speedo_calib(u32 *speedo_g, u32 *speedo_lp) | ||
88 | { | ||
89 | u32 reg; | ||
90 | int ate_ver; | ||
91 | int bit_minus1; | ||
92 | int bit_minus2; | ||
93 | |||
94 | reg = tegra_fuse_readl(FUSE_SPEEDO_CALIB_0); | ||
95 | |||
96 | *speedo_lp = (reg & 0xFFFF) * 4; | ||
97 | *speedo_g = ((reg >> 16) & 0xFFFF) * 4; | ||
98 | |||
99 | ate_ver = tegra_fuse_readl(FUSE_TEST_PROG_VER); | ||
100 | pr_info("%s: ATE prog ver %d.%d\n", __func__, ate_ver/10, ate_ver%10); | ||
101 | |||
102 | if (ate_ver >= 26) { | ||
103 | bit_minus1 = tegra_spare_fuse(LP_SPEEDO_BIT_MINUS1); | ||
104 | bit_minus1 |= tegra_spare_fuse(LP_SPEEDO_BIT_MINUS1_R); | ||
105 | bit_minus2 = tegra_spare_fuse(LP_SPEEDO_BIT_MINUS2); | ||
106 | bit_minus2 |= tegra_spare_fuse(LP_SPEEDO_BIT_MINUS2_R); | ||
107 | *speedo_lp |= (bit_minus1 << 1) | bit_minus2; | ||
108 | |||
109 | bit_minus1 = tegra_spare_fuse(G_SPEEDO_BIT_MINUS1); | ||
110 | bit_minus1 |= tegra_spare_fuse(G_SPEEDO_BIT_MINUS1_R); | ||
111 | bit_minus2 = tegra_spare_fuse(G_SPEEDO_BIT_MINUS2); | ||
112 | bit_minus2 |= tegra_spare_fuse(G_SPEEDO_BIT_MINUS2_R); | ||
113 | *speedo_g |= (bit_minus1 << 1) | bit_minus2; | ||
114 | } else { | ||
115 | *speedo_lp |= 0x3; | ||
116 | *speedo_g |= 0x3; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | static void rev_sku_to_speedo_ids(int rev, int sku) | ||
121 | { | ||
122 | switch (rev) { | ||
123 | case TEGRA_REVISION_A01: | ||
124 | tegra_cpu_speedo_id = 0; | ||
125 | tegra_soc_speedo_id = 0; | ||
126 | threshold_index = THRESHOLD_INDEX_0; | ||
127 | break; | ||
128 | case TEGRA_REVISION_A02: | ||
129 | case TEGRA_REVISION_A03: | ||
130 | switch (sku) { | ||
131 | case 0x87: | ||
132 | case 0x82: | ||
133 | tegra_cpu_speedo_id = 1; | ||
134 | tegra_soc_speedo_id = 1; | ||
135 | threshold_index = THRESHOLD_INDEX_1; | ||
136 | break; | ||
137 | case 0x81: | ||
138 | switch (package_id) { | ||
139 | case 1: | ||
140 | tegra_cpu_speedo_id = 2; | ||
141 | tegra_soc_speedo_id = 2; | ||
142 | threshold_index = THRESHOLD_INDEX_2; | ||
143 | break; | ||
144 | case 2: | ||
145 | tegra_cpu_speedo_id = 4; | ||
146 | tegra_soc_speedo_id = 1; | ||
147 | threshold_index = THRESHOLD_INDEX_7; | ||
148 | break; | ||
149 | default: | ||
150 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
151 | BUG(); | ||
152 | break; | ||
153 | } | ||
154 | break; | ||
155 | case 0x80: | ||
156 | switch (package_id) { | ||
157 | case 1: | ||
158 | tegra_cpu_speedo_id = 5; | ||
159 | tegra_soc_speedo_id = 2; | ||
160 | threshold_index = THRESHOLD_INDEX_8; | ||
161 | break; | ||
162 | case 2: | ||
163 | tegra_cpu_speedo_id = 6; | ||
164 | tegra_soc_speedo_id = 2; | ||
165 | threshold_index = THRESHOLD_INDEX_9; | ||
166 | break; | ||
167 | default: | ||
168 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
169 | BUG(); | ||
170 | break; | ||
171 | } | ||
172 | break; | ||
173 | case 0x83: | ||
174 | switch (package_id) { | ||
175 | case 1: | ||
176 | tegra_cpu_speedo_id = 7; | ||
177 | tegra_soc_speedo_id = 1; | ||
178 | threshold_index = THRESHOLD_INDEX_10; | ||
179 | break; | ||
180 | case 2: | ||
181 | tegra_cpu_speedo_id = 3; | ||
182 | tegra_soc_speedo_id = 2; | ||
183 | threshold_index = THRESHOLD_INDEX_3; | ||
184 | break; | ||
185 | default: | ||
186 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
187 | BUG(); | ||
188 | break; | ||
189 | } | ||
190 | break; | ||
191 | case 0x8F: | ||
192 | tegra_cpu_speedo_id = 8; | ||
193 | tegra_soc_speedo_id = 1; | ||
194 | threshold_index = THRESHOLD_INDEX_11; | ||
195 | break; | ||
196 | case 0x08: | ||
197 | tegra_cpu_speedo_id = 1; | ||
198 | tegra_soc_speedo_id = 1; | ||
199 | threshold_index = THRESHOLD_INDEX_4; | ||
200 | break; | ||
201 | case 0x02: | ||
202 | tegra_cpu_speedo_id = 2; | ||
203 | tegra_soc_speedo_id = 2; | ||
204 | threshold_index = THRESHOLD_INDEX_5; | ||
205 | break; | ||
206 | case 0x04: | ||
207 | tegra_cpu_speedo_id = 3; | ||
208 | tegra_soc_speedo_id = 2; | ||
209 | threshold_index = THRESHOLD_INDEX_6; | ||
210 | break; | ||
211 | case 0: | ||
212 | switch (package_id) { | ||
213 | case 1: | ||
214 | tegra_cpu_speedo_id = 2; | ||
215 | tegra_soc_speedo_id = 2; | ||
216 | threshold_index = THRESHOLD_INDEX_2; | ||
217 | break; | ||
218 | case 2: | ||
219 | tegra_cpu_speedo_id = 3; | ||
220 | tegra_soc_speedo_id = 2; | ||
221 | threshold_index = THRESHOLD_INDEX_3; | ||
222 | break; | ||
223 | default: | ||
224 | pr_err("Tegra30: Unknown pkg %d\n", package_id); | ||
225 | BUG(); | ||
226 | break; | ||
227 | } | ||
228 | break; | ||
229 | default: | ||
230 | pr_warn("Tegra30: Unknown SKU %d\n", sku); | ||
231 | tegra_cpu_speedo_id = 0; | ||
232 | tegra_soc_speedo_id = 0; | ||
233 | threshold_index = THRESHOLD_INDEX_0; | ||
234 | break; | ||
235 | } | ||
236 | break; | ||
237 | default: | ||
238 | pr_warn("Tegra30: Unknown chip rev %d\n", rev); | ||
239 | tegra_cpu_speedo_id = 0; | ||
240 | tegra_soc_speedo_id = 0; | ||
241 | threshold_index = THRESHOLD_INDEX_0; | ||
242 | break; | ||
243 | } | ||
244 | } | ||
245 | |||
246 | void tegra30_init_speedo_data(void) | ||
247 | { | ||
248 | u32 cpu_speedo_val; | ||
249 | u32 core_speedo_val; | ||
250 | int i; | ||
251 | |||
252 | BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != | ||
253 | THRESHOLD_INDEX_COUNT); | ||
254 | BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != | ||
255 | THRESHOLD_INDEX_COUNT); | ||
256 | |||
257 | package_id = tegra_fuse_readl(FUSE_PACKAGE_INFO) & 0x0F; | ||
258 | |||
259 | rev_sku_to_speedo_ids(tegra_revision, tegra_sku_id); | ||
260 | fuse_speedo_calib(&cpu_speedo_val, &core_speedo_val); | ||
261 | pr_debug("%s CPU speedo value %u\n", __func__, cpu_speedo_val); | ||
262 | pr_debug("%s Core speedo value %u\n", __func__, core_speedo_val); | ||
263 | |||
264 | for (i = 0; i < CPU_PROCESS_CORNERS_NUM; i++) { | ||
265 | if (cpu_speedo_val < cpu_process_speedos[threshold_index][i]) | ||
266 | break; | ||
267 | } | ||
268 | tegra_cpu_process_id = i - 1; | ||
269 | |||
270 | if (tegra_cpu_process_id == -1) { | ||
271 | pr_warn("Tegra30: CPU speedo value %3d out of range", | ||
272 | cpu_speedo_val); | ||
273 | tegra_cpu_process_id = 0; | ||
274 | tegra_cpu_speedo_id = 1; | ||
275 | } | ||
276 | |||
277 | for (i = 0; i < CORE_PROCESS_CORNERS_NUM; i++) { | ||
278 | if (core_speedo_val < core_process_speedos[threshold_index][i]) | ||
279 | break; | ||
280 | } | ||
281 | tegra_core_process_id = i - 1; | ||
282 | |||
283 | if (tegra_core_process_id == -1) { | ||
284 | pr_warn("Tegra30: CORE speedo value %3d out of range", | ||
285 | core_speedo_val); | ||
286 | tegra_core_process_id = 0; | ||
287 | tegra_soc_speedo_id = 1; | ||
288 | } | ||
289 | |||
290 | pr_info("Tegra30: CPU Speedo ID %d, Soc Speedo ID %d", | ||
291 | tegra_cpu_speedo_id, tegra_soc_speedo_id); | ||
292 | } | ||
diff --git a/arch/arm/mach-tegra/tegra_cpu_car.h b/arch/arm/mach-tegra/tegra_cpu_car.h index 30d063ad2bef..9764d31032b7 100644 --- a/arch/arm/mach-tegra/tegra_cpu_car.h +++ b/arch/arm/mach-tegra/tegra_cpu_car.h | |||
@@ -30,6 +30,12 @@ | |||
30 | * CPU clock un-gate | 30 | * CPU clock un-gate |
31 | * disable_clock: | 31 | * disable_clock: |
32 | * CPU clock gate | 32 | * CPU clock gate |
33 | * rail_off_ready: | ||
34 | * CPU is ready for rail off | ||
35 | * suspend: | ||
36 | * save the clock settings when CPU go into low-power state | ||
37 | * resume: | ||
38 | * restore the clock settings when CPU exit low-power state | ||
33 | */ | 39 | */ |
34 | struct tegra_cpu_car_ops { | 40 | struct tegra_cpu_car_ops { |
35 | void (*wait_for_reset)(u32 cpu); | 41 | void (*wait_for_reset)(u32 cpu); |
@@ -37,6 +43,11 @@ struct tegra_cpu_car_ops { | |||
37 | void (*out_of_reset)(u32 cpu); | 43 | void (*out_of_reset)(u32 cpu); |
38 | void (*enable_clock)(u32 cpu); | 44 | void (*enable_clock)(u32 cpu); |
39 | void (*disable_clock)(u32 cpu); | 45 | void (*disable_clock)(u32 cpu); |
46 | #ifdef CONFIG_PM_SLEEP | ||
47 | bool (*rail_off_ready)(void); | ||
48 | void (*suspend)(void); | ||
49 | void (*resume)(void); | ||
50 | #endif | ||
40 | }; | 51 | }; |
41 | 52 | ||
42 | extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; | 53 | extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; |
@@ -81,6 +92,32 @@ static inline void tegra_disable_cpu_clock(u32 cpu) | |||
81 | tegra_cpu_car_ops->disable_clock(cpu); | 92 | tegra_cpu_car_ops->disable_clock(cpu); |
82 | } | 93 | } |
83 | 94 | ||
95 | #ifdef CONFIG_PM_SLEEP | ||
96 | static inline bool tegra_cpu_rail_off_ready(void) | ||
97 | { | ||
98 | if (WARN_ON(!tegra_cpu_car_ops->rail_off_ready)) | ||
99 | return false; | ||
100 | |||
101 | return tegra_cpu_car_ops->rail_off_ready(); | ||
102 | } | ||
103 | |||
104 | static inline void tegra_cpu_clock_suspend(void) | ||
105 | { | ||
106 | if (WARN_ON(!tegra_cpu_car_ops->suspend)) | ||
107 | return; | ||
108 | |||
109 | tegra_cpu_car_ops->suspend(); | ||
110 | } | ||
111 | |||
112 | static inline void tegra_cpu_clock_resume(void) | ||
113 | { | ||
114 | if (WARN_ON(!tegra_cpu_car_ops->resume)) | ||
115 | return; | ||
116 | |||
117 | tegra_cpu_car_ops->resume(); | ||
118 | } | ||
119 | #endif | ||
120 | |||
84 | void tegra20_cpu_car_ops_init(void); | 121 | void tegra20_cpu_car_ops_init(void); |
85 | void tegra30_cpu_car_ops_init(void); | 122 | void tegra30_cpu_car_ops_init(void); |
86 | 123 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 2d16b1dd5fec..e6ad161449da 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -1,6 +1,5 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * Copyright (C) 2008-2009 ST-Ericsson | 2 | * Copyright (C) 2008-2012 ST-Ericsson |
4 | * | 3 | * |
5 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | 4 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> |
6 | * | 5 | * |
@@ -765,6 +764,16 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
765 | .init_late = ux500_init_late, | 764 | .init_late = ux500_init_late, |
766 | MACHINE_END | 765 | MACHINE_END |
767 | 766 | ||
767 | MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520") | ||
768 | .atag_offset = 0x100, | ||
769 | .map_io = u8500_map_io, | ||
770 | .init_irq = ux500_init_irq, | ||
771 | .timer = &ux500_timer, | ||
772 | .handle_irq = gic_handle_irq, | ||
773 | .init_machine = mop500_init_machine, | ||
774 | .init_late = ux500_init_late, | ||
775 | MACHINE_END | ||
776 | |||
768 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | 777 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") |
769 | .atag_offset = 0x100, | 778 | .atag_offset = 0x100, |
770 | .smp = smp_ops(ux500_smp_ops), | 779 | .smp = smp_ops(ux500_smp_ops), |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 91f028c1264a..5c5ad70e48be 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mfd/abx500/ab8500.h> | 19 | #include <linux/mfd/abx500/ab8500.h> |
20 | #include <linux/platform_data/usb-musb-ux500.h> | 20 | #include <linux/platform_data/usb-musb-ux500.h> |
21 | #include <linux/platform_data/pinctrl-nomadik.h> | 21 | #include <linux/platform_data/pinctrl-nomadik.h> |
22 | #include <linux/random.h> | ||
22 | 23 | ||
23 | #include <asm/pmu.h> | 24 | #include <asm/pmu.h> |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
@@ -187,6 +188,8 @@ static const char *db8500_read_soc_id(void) | |||
187 | { | 188 | { |
188 | void __iomem *uid = __io_address(U8500_BB_UID_BASE); | 189 | void __iomem *uid = __io_address(U8500_BB_UID_BASE); |
189 | 190 | ||
191 | /* Throw these device-specific numbers into the entropy pool */ | ||
192 | add_device_randomness(uid, 0x14); | ||
190 | return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", | 193 | return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", |
191 | readl((u32 *)uid+1), | 194 | readl((u32 *)uid+1), |
192 | readl((u32 *)uid+1), readl((u32 *)uid+2), | 195 | readl((u32 *)uid+1), readl((u32 *)uid+2), |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 5b5c1eeb5b5c..5d5929450366 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/amba/mmci.h> | 32 | #include <linux/amba/mmci.h> |
33 | #include <linux/amba/pl022.h> | 33 | #include <linux/amba/pl022.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/irqchip/versatile-fpga.h> | ||
35 | #include <linux/gfp.h> | 36 | #include <linux/gfp.h> |
36 | #include <linux/clkdev.h> | 37 | #include <linux/clkdev.h> |
37 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
@@ -51,7 +52,6 @@ | |||
51 | #include <asm/hardware/timer-sp.h> | 52 | #include <asm/hardware/timer-sp.h> |
52 | 53 | ||
53 | #include <plat/clcd.h> | 54 | #include <plat/clcd.h> |
54 | #include <plat/fpga-irq.h> | ||
55 | #include <plat/sched_clock.h> | 55 | #include <plat/sched_clock.h> |
56 | 56 | ||
57 | #include "core.h" | 57 | #include "core.h" |
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index c95296066203..99e63f5f99d1 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -1,11 +1,12 @@ | |||
1 | config ARCH_VEXPRESS | 1 | config ARCH_VEXPRESS |
2 | bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 | 2 | bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 |
3 | select ARCH_WANT_OPTIONAL_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
4 | select ARM_AMBA | 4 | select ARM_AMBA |
5 | select ARM_GIC | 5 | select ARM_GIC |
6 | select ARM_TIMER_SP804 | 6 | select ARM_TIMER_SP804 |
7 | select CLKDEV_LOOKUP | 7 | select CLKDEV_LOOKUP |
8 | select COMMON_CLK | 8 | select COMMON_CLK |
9 | select COMMON_CLK_VERSATILE | ||
9 | select CPU_V7 | 10 | select CPU_V7 |
10 | select GENERIC_CLOCKEVENTS | 11 | select GENERIC_CLOCKEVENTS |
11 | select HAVE_CLK | 12 | select HAVE_CLK |
@@ -17,6 +18,7 @@ config ARCH_VEXPRESS | |||
17 | select PLAT_VERSATILE | 18 | select PLAT_VERSATILE |
18 | select PLAT_VERSATILE_CLCD | 19 | select PLAT_VERSATILE_CLCD |
19 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 20 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
21 | select VEXPRESS_CONFIG | ||
20 | help | 22 | help |
21 | This option enables support for systems using Cortex processor based | 23 | This option enables support for systems using Cortex processor based |
22 | ARM core and logic (FPGA) tiles on the Versatile Express motherboard, | 24 | ARM core and logic (FPGA) tiles on the Versatile Express motherboard, |
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile index 42703e8b4d3b..80b64971fbdd 100644 --- a/arch/arm/mach-vexpress/Makefile +++ b/arch/arm/mach-vexpress/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | 4 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ |
5 | -I$(srctree)/arch/arm/plat-versatile/include | 5 | -I$(srctree)/arch/arm/plat-versatile/include |
6 | 6 | ||
7 | obj-y := v2m.o | 7 | obj-y := v2m.o reset.o |
8 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o | 8 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o |
9 | obj-$(CONFIG_SMP) += platsmp.o | 9 | obj-$(CONFIG_SMP) += platsmp.o |
10 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 10 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 4f471fa3e3c5..60838ddb8564 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/amba/bus.h> | 9 | #include <linux/amba/bus.h> |
10 | #include <linux/amba/clcd.h> | 10 | #include <linux/amba/clcd.h> |
11 | #include <linux/clkdev.h> | 11 | #include <linux/clkdev.h> |
12 | #include <linux/vexpress.h> | ||
12 | 13 | ||
13 | #include <asm/hardware/arm_timer.h> | 14 | #include <asm/hardware/arm_timer.h> |
14 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
@@ -64,19 +65,6 @@ static void __init ct_ca9x4_init_irq(void) | |||
64 | ca9x4_twd_init(); | 65 | ca9x4_twd_init(); |
65 | } | 66 | } |
66 | 67 | ||
67 | static void ct_ca9x4_clcd_enable(struct clcd_fb *fb) | ||
68 | { | ||
69 | u32 site = v2m_get_master_site(); | ||
70 | |||
71 | /* | ||
72 | * Old firmware was using the "site" component of the command | ||
73 | * to control the DVI muxer (while it should be always 0 ie. MB). | ||
74 | * Newer firmware uses the data register. Keep both for compatibility. | ||
75 | */ | ||
76 | v2m_cfg_write(SYS_CFG_MUXFPGA | SYS_CFG_SITE(site), site); | ||
77 | v2m_cfg_write(SYS_CFG_DVIMODE | SYS_CFG_SITE(SYS_CFG_SITE_MB), 2); | ||
78 | } | ||
79 | |||
80 | static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) | 68 | static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) |
81 | { | 69 | { |
82 | unsigned long framesize = 1024 * 768 * 2; | 70 | unsigned long framesize = 1024 * 768 * 2; |
@@ -93,7 +81,6 @@ static struct clcd_board ct_ca9x4_clcd_data = { | |||
93 | .caps = CLCD_CAP_5551 | CLCD_CAP_565, | 81 | .caps = CLCD_CAP_5551 | CLCD_CAP_565, |
94 | .check = clcdfb_check, | 82 | .check = clcdfb_check, |
95 | .decode = clcdfb_decode, | 83 | .decode = clcdfb_decode, |
96 | .enable = ct_ca9x4_clcd_enable, | ||
97 | .setup = ct_ca9x4_clcd_setup, | 84 | .setup = ct_ca9x4_clcd_setup, |
98 | .mmap = versatile_clcd_mmap_dma, | 85 | .mmap = versatile_clcd_mmap_dma, |
99 | .remove = versatile_clcd_remove_dma, | 86 | .remove = versatile_clcd_remove_dma, |
@@ -111,14 +98,6 @@ static struct amba_device *ct_ca9x4_amba_devs[] __initdata = { | |||
111 | &gpio_device, | 98 | &gpio_device, |
112 | }; | 99 | }; |
113 | 100 | ||
114 | |||
115 | static struct v2m_osc ct_osc1 = { | ||
116 | .osc = 1, | ||
117 | .rate_min = 10000000, | ||
118 | .rate_max = 80000000, | ||
119 | .rate_default = 23750000, | ||
120 | }; | ||
121 | |||
122 | static struct resource pmu_resources[] = { | 101 | static struct resource pmu_resources[] = { |
123 | [0] = { | 102 | [0] = { |
124 | .start = IRQ_CT_CA9X4_PMU_CPU0, | 103 | .start = IRQ_CT_CA9X4_PMU_CPU0, |
@@ -149,10 +128,18 @@ static struct platform_device pmu_device = { | |||
149 | .resource = pmu_resources, | 128 | .resource = pmu_resources, |
150 | }; | 129 | }; |
151 | 130 | ||
131 | static struct platform_device osc1_device = { | ||
132 | .name = "vexpress-osc", | ||
133 | .id = 1, | ||
134 | .num_resources = 1, | ||
135 | .resource = (struct resource []) { | ||
136 | VEXPRESS_RES_FUNC(0xf, 1), | ||
137 | }, | ||
138 | }; | ||
139 | |||
152 | static void __init ct_ca9x4_init(void) | 140 | static void __init ct_ca9x4_init(void) |
153 | { | 141 | { |
154 | int i; | 142 | int i; |
155 | struct clk *clk; | ||
156 | 143 | ||
157 | #ifdef CONFIG_CACHE_L2X0 | 144 | #ifdef CONFIG_CACHE_L2X0 |
158 | void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K); | 145 | void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K); |
@@ -164,14 +151,14 @@ static void __init ct_ca9x4_init(void) | |||
164 | l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff); | 151 | l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff); |
165 | #endif | 152 | #endif |
166 | 153 | ||
167 | ct_osc1.site = v2m_get_master_site(); | ||
168 | clk = v2m_osc_register("ct:osc1", &ct_osc1); | ||
169 | clk_register_clkdev(clk, NULL, "ct:clcd"); | ||
170 | |||
171 | for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) | 154 | for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) |
172 | amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); | 155 | amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); |
173 | 156 | ||
174 | platform_device_register(&pmu_device); | 157 | platform_device_register(&pmu_device); |
158 | platform_device_register(&osc1_device); | ||
159 | |||
160 | WARN_ON(clk_register_clkdev(vexpress_osc_setup(&osc1_device.dev), | ||
161 | NULL, "ct:clcd")); | ||
175 | } | 162 | } |
176 | 163 | ||
177 | #ifdef CONFIG_SMP | 164 | #ifdef CONFIG_SMP |
diff --git a/arch/arm/mach-vexpress/include/mach/motherboard.h b/arch/arm/mach-vexpress/include/mach/motherboard.h index 1e388c7bf4d7..68abc8b72781 100644 --- a/arch/arm/mach-vexpress/include/mach/motherboard.h +++ b/arch/arm/mach-vexpress/include/mach/motherboard.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef __MACH_MOTHERBOARD_H | 1 | #ifndef __MACH_MOTHERBOARD_H |
2 | #define __MACH_MOTHERBOARD_H | 2 | #define __MACH_MOTHERBOARD_H |
3 | 3 | ||
4 | #include <linux/clk-provider.h> | ||
5 | |||
6 | /* | 4 | /* |
7 | * Physical addresses, offset from V2M_PA_CS0-3 | 5 | * Physical addresses, offset from V2M_PA_CS0-3 |
8 | */ | 6 | */ |
@@ -41,31 +39,6 @@ | |||
41 | #define V2M_CF (V2M_PA_CS7 + 0x0001a000) | 39 | #define V2M_CF (V2M_PA_CS7 + 0x0001a000) |
42 | #define V2M_CLCD (V2M_PA_CS7 + 0x0001f000) | 40 | #define V2M_CLCD (V2M_PA_CS7 + 0x0001f000) |
43 | 41 | ||
44 | /* | ||
45 | * Offsets from SYSREGS base | ||
46 | */ | ||
47 | #define V2M_SYS_ID 0x000 | ||
48 | #define V2M_SYS_SW 0x004 | ||
49 | #define V2M_SYS_LED 0x008 | ||
50 | #define V2M_SYS_100HZ 0x024 | ||
51 | #define V2M_SYS_FLAGS 0x030 | ||
52 | #define V2M_SYS_FLAGSSET 0x030 | ||
53 | #define V2M_SYS_FLAGSCLR 0x034 | ||
54 | #define V2M_SYS_NVFLAGS 0x038 | ||
55 | #define V2M_SYS_NVFLAGSSET 0x038 | ||
56 | #define V2M_SYS_NVFLAGSCLR 0x03c | ||
57 | #define V2M_SYS_MCI 0x048 | ||
58 | #define V2M_SYS_FLASH 0x03c | ||
59 | #define V2M_SYS_CFGSW 0x058 | ||
60 | #define V2M_SYS_24MHZ 0x05c | ||
61 | #define V2M_SYS_MISC 0x060 | ||
62 | #define V2M_SYS_DMA 0x064 | ||
63 | #define V2M_SYS_PROCID0 0x084 | ||
64 | #define V2M_SYS_PROCID1 0x088 | ||
65 | #define V2M_SYS_CFGDATA 0x0a0 | ||
66 | #define V2M_SYS_CFGCTRL 0x0a4 | ||
67 | #define V2M_SYS_CFGSTAT 0x0a8 | ||
68 | |||
69 | 42 | ||
70 | /* | 43 | /* |
71 | * Interrupts. Those in {} are for AMBA devices | 44 | * Interrupts. Those in {} are for AMBA devices |
@@ -91,43 +64,6 @@ | |||
91 | 64 | ||
92 | 65 | ||
93 | /* | 66 | /* |
94 | * Configuration | ||
95 | */ | ||
96 | #define SYS_CFG_START (1 << 31) | ||
97 | #define SYS_CFG_WRITE (1 << 30) | ||
98 | #define SYS_CFG_OSC (1 << 20) | ||
99 | #define SYS_CFG_VOLT (2 << 20) | ||
100 | #define SYS_CFG_AMP (3 << 20) | ||
101 | #define SYS_CFG_TEMP (4 << 20) | ||
102 | #define SYS_CFG_RESET (5 << 20) | ||
103 | #define SYS_CFG_SCC (6 << 20) | ||
104 | #define SYS_CFG_MUXFPGA (7 << 20) | ||
105 | #define SYS_CFG_SHUTDOWN (8 << 20) | ||
106 | #define SYS_CFG_REBOOT (9 << 20) | ||
107 | #define SYS_CFG_DVIMODE (11 << 20) | ||
108 | #define SYS_CFG_POWER (12 << 20) | ||
109 | #define SYS_CFG_SITE(n) ((n) << 16) | ||
110 | #define SYS_CFG_SITE_MB 0 | ||
111 | #define SYS_CFG_SITE_DB1 1 | ||
112 | #define SYS_CFG_SITE_DB2 2 | ||
113 | #define SYS_CFG_STACK(n) ((n) << 12) | ||
114 | |||
115 | #define SYS_CFG_ERR (1 << 1) | ||
116 | #define SYS_CFG_COMPLETE (1 << 0) | ||
117 | |||
118 | int v2m_cfg_write(u32 devfn, u32 data); | ||
119 | int v2m_cfg_read(u32 devfn, u32 *data); | ||
120 | void v2m_flags_set(u32 data); | ||
121 | |||
122 | /* | ||
123 | * Miscellaneous | ||
124 | */ | ||
125 | #define SYS_MISC_MASTERSITE (1 << 14) | ||
126 | #define SYS_PROCIDx_HBI_MASK 0xfff | ||
127 | |||
128 | int v2m_get_master_site(void); | ||
129 | |||
130 | /* | ||
131 | * Core tile IDs | 67 | * Core tile IDs |
132 | */ | 68 | */ |
133 | #define V2M_CT_ID_CA9 0x0c000191 | 69 | #define V2M_CT_ID_CA9 0x0c000191 |
@@ -149,21 +85,4 @@ struct ct_desc { | |||
149 | 85 | ||
150 | extern struct ct_desc *ct_desc; | 86 | extern struct ct_desc *ct_desc; |
151 | 87 | ||
152 | /* | ||
153 | * OSC clock provider | ||
154 | */ | ||
155 | struct v2m_osc { | ||
156 | struct clk_hw hw; | ||
157 | u8 site; /* 0 = motherboard, 1 = site 1, 2 = site 2 */ | ||
158 | u8 stack; /* board stack position */ | ||
159 | u16 osc; | ||
160 | unsigned long rate_min; | ||
161 | unsigned long rate_max; | ||
162 | unsigned long rate_default; | ||
163 | }; | ||
164 | |||
165 | #define to_v2m_osc(osc) container_of(osc, struct v2m_osc, hw) | ||
166 | |||
167 | struct clk *v2m_osc_register(const char *name, struct v2m_osc *osc); | ||
168 | |||
169 | #endif | 88 | #endif |
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c index 7db27c8c05cc..c5d70de9bb4e 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-vexpress/platsmp.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/of_fdt.h> | 15 | #include <linux/of_fdt.h> |
16 | #include <linux/vexpress.h> | ||
16 | 17 | ||
17 | #include <asm/smp_scu.h> | 18 | #include <asm/smp_scu.h> |
18 | #include <asm/hardware/gic.h> | 19 | #include <asm/hardware/gic.h> |
@@ -193,7 +194,7 @@ static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus) | |||
193 | * until it receives a soft interrupt, and then the | 194 | * until it receives a soft interrupt, and then the |
194 | * secondary CPU branches to this address. | 195 | * secondary CPU branches to this address. |
195 | */ | 196 | */ |
196 | v2m_flags_set(virt_to_phys(versatile_secondary_startup)); | 197 | vexpress_flags_set(virt_to_phys(versatile_secondary_startup)); |
197 | } | 198 | } |
198 | 199 | ||
199 | struct smp_operations __initdata vexpress_smp_ops = { | 200 | struct smp_operations __initdata vexpress_smp_ops = { |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 359f782c747d..011661a6c5cb 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -16,11 +16,10 @@ | |||
16 | #include <linux/smsc911x.h> | 16 | #include <linux/smsc911x.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/usb/isp1760.h> | 18 | #include <linux/usb/isp1760.h> |
19 | #include <linux/clkdev.h> | ||
20 | #include <linux/clk-provider.h> | ||
21 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
22 | #include <linux/regulator/fixed.h> | 20 | #include <linux/regulator/fixed.h> |
23 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
22 | #include <linux/vexpress.h> | ||
24 | 23 | ||
25 | #include <asm/arch_timer.h> | 24 | #include <asm/arch_timer.h> |
26 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
@@ -33,7 +32,6 @@ | |||
33 | #include <asm/hardware/cache-l2x0.h> | 32 | #include <asm/hardware/cache-l2x0.h> |
34 | #include <asm/hardware/gic.h> | 33 | #include <asm/hardware/gic.h> |
35 | #include <asm/hardware/timer-sp.h> | 34 | #include <asm/hardware/timer-sp.h> |
36 | #include <asm/hardware/sp810.h> | ||
37 | 35 | ||
38 | #include <mach/ct-ca9x4.h> | 36 | #include <mach/ct-ca9x4.h> |
39 | #include <mach/motherboard.h> | 37 | #include <mach/motherboard.h> |
@@ -58,22 +56,6 @@ static struct map_desc v2m_io_desc[] __initdata = { | |||
58 | }, | 56 | }, |
59 | }; | 57 | }; |
60 | 58 | ||
61 | static void __iomem *v2m_sysreg_base; | ||
62 | |||
63 | static void __init v2m_sysctl_init(void __iomem *base) | ||
64 | { | ||
65 | u32 scctrl; | ||
66 | |||
67 | if (WARN_ON(!base)) | ||
68 | return; | ||
69 | |||
70 | /* Select 1MHz TIMCLK as the reference clock for SP804 timers */ | ||
71 | scctrl = readl(base + SCCTRL); | ||
72 | scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK; | ||
73 | scctrl |= SCCTRL_TIMEREN1SEL_TIMCLK; | ||
74 | writel(scctrl, base + SCCTRL); | ||
75 | } | ||
76 | |||
77 | static void __init v2m_sp804_init(void __iomem *base, unsigned int irq) | 59 | static void __init v2m_sp804_init(void __iomem *base, unsigned int irq) |
78 | { | 60 | { |
79 | if (WARN_ON(!base || irq == NO_IRQ)) | 61 | if (WARN_ON(!base || irq == NO_IRQ)) |
@@ -87,69 +69,6 @@ static void __init v2m_sp804_init(void __iomem *base, unsigned int irq) | |||
87 | } | 69 | } |
88 | 70 | ||
89 | 71 | ||
90 | static DEFINE_SPINLOCK(v2m_cfg_lock); | ||
91 | |||
92 | int v2m_cfg_write(u32 devfn, u32 data) | ||
93 | { | ||
94 | /* Configuration interface broken? */ | ||
95 | u32 val; | ||
96 | |||
97 | printk("%s: writing %08x to %08x\n", __func__, data, devfn); | ||
98 | |||
99 | devfn |= SYS_CFG_START | SYS_CFG_WRITE; | ||
100 | |||
101 | spin_lock(&v2m_cfg_lock); | ||
102 | val = readl(v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
103 | writel(val & ~SYS_CFG_COMPLETE, v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
104 | |||
105 | writel(data, v2m_sysreg_base + V2M_SYS_CFGDATA); | ||
106 | writel(devfn, v2m_sysreg_base + V2M_SYS_CFGCTRL); | ||
107 | |||
108 | do { | ||
109 | val = readl(v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
110 | } while (val == 0); | ||
111 | spin_unlock(&v2m_cfg_lock); | ||
112 | |||
113 | return !!(val & SYS_CFG_ERR); | ||
114 | } | ||
115 | |||
116 | int v2m_cfg_read(u32 devfn, u32 *data) | ||
117 | { | ||
118 | u32 val; | ||
119 | |||
120 | devfn |= SYS_CFG_START; | ||
121 | |||
122 | spin_lock(&v2m_cfg_lock); | ||
123 | writel(0, v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
124 | writel(devfn, v2m_sysreg_base + V2M_SYS_CFGCTRL); | ||
125 | |||
126 | mb(); | ||
127 | |||
128 | do { | ||
129 | cpu_relax(); | ||
130 | val = readl(v2m_sysreg_base + V2M_SYS_CFGSTAT); | ||
131 | } while (val == 0); | ||
132 | |||
133 | *data = readl(v2m_sysreg_base + V2M_SYS_CFGDATA); | ||
134 | spin_unlock(&v2m_cfg_lock); | ||
135 | |||
136 | return !!(val & SYS_CFG_ERR); | ||
137 | } | ||
138 | |||
139 | void __init v2m_flags_set(u32 data) | ||
140 | { | ||
141 | writel(~0, v2m_sysreg_base + V2M_SYS_FLAGSCLR); | ||
142 | writel(data, v2m_sysreg_base + V2M_SYS_FLAGSSET); | ||
143 | } | ||
144 | |||
145 | int v2m_get_master_site(void) | ||
146 | { | ||
147 | u32 misc = readl(v2m_sysreg_base + V2M_SYS_MISC); | ||
148 | |||
149 | return misc & SYS_MISC_MASTERSITE ? SYS_CFG_SITE_DB2 : SYS_CFG_SITE_DB1; | ||
150 | } | ||
151 | |||
152 | |||
153 | static struct resource v2m_pcie_i2c_resource = { | 72 | static struct resource v2m_pcie_i2c_resource = { |
154 | .start = V2M_SERIAL_BUS_PCI, | 73 | .start = V2M_SERIAL_BUS_PCI, |
155 | .end = V2M_SERIAL_BUS_PCI + SZ_4K - 1, | 74 | .end = V2M_SERIAL_BUS_PCI + SZ_4K - 1, |
@@ -237,14 +156,8 @@ static struct platform_device v2m_usb_device = { | |||
237 | .dev.platform_data = &v2m_usb_config, | 156 | .dev.platform_data = &v2m_usb_config, |
238 | }; | 157 | }; |
239 | 158 | ||
240 | static void v2m_flash_set_vpp(struct platform_device *pdev, int on) | ||
241 | { | ||
242 | writel(on != 0, v2m_sysreg_base + V2M_SYS_FLASH); | ||
243 | } | ||
244 | |||
245 | static struct physmap_flash_data v2m_flash_data = { | 159 | static struct physmap_flash_data v2m_flash_data = { |
246 | .width = 4, | 160 | .width = 4, |
247 | .set_vpp = v2m_flash_set_vpp, | ||
248 | }; | 161 | }; |
249 | 162 | ||
250 | static struct resource v2m_flash_resources[] = { | 163 | static struct resource v2m_flash_resources[] = { |
@@ -291,14 +204,61 @@ static struct platform_device v2m_cf_device = { | |||
291 | .dev.platform_data = &v2m_pata_data, | 204 | .dev.platform_data = &v2m_pata_data, |
292 | }; | 205 | }; |
293 | 206 | ||
294 | static unsigned int v2m_mmci_status(struct device *dev) | ||
295 | { | ||
296 | return readl(v2m_sysreg_base + V2M_SYS_MCI) & (1 << 0); | ||
297 | } | ||
298 | |||
299 | static struct mmci_platform_data v2m_mmci_data = { | 207 | static struct mmci_platform_data v2m_mmci_data = { |
300 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 208 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
301 | .status = v2m_mmci_status, | 209 | .gpio_wp = VEXPRESS_GPIO_MMC_WPROT, |
210 | .gpio_cd = VEXPRESS_GPIO_MMC_CARDIN, | ||
211 | }; | ||
212 | |||
213 | static struct resource v2m_sysreg_resources[] = { | ||
214 | { | ||
215 | .start = V2M_SYSREGS, | ||
216 | .end = V2M_SYSREGS + 0xfff, | ||
217 | .flags = IORESOURCE_MEM, | ||
218 | }, | ||
219 | }; | ||
220 | |||
221 | static struct platform_device v2m_sysreg_device = { | ||
222 | .name = "vexpress-sysreg", | ||
223 | .id = -1, | ||
224 | .resource = v2m_sysreg_resources, | ||
225 | .num_resources = ARRAY_SIZE(v2m_sysreg_resources), | ||
226 | }; | ||
227 | |||
228 | static struct platform_device v2m_muxfpga_device = { | ||
229 | .name = "vexpress-muxfpga", | ||
230 | .id = 0, | ||
231 | .num_resources = 1, | ||
232 | .resource = (struct resource []) { | ||
233 | VEXPRESS_RES_FUNC(0, 7), | ||
234 | } | ||
235 | }; | ||
236 | |||
237 | static struct platform_device v2m_shutdown_device = { | ||
238 | .name = "vexpress-shutdown", | ||
239 | .id = 0, | ||
240 | .num_resources = 1, | ||
241 | .resource = (struct resource []) { | ||
242 | VEXPRESS_RES_FUNC(0, 8), | ||
243 | } | ||
244 | }; | ||
245 | |||
246 | static struct platform_device v2m_reboot_device = { | ||
247 | .name = "vexpress-reboot", | ||
248 | .id = 0, | ||
249 | .num_resources = 1, | ||
250 | .resource = (struct resource []) { | ||
251 | VEXPRESS_RES_FUNC(0, 9), | ||
252 | } | ||
253 | }; | ||
254 | |||
255 | static struct platform_device v2m_dvimode_device = { | ||
256 | .name = "vexpress-dvimode", | ||
257 | .id = 0, | ||
258 | .num_resources = 1, | ||
259 | .resource = (struct resource []) { | ||
260 | VEXPRESS_RES_FUNC(0, 11), | ||
261 | } | ||
302 | }; | 262 | }; |
303 | 263 | ||
304 | static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL); | 264 | static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL); |
@@ -325,123 +285,9 @@ static struct amba_device *v2m_amba_devs[] __initdata = { | |||
325 | &rtc_device, | 285 | &rtc_device, |
326 | }; | 286 | }; |
327 | 287 | ||
328 | |||
329 | static unsigned long v2m_osc_recalc_rate(struct clk_hw *hw, | ||
330 | unsigned long parent_rate) | ||
331 | { | ||
332 | struct v2m_osc *osc = to_v2m_osc(hw); | ||
333 | |||
334 | return !parent_rate ? osc->rate_default : parent_rate; | ||
335 | } | ||
336 | |||
337 | static long v2m_osc_round_rate(struct clk_hw *hw, unsigned long rate, | ||
338 | unsigned long *parent_rate) | ||
339 | { | ||
340 | struct v2m_osc *osc = to_v2m_osc(hw); | ||
341 | |||
342 | if (WARN_ON(rate < osc->rate_min)) | ||
343 | rate = osc->rate_min; | ||
344 | |||
345 | if (WARN_ON(rate > osc->rate_max)) | ||
346 | rate = osc->rate_max; | ||
347 | |||
348 | return rate; | ||
349 | } | ||
350 | |||
351 | static int v2m_osc_set_rate(struct clk_hw *hw, unsigned long rate, | ||
352 | unsigned long parent_rate) | ||
353 | { | ||
354 | struct v2m_osc *osc = to_v2m_osc(hw); | ||
355 | |||
356 | v2m_cfg_write(SYS_CFG_OSC | SYS_CFG_SITE(osc->site) | | ||
357 | SYS_CFG_STACK(osc->stack) | osc->osc, rate); | ||
358 | |||
359 | return 0; | ||
360 | } | ||
361 | |||
362 | static struct clk_ops v2m_osc_ops = { | ||
363 | .recalc_rate = v2m_osc_recalc_rate, | ||
364 | .round_rate = v2m_osc_round_rate, | ||
365 | .set_rate = v2m_osc_set_rate, | ||
366 | }; | ||
367 | |||
368 | struct clk * __init v2m_osc_register(const char *name, struct v2m_osc *osc) | ||
369 | { | ||
370 | struct clk_init_data init; | ||
371 | |||
372 | WARN_ON(osc->site > 2); | ||
373 | WARN_ON(osc->stack > 15); | ||
374 | WARN_ON(osc->osc > 4095); | ||
375 | |||
376 | init.name = name; | ||
377 | init.ops = &v2m_osc_ops; | ||
378 | init.flags = CLK_IS_ROOT; | ||
379 | init.num_parents = 0; | ||
380 | |||
381 | osc->hw.init = &init; | ||
382 | |||
383 | return clk_register(NULL, &osc->hw); | ||
384 | } | ||
385 | |||
386 | static struct v2m_osc v2m_mb_osc1 = { | ||
387 | .site = SYS_CFG_SITE_MB, | ||
388 | .osc = 1, | ||
389 | .rate_min = 23750000, | ||
390 | .rate_max = 63500000, | ||
391 | .rate_default = 23750000, | ||
392 | }; | ||
393 | |||
394 | static const char *v2m_ref_clk_periphs[] __initconst = { | ||
395 | "mb:wdt", "1000f000.wdt", "1c0f0000.wdt", /* SP805 WDT */ | ||
396 | }; | ||
397 | |||
398 | static const char *v2m_osc1_periphs[] __initconst = { | ||
399 | "mb:clcd", "1001f000.clcd", "1c1f0000.clcd", /* PL111 CLCD */ | ||
400 | }; | ||
401 | |||
402 | static const char *v2m_osc2_periphs[] __initconst = { | ||
403 | "mb:mmci", "10005000.mmci", "1c050000.mmci", /* PL180 MMCI */ | ||
404 | "mb:kmi0", "10006000.kmi", "1c060000.kmi", /* PL050 KMI0 */ | ||
405 | "mb:kmi1", "10007000.kmi", "1c070000.kmi", /* PL050 KMI1 */ | ||
406 | "mb:uart0", "10009000.uart", "1c090000.uart", /* PL011 UART0 */ | ||
407 | "mb:uart1", "1000a000.uart", "1c0a0000.uart", /* PL011 UART1 */ | ||
408 | "mb:uart2", "1000b000.uart", "1c0b0000.uart", /* PL011 UART2 */ | ||
409 | "mb:uart3", "1000c000.uart", "1c0c0000.uart", /* PL011 UART3 */ | ||
410 | }; | ||
411 | |||
412 | static void __init v2m_clk_init(void) | ||
413 | { | ||
414 | struct clk *clk; | ||
415 | int i; | ||
416 | |||
417 | clk = clk_register_fixed_rate(NULL, "dummy_apb_pclk", NULL, | ||
418 | CLK_IS_ROOT, 0); | ||
419 | WARN_ON(clk_register_clkdev(clk, "apb_pclk", NULL)); | ||
420 | |||
421 | clk = clk_register_fixed_rate(NULL, "mb:ref_clk", NULL, | ||
422 | CLK_IS_ROOT, 32768); | ||
423 | for (i = 0; i < ARRAY_SIZE(v2m_ref_clk_periphs); i++) | ||
424 | WARN_ON(clk_register_clkdev(clk, NULL, v2m_ref_clk_periphs[i])); | ||
425 | |||
426 | clk = clk_register_fixed_rate(NULL, "mb:sp804_clk", NULL, | ||
427 | CLK_IS_ROOT, 1000000); | ||
428 | WARN_ON(clk_register_clkdev(clk, "v2m-timer0", "sp804")); | ||
429 | WARN_ON(clk_register_clkdev(clk, "v2m-timer1", "sp804")); | ||
430 | |||
431 | clk = v2m_osc_register("mb:osc1", &v2m_mb_osc1); | ||
432 | for (i = 0; i < ARRAY_SIZE(v2m_osc1_periphs); i++) | ||
433 | WARN_ON(clk_register_clkdev(clk, NULL, v2m_osc1_periphs[i])); | ||
434 | |||
435 | clk = clk_register_fixed_rate(NULL, "mb:osc2", NULL, | ||
436 | CLK_IS_ROOT, 24000000); | ||
437 | for (i = 0; i < ARRAY_SIZE(v2m_osc2_periphs); i++) | ||
438 | WARN_ON(clk_register_clkdev(clk, NULL, v2m_osc2_periphs[i])); | ||
439 | } | ||
440 | |||
441 | static void __init v2m_timer_init(void) | 288 | static void __init v2m_timer_init(void) |
442 | { | 289 | { |
443 | v2m_sysctl_init(ioremap(V2M_SYSCTL, SZ_4K)); | 290 | vexpress_clk_init(ioremap(V2M_SYSCTL, SZ_4K)); |
444 | v2m_clk_init(); | ||
445 | v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0); | 291 | v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0); |
446 | } | 292 | } |
447 | 293 | ||
@@ -453,19 +299,7 @@ static void __init v2m_init_early(void) | |||
453 | { | 299 | { |
454 | if (ct_desc->init_early) | 300 | if (ct_desc->init_early) |
455 | ct_desc->init_early(); | 301 | ct_desc->init_early(); |
456 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | 302 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000); |
457 | } | ||
458 | |||
459 | static void v2m_power_off(void) | ||
460 | { | ||
461 | if (v2m_cfg_write(SYS_CFG_SHUTDOWN | SYS_CFG_SITE(SYS_CFG_SITE_MB), 0)) | ||
462 | printk(KERN_EMERG "Unable to shutdown\n"); | ||
463 | } | ||
464 | |||
465 | static void v2m_restart(char str, const char *cmd) | ||
466 | { | ||
467 | if (v2m_cfg_write(SYS_CFG_REBOOT | SYS_CFG_SITE(SYS_CFG_SITE_MB), 0)) | ||
468 | printk(KERN_EMERG "Unable to reboot\n"); | ||
469 | } | 303 | } |
470 | 304 | ||
471 | struct ct_desc *ct_desc; | 305 | struct ct_desc *ct_desc; |
@@ -482,7 +316,7 @@ static void __init v2m_populate_ct_desc(void) | |||
482 | u32 current_tile_id; | 316 | u32 current_tile_id; |
483 | 317 | ||
484 | ct_desc = NULL; | 318 | ct_desc = NULL; |
485 | current_tile_id = readl(v2m_sysreg_base + V2M_SYS_PROCID0) | 319 | current_tile_id = vexpress_get_procid(VEXPRESS_SITE_MASTER) |
486 | & V2M_CT_ID_MASK; | 320 | & V2M_CT_ID_MASK; |
487 | 321 | ||
488 | for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i) | 322 | for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i) |
@@ -498,7 +332,7 @@ static void __init v2m_populate_ct_desc(void) | |||
498 | static void __init v2m_map_io(void) | 332 | static void __init v2m_map_io(void) |
499 | { | 333 | { |
500 | iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc)); | 334 | iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc)); |
501 | v2m_sysreg_base = ioremap(V2M_SYSREGS, SZ_4K); | 335 | vexpress_sysreg_early_init(ioremap(V2M_SYSREGS, SZ_4K)); |
502 | v2m_populate_ct_desc(); | 336 | v2m_populate_ct_desc(); |
503 | ct_desc->map_io(); | 337 | ct_desc->map_io(); |
504 | } | 338 | } |
@@ -515,6 +349,12 @@ static void __init v2m_init(void) | |||
515 | regulator_register_fixed(0, v2m_eth_supplies, | 349 | regulator_register_fixed(0, v2m_eth_supplies, |
516 | ARRAY_SIZE(v2m_eth_supplies)); | 350 | ARRAY_SIZE(v2m_eth_supplies)); |
517 | 351 | ||
352 | platform_device_register(&v2m_muxfpga_device); | ||
353 | platform_device_register(&v2m_shutdown_device); | ||
354 | platform_device_register(&v2m_reboot_device); | ||
355 | platform_device_register(&v2m_dvimode_device); | ||
356 | |||
357 | platform_device_register(&v2m_sysreg_device); | ||
518 | platform_device_register(&v2m_pcie_i2c_device); | 358 | platform_device_register(&v2m_pcie_i2c_device); |
519 | platform_device_register(&v2m_ddc_i2c_device); | 359 | platform_device_register(&v2m_ddc_i2c_device); |
520 | platform_device_register(&v2m_flash_device); | 360 | platform_device_register(&v2m_flash_device); |
@@ -525,7 +365,7 @@ static void __init v2m_init(void) | |||
525 | for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) | 365 | for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) |
526 | amba_device_register(v2m_amba_devs[i], &iomem_resource); | 366 | amba_device_register(v2m_amba_devs[i], &iomem_resource); |
527 | 367 | ||
528 | pm_power_off = v2m_power_off; | 368 | pm_power_off = vexpress_power_off; |
529 | 369 | ||
530 | ct_desc->init_tile(); | 370 | ct_desc->init_tile(); |
531 | } | 371 | } |
@@ -539,7 +379,7 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express") | |||
539 | .timer = &v2m_timer, | 379 | .timer = &v2m_timer, |
540 | .handle_irq = gic_handle_irq, | 380 | .handle_irq = gic_handle_irq, |
541 | .init_machine = v2m_init, | 381 | .init_machine = v2m_init, |
542 | .restart = v2m_restart, | 382 | .restart = vexpress_restart, |
543 | MACHINE_END | 383 | MACHINE_END |
544 | 384 | ||
545 | static struct map_desc v2m_rs1_io_desc __initdata = { | 385 | static struct map_desc v2m_rs1_io_desc __initdata = { |
@@ -580,20 +420,13 @@ void __init v2m_dt_map_io(void) | |||
580 | 420 | ||
581 | void __init v2m_dt_init_early(void) | 421 | void __init v2m_dt_init_early(void) |
582 | { | 422 | { |
583 | struct device_node *node; | ||
584 | u32 dt_hbi; | 423 | u32 dt_hbi; |
585 | 424 | ||
586 | node = of_find_compatible_node(NULL, NULL, "arm,vexpress-sysreg"); | 425 | vexpress_sysreg_of_early_init(); |
587 | v2m_sysreg_base = of_iomap(node, 0); | ||
588 | if (WARN_ON(!v2m_sysreg_base)) | ||
589 | return; | ||
590 | 426 | ||
591 | /* Confirm board type against DT property, if available */ | 427 | /* Confirm board type against DT property, if available */ |
592 | if (of_property_read_u32(of_allnodes, "arm,hbi", &dt_hbi) == 0) { | 428 | if (of_property_read_u32(of_allnodes, "arm,hbi", &dt_hbi) == 0) { |
593 | int site = v2m_get_master_site(); | 429 | u32 hbi = vexpress_get_hbi(VEXPRESS_SITE_MASTER); |
594 | u32 id = readl(v2m_sysreg_base + (site == SYS_CFG_SITE_DB2 ? | ||
595 | V2M_SYS_PROCID1 : V2M_SYS_PROCID0)); | ||
596 | u32 hbi = id & SYS_PROCIDx_HBI_MASK; | ||
597 | 430 | ||
598 | if (WARN_ON(dt_hbi != hbi)) | 431 | if (WARN_ON(dt_hbi != hbi)) |
599 | pr_warning("vexpress: DT HBI (%x) is not matching " | 432 | pr_warning("vexpress: DT HBI (%x) is not matching " |
@@ -613,51 +446,47 @@ static void __init v2m_dt_init_irq(void) | |||
613 | 446 | ||
614 | static void __init v2m_dt_timer_init(void) | 447 | static void __init v2m_dt_timer_init(void) |
615 | { | 448 | { |
616 | struct device_node *node; | 449 | struct device_node *node = NULL; |
617 | const char *path; | ||
618 | int err; | ||
619 | 450 | ||
620 | node = of_find_compatible_node(NULL, NULL, "arm,sp810"); | 451 | vexpress_clk_of_init(); |
621 | v2m_sysctl_init(of_iomap(node, 0)); | ||
622 | 452 | ||
623 | v2m_clk_init(); | 453 | do { |
454 | node = of_find_compatible_node(node, NULL, "arm,sp804"); | ||
455 | } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB); | ||
456 | if (node) { | ||
457 | pr_info("Using SP804 '%s' as a clock & events source\n", | ||
458 | node->full_name); | ||
459 | v2m_sp804_init(of_iomap(node, 0), | ||
460 | irq_of_parse_and_map(node, 0)); | ||
461 | } | ||
624 | 462 | ||
625 | err = of_property_read_string(of_aliases, "arm,v2m_timer", &path); | ||
626 | if (WARN_ON(err)) | ||
627 | return; | ||
628 | node = of_find_node_by_path(path); | ||
629 | v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); | ||
630 | if (arch_timer_of_register() != 0) | 463 | if (arch_timer_of_register() != 0) |
631 | twd_local_timer_of_register(); | 464 | twd_local_timer_of_register(); |
632 | 465 | ||
633 | if (arch_timer_sched_clock_init() != 0) | 466 | if (arch_timer_sched_clock_init() != 0) |
634 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | 467 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), |
468 | 24000000); | ||
635 | } | 469 | } |
636 | 470 | ||
637 | static struct sys_timer v2m_dt_timer = { | 471 | static struct sys_timer v2m_dt_timer = { |
638 | .init = v2m_dt_timer_init, | 472 | .init = v2m_dt_timer_init, |
639 | }; | 473 | }; |
640 | 474 | ||
641 | static struct of_dev_auxdata v2m_dt_auxdata_lookup[] __initdata = { | 475 | static const struct of_device_id v2m_dt_bus_match[] __initconst = { |
642 | OF_DEV_AUXDATA("arm,vexpress-flash", V2M_NOR0, "physmap-flash", | 476 | { .compatible = "simple-bus", }, |
643 | &v2m_flash_data), | 477 | { .compatible = "arm,amba-bus", }, |
644 | OF_DEV_AUXDATA("arm,primecell", V2M_MMCI, "mb:mmci", &v2m_mmci_data), | 478 | { .compatible = "arm,vexpress,config-bus", }, |
645 | /* RS1 memory map */ | ||
646 | OF_DEV_AUXDATA("arm,vexpress-flash", 0x08000000, "physmap-flash", | ||
647 | &v2m_flash_data), | ||
648 | OF_DEV_AUXDATA("arm,primecell", 0x1c050000, "mb:mmci", &v2m_mmci_data), | ||
649 | {} | 479 | {} |
650 | }; | 480 | }; |
651 | 481 | ||
652 | static void __init v2m_dt_init(void) | 482 | static void __init v2m_dt_init(void) |
653 | { | 483 | { |
654 | l2x0_of_init(0x00400000, 0xfe0fffff); | 484 | l2x0_of_init(0x00400000, 0xfe0fffff); |
655 | of_platform_populate(NULL, of_default_bus_match_table, | 485 | of_platform_populate(NULL, v2m_dt_bus_match, NULL, NULL); |
656 | v2m_dt_auxdata_lookup, NULL); | 486 | pm_power_off = vexpress_power_off; |
657 | pm_power_off = v2m_power_off; | ||
658 | } | 487 | } |
659 | 488 | ||
660 | const static char *v2m_dt_match[] __initconst = { | 489 | static const char * const v2m_dt_match[] __initconst = { |
661 | "arm,vexpress", | 490 | "arm,vexpress", |
662 | "xen,xenvm", | 491 | "xen,xenvm", |
663 | NULL, | 492 | NULL, |
@@ -672,5 +501,5 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") | |||
672 | .timer = &v2m_dt_timer, | 501 | .timer = &v2m_dt_timer, |
673 | .init_machine = v2m_dt_init, | 502 | .init_machine = v2m_dt_init, |
674 | .handle_irq = gic_handle_irq, | 503 | .handle_irq = gic_handle_irq, |
675 | .restart = v2m_restart, | 504 | .restart = vexpress_restart, |
676 | MACHINE_END | 505 | MACHINE_END |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 99b47b950efc..9f0610243bd6 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -876,6 +876,22 @@ static void __init pci_reserve_io(void) | |||
876 | #define pci_reserve_io() do { } while (0) | 876 | #define pci_reserve_io() do { } while (0) |
877 | #endif | 877 | #endif |
878 | 878 | ||
879 | #ifdef CONFIG_DEBUG_LL | ||
880 | void __init debug_ll_io_init(void) | ||
881 | { | ||
882 | struct map_desc map; | ||
883 | |||
884 | debug_ll_addr(&map.pfn, &map.virtual); | ||
885 | if (!map.pfn || !map.virtual) | ||
886 | return; | ||
887 | map.pfn = __phys_to_pfn(map.pfn); | ||
888 | map.virtual &= PAGE_MASK; | ||
889 | map.length = PAGE_SIZE; | ||
890 | map.type = MT_DEVICE; | ||
891 | create_mapping(&map); | ||
892 | } | ||
893 | #endif | ||
894 | |||
879 | static void * __initdata vmalloc_min = | 895 | static void * __initdata vmalloc_min = |
880 | (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); | 896 | (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); |
881 | 897 | ||
diff --git a/arch/arm/plat-mxc/devices/platform-mx2-emma.c b/arch/arm/plat-mxc/devices/platform-mx2-emma.c new file mode 100644 index 000000000000..508404ddd4ea --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-mx2-emma.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/hardware.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx_mx2_emmaprp_data_entry_single(soc) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _EMMAPRP_BASE_ADDR, \ | ||
15 | .iosize = SZ_32, \ | ||
16 | .irq = soc ## _INT_EMMAPRP, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_SOC_IMX27 | ||
20 | const struct imx_mx2_emma_data imx27_mx2_emmaprp_data __initconst = | ||
21 | imx_mx2_emmaprp_data_entry_single(MX27); | ||
22 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
23 | |||
24 | struct platform_device *__init imx_add_mx2_emmaprp( | ||
25 | const struct imx_mx2_emma_data *data) | ||
26 | { | ||
27 | struct resource res[] = { | ||
28 | { | ||
29 | .start = data->iobase, | ||
30 | .end = data->iobase + data->iosize - 1, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }, { | ||
33 | .start = data->irq, | ||
34 | .end = data->irq, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | }, | ||
37 | }; | ||
38 | return imx_add_platform_device_dmamask("m2m-emmaprp", 0, | ||
39 | res, 2, NULL, 0, DMA_BIT_MASK(32)); | ||
40 | } | ||
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 59401e1cc530..a9d52167e16e 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -414,6 +414,11 @@ config S5P_SETUP_MIPIPHY | |||
414 | help | 414 | help |
415 | Compile in common setup code for MIPI-CSIS and MIPI-DSIM devices | 415 | Compile in common setup code for MIPI-CSIS and MIPI-DSIM devices |
416 | 416 | ||
417 | config S3C_SETUP_CAMIF | ||
418 | bool | ||
419 | help | ||
420 | Compile in common setup code for S3C CAMIF devices | ||
421 | |||
417 | # DMA | 422 | # DMA |
418 | 423 | ||
419 | config S3C_DMA | 424 | config S3C_DMA |
@@ -502,5 +507,6 @@ config DEBUG_S3C_UART | |||
502 | default "0" if DEBUG_S3C_UART0 | 507 | default "0" if DEBUG_S3C_UART0 |
503 | default "1" if DEBUG_S3C_UART1 | 508 | default "1" if DEBUG_S3C_UART1 |
504 | default "2" if DEBUG_S3C_UART2 | 509 | default "2" if DEBUG_S3C_UART2 |
510 | default "3" if DEBUG_S3C_UART3 | ||
505 | 511 | ||
506 | endif | 512 | endif |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 9e40e8d00740..3a7c64d1814a 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -41,6 +41,7 @@ obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o | |||
41 | 41 | ||
42 | obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o | 42 | obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o |
43 | 43 | ||
44 | obj-$(CONFIG_S3C_SETUP_CAMIF) += setup-camif.o | ||
44 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o | 45 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o |
45 | 46 | ||
46 | # DMA support | 47 | # DMA support |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index ace4451b7651..e0072ce8d6e9 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -43,6 +43,7 @@ extern unsigned long samsung_cpu_id; | |||
43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 | 43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 |
44 | 44 | ||
45 | #define EXYNOS5250_SOC_ID 0x43520000 | 45 | #define EXYNOS5250_SOC_ID 0x43520000 |
46 | #define EXYNOS5440_SOC_ID 0x54400000 | ||
46 | #define EXYNOS5_SOC_MASK 0xFFFFF000 | 47 | #define EXYNOS5_SOC_MASK 0xFFFFF000 |
47 | 48 | ||
48 | #define IS_SAMSUNG_CPU(name, id, mask) \ | 49 | #define IS_SAMSUNG_CPU(name, id, mask) \ |
@@ -62,6 +63,7 @@ IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK) | |||
62 | IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) | 63 | IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) |
63 | IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) | 64 | IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) |
64 | IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) | 65 | IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) |
66 | IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK) | ||
65 | 67 | ||
66 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ | 68 | #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ |
67 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ | 69 | defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \ |
@@ -130,6 +132,12 @@ IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) | |||
130 | # define soc_is_exynos5250() 0 | 132 | # define soc_is_exynos5250() 0 |
131 | #endif | 133 | #endif |
132 | 134 | ||
135 | #if defined(CONFIG_SOC_EXYNOS5440) | ||
136 | # define soc_is_exynos5440() is_samsung_exynos5440() | ||
137 | #else | ||
138 | # define soc_is_exynos5440() 0 | ||
139 | #endif | ||
140 | |||
133 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | 141 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } |
134 | 142 | ||
135 | #ifndef KHZ | 143 | #ifndef KHZ |
diff --git a/arch/arm/plat-samsung/setup-camif.c b/arch/arm/plat-samsung/setup-camif.c new file mode 100644 index 000000000000..e01bf760af2c --- /dev/null +++ b/arch/arm/plat-samsung/setup-camif.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | ||
3 | * | ||
4 | * Helper functions for S3C24XX/S3C64XX SoC series CAMIF driver | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/gpio.h> | ||
12 | #include <plat/gpio-cfg.h> | ||
13 | |||
14 | /* Number of camera port pins, without FIELD */ | ||
15 | #define S3C_CAMIF_NUM_GPIOS 13 | ||
16 | |||
17 | /* Default camera port configuration helpers. */ | ||
18 | |||
19 | static void camif_get_gpios(int *gpio_start, int *gpio_reset) | ||
20 | { | ||
21 | #ifdef CONFIG_ARCH_S3C24XX | ||
22 | *gpio_start = S3C2410_GPJ(0); | ||
23 | *gpio_reset = S3C2410_GPJ(12); | ||
24 | #else | ||
25 | /* s3c64xx */ | ||
26 | *gpio_start = S3C64XX_GPF(0); | ||
27 | *gpio_reset = S3C64XX_GPF(3); | ||
28 | #endif | ||
29 | } | ||
30 | |||
31 | int s3c_camif_gpio_get(void) | ||
32 | { | ||
33 | int gpio_start, gpio_reset; | ||
34 | int ret, i; | ||
35 | |||
36 | camif_get_gpios(&gpio_start, &gpio_reset); | ||
37 | |||
38 | for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { | ||
39 | int gpio = gpio_start + i; | ||
40 | |||
41 | if (gpio == gpio_reset) | ||
42 | continue; | ||
43 | |||
44 | ret = gpio_request(gpio, "camif"); | ||
45 | if (!ret) | ||
46 | ret = s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
47 | if (ret) { | ||
48 | pr_err("failed to configure GPIO %d\n", gpio); | ||
49 | for (--i; i >= 0; i--) | ||
50 | gpio_free(gpio--); | ||
51 | return ret; | ||
52 | } | ||
53 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
54 | } | ||
55 | |||
56 | return 0; | ||
57 | } | ||
58 | |||
59 | void s3c_camif_gpio_put(void) | ||
60 | { | ||
61 | int i, gpio_start, gpio_reset; | ||
62 | |||
63 | camif_get_gpios(&gpio_start, &gpio_reset); | ||
64 | |||
65 | for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { | ||
66 | int gpio = gpio_start + i; | ||
67 | if (gpio != gpio_reset) | ||
68 | gpio_free(gpio); | ||
69 | } | ||
70 | } | ||
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig index eb50231c4efd..2c4332b9f948 100644 --- a/arch/arm/plat-versatile/Kconfig +++ b/arch/arm/plat-versatile/Kconfig | |||
@@ -6,15 +6,6 @@ config PLAT_VERSATILE_CLOCK | |||
6 | config PLAT_VERSATILE_CLCD | 6 | config PLAT_VERSATILE_CLCD |
7 | bool | 7 | bool |
8 | 8 | ||
9 | config PLAT_VERSATILE_FPGA_IRQ | ||
10 | bool | ||
11 | select IRQ_DOMAIN | ||
12 | |||
13 | config PLAT_VERSATILE_FPGA_IRQ_NR | ||
14 | int | ||
15 | default 4 | ||
16 | depends on PLAT_VERSATILE_FPGA_IRQ | ||
17 | |||
18 | config PLAT_VERSATILE_LEDS | 9 | config PLAT_VERSATILE_LEDS |
19 | def_bool y if NEW_LEDS | 10 | def_bool y if NEW_LEDS |
20 | depends on ARCH_REALVIEW || ARCH_VERSATILE | 11 | depends on ARCH_REALVIEW || ARCH_VERSATILE |
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile index 74cfd94cbf80..f88d448b629c 100644 --- a/arch/arm/plat-versatile/Makefile +++ b/arch/arm/plat-versatile/Makefile | |||
@@ -2,7 +2,6 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include | |||
2 | 2 | ||
3 | obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o | 3 | obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o |
4 | obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o | 4 | obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o |
5 | obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o | ||
6 | obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o | 5 | obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o |
7 | obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o | 6 | obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o |
8 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | 7 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 2701235d5757..a96bda3d3b84 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile | |||
@@ -19,6 +19,7 @@ endif | |||
19 | obj-$(CONFIG_MACH_LOONGSON1) += clk-ls1x.o | 19 | obj-$(CONFIG_MACH_LOONGSON1) += clk-ls1x.o |
20 | obj-$(CONFIG_ARCH_U8500) += ux500/ | 20 | obj-$(CONFIG_ARCH_U8500) += ux500/ |
21 | obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o | 21 | obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o |
22 | obj-$(CONFIG_ARCH_SUNXI) += clk-sunxi.o | ||
22 | 23 | ||
23 | # Chip specific | 24 | # Chip specific |
24 | obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o | 25 | obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o |
diff --git a/drivers/clk/clk-sunxi.c b/drivers/clk/clk-sunxi.c new file mode 100644 index 000000000000..0e831b584ba7 --- /dev/null +++ b/drivers/clk/clk-sunxi.c | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #include <linux/clk-provider.h> | ||
18 | #include <linux/clkdev.h> | ||
19 | #include <linux/clk/sunxi.h> | ||
20 | #include <linux/of.h> | ||
21 | |||
22 | static const __initconst struct of_device_id clk_match[] = { | ||
23 | { .compatible = "fixed-clock", .data = of_fixed_clk_setup, }, | ||
24 | {} | ||
25 | }; | ||
26 | |||
27 | void __init sunxi_init_clocks(void) | ||
28 | { | ||
29 | of_clk_init(clk_match); | ||
30 | } | ||
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 6a78073c3808..a0985732f1e2 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig | |||
@@ -22,6 +22,9 @@ config DW_APB_TIMER_OF | |||
22 | config ARMADA_370_XP_TIMER | 22 | config ARMADA_370_XP_TIMER |
23 | bool | 23 | bool |
24 | 24 | ||
25 | config SUNXI_TIMER | ||
26 | bool | ||
27 | |||
25 | config CLKSRC_DBX500_PRCMU | 28 | config CLKSRC_DBX500_PRCMU |
26 | bool "Clocksource PRCMU Timer" | 29 | bool "Clocksource PRCMU Timer" |
27 | depends on UX500_SOC_DB8500 | 30 | depends on UX500_SOC_DB8500 |
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index 603be366f762..36f06de4c5ab 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile | |||
@@ -14,5 +14,6 @@ obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o | |||
14 | obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o | 14 | obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o |
15 | obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o | 15 | obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o |
16 | obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o | 16 | obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o |
17 | obj-$(CONFIG_SUNXI_TIMER) += sunxi_timer.o | ||
17 | 18 | ||
18 | obj-$(CONFIG_CLKSRC_ARM_GENERIC) += arm_generic.o | 19 | obj-$(CONFIG_CLKSRC_ARM_GENERIC) += arm_generic.o |
diff --git a/drivers/clocksource/sunxi_timer.c b/drivers/clocksource/sunxi_timer.c new file mode 100644 index 000000000000..3cd1bd3d7aee --- /dev/null +++ b/drivers/clocksource/sunxi_timer.c | |||
@@ -0,0 +1,171 @@ | |||
1 | /* | ||
2 | * Allwinner A1X SoCs timer handling. | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * Based on code from | ||
9 | * Allwinner Technology Co., Ltd. <www.allwinnertech.com> | ||
10 | * Benn Huang <benn@allwinnertech.com> | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/clk.h> | ||
18 | #include <linux/clockchips.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/irqreturn.h> | ||
22 | #include <linux/of.h> | ||
23 | #include <linux/of_address.h> | ||
24 | #include <linux/of_irq.h> | ||
25 | #include <linux/sunxi_timer.h> | ||
26 | #include <linux/clk/sunxi.h> | ||
27 | |||
28 | #define TIMER_CTL_REG 0x00 | ||
29 | #define TIMER_CTL_ENABLE (1 << 0) | ||
30 | #define TIMER_IRQ_ST_REG 0x04 | ||
31 | #define TIMER0_CTL_REG 0x10 | ||
32 | #define TIMER0_CTL_ENABLE (1 << 0) | ||
33 | #define TIMER0_CTL_AUTORELOAD (1 << 1) | ||
34 | #define TIMER0_CTL_ONESHOT (1 << 7) | ||
35 | #define TIMER0_INTVAL_REG 0x14 | ||
36 | #define TIMER0_CNTVAL_REG 0x18 | ||
37 | |||
38 | #define TIMER_SCAL 16 | ||
39 | |||
40 | static void __iomem *timer_base; | ||
41 | |||
42 | static void sunxi_clkevt_mode(enum clock_event_mode mode, | ||
43 | struct clock_event_device *clk) | ||
44 | { | ||
45 | u32 u = readl(timer_base + TIMER0_CTL_REG); | ||
46 | |||
47 | switch (mode) { | ||
48 | case CLOCK_EVT_MODE_PERIODIC: | ||
49 | u &= ~(TIMER0_CTL_ONESHOT); | ||
50 | writel(u | TIMER0_CTL_ENABLE, timer_base + TIMER0_CTL_REG); | ||
51 | break; | ||
52 | |||
53 | case CLOCK_EVT_MODE_ONESHOT: | ||
54 | writel(u | TIMER0_CTL_ONESHOT, timer_base + TIMER0_CTL_REG); | ||
55 | break; | ||
56 | case CLOCK_EVT_MODE_UNUSED: | ||
57 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
58 | default: | ||
59 | writel(u & ~(TIMER0_CTL_ENABLE), timer_base + TIMER0_CTL_REG); | ||
60 | break; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | static int sunxi_clkevt_next_event(unsigned long evt, | ||
65 | struct clock_event_device *unused) | ||
66 | { | ||
67 | u32 u = readl(timer_base + TIMER0_CTL_REG); | ||
68 | writel(evt, timer_base + TIMER0_CNTVAL_REG); | ||
69 | writel(u | TIMER0_CTL_ENABLE | TIMER0_CTL_AUTORELOAD, | ||
70 | timer_base + TIMER0_CTL_REG); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static struct clock_event_device sunxi_clockevent = { | ||
76 | .name = "sunxi_tick", | ||
77 | .shift = 32, | ||
78 | .rating = 300, | ||
79 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
80 | .set_mode = sunxi_clkevt_mode, | ||
81 | .set_next_event = sunxi_clkevt_next_event, | ||
82 | }; | ||
83 | |||
84 | |||
85 | static irqreturn_t sunxi_timer_interrupt(int irq, void *dev_id) | ||
86 | { | ||
87 | struct clock_event_device *evt = (struct clock_event_device *)dev_id; | ||
88 | |||
89 | writel(0x1, timer_base + TIMER_IRQ_ST_REG); | ||
90 | evt->event_handler(evt); | ||
91 | |||
92 | return IRQ_HANDLED; | ||
93 | } | ||
94 | |||
95 | static struct irqaction sunxi_timer_irq = { | ||
96 | .name = "sunxi_timer0", | ||
97 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
98 | .handler = sunxi_timer_interrupt, | ||
99 | .dev_id = &sunxi_clockevent, | ||
100 | }; | ||
101 | |||
102 | static struct of_device_id sunxi_timer_dt_ids[] = { | ||
103 | { .compatible = "allwinner,sunxi-timer" }, | ||
104 | { } | ||
105 | }; | ||
106 | |||
107 | static void __init sunxi_timer_init(void) | ||
108 | { | ||
109 | struct device_node *node; | ||
110 | unsigned long rate = 0; | ||
111 | struct clk *clk; | ||
112 | int ret, irq; | ||
113 | u32 val; | ||
114 | |||
115 | node = of_find_matching_node(NULL, sunxi_timer_dt_ids); | ||
116 | if (!node) | ||
117 | panic("No sunxi timer node"); | ||
118 | |||
119 | timer_base = of_iomap(node, 0); | ||
120 | if (!timer_base) | ||
121 | panic("Can't map registers"); | ||
122 | |||
123 | irq = irq_of_parse_and_map(node, 0); | ||
124 | if (irq <= 0) | ||
125 | panic("Can't parse IRQ"); | ||
126 | |||
127 | sunxi_init_clocks(); | ||
128 | |||
129 | clk = of_clk_get(node, 0); | ||
130 | if (IS_ERR(clk)) | ||
131 | panic("Can't get timer clock"); | ||
132 | |||
133 | rate = clk_get_rate(clk); | ||
134 | |||
135 | writel(rate / (TIMER_SCAL * HZ), | ||
136 | timer_base + TIMER0_INTVAL_REG); | ||
137 | |||
138 | /* set clock source to HOSC, 16 pre-division */ | ||
139 | val = readl(timer_base + TIMER0_CTL_REG); | ||
140 | val &= ~(0x07 << 4); | ||
141 | val &= ~(0x03 << 2); | ||
142 | val |= (4 << 4) | (1 << 2); | ||
143 | writel(val, timer_base + TIMER0_CTL_REG); | ||
144 | |||
145 | /* set mode to auto reload */ | ||
146 | val = readl(timer_base + TIMER0_CTL_REG); | ||
147 | writel(val | TIMER0_CTL_AUTORELOAD, timer_base + TIMER0_CTL_REG); | ||
148 | |||
149 | ret = setup_irq(irq, &sunxi_timer_irq); | ||
150 | if (ret) | ||
151 | pr_warn("failed to setup irq %d\n", irq); | ||
152 | |||
153 | /* Enable timer0 interrupt */ | ||
154 | val = readl(timer_base + TIMER_CTL_REG); | ||
155 | writel(val | TIMER_CTL_ENABLE, timer_base + TIMER_CTL_REG); | ||
156 | |||
157 | sunxi_clockevent.mult = div_sc(rate / TIMER_SCAL, | ||
158 | NSEC_PER_SEC, | ||
159 | sunxi_clockevent.shift); | ||
160 | sunxi_clockevent.max_delta_ns = clockevent_delta2ns(0xff, | ||
161 | &sunxi_clockevent); | ||
162 | sunxi_clockevent.min_delta_ns = clockevent_delta2ns(0x1, | ||
163 | &sunxi_clockevent); | ||
164 | sunxi_clockevent.cpumask = cpumask_of(0); | ||
165 | |||
166 | clockevents_register_device(&sunxi_clockevent); | ||
167 | } | ||
168 | |||
169 | struct sys_timer sunxi_timer = { | ||
170 | .init = sunxi_timer_init, | ||
171 | }; | ||
diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig index 234ae651b38f..c4cc27e5c8a5 100644 --- a/drivers/cpuidle/Kconfig +++ b/drivers/cpuidle/Kconfig | |||
@@ -30,3 +30,13 @@ config CPU_IDLE_GOV_MENU | |||
30 | 30 | ||
31 | config ARCH_NEEDS_CPU_IDLE_COUPLED | 31 | config ARCH_NEEDS_CPU_IDLE_COUPLED |
32 | def_bool n | 32 | def_bool n |
33 | |||
34 | if CPU_IDLE | ||
35 | |||
36 | config CPU_IDLE_CALXEDA | ||
37 | bool "CPU Idle Driver for Calxeda processors" | ||
38 | depends on ARCH_HIGHBANK | ||
39 | help | ||
40 | Select this to enable cpuidle on Calxeda processors. | ||
41 | |||
42 | endif | ||
diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile index 38c8f69f30cf..03ee87482c71 100644 --- a/drivers/cpuidle/Makefile +++ b/drivers/cpuidle/Makefile | |||
@@ -4,3 +4,5 @@ | |||
4 | 4 | ||
5 | obj-y += cpuidle.o driver.o governor.o sysfs.o governors/ | 5 | obj-y += cpuidle.o driver.o governor.o sysfs.o governors/ |
6 | obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o | 6 | obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o |
7 | |||
8 | obj-$(CONFIG_CPU_IDLE_CALXEDA) += cpuidle-calxeda.o | ||
diff --git a/drivers/cpuidle/cpuidle-calxeda.c b/drivers/cpuidle/cpuidle-calxeda.c new file mode 100644 index 000000000000..e1aab38c5a8d --- /dev/null +++ b/drivers/cpuidle/cpuidle-calxeda.c | |||
@@ -0,0 +1,161 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Calxeda, Inc. | ||
3 | * | ||
4 | * Based on arch/arm/plat-mxc/cpuidle.c: | ||
5 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
6 | * Copyright 2012 Linaro Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
15 | * more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License along with | ||
18 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #include <linux/cpuidle.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/of.h> | ||
25 | #include <linux/time.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/suspend.h> | ||
28 | #include <asm/cpuidle.h> | ||
29 | #include <asm/proc-fns.h> | ||
30 | #include <asm/smp_scu.h> | ||
31 | #include <asm/suspend.h> | ||
32 | #include <asm/cacheflush.h> | ||
33 | #include <asm/cp15.h> | ||
34 | |||
35 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | ||
36 | extern void *scu_base_addr; | ||
37 | |||
38 | static struct cpuidle_device __percpu *calxeda_idle_cpuidle_devices; | ||
39 | |||
40 | static inline unsigned int get_auxcr(void) | ||
41 | { | ||
42 | unsigned int val; | ||
43 | asm("mrc p15, 0, %0, c1, c0, 1 @ get AUXCR" : "=r" (val) : : "cc"); | ||
44 | return val; | ||
45 | } | ||
46 | |||
47 | static inline void set_auxcr(unsigned int val) | ||
48 | { | ||
49 | asm volatile("mcr p15, 0, %0, c1, c0, 1 @ set AUXCR" | ||
50 | : : "r" (val) : "cc"); | ||
51 | isb(); | ||
52 | } | ||
53 | |||
54 | static noinline void calxeda_idle_restore(void) | ||
55 | { | ||
56 | set_cr(get_cr() | CR_C); | ||
57 | set_auxcr(get_auxcr() | 0x40); | ||
58 | scu_power_mode(scu_base_addr, SCU_PM_NORMAL); | ||
59 | } | ||
60 | |||
61 | static int calxeda_idle_finish(unsigned long val) | ||
62 | { | ||
63 | /* Already flushed cache, but do it again as the outer cache functions | ||
64 | * dirty the cache with spinlocks */ | ||
65 | flush_cache_all(); | ||
66 | |||
67 | set_auxcr(get_auxcr() & ~0x40); | ||
68 | set_cr(get_cr() & ~CR_C); | ||
69 | |||
70 | scu_power_mode(scu_base_addr, SCU_PM_DORMANT); | ||
71 | |||
72 | cpu_do_idle(); | ||
73 | |||
74 | /* Restore things if we didn't enter power-gating */ | ||
75 | calxeda_idle_restore(); | ||
76 | return 1; | ||
77 | } | ||
78 | |||
79 | static int calxeda_pwrdown_idle(struct cpuidle_device *dev, | ||
80 | struct cpuidle_driver *drv, | ||
81 | int index) | ||
82 | { | ||
83 | highbank_set_cpu_jump(smp_processor_id(), cpu_resume); | ||
84 | cpu_suspend(0, calxeda_idle_finish); | ||
85 | return index; | ||
86 | } | ||
87 | |||
88 | static void calxeda_idle_cpuidle_devices_uninit(void) | ||
89 | { | ||
90 | int i; | ||
91 | struct cpuidle_device *dev; | ||
92 | |||
93 | for_each_possible_cpu(i) { | ||
94 | dev = per_cpu_ptr(calxeda_idle_cpuidle_devices, i); | ||
95 | cpuidle_unregister_device(dev); | ||
96 | } | ||
97 | |||
98 | free_percpu(calxeda_idle_cpuidle_devices); | ||
99 | } | ||
100 | |||
101 | static struct cpuidle_driver calxeda_idle_driver = { | ||
102 | .name = "calxeda_idle", | ||
103 | .en_core_tk_irqen = 1, | ||
104 | .states = { | ||
105 | ARM_CPUIDLE_WFI_STATE, | ||
106 | { | ||
107 | .name = "PG", | ||
108 | .desc = "Power Gate", | ||
109 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
110 | .exit_latency = 30, | ||
111 | .power_usage = 50, | ||
112 | .target_residency = 200, | ||
113 | .enter = calxeda_pwrdown_idle, | ||
114 | }, | ||
115 | }, | ||
116 | .state_count = 2, | ||
117 | }; | ||
118 | |||
119 | static int __init calxeda_cpuidle_init(void) | ||
120 | { | ||
121 | int cpu_id; | ||
122 | int ret; | ||
123 | struct cpuidle_device *dev; | ||
124 | struct cpuidle_driver *drv = &calxeda_idle_driver; | ||
125 | |||
126 | if (!of_machine_is_compatible("calxeda,highbank")) | ||
127 | return -ENODEV; | ||
128 | |||
129 | ret = cpuidle_register_driver(drv); | ||
130 | if (ret) | ||
131 | return ret; | ||
132 | |||
133 | calxeda_idle_cpuidle_devices = alloc_percpu(struct cpuidle_device); | ||
134 | if (calxeda_idle_cpuidle_devices == NULL) { | ||
135 | ret = -ENOMEM; | ||
136 | goto unregister_drv; | ||
137 | } | ||
138 | |||
139 | /* initialize state data for each cpuidle_device */ | ||
140 | for_each_possible_cpu(cpu_id) { | ||
141 | dev = per_cpu_ptr(calxeda_idle_cpuidle_devices, cpu_id); | ||
142 | dev->cpu = cpu_id; | ||
143 | dev->state_count = drv->state_count; | ||
144 | |||
145 | ret = cpuidle_register_device(dev); | ||
146 | if (ret) { | ||
147 | pr_err("Failed to register cpu %u, error: %d\n", | ||
148 | cpu_id, ret); | ||
149 | goto uninit; | ||
150 | } | ||
151 | } | ||
152 | |||
153 | return 0; | ||
154 | |||
155 | uninit: | ||
156 | calxeda_idle_cpuidle_devices_uninit(); | ||
157 | unregister_drv: | ||
158 | cpuidle_unregister_driver(drv); | ||
159 | return ret; | ||
160 | } | ||
161 | module_init(calxeda_cpuidle_init); | ||
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 1bb8bf6d7fd4..62ca575701d3 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig | |||
@@ -1 +1,8 @@ | |||
1 | # empty | 1 | config VERSATILE_FPGA_IRQ |
2 | bool | ||
3 | select IRQ_DOMAIN | ||
4 | |||
5 | config VERSATILE_FPGA_IRQ_NR | ||
6 | int | ||
7 | default 4 | ||
8 | depends on VERSATILE_FPGA_IRQ | ||
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index 054321db4350..02bd37a6187f 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile | |||
@@ -1 +1,3 @@ | |||
1 | obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o | 1 | obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o |
2 | obj-$(CONFIG_ARCH_SUNXI) += irq-sunxi.o | ||
3 | obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o | ||
diff --git a/drivers/irqchip/irq-sunxi.c b/drivers/irqchip/irq-sunxi.c new file mode 100644 index 000000000000..10974fa42653 --- /dev/null +++ b/drivers/irqchip/irq-sunxi.c | |||
@@ -0,0 +1,151 @@ | |||
1 | /* | ||
2 | * Allwinner A1X SoCs IRQ chip driver. | ||
3 | * | ||
4 | * Copyright (C) 2012 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * Based on code from | ||
9 | * Allwinner Technology Co., Ltd. <www.allwinnertech.com> | ||
10 | * Benn Huang <benn@allwinnertech.com> | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/io.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/of.h> | ||
20 | #include <linux/of_address.h> | ||
21 | #include <linux/of_irq.h> | ||
22 | |||
23 | #include <linux/irqchip/sunxi.h> | ||
24 | |||
25 | #define SUNXI_IRQ_VECTOR_REG 0x00 | ||
26 | #define SUNXI_IRQ_PROTECTION_REG 0x08 | ||
27 | #define SUNXI_IRQ_NMI_CTRL_REG 0x0c | ||
28 | #define SUNXI_IRQ_PENDING_REG(x) (0x10 + 0x4 * x) | ||
29 | #define SUNXI_IRQ_FIQ_PENDING_REG(x) (0x20 + 0x4 * x) | ||
30 | #define SUNXI_IRQ_ENABLE_REG(x) (0x40 + 0x4 * x) | ||
31 | #define SUNXI_IRQ_MASK_REG(x) (0x50 + 0x4 * x) | ||
32 | |||
33 | static void __iomem *sunxi_irq_base; | ||
34 | static struct irq_domain *sunxi_irq_domain; | ||
35 | |||
36 | void sunxi_irq_ack(struct irq_data *irqd) | ||
37 | { | ||
38 | unsigned int irq = irqd_to_hwirq(irqd); | ||
39 | unsigned int irq_off = irq % 32; | ||
40 | int reg = irq / 32; | ||
41 | u32 val; | ||
42 | |||
43 | val = readl(sunxi_irq_base + SUNXI_IRQ_PENDING_REG(reg)); | ||
44 | writel(val | (1 << irq_off), | ||
45 | sunxi_irq_base + SUNXI_IRQ_PENDING_REG(reg)); | ||
46 | } | ||
47 | |||
48 | static void sunxi_irq_mask(struct irq_data *irqd) | ||
49 | { | ||
50 | unsigned int irq = irqd_to_hwirq(irqd); | ||
51 | unsigned int irq_off = irq % 32; | ||
52 | int reg = irq / 32; | ||
53 | u32 val; | ||
54 | |||
55 | val = readl(sunxi_irq_base + SUNXI_IRQ_ENABLE_REG(reg)); | ||
56 | writel(val & ~(1 << irq_off), | ||
57 | sunxi_irq_base + SUNXI_IRQ_ENABLE_REG(reg)); | ||
58 | } | ||
59 | |||
60 | static void sunxi_irq_unmask(struct irq_data *irqd) | ||
61 | { | ||
62 | unsigned int irq = irqd_to_hwirq(irqd); | ||
63 | unsigned int irq_off = irq % 32; | ||
64 | int reg = irq / 32; | ||
65 | u32 val; | ||
66 | |||
67 | val = readl(sunxi_irq_base + SUNXI_IRQ_ENABLE_REG(reg)); | ||
68 | writel(val | (1 << irq_off), | ||
69 | sunxi_irq_base + SUNXI_IRQ_ENABLE_REG(reg)); | ||
70 | } | ||
71 | |||
72 | static struct irq_chip sunxi_irq_chip = { | ||
73 | .name = "sunxi_irq", | ||
74 | .irq_ack = sunxi_irq_ack, | ||
75 | .irq_mask = sunxi_irq_mask, | ||
76 | .irq_unmask = sunxi_irq_unmask, | ||
77 | }; | ||
78 | |||
79 | static int sunxi_irq_map(struct irq_domain *d, unsigned int virq, | ||
80 | irq_hw_number_t hw) | ||
81 | { | ||
82 | irq_set_chip_and_handler(virq, &sunxi_irq_chip, | ||
83 | handle_level_irq); | ||
84 | set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); | ||
85 | |||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static struct irq_domain_ops sunxi_irq_ops = { | ||
90 | .map = sunxi_irq_map, | ||
91 | .xlate = irq_domain_xlate_onecell, | ||
92 | }; | ||
93 | |||
94 | static int __init sunxi_of_init(struct device_node *node, | ||
95 | struct device_node *parent) | ||
96 | { | ||
97 | sunxi_irq_base = of_iomap(node, 0); | ||
98 | if (!sunxi_irq_base) | ||
99 | panic("%s: unable to map IC registers\n", | ||
100 | node->full_name); | ||
101 | |||
102 | /* Disable all interrupts */ | ||
103 | writel(0, sunxi_irq_base + SUNXI_IRQ_ENABLE_REG(0)); | ||
104 | writel(0, sunxi_irq_base + SUNXI_IRQ_ENABLE_REG(1)); | ||
105 | writel(0, sunxi_irq_base + SUNXI_IRQ_ENABLE_REG(2)); | ||
106 | |||
107 | /* Mask all the interrupts */ | ||
108 | writel(0, sunxi_irq_base + SUNXI_IRQ_MASK_REG(0)); | ||
109 | writel(0, sunxi_irq_base + SUNXI_IRQ_MASK_REG(1)); | ||
110 | writel(0, sunxi_irq_base + SUNXI_IRQ_MASK_REG(2)); | ||
111 | |||
112 | /* Clear all the pending interrupts */ | ||
113 | writel(0xffffffff, sunxi_irq_base + SUNXI_IRQ_PENDING_REG(0)); | ||
114 | writel(0xffffffff, sunxi_irq_base + SUNXI_IRQ_PENDING_REG(1)); | ||
115 | writel(0xffffffff, sunxi_irq_base + SUNXI_IRQ_PENDING_REG(2)); | ||
116 | |||
117 | /* Enable protection mode */ | ||
118 | writel(0x01, sunxi_irq_base + SUNXI_IRQ_PROTECTION_REG); | ||
119 | |||
120 | /* Configure the external interrupt source type */ | ||
121 | writel(0x00, sunxi_irq_base + SUNXI_IRQ_NMI_CTRL_REG); | ||
122 | |||
123 | sunxi_irq_domain = irq_domain_add_linear(node, 3 * 32, | ||
124 | &sunxi_irq_ops, NULL); | ||
125 | if (!sunxi_irq_domain) | ||
126 | panic("%s: unable to create IRQ domain\n", node->full_name); | ||
127 | |||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static struct of_device_id sunxi_irq_dt_ids[] __initconst = { | ||
132 | { .compatible = "allwinner,sunxi-ic", .data = sunxi_of_init }, | ||
133 | { } | ||
134 | }; | ||
135 | |||
136 | void __init sunxi_init_irq(void) | ||
137 | { | ||
138 | of_irq_init(sunxi_irq_dt_ids); | ||
139 | } | ||
140 | |||
141 | asmlinkage void __exception_irq_entry sunxi_handle_irq(struct pt_regs *regs) | ||
142 | { | ||
143 | u32 irq, hwirq; | ||
144 | |||
145 | hwirq = readl(sunxi_irq_base + SUNXI_IRQ_VECTOR_REG) >> 2; | ||
146 | while (hwirq != 0) { | ||
147 | irq = irq_find_mapping(sunxi_irq_domain, hwirq); | ||
148 | handle_IRQ(irq, regs); | ||
149 | hwirq = readl(sunxi_irq_base + SUNXI_IRQ_VECTOR_REG) >> 2; | ||
150 | } | ||
151 | } | ||
diff --git a/arch/arm/plat-versatile/fpga-irq.c b/drivers/irqchip/irq-versatile-fpga.c index 091ae1030045..9dbd82b716d3 100644 --- a/arch/arm/plat-versatile/fpga-irq.c +++ b/drivers/irqchip/irq-versatile-fpga.c | |||
@@ -1,8 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * Support for Versatile FPGA-based IRQ controllers | 2 | * Support for Versatile FPGA-based IRQ controllers |
3 | */ | 3 | */ |
4 | #include <linux/bitops.h> | ||
4 | #include <linux/irq.h> | 5 | #include <linux/irq.h> |
5 | #include <linux/io.h> | 6 | #include <linux/io.h> |
7 | #include <linux/irqchip/versatile-fpga.h> | ||
6 | #include <linux/irqdomain.h> | 8 | #include <linux/irqdomain.h> |
7 | #include <linux/module.h> | 9 | #include <linux/module.h> |
8 | #include <linux/of.h> | 10 | #include <linux/of.h> |
@@ -10,7 +12,6 @@ | |||
10 | 12 | ||
11 | #include <asm/exception.h> | 13 | #include <asm/exception.h> |
12 | #include <asm/mach/irq.h> | 14 | #include <asm/mach/irq.h> |
13 | #include <plat/fpga-irq.h> | ||
14 | 15 | ||
15 | #define IRQ_STATUS 0x00 | 16 | #define IRQ_STATUS 0x00 |
16 | #define IRQ_RAW_STATUS 0x04 | 17 | #define IRQ_RAW_STATUS 0x04 |
@@ -41,7 +42,7 @@ struct fpga_irq_data { | |||
41 | }; | 42 | }; |
42 | 43 | ||
43 | /* we cannot allocate memory when the controllers are initially registered */ | 44 | /* we cannot allocate memory when the controllers are initially registered */ |
44 | static struct fpga_irq_data fpga_irq_devices[CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR]; | 45 | static struct fpga_irq_data fpga_irq_devices[CONFIG_VERSATILE_FPGA_IRQ_NR]; |
45 | static int fpga_irq_id; | 46 | static int fpga_irq_id; |
46 | 47 | ||
47 | static void fpga_irq_mask(struct irq_data *d) | 48 | static void fpga_irq_mask(struct irq_data *d) |
@@ -117,13 +118,12 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq, | |||
117 | struct fpga_irq_data *f = d->host_data; | 118 | struct fpga_irq_data *f = d->host_data; |
118 | 119 | ||
119 | /* Skip invalid IRQs, only register handlers for the real ones */ | 120 | /* Skip invalid IRQs, only register handlers for the real ones */ |
120 | if (!(f->valid & (1 << hwirq))) | 121 | if (!(f->valid & BIT(hwirq))) |
121 | return -ENOTSUPP; | 122 | return -ENOTSUPP; |
122 | irq_set_chip_data(irq, f); | 123 | irq_set_chip_data(irq, f); |
123 | irq_set_chip_and_handler(irq, &f->chip, | 124 | irq_set_chip_and_handler(irq, &f->chip, |
124 | handle_level_irq); | 125 | handle_level_irq); |
125 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 126 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
126 | f->used_irqs++; | ||
127 | return 0; | 127 | return 0; |
128 | } | 128 | } |
129 | 129 | ||
@@ -132,13 +132,15 @@ static struct irq_domain_ops fpga_irqdomain_ops = { | |||
132 | .xlate = irq_domain_xlate_onetwocell, | 132 | .xlate = irq_domain_xlate_onetwocell, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static __init struct fpga_irq_data * | 135 | void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, |
136 | fpga_irq_prep_struct(void __iomem *base, const char *name, u32 valid) { | 136 | int parent_irq, u32 valid, struct device_node *node) |
137 | { | ||
137 | struct fpga_irq_data *f; | 138 | struct fpga_irq_data *f; |
139 | int i; | ||
138 | 140 | ||
139 | if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { | 141 | if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { |
140 | printk(KERN_ERR "%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); | 142 | pr_err("%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); |
141 | return NULL; | 143 | return; |
142 | } | 144 | } |
143 | f = &fpga_irq_devices[fpga_irq_id]; | 145 | f = &fpga_irq_devices[fpga_irq_id]; |
144 | f->base = base; | 146 | f->base = base; |
@@ -147,36 +149,34 @@ fpga_irq_prep_struct(void __iomem *base, const char *name, u32 valid) { | |||
147 | f->chip.irq_mask = fpga_irq_mask; | 149 | f->chip.irq_mask = fpga_irq_mask; |
148 | f->chip.irq_unmask = fpga_irq_unmask; | 150 | f->chip.irq_unmask = fpga_irq_unmask; |
149 | f->valid = valid; | 151 | f->valid = valid; |
150 | fpga_irq_id++; | ||
151 | |||
152 | return f; | ||
153 | } | ||
154 | |||
155 | void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, | ||
156 | int parent_irq, u32 valid, struct device_node *node) | ||
157 | { | ||
158 | struct fpga_irq_data *f; | ||
159 | |||
160 | f = fpga_irq_prep_struct(base, name, valid); | ||
161 | if (!f) | ||
162 | return; | ||
163 | 152 | ||
164 | if (parent_irq != -1) { | 153 | if (parent_irq != -1) { |
165 | irq_set_handler_data(parent_irq, f); | 154 | irq_set_handler_data(parent_irq, f); |
166 | irq_set_chained_handler(parent_irq, fpga_irq_handle); | 155 | irq_set_chained_handler(parent_irq, fpga_irq_handle); |
167 | } | 156 | } |
168 | 157 | ||
169 | f->domain = irq_domain_add_legacy(node, fls(valid), irq_start, 0, | 158 | /* This will also allocate irq descriptors */ |
159 | f->domain = irq_domain_add_simple(node, fls(valid), irq_start, | ||
170 | &fpga_irqdomain_ops, f); | 160 | &fpga_irqdomain_ops, f); |
161 | |||
162 | /* This will allocate all valid descriptors in the linear case */ | ||
163 | for (i = 0; i < fls(valid); i++) | ||
164 | if (valid & BIT(i)) { | ||
165 | if (!irq_start) | ||
166 | irq_create_mapping(f->domain, i); | ||
167 | f->used_irqs++; | ||
168 | } | ||
169 | |||
171 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", | 170 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", |
172 | fpga_irq_id, name, base, f->used_irqs); | 171 | fpga_irq_id, name, base, f->used_irqs); |
172 | |||
173 | fpga_irq_id++; | ||
173 | } | 174 | } |
174 | 175 | ||
175 | #ifdef CONFIG_OF | 176 | #ifdef CONFIG_OF |
176 | int __init fpga_irq_of_init(struct device_node *node, | 177 | int __init fpga_irq_of_init(struct device_node *node, |
177 | struct device_node *parent) | 178 | struct device_node *parent) |
178 | { | 179 | { |
179 | struct fpga_irq_data *f; | ||
180 | void __iomem *base; | 180 | void __iomem *base; |
181 | u32 clear_mask; | 181 | u32 clear_mask; |
182 | u32 valid_mask; | 182 | u32 valid_mask; |
@@ -193,18 +193,11 @@ int __init fpga_irq_of_init(struct device_node *node, | |||
193 | if (of_property_read_u32(node, "valid-mask", &valid_mask)) | 193 | if (of_property_read_u32(node, "valid-mask", &valid_mask)) |
194 | valid_mask = 0; | 194 | valid_mask = 0; |
195 | 195 | ||
196 | f = fpga_irq_prep_struct(base, node->name, valid_mask); | 196 | fpga_irq_init(base, node->name, 0, -1, valid_mask, node); |
197 | if (!f) | ||
198 | return -ENOMEM; | ||
199 | 197 | ||
200 | writel(clear_mask, base + IRQ_ENABLE_CLEAR); | 198 | writel(clear_mask, base + IRQ_ENABLE_CLEAR); |
201 | writel(clear_mask, base + FIQ_ENABLE_CLEAR); | 199 | writel(clear_mask, base + FIQ_ENABLE_CLEAR); |
202 | 200 | ||
203 | f->domain = irq_domain_add_linear(node, fls(valid_mask), &fpga_irqdomain_ops, f); | ||
204 | f->used_irqs = hweight32(valid_mask); | ||
205 | |||
206 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", | ||
207 | fpga_irq_id, node->name, base, f->used_irqs); | ||
208 | return 0; | 201 | return 0; |
209 | } | 202 | } |
210 | #endif | 203 | #endif |
diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index 8ac9b72b5ec7..791cd1d54a76 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c | |||
@@ -278,7 +278,8 @@ struct mx2_camera_dev { | |||
278 | struct device *dev; | 278 | struct device *dev; |
279 | struct soc_camera_host soc_host; | 279 | struct soc_camera_host soc_host; |
280 | struct soc_camera_device *icd; | 280 | struct soc_camera_device *icd; |
281 | struct clk *clk_csi, *clk_emma_ahb, *clk_emma_ipg; | 281 | struct clk *clk_emma_ahb, *clk_emma_ipg; |
282 | struct clk *clk_csi_ahb, *clk_csi_per; | ||
282 | 283 | ||
283 | void __iomem *base_csi, *base_emma; | 284 | void __iomem *base_csi, *base_emma; |
284 | 285 | ||
@@ -464,7 +465,8 @@ static void mx2_camera_deactivate(struct mx2_camera_dev *pcdev) | |||
464 | { | 465 | { |
465 | unsigned long flags; | 466 | unsigned long flags; |
466 | 467 | ||
467 | clk_disable_unprepare(pcdev->clk_csi); | 468 | clk_disable_unprepare(pcdev->clk_csi_ahb); |
469 | clk_disable_unprepare(pcdev->clk_csi_per); | ||
468 | writel(0, pcdev->base_csi + CSICR1); | 470 | writel(0, pcdev->base_csi + CSICR1); |
469 | if (is_imx27_camera(pcdev)) { | 471 | if (is_imx27_camera(pcdev)) { |
470 | writel(0, pcdev->base_emma + PRP_CNTL); | 472 | writel(0, pcdev->base_emma + PRP_CNTL); |
@@ -492,10 +494,14 @@ static int mx2_camera_add_device(struct soc_camera_device *icd) | |||
492 | if (pcdev->icd) | 494 | if (pcdev->icd) |
493 | return -EBUSY; | 495 | return -EBUSY; |
494 | 496 | ||
495 | ret = clk_prepare_enable(pcdev->clk_csi); | 497 | ret = clk_prepare_enable(pcdev->clk_csi_ahb); |
496 | if (ret < 0) | 498 | if (ret < 0) |
497 | return ret; | 499 | return ret; |
498 | 500 | ||
501 | ret = clk_prepare_enable(pcdev->clk_csi_per); | ||
502 | if (ret < 0) | ||
503 | goto exit_csi_ahb; | ||
504 | |||
499 | csicr1 = CSICR1_MCLKEN; | 505 | csicr1 = CSICR1_MCLKEN; |
500 | 506 | ||
501 | if (is_imx27_camera(pcdev)) | 507 | if (is_imx27_camera(pcdev)) |
@@ -512,6 +518,11 @@ static int mx2_camera_add_device(struct soc_camera_device *icd) | |||
512 | icd->devnum); | 518 | icd->devnum); |
513 | 519 | ||
514 | return 0; | 520 | return 0; |
521 | |||
522 | exit_csi_ahb: | ||
523 | clk_disable_unprepare(pcdev->clk_csi_ahb); | ||
524 | |||
525 | return ret; | ||
515 | } | 526 | } |
516 | 527 | ||
517 | static void mx2_camera_remove_device(struct soc_camera_device *icd) | 528 | static void mx2_camera_remove_device(struct soc_camera_device *icd) |
@@ -1777,10 +1788,17 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
1777 | break; | 1788 | break; |
1778 | } | 1789 | } |
1779 | 1790 | ||
1780 | pcdev->clk_csi = devm_clk_get(&pdev->dev, "ahb"); | 1791 | pcdev->clk_csi_ahb = devm_clk_get(&pdev->dev, "ahb"); |
1781 | if (IS_ERR(pcdev->clk_csi)) { | 1792 | if (IS_ERR(pcdev->clk_csi_ahb)) { |
1782 | dev_err(&pdev->dev, "Could not get csi clock\n"); | 1793 | dev_err(&pdev->dev, "Could not get csi ahb clock\n"); |
1783 | err = PTR_ERR(pcdev->clk_csi); | 1794 | err = PTR_ERR(pcdev->clk_csi_ahb); |
1795 | goto exit; | ||
1796 | } | ||
1797 | |||
1798 | pcdev->clk_csi_per = devm_clk_get(&pdev->dev, "per"); | ||
1799 | if (IS_ERR(pcdev->clk_csi_per)) { | ||
1800 | dev_err(&pdev->dev, "Could not get csi per clock\n"); | ||
1801 | err = PTR_ERR(pcdev->clk_csi_per); | ||
1784 | goto exit; | 1802 | goto exit; |
1785 | } | 1803 | } |
1786 | 1804 | ||
@@ -1790,12 +1808,13 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
1790 | 1808 | ||
1791 | pcdev->platform_flags = pcdev->pdata->flags; | 1809 | pcdev->platform_flags = pcdev->pdata->flags; |
1792 | 1810 | ||
1793 | rate = clk_round_rate(pcdev->clk_csi, pcdev->pdata->clk * 2); | 1811 | rate = clk_round_rate(pcdev->clk_csi_per, |
1812 | pcdev->pdata->clk * 2); | ||
1794 | if (rate <= 0) { | 1813 | if (rate <= 0) { |
1795 | err = -ENODEV; | 1814 | err = -ENODEV; |
1796 | goto exit; | 1815 | goto exit; |
1797 | } | 1816 | } |
1798 | err = clk_set_rate(pcdev->clk_csi, rate); | 1817 | err = clk_set_rate(pcdev->clk_csi_per, rate); |
1799 | if (err < 0) | 1818 | if (err < 0) |
1800 | goto exit; | 1819 | goto exit; |
1801 | } | 1820 | } |
@@ -1853,7 +1872,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
1853 | goto exit_free_emma; | 1872 | goto exit_free_emma; |
1854 | 1873 | ||
1855 | dev_info(&pdev->dev, "MX2 Camera (CSI) driver probed, clock frequency: %ld\n", | 1874 | dev_info(&pdev->dev, "MX2 Camera (CSI) driver probed, clock frequency: %ld\n", |
1856 | clk_get_rate(pcdev->clk_csi)); | 1875 | clk_get_rate(pcdev->clk_csi_per)); |
1857 | 1876 | ||
1858 | return 0; | 1877 | return 0; |
1859 | 1878 | ||
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 2c10938b3567..94bdf83b4bc8 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
@@ -1080,3 +1080,9 @@ config MCP_UCB1200_TS | |||
1080 | depends on MCP_UCB1200 && INPUT | 1080 | depends on MCP_UCB1200 && INPUT |
1081 | 1081 | ||
1082 | endmenu | 1082 | endmenu |
1083 | |||
1084 | config VEXPRESS_CONFIG | ||
1085 | bool | ||
1086 | help | ||
1087 | Platform configuration infrastructure for the ARM Ltd. | ||
1088 | Versatile Express. | ||
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index b53db06d1b46..69f260ae0225 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile | |||
@@ -141,3 +141,4 @@ obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o | |||
141 | obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o | 141 | obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o |
142 | obj-$(CONFIG_MFD_SYSCON) += syscon.o | 142 | obj-$(CONFIG_MFD_SYSCON) += syscon.o |
143 | obj-$(CONFIG_MFD_LM3533) += lm3533-core.o lm3533-ctrlbank.o | 143 | obj-$(CONFIG_MFD_LM3533) += lm3533-core.o lm3533-ctrlbank.o |
144 | obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-config.o vexpress-sysreg.o | ||
diff --git a/drivers/mfd/vexpress-config.c b/drivers/mfd/vexpress-config.c new file mode 100644 index 000000000000..fae15d880758 --- /dev/null +++ b/drivers/mfd/vexpress-config.c | |||
@@ -0,0 +1,277 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License version 2 as | ||
4 | * published by the Free Software Foundation. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * Copyright (C) 2012 ARM Limited | ||
12 | */ | ||
13 | |||
14 | #define pr_fmt(fmt) "vexpress-config: " fmt | ||
15 | |||
16 | #include <linux/bitops.h> | ||
17 | #include <linux/completion.h> | ||
18 | #include <linux/export.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/list.h> | ||
21 | #include <linux/of.h> | ||
22 | #include <linux/of_device.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/string.h> | ||
25 | #include <linux/vexpress.h> | ||
26 | |||
27 | |||
28 | #define VEXPRESS_CONFIG_MAX_BRIDGES 2 | ||
29 | |||
30 | struct vexpress_config_bridge { | ||
31 | struct device_node *node; | ||
32 | struct vexpress_config_bridge_info *info; | ||
33 | struct list_head transactions; | ||
34 | spinlock_t transactions_lock; | ||
35 | } vexpress_config_bridges[VEXPRESS_CONFIG_MAX_BRIDGES]; | ||
36 | |||
37 | static DECLARE_BITMAP(vexpress_config_bridges_map, | ||
38 | ARRAY_SIZE(vexpress_config_bridges)); | ||
39 | static DEFINE_MUTEX(vexpress_config_bridges_mutex); | ||
40 | |||
41 | struct vexpress_config_bridge *vexpress_config_bridge_register( | ||
42 | struct device_node *node, | ||
43 | struct vexpress_config_bridge_info *info) | ||
44 | { | ||
45 | struct vexpress_config_bridge *bridge; | ||
46 | int i; | ||
47 | |||
48 | pr_debug("Registering bridge '%s'\n", info->name); | ||
49 | |||
50 | mutex_lock(&vexpress_config_bridges_mutex); | ||
51 | i = find_first_zero_bit(vexpress_config_bridges_map, | ||
52 | ARRAY_SIZE(vexpress_config_bridges)); | ||
53 | if (i >= ARRAY_SIZE(vexpress_config_bridges)) { | ||
54 | pr_err("Can't register more bridges!\n"); | ||
55 | mutex_unlock(&vexpress_config_bridges_mutex); | ||
56 | return NULL; | ||
57 | } | ||
58 | __set_bit(i, vexpress_config_bridges_map); | ||
59 | bridge = &vexpress_config_bridges[i]; | ||
60 | |||
61 | bridge->node = node; | ||
62 | bridge->info = info; | ||
63 | INIT_LIST_HEAD(&bridge->transactions); | ||
64 | spin_lock_init(&bridge->transactions_lock); | ||
65 | |||
66 | mutex_unlock(&vexpress_config_bridges_mutex); | ||
67 | |||
68 | return bridge; | ||
69 | } | ||
70 | |||
71 | void vexpress_config_bridge_unregister(struct vexpress_config_bridge *bridge) | ||
72 | { | ||
73 | struct vexpress_config_bridge __bridge = *bridge; | ||
74 | int i; | ||
75 | |||
76 | mutex_lock(&vexpress_config_bridges_mutex); | ||
77 | for (i = 0; i < ARRAY_SIZE(vexpress_config_bridges); i++) | ||
78 | if (&vexpress_config_bridges[i] == bridge) | ||
79 | __clear_bit(i, vexpress_config_bridges_map); | ||
80 | mutex_unlock(&vexpress_config_bridges_mutex); | ||
81 | |||
82 | WARN_ON(!list_empty(&__bridge.transactions)); | ||
83 | while (!list_empty(&__bridge.transactions)) | ||
84 | cpu_relax(); | ||
85 | } | ||
86 | |||
87 | |||
88 | struct vexpress_config_func { | ||
89 | struct vexpress_config_bridge *bridge; | ||
90 | void *func; | ||
91 | }; | ||
92 | |||
93 | struct vexpress_config_func *__vexpress_config_func_get(struct device *dev, | ||
94 | struct device_node *node) | ||
95 | { | ||
96 | struct device_node *bridge_node; | ||
97 | struct vexpress_config_func *func; | ||
98 | int i; | ||
99 | |||
100 | if (WARN_ON(dev && node && dev->of_node != node)) | ||
101 | return NULL; | ||
102 | if (dev && !node) | ||
103 | node = dev->of_node; | ||
104 | |||
105 | func = kzalloc(sizeof(*func), GFP_KERNEL); | ||
106 | if (!func) | ||
107 | return NULL; | ||
108 | |||
109 | bridge_node = of_node_get(node); | ||
110 | while (bridge_node) { | ||
111 | const __be32 *prop = of_get_property(bridge_node, | ||
112 | "arm,vexpress,config-bridge", NULL); | ||
113 | |||
114 | if (prop) { | ||
115 | bridge_node = of_find_node_by_phandle( | ||
116 | be32_to_cpup(prop)); | ||
117 | break; | ||
118 | } | ||
119 | |||
120 | bridge_node = of_get_next_parent(bridge_node); | ||
121 | } | ||
122 | |||
123 | mutex_lock(&vexpress_config_bridges_mutex); | ||
124 | for (i = 0; i < ARRAY_SIZE(vexpress_config_bridges); i++) { | ||
125 | struct vexpress_config_bridge *bridge = | ||
126 | &vexpress_config_bridges[i]; | ||
127 | |||
128 | if (test_bit(i, vexpress_config_bridges_map) && | ||
129 | bridge->node == bridge_node) { | ||
130 | func->bridge = bridge; | ||
131 | func->func = bridge->info->func_get(dev, node); | ||
132 | break; | ||
133 | } | ||
134 | } | ||
135 | mutex_unlock(&vexpress_config_bridges_mutex); | ||
136 | |||
137 | if (!func->func) { | ||
138 | of_node_put(node); | ||
139 | kfree(func); | ||
140 | return NULL; | ||
141 | } | ||
142 | |||
143 | return func; | ||
144 | } | ||
145 | |||
146 | void vexpress_config_func_put(struct vexpress_config_func *func) | ||
147 | { | ||
148 | func->bridge->info->func_put(func->func); | ||
149 | of_node_put(func->bridge->node); | ||
150 | kfree(func); | ||
151 | } | ||
152 | |||
153 | |||
154 | struct vexpress_config_trans { | ||
155 | struct vexpress_config_func *func; | ||
156 | int offset; | ||
157 | bool write; | ||
158 | u32 *data; | ||
159 | int status; | ||
160 | struct completion completion; | ||
161 | struct list_head list; | ||
162 | }; | ||
163 | |||
164 | static void vexpress_config_dump_trans(const char *what, | ||
165 | struct vexpress_config_trans *trans) | ||
166 | { | ||
167 | pr_debug("%s %s trans %p func 0x%p offset %d data 0x%x status %d\n", | ||
168 | what, trans->write ? "write" : "read", trans, | ||
169 | trans->func->func, trans->offset, | ||
170 | trans->data ? *trans->data : 0, trans->status); | ||
171 | } | ||
172 | |||
173 | static int vexpress_config_schedule(struct vexpress_config_trans *trans) | ||
174 | { | ||
175 | int status; | ||
176 | struct vexpress_config_bridge *bridge = trans->func->bridge; | ||
177 | unsigned long flags; | ||
178 | |||
179 | init_completion(&trans->completion); | ||
180 | trans->status = -EFAULT; | ||
181 | |||
182 | spin_lock_irqsave(&bridge->transactions_lock, flags); | ||
183 | |||
184 | vexpress_config_dump_trans("Executing", trans); | ||
185 | |||
186 | if (list_empty(&bridge->transactions)) | ||
187 | status = bridge->info->func_exec(trans->func->func, | ||
188 | trans->offset, trans->write, trans->data); | ||
189 | else | ||
190 | status = VEXPRESS_CONFIG_STATUS_WAIT; | ||
191 | |||
192 | switch (status) { | ||
193 | case VEXPRESS_CONFIG_STATUS_DONE: | ||
194 | vexpress_config_dump_trans("Finished", trans); | ||
195 | trans->status = status; | ||
196 | break; | ||
197 | case VEXPRESS_CONFIG_STATUS_WAIT: | ||
198 | list_add_tail(&trans->list, &bridge->transactions); | ||
199 | break; | ||
200 | } | ||
201 | |||
202 | spin_unlock_irqrestore(&bridge->transactions_lock, flags); | ||
203 | |||
204 | return status; | ||
205 | } | ||
206 | |||
207 | void vexpress_config_complete(struct vexpress_config_bridge *bridge, | ||
208 | int status) | ||
209 | { | ||
210 | struct vexpress_config_trans *trans; | ||
211 | unsigned long flags; | ||
212 | |||
213 | spin_lock_irqsave(&bridge->transactions_lock, flags); | ||
214 | |||
215 | trans = list_first_entry(&bridge->transactions, | ||
216 | struct vexpress_config_trans, list); | ||
217 | vexpress_config_dump_trans("Completed", trans); | ||
218 | |||
219 | trans->status = status; | ||
220 | list_del(&trans->list); | ||
221 | |||
222 | if (!list_empty(&bridge->transactions)) { | ||
223 | vexpress_config_dump_trans("Pending", trans); | ||
224 | |||
225 | bridge->info->func_exec(trans->func->func, trans->offset, | ||
226 | trans->write, trans->data); | ||
227 | } | ||
228 | spin_unlock_irqrestore(&bridge->transactions_lock, flags); | ||
229 | |||
230 | complete(&trans->completion); | ||
231 | } | ||
232 | |||
233 | int vexpress_config_wait(struct vexpress_config_trans *trans) | ||
234 | { | ||
235 | wait_for_completion(&trans->completion); | ||
236 | |||
237 | return trans->status; | ||
238 | } | ||
239 | |||
240 | |||
241 | int vexpress_config_read(struct vexpress_config_func *func, int offset, | ||
242 | u32 *data) | ||
243 | { | ||
244 | struct vexpress_config_trans trans = { | ||
245 | .func = func, | ||
246 | .offset = offset, | ||
247 | .write = false, | ||
248 | .data = data, | ||
249 | .status = 0, | ||
250 | }; | ||
251 | int status = vexpress_config_schedule(&trans); | ||
252 | |||
253 | if (status == VEXPRESS_CONFIG_STATUS_WAIT) | ||
254 | status = vexpress_config_wait(&trans); | ||
255 | |||
256 | return status; | ||
257 | } | ||
258 | EXPORT_SYMBOL(vexpress_config_read); | ||
259 | |||
260 | int vexpress_config_write(struct vexpress_config_func *func, int offset, | ||
261 | u32 data) | ||
262 | { | ||
263 | struct vexpress_config_trans trans = { | ||
264 | .func = func, | ||
265 | .offset = offset, | ||
266 | .write = true, | ||
267 | .data = &data, | ||
268 | .status = 0, | ||
269 | }; | ||
270 | int status = vexpress_config_schedule(&trans); | ||
271 | |||
272 | if (status == VEXPRESS_CONFIG_STATUS_WAIT) | ||
273 | status = vexpress_config_wait(&trans); | ||
274 | |||
275 | return status; | ||
276 | } | ||
277 | EXPORT_SYMBOL(vexpress_config_write); | ||
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c new file mode 100644 index 000000000000..733c06bd2d17 --- /dev/null +++ b/drivers/mfd/vexpress-sysreg.c | |||
@@ -0,0 +1,475 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License version 2 as | ||
4 | * published by the Free Software Foundation. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * Copyright (C) 2012 ARM Limited | ||
12 | */ | ||
13 | |||
14 | #include <linux/err.h> | ||
15 | #include <linux/gpio.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/leds.h> | ||
18 | #include <linux/of_address.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/regulator/driver.h> | ||
21 | #include <linux/slab.h> | ||
22 | #include <linux/stat.h> | ||
23 | #include <linux/timer.h> | ||
24 | #include <linux/vexpress.h> | ||
25 | |||
26 | #define SYS_ID 0x000 | ||
27 | #define SYS_SW 0x004 | ||
28 | #define SYS_LED 0x008 | ||
29 | #define SYS_100HZ 0x024 | ||
30 | #define SYS_FLAGS 0x030 | ||
31 | #define SYS_FLAGSSET 0x030 | ||
32 | #define SYS_FLAGSCLR 0x034 | ||
33 | #define SYS_NVFLAGS 0x038 | ||
34 | #define SYS_NVFLAGSSET 0x038 | ||
35 | #define SYS_NVFLAGSCLR 0x03c | ||
36 | #define SYS_MCI 0x048 | ||
37 | #define SYS_FLASH 0x04c | ||
38 | #define SYS_CFGSW 0x058 | ||
39 | #define SYS_24MHZ 0x05c | ||
40 | #define SYS_MISC 0x060 | ||
41 | #define SYS_DMA 0x064 | ||
42 | #define SYS_PROCID0 0x084 | ||
43 | #define SYS_PROCID1 0x088 | ||
44 | #define SYS_CFGDATA 0x0a0 | ||
45 | #define SYS_CFGCTRL 0x0a4 | ||
46 | #define SYS_CFGSTAT 0x0a8 | ||
47 | |||
48 | #define SYS_HBI_MASK 0xfff | ||
49 | #define SYS_ID_HBI_SHIFT 16 | ||
50 | #define SYS_PROCIDx_HBI_SHIFT 0 | ||
51 | |||
52 | #define SYS_MCI_CARDIN (1 << 0) | ||
53 | #define SYS_MCI_WPROT (1 << 1) | ||
54 | |||
55 | #define SYS_FLASH_WPn (1 << 0) | ||
56 | |||
57 | #define SYS_MISC_MASTERSITE (1 << 14) | ||
58 | |||
59 | #define SYS_CFGCTRL_START (1 << 31) | ||
60 | #define SYS_CFGCTRL_WRITE (1 << 30) | ||
61 | #define SYS_CFGCTRL_DCC(n) (((n) & 0xf) << 26) | ||
62 | #define SYS_CFGCTRL_FUNC(n) (((n) & 0x3f) << 20) | ||
63 | #define SYS_CFGCTRL_SITE(n) (((n) & 0x3) << 16) | ||
64 | #define SYS_CFGCTRL_POSITION(n) (((n) & 0xf) << 12) | ||
65 | #define SYS_CFGCTRL_DEVICE(n) (((n) & 0xfff) << 0) | ||
66 | |||
67 | #define SYS_CFGSTAT_ERR (1 << 1) | ||
68 | #define SYS_CFGSTAT_COMPLETE (1 << 0) | ||
69 | |||
70 | |||
71 | static void __iomem *vexpress_sysreg_base; | ||
72 | static struct device *vexpress_sysreg_dev; | ||
73 | static int vexpress_master_site; | ||
74 | |||
75 | |||
76 | void vexpress_flags_set(u32 data) | ||
77 | { | ||
78 | writel(~0, vexpress_sysreg_base + SYS_FLAGSCLR); | ||
79 | writel(data, vexpress_sysreg_base + SYS_FLAGSSET); | ||
80 | } | ||
81 | |||
82 | u32 vexpress_get_procid(int site) | ||
83 | { | ||
84 | if (site == VEXPRESS_SITE_MASTER) | ||
85 | site = vexpress_master_site; | ||
86 | |||
87 | return readl(vexpress_sysreg_base + (site == VEXPRESS_SITE_DB1 ? | ||
88 | SYS_PROCID0 : SYS_PROCID1)); | ||
89 | } | ||
90 | |||
91 | u32 vexpress_get_hbi(int site) | ||
92 | { | ||
93 | u32 id; | ||
94 | |||
95 | switch (site) { | ||
96 | case VEXPRESS_SITE_MB: | ||
97 | id = readl(vexpress_sysreg_base + SYS_ID); | ||
98 | return (id >> SYS_ID_HBI_SHIFT) & SYS_HBI_MASK; | ||
99 | case VEXPRESS_SITE_MASTER: | ||
100 | case VEXPRESS_SITE_DB1: | ||
101 | case VEXPRESS_SITE_DB2: | ||
102 | id = vexpress_get_procid(site); | ||
103 | return (id >> SYS_PROCIDx_HBI_SHIFT) & SYS_HBI_MASK; | ||
104 | } | ||
105 | |||
106 | return ~0; | ||
107 | } | ||
108 | |||
109 | void __iomem *vexpress_get_24mhz_clock_base(void) | ||
110 | { | ||
111 | return vexpress_sysreg_base + SYS_24MHZ; | ||
112 | } | ||
113 | |||
114 | |||
115 | static void vexpress_sysreg_find_prop(struct device_node *node, | ||
116 | const char *name, u32 *val) | ||
117 | { | ||
118 | of_node_get(node); | ||
119 | while (node) { | ||
120 | if (of_property_read_u32(node, name, val) == 0) { | ||
121 | of_node_put(node); | ||
122 | return; | ||
123 | } | ||
124 | node = of_get_next_parent(node); | ||
125 | } | ||
126 | } | ||
127 | |||
128 | unsigned __vexpress_get_site(struct device *dev, struct device_node *node) | ||
129 | { | ||
130 | u32 site = 0; | ||
131 | |||
132 | WARN_ON(dev && node && dev->of_node != node); | ||
133 | if (dev && !node) | ||
134 | node = dev->of_node; | ||
135 | |||
136 | if (node) { | ||
137 | vexpress_sysreg_find_prop(node, "arm,vexpress,site", &site); | ||
138 | } else if (dev && dev->bus == &platform_bus_type) { | ||
139 | struct platform_device *pdev = to_platform_device(dev); | ||
140 | |||
141 | if (pdev->num_resources == 1 && | ||
142 | pdev->resource[0].flags == IORESOURCE_BUS) | ||
143 | site = pdev->resource[0].start; | ||
144 | } else if (dev && strncmp(dev_name(dev), "ct:", 3) == 0) { | ||
145 | site = VEXPRESS_SITE_MASTER; | ||
146 | } | ||
147 | |||
148 | if (site == VEXPRESS_SITE_MASTER) | ||
149 | site = vexpress_master_site; | ||
150 | |||
151 | return site; | ||
152 | } | ||
153 | |||
154 | |||
155 | struct vexpress_sysreg_config_func { | ||
156 | u32 template; | ||
157 | u32 device; | ||
158 | }; | ||
159 | |||
160 | static struct vexpress_config_bridge *vexpress_sysreg_config_bridge; | ||
161 | static struct timer_list vexpress_sysreg_config_timer; | ||
162 | static u32 *vexpress_sysreg_config_data; | ||
163 | static int vexpress_sysreg_config_tries; | ||
164 | |||
165 | static void *vexpress_sysreg_config_func_get(struct device *dev, | ||
166 | struct device_node *node) | ||
167 | { | ||
168 | struct vexpress_sysreg_config_func *config_func; | ||
169 | u32 site; | ||
170 | u32 position = 0; | ||
171 | u32 dcc = 0; | ||
172 | u32 func_device[2]; | ||
173 | int err = -EFAULT; | ||
174 | |||
175 | if (node) { | ||
176 | of_node_get(node); | ||
177 | vexpress_sysreg_find_prop(node, "arm,vexpress,site", &site); | ||
178 | vexpress_sysreg_find_prop(node, "arm,vexpress,position", | ||
179 | &position); | ||
180 | vexpress_sysreg_find_prop(node, "arm,vexpress,dcc", &dcc); | ||
181 | err = of_property_read_u32_array(node, | ||
182 | "arm,vexpress-sysreg,func", func_device, | ||
183 | ARRAY_SIZE(func_device)); | ||
184 | of_node_put(node); | ||
185 | } else if (dev && dev->bus == &platform_bus_type) { | ||
186 | struct platform_device *pdev = to_platform_device(dev); | ||
187 | |||
188 | if (pdev->num_resources == 1 && | ||
189 | pdev->resource[0].flags == IORESOURCE_BUS) { | ||
190 | site = pdev->resource[0].start; | ||
191 | func_device[0] = pdev->resource[0].end; | ||
192 | func_device[1] = pdev->id; | ||
193 | err = 0; | ||
194 | } | ||
195 | } | ||
196 | if (err) | ||
197 | return NULL; | ||
198 | |||
199 | config_func = kzalloc(sizeof(*config_func), GFP_KERNEL); | ||
200 | if (!config_func) | ||
201 | return NULL; | ||
202 | |||
203 | config_func->template = SYS_CFGCTRL_DCC(dcc); | ||
204 | config_func->template |= SYS_CFGCTRL_FUNC(func_device[0]); | ||
205 | config_func->template |= SYS_CFGCTRL_SITE(site == VEXPRESS_SITE_MASTER ? | ||
206 | vexpress_master_site : site); | ||
207 | config_func->template |= SYS_CFGCTRL_POSITION(position); | ||
208 | config_func->device |= func_device[1]; | ||
209 | |||
210 | dev_dbg(vexpress_sysreg_dev, "func 0x%p = 0x%x, %d\n", config_func, | ||
211 | config_func->template, config_func->device); | ||
212 | |||
213 | return config_func; | ||
214 | } | ||
215 | |||
216 | static void vexpress_sysreg_config_func_put(void *func) | ||
217 | { | ||
218 | kfree(func); | ||
219 | } | ||
220 | |||
221 | static int vexpress_sysreg_config_func_exec(void *func, int offset, | ||
222 | bool write, u32 *data) | ||
223 | { | ||
224 | int status; | ||
225 | struct vexpress_sysreg_config_func *config_func = func; | ||
226 | u32 command; | ||
227 | |||
228 | if (WARN_ON(!vexpress_sysreg_base)) | ||
229 | return -ENOENT; | ||
230 | |||
231 | command = readl(vexpress_sysreg_base + SYS_CFGCTRL); | ||
232 | if (WARN_ON(command & SYS_CFGCTRL_START)) | ||
233 | return -EBUSY; | ||
234 | |||
235 | command = SYS_CFGCTRL_START; | ||
236 | command |= write ? SYS_CFGCTRL_WRITE : 0; | ||
237 | command |= config_func->template; | ||
238 | command |= SYS_CFGCTRL_DEVICE(config_func->device + offset); | ||
239 | |||
240 | /* Use a canary for reads */ | ||
241 | if (!write) | ||
242 | *data = 0xdeadbeef; | ||
243 | |||
244 | dev_dbg(vexpress_sysreg_dev, "command %x, data %x\n", | ||
245 | command, *data); | ||
246 | writel(*data, vexpress_sysreg_base + SYS_CFGDATA); | ||
247 | writel(0, vexpress_sysreg_base + SYS_CFGSTAT); | ||
248 | writel(command, vexpress_sysreg_base + SYS_CFGCTRL); | ||
249 | mb(); | ||
250 | |||
251 | if (vexpress_sysreg_dev) { | ||
252 | /* Schedule completion check */ | ||
253 | if (!write) | ||
254 | vexpress_sysreg_config_data = data; | ||
255 | vexpress_sysreg_config_tries = 100; | ||
256 | mod_timer(&vexpress_sysreg_config_timer, | ||
257 | jiffies + usecs_to_jiffies(100)); | ||
258 | status = VEXPRESS_CONFIG_STATUS_WAIT; | ||
259 | } else { | ||
260 | /* Early execution, no timer available, have to spin */ | ||
261 | u32 cfgstat; | ||
262 | |||
263 | do { | ||
264 | cpu_relax(); | ||
265 | cfgstat = readl(vexpress_sysreg_base + SYS_CFGSTAT); | ||
266 | } while (!cfgstat); | ||
267 | |||
268 | if (!write && (cfgstat & SYS_CFGSTAT_COMPLETE)) | ||
269 | *data = readl(vexpress_sysreg_base + SYS_CFGDATA); | ||
270 | status = VEXPRESS_CONFIG_STATUS_DONE; | ||
271 | |||
272 | if (cfgstat & SYS_CFGSTAT_ERR) | ||
273 | status = -EINVAL; | ||
274 | } | ||
275 | |||
276 | return status; | ||
277 | } | ||
278 | |||
279 | struct vexpress_config_bridge_info vexpress_sysreg_config_bridge_info = { | ||
280 | .name = "vexpress-sysreg", | ||
281 | .func_get = vexpress_sysreg_config_func_get, | ||
282 | .func_put = vexpress_sysreg_config_func_put, | ||
283 | .func_exec = vexpress_sysreg_config_func_exec, | ||
284 | }; | ||
285 | |||
286 | static void vexpress_sysreg_config_complete(unsigned long data) | ||
287 | { | ||
288 | int status = VEXPRESS_CONFIG_STATUS_DONE; | ||
289 | u32 cfgstat = readl(vexpress_sysreg_base + SYS_CFGSTAT); | ||
290 | |||
291 | if (cfgstat & SYS_CFGSTAT_ERR) | ||
292 | status = -EINVAL; | ||
293 | if (!vexpress_sysreg_config_tries--) | ||
294 | status = -ETIMEDOUT; | ||
295 | |||
296 | if (status < 0) { | ||
297 | dev_err(vexpress_sysreg_dev, "error %d\n", status); | ||
298 | } else if (!(cfgstat & SYS_CFGSTAT_COMPLETE)) { | ||
299 | mod_timer(&vexpress_sysreg_config_timer, | ||
300 | jiffies + usecs_to_jiffies(50)); | ||
301 | return; | ||
302 | } | ||
303 | |||
304 | if (vexpress_sysreg_config_data) { | ||
305 | *vexpress_sysreg_config_data = readl(vexpress_sysreg_base + | ||
306 | SYS_CFGDATA); | ||
307 | dev_dbg(vexpress_sysreg_dev, "read data %x\n", | ||
308 | *vexpress_sysreg_config_data); | ||
309 | vexpress_sysreg_config_data = NULL; | ||
310 | } | ||
311 | |||
312 | vexpress_config_complete(vexpress_sysreg_config_bridge, status); | ||
313 | } | ||
314 | |||
315 | |||
316 | void __init vexpress_sysreg_early_init(void __iomem *base) | ||
317 | { | ||
318 | struct device_node *node = of_find_compatible_node(NULL, NULL, | ||
319 | "arm,vexpress-sysreg"); | ||
320 | |||
321 | if (node) | ||
322 | base = of_iomap(node, 0); | ||
323 | |||
324 | if (WARN_ON(!base)) | ||
325 | return; | ||
326 | |||
327 | vexpress_sysreg_base = base; | ||
328 | |||
329 | if (readl(vexpress_sysreg_base + SYS_MISC) & SYS_MISC_MASTERSITE) | ||
330 | vexpress_master_site = VEXPRESS_SITE_DB2; | ||
331 | else | ||
332 | vexpress_master_site = VEXPRESS_SITE_DB1; | ||
333 | |||
334 | vexpress_sysreg_config_bridge = vexpress_config_bridge_register( | ||
335 | node, &vexpress_sysreg_config_bridge_info); | ||
336 | WARN_ON(!vexpress_sysreg_config_bridge); | ||
337 | } | ||
338 | |||
339 | void __init vexpress_sysreg_of_early_init(void) | ||
340 | { | ||
341 | vexpress_sysreg_early_init(NULL); | ||
342 | } | ||
343 | |||
344 | |||
345 | static struct vexpress_sysreg_gpio { | ||
346 | unsigned long reg; | ||
347 | u32 value; | ||
348 | } vexpress_sysreg_gpios[] = { | ||
349 | [VEXPRESS_GPIO_MMC_CARDIN] = { | ||
350 | .reg = SYS_MCI, | ||
351 | .value = SYS_MCI_CARDIN, | ||
352 | }, | ||
353 | [VEXPRESS_GPIO_MMC_WPROT] = { | ||
354 | .reg = SYS_MCI, | ||
355 | .value = SYS_MCI_WPROT, | ||
356 | }, | ||
357 | [VEXPRESS_GPIO_FLASH_WPn] = { | ||
358 | .reg = SYS_FLASH, | ||
359 | .value = SYS_FLASH_WPn, | ||
360 | }, | ||
361 | }; | ||
362 | |||
363 | static int vexpress_sysreg_gpio_direction_input(struct gpio_chip *chip, | ||
364 | unsigned offset) | ||
365 | { | ||
366 | return 0; | ||
367 | } | ||
368 | |||
369 | static int vexpress_sysreg_gpio_direction_output(struct gpio_chip *chip, | ||
370 | unsigned offset, int value) | ||
371 | { | ||
372 | return 0; | ||
373 | } | ||
374 | |||
375 | static int vexpress_sysreg_gpio_get(struct gpio_chip *chip, | ||
376 | unsigned offset) | ||
377 | { | ||
378 | struct vexpress_sysreg_gpio *gpio = &vexpress_sysreg_gpios[offset]; | ||
379 | u32 reg_value = readl(vexpress_sysreg_base + gpio->reg); | ||
380 | |||
381 | return !!(reg_value & gpio->value); | ||
382 | } | ||
383 | |||
384 | static void vexpress_sysreg_gpio_set(struct gpio_chip *chip, | ||
385 | unsigned offset, int value) | ||
386 | { | ||
387 | struct vexpress_sysreg_gpio *gpio = &vexpress_sysreg_gpios[offset]; | ||
388 | u32 reg_value = readl(vexpress_sysreg_base + gpio->reg); | ||
389 | |||
390 | if (value) | ||
391 | reg_value |= gpio->value; | ||
392 | else | ||
393 | reg_value &= ~gpio->value; | ||
394 | |||
395 | writel(reg_value, vexpress_sysreg_base + gpio->reg); | ||
396 | } | ||
397 | |||
398 | static struct gpio_chip vexpress_sysreg_gpio_chip = { | ||
399 | .label = "vexpress-sysreg", | ||
400 | .direction_input = vexpress_sysreg_gpio_direction_input, | ||
401 | .direction_output = vexpress_sysreg_gpio_direction_output, | ||
402 | .get = vexpress_sysreg_gpio_get, | ||
403 | .set = vexpress_sysreg_gpio_set, | ||
404 | .ngpio = ARRAY_SIZE(vexpress_sysreg_gpios), | ||
405 | .base = 0, | ||
406 | }; | ||
407 | |||
408 | |||
409 | static ssize_t vexpress_sysreg_sys_id_show(struct device *dev, | ||
410 | struct device_attribute *attr, char *buf) | ||
411 | { | ||
412 | return sprintf(buf, "0x%08x\n", readl(vexpress_sysreg_base + SYS_ID)); | ||
413 | } | ||
414 | |||
415 | DEVICE_ATTR(sys_id, S_IRUGO, vexpress_sysreg_sys_id_show, NULL); | ||
416 | |||
417 | static int __devinit vexpress_sysreg_probe(struct platform_device *pdev) | ||
418 | { | ||
419 | int err; | ||
420 | struct resource *res = platform_get_resource(pdev, | ||
421 | IORESOURCE_MEM, 0); | ||
422 | |||
423 | if (!devm_request_mem_region(&pdev->dev, res->start, | ||
424 | resource_size(res), pdev->name)) { | ||
425 | dev_err(&pdev->dev, "Failed to request memory region!\n"); | ||
426 | return -EBUSY; | ||
427 | } | ||
428 | |||
429 | if (!vexpress_sysreg_base) | ||
430 | vexpress_sysreg_base = devm_ioremap(&pdev->dev, res->start, | ||
431 | resource_size(res)); | ||
432 | |||
433 | if (!vexpress_sysreg_base) { | ||
434 | dev_err(&pdev->dev, "Failed to obtain base address!\n"); | ||
435 | return -EFAULT; | ||
436 | } | ||
437 | |||
438 | setup_timer(&vexpress_sysreg_config_timer, | ||
439 | vexpress_sysreg_config_complete, 0); | ||
440 | |||
441 | vexpress_sysreg_gpio_chip.dev = &pdev->dev; | ||
442 | err = gpiochip_add(&vexpress_sysreg_gpio_chip); | ||
443 | if (err) { | ||
444 | vexpress_config_bridge_unregister( | ||
445 | vexpress_sysreg_config_bridge); | ||
446 | dev_err(&pdev->dev, "Failed to register GPIO chip! (%d)\n", | ||
447 | err); | ||
448 | return err; | ||
449 | } | ||
450 | |||
451 | vexpress_sysreg_dev = &pdev->dev; | ||
452 | |||
453 | device_create_file(vexpress_sysreg_dev, &dev_attr_sys_id); | ||
454 | |||
455 | return 0; | ||
456 | } | ||
457 | |||
458 | static const struct of_device_id vexpress_sysreg_match[] = { | ||
459 | { .compatible = "arm,vexpress-sysreg", }, | ||
460 | {}, | ||
461 | }; | ||
462 | |||
463 | static struct platform_driver vexpress_sysreg_driver = { | ||
464 | .driver = { | ||
465 | .name = "vexpress-sysreg", | ||
466 | .of_match_table = vexpress_sysreg_match, | ||
467 | }, | ||
468 | .probe = vexpress_sysreg_probe, | ||
469 | }; | ||
470 | |||
471 | static int __init vexpress_sysreg_init(void) | ||
472 | { | ||
473 | return platform_driver_register(&vexpress_sysreg_driver); | ||
474 | } | ||
475 | core_initcall(vexpress_sysreg_init); | ||
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 2e47c2ed0a2d..df304868bebb 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -324,13 +324,6 @@ config MTD_SOLUTIONENGINE | |||
324 | This enables access to the flash chips on the Hitachi SolutionEngine and | 324 | This enables access to the flash chips on the Hitachi SolutionEngine and |
325 | similar boards. Say 'Y' if you are building a kernel for such a board. | 325 | similar boards. Say 'Y' if you are building a kernel for such a board. |
326 | 326 | ||
327 | config MTD_CDB89712 | ||
328 | tristate "Cirrus CDB89712 evaluation board mappings" | ||
329 | depends on MTD_CFI && ARCH_CDB89712 | ||
330 | help | ||
331 | This enables access to the flash or ROM chips on the CDB89712 board. | ||
332 | If you have such a board, say 'Y'. | ||
333 | |||
334 | config MTD_SA1100 | 327 | config MTD_SA1100 |
335 | tristate "CFI Flash device mapped on StrongARM SA11x0" | 328 | tristate "CFI Flash device mapped on StrongARM SA11x0" |
336 | depends on MTD_CFI && ARCH_SA1100 | 329 | depends on MTD_CFI && ARCH_SA1100 |
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index deb43e9a1e7f..a0240edd1961 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile | |||
@@ -7,7 +7,6 @@ obj-$(CONFIG_MTD) += map_funcs.o | |||
7 | endif | 7 | endif |
8 | 8 | ||
9 | # Chip mappings | 9 | # Chip mappings |
10 | obj-$(CONFIG_MTD_CDB89712) += cdb89712.o | ||
11 | obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o | 10 | obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o |
12 | obj-$(CONFIG_MTD_DC21285) += dc21285.o | 11 | obj-$(CONFIG_MTD_DC21285) += dc21285.o |
13 | obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o | 12 | obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o |
diff --git a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c deleted file mode 100644 index c29cbf87ea0c..000000000000 --- a/drivers/mtd/maps/cdb89712.c +++ /dev/null | |||
@@ -1,278 +0,0 @@ | |||
1 | /* | ||
2 | * Flash on Cirrus CDB89712 | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #include <linux/module.h> | ||
7 | #include <linux/types.h> | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/ioport.h> | ||
10 | #include <linux/init.h> | ||
11 | #include <asm/io.h> | ||
12 | #include <mach/hardware.h> | ||
13 | #include <linux/mtd/mtd.h> | ||
14 | #include <linux/mtd/map.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | |||
17 | /* dynamic ioremap() areas */ | ||
18 | #define FLASH_START 0x00000000 | ||
19 | #define FLASH_SIZE 0x800000 | ||
20 | #define FLASH_WIDTH 4 | ||
21 | |||
22 | #define SRAM_START 0x60000000 | ||
23 | #define SRAM_SIZE 0xc000 | ||
24 | #define SRAM_WIDTH 4 | ||
25 | |||
26 | #define BOOTROM_START 0x70000000 | ||
27 | #define BOOTROM_SIZE 0x80 | ||
28 | #define BOOTROM_WIDTH 4 | ||
29 | |||
30 | |||
31 | static struct mtd_info *flash_mtd; | ||
32 | |||
33 | struct map_info cdb89712_flash_map = { | ||
34 | .name = "flash", | ||
35 | .size = FLASH_SIZE, | ||
36 | .bankwidth = FLASH_WIDTH, | ||
37 | .phys = FLASH_START, | ||
38 | }; | ||
39 | |||
40 | struct resource cdb89712_flash_resource = { | ||
41 | .name = "Flash", | ||
42 | .start = FLASH_START, | ||
43 | .end = FLASH_START + FLASH_SIZE - 1, | ||
44 | .flags = IORESOURCE_IO | IORESOURCE_BUSY, | ||
45 | }; | ||
46 | |||
47 | static int __init init_cdb89712_flash (void) | ||
48 | { | ||
49 | int err; | ||
50 | |||
51 | if (request_resource (&ioport_resource, &cdb89712_flash_resource)) { | ||
52 | printk(KERN_NOTICE "Failed to reserve Cdb89712 FLASH space\n"); | ||
53 | err = -EBUSY; | ||
54 | goto out; | ||
55 | } | ||
56 | |||
57 | cdb89712_flash_map.virt = ioremap(FLASH_START, FLASH_SIZE); | ||
58 | if (!cdb89712_flash_map.virt) { | ||
59 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n"); | ||
60 | err = -EIO; | ||
61 | goto out_resource; | ||
62 | } | ||
63 | simple_map_init(&cdb89712_flash_map); | ||
64 | flash_mtd = do_map_probe("cfi_probe", &cdb89712_flash_map); | ||
65 | if (!flash_mtd) { | ||
66 | flash_mtd = do_map_probe("map_rom", &cdb89712_flash_map); | ||
67 | if (flash_mtd) | ||
68 | flash_mtd->erasesize = 0x10000; | ||
69 | } | ||
70 | if (!flash_mtd) { | ||
71 | printk("FLASH probe failed\n"); | ||
72 | err = -ENXIO; | ||
73 | goto out_ioremap; | ||
74 | } | ||
75 | |||
76 | flash_mtd->owner = THIS_MODULE; | ||
77 | |||
78 | if (mtd_device_register(flash_mtd, NULL, 0)) { | ||
79 | printk("FLASH device addition failed\n"); | ||
80 | err = -ENOMEM; | ||
81 | goto out_probe; | ||
82 | } | ||
83 | |||
84 | return 0; | ||
85 | |||
86 | out_probe: | ||
87 | map_destroy(flash_mtd); | ||
88 | flash_mtd = 0; | ||
89 | out_ioremap: | ||
90 | iounmap((void *)cdb89712_flash_map.virt); | ||
91 | out_resource: | ||
92 | release_resource (&cdb89712_flash_resource); | ||
93 | out: | ||
94 | return err; | ||
95 | } | ||
96 | |||
97 | |||
98 | |||
99 | |||
100 | |||
101 | static struct mtd_info *sram_mtd; | ||
102 | |||
103 | struct map_info cdb89712_sram_map = { | ||
104 | .name = "SRAM", | ||
105 | .size = SRAM_SIZE, | ||
106 | .bankwidth = SRAM_WIDTH, | ||
107 | .phys = SRAM_START, | ||
108 | }; | ||
109 | |||
110 | struct resource cdb89712_sram_resource = { | ||
111 | .name = "SRAM", | ||
112 | .start = SRAM_START, | ||
113 | .end = SRAM_START + SRAM_SIZE - 1, | ||
114 | .flags = IORESOURCE_IO | IORESOURCE_BUSY, | ||
115 | }; | ||
116 | |||
117 | static int __init init_cdb89712_sram (void) | ||
118 | { | ||
119 | int err; | ||
120 | |||
121 | if (request_resource (&ioport_resource, &cdb89712_sram_resource)) { | ||
122 | printk(KERN_NOTICE "Failed to reserve Cdb89712 SRAM space\n"); | ||
123 | err = -EBUSY; | ||
124 | goto out; | ||
125 | } | ||
126 | |||
127 | cdb89712_sram_map.virt = ioremap(SRAM_START, SRAM_SIZE); | ||
128 | if (!cdb89712_sram_map.virt) { | ||
129 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n"); | ||
130 | err = -EIO; | ||
131 | goto out_resource; | ||
132 | } | ||
133 | simple_map_init(&cdb89712_sram_map); | ||
134 | sram_mtd = do_map_probe("map_ram", &cdb89712_sram_map); | ||
135 | if (!sram_mtd) { | ||
136 | printk("SRAM probe failed\n"); | ||
137 | err = -ENXIO; | ||
138 | goto out_ioremap; | ||
139 | } | ||
140 | |||
141 | sram_mtd->owner = THIS_MODULE; | ||
142 | sram_mtd->erasesize = 16; | ||
143 | |||
144 | if (mtd_device_register(sram_mtd, NULL, 0)) { | ||
145 | printk("SRAM device addition failed\n"); | ||
146 | err = -ENOMEM; | ||
147 | goto out_probe; | ||
148 | } | ||
149 | |||
150 | return 0; | ||
151 | |||
152 | out_probe: | ||
153 | map_destroy(sram_mtd); | ||
154 | sram_mtd = 0; | ||
155 | out_ioremap: | ||
156 | iounmap((void *)cdb89712_sram_map.virt); | ||
157 | out_resource: | ||
158 | release_resource (&cdb89712_sram_resource); | ||
159 | out: | ||
160 | return err; | ||
161 | } | ||
162 | |||
163 | |||
164 | |||
165 | |||
166 | |||
167 | |||
168 | |||
169 | static struct mtd_info *bootrom_mtd; | ||
170 | |||
171 | struct map_info cdb89712_bootrom_map = { | ||
172 | .name = "BootROM", | ||
173 | .size = BOOTROM_SIZE, | ||
174 | .bankwidth = BOOTROM_WIDTH, | ||
175 | .phys = BOOTROM_START, | ||
176 | }; | ||
177 | |||
178 | struct resource cdb89712_bootrom_resource = { | ||
179 | .name = "BootROM", | ||
180 | .start = BOOTROM_START, | ||
181 | .end = BOOTROM_START + BOOTROM_SIZE - 1, | ||
182 | .flags = IORESOURCE_IO | IORESOURCE_BUSY, | ||
183 | }; | ||
184 | |||
185 | static int __init init_cdb89712_bootrom (void) | ||
186 | { | ||
187 | int err; | ||
188 | |||
189 | if (request_resource (&ioport_resource, &cdb89712_bootrom_resource)) { | ||
190 | printk(KERN_NOTICE "Failed to reserve Cdb89712 BOOTROM space\n"); | ||
191 | err = -EBUSY; | ||
192 | goto out; | ||
193 | } | ||
194 | |||
195 | cdb89712_bootrom_map.virt = ioremap(BOOTROM_START, BOOTROM_SIZE); | ||
196 | if (!cdb89712_bootrom_map.virt) { | ||
197 | printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n"); | ||
198 | err = -EIO; | ||
199 | goto out_resource; | ||
200 | } | ||
201 | simple_map_init(&cdb89712_bootrom_map); | ||
202 | bootrom_mtd = do_map_probe("map_rom", &cdb89712_bootrom_map); | ||
203 | if (!bootrom_mtd) { | ||
204 | printk("BootROM probe failed\n"); | ||
205 | err = -ENXIO; | ||
206 | goto out_ioremap; | ||
207 | } | ||
208 | |||
209 | bootrom_mtd->owner = THIS_MODULE; | ||
210 | bootrom_mtd->erasesize = 0x10000; | ||
211 | |||
212 | if (mtd_device_register(bootrom_mtd, NULL, 0)) { | ||
213 | printk("BootROM device addition failed\n"); | ||
214 | err = -ENOMEM; | ||
215 | goto out_probe; | ||
216 | } | ||
217 | |||
218 | return 0; | ||
219 | |||
220 | out_probe: | ||
221 | map_destroy(bootrom_mtd); | ||
222 | bootrom_mtd = 0; | ||
223 | out_ioremap: | ||
224 | iounmap((void *)cdb89712_bootrom_map.virt); | ||
225 | out_resource: | ||
226 | release_resource (&cdb89712_bootrom_resource); | ||
227 | out: | ||
228 | return err; | ||
229 | } | ||
230 | |||
231 | |||
232 | |||
233 | |||
234 | |||
235 | static int __init init_cdb89712_maps(void) | ||
236 | { | ||
237 | |||
238 | printk(KERN_INFO "Cirrus CDB89712 MTD mappings:\n Flash 0x%x at 0x%x\n SRAM 0x%x at 0x%x\n BootROM 0x%x at 0x%x\n", | ||
239 | FLASH_SIZE, FLASH_START, SRAM_SIZE, SRAM_START, BOOTROM_SIZE, BOOTROM_START); | ||
240 | |||
241 | init_cdb89712_flash(); | ||
242 | init_cdb89712_sram(); | ||
243 | init_cdb89712_bootrom(); | ||
244 | |||
245 | return 0; | ||
246 | } | ||
247 | |||
248 | |||
249 | static void __exit cleanup_cdb89712_maps(void) | ||
250 | { | ||
251 | if (sram_mtd) { | ||
252 | mtd_device_unregister(sram_mtd); | ||
253 | map_destroy(sram_mtd); | ||
254 | iounmap((void *)cdb89712_sram_map.virt); | ||
255 | release_resource (&cdb89712_sram_resource); | ||
256 | } | ||
257 | |||
258 | if (flash_mtd) { | ||
259 | mtd_device_unregister(flash_mtd); | ||
260 | map_destroy(flash_mtd); | ||
261 | iounmap((void *)cdb89712_flash_map.virt); | ||
262 | release_resource (&cdb89712_flash_resource); | ||
263 | } | ||
264 | |||
265 | if (bootrom_mtd) { | ||
266 | mtd_device_unregister(bootrom_mtd); | ||
267 | map_destroy(bootrom_mtd); | ||
268 | iounmap((void *)cdb89712_bootrom_map.virt); | ||
269 | release_resource (&cdb89712_bootrom_resource); | ||
270 | } | ||
271 | } | ||
272 | |||
273 | module_init(init_cdb89712_maps); | ||
274 | module_exit(cleanup_cdb89712_maps); | ||
275 | |||
276 | MODULE_AUTHOR("Ray L"); | ||
277 | MODULE_DESCRIPTION("ARM CDB89712 map driver"); | ||
278 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 4883139460be..531807dec6b3 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -49,13 +49,6 @@ config MTD_NAND_MUSEUM_IDS | |||
49 | NAND chips (page size 256 byte, erase size 4-8KiB). The IDs | 49 | NAND chips (page size 256 byte, erase size 4-8KiB). The IDs |
50 | of these chips were reused by later, larger chips. | 50 | of these chips were reused by later, larger chips. |
51 | 51 | ||
52 | config MTD_NAND_AUTCPU12 | ||
53 | tristate "SmartMediaCard on autronix autcpu12 board" | ||
54 | depends on ARCH_AUTCPU12 | ||
55 | help | ||
56 | This enables the driver for the autronix autcpu12 board to | ||
57 | access the SmartMediaCard. | ||
58 | |||
59 | config MTD_NAND_DENALI | 52 | config MTD_NAND_DENALI |
60 | depends on PCI | 53 | depends on PCI |
61 | tristate "Support Denali NAND controller on Intel Moorestown" | 54 | tristate "Support Denali NAND controller on Intel Moorestown" |
@@ -86,12 +79,6 @@ config MTD_NAND_GPIO | |||
86 | help | 79 | help |
87 | This enables a GPIO based NAND flash driver. | 80 | This enables a GPIO based NAND flash driver. |
88 | 81 | ||
89 | config MTD_NAND_SPIA | ||
90 | tristate "NAND Flash device on SPIA board" | ||
91 | depends on ARCH_P720T | ||
92 | help | ||
93 | If you had to ask, you don't have one. Say 'N'. | ||
94 | |||
95 | config MTD_NAND_AMS_DELTA | 82 | config MTD_NAND_AMS_DELTA |
96 | tristate "NAND Flash device on Amstrad E3" | 83 | tristate "NAND Flash device on Amstrad E3" |
97 | depends on MACH_AMS_DELTA | 84 | depends on MACH_AMS_DELTA |
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 2cbd0916b733..6c7f2b3ca8ae 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile | |||
@@ -9,9 +9,7 @@ obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o | |||
9 | obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o | 9 | obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o |
10 | 10 | ||
11 | obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o | 11 | obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o |
12 | obj-$(CONFIG_MTD_NAND_SPIA) += spia.o | ||
13 | obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o | 12 | obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o |
14 | obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o | ||
15 | obj-$(CONFIG_MTD_NAND_DENALI) += denali.o | 13 | obj-$(CONFIG_MTD_NAND_DENALI) += denali.o |
16 | obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o | 14 | obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o |
17 | obj-$(CONFIG_MTD_NAND_BF5XX) += bf5xx_nand.o | 15 | obj-$(CONFIG_MTD_NAND_BF5XX) += bf5xx_nand.o |
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c deleted file mode 100644 index 04769a49a7cb..000000000000 --- a/drivers/mtd/nand/autcpu12.c +++ /dev/null | |||
@@ -1,237 +0,0 @@ | |||
1 | /* | ||
2 | * drivers/mtd/autcpu12.c | ||
3 | * | ||
4 | * Copyright (c) 2002 Thomas Gleixner <tgxl@linutronix.de> | ||
5 | * | ||
6 | * Derived from drivers/mtd/spia.c | ||
7 | * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * Overview: | ||
14 | * This is a device driver for the NAND flash device found on the | ||
15 | * autronix autcpu12 board, which is a SmartMediaCard. It supports | ||
16 | * 16MiB, 32MiB and 64MiB cards. | ||
17 | * | ||
18 | * | ||
19 | * 02-12-2002 TG Cleanup of module params | ||
20 | * | ||
21 | * 02-20-2002 TG adjusted for different rd/wr address support | ||
22 | * added support for read device ready/busy line | ||
23 | * added page_cache | ||
24 | * | ||
25 | * 10-06-2002 TG 128K card support added | ||
26 | */ | ||
27 | |||
28 | #include <linux/slab.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/mtd/mtd.h> | ||
32 | #include <linux/mtd/nand.h> | ||
33 | #include <linux/mtd/partitions.h> | ||
34 | #include <asm/io.h> | ||
35 | #include <mach/hardware.h> | ||
36 | #include <asm/sizes.h> | ||
37 | #include <mach/autcpu12.h> | ||
38 | |||
39 | /* | ||
40 | * MTD structure for AUTCPU12 board | ||
41 | */ | ||
42 | static struct mtd_info *autcpu12_mtd = NULL; | ||
43 | static void __iomem *autcpu12_fio_base; | ||
44 | |||
45 | /* | ||
46 | * Define partitions for flash devices | ||
47 | */ | ||
48 | static struct mtd_partition partition_info16k[] = { | ||
49 | { .name = "AUTCPU12 flash partition 1", | ||
50 | .offset = 0, | ||
51 | .size = 8 * SZ_1M }, | ||
52 | { .name = "AUTCPU12 flash partition 2", | ||
53 | .offset = 8 * SZ_1M, | ||
54 | .size = 8 * SZ_1M }, | ||
55 | }; | ||
56 | |||
57 | static struct mtd_partition partition_info32k[] = { | ||
58 | { .name = "AUTCPU12 flash partition 1", | ||
59 | .offset = 0, | ||
60 | .size = 8 * SZ_1M }, | ||
61 | { .name = "AUTCPU12 flash partition 2", | ||
62 | .offset = 8 * SZ_1M, | ||
63 | .size = 24 * SZ_1M }, | ||
64 | }; | ||
65 | |||
66 | static struct mtd_partition partition_info64k[] = { | ||
67 | { .name = "AUTCPU12 flash partition 1", | ||
68 | .offset = 0, | ||
69 | .size = 16 * SZ_1M }, | ||
70 | { .name = "AUTCPU12 flash partition 2", | ||
71 | .offset = 16 * SZ_1M, | ||
72 | .size = 48 * SZ_1M }, | ||
73 | }; | ||
74 | |||
75 | static struct mtd_partition partition_info128k[] = { | ||
76 | { .name = "AUTCPU12 flash partition 1", | ||
77 | .offset = 0, | ||
78 | .size = 16 * SZ_1M }, | ||
79 | { .name = "AUTCPU12 flash partition 2", | ||
80 | .offset = 16 * SZ_1M, | ||
81 | .size = 112 * SZ_1M }, | ||
82 | }; | ||
83 | |||
84 | #define NUM_PARTITIONS16K 2 | ||
85 | #define NUM_PARTITIONS32K 2 | ||
86 | #define NUM_PARTITIONS64K 2 | ||
87 | #define NUM_PARTITIONS128K 2 | ||
88 | /* | ||
89 | * hardware specific access to control-lines | ||
90 | * | ||
91 | * ALE bit 4 autcpu12_pedr | ||
92 | * CLE bit 5 autcpu12_pedr | ||
93 | * NCE bit 0 fio_ctrl | ||
94 | * | ||
95 | */ | ||
96 | static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd, | ||
97 | unsigned int ctrl) | ||
98 | { | ||
99 | struct nand_chip *chip = mtd->priv; | ||
100 | |||
101 | if (ctrl & NAND_CTRL_CHANGE) { | ||
102 | void __iomem *addr; | ||
103 | unsigned char bits; | ||
104 | |||
105 | bits = clps_readb(AUTCPU12_SMC_PORT_OFFSET) & ~0x30; | ||
106 | bits |= (ctrl & NAND_CLE) << 4; | ||
107 | bits |= (ctrl & NAND_ALE) << 2; | ||
108 | clps_writeb(bits, AUTCPU12_SMC_PORT_OFFSET); | ||
109 | |||
110 | addr = autcpu12_fio_base + AUTCPU12_SMC_SELECT_OFFSET; | ||
111 | writeb((readb(addr) & ~0x1) | (ctrl & NAND_NCE), addr); | ||
112 | } | ||
113 | |||
114 | if (cmd != NAND_CMD_NONE) | ||
115 | writeb(cmd, chip->IO_ADDR_W); | ||
116 | } | ||
117 | |||
118 | /* | ||
119 | * read device ready pin | ||
120 | */ | ||
121 | int autcpu12_device_ready(struct mtd_info *mtd) | ||
122 | { | ||
123 | return clps_readb(AUTCPU12_SMC_PORT_OFFSET) & AUTCPU12_SMC_RDY; | ||
124 | } | ||
125 | |||
126 | /* | ||
127 | * Main initialization routine | ||
128 | */ | ||
129 | static int __init autcpu12_init(void) | ||
130 | { | ||
131 | struct nand_chip *this; | ||
132 | int err = 0; | ||
133 | |||
134 | /* Allocate memory for MTD device structure and private data */ | ||
135 | autcpu12_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), | ||
136 | GFP_KERNEL); | ||
137 | if (!autcpu12_mtd) { | ||
138 | printk("Unable to allocate AUTCPU12 NAND MTD device structure.\n"); | ||
139 | err = -ENOMEM; | ||
140 | goto out; | ||
141 | } | ||
142 | |||
143 | /* map physical address */ | ||
144 | autcpu12_fio_base = ioremap(AUTCPU12_PHYS_SMC, SZ_1K); | ||
145 | if (!autcpu12_fio_base) { | ||
146 | printk("Ioremap autcpu12 SmartMedia Card failed\n"); | ||
147 | err = -EIO; | ||
148 | goto out_mtd; | ||
149 | } | ||
150 | |||
151 | /* Get pointer to private data */ | ||
152 | this = (struct nand_chip *)(&autcpu12_mtd[1]); | ||
153 | |||
154 | /* Initialize structures */ | ||
155 | memset(autcpu12_mtd, 0, sizeof(struct mtd_info)); | ||
156 | memset(this, 0, sizeof(struct nand_chip)); | ||
157 | |||
158 | /* Link the private data with the MTD structure */ | ||
159 | autcpu12_mtd->priv = this; | ||
160 | autcpu12_mtd->owner = THIS_MODULE; | ||
161 | |||
162 | /* Set address of NAND IO lines */ | ||
163 | this->IO_ADDR_R = autcpu12_fio_base; | ||
164 | this->IO_ADDR_W = autcpu12_fio_base; | ||
165 | this->cmd_ctrl = autcpu12_hwcontrol; | ||
166 | this->dev_ready = autcpu12_device_ready; | ||
167 | /* 20 us command delay time */ | ||
168 | this->chip_delay = 20; | ||
169 | this->ecc.mode = NAND_ECC_SOFT; | ||
170 | |||
171 | /* Enable the following for a flash based bad block table */ | ||
172 | /* | ||
173 | this->bbt_options = NAND_BBT_USE_FLASH; | ||
174 | */ | ||
175 | this->bbt_options = NAND_BBT_USE_FLASH; | ||
176 | |||
177 | /* Scan to find existence of the device */ | ||
178 | if (nand_scan(autcpu12_mtd, 1)) { | ||
179 | err = -ENXIO; | ||
180 | goto out_ior; | ||
181 | } | ||
182 | |||
183 | /* Register the partitions */ | ||
184 | switch (autcpu12_mtd->size) { | ||
185 | case SZ_16M: | ||
186 | mtd_device_register(autcpu12_mtd, partition_info16k, | ||
187 | NUM_PARTITIONS16K); | ||
188 | break; | ||
189 | case SZ_32M: | ||
190 | mtd_device_register(autcpu12_mtd, partition_info32k, | ||
191 | NUM_PARTITIONS32K); | ||
192 | break; | ||
193 | case SZ_64M: | ||
194 | mtd_device_register(autcpu12_mtd, partition_info64k, | ||
195 | NUM_PARTITIONS64K); | ||
196 | break; | ||
197 | case SZ_128M: | ||
198 | mtd_device_register(autcpu12_mtd, partition_info128k, | ||
199 | NUM_PARTITIONS128K); | ||
200 | break; | ||
201 | default: | ||
202 | printk("Unsupported SmartMedia device\n"); | ||
203 | err = -ENXIO; | ||
204 | goto out_ior; | ||
205 | } | ||
206 | goto out; | ||
207 | |||
208 | out_ior: | ||
209 | iounmap(autcpu12_fio_base); | ||
210 | out_mtd: | ||
211 | kfree(autcpu12_mtd); | ||
212 | out: | ||
213 | return err; | ||
214 | } | ||
215 | |||
216 | module_init(autcpu12_init); | ||
217 | |||
218 | /* | ||
219 | * Clean up routine | ||
220 | */ | ||
221 | static void __exit autcpu12_cleanup(void) | ||
222 | { | ||
223 | /* Release resources, unregister device */ | ||
224 | nand_release(autcpu12_mtd); | ||
225 | |||
226 | /* unmap physical address */ | ||
227 | iounmap(autcpu12_fio_base); | ||
228 | |||
229 | /* Free the MTD device structure */ | ||
230 | kfree(autcpu12_mtd); | ||
231 | } | ||
232 | |||
233 | module_exit(autcpu12_cleanup); | ||
234 | |||
235 | MODULE_LICENSE("GPL"); | ||
236 | MODULE_AUTHOR("Thomas Gleixner <tglx@linutronix.de>"); | ||
237 | MODULE_DESCRIPTION("Glue layer for SmartMediaCard on autronix autcpu12"); | ||
diff --git a/drivers/mtd/nand/spia.c b/drivers/mtd/nand/spia.c deleted file mode 100644 index bef76cd7c24c..000000000000 --- a/drivers/mtd/nand/spia.c +++ /dev/null | |||
@@ -1,176 +0,0 @@ | |||
1 | /* | ||
2 | * drivers/mtd/nand/spia.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) | ||
5 | * | ||
6 | * | ||
7 | * 10-29-2001 TG change to support hardwarespecific access | ||
8 | * to controllines (due to change in nand.c) | ||
9 | * page_cache added | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | * | ||
15 | * Overview: | ||
16 | * This is a device driver for the NAND flash device found on the | ||
17 | * SPIA board which utilizes the Toshiba TC58V64AFT part. This is | ||
18 | * a 64Mibit (8MiB x 8 bits) NAND flash device. | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/module.h> | ||
25 | #include <linux/mtd/mtd.h> | ||
26 | #include <linux/mtd/nand.h> | ||
27 | #include <linux/mtd/partitions.h> | ||
28 | #include <asm/io.h> | ||
29 | |||
30 | /* | ||
31 | * MTD structure for SPIA board | ||
32 | */ | ||
33 | static struct mtd_info *spia_mtd = NULL; | ||
34 | |||
35 | /* | ||
36 | * Values specific to the SPIA board (used with EP7212 processor) | ||
37 | */ | ||
38 | #define SPIA_IO_BASE 0xd0000000 /* Start of EP7212 IO address space */ | ||
39 | #define SPIA_FIO_BASE 0xf0000000 /* Address where flash is mapped */ | ||
40 | #define SPIA_PEDR 0x0080 /* | ||
41 | * IO offset to Port E data register | ||
42 | * where the CLE, ALE and NCE pins | ||
43 | * are wired to. | ||
44 | */ | ||
45 | #define SPIA_PEDDR 0x00c0 /* | ||
46 | * IO offset to Port E data direction | ||
47 | * register so we can control the IO | ||
48 | * lines. | ||
49 | */ | ||
50 | |||
51 | /* | ||
52 | * Module stuff | ||
53 | */ | ||
54 | |||
55 | static int spia_io_base = SPIA_IO_BASE; | ||
56 | static int spia_fio_base = SPIA_FIO_BASE; | ||
57 | static int spia_pedr = SPIA_PEDR; | ||
58 | static int spia_peddr = SPIA_PEDDR; | ||
59 | |||
60 | module_param(spia_io_base, int, 0); | ||
61 | module_param(spia_fio_base, int, 0); | ||
62 | module_param(spia_pedr, int, 0); | ||
63 | module_param(spia_peddr, int, 0); | ||
64 | |||
65 | /* | ||
66 | * Define partitions for flash device | ||
67 | */ | ||
68 | static const struct mtd_partition partition_info[] = { | ||
69 | { | ||
70 | .name = "SPIA flash partition 1", | ||
71 | .offset = 0, | ||
72 | .size = 2 * 1024 * 1024}, | ||
73 | { | ||
74 | .name = "SPIA flash partition 2", | ||
75 | .offset = 2 * 1024 * 1024, | ||
76 | .size = 6 * 1024 * 1024} | ||
77 | }; | ||
78 | |||
79 | #define NUM_PARTITIONS 2 | ||
80 | |||
81 | /* | ||
82 | * hardware specific access to control-lines | ||
83 | * | ||
84 | * ctrl: | ||
85 | * NAND_CNE: bit 0 -> bit 2 | ||
86 | * NAND_CLE: bit 1 -> bit 0 | ||
87 | * NAND_ALE: bit 2 -> bit 1 | ||
88 | */ | ||
89 | static void spia_hwcontrol(struct mtd_info *mtd, int cmd) | ||
90 | { | ||
91 | struct nand_chip *chip = mtd->priv; | ||
92 | |||
93 | if (ctrl & NAND_CTRL_CHANGE) { | ||
94 | void __iomem *addr = spia_io_base + spia_pedr; | ||
95 | unsigned char bits; | ||
96 | |||
97 | bits = (ctrl & NAND_CNE) << 2; | ||
98 | bits |= (ctrl & NAND_CLE | NAND_ALE) >> 1; | ||
99 | writeb((readb(addr) & ~0x7) | bits, addr); | ||
100 | } | ||
101 | |||
102 | if (cmd != NAND_CMD_NONE) | ||
103 | writeb(cmd, chip->IO_ADDR_W); | ||
104 | } | ||
105 | |||
106 | /* | ||
107 | * Main initialization routine | ||
108 | */ | ||
109 | static int __init spia_init(void) | ||
110 | { | ||
111 | struct nand_chip *this; | ||
112 | |||
113 | /* Allocate memory for MTD device structure and private data */ | ||
114 | spia_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); | ||
115 | if (!spia_mtd) { | ||
116 | printk("Unable to allocate SPIA NAND MTD device structure.\n"); | ||
117 | return -ENOMEM; | ||
118 | } | ||
119 | |||
120 | /* Get pointer to private data */ | ||
121 | this = (struct nand_chip *)(&spia_mtd[1]); | ||
122 | |||
123 | /* Initialize structures */ | ||
124 | memset(spia_mtd, 0, sizeof(struct mtd_info)); | ||
125 | memset(this, 0, sizeof(struct nand_chip)); | ||
126 | |||
127 | /* Link the private data with the MTD structure */ | ||
128 | spia_mtd->priv = this; | ||
129 | spia_mtd->owner = THIS_MODULE; | ||
130 | |||
131 | /* | ||
132 | * Set GPIO Port E control register so that the pins are configured | ||
133 | * to be outputs for controlling the NAND flash. | ||
134 | */ | ||
135 | (*(volatile unsigned char *)(spia_io_base + spia_peddr)) = 0x07; | ||
136 | |||
137 | /* Set address of NAND IO lines */ | ||
138 | this->IO_ADDR_R = (void __iomem *)spia_fio_base; | ||
139 | this->IO_ADDR_W = (void __iomem *)spia_fio_base; | ||
140 | /* Set address of hardware control function */ | ||
141 | this->cmd_ctrl = spia_hwcontrol; | ||
142 | /* 15 us command delay time */ | ||
143 | this->chip_delay = 15; | ||
144 | |||
145 | /* Scan to find existence of the device */ | ||
146 | if (nand_scan(spia_mtd, 1)) { | ||
147 | kfree(spia_mtd); | ||
148 | return -ENXIO; | ||
149 | } | ||
150 | |||
151 | /* Register the partitions */ | ||
152 | mtd_device_register(spia_mtd, partition_info, NUM_PARTITIONS); | ||
153 | |||
154 | /* Return happy */ | ||
155 | return 0; | ||
156 | } | ||
157 | |||
158 | module_init(spia_init); | ||
159 | |||
160 | /* | ||
161 | * Clean up routine | ||
162 | */ | ||
163 | static void __exit spia_cleanup(void) | ||
164 | { | ||
165 | /* Release resources, unregister device */ | ||
166 | nand_release(spia_mtd); | ||
167 | |||
168 | /* Free the MTD device structure */ | ||
169 | kfree(spia_mtd); | ||
170 | } | ||
171 | |||
172 | module_exit(spia_cleanup); | ||
173 | |||
174 | MODULE_LICENSE("GPL"); | ||
175 | MODULE_AUTHOR("Steven J. Hill <sjhill@realitydiluted.com"); | ||
176 | MODULE_DESCRIPTION("Board-specific glue layer for NAND flash on SPIA board"); | ||
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 390ab69ea569..c31aeb01bb00 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig | |||
@@ -190,6 +190,11 @@ config PINCTRL_EXYNOS4 | |||
190 | depends on OF && GPIOLIB | 190 | depends on OF && GPIOLIB |
191 | select PINCTRL_SAMSUNG | 191 | select PINCTRL_SAMSUNG |
192 | 192 | ||
193 | config PINCTRL_EXYNOS5440 | ||
194 | bool "Samsung EXYNOS5440 SoC pinctrl driver" | ||
195 | select PINMUX | ||
196 | select PINCONF | ||
197 | |||
193 | source "drivers/pinctrl/mvebu/Kconfig" | 198 | source "drivers/pinctrl/mvebu/Kconfig" |
194 | 199 | ||
195 | source "drivers/pinctrl/spear/Kconfig" | 200 | source "drivers/pinctrl/spear/Kconfig" |
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index f95f5ed923be..fc4606f27dc7 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile | |||
@@ -37,6 +37,7 @@ obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o | |||
37 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o | 37 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o |
38 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o | 38 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o |
39 | obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o | 39 | obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o |
40 | obj-$(CONFIG_PINCTRL_EXYNOS5440) += pinctrl-exynos5440.o | ||
40 | obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o | 41 | obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o |
41 | obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o | 42 | obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o |
42 | 43 | ||
diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 6ff665209a4c..538b9ddaadf7 100644 --- a/drivers/pinctrl/pinctrl-exynos.c +++ b/drivers/pinctrl/pinctrl-exynos.c | |||
@@ -41,46 +41,46 @@ static const struct of_device_id exynos_wkup_irq_ids[] = { | |||
41 | 41 | ||
42 | static void exynos_gpio_irq_unmask(struct irq_data *irqd) | 42 | static void exynos_gpio_irq_unmask(struct irq_data *irqd) |
43 | { | 43 | { |
44 | struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; | 44 | struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); |
45 | struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); | 45 | struct samsung_pinctrl_drv_data *d = bank->drvdata; |
46 | unsigned long reg_mask = d->ctrl->geint_mask + edata->eint_offset; | 46 | unsigned long reg_mask = d->ctrl->geint_mask + bank->eint_offset; |
47 | unsigned long mask; | 47 | unsigned long mask; |
48 | 48 | ||
49 | mask = readl(d->virt_base + reg_mask); | 49 | mask = readl(d->virt_base + reg_mask); |
50 | mask &= ~(1 << edata->pin); | 50 | mask &= ~(1 << irqd->hwirq); |
51 | writel(mask, d->virt_base + reg_mask); | 51 | writel(mask, d->virt_base + reg_mask); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void exynos_gpio_irq_mask(struct irq_data *irqd) | 54 | static void exynos_gpio_irq_mask(struct irq_data *irqd) |
55 | { | 55 | { |
56 | struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; | 56 | struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); |
57 | struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); | 57 | struct samsung_pinctrl_drv_data *d = bank->drvdata; |
58 | unsigned long reg_mask = d->ctrl->geint_mask + edata->eint_offset; | 58 | unsigned long reg_mask = d->ctrl->geint_mask + bank->eint_offset; |
59 | unsigned long mask; | 59 | unsigned long mask; |
60 | 60 | ||
61 | mask = readl(d->virt_base + reg_mask); | 61 | mask = readl(d->virt_base + reg_mask); |
62 | mask |= 1 << edata->pin; | 62 | mask |= 1 << irqd->hwirq; |
63 | writel(mask, d->virt_base + reg_mask); | 63 | writel(mask, d->virt_base + reg_mask); |
64 | } | 64 | } |
65 | 65 | ||
66 | static void exynos_gpio_irq_ack(struct irq_data *irqd) | 66 | static void exynos_gpio_irq_ack(struct irq_data *irqd) |
67 | { | 67 | { |
68 | struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; | 68 | struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); |
69 | struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); | 69 | struct samsung_pinctrl_drv_data *d = bank->drvdata; |
70 | unsigned long reg_pend = d->ctrl->geint_pend + edata->eint_offset; | 70 | unsigned long reg_pend = d->ctrl->geint_pend + bank->eint_offset; |
71 | 71 | ||
72 | writel(1 << edata->pin, d->virt_base + reg_pend); | 72 | writel(1 << irqd->hwirq, d->virt_base + reg_pend); |
73 | } | 73 | } |
74 | 74 | ||
75 | static int exynos_gpio_irq_set_type(struct irq_data *irqd, unsigned int type) | 75 | static int exynos_gpio_irq_set_type(struct irq_data *irqd, unsigned int type) |
76 | { | 76 | { |
77 | struct samsung_pinctrl_drv_data *d = irqd->domain->host_data; | 77 | struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); |
78 | struct samsung_pinctrl_drv_data *d = bank->drvdata; | ||
78 | struct samsung_pin_ctrl *ctrl = d->ctrl; | 79 | struct samsung_pin_ctrl *ctrl = d->ctrl; |
79 | struct exynos_geint_data *edata = irq_data_get_irq_handler_data(irqd); | 80 | unsigned int pin = irqd->hwirq; |
80 | struct samsung_pin_bank *bank = edata->bank; | 81 | unsigned int shift = EXYNOS_EINT_CON_LEN * pin; |
81 | unsigned int shift = EXYNOS_EINT_CON_LEN * edata->pin; | ||
82 | unsigned int con, trig_type; | 82 | unsigned int con, trig_type; |
83 | unsigned long reg_con = ctrl->geint_con + edata->eint_offset; | 83 | unsigned long reg_con = ctrl->geint_con + bank->eint_offset; |
84 | unsigned int mask; | 84 | unsigned int mask; |
85 | 85 | ||
86 | switch (type) { | 86 | switch (type) { |
@@ -115,7 +115,7 @@ static int exynos_gpio_irq_set_type(struct irq_data *irqd, unsigned int type) | |||
115 | writel(con, d->virt_base + reg_con); | 115 | writel(con, d->virt_base + reg_con); |
116 | 116 | ||
117 | reg_con = bank->pctl_offset; | 117 | reg_con = bank->pctl_offset; |
118 | shift = edata->pin * bank->func_width; | 118 | shift = pin * bank->func_width; |
119 | mask = (1 << bank->func_width) - 1; | 119 | mask = (1 << bank->func_width) - 1; |
120 | 120 | ||
121 | con = readl(d->virt_base + reg_con); | 121 | con = readl(d->virt_base + reg_con); |
@@ -137,82 +137,23 @@ static struct irq_chip exynos_gpio_irq_chip = { | |||
137 | .irq_set_type = exynos_gpio_irq_set_type, | 137 | .irq_set_type = exynos_gpio_irq_set_type, |
138 | }; | 138 | }; |
139 | 139 | ||
140 | /* | ||
141 | * given a controller-local external gpio interrupt number, prepare the handler | ||
142 | * data for it. | ||
143 | */ | ||
144 | static struct exynos_geint_data *exynos_get_eint_data(irq_hw_number_t hw, | ||
145 | struct samsung_pinctrl_drv_data *d) | ||
146 | { | ||
147 | struct samsung_pin_bank *bank = d->ctrl->pin_banks; | ||
148 | struct exynos_geint_data *eint_data; | ||
149 | unsigned int nr_banks = d->ctrl->nr_banks, idx; | ||
150 | unsigned int irq_base = 0, eint_offset = 0; | ||
151 | |||
152 | if (hw >= d->ctrl->nr_gint) { | ||
153 | dev_err(d->dev, "unsupported ext-gpio interrupt\n"); | ||
154 | return NULL; | ||
155 | } | ||
156 | |||
157 | for (idx = 0; idx < nr_banks; idx++, bank++) { | ||
158 | if (bank->eint_type != EINT_TYPE_GPIO) | ||
159 | continue; | ||
160 | if ((hw >= irq_base) && (hw < (irq_base + bank->nr_pins))) | ||
161 | break; | ||
162 | irq_base += bank->nr_pins; | ||
163 | eint_offset += 4; | ||
164 | } | ||
165 | |||
166 | if (idx == nr_banks) { | ||
167 | dev_err(d->dev, "pin bank not found for ext-gpio interrupt\n"); | ||
168 | return NULL; | ||
169 | } | ||
170 | |||
171 | eint_data = devm_kzalloc(d->dev, sizeof(*eint_data), GFP_KERNEL); | ||
172 | if (!eint_data) { | ||
173 | dev_err(d->dev, "no memory for eint-gpio data\n"); | ||
174 | return NULL; | ||
175 | } | ||
176 | |||
177 | eint_data->bank = bank; | ||
178 | eint_data->pin = hw - irq_base; | ||
179 | eint_data->eint_offset = eint_offset; | ||
180 | return eint_data; | ||
181 | } | ||
182 | |||
183 | static int exynos_gpio_irq_map(struct irq_domain *h, unsigned int virq, | 140 | static int exynos_gpio_irq_map(struct irq_domain *h, unsigned int virq, |
184 | irq_hw_number_t hw) | 141 | irq_hw_number_t hw) |
185 | { | 142 | { |
186 | struct samsung_pinctrl_drv_data *d = h->host_data; | 143 | struct samsung_pin_bank *b = h->host_data; |
187 | struct exynos_geint_data *eint_data; | ||
188 | |||
189 | eint_data = exynos_get_eint_data(hw, d); | ||
190 | if (!eint_data) | ||
191 | return -EINVAL; | ||
192 | 144 | ||
193 | irq_set_handler_data(virq, eint_data); | 145 | irq_set_chip_data(virq, b); |
194 | irq_set_chip_data(virq, h->host_data); | ||
195 | irq_set_chip_and_handler(virq, &exynos_gpio_irq_chip, | 146 | irq_set_chip_and_handler(virq, &exynos_gpio_irq_chip, |
196 | handle_level_irq); | 147 | handle_level_irq); |
197 | set_irq_flags(virq, IRQF_VALID); | 148 | set_irq_flags(virq, IRQF_VALID); |
198 | return 0; | 149 | return 0; |
199 | } | 150 | } |
200 | 151 | ||
201 | static void exynos_gpio_irq_unmap(struct irq_domain *h, unsigned int virq) | ||
202 | { | ||
203 | struct samsung_pinctrl_drv_data *d = h->host_data; | ||
204 | struct exynos_geint_data *eint_data; | ||
205 | |||
206 | eint_data = irq_get_handler_data(virq); | ||
207 | devm_kfree(d->dev, eint_data); | ||
208 | } | ||
209 | |||
210 | /* | 152 | /* |
211 | * irq domain callbacks for external gpio interrupt controller. | 153 | * irq domain callbacks for external gpio interrupt controller. |
212 | */ | 154 | */ |
213 | static const struct irq_domain_ops exynos_gpio_irqd_ops = { | 155 | static const struct irq_domain_ops exynos_gpio_irqd_ops = { |
214 | .map = exynos_gpio_irq_map, | 156 | .map = exynos_gpio_irq_map, |
215 | .unmap = exynos_gpio_irq_unmap, | ||
216 | .xlate = irq_domain_xlate_twocell, | 157 | .xlate = irq_domain_xlate_twocell, |
217 | }; | 158 | }; |
218 | 159 | ||
@@ -231,7 +172,7 @@ static irqreturn_t exynos_eint_gpio_irq(int irq, void *data) | |||
231 | return IRQ_HANDLED; | 172 | return IRQ_HANDLED; |
232 | bank += (group - 1); | 173 | bank += (group - 1); |
233 | 174 | ||
234 | virq = irq_linear_revmap(d->gpio_irqd, bank->irq_base + pin); | 175 | virq = irq_linear_revmap(bank->irq_domain, pin); |
235 | if (!virq) | 176 | if (!virq) |
236 | return IRQ_NONE; | 177 | return IRQ_NONE; |
237 | generic_handle_irq(virq); | 178 | generic_handle_irq(virq); |
@@ -244,8 +185,10 @@ static irqreturn_t exynos_eint_gpio_irq(int irq, void *data) | |||
244 | */ | 185 | */ |
245 | static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) | 186 | static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) |
246 | { | 187 | { |
188 | struct samsung_pin_bank *bank; | ||
247 | struct device *dev = d->dev; | 189 | struct device *dev = d->dev; |
248 | unsigned int ret; | 190 | unsigned int ret; |
191 | unsigned int i; | ||
249 | 192 | ||
250 | if (!d->irq) { | 193 | if (!d->irq) { |
251 | dev_err(dev, "irq number not available\n"); | 194 | dev_err(dev, "irq number not available\n"); |
@@ -259,11 +202,16 @@ static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) | |||
259 | return -ENXIO; | 202 | return -ENXIO; |
260 | } | 203 | } |
261 | 204 | ||
262 | d->gpio_irqd = irq_domain_add_linear(dev->of_node, d->ctrl->nr_gint, | 205 | bank = d->ctrl->pin_banks; |
263 | &exynos_gpio_irqd_ops, d); | 206 | for (i = 0; i < d->ctrl->nr_banks; ++i, ++bank) { |
264 | if (!d->gpio_irqd) { | 207 | if (bank->eint_type != EINT_TYPE_GPIO) |
265 | dev_err(dev, "gpio irq domain allocation failed\n"); | 208 | continue; |
266 | return -ENXIO; | 209 | bank->irq_domain = irq_domain_add_linear(bank->of_node, |
210 | bank->nr_pins, &exynos_gpio_irqd_ops, bank); | ||
211 | if (!bank->irq_domain) { | ||
212 | dev_err(dev, "gpio irq domain add failed\n"); | ||
213 | return -ENXIO; | ||
214 | } | ||
267 | } | 215 | } |
268 | 216 | ||
269 | return 0; | 217 | return 0; |
@@ -271,48 +219,46 @@ static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) | |||
271 | 219 | ||
272 | static void exynos_wkup_irq_unmask(struct irq_data *irqd) | 220 | static void exynos_wkup_irq_unmask(struct irq_data *irqd) |
273 | { | 221 | { |
274 | struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); | 222 | struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd); |
275 | unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; | 223 | struct samsung_pinctrl_drv_data *d = b->drvdata; |
276 | unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); | 224 | unsigned long reg_mask = d->ctrl->weint_mask + b->eint_offset; |
277 | unsigned long reg_mask = d->ctrl->weint_mask + (bank << 2); | ||
278 | unsigned long mask; | 225 | unsigned long mask; |
279 | 226 | ||
280 | mask = readl(d->virt_base + reg_mask); | 227 | mask = readl(d->virt_base + reg_mask); |
281 | mask &= ~(1 << pin); | 228 | mask &= ~(1 << irqd->hwirq); |
282 | writel(mask, d->virt_base + reg_mask); | 229 | writel(mask, d->virt_base + reg_mask); |
283 | } | 230 | } |
284 | 231 | ||
285 | static void exynos_wkup_irq_mask(struct irq_data *irqd) | 232 | static void exynos_wkup_irq_mask(struct irq_data *irqd) |
286 | { | 233 | { |
287 | struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); | 234 | struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd); |
288 | unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; | 235 | struct samsung_pinctrl_drv_data *d = b->drvdata; |
289 | unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); | 236 | unsigned long reg_mask = d->ctrl->weint_mask + b->eint_offset; |
290 | unsigned long reg_mask = d->ctrl->weint_mask + (bank << 2); | ||
291 | unsigned long mask; | 237 | unsigned long mask; |
292 | 238 | ||
293 | mask = readl(d->virt_base + reg_mask); | 239 | mask = readl(d->virt_base + reg_mask); |
294 | mask |= 1 << pin; | 240 | mask |= 1 << irqd->hwirq; |
295 | writel(mask, d->virt_base + reg_mask); | 241 | writel(mask, d->virt_base + reg_mask); |
296 | } | 242 | } |
297 | 243 | ||
298 | static void exynos_wkup_irq_ack(struct irq_data *irqd) | 244 | static void exynos_wkup_irq_ack(struct irq_data *irqd) |
299 | { | 245 | { |
300 | struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); | 246 | struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd); |
301 | unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; | 247 | struct samsung_pinctrl_drv_data *d = b->drvdata; |
302 | unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); | 248 | unsigned long pend = d->ctrl->weint_pend + b->eint_offset; |
303 | unsigned long pend = d->ctrl->weint_pend + (bank << 2); | ||
304 | 249 | ||
305 | writel(1 << pin, d->virt_base + pend); | 250 | writel(1 << irqd->hwirq, d->virt_base + pend); |
306 | } | 251 | } |
307 | 252 | ||
308 | static int exynos_wkup_irq_set_type(struct irq_data *irqd, unsigned int type) | 253 | static int exynos_wkup_irq_set_type(struct irq_data *irqd, unsigned int type) |
309 | { | 254 | { |
310 | struct samsung_pinctrl_drv_data *d = irq_data_get_irq_chip_data(irqd); | 255 | struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); |
311 | unsigned int bank = irqd->hwirq / EXYNOS_EINT_MAX_PER_BANK; | 256 | struct samsung_pinctrl_drv_data *d = bank->drvdata; |
312 | unsigned int pin = irqd->hwirq & (EXYNOS_EINT_MAX_PER_BANK - 1); | 257 | unsigned int pin = irqd->hwirq; |
313 | unsigned long reg_con = d->ctrl->weint_con + (bank << 2); | 258 | unsigned long reg_con = d->ctrl->weint_con + bank->eint_offset; |
314 | unsigned long shift = EXYNOS_EINT_CON_LEN * pin; | 259 | unsigned long shift = EXYNOS_EINT_CON_LEN * pin; |
315 | unsigned long con, trig_type; | 260 | unsigned long con, trig_type; |
261 | unsigned int mask; | ||
316 | 262 | ||
317 | switch (type) { | 263 | switch (type) { |
318 | case IRQ_TYPE_EDGE_RISING: | 264 | case IRQ_TYPE_EDGE_RISING: |
@@ -344,6 +290,16 @@ static int exynos_wkup_irq_set_type(struct irq_data *irqd, unsigned int type) | |||
344 | con &= ~(EXYNOS_EINT_CON_MASK << shift); | 290 | con &= ~(EXYNOS_EINT_CON_MASK << shift); |
345 | con |= trig_type << shift; | 291 | con |= trig_type << shift; |
346 | writel(con, d->virt_base + reg_con); | 292 | writel(con, d->virt_base + reg_con); |
293 | |||
294 | reg_con = bank->pctl_offset; | ||
295 | shift = pin * bank->func_width; | ||
296 | mask = (1 << bank->func_width) - 1; | ||
297 | |||
298 | con = readl(d->virt_base + reg_con); | ||
299 | con &= ~(mask << shift); | ||
300 | con |= EXYNOS_EINT_FUNC << shift; | ||
301 | writel(con, d->virt_base + reg_con); | ||
302 | |||
347 | return 0; | 303 | return 0; |
348 | } | 304 | } |
349 | 305 | ||
@@ -362,6 +318,7 @@ static struct irq_chip exynos_wkup_irq_chip = { | |||
362 | static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | 318 | static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc) |
363 | { | 319 | { |
364 | struct exynos_weint_data *eintd = irq_get_handler_data(irq); | 320 | struct exynos_weint_data *eintd = irq_get_handler_data(irq); |
321 | struct samsung_pin_bank *bank = eintd->bank; | ||
365 | struct irq_chip *chip = irq_get_chip(irq); | 322 | struct irq_chip *chip = irq_get_chip(irq); |
366 | int eint_irq; | 323 | int eint_irq; |
367 | 324 | ||
@@ -371,20 +328,20 @@ static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
371 | if (chip->irq_ack) | 328 | if (chip->irq_ack) |
372 | chip->irq_ack(&desc->irq_data); | 329 | chip->irq_ack(&desc->irq_data); |
373 | 330 | ||
374 | eint_irq = irq_linear_revmap(eintd->domain, eintd->irq); | 331 | eint_irq = irq_linear_revmap(bank->irq_domain, eintd->irq); |
375 | generic_handle_irq(eint_irq); | 332 | generic_handle_irq(eint_irq); |
376 | chip->irq_unmask(&desc->irq_data); | 333 | chip->irq_unmask(&desc->irq_data); |
377 | chained_irq_exit(chip, desc); | 334 | chained_irq_exit(chip, desc); |
378 | } | 335 | } |
379 | 336 | ||
380 | static inline void exynos_irq_demux_eint(int irq_base, unsigned long pend, | 337 | static inline void exynos_irq_demux_eint(unsigned long pend, |
381 | struct irq_domain *domain) | 338 | struct irq_domain *domain) |
382 | { | 339 | { |
383 | unsigned int irq; | 340 | unsigned int irq; |
384 | 341 | ||
385 | while (pend) { | 342 | while (pend) { |
386 | irq = fls(pend) - 1; | 343 | irq = fls(pend) - 1; |
387 | generic_handle_irq(irq_find_mapping(domain, irq_base + irq)); | 344 | generic_handle_irq(irq_find_mapping(domain, irq)); |
388 | pend &= ~(1 << irq); | 345 | pend &= ~(1 << irq); |
389 | } | 346 | } |
390 | } | 347 | } |
@@ -393,18 +350,22 @@ static inline void exynos_irq_demux_eint(int irq_base, unsigned long pend, | |||
393 | static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | 350 | static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) |
394 | { | 351 | { |
395 | struct irq_chip *chip = irq_get_chip(irq); | 352 | struct irq_chip *chip = irq_get_chip(irq); |
396 | struct exynos_weint_data *eintd = irq_get_handler_data(irq); | 353 | struct exynos_muxed_weint_data *eintd = irq_get_handler_data(irq); |
397 | struct samsung_pinctrl_drv_data *d = eintd->domain->host_data; | 354 | struct samsung_pinctrl_drv_data *d = eintd->banks[0]->drvdata; |
355 | struct samsung_pin_ctrl *ctrl = d->ctrl; | ||
398 | unsigned long pend; | 356 | unsigned long pend; |
399 | unsigned long mask; | 357 | unsigned long mask; |
358 | int i; | ||
400 | 359 | ||
401 | chained_irq_enter(chip, desc); | 360 | chained_irq_enter(chip, desc); |
402 | pend = readl(d->virt_base + d->ctrl->weint_pend + 0x8); | 361 | |
403 | mask = readl(d->virt_base + d->ctrl->weint_mask + 0x8); | 362 | for (i = 0; i < eintd->nr_banks; ++i) { |
404 | exynos_irq_demux_eint(16, pend & ~mask, eintd->domain); | 363 | struct samsung_pin_bank *b = eintd->banks[i]; |
405 | pend = readl(d->virt_base + d->ctrl->weint_pend + 0xC); | 364 | pend = readl(d->virt_base + ctrl->weint_pend + b->eint_offset); |
406 | mask = readl(d->virt_base + d->ctrl->weint_mask + 0xC); | 365 | mask = readl(d->virt_base + ctrl->weint_mask + b->eint_offset); |
407 | exynos_irq_demux_eint(24, pend & ~mask, eintd->domain); | 366 | exynos_irq_demux_eint(pend & ~mask, b->irq_domain); |
367 | } | ||
368 | |||
408 | chained_irq_exit(chip, desc); | 369 | chained_irq_exit(chip, desc); |
409 | } | 370 | } |
410 | 371 | ||
@@ -434,7 +395,11 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) | |||
434 | struct device *dev = d->dev; | 395 | struct device *dev = d->dev; |
435 | struct device_node *wkup_np = NULL; | 396 | struct device_node *wkup_np = NULL; |
436 | struct device_node *np; | 397 | struct device_node *np; |
398 | struct samsung_pin_bank *bank; | ||
437 | struct exynos_weint_data *weint_data; | 399 | struct exynos_weint_data *weint_data; |
400 | struct exynos_muxed_weint_data *muxed_data; | ||
401 | unsigned int muxed_banks = 0; | ||
402 | unsigned int i; | ||
438 | int idx, irq; | 403 | int idx, irq; |
439 | 404 | ||
440 | for_each_child_of_node(dev->of_node, np) { | 405 | for_each_child_of_node(dev->of_node, np) { |
@@ -446,90 +411,124 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) | |||
446 | if (!wkup_np) | 411 | if (!wkup_np) |
447 | return -ENODEV; | 412 | return -ENODEV; |
448 | 413 | ||
449 | d->wkup_irqd = irq_domain_add_linear(wkup_np, d->ctrl->nr_wint, | 414 | bank = d->ctrl->pin_banks; |
450 | &exynos_wkup_irqd_ops, d); | 415 | for (i = 0; i < d->ctrl->nr_banks; ++i, ++bank) { |
451 | if (!d->wkup_irqd) { | 416 | if (bank->eint_type != EINT_TYPE_WKUP) |
452 | dev_err(dev, "wakeup irq domain allocation failed\n"); | 417 | continue; |
453 | return -ENXIO; | ||
454 | } | ||
455 | 418 | ||
456 | weint_data = devm_kzalloc(dev, sizeof(*weint_data) * 17, GFP_KERNEL); | 419 | bank->irq_domain = irq_domain_add_linear(bank->of_node, |
457 | if (!weint_data) { | 420 | bank->nr_pins, &exynos_wkup_irqd_ops, bank); |
458 | dev_err(dev, "could not allocate memory for weint_data\n"); | 421 | if (!bank->irq_domain) { |
459 | return -ENOMEM; | 422 | dev_err(dev, "wkup irq domain add failed\n"); |
460 | } | 423 | return -ENXIO; |
424 | } | ||
461 | 425 | ||
462 | irq = irq_of_parse_and_map(wkup_np, 16); | 426 | if (!of_find_property(bank->of_node, "interrupts", NULL)) { |
463 | if (irq) { | 427 | bank->eint_type = EINT_TYPE_WKUP_MUX; |
464 | weint_data[16].domain = d->wkup_irqd; | 428 | ++muxed_banks; |
465 | irq_set_chained_handler(irq, exynos_irq_demux_eint16_31); | 429 | continue; |
466 | irq_set_handler_data(irq, &weint_data[16]); | 430 | } |
467 | } else { | ||
468 | dev_err(dev, "irq number for EINT16-32 not found\n"); | ||
469 | } | ||
470 | 431 | ||
471 | for (idx = 0; idx < 16; idx++) { | 432 | weint_data = devm_kzalloc(dev, bank->nr_pins |
472 | weint_data[idx].domain = d->wkup_irqd; | 433 | * sizeof(*weint_data), GFP_KERNEL); |
473 | weint_data[idx].irq = idx; | 434 | if (!weint_data) { |
435 | dev_err(dev, "could not allocate memory for weint_data\n"); | ||
436 | return -ENOMEM; | ||
437 | } | ||
474 | 438 | ||
475 | irq = irq_of_parse_and_map(wkup_np, idx); | 439 | for (idx = 0; idx < bank->nr_pins; ++idx) { |
476 | if (irq) { | 440 | irq = irq_of_parse_and_map(bank->of_node, idx); |
441 | if (!irq) { | ||
442 | dev_err(dev, "irq number for eint-%s-%d not found\n", | ||
443 | bank->name, idx); | ||
444 | continue; | ||
445 | } | ||
446 | weint_data[idx].irq = idx; | ||
447 | weint_data[idx].bank = bank; | ||
477 | irq_set_handler_data(irq, &weint_data[idx]); | 448 | irq_set_handler_data(irq, &weint_data[idx]); |
478 | irq_set_chained_handler(irq, exynos_irq_eint0_15); | 449 | irq_set_chained_handler(irq, exynos_irq_eint0_15); |
479 | } else { | ||
480 | dev_err(dev, "irq number for eint-%x not found\n", idx); | ||
481 | } | 450 | } |
482 | } | 451 | } |
452 | |||
453 | if (!muxed_banks) | ||
454 | return 0; | ||
455 | |||
456 | irq = irq_of_parse_and_map(wkup_np, 0); | ||
457 | if (!irq) { | ||
458 | dev_err(dev, "irq number for muxed EINTs not found\n"); | ||
459 | return 0; | ||
460 | } | ||
461 | |||
462 | muxed_data = devm_kzalloc(dev, sizeof(*muxed_data) | ||
463 | + muxed_banks*sizeof(struct samsung_pin_bank *), GFP_KERNEL); | ||
464 | if (!muxed_data) { | ||
465 | dev_err(dev, "could not allocate memory for muxed_data\n"); | ||
466 | return -ENOMEM; | ||
467 | } | ||
468 | |||
469 | irq_set_chained_handler(irq, exynos_irq_demux_eint16_31); | ||
470 | irq_set_handler_data(irq, muxed_data); | ||
471 | |||
472 | bank = d->ctrl->pin_banks; | ||
473 | idx = 0; | ||
474 | for (i = 0; i < d->ctrl->nr_banks; ++i, ++bank) { | ||
475 | if (bank->eint_type != EINT_TYPE_WKUP_MUX) | ||
476 | continue; | ||
477 | |||
478 | muxed_data->banks[idx++] = bank; | ||
479 | } | ||
480 | muxed_data->nr_banks = muxed_banks; | ||
481 | |||
483 | return 0; | 482 | return 0; |
484 | } | 483 | } |
485 | 484 | ||
486 | /* pin banks of exynos4210 pin-controller 0 */ | 485 | /* pin banks of exynos4210 pin-controller 0 */ |
487 | static struct samsung_pin_bank exynos4210_pin_banks0[] = { | 486 | static struct samsung_pin_bank exynos4210_pin_banks0[] = { |
488 | EXYNOS_PIN_BANK_EINTG(0x000, EXYNOS4210_GPIO_A0, "gpa0"), | 487 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), |
489 | EXYNOS_PIN_BANK_EINTG(0x020, EXYNOS4210_GPIO_A1, "gpa1"), | 488 | EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), |
490 | EXYNOS_PIN_BANK_EINTG(0x040, EXYNOS4210_GPIO_B, "gpb"), | 489 | EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), |
491 | EXYNOS_PIN_BANK_EINTG(0x060, EXYNOS4210_GPIO_C0, "gpc0"), | 490 | EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), |
492 | EXYNOS_PIN_BANK_EINTG(0x080, EXYNOS4210_GPIO_C1, "gpc1"), | 491 | EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), |
493 | EXYNOS_PIN_BANK_EINTG(0x0A0, EXYNOS4210_GPIO_D0, "gpd0"), | 492 | EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), |
494 | EXYNOS_PIN_BANK_EINTG(0x0C0, EXYNOS4210_GPIO_D1, "gpd1"), | 493 | EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18), |
495 | EXYNOS_PIN_BANK_EINTG(0x0E0, EXYNOS4210_GPIO_E0, "gpe0"), | 494 | EXYNOS_PIN_BANK_EINTG(5, 0x0E0, "gpe0", 0x1c), |
496 | EXYNOS_PIN_BANK_EINTG(0x100, EXYNOS4210_GPIO_E1, "gpe1"), | 495 | EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpe1", 0x20), |
497 | EXYNOS_PIN_BANK_EINTG(0x120, EXYNOS4210_GPIO_E2, "gpe2"), | 496 | EXYNOS_PIN_BANK_EINTG(6, 0x120, "gpe2", 0x24), |
498 | EXYNOS_PIN_BANK_EINTG(0x140, EXYNOS4210_GPIO_E3, "gpe3"), | 497 | EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpe3", 0x28), |
499 | EXYNOS_PIN_BANK_EINTG(0x160, EXYNOS4210_GPIO_E4, "gpe4"), | 498 | EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpe4", 0x2c), |
500 | EXYNOS_PIN_BANK_EINTG(0x180, EXYNOS4210_GPIO_F0, "gpf0"), | 499 | EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30), |
501 | EXYNOS_PIN_BANK_EINTG(0x1A0, EXYNOS4210_GPIO_F1, "gpf1"), | 500 | EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34), |
502 | EXYNOS_PIN_BANK_EINTG(0x1C0, EXYNOS4210_GPIO_F2, "gpf2"), | 501 | EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38), |
503 | EXYNOS_PIN_BANK_EINTG(0x1E0, EXYNOS4210_GPIO_F3, "gpf3"), | 502 | EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c), |
504 | }; | 503 | }; |
505 | 504 | ||
506 | /* pin banks of exynos4210 pin-controller 1 */ | 505 | /* pin banks of exynos4210 pin-controller 1 */ |
507 | static struct samsung_pin_bank exynos4210_pin_banks1[] = { | 506 | static struct samsung_pin_bank exynos4210_pin_banks1[] = { |
508 | EXYNOS_PIN_BANK_EINTG(0x000, EXYNOS4210_GPIO_J0, "gpj0"), | 507 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpj0", 0x00), |
509 | EXYNOS_PIN_BANK_EINTG(0x020, EXYNOS4210_GPIO_J1, "gpj1"), | 508 | EXYNOS_PIN_BANK_EINTG(5, 0x020, "gpj1", 0x04), |
510 | EXYNOS_PIN_BANK_EINTG(0x040, EXYNOS4210_GPIO_K0, "gpk0"), | 509 | EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08), |
511 | EXYNOS_PIN_BANK_EINTG(0x060, EXYNOS4210_GPIO_K1, "gpk1"), | 510 | EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), |
512 | EXYNOS_PIN_BANK_EINTG(0x080, EXYNOS4210_GPIO_K2, "gpk2"), | 511 | EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), |
513 | EXYNOS_PIN_BANK_EINTG(0x0A0, EXYNOS4210_GPIO_K3, "gpk3"), | 512 | EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14), |
514 | EXYNOS_PIN_BANK_EINTG(0x0C0, EXYNOS4210_GPIO_L0, "gpl0"), | 513 | EXYNOS_PIN_BANK_EINTG(8, 0x0C0, "gpl0", 0x18), |
515 | EXYNOS_PIN_BANK_EINTG(0x0E0, EXYNOS4210_GPIO_L1, "gpl1"), | 514 | EXYNOS_PIN_BANK_EINTG(3, 0x0E0, "gpl1", 0x1c), |
516 | EXYNOS_PIN_BANK_EINTG(0x100, EXYNOS4210_GPIO_L2, "gpl2"), | 515 | EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20), |
517 | EXYNOS_PIN_BANK_EINTN(0x120, EXYNOS4210_GPIO_Y0, "gpy0"), | 516 | EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"), |
518 | EXYNOS_PIN_BANK_EINTN(0x140, EXYNOS4210_GPIO_Y1, "gpy1"), | 517 | EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"), |
519 | EXYNOS_PIN_BANK_EINTN(0x160, EXYNOS4210_GPIO_Y2, "gpy2"), | 518 | EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"), |
520 | EXYNOS_PIN_BANK_EINTN(0x180, EXYNOS4210_GPIO_Y3, "gpy3"), | 519 | EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"), |
521 | EXYNOS_PIN_BANK_EINTN(0x1A0, EXYNOS4210_GPIO_Y4, "gpy4"), | 520 | EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"), |
522 | EXYNOS_PIN_BANK_EINTN(0x1C0, EXYNOS4210_GPIO_Y5, "gpy5"), | 521 | EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"), |
523 | EXYNOS_PIN_BANK_EINTN(0x1E0, EXYNOS4210_GPIO_Y6, "gpy6"), | 522 | EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"), |
524 | EXYNOS_PIN_BANK_EINTN(0xC00, EXYNOS4210_GPIO_X0, "gpx0"), | 523 | EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), |
525 | EXYNOS_PIN_BANK_EINTN(0xC20, EXYNOS4210_GPIO_X1, "gpx1"), | 524 | EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), |
526 | EXYNOS_PIN_BANK_EINTN(0xC40, EXYNOS4210_GPIO_X2, "gpx2"), | 525 | EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), |
527 | EXYNOS_PIN_BANK_EINTN(0xC60, EXYNOS4210_GPIO_X3, "gpx3"), | 526 | EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), |
528 | }; | 527 | }; |
529 | 528 | ||
530 | /* pin banks of exynos4210 pin-controller 2 */ | 529 | /* pin banks of exynos4210 pin-controller 2 */ |
531 | static struct samsung_pin_bank exynos4210_pin_banks2[] = { | 530 | static struct samsung_pin_bank exynos4210_pin_banks2[] = { |
532 | EXYNOS_PIN_BANK_EINTN(0x000, EXYNOS4210_GPIO_Z, "gpz"), | 531 | EXYNOS_PIN_BANK_EINTN(7, 0x000, "gpz"), |
533 | }; | 532 | }; |
534 | 533 | ||
535 | /* | 534 | /* |
@@ -541,9 +540,6 @@ struct samsung_pin_ctrl exynos4210_pin_ctrl[] = { | |||
541 | /* pin-controller instance 0 data */ | 540 | /* pin-controller instance 0 data */ |
542 | .pin_banks = exynos4210_pin_banks0, | 541 | .pin_banks = exynos4210_pin_banks0, |
543 | .nr_banks = ARRAY_SIZE(exynos4210_pin_banks0), | 542 | .nr_banks = ARRAY_SIZE(exynos4210_pin_banks0), |
544 | .base = EXYNOS4210_GPIO_A0_START, | ||
545 | .nr_pins = EXYNOS4210_GPIOA_NR_PINS, | ||
546 | .nr_gint = EXYNOS4210_GPIOA_NR_GINT, | ||
547 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | 543 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, |
548 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | 544 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, |
549 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | 545 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, |
@@ -554,10 +550,6 @@ struct samsung_pin_ctrl exynos4210_pin_ctrl[] = { | |||
554 | /* pin-controller instance 1 data */ | 550 | /* pin-controller instance 1 data */ |
555 | .pin_banks = exynos4210_pin_banks1, | 551 | .pin_banks = exynos4210_pin_banks1, |
556 | .nr_banks = ARRAY_SIZE(exynos4210_pin_banks1), | 552 | .nr_banks = ARRAY_SIZE(exynos4210_pin_banks1), |
557 | .base = EXYNOS4210_GPIOA_NR_PINS, | ||
558 | .nr_pins = EXYNOS4210_GPIOB_NR_PINS, | ||
559 | .nr_gint = EXYNOS4210_GPIOB_NR_GINT, | ||
560 | .nr_wint = 32, | ||
561 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | 553 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, |
562 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | 554 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, |
563 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | 555 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, |
@@ -572,9 +564,116 @@ struct samsung_pin_ctrl exynos4210_pin_ctrl[] = { | |||
572 | /* pin-controller instance 2 data */ | 564 | /* pin-controller instance 2 data */ |
573 | .pin_banks = exynos4210_pin_banks2, | 565 | .pin_banks = exynos4210_pin_banks2, |
574 | .nr_banks = ARRAY_SIZE(exynos4210_pin_banks2), | 566 | .nr_banks = ARRAY_SIZE(exynos4210_pin_banks2), |
575 | .base = EXYNOS4210_GPIOA_NR_PINS + | ||
576 | EXYNOS4210_GPIOB_NR_PINS, | ||
577 | .nr_pins = EXYNOS4210_GPIOC_NR_PINS, | ||
578 | .label = "exynos4210-gpio-ctrl2", | 567 | .label = "exynos4210-gpio-ctrl2", |
579 | }, | 568 | }, |
580 | }; | 569 | }; |
570 | |||
571 | /* pin banks of exynos4x12 pin-controller 0 */ | ||
572 | static struct samsung_pin_bank exynos4x12_pin_banks0[] = { | ||
573 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), | ||
574 | EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), | ||
575 | EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), | ||
576 | EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), | ||
577 | EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), | ||
578 | EXYNOS_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), | ||
579 | EXYNOS_PIN_BANK_EINTG(4, 0x0C0, "gpd1", 0x18), | ||
580 | EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf0", 0x30), | ||
581 | EXYNOS_PIN_BANK_EINTG(8, 0x1A0, "gpf1", 0x34), | ||
582 | EXYNOS_PIN_BANK_EINTG(8, 0x1C0, "gpf2", 0x38), | ||
583 | EXYNOS_PIN_BANK_EINTG(6, 0x1E0, "gpf3", 0x3c), | ||
584 | EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x40), | ||
585 | EXYNOS_PIN_BANK_EINTG(5, 0x260, "gpj1", 0x44), | ||
586 | }; | ||
587 | |||
588 | /* pin banks of exynos4x12 pin-controller 1 */ | ||
589 | static struct samsung_pin_bank exynos4x12_pin_banks1[] = { | ||
590 | EXYNOS_PIN_BANK_EINTG(7, 0x040, "gpk0", 0x08), | ||
591 | EXYNOS_PIN_BANK_EINTG(7, 0x060, "gpk1", 0x0c), | ||
592 | EXYNOS_PIN_BANK_EINTG(7, 0x080, "gpk2", 0x10), | ||
593 | EXYNOS_PIN_BANK_EINTG(7, 0x0A0, "gpk3", 0x14), | ||
594 | EXYNOS_PIN_BANK_EINTG(7, 0x0C0, "gpl0", 0x18), | ||
595 | EXYNOS_PIN_BANK_EINTG(2, 0x0E0, "gpl1", 0x1c), | ||
596 | EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpl2", 0x20), | ||
597 | EXYNOS_PIN_BANK_EINTG(8, 0x260, "gpm0", 0x24), | ||
598 | EXYNOS_PIN_BANK_EINTG(7, 0x280, "gpm1", 0x28), | ||
599 | EXYNOS_PIN_BANK_EINTG(5, 0x2A0, "gpm2", 0x2c), | ||
600 | EXYNOS_PIN_BANK_EINTG(8, 0x2C0, "gpm3", 0x30), | ||
601 | EXYNOS_PIN_BANK_EINTG(8, 0x2E0, "gpm4", 0x34), | ||
602 | EXYNOS_PIN_BANK_EINTN(6, 0x120, "gpy0"), | ||
603 | EXYNOS_PIN_BANK_EINTN(4, 0x140, "gpy1"), | ||
604 | EXYNOS_PIN_BANK_EINTN(6, 0x160, "gpy2"), | ||
605 | EXYNOS_PIN_BANK_EINTN(8, 0x180, "gpy3"), | ||
606 | EXYNOS_PIN_BANK_EINTN(8, 0x1A0, "gpy4"), | ||
607 | EXYNOS_PIN_BANK_EINTN(8, 0x1C0, "gpy5"), | ||
608 | EXYNOS_PIN_BANK_EINTN(8, 0x1E0, "gpy6"), | ||
609 | EXYNOS_PIN_BANK_EINTW(8, 0xC00, "gpx0", 0x00), | ||
610 | EXYNOS_PIN_BANK_EINTW(8, 0xC20, "gpx1", 0x04), | ||
611 | EXYNOS_PIN_BANK_EINTW(8, 0xC40, "gpx2", 0x08), | ||
612 | EXYNOS_PIN_BANK_EINTW(8, 0xC60, "gpx3", 0x0c), | ||
613 | }; | ||
614 | |||
615 | /* pin banks of exynos4x12 pin-controller 2 */ | ||
616 | static struct samsung_pin_bank exynos4x12_pin_banks2[] = { | ||
617 | EXYNOS_PIN_BANK_EINTG(7, 0x000, "gpz", 0x00), | ||
618 | }; | ||
619 | |||
620 | /* pin banks of exynos4x12 pin-controller 3 */ | ||
621 | static struct samsung_pin_bank exynos4x12_pin_banks3[] = { | ||
622 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpv0", 0x00), | ||
623 | EXYNOS_PIN_BANK_EINTG(8, 0x020, "gpv1", 0x04), | ||
624 | EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpv2", 0x08), | ||
625 | EXYNOS_PIN_BANK_EINTG(8, 0x060, "gpv3", 0x0c), | ||
626 | EXYNOS_PIN_BANK_EINTG(2, 0x080, "gpv4", 0x10), | ||
627 | }; | ||
628 | |||
629 | /* | ||
630 | * Samsung pinctrl driver data for Exynos4x12 SoC. Exynos4x12 SoC includes | ||
631 | * four gpio/pin-mux/pinconfig controllers. | ||
632 | */ | ||
633 | struct samsung_pin_ctrl exynos4x12_pin_ctrl[] = { | ||
634 | { | ||
635 | /* pin-controller instance 0 data */ | ||
636 | .pin_banks = exynos4x12_pin_banks0, | ||
637 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks0), | ||
638 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
639 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
640 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
641 | .svc = EXYNOS_SVC_OFFSET, | ||
642 | .eint_gpio_init = exynos_eint_gpio_init, | ||
643 | .label = "exynos4x12-gpio-ctrl0", | ||
644 | }, { | ||
645 | /* pin-controller instance 1 data */ | ||
646 | .pin_banks = exynos4x12_pin_banks1, | ||
647 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks1), | ||
648 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
649 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
650 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
651 | .weint_con = EXYNOS_WKUP_ECON_OFFSET, | ||
652 | .weint_mask = EXYNOS_WKUP_EMASK_OFFSET, | ||
653 | .weint_pend = EXYNOS_WKUP_EPEND_OFFSET, | ||
654 | .svc = EXYNOS_SVC_OFFSET, | ||
655 | .eint_gpio_init = exynos_eint_gpio_init, | ||
656 | .eint_wkup_init = exynos_eint_wkup_init, | ||
657 | .label = "exynos4x12-gpio-ctrl1", | ||
658 | }, { | ||
659 | /* pin-controller instance 2 data */ | ||
660 | .pin_banks = exynos4x12_pin_banks2, | ||
661 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks2), | ||
662 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
663 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
664 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
665 | .svc = EXYNOS_SVC_OFFSET, | ||
666 | .eint_gpio_init = exynos_eint_gpio_init, | ||
667 | .label = "exynos4x12-gpio-ctrl2", | ||
668 | }, { | ||
669 | /* pin-controller instance 3 data */ | ||
670 | .pin_banks = exynos4x12_pin_banks3, | ||
671 | .nr_banks = ARRAY_SIZE(exynos4x12_pin_banks3), | ||
672 | .geint_con = EXYNOS_GPIO_ECON_OFFSET, | ||
673 | .geint_mask = EXYNOS_GPIO_EMASK_OFFSET, | ||
674 | .geint_pend = EXYNOS_GPIO_EPEND_OFFSET, | ||
675 | .svc = EXYNOS_SVC_OFFSET, | ||
676 | .eint_gpio_init = exynos_eint_gpio_init, | ||
677 | .label = "exynos4x12-gpio-ctrl3", | ||
678 | }, | ||
679 | }; | ||
diff --git a/drivers/pinctrl/pinctrl-exynos.h b/drivers/pinctrl/pinctrl-exynos.h index 31d0a06174e4..0a708890d8b4 100644 --- a/drivers/pinctrl/pinctrl-exynos.h +++ b/drivers/pinctrl/pinctrl-exynos.h | |||
@@ -17,125 +17,6 @@ | |||
17 | * (at your option) any later version. | 17 | * (at your option) any later version. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #define EXYNOS_GPIO_START(__gpio) ((__gpio##_START) + (__gpio##_NR)) | ||
21 | |||
22 | #define EXYNOS4210_GPIO_A0_NR (8) | ||
23 | #define EXYNOS4210_GPIO_A1_NR (6) | ||
24 | #define EXYNOS4210_GPIO_B_NR (8) | ||
25 | #define EXYNOS4210_GPIO_C0_NR (5) | ||
26 | #define EXYNOS4210_GPIO_C1_NR (5) | ||
27 | #define EXYNOS4210_GPIO_D0_NR (4) | ||
28 | #define EXYNOS4210_GPIO_D1_NR (4) | ||
29 | #define EXYNOS4210_GPIO_E0_NR (5) | ||
30 | #define EXYNOS4210_GPIO_E1_NR (8) | ||
31 | #define EXYNOS4210_GPIO_E2_NR (6) | ||
32 | #define EXYNOS4210_GPIO_E3_NR (8) | ||
33 | #define EXYNOS4210_GPIO_E4_NR (8) | ||
34 | #define EXYNOS4210_GPIO_F0_NR (8) | ||
35 | #define EXYNOS4210_GPIO_F1_NR (8) | ||
36 | #define EXYNOS4210_GPIO_F2_NR (8) | ||
37 | #define EXYNOS4210_GPIO_F3_NR (6) | ||
38 | #define EXYNOS4210_GPIO_J0_NR (8) | ||
39 | #define EXYNOS4210_GPIO_J1_NR (5) | ||
40 | #define EXYNOS4210_GPIO_K0_NR (7) | ||
41 | #define EXYNOS4210_GPIO_K1_NR (7) | ||
42 | #define EXYNOS4210_GPIO_K2_NR (7) | ||
43 | #define EXYNOS4210_GPIO_K3_NR (7) | ||
44 | #define EXYNOS4210_GPIO_L0_NR (8) | ||
45 | #define EXYNOS4210_GPIO_L1_NR (3) | ||
46 | #define EXYNOS4210_GPIO_L2_NR (8) | ||
47 | #define EXYNOS4210_GPIO_Y0_NR (6) | ||
48 | #define EXYNOS4210_GPIO_Y1_NR (4) | ||
49 | #define EXYNOS4210_GPIO_Y2_NR (6) | ||
50 | #define EXYNOS4210_GPIO_Y3_NR (8) | ||
51 | #define EXYNOS4210_GPIO_Y4_NR (8) | ||
52 | #define EXYNOS4210_GPIO_Y5_NR (8) | ||
53 | #define EXYNOS4210_GPIO_Y6_NR (8) | ||
54 | #define EXYNOS4210_GPIO_X0_NR (8) | ||
55 | #define EXYNOS4210_GPIO_X1_NR (8) | ||
56 | #define EXYNOS4210_GPIO_X2_NR (8) | ||
57 | #define EXYNOS4210_GPIO_X3_NR (8) | ||
58 | #define EXYNOS4210_GPIO_Z_NR (7) | ||
59 | |||
60 | enum exynos4210_gpio_xa_start { | ||
61 | EXYNOS4210_GPIO_A0_START = 0, | ||
62 | EXYNOS4210_GPIO_A1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_A0), | ||
63 | EXYNOS4210_GPIO_B_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_A1), | ||
64 | EXYNOS4210_GPIO_C0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_B), | ||
65 | EXYNOS4210_GPIO_C1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_C0), | ||
66 | EXYNOS4210_GPIO_D0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_C1), | ||
67 | EXYNOS4210_GPIO_D1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_D0), | ||
68 | EXYNOS4210_GPIO_E0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_D1), | ||
69 | EXYNOS4210_GPIO_E1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E0), | ||
70 | EXYNOS4210_GPIO_E2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E1), | ||
71 | EXYNOS4210_GPIO_E3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E2), | ||
72 | EXYNOS4210_GPIO_E4_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E3), | ||
73 | EXYNOS4210_GPIO_F0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_E4), | ||
74 | EXYNOS4210_GPIO_F1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_F0), | ||
75 | EXYNOS4210_GPIO_F2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_F1), | ||
76 | EXYNOS4210_GPIO_F3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_F2), | ||
77 | }; | ||
78 | |||
79 | enum exynos4210_gpio_xb_start { | ||
80 | EXYNOS4210_GPIO_J0_START = 0, | ||
81 | EXYNOS4210_GPIO_J1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_J0), | ||
82 | EXYNOS4210_GPIO_K0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_J1), | ||
83 | EXYNOS4210_GPIO_K1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K0), | ||
84 | EXYNOS4210_GPIO_K2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K1), | ||
85 | EXYNOS4210_GPIO_K3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K2), | ||
86 | EXYNOS4210_GPIO_L0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_K3), | ||
87 | EXYNOS4210_GPIO_L1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_L0), | ||
88 | EXYNOS4210_GPIO_L2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_L1), | ||
89 | EXYNOS4210_GPIO_Y0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_L2), | ||
90 | EXYNOS4210_GPIO_Y1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y0), | ||
91 | EXYNOS4210_GPIO_Y2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y1), | ||
92 | EXYNOS4210_GPIO_Y3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y2), | ||
93 | EXYNOS4210_GPIO_Y4_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y3), | ||
94 | EXYNOS4210_GPIO_Y5_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y4), | ||
95 | EXYNOS4210_GPIO_Y6_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y5), | ||
96 | EXYNOS4210_GPIO_X0_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_Y6), | ||
97 | EXYNOS4210_GPIO_X1_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_X0), | ||
98 | EXYNOS4210_GPIO_X2_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_X1), | ||
99 | EXYNOS4210_GPIO_X3_START = EXYNOS_GPIO_START(EXYNOS4210_GPIO_X2), | ||
100 | }; | ||
101 | |||
102 | enum exynos4210_gpio_xc_start { | ||
103 | EXYNOS4210_GPIO_Z_START = 0, | ||
104 | }; | ||
105 | |||
106 | #define EXYNOS4210_GPIO_A0_IRQ EXYNOS4210_GPIO_A0_START | ||
107 | #define EXYNOS4210_GPIO_A1_IRQ EXYNOS4210_GPIO_A1_START | ||
108 | #define EXYNOS4210_GPIO_B_IRQ EXYNOS4210_GPIO_B_START | ||
109 | #define EXYNOS4210_GPIO_C0_IRQ EXYNOS4210_GPIO_C0_START | ||
110 | #define EXYNOS4210_GPIO_C1_IRQ EXYNOS4210_GPIO_C1_START | ||
111 | #define EXYNOS4210_GPIO_D0_IRQ EXYNOS4210_GPIO_D0_START | ||
112 | #define EXYNOS4210_GPIO_D1_IRQ EXYNOS4210_GPIO_D1_START | ||
113 | #define EXYNOS4210_GPIO_E0_IRQ EXYNOS4210_GPIO_E0_START | ||
114 | #define EXYNOS4210_GPIO_E1_IRQ EXYNOS4210_GPIO_E1_START | ||
115 | #define EXYNOS4210_GPIO_E2_IRQ EXYNOS4210_GPIO_E2_START | ||
116 | #define EXYNOS4210_GPIO_E3_IRQ EXYNOS4210_GPIO_E3_START | ||
117 | #define EXYNOS4210_GPIO_E4_IRQ EXYNOS4210_GPIO_E4_START | ||
118 | #define EXYNOS4210_GPIO_F0_IRQ EXYNOS4210_GPIO_F0_START | ||
119 | #define EXYNOS4210_GPIO_F1_IRQ EXYNOS4210_GPIO_F1_START | ||
120 | #define EXYNOS4210_GPIO_F2_IRQ EXYNOS4210_GPIO_F2_START | ||
121 | #define EXYNOS4210_GPIO_F3_IRQ EXYNOS4210_GPIO_F3_START | ||
122 | #define EXYNOS4210_GPIO_J0_IRQ EXYNOS4210_GPIO_J0_START | ||
123 | #define EXYNOS4210_GPIO_J1_IRQ EXYNOS4210_GPIO_J1_START | ||
124 | #define EXYNOS4210_GPIO_K0_IRQ EXYNOS4210_GPIO_K0_START | ||
125 | #define EXYNOS4210_GPIO_K1_IRQ EXYNOS4210_GPIO_K1_START | ||
126 | #define EXYNOS4210_GPIO_K2_IRQ EXYNOS4210_GPIO_K2_START | ||
127 | #define EXYNOS4210_GPIO_K3_IRQ EXYNOS4210_GPIO_K3_START | ||
128 | #define EXYNOS4210_GPIO_L0_IRQ EXYNOS4210_GPIO_L0_START | ||
129 | #define EXYNOS4210_GPIO_L1_IRQ EXYNOS4210_GPIO_L1_START | ||
130 | #define EXYNOS4210_GPIO_L2_IRQ EXYNOS4210_GPIO_L2_START | ||
131 | #define EXYNOS4210_GPIO_Z_IRQ EXYNOS4210_GPIO_Z_START | ||
132 | |||
133 | #define EXYNOS4210_GPIOA_NR_PINS EXYNOS_GPIO_START(EXYNOS4210_GPIO_F3) | ||
134 | #define EXYNOS4210_GPIOA_NR_GINT EXYNOS_GPIO_START(EXYNOS4210_GPIO_F3) | ||
135 | #define EXYNOS4210_GPIOB_NR_PINS EXYNOS_GPIO_START(EXYNOS4210_GPIO_X3) | ||
136 | #define EXYNOS4210_GPIOB_NR_GINT EXYNOS_GPIO_START(EXYNOS4210_GPIO_L2) | ||
137 | #define EXYNOS4210_GPIOC_NR_PINS EXYNOS_GPIO_START(EXYNOS4210_GPIO_Z) | ||
138 | |||
139 | /* External GPIO and wakeup interrupt related definitions */ | 20 | /* External GPIO and wakeup interrupt related definitions */ |
140 | #define EXYNOS_GPIO_ECON_OFFSET 0x700 | 21 | #define EXYNOS_GPIO_ECON_OFFSET 0x700 |
141 | #define EXYNOS_GPIO_EMASK_OFFSET 0x900 | 22 | #define EXYNOS_GPIO_EMASK_OFFSET 0x900 |
@@ -165,11 +46,10 @@ enum exynos4210_gpio_xc_start { | |||
165 | #define EXYNOS_EINT_MAX_PER_BANK 8 | 46 | #define EXYNOS_EINT_MAX_PER_BANK 8 |
166 | #define EXYNOS_EINT_NR_WKUP_EINT | 47 | #define EXYNOS_EINT_NR_WKUP_EINT |
167 | 48 | ||
168 | #define EXYNOS_PIN_BANK_EINTN(reg, __gpio, id) \ | 49 | #define EXYNOS_PIN_BANK_EINTN(pins, reg, id) \ |
169 | { \ | 50 | { \ |
170 | .pctl_offset = reg, \ | 51 | .pctl_offset = reg, \ |
171 | .pin_base = (__gpio##_START), \ | 52 | .nr_pins = pins, \ |
172 | .nr_pins = (__gpio##_NR), \ | ||
173 | .func_width = 4, \ | 53 | .func_width = 4, \ |
174 | .pud_width = 2, \ | 54 | .pud_width = 2, \ |
175 | .drv_width = 2, \ | 55 | .drv_width = 2, \ |
@@ -179,40 +59,50 @@ enum exynos4210_gpio_xc_start { | |||
179 | .name = id \ | 59 | .name = id \ |
180 | } | 60 | } |
181 | 61 | ||
182 | #define EXYNOS_PIN_BANK_EINTG(reg, __gpio, id) \ | 62 | #define EXYNOS_PIN_BANK_EINTG(pins, reg, id, offs) \ |
183 | { \ | 63 | { \ |
184 | .pctl_offset = reg, \ | 64 | .pctl_offset = reg, \ |
185 | .pin_base = (__gpio##_START), \ | 65 | .nr_pins = pins, \ |
186 | .nr_pins = (__gpio##_NR), \ | ||
187 | .func_width = 4, \ | 66 | .func_width = 4, \ |
188 | .pud_width = 2, \ | 67 | .pud_width = 2, \ |
189 | .drv_width = 2, \ | 68 | .drv_width = 2, \ |
190 | .conpdn_width = 2, \ | 69 | .conpdn_width = 2, \ |
191 | .pudpdn_width = 2, \ | 70 | .pudpdn_width = 2, \ |
192 | .eint_type = EINT_TYPE_GPIO, \ | 71 | .eint_type = EINT_TYPE_GPIO, \ |
193 | .irq_base = (__gpio##_IRQ), \ | 72 | .eint_offset = offs, \ |
194 | .name = id \ | 73 | .name = id \ |
195 | } | 74 | } |
196 | 75 | ||
197 | /** | 76 | #define EXYNOS_PIN_BANK_EINTW(pins, reg, id, offs) \ |
198 | * struct exynos_geint_data: gpio eint specific data for irq_chip callbacks. | 77 | { \ |
199 | * @bank: pin bank from which this gpio interrupt originates. | 78 | .pctl_offset = reg, \ |
200 | * @pin: pin number within the bank. | 79 | .nr_pins = pins, \ |
201 | * @eint_offset: offset to be added to the con/pend/mask register bank base. | 80 | .func_width = 4, \ |
202 | */ | 81 | .pud_width = 2, \ |
203 | struct exynos_geint_data { | 82 | .drv_width = 2, \ |
204 | struct samsung_pin_bank *bank; | 83 | .eint_type = EINT_TYPE_WKUP, \ |
205 | u32 pin; | 84 | .eint_offset = offs, \ |
206 | u32 eint_offset; | 85 | .name = id \ |
207 | }; | 86 | } |
208 | 87 | ||
209 | /** | 88 | /** |
210 | * struct exynos_weint_data: irq specific data for all the wakeup interrupts | 89 | * struct exynos_weint_data: irq specific data for all the wakeup interrupts |
211 | * generated by the external wakeup interrupt controller. | 90 | * generated by the external wakeup interrupt controller. |
212 | * @domain: irq domain representing the external wakeup interrupts | ||
213 | * @irq: interrupt number within the domain. | 91 | * @irq: interrupt number within the domain. |
92 | * @bank: bank responsible for this interrupt | ||
214 | */ | 93 | */ |
215 | struct exynos_weint_data { | 94 | struct exynos_weint_data { |
216 | struct irq_domain *domain; | 95 | unsigned int irq; |
217 | u32 irq; | 96 | struct samsung_pin_bank *bank; |
97 | }; | ||
98 | |||
99 | /** | ||
100 | * struct exynos_muxed_weint_data: irq specific data for muxed wakeup interrupts | ||
101 | * generated by the external wakeup interrupt controller. | ||
102 | * @nr_banks: count of banks being part of the mux | ||
103 | * @banks: array of banks being part of the mux | ||
104 | */ | ||
105 | struct exynos_muxed_weint_data { | ||
106 | unsigned int nr_banks; | ||
107 | struct samsung_pin_bank *banks[]; | ||
218 | }; | 108 | }; |
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c new file mode 100644 index 000000000000..b8635f634e91 --- /dev/null +++ b/drivers/pinctrl/pinctrl-exynos5440.c | |||
@@ -0,0 +1,919 @@ | |||
1 | /* | ||
2 | * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's EXYNOS5440 SoC. | ||
3 | * | ||
4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/module.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/device.h> | ||
20 | #include <linux/pinctrl/pinctrl.h> | ||
21 | #include <linux/pinctrl/pinmux.h> | ||
22 | #include <linux/pinctrl/pinconf.h> | ||
23 | #include "core.h" | ||
24 | |||
25 | /* EXYNOS5440 GPIO and Pinctrl register offsets */ | ||
26 | #define GPIO_MUX 0x00 | ||
27 | #define GPIO_IE 0x04 | ||
28 | #define GPIO_INT 0x08 | ||
29 | #define GPIO_TYPE 0x0C | ||
30 | #define GPIO_VAL 0x10 | ||
31 | #define GPIO_OE 0x14 | ||
32 | #define GPIO_IN 0x18 | ||
33 | #define GPIO_PE 0x1C | ||
34 | #define GPIO_PS 0x20 | ||
35 | #define GPIO_SR 0x24 | ||
36 | #define GPIO_DS0 0x28 | ||
37 | #define GPIO_DS1 0x2C | ||
38 | |||
39 | #define EXYNOS5440_MAX_PINS 23 | ||
40 | #define PIN_NAME_LENGTH 10 | ||
41 | |||
42 | #define GROUP_SUFFIX "-grp" | ||
43 | #define GSUFFIX_LEN sizeof(GROUP_SUFFIX) | ||
44 | #define FUNCTION_SUFFIX "-mux" | ||
45 | #define FSUFFIX_LEN sizeof(FUNCTION_SUFFIX) | ||
46 | |||
47 | /* | ||
48 | * pin configuration type and its value are packed together into a 16-bits. | ||
49 | * The upper 8-bits represent the configuration type and the lower 8-bits | ||
50 | * hold the value of the configuration type. | ||
51 | */ | ||
52 | #define PINCFG_TYPE_MASK 0xFF | ||
53 | #define PINCFG_VALUE_SHIFT 8 | ||
54 | #define PINCFG_VALUE_MASK (0xFF << PINCFG_VALUE_SHIFT) | ||
55 | #define PINCFG_PACK(type, value) (((value) << PINCFG_VALUE_SHIFT) | type) | ||
56 | #define PINCFG_UNPACK_TYPE(cfg) ((cfg) & PINCFG_TYPE_MASK) | ||
57 | #define PINCFG_UNPACK_VALUE(cfg) (((cfg) & PINCFG_VALUE_MASK) >> \ | ||
58 | PINCFG_VALUE_SHIFT) | ||
59 | |||
60 | /** | ||
61 | * enum pincfg_type - possible pin configuration types supported. | ||
62 | * @PINCFG_TYPE_PUD: Pull up/down configuration. | ||
63 | * @PINCFG_TYPE_DRV: Drive strength configuration. | ||
64 | * @PINCFG_TYPE_SKEW_RATE: Skew rate configuration. | ||
65 | * @PINCFG_TYPE_INPUT_TYPE: Pin input type configuration. | ||
66 | */ | ||
67 | enum pincfg_type { | ||
68 | PINCFG_TYPE_PUD, | ||
69 | PINCFG_TYPE_DRV, | ||
70 | PINCFG_TYPE_SKEW_RATE, | ||
71 | PINCFG_TYPE_INPUT_TYPE | ||
72 | }; | ||
73 | |||
74 | /** | ||
75 | * struct exynos5440_pin_group: represent group of pins for pincfg setting. | ||
76 | * @name: name of the pin group, used to lookup the group. | ||
77 | * @pins: the pins included in this group. | ||
78 | * @num_pins: number of pins included in this group. | ||
79 | */ | ||
80 | struct exynos5440_pin_group { | ||
81 | const char *name; | ||
82 | const unsigned int *pins; | ||
83 | u8 num_pins; | ||
84 | }; | ||
85 | |||
86 | /** | ||
87 | * struct exynos5440_pmx_func: represent a pin function. | ||
88 | * @name: name of the pin function, used to lookup the function. | ||
89 | * @groups: one or more names of pin groups that provide this function. | ||
90 | * @num_groups: number of groups included in @groups. | ||
91 | * @function: the function number to be programmed when selected. | ||
92 | */ | ||
93 | struct exynos5440_pmx_func { | ||
94 | const char *name; | ||
95 | const char **groups; | ||
96 | u8 num_groups; | ||
97 | unsigned long function; | ||
98 | }; | ||
99 | |||
100 | /** | ||
101 | * struct exynos5440_pinctrl_priv_data: driver's private runtime data. | ||
102 | * @reg_base: ioremapped based address of the register space. | ||
103 | * @gc: gpio chip registered with gpiolib. | ||
104 | * @pin_groups: list of pin groups parsed from device tree. | ||
105 | * @nr_groups: number of pin groups available. | ||
106 | * @pmx_functions: list of pin functions parsed from device tree. | ||
107 | * @nr_functions: number of pin functions available. | ||
108 | */ | ||
109 | struct exynos5440_pinctrl_priv_data { | ||
110 | void __iomem *reg_base; | ||
111 | struct gpio_chip *gc; | ||
112 | |||
113 | const struct exynos5440_pin_group *pin_groups; | ||
114 | unsigned int nr_groups; | ||
115 | const struct exynos5440_pmx_func *pmx_functions; | ||
116 | unsigned int nr_functions; | ||
117 | }; | ||
118 | |||
119 | /* list of all possible config options supported */ | ||
120 | struct pin_config { | ||
121 | char *prop_cfg; | ||
122 | unsigned int cfg_type; | ||
123 | } pcfgs[] = { | ||
124 | { "samsung,exynos5440-pin-pud", PINCFG_TYPE_PUD }, | ||
125 | { "samsung,exynos5440-pin-drv", PINCFG_TYPE_DRV }, | ||
126 | { "samsung,exynos5440-pin-skew-rate", PINCFG_TYPE_SKEW_RATE }, | ||
127 | { "samsung,exynos5440-pin-input-type", PINCFG_TYPE_INPUT_TYPE }, | ||
128 | }; | ||
129 | |||
130 | /* check if the selector is a valid pin group selector */ | ||
131 | static int exynos5440_get_group_count(struct pinctrl_dev *pctldev) | ||
132 | { | ||
133 | struct exynos5440_pinctrl_priv_data *priv; | ||
134 | |||
135 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
136 | return priv->nr_groups; | ||
137 | } | ||
138 | |||
139 | /* return the name of the group selected by the group selector */ | ||
140 | static const char *exynos5440_get_group_name(struct pinctrl_dev *pctldev, | ||
141 | unsigned selector) | ||
142 | { | ||
143 | struct exynos5440_pinctrl_priv_data *priv; | ||
144 | |||
145 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
146 | return priv->pin_groups[selector].name; | ||
147 | } | ||
148 | |||
149 | /* return the pin numbers associated with the specified group */ | ||
150 | static int exynos5440_get_group_pins(struct pinctrl_dev *pctldev, | ||
151 | unsigned selector, const unsigned **pins, unsigned *num_pins) | ||
152 | { | ||
153 | struct exynos5440_pinctrl_priv_data *priv; | ||
154 | |||
155 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
156 | *pins = priv->pin_groups[selector].pins; | ||
157 | *num_pins = priv->pin_groups[selector].num_pins; | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | /* create pinctrl_map entries by parsing device tree nodes */ | ||
162 | static int exynos5440_dt_node_to_map(struct pinctrl_dev *pctldev, | ||
163 | struct device_node *np, struct pinctrl_map **maps, | ||
164 | unsigned *nmaps) | ||
165 | { | ||
166 | struct device *dev = pctldev->dev; | ||
167 | struct pinctrl_map *map; | ||
168 | unsigned long *cfg = NULL; | ||
169 | char *gname, *fname; | ||
170 | int cfg_cnt = 0, map_cnt = 0, idx = 0; | ||
171 | |||
172 | /* count the number of config options specfied in the node */ | ||
173 | for (idx = 0; idx < ARRAY_SIZE(pcfgs); idx++) | ||
174 | if (of_find_property(np, pcfgs[idx].prop_cfg, NULL)) | ||
175 | cfg_cnt++; | ||
176 | |||
177 | /* | ||
178 | * Find out the number of map entries to create. All the config options | ||
179 | * can be accomadated into a single config map entry. | ||
180 | */ | ||
181 | if (cfg_cnt) | ||
182 | map_cnt = 1; | ||
183 | if (of_find_property(np, "samsung,exynos5440-pin-function", NULL)) | ||
184 | map_cnt++; | ||
185 | if (!map_cnt) { | ||
186 | dev_err(dev, "node %s does not have either config or function " | ||
187 | "configurations\n", np->name); | ||
188 | return -EINVAL; | ||
189 | } | ||
190 | |||
191 | /* Allocate memory for pin-map entries */ | ||
192 | map = kzalloc(sizeof(*map) * map_cnt, GFP_KERNEL); | ||
193 | if (!map) { | ||
194 | dev_err(dev, "could not alloc memory for pin-maps\n"); | ||
195 | return -ENOMEM; | ||
196 | } | ||
197 | *nmaps = 0; | ||
198 | |||
199 | /* | ||
200 | * Allocate memory for pin group name. The pin group name is derived | ||
201 | * from the node name from which these map entries are be created. | ||
202 | */ | ||
203 | gname = kzalloc(strlen(np->name) + GSUFFIX_LEN, GFP_KERNEL); | ||
204 | if (!gname) { | ||
205 | dev_err(dev, "failed to alloc memory for group name\n"); | ||
206 | goto free_map; | ||
207 | } | ||
208 | sprintf(gname, "%s%s", np->name, GROUP_SUFFIX); | ||
209 | |||
210 | /* | ||
211 | * don't have config options? then skip over to creating function | ||
212 | * map entries. | ||
213 | */ | ||
214 | if (!cfg_cnt) | ||
215 | goto skip_cfgs; | ||
216 | |||
217 | /* Allocate memory for config entries */ | ||
218 | cfg = kzalloc(sizeof(*cfg) * cfg_cnt, GFP_KERNEL); | ||
219 | if (!cfg) { | ||
220 | dev_err(dev, "failed to alloc memory for configs\n"); | ||
221 | goto free_gname; | ||
222 | } | ||
223 | |||
224 | /* Prepare a list of config settings */ | ||
225 | for (idx = 0, cfg_cnt = 0; idx < ARRAY_SIZE(pcfgs); idx++) { | ||
226 | u32 value; | ||
227 | if (!of_property_read_u32(np, pcfgs[idx].prop_cfg, &value)) | ||
228 | cfg[cfg_cnt++] = | ||
229 | PINCFG_PACK(pcfgs[idx].cfg_type, value); | ||
230 | } | ||
231 | |||
232 | /* create the config map entry */ | ||
233 | map[*nmaps].data.configs.group_or_pin = gname; | ||
234 | map[*nmaps].data.configs.configs = cfg; | ||
235 | map[*nmaps].data.configs.num_configs = cfg_cnt; | ||
236 | map[*nmaps].type = PIN_MAP_TYPE_CONFIGS_GROUP; | ||
237 | *nmaps += 1; | ||
238 | |||
239 | skip_cfgs: | ||
240 | /* create the function map entry */ | ||
241 | if (of_find_property(np, "samsung,exynos5440-pin-function", NULL)) { | ||
242 | fname = kzalloc(strlen(np->name) + FSUFFIX_LEN, GFP_KERNEL); | ||
243 | if (!fname) { | ||
244 | dev_err(dev, "failed to alloc memory for func name\n"); | ||
245 | goto free_cfg; | ||
246 | } | ||
247 | sprintf(fname, "%s%s", np->name, FUNCTION_SUFFIX); | ||
248 | |||
249 | map[*nmaps].data.mux.group = gname; | ||
250 | map[*nmaps].data.mux.function = fname; | ||
251 | map[*nmaps].type = PIN_MAP_TYPE_MUX_GROUP; | ||
252 | *nmaps += 1; | ||
253 | } | ||
254 | |||
255 | *maps = map; | ||
256 | return 0; | ||
257 | |||
258 | free_cfg: | ||
259 | kfree(cfg); | ||
260 | free_gname: | ||
261 | kfree(gname); | ||
262 | free_map: | ||
263 | kfree(map); | ||
264 | return -ENOMEM; | ||
265 | } | ||
266 | |||
267 | /* free the memory allocated to hold the pin-map table */ | ||
268 | static void exynos5440_dt_free_map(struct pinctrl_dev *pctldev, | ||
269 | struct pinctrl_map *map, unsigned num_maps) | ||
270 | { | ||
271 | int idx; | ||
272 | |||
273 | for (idx = 0; idx < num_maps; idx++) { | ||
274 | if (map[idx].type == PIN_MAP_TYPE_MUX_GROUP) { | ||
275 | kfree(map[idx].data.mux.function); | ||
276 | if (!idx) | ||
277 | kfree(map[idx].data.mux.group); | ||
278 | } else if (map->type == PIN_MAP_TYPE_CONFIGS_GROUP) { | ||
279 | kfree(map[idx].data.configs.configs); | ||
280 | if (!idx) | ||
281 | kfree(map[idx].data.configs.group_or_pin); | ||
282 | } | ||
283 | }; | ||
284 | |||
285 | kfree(map); | ||
286 | } | ||
287 | |||
288 | /* list of pinctrl callbacks for the pinctrl core */ | ||
289 | static struct pinctrl_ops exynos5440_pctrl_ops = { | ||
290 | .get_groups_count = exynos5440_get_group_count, | ||
291 | .get_group_name = exynos5440_get_group_name, | ||
292 | .get_group_pins = exynos5440_get_group_pins, | ||
293 | .dt_node_to_map = exynos5440_dt_node_to_map, | ||
294 | .dt_free_map = exynos5440_dt_free_map, | ||
295 | }; | ||
296 | |||
297 | /* check if the selector is a valid pin function selector */ | ||
298 | static int exynos5440_get_functions_count(struct pinctrl_dev *pctldev) | ||
299 | { | ||
300 | struct exynos5440_pinctrl_priv_data *priv; | ||
301 | |||
302 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
303 | return priv->nr_functions; | ||
304 | } | ||
305 | |||
306 | /* return the name of the pin function specified */ | ||
307 | static const char *exynos5440_pinmux_get_fname(struct pinctrl_dev *pctldev, | ||
308 | unsigned selector) | ||
309 | { | ||
310 | struct exynos5440_pinctrl_priv_data *priv; | ||
311 | |||
312 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
313 | return priv->pmx_functions[selector].name; | ||
314 | } | ||
315 | |||
316 | /* return the groups associated for the specified function selector */ | ||
317 | static int exynos5440_pinmux_get_groups(struct pinctrl_dev *pctldev, | ||
318 | unsigned selector, const char * const **groups, | ||
319 | unsigned * const num_groups) | ||
320 | { | ||
321 | struct exynos5440_pinctrl_priv_data *priv; | ||
322 | |||
323 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
324 | *groups = priv->pmx_functions[selector].groups; | ||
325 | *num_groups = priv->pmx_functions[selector].num_groups; | ||
326 | return 0; | ||
327 | } | ||
328 | |||
329 | /* enable or disable a pinmux function */ | ||
330 | static void exynos5440_pinmux_setup(struct pinctrl_dev *pctldev, unsigned selector, | ||
331 | unsigned group, bool enable) | ||
332 | { | ||
333 | struct exynos5440_pinctrl_priv_data *priv; | ||
334 | void __iomem *base; | ||
335 | u32 function; | ||
336 | u32 data; | ||
337 | |||
338 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
339 | base = priv->reg_base; | ||
340 | function = priv->pmx_functions[selector].function; | ||
341 | |||
342 | data = readl(base + GPIO_MUX); | ||
343 | if (enable) | ||
344 | data |= (1 << function); | ||
345 | else | ||
346 | data &= ~(1 << function); | ||
347 | writel(data, base + GPIO_MUX); | ||
348 | } | ||
349 | |||
350 | /* enable a specified pinmux by writing to registers */ | ||
351 | static int exynos5440_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector, | ||
352 | unsigned group) | ||
353 | { | ||
354 | exynos5440_pinmux_setup(pctldev, selector, group, true); | ||
355 | return 0; | ||
356 | } | ||
357 | |||
358 | /* disable a specified pinmux by writing to registers */ | ||
359 | static void exynos5440_pinmux_disable(struct pinctrl_dev *pctldev, | ||
360 | unsigned selector, unsigned group) | ||
361 | { | ||
362 | exynos5440_pinmux_setup(pctldev, selector, group, false); | ||
363 | } | ||
364 | |||
365 | /* | ||
366 | * The calls to gpio_direction_output() and gpio_direction_input() | ||
367 | * leads to this function call (via the pinctrl_gpio_direction_{input|output}() | ||
368 | * function called from the gpiolib interface). | ||
369 | */ | ||
370 | static int exynos5440_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev, | ||
371 | struct pinctrl_gpio_range *range, unsigned offset, bool input) | ||
372 | { | ||
373 | return 0; | ||
374 | } | ||
375 | |||
376 | /* list of pinmux callbacks for the pinmux vertical in pinctrl core */ | ||
377 | static struct pinmux_ops exynos5440_pinmux_ops = { | ||
378 | .get_functions_count = exynos5440_get_functions_count, | ||
379 | .get_function_name = exynos5440_pinmux_get_fname, | ||
380 | .get_function_groups = exynos5440_pinmux_get_groups, | ||
381 | .enable = exynos5440_pinmux_enable, | ||
382 | .disable = exynos5440_pinmux_disable, | ||
383 | .gpio_set_direction = exynos5440_pinmux_gpio_set_direction, | ||
384 | }; | ||
385 | |||
386 | /* set the pin config settings for a specified pin */ | ||
387 | static int exynos5440_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, | ||
388 | unsigned long config) | ||
389 | { | ||
390 | struct exynos5440_pinctrl_priv_data *priv; | ||
391 | void __iomem *base; | ||
392 | enum pincfg_type cfg_type = PINCFG_UNPACK_TYPE(config); | ||
393 | u32 cfg_value = PINCFG_UNPACK_VALUE(config); | ||
394 | u32 data; | ||
395 | |||
396 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
397 | base = priv->reg_base; | ||
398 | |||
399 | switch (cfg_type) { | ||
400 | case PINCFG_TYPE_PUD: | ||
401 | /* first set pull enable/disable bit */ | ||
402 | data = readl(base + GPIO_PE); | ||
403 | data &= ~(1 << pin); | ||
404 | if (cfg_value) | ||
405 | data |= (1 << pin); | ||
406 | writel(data, base + GPIO_PE); | ||
407 | |||
408 | /* then set pull up/down bit */ | ||
409 | data = readl(base + GPIO_PS); | ||
410 | data &= ~(1 << pin); | ||
411 | if (cfg_value == 2) | ||
412 | data |= (1 << pin); | ||
413 | writel(data, base + GPIO_PS); | ||
414 | break; | ||
415 | |||
416 | case PINCFG_TYPE_DRV: | ||
417 | /* set the first bit of the drive strength */ | ||
418 | data = readl(base + GPIO_DS0); | ||
419 | data &= ~(1 << pin); | ||
420 | data |= ((cfg_value & 1) << pin); | ||
421 | writel(data, base + GPIO_DS0); | ||
422 | cfg_value >>= 1; | ||
423 | |||
424 | /* set the second bit of the driver strength */ | ||
425 | data = readl(base + GPIO_DS1); | ||
426 | data &= ~(1 << pin); | ||
427 | data |= ((cfg_value & 1) << pin); | ||
428 | writel(data, base + GPIO_DS1); | ||
429 | break; | ||
430 | case PINCFG_TYPE_SKEW_RATE: | ||
431 | data = readl(base + GPIO_SR); | ||
432 | data &= ~(1 << pin); | ||
433 | data |= ((cfg_value & 1) << pin); | ||
434 | writel(data, base + GPIO_SR); | ||
435 | break; | ||
436 | case PINCFG_TYPE_INPUT_TYPE: | ||
437 | data = readl(base + GPIO_TYPE); | ||
438 | data &= ~(1 << pin); | ||
439 | data |= ((cfg_value & 1) << pin); | ||
440 | writel(data, base + GPIO_TYPE); | ||
441 | break; | ||
442 | default: | ||
443 | WARN_ON(1); | ||
444 | return -EINVAL; | ||
445 | } | ||
446 | |||
447 | return 0; | ||
448 | } | ||
449 | |||
450 | /* get the pin config settings for a specified pin */ | ||
451 | static int exynos5440_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin, | ||
452 | unsigned long *config) | ||
453 | { | ||
454 | struct exynos5440_pinctrl_priv_data *priv; | ||
455 | void __iomem *base; | ||
456 | enum pincfg_type cfg_type = PINCFG_UNPACK_TYPE(*config); | ||
457 | u32 data; | ||
458 | |||
459 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
460 | base = priv->reg_base; | ||
461 | |||
462 | switch (cfg_type) { | ||
463 | case PINCFG_TYPE_PUD: | ||
464 | data = readl(base + GPIO_PE); | ||
465 | data = (data >> pin) & 1; | ||
466 | if (!data) | ||
467 | *config = 0; | ||
468 | else | ||
469 | *config = ((readl(base + GPIO_PS) >> pin) & 1) + 1; | ||
470 | break; | ||
471 | case PINCFG_TYPE_DRV: | ||
472 | data = readl(base + GPIO_DS0); | ||
473 | data = (data >> pin) & 1; | ||
474 | *config = data; | ||
475 | data = readl(base + GPIO_DS1); | ||
476 | data = (data >> pin) & 1; | ||
477 | *config |= (data << 1); | ||
478 | break; | ||
479 | case PINCFG_TYPE_SKEW_RATE: | ||
480 | data = readl(base + GPIO_SR); | ||
481 | *config = (data >> pin) & 1; | ||
482 | break; | ||
483 | case PINCFG_TYPE_INPUT_TYPE: | ||
484 | data = readl(base + GPIO_TYPE); | ||
485 | *config = (data >> pin) & 1; | ||
486 | break; | ||
487 | default: | ||
488 | WARN_ON(1); | ||
489 | return -EINVAL; | ||
490 | } | ||
491 | |||
492 | return 0; | ||
493 | } | ||
494 | |||
495 | /* set the pin config settings for a specified pin group */ | ||
496 | static int exynos5440_pinconf_group_set(struct pinctrl_dev *pctldev, | ||
497 | unsigned group, unsigned long config) | ||
498 | { | ||
499 | struct exynos5440_pinctrl_priv_data *priv; | ||
500 | const unsigned int *pins; | ||
501 | unsigned int cnt; | ||
502 | |||
503 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
504 | pins = priv->pin_groups[group].pins; | ||
505 | |||
506 | for (cnt = 0; cnt < priv->pin_groups[group].num_pins; cnt++) | ||
507 | exynos5440_pinconf_set(pctldev, pins[cnt], config); | ||
508 | |||
509 | return 0; | ||
510 | } | ||
511 | |||
512 | /* get the pin config settings for a specified pin group */ | ||
513 | static int exynos5440_pinconf_group_get(struct pinctrl_dev *pctldev, | ||
514 | unsigned int group, unsigned long *config) | ||
515 | { | ||
516 | struct exynos5440_pinctrl_priv_data *priv; | ||
517 | const unsigned int *pins; | ||
518 | |||
519 | priv = pinctrl_dev_get_drvdata(pctldev); | ||
520 | pins = priv->pin_groups[group].pins; | ||
521 | exynos5440_pinconf_get(pctldev, pins[0], config); | ||
522 | return 0; | ||
523 | } | ||
524 | |||
525 | /* list of pinconfig callbacks for pinconfig vertical in the pinctrl code */ | ||
526 | static struct pinconf_ops exynos5440_pinconf_ops = { | ||
527 | .pin_config_get = exynos5440_pinconf_get, | ||
528 | .pin_config_set = exynos5440_pinconf_set, | ||
529 | .pin_config_group_get = exynos5440_pinconf_group_get, | ||
530 | .pin_config_group_set = exynos5440_pinconf_group_set, | ||
531 | }; | ||
532 | |||
533 | /* gpiolib gpio_set callback function */ | ||
534 | static void exynos5440_gpio_set(struct gpio_chip *gc, unsigned offset, int value) | ||
535 | { | ||
536 | struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev); | ||
537 | void __iomem *base = priv->reg_base; | ||
538 | u32 data; | ||
539 | |||
540 | data = readl(base + GPIO_VAL); | ||
541 | data &= ~(1 << offset); | ||
542 | if (value) | ||
543 | data |= 1 << offset; | ||
544 | writel(data, base + GPIO_VAL); | ||
545 | } | ||
546 | |||
547 | /* gpiolib gpio_get callback function */ | ||
548 | static int exynos5440_gpio_get(struct gpio_chip *gc, unsigned offset) | ||
549 | { | ||
550 | struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev); | ||
551 | void __iomem *base = priv->reg_base; | ||
552 | u32 data; | ||
553 | |||
554 | data = readl(base + GPIO_IN); | ||
555 | data >>= offset; | ||
556 | data &= 1; | ||
557 | return data; | ||
558 | } | ||
559 | |||
560 | /* gpiolib gpio_direction_input callback function */ | ||
561 | static int exynos5440_gpio_direction_input(struct gpio_chip *gc, unsigned offset) | ||
562 | { | ||
563 | struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev); | ||
564 | void __iomem *base = priv->reg_base; | ||
565 | u32 data; | ||
566 | |||
567 | /* first disable the data output enable on this pin */ | ||
568 | data = readl(base + GPIO_OE); | ||
569 | data &= ~(1 << offset); | ||
570 | writel(data, base + GPIO_OE); | ||
571 | |||
572 | /* now enable input on this pin */ | ||
573 | data = readl(base + GPIO_IE); | ||
574 | data |= 1 << offset; | ||
575 | writel(data, base + GPIO_IE); | ||
576 | return 0; | ||
577 | } | ||
578 | |||
579 | /* gpiolib gpio_direction_output callback function */ | ||
580 | static int exynos5440_gpio_direction_output(struct gpio_chip *gc, unsigned offset, | ||
581 | int value) | ||
582 | { | ||
583 | struct exynos5440_pinctrl_priv_data *priv = dev_get_drvdata(gc->dev); | ||
584 | void __iomem *base = priv->reg_base; | ||
585 | u32 data; | ||
586 | |||
587 | exynos5440_gpio_set(gc, offset, value); | ||
588 | |||
589 | /* first disable the data input enable on this pin */ | ||
590 | data = readl(base + GPIO_IE); | ||
591 | data &= ~(1 << offset); | ||
592 | writel(data, base + GPIO_IE); | ||
593 | |||
594 | /* now enable output on this pin */ | ||
595 | data = readl(base + GPIO_OE); | ||
596 | data |= 1 << offset; | ||
597 | writel(data, base + GPIO_OE); | ||
598 | return 0; | ||
599 | } | ||
600 | |||
601 | /* parse the pin numbers listed in the 'samsung,exynos5440-pins' property */ | ||
602 | static int __init exynos5440_pinctrl_parse_dt_pins(struct platform_device *pdev, | ||
603 | struct device_node *cfg_np, unsigned int **pin_list, | ||
604 | unsigned int *npins) | ||
605 | { | ||
606 | struct device *dev = &pdev->dev; | ||
607 | struct property *prop; | ||
608 | |||
609 | prop = of_find_property(cfg_np, "samsung,exynos5440-pins", NULL); | ||
610 | if (!prop) | ||
611 | return -ENOENT; | ||
612 | |||
613 | *npins = prop->length / sizeof(unsigned long); | ||
614 | if (!*npins) { | ||
615 | dev_err(dev, "invalid pin list in %s node", cfg_np->name); | ||
616 | return -EINVAL; | ||
617 | } | ||
618 | |||
619 | *pin_list = devm_kzalloc(dev, *npins * sizeof(**pin_list), GFP_KERNEL); | ||
620 | if (!*pin_list) { | ||
621 | dev_err(dev, "failed to allocate memory for pin list\n"); | ||
622 | return -ENOMEM; | ||
623 | } | ||
624 | |||
625 | return of_property_read_u32_array(cfg_np, "samsung,exynos5440-pins", | ||
626 | *pin_list, *npins); | ||
627 | } | ||
628 | |||
629 | /* | ||
630 | * Parse the information about all the available pin groups and pin functions | ||
631 | * from device node of the pin-controller. | ||
632 | */ | ||
633 | static int __init exynos5440_pinctrl_parse_dt(struct platform_device *pdev, | ||
634 | struct exynos5440_pinctrl_priv_data *priv) | ||
635 | { | ||
636 | struct device *dev = &pdev->dev; | ||
637 | struct device_node *dev_np = dev->of_node; | ||
638 | struct device_node *cfg_np; | ||
639 | struct exynos5440_pin_group *groups, *grp; | ||
640 | struct exynos5440_pmx_func *functions, *func; | ||
641 | unsigned *pin_list; | ||
642 | unsigned int npins, grp_cnt, func_idx = 0; | ||
643 | char *gname, *fname; | ||
644 | int ret; | ||
645 | |||
646 | grp_cnt = of_get_child_count(dev_np); | ||
647 | if (!grp_cnt) | ||
648 | return -EINVAL; | ||
649 | |||
650 | groups = devm_kzalloc(dev, grp_cnt * sizeof(*groups), GFP_KERNEL); | ||
651 | if (!groups) { | ||
652 | dev_err(dev, "failed allocate memory for ping group list\n"); | ||
653 | return -EINVAL; | ||
654 | } | ||
655 | grp = groups; | ||
656 | |||
657 | functions = devm_kzalloc(dev, grp_cnt * sizeof(*functions), GFP_KERNEL); | ||
658 | if (!functions) { | ||
659 | dev_err(dev, "failed to allocate memory for function list\n"); | ||
660 | return -EINVAL; | ||
661 | } | ||
662 | func = functions; | ||
663 | |||
664 | /* | ||
665 | * Iterate over all the child nodes of the pin controller node | ||
666 | * and create pin groups and pin function lists. | ||
667 | */ | ||
668 | for_each_child_of_node(dev_np, cfg_np) { | ||
669 | u32 function; | ||
670 | |||
671 | ret = exynos5440_pinctrl_parse_dt_pins(pdev, cfg_np, | ||
672 | &pin_list, &npins); | ||
673 | if (ret) | ||
674 | return ret; | ||
675 | |||
676 | /* derive pin group name from the node name */ | ||
677 | gname = devm_kzalloc(dev, strlen(cfg_np->name) + GSUFFIX_LEN, | ||
678 | GFP_KERNEL); | ||
679 | if (!gname) { | ||
680 | dev_err(dev, "failed to alloc memory for group name\n"); | ||
681 | return -ENOMEM; | ||
682 | } | ||
683 | sprintf(gname, "%s%s", cfg_np->name, GROUP_SUFFIX); | ||
684 | |||
685 | grp->name = gname; | ||
686 | grp->pins = pin_list; | ||
687 | grp->num_pins = npins; | ||
688 | grp++; | ||
689 | |||
690 | ret = of_property_read_u32(cfg_np, "samsung,exynos5440-pin-function", | ||
691 | &function); | ||
692 | if (ret) | ||
693 | continue; | ||
694 | |||
695 | /* derive function name from the node name */ | ||
696 | fname = devm_kzalloc(dev, strlen(cfg_np->name) + FSUFFIX_LEN, | ||
697 | GFP_KERNEL); | ||
698 | if (!fname) { | ||
699 | dev_err(dev, "failed to alloc memory for func name\n"); | ||
700 | return -ENOMEM; | ||
701 | } | ||
702 | sprintf(fname, "%s%s", cfg_np->name, FUNCTION_SUFFIX); | ||
703 | |||
704 | func->name = fname; | ||
705 | func->groups = devm_kzalloc(dev, sizeof(char *), GFP_KERNEL); | ||
706 | if (!func->groups) { | ||
707 | dev_err(dev, "failed to alloc memory for group list " | ||
708 | "in pin function"); | ||
709 | return -ENOMEM; | ||
710 | } | ||
711 | func->groups[0] = gname; | ||
712 | func->num_groups = 1; | ||
713 | func->function = function; | ||
714 | func++; | ||
715 | func_idx++; | ||
716 | } | ||
717 | |||
718 | priv->pin_groups = groups; | ||
719 | priv->nr_groups = grp_cnt; | ||
720 | priv->pmx_functions = functions; | ||
721 | priv->nr_functions = func_idx; | ||
722 | return 0; | ||
723 | } | ||
724 | |||
725 | /* register the pinctrl interface with the pinctrl subsystem */ | ||
726 | static int __init exynos5440_pinctrl_register(struct platform_device *pdev, | ||
727 | struct exynos5440_pinctrl_priv_data *priv) | ||
728 | { | ||
729 | struct device *dev = &pdev->dev; | ||
730 | struct pinctrl_desc *ctrldesc; | ||
731 | struct pinctrl_dev *pctl_dev; | ||
732 | struct pinctrl_pin_desc *pindesc, *pdesc; | ||
733 | struct pinctrl_gpio_range grange; | ||
734 | char *pin_names; | ||
735 | int pin, ret; | ||
736 | |||
737 | ctrldesc = devm_kzalloc(dev, sizeof(*ctrldesc), GFP_KERNEL); | ||
738 | if (!ctrldesc) { | ||
739 | dev_err(dev, "could not allocate memory for pinctrl desc\n"); | ||
740 | return -ENOMEM; | ||
741 | } | ||
742 | |||
743 | ctrldesc->name = "exynos5440-pinctrl"; | ||
744 | ctrldesc->owner = THIS_MODULE; | ||
745 | ctrldesc->pctlops = &exynos5440_pctrl_ops; | ||
746 | ctrldesc->pmxops = &exynos5440_pinmux_ops; | ||
747 | ctrldesc->confops = &exynos5440_pinconf_ops; | ||
748 | |||
749 | pindesc = devm_kzalloc(&pdev->dev, sizeof(*pindesc) * | ||
750 | EXYNOS5440_MAX_PINS, GFP_KERNEL); | ||
751 | if (!pindesc) { | ||
752 | dev_err(&pdev->dev, "mem alloc for pin descriptors failed\n"); | ||
753 | return -ENOMEM; | ||
754 | } | ||
755 | ctrldesc->pins = pindesc; | ||
756 | ctrldesc->npins = EXYNOS5440_MAX_PINS; | ||
757 | |||
758 | /* dynamically populate the pin number and pin name for pindesc */ | ||
759 | for (pin = 0, pdesc = pindesc; pin < ctrldesc->npins; pin++, pdesc++) | ||
760 | pdesc->number = pin; | ||
761 | |||
762 | /* | ||
763 | * allocate space for storing the dynamically generated names for all | ||
764 | * the pins which belong to this pin-controller. | ||
765 | */ | ||
766 | pin_names = devm_kzalloc(&pdev->dev, sizeof(char) * PIN_NAME_LENGTH * | ||
767 | ctrldesc->npins, GFP_KERNEL); | ||
768 | if (!pin_names) { | ||
769 | dev_err(&pdev->dev, "mem alloc for pin names failed\n"); | ||
770 | return -ENOMEM; | ||
771 | } | ||
772 | |||
773 | /* for each pin, set the name of the pin */ | ||
774 | for (pin = 0; pin < ctrldesc->npins; pin++) { | ||
775 | sprintf(pin_names, "gpio%02d", pin); | ||
776 | pdesc = pindesc + pin; | ||
777 | pdesc->name = pin_names; | ||
778 | pin_names += PIN_NAME_LENGTH; | ||
779 | } | ||
780 | |||
781 | ret = exynos5440_pinctrl_parse_dt(pdev, priv); | ||
782 | if (ret) | ||
783 | return ret; | ||
784 | |||
785 | pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, priv); | ||
786 | if (!pctl_dev) { | ||
787 | dev_err(&pdev->dev, "could not register pinctrl driver\n"); | ||
788 | return -EINVAL; | ||
789 | } | ||
790 | |||
791 | grange.name = "exynos5440-pctrl-gpio-range"; | ||
792 | grange.id = 0; | ||
793 | grange.base = 0; | ||
794 | grange.npins = EXYNOS5440_MAX_PINS; | ||
795 | grange.gc = priv->gc; | ||
796 | pinctrl_add_gpio_range(pctl_dev, &grange); | ||
797 | return 0; | ||
798 | } | ||
799 | |||
800 | /* register the gpiolib interface with the gpiolib subsystem */ | ||
801 | static int __init exynos5440_gpiolib_register(struct platform_device *pdev, | ||
802 | struct exynos5440_pinctrl_priv_data *priv) | ||
803 | { | ||
804 | struct gpio_chip *gc; | ||
805 | int ret; | ||
806 | |||
807 | gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL); | ||
808 | if (!gc) { | ||
809 | dev_err(&pdev->dev, "mem alloc for gpio_chip failed\n"); | ||
810 | return -ENOMEM; | ||
811 | } | ||
812 | |||
813 | priv->gc = gc; | ||
814 | gc->base = 0; | ||
815 | gc->ngpio = EXYNOS5440_MAX_PINS; | ||
816 | gc->dev = &pdev->dev; | ||
817 | gc->set = exynos5440_gpio_set; | ||
818 | gc->get = exynos5440_gpio_get; | ||
819 | gc->direction_input = exynos5440_gpio_direction_input; | ||
820 | gc->direction_output = exynos5440_gpio_direction_output; | ||
821 | gc->label = "gpiolib-exynos5440"; | ||
822 | gc->owner = THIS_MODULE; | ||
823 | ret = gpiochip_add(gc); | ||
824 | if (ret) { | ||
825 | dev_err(&pdev->dev, "failed to register gpio_chip %s, error " | ||
826 | "code: %d\n", gc->label, ret); | ||
827 | return ret; | ||
828 | } | ||
829 | |||
830 | return 0; | ||
831 | } | ||
832 | |||
833 | /* unregister the gpiolib interface with the gpiolib subsystem */ | ||
834 | static int __init exynos5440_gpiolib_unregister(struct platform_device *pdev, | ||
835 | struct exynos5440_pinctrl_priv_data *priv) | ||
836 | { | ||
837 | int ret = gpiochip_remove(priv->gc); | ||
838 | if (ret) { | ||
839 | dev_err(&pdev->dev, "gpio chip remove failed\n"); | ||
840 | return ret; | ||
841 | } | ||
842 | return 0; | ||
843 | } | ||
844 | |||
845 | static int __devinit exynos5440_pinctrl_probe(struct platform_device *pdev) | ||
846 | { | ||
847 | struct device *dev = &pdev->dev; | ||
848 | struct exynos5440_pinctrl_priv_data *priv; | ||
849 | struct resource *res; | ||
850 | int ret; | ||
851 | |||
852 | if (!dev->of_node) { | ||
853 | dev_err(dev, "device tree node not found\n"); | ||
854 | return -ENODEV; | ||
855 | } | ||
856 | |||
857 | priv = devm_kzalloc(dev, sizeof(priv), GFP_KERNEL); | ||
858 | if (!priv) { | ||
859 | dev_err(dev, "could not allocate memory for private data\n"); | ||
860 | return -ENOMEM; | ||
861 | } | ||
862 | |||
863 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
864 | if (!res) { | ||
865 | dev_err(dev, "cannot find IO resource\n"); | ||
866 | return -ENOENT; | ||
867 | } | ||
868 | |||
869 | priv->reg_base = devm_request_and_ioremap(&pdev->dev, res); | ||
870 | if (!priv->reg_base) { | ||
871 | dev_err(dev, "ioremap failed\n"); | ||
872 | return -ENODEV; | ||
873 | } | ||
874 | |||
875 | ret = exynos5440_gpiolib_register(pdev, priv); | ||
876 | if (ret) | ||
877 | return ret; | ||
878 | |||
879 | ret = exynos5440_pinctrl_register(pdev, priv); | ||
880 | if (ret) { | ||
881 | exynos5440_gpiolib_unregister(pdev, priv); | ||
882 | return ret; | ||
883 | } | ||
884 | |||
885 | platform_set_drvdata(pdev, priv); | ||
886 | dev_info(dev, "EXYNOS5440 pinctrl driver registered\n"); | ||
887 | return 0; | ||
888 | } | ||
889 | |||
890 | static const struct of_device_id exynos5440_pinctrl_dt_match[] = { | ||
891 | { .compatible = "samsung,exynos5440-pinctrl" }, | ||
892 | {}, | ||
893 | }; | ||
894 | MODULE_DEVICE_TABLE(of, exynos5440_pinctrl_dt_match); | ||
895 | |||
896 | static struct platform_driver exynos5440_pinctrl_driver = { | ||
897 | .probe = exynos5440_pinctrl_probe, | ||
898 | .driver = { | ||
899 | .name = "exynos5440-pinctrl", | ||
900 | .owner = THIS_MODULE, | ||
901 | .of_match_table = of_match_ptr(exynos5440_pinctrl_dt_match), | ||
902 | }, | ||
903 | }; | ||
904 | |||
905 | static int __init exynos5440_pinctrl_drv_register(void) | ||
906 | { | ||
907 | return platform_driver_register(&exynos5440_pinctrl_driver); | ||
908 | } | ||
909 | postcore_initcall(exynos5440_pinctrl_drv_register); | ||
910 | |||
911 | static void __exit exynos5440_pinctrl_drv_unregister(void) | ||
912 | { | ||
913 | platform_driver_unregister(&exynos5440_pinctrl_driver); | ||
914 | } | ||
915 | module_exit(exynos5440_pinctrl_drv_unregister); | ||
916 | |||
917 | MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com>"); | ||
918 | MODULE_DESCRIPTION("Samsung EXYNOS5440 SoC pinctrl driver"); | ||
919 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index 861cd5f04d5e..8f31b656c4e9 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
29 | #include <linux/irqdomain.h> | ||
29 | 30 | ||
30 | #include "core.h" | 31 | #include "core.h" |
31 | #include "pinctrl-samsung.h" | 32 | #include "pinctrl-samsung.h" |
@@ -46,6 +47,13 @@ struct pin_config { | |||
46 | { "samsung,pin-pud-pdn", PINCFG_TYPE_PUD_PDN }, | 47 | { "samsung,pin-pud-pdn", PINCFG_TYPE_PUD_PDN }, |
47 | }; | 48 | }; |
48 | 49 | ||
50 | static unsigned int pin_base; | ||
51 | |||
52 | static inline struct samsung_pin_bank *gc_to_pin_bank(struct gpio_chip *gc) | ||
53 | { | ||
54 | return container_of(gc, struct samsung_pin_bank, gpio_chip); | ||
55 | } | ||
56 | |||
49 | /* check if the selector is a valid pin group selector */ | 57 | /* check if the selector is a valid pin group selector */ |
50 | static int samsung_get_group_count(struct pinctrl_dev *pctldev) | 58 | static int samsung_get_group_count(struct pinctrl_dev *pctldev) |
51 | { | 59 | { |
@@ -250,14 +258,12 @@ static int samsung_pinmux_get_groups(struct pinctrl_dev *pctldev, | |||
250 | * given a pin number that is local to a pin controller, find out the pin bank | 258 | * given a pin number that is local to a pin controller, find out the pin bank |
251 | * and the register base of the pin bank. | 259 | * and the register base of the pin bank. |
252 | */ | 260 | */ |
253 | static void pin_to_reg_bank(struct gpio_chip *gc, unsigned pin, | 261 | static void pin_to_reg_bank(struct samsung_pinctrl_drv_data *drvdata, |
254 | void __iomem **reg, u32 *offset, | 262 | unsigned pin, void __iomem **reg, u32 *offset, |
255 | struct samsung_pin_bank **bank) | 263 | struct samsung_pin_bank **bank) |
256 | { | 264 | { |
257 | struct samsung_pinctrl_drv_data *drvdata; | ||
258 | struct samsung_pin_bank *b; | 265 | struct samsung_pin_bank *b; |
259 | 266 | ||
260 | drvdata = dev_get_drvdata(gc->dev); | ||
261 | b = drvdata->ctrl->pin_banks; | 267 | b = drvdata->ctrl->pin_banks; |
262 | 268 | ||
263 | while ((pin >= b->pin_base) && | 269 | while ((pin >= b->pin_base) && |
@@ -292,7 +298,7 @@ static void samsung_pinmux_setup(struct pinctrl_dev *pctldev, unsigned selector, | |||
292 | * pin function number in the config register. | 298 | * pin function number in the config register. |
293 | */ | 299 | */ |
294 | for (cnt = 0; cnt < drvdata->pin_groups[group].num_pins; cnt++) { | 300 | for (cnt = 0; cnt < drvdata->pin_groups[group].num_pins; cnt++) { |
295 | pin_to_reg_bank(drvdata->gc, pins[cnt] - drvdata->ctrl->base, | 301 | pin_to_reg_bank(drvdata, pins[cnt] - drvdata->ctrl->base, |
296 | ®, &pin_offset, &bank); | 302 | ®, &pin_offset, &bank); |
297 | mask = (1 << bank->func_width) - 1; | 303 | mask = (1 << bank->func_width) - 1; |
298 | shift = pin_offset * bank->func_width; | 304 | shift = pin_offset * bank->func_width; |
@@ -329,10 +335,16 @@ static int samsung_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev, | |||
329 | struct pinctrl_gpio_range *range, unsigned offset, bool input) | 335 | struct pinctrl_gpio_range *range, unsigned offset, bool input) |
330 | { | 336 | { |
331 | struct samsung_pin_bank *bank; | 337 | struct samsung_pin_bank *bank; |
338 | struct samsung_pinctrl_drv_data *drvdata; | ||
332 | void __iomem *reg; | 339 | void __iomem *reg; |
333 | u32 data, pin_offset, mask, shift; | 340 | u32 data, pin_offset, mask, shift; |
334 | 341 | ||
335 | pin_to_reg_bank(range->gc, offset, ®, &pin_offset, &bank); | 342 | bank = gc_to_pin_bank(range->gc); |
343 | drvdata = pinctrl_dev_get_drvdata(pctldev); | ||
344 | |||
345 | pin_offset = offset - bank->pin_base; | ||
346 | reg = drvdata->virt_base + bank->pctl_offset; | ||
347 | |||
336 | mask = (1 << bank->func_width) - 1; | 348 | mask = (1 << bank->func_width) - 1; |
337 | shift = pin_offset * bank->func_width; | 349 | shift = pin_offset * bank->func_width; |
338 | 350 | ||
@@ -366,7 +378,7 @@ static int samsung_pinconf_rw(struct pinctrl_dev *pctldev, unsigned int pin, | |||
366 | u32 cfg_value, cfg_reg; | 378 | u32 cfg_value, cfg_reg; |
367 | 379 | ||
368 | drvdata = pinctrl_dev_get_drvdata(pctldev); | 380 | drvdata = pinctrl_dev_get_drvdata(pctldev); |
369 | pin_to_reg_bank(drvdata->gc, pin - drvdata->ctrl->base, ®_base, | 381 | pin_to_reg_bank(drvdata, pin - drvdata->ctrl->base, ®_base, |
370 | &pin_offset, &bank); | 382 | &pin_offset, &bank); |
371 | 383 | ||
372 | switch (cfg_type) { | 384 | switch (cfg_type) { |
@@ -391,6 +403,9 @@ static int samsung_pinconf_rw(struct pinctrl_dev *pctldev, unsigned int pin, | |||
391 | return -EINVAL; | 403 | return -EINVAL; |
392 | } | 404 | } |
393 | 405 | ||
406 | if (!width) | ||
407 | return -EINVAL; | ||
408 | |||
394 | mask = (1 << width) - 1; | 409 | mask = (1 << width) - 1; |
395 | shift = pin_offset * width; | 410 | shift = pin_offset * width; |
396 | data = readl(reg_base + cfg_reg); | 411 | data = readl(reg_base + cfg_reg); |
@@ -463,14 +478,16 @@ static struct pinconf_ops samsung_pinconf_ops = { | |||
463 | /* gpiolib gpio_set callback function */ | 478 | /* gpiolib gpio_set callback function */ |
464 | static void samsung_gpio_set(struct gpio_chip *gc, unsigned offset, int value) | 479 | static void samsung_gpio_set(struct gpio_chip *gc, unsigned offset, int value) |
465 | { | 480 | { |
481 | struct samsung_pin_bank *bank = gc_to_pin_bank(gc); | ||
466 | void __iomem *reg; | 482 | void __iomem *reg; |
467 | u32 pin_offset, data; | 483 | u32 data; |
484 | |||
485 | reg = bank->drvdata->virt_base + bank->pctl_offset; | ||
468 | 486 | ||
469 | pin_to_reg_bank(gc, offset, ®, &pin_offset, NULL); | ||
470 | data = readl(reg + DAT_REG); | 487 | data = readl(reg + DAT_REG); |
471 | data &= ~(1 << pin_offset); | 488 | data &= ~(1 << offset); |
472 | if (value) | 489 | if (value) |
473 | data |= 1 << pin_offset; | 490 | data |= 1 << offset; |
474 | writel(data, reg + DAT_REG); | 491 | writel(data, reg + DAT_REG); |
475 | } | 492 | } |
476 | 493 | ||
@@ -478,11 +495,13 @@ static void samsung_gpio_set(struct gpio_chip *gc, unsigned offset, int value) | |||
478 | static int samsung_gpio_get(struct gpio_chip *gc, unsigned offset) | 495 | static int samsung_gpio_get(struct gpio_chip *gc, unsigned offset) |
479 | { | 496 | { |
480 | void __iomem *reg; | 497 | void __iomem *reg; |
481 | u32 pin_offset, data; | 498 | u32 data; |
499 | struct samsung_pin_bank *bank = gc_to_pin_bank(gc); | ||
500 | |||
501 | reg = bank->drvdata->virt_base + bank->pctl_offset; | ||
482 | 502 | ||
483 | pin_to_reg_bank(gc, offset, ®, &pin_offset, NULL); | ||
484 | data = readl(reg + DAT_REG); | 503 | data = readl(reg + DAT_REG); |
485 | data >>= pin_offset; | 504 | data >>= offset; |
486 | data &= 1; | 505 | data &= 1; |
487 | return data; | 506 | return data; |
488 | } | 507 | } |
@@ -510,6 +529,23 @@ static int samsung_gpio_direction_output(struct gpio_chip *gc, unsigned offset, | |||
510 | } | 529 | } |
511 | 530 | ||
512 | /* | 531 | /* |
532 | * gpiolib gpio_to_irq callback function. Creates a mapping between a GPIO pin | ||
533 | * and a virtual IRQ, if not already present. | ||
534 | */ | ||
535 | static int samsung_gpio_to_irq(struct gpio_chip *gc, unsigned offset) | ||
536 | { | ||
537 | struct samsung_pin_bank *bank = gc_to_pin_bank(gc); | ||
538 | unsigned int virq; | ||
539 | |||
540 | if (!bank->irq_domain) | ||
541 | return -ENXIO; | ||
542 | |||
543 | virq = irq_create_mapping(bank->irq_domain, offset); | ||
544 | |||
545 | return (virq) ? : -ENXIO; | ||
546 | } | ||
547 | |||
548 | /* | ||
513 | * Parse the pin names listed in the 'samsung,pins' property and convert it | 549 | * Parse the pin names listed in the 'samsung,pins' property and convert it |
514 | * into a list of gpio numbers are create a pin group from it. | 550 | * into a list of gpio numbers are create a pin group from it. |
515 | */ | 551 | */ |
@@ -524,7 +560,7 @@ static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, | |||
524 | const char *pin_name; | 560 | const char *pin_name; |
525 | 561 | ||
526 | *npins = of_property_count_strings(cfg_np, "samsung,pins"); | 562 | *npins = of_property_count_strings(cfg_np, "samsung,pins"); |
527 | if (*npins < 0) { | 563 | if (IS_ERR_VALUE(*npins)) { |
528 | dev_err(dev, "invalid pin list in %s node", cfg_np->name); | 564 | dev_err(dev, "invalid pin list in %s node", cfg_np->name); |
529 | return -EINVAL; | 565 | return -EINVAL; |
530 | } | 566 | } |
@@ -597,7 +633,7 @@ static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev, | |||
597 | */ | 633 | */ |
598 | for_each_child_of_node(dev_np, cfg_np) { | 634 | for_each_child_of_node(dev_np, cfg_np) { |
599 | u32 function; | 635 | u32 function; |
600 | if (of_find_property(cfg_np, "interrupt-controller", NULL)) | 636 | if (!of_find_property(cfg_np, "samsung,pins", NULL)) |
601 | continue; | 637 | continue; |
602 | 638 | ||
603 | ret = samsung_pinctrl_parse_dt_pins(pdev, cfg_np, | 639 | ret = samsung_pinctrl_parse_dt_pins(pdev, cfg_np, |
@@ -712,12 +748,16 @@ static int __devinit samsung_pinctrl_register(struct platform_device *pdev, | |||
712 | return -EINVAL; | 748 | return -EINVAL; |
713 | } | 749 | } |
714 | 750 | ||
715 | drvdata->grange.name = "samsung-pctrl-gpio-range"; | 751 | for (bank = 0; bank < drvdata->ctrl->nr_banks; ++bank) { |
716 | drvdata->grange.id = 0; | 752 | pin_bank = &drvdata->ctrl->pin_banks[bank]; |
717 | drvdata->grange.base = drvdata->ctrl->base; | 753 | pin_bank->grange.name = pin_bank->name; |
718 | drvdata->grange.npins = drvdata->ctrl->nr_pins; | 754 | pin_bank->grange.id = bank; |
719 | drvdata->grange.gc = drvdata->gc; | 755 | pin_bank->grange.pin_base = pin_bank->pin_base; |
720 | pinctrl_add_gpio_range(drvdata->pctl_dev, &drvdata->grange); | 756 | pin_bank->grange.base = pin_bank->gpio_chip.base; |
757 | pin_bank->grange.npins = pin_bank->gpio_chip.ngpio; | ||
758 | pin_bank->grange.gc = &pin_bank->gpio_chip; | ||
759 | pinctrl_add_gpio_range(drvdata->pctl_dev, &pin_bank->grange); | ||
760 | } | ||
721 | 761 | ||
722 | ret = samsung_pinctrl_parse_dt(pdev, drvdata); | 762 | ret = samsung_pinctrl_parse_dt(pdev, drvdata); |
723 | if (ret) { | 763 | if (ret) { |
@@ -728,68 +768,117 @@ static int __devinit samsung_pinctrl_register(struct platform_device *pdev, | |||
728 | return 0; | 768 | return 0; |
729 | } | 769 | } |
730 | 770 | ||
771 | static const struct gpio_chip samsung_gpiolib_chip = { | ||
772 | .set = samsung_gpio_set, | ||
773 | .get = samsung_gpio_get, | ||
774 | .direction_input = samsung_gpio_direction_input, | ||
775 | .direction_output = samsung_gpio_direction_output, | ||
776 | .to_irq = samsung_gpio_to_irq, | ||
777 | .owner = THIS_MODULE, | ||
778 | }; | ||
779 | |||
731 | /* register the gpiolib interface with the gpiolib subsystem */ | 780 | /* register the gpiolib interface with the gpiolib subsystem */ |
732 | static int __devinit samsung_gpiolib_register(struct platform_device *pdev, | 781 | static int __devinit samsung_gpiolib_register(struct platform_device *pdev, |
733 | struct samsung_pinctrl_drv_data *drvdata) | 782 | struct samsung_pinctrl_drv_data *drvdata) |
734 | { | 783 | { |
784 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; | ||
785 | struct samsung_pin_bank *bank = ctrl->pin_banks; | ||
735 | struct gpio_chip *gc; | 786 | struct gpio_chip *gc; |
736 | int ret; | 787 | int ret; |
737 | 788 | int i; | |
738 | gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL); | 789 | |
739 | if (!gc) { | 790 | for (i = 0; i < ctrl->nr_banks; ++i, ++bank) { |
740 | dev_err(&pdev->dev, "mem alloc for gpio_chip failed\n"); | 791 | bank->gpio_chip = samsung_gpiolib_chip; |
741 | return -ENOMEM; | 792 | |
742 | } | 793 | gc = &bank->gpio_chip; |
743 | 794 | gc->base = ctrl->base + bank->pin_base; | |
744 | drvdata->gc = gc; | 795 | gc->ngpio = bank->nr_pins; |
745 | gc->base = drvdata->ctrl->base; | 796 | gc->dev = &pdev->dev; |
746 | gc->ngpio = drvdata->ctrl->nr_pins; | 797 | gc->of_node = bank->of_node; |
747 | gc->dev = &pdev->dev; | 798 | gc->label = bank->name; |
748 | gc->set = samsung_gpio_set; | 799 | |
749 | gc->get = samsung_gpio_get; | 800 | ret = gpiochip_add(gc); |
750 | gc->direction_input = samsung_gpio_direction_input; | 801 | if (ret) { |
751 | gc->direction_output = samsung_gpio_direction_output; | 802 | dev_err(&pdev->dev, "failed to register gpio_chip %s, error code: %d\n", |
752 | gc->label = drvdata->ctrl->label; | 803 | gc->label, ret); |
753 | gc->owner = THIS_MODULE; | 804 | goto fail; |
754 | ret = gpiochip_add(gc); | 805 | } |
755 | if (ret) { | ||
756 | dev_err(&pdev->dev, "failed to register gpio_chip %s, error " | ||
757 | "code: %d\n", gc->label, ret); | ||
758 | return ret; | ||
759 | } | 806 | } |
760 | 807 | ||
761 | return 0; | 808 | return 0; |
809 | |||
810 | fail: | ||
811 | for (--i, --bank; i >= 0; --i, --bank) | ||
812 | if (gpiochip_remove(&bank->gpio_chip)) | ||
813 | dev_err(&pdev->dev, "gpio chip %s remove failed\n", | ||
814 | bank->gpio_chip.label); | ||
815 | return ret; | ||
762 | } | 816 | } |
763 | 817 | ||
764 | /* unregister the gpiolib interface with the gpiolib subsystem */ | 818 | /* unregister the gpiolib interface with the gpiolib subsystem */ |
765 | static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev, | 819 | static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev, |
766 | struct samsung_pinctrl_drv_data *drvdata) | 820 | struct samsung_pinctrl_drv_data *drvdata) |
767 | { | 821 | { |
768 | int ret = gpiochip_remove(drvdata->gc); | 822 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; |
769 | if (ret) { | 823 | struct samsung_pin_bank *bank = ctrl->pin_banks; |
824 | int ret = 0; | ||
825 | int i; | ||
826 | |||
827 | for (i = 0; !ret && i < ctrl->nr_banks; ++i, ++bank) | ||
828 | ret = gpiochip_remove(&bank->gpio_chip); | ||
829 | |||
830 | if (ret) | ||
770 | dev_err(&pdev->dev, "gpio chip remove failed\n"); | 831 | dev_err(&pdev->dev, "gpio chip remove failed\n"); |
771 | return ret; | 832 | |
772 | } | 833 | return ret; |
773 | return 0; | ||
774 | } | 834 | } |
775 | 835 | ||
776 | static const struct of_device_id samsung_pinctrl_dt_match[]; | 836 | static const struct of_device_id samsung_pinctrl_dt_match[]; |
777 | 837 | ||
778 | /* retrieve the soc specific data */ | 838 | /* retrieve the soc specific data */ |
779 | static struct samsung_pin_ctrl *samsung_pinctrl_get_soc_data( | 839 | static struct samsung_pin_ctrl *samsung_pinctrl_get_soc_data( |
840 | struct samsung_pinctrl_drv_data *d, | ||
780 | struct platform_device *pdev) | 841 | struct platform_device *pdev) |
781 | { | 842 | { |
782 | int id; | 843 | int id; |
783 | const struct of_device_id *match; | 844 | const struct of_device_id *match; |
784 | const struct device_node *node = pdev->dev.of_node; | 845 | struct device_node *node = pdev->dev.of_node; |
846 | struct device_node *np; | ||
847 | struct samsung_pin_ctrl *ctrl; | ||
848 | struct samsung_pin_bank *bank; | ||
849 | int i; | ||
785 | 850 | ||
786 | id = of_alias_get_id(pdev->dev.of_node, "pinctrl"); | 851 | id = of_alias_get_id(node, "pinctrl"); |
787 | if (id < 0) { | 852 | if (id < 0) { |
788 | dev_err(&pdev->dev, "failed to get alias id\n"); | 853 | dev_err(&pdev->dev, "failed to get alias id\n"); |
789 | return NULL; | 854 | return NULL; |
790 | } | 855 | } |
791 | match = of_match_node(samsung_pinctrl_dt_match, node); | 856 | match = of_match_node(samsung_pinctrl_dt_match, node); |
792 | return (struct samsung_pin_ctrl *)match->data + id; | 857 | ctrl = (struct samsung_pin_ctrl *)match->data + id; |
858 | |||
859 | bank = ctrl->pin_banks; | ||
860 | for (i = 0; i < ctrl->nr_banks; ++i, ++bank) { | ||
861 | bank->drvdata = d; | ||
862 | bank->pin_base = ctrl->nr_pins; | ||
863 | ctrl->nr_pins += bank->nr_pins; | ||
864 | } | ||
865 | |||
866 | for_each_child_of_node(node, np) { | ||
867 | if (!of_find_property(np, "gpio-controller", NULL)) | ||
868 | continue; | ||
869 | bank = ctrl->pin_banks; | ||
870 | for (i = 0; i < ctrl->nr_banks; ++i, ++bank) { | ||
871 | if (!strcmp(bank->name, np->name)) { | ||
872 | bank->of_node = np; | ||
873 | break; | ||
874 | } | ||
875 | } | ||
876 | } | ||
877 | |||
878 | ctrl->base = pin_base; | ||
879 | pin_base += ctrl->nr_pins; | ||
880 | |||
881 | return ctrl; | ||
793 | } | 882 | } |
794 | 883 | ||
795 | static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) | 884 | static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) |
@@ -805,18 +894,18 @@ static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) | |||
805 | return -ENODEV; | 894 | return -ENODEV; |
806 | } | 895 | } |
807 | 896 | ||
808 | ctrl = samsung_pinctrl_get_soc_data(pdev); | ||
809 | if (!ctrl) { | ||
810 | dev_err(&pdev->dev, "driver data not available\n"); | ||
811 | return -EINVAL; | ||
812 | } | ||
813 | |||
814 | drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); | 897 | drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); |
815 | if (!drvdata) { | 898 | if (!drvdata) { |
816 | dev_err(dev, "failed to allocate memory for driver's " | 899 | dev_err(dev, "failed to allocate memory for driver's " |
817 | "private data\n"); | 900 | "private data\n"); |
818 | return -ENOMEM; | 901 | return -ENOMEM; |
819 | } | 902 | } |
903 | |||
904 | ctrl = samsung_pinctrl_get_soc_data(drvdata, pdev); | ||
905 | if (!ctrl) { | ||
906 | dev_err(&pdev->dev, "driver data not available\n"); | ||
907 | return -EINVAL; | ||
908 | } | ||
820 | drvdata->ctrl = ctrl; | 909 | drvdata->ctrl = ctrl; |
821 | drvdata->dev = dev; | 910 | drvdata->dev = dev; |
822 | 911 | ||
@@ -858,6 +947,8 @@ static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) | |||
858 | static const struct of_device_id samsung_pinctrl_dt_match[] = { | 947 | static const struct of_device_id samsung_pinctrl_dt_match[] = { |
859 | { .compatible = "samsung,pinctrl-exynos4210", | 948 | { .compatible = "samsung,pinctrl-exynos4210", |
860 | .data = (void *)exynos4210_pin_ctrl }, | 949 | .data = (void *)exynos4210_pin_ctrl }, |
950 | { .compatible = "samsung,pinctrl-exynos4x12", | ||
951 | .data = (void *)exynos4x12_pin_ctrl }, | ||
861 | {}, | 952 | {}, |
862 | }; | 953 | }; |
863 | MODULE_DEVICE_TABLE(of, samsung_pinctrl_dt_match); | 954 | MODULE_DEVICE_TABLE(of, samsung_pinctrl_dt_match); |
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h index b8956934cda6..5addfd16e3cc 100644 --- a/drivers/pinctrl/pinctrl-samsung.h +++ b/drivers/pinctrl/pinctrl-samsung.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/pinctrl/consumer.h> | 23 | #include <linux/pinctrl/consumer.h> |
24 | #include <linux/pinctrl/machine.h> | 24 | #include <linux/pinctrl/machine.h> |
25 | 25 | ||
26 | #include <linux/gpio.h> | ||
27 | |||
26 | /* register offsets within a pin bank */ | 28 | /* register offsets within a pin bank */ |
27 | #define DAT_REG 0x4 | 29 | #define DAT_REG 0x4 |
28 | #define PUD_REG 0x8 | 30 | #define PUD_REG 0x8 |
@@ -64,6 +66,7 @@ enum pincfg_type { | |||
64 | * @EINT_TYPE_NONE: bank does not support external interrupts | 66 | * @EINT_TYPE_NONE: bank does not support external interrupts |
65 | * @EINT_TYPE_GPIO: bank supportes external gpio interrupts | 67 | * @EINT_TYPE_GPIO: bank supportes external gpio interrupts |
66 | * @EINT_TYPE_WKUP: bank supportes external wakeup interrupts | 68 | * @EINT_TYPE_WKUP: bank supportes external wakeup interrupts |
69 | * @EINT_TYPE_WKUP_MUX: bank supports multiplexed external wakeup interrupts | ||
67 | * | 70 | * |
68 | * Samsung GPIO controller groups all the available pins into banks. The pins | 71 | * Samsung GPIO controller groups all the available pins into banks. The pins |
69 | * in a pin bank can support external gpio interrupts or external wakeup | 72 | * in a pin bank can support external gpio interrupts or external wakeup |
@@ -76,6 +79,7 @@ enum eint_type { | |||
76 | EINT_TYPE_NONE, | 79 | EINT_TYPE_NONE, |
77 | EINT_TYPE_GPIO, | 80 | EINT_TYPE_GPIO, |
78 | EINT_TYPE_WKUP, | 81 | EINT_TYPE_WKUP, |
82 | EINT_TYPE_WKUP_MUX, | ||
79 | }; | 83 | }; |
80 | 84 | ||
81 | /* maximum length of a pin in pin descriptor (example: "gpa0-0") */ | 85 | /* maximum length of a pin in pin descriptor (example: "gpa0-0") */ |
@@ -109,8 +113,12 @@ struct samsung_pinctrl_drv_data; | |||
109 | * @conpdn_width: width of the sleep mode function selector bin field. | 113 | * @conpdn_width: width of the sleep mode function selector bin field. |
110 | * @pudpdn_width: width of the sleep mode pull up/down selector bit field. | 114 | * @pudpdn_width: width of the sleep mode pull up/down selector bit field. |
111 | * @eint_type: type of the external interrupt supported by the bank. | 115 | * @eint_type: type of the external interrupt supported by the bank. |
112 | * @irq_base: starting controller local irq number of the bank. | ||
113 | * @name: name to be prefixed for each pin in this pin bank. | 116 | * @name: name to be prefixed for each pin in this pin bank. |
117 | * @of_node: OF node of the bank. | ||
118 | * @drvdata: link to controller driver data | ||
119 | * @irq_domain: IRQ domain of the bank. | ||
120 | * @gpio_chip: GPIO chip of the bank. | ||
121 | * @grange: linux gpio pin range supported by this bank. | ||
114 | */ | 122 | */ |
115 | struct samsung_pin_bank { | 123 | struct samsung_pin_bank { |
116 | u32 pctl_offset; | 124 | u32 pctl_offset; |
@@ -122,8 +130,13 @@ struct samsung_pin_bank { | |||
122 | u8 conpdn_width; | 130 | u8 conpdn_width; |
123 | u8 pudpdn_width; | 131 | u8 pudpdn_width; |
124 | enum eint_type eint_type; | 132 | enum eint_type eint_type; |
125 | u32 irq_base; | 133 | u32 eint_offset; |
126 | char *name; | 134 | char *name; |
135 | struct device_node *of_node; | ||
136 | struct samsung_pinctrl_drv_data *drvdata; | ||
137 | struct irq_domain *irq_domain; | ||
138 | struct gpio_chip gpio_chip; | ||
139 | struct pinctrl_gpio_range grange; | ||
127 | }; | 140 | }; |
128 | 141 | ||
129 | /** | 142 | /** |
@@ -132,8 +145,6 @@ struct samsung_pin_bank { | |||
132 | * @nr_banks: number of pin banks. | 145 | * @nr_banks: number of pin banks. |
133 | * @base: starting system wide pin number. | 146 | * @base: starting system wide pin number. |
134 | * @nr_pins: number of pins supported by the controller. | 147 | * @nr_pins: number of pins supported by the controller. |
135 | * @nr_gint: number of external gpio interrupts supported. | ||
136 | * @nr_wint: number of external wakeup interrupts supported. | ||
137 | * @geint_con: offset of the ext-gpio controller registers. | 148 | * @geint_con: offset of the ext-gpio controller registers. |
138 | * @geint_mask: offset of the ext-gpio interrupt mask registers. | 149 | * @geint_mask: offset of the ext-gpio interrupt mask registers. |
139 | * @geint_pend: offset of the ext-gpio interrupt pending registers. | 150 | * @geint_pend: offset of the ext-gpio interrupt pending registers. |
@@ -153,8 +164,6 @@ struct samsung_pin_ctrl { | |||
153 | 164 | ||
154 | u32 base; | 165 | u32 base; |
155 | u32 nr_pins; | 166 | u32 nr_pins; |
156 | u32 nr_gint; | ||
157 | u32 nr_wint; | ||
158 | 167 | ||
159 | u32 geint_con; | 168 | u32 geint_con; |
160 | u32 geint_mask; | 169 | u32 geint_mask; |
@@ -183,8 +192,6 @@ struct samsung_pin_ctrl { | |||
183 | * @nr_groups: number of such pin groups. | 192 | * @nr_groups: number of such pin groups. |
184 | * @pmx_functions: list of pin functions available to the driver. | 193 | * @pmx_functions: list of pin functions available to the driver. |
185 | * @nr_function: number of such pin functions. | 194 | * @nr_function: number of such pin functions. |
186 | * @gc: gpio_chip instance registered with gpiolib. | ||
187 | * @grange: linux gpio pin range supported by this controller. | ||
188 | */ | 195 | */ |
189 | struct samsung_pinctrl_drv_data { | 196 | struct samsung_pinctrl_drv_data { |
190 | void __iomem *virt_base; | 197 | void __iomem *virt_base; |
@@ -199,12 +206,6 @@ struct samsung_pinctrl_drv_data { | |||
199 | unsigned int nr_groups; | 206 | unsigned int nr_groups; |
200 | const struct samsung_pmx_func *pmx_functions; | 207 | const struct samsung_pmx_func *pmx_functions; |
201 | unsigned int nr_functions; | 208 | unsigned int nr_functions; |
202 | |||
203 | struct irq_domain *gpio_irqd; | ||
204 | struct irq_domain *wkup_irqd; | ||
205 | |||
206 | struct gpio_chip *gc; | ||
207 | struct pinctrl_gpio_range grange; | ||
208 | }; | 209 | }; |
209 | 210 | ||
210 | /** | 211 | /** |
@@ -235,5 +236,6 @@ struct samsung_pmx_func { | |||
235 | 236 | ||
236 | /* list of all exported SoC specific data */ | 237 | /* list of all exported SoC specific data */ |
237 | extern struct samsung_pin_ctrl exynos4210_pin_ctrl[]; | 238 | extern struct samsung_pin_ctrl exynos4210_pin_ctrl[]; |
239 | extern struct samsung_pin_ctrl exynos4x12_pin_ctrl[]; | ||
238 | 240 | ||
239 | #endif /* __PINCTRL_SAMSUNG_H */ | 241 | #endif /* __PINCTRL_SAMSUNG_H */ |
diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c index 07e9fb4f8041..b3dc44146ca0 100644 --- a/drivers/sh/clk/cpg.c +++ b/drivers/sh/clk/cpg.c | |||
@@ -361,3 +361,89 @@ int __init sh_clk_div4_reparent_register(struct clk *clks, int nr, | |||
361 | return sh_clk_div_register_ops(clks, nr, table, | 361 | return sh_clk_div_register_ops(clks, nr, table, |
362 | &sh_clk_div4_reparent_clk_ops); | 362 | &sh_clk_div4_reparent_clk_ops); |
363 | } | 363 | } |
364 | |||
365 | /* FSI-DIV */ | ||
366 | static unsigned long fsidiv_recalc(struct clk *clk) | ||
367 | { | ||
368 | u32 value; | ||
369 | |||
370 | value = __raw_readl(clk->mapping->base); | ||
371 | |||
372 | value >>= 16; | ||
373 | if (value < 2) | ||
374 | return clk->parent->rate; | ||
375 | |||
376 | return clk->parent->rate / value; | ||
377 | } | ||
378 | |||
379 | static long fsidiv_round_rate(struct clk *clk, unsigned long rate) | ||
380 | { | ||
381 | return clk_rate_div_range_round(clk, 1, 0xffff, rate); | ||
382 | } | ||
383 | |||
384 | static void fsidiv_disable(struct clk *clk) | ||
385 | { | ||
386 | __raw_writel(0, clk->mapping->base); | ||
387 | } | ||
388 | |||
389 | static int fsidiv_enable(struct clk *clk) | ||
390 | { | ||
391 | u32 value; | ||
392 | |||
393 | value = __raw_readl(clk->mapping->base) >> 16; | ||
394 | if (value < 2) | ||
395 | return 0; | ||
396 | |||
397 | __raw_writel((value << 16) | 0x3, clk->mapping->base); | ||
398 | |||
399 | return 0; | ||
400 | } | ||
401 | |||
402 | static int fsidiv_set_rate(struct clk *clk, unsigned long rate) | ||
403 | { | ||
404 | u32 val; | ||
405 | int idx; | ||
406 | |||
407 | idx = (clk->parent->rate / rate) & 0xffff; | ||
408 | if (idx < 2) | ||
409 | __raw_writel(0, clk->mapping->base); | ||
410 | else | ||
411 | __raw_writel(idx << 16, clk->mapping->base); | ||
412 | |||
413 | return 0; | ||
414 | } | ||
415 | |||
416 | static struct sh_clk_ops fsidiv_clk_ops = { | ||
417 | .recalc = fsidiv_recalc, | ||
418 | .round_rate = fsidiv_round_rate, | ||
419 | .set_rate = fsidiv_set_rate, | ||
420 | .enable = fsidiv_enable, | ||
421 | .disable = fsidiv_disable, | ||
422 | }; | ||
423 | |||
424 | int __init sh_clk_fsidiv_register(struct clk *clks, int nr) | ||
425 | { | ||
426 | struct clk_mapping *map; | ||
427 | int i; | ||
428 | |||
429 | for (i = 0; i < nr; i++) { | ||
430 | |||
431 | map = kzalloc(sizeof(struct clk_mapping), GFP_KERNEL); | ||
432 | if (!map) { | ||
433 | pr_err("%s: unable to alloc memory\n", __func__); | ||
434 | return -ENOMEM; | ||
435 | } | ||
436 | |||
437 | /* clks[i].enable_reg came from SH_CLK_FSIDIV() */ | ||
438 | map->phys = (phys_addr_t)clks[i].enable_reg; | ||
439 | map->len = 8; | ||
440 | |||
441 | clks[i].enable_reg = 0; /* remove .enable_reg */ | ||
442 | clks[i].ops = &fsidiv_clk_ops; | ||
443 | clks[i].mapping = map; | ||
444 | |||
445 | clk_register(&clks[i]); | ||
446 | } | ||
447 | |||
448 | return 0; | ||
449 | } | ||
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index fb0e0f0bed0e..12e5249d053e 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
@@ -1654,7 +1654,8 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { | |||
1654 | #endif | 1654 | #endif |
1655 | 1655 | ||
1656 | #if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS4212) || \ | 1656 | #if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS4212) || \ |
1657 | defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) | 1657 | defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) || \ |
1658 | defined(CONFIG_SOC_EXYNOS5440) | ||
1658 | static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = { | 1659 | static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = { |
1659 | .info = &(struct s3c24xx_uart_info) { | 1660 | .info = &(struct s3c24xx_uart_info) { |
1660 | .name = "Samsung Exynos4 UART", | 1661 | .name = "Samsung Exynos4 UART", |
diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig index 82e2b89d4480..f56d185790ea 100644 --- a/drivers/uio/Kconfig +++ b/drivers/uio/Kconfig | |||
@@ -113,6 +113,7 @@ config UIO_NETX | |||
113 | config UIO_PRUSS | 113 | config UIO_PRUSS |
114 | tristate "Texas Instruments PRUSS driver" | 114 | tristate "Texas Instruments PRUSS driver" |
115 | depends on ARCH_DAVINCI_DA850 | 115 | depends on ARCH_DAVINCI_DA850 |
116 | select GENERIC_ALLOCATOR | ||
116 | help | 117 | help |
117 | PRUSS driver for OMAPL138/DA850/AM18XX devices | 118 | PRUSS driver for OMAPL138/DA850/AM18XX devices |
118 | PRUSS driver requires user space components, examples and user space | 119 | PRUSS driver requires user space components, examples and user space |
diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c index cce0f78341cc..6e2ab007fe9c 100644 --- a/drivers/uio/uio_pruss.c +++ b/drivers/uio/uio_pruss.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <mach/sram.h> | 28 | #include <linux/genalloc.h> |
29 | 29 | ||
30 | #define DRV_NAME "pruss_uio" | 30 | #define DRV_NAME "pruss_uio" |
31 | #define DRV_VERSION "1.0" | 31 | #define DRV_VERSION "1.0" |
@@ -65,10 +65,11 @@ struct uio_pruss_dev { | |||
65 | dma_addr_t sram_paddr; | 65 | dma_addr_t sram_paddr; |
66 | dma_addr_t ddr_paddr; | 66 | dma_addr_t ddr_paddr; |
67 | void __iomem *prussio_vaddr; | 67 | void __iomem *prussio_vaddr; |
68 | void *sram_vaddr; | 68 | unsigned long sram_vaddr; |
69 | void *ddr_vaddr; | 69 | void *ddr_vaddr; |
70 | unsigned int hostirq_start; | 70 | unsigned int hostirq_start; |
71 | unsigned int pintc_base; | 71 | unsigned int pintc_base; |
72 | struct gen_pool *sram_pool; | ||
72 | }; | 73 | }; |
73 | 74 | ||
74 | static irqreturn_t pruss_handler(int irq, struct uio_info *info) | 75 | static irqreturn_t pruss_handler(int irq, struct uio_info *info) |
@@ -106,7 +107,9 @@ static void pruss_cleanup(struct platform_device *dev, | |||
106 | gdev->ddr_paddr); | 107 | gdev->ddr_paddr); |
107 | } | 108 | } |
108 | if (gdev->sram_vaddr) | 109 | if (gdev->sram_vaddr) |
109 | sram_free(gdev->sram_vaddr, sram_pool_sz); | 110 | gen_pool_free(gdev->sram_pool, |
111 | gdev->sram_vaddr, | ||
112 | sram_pool_sz); | ||
110 | kfree(gdev->info); | 113 | kfree(gdev->info); |
111 | clk_put(gdev->pruss_clk); | 114 | clk_put(gdev->pruss_clk); |
112 | kfree(gdev); | 115 | kfree(gdev); |
@@ -152,10 +155,17 @@ static int pruss_probe(struct platform_device *dev) | |||
152 | goto out_free; | 155 | goto out_free; |
153 | } | 156 | } |
154 | 157 | ||
155 | gdev->sram_vaddr = sram_alloc(sram_pool_sz, &(gdev->sram_paddr)); | 158 | if (pdata->sram_pool) { |
156 | if (!gdev->sram_vaddr) { | 159 | gdev->sram_pool = pdata->sram_pool; |
157 | dev_err(&dev->dev, "Could not allocate SRAM pool\n"); | 160 | gdev->sram_vaddr = |
158 | goto out_free; | 161 | gen_pool_alloc(gdev->sram_pool, sram_pool_sz); |
162 | if (!gdev->sram_vaddr) { | ||
163 | dev_err(&dev->dev, "Could not allocate SRAM pool\n"); | ||
164 | goto out_free; | ||
165 | } | ||
166 | gdev->sram_paddr = | ||
167 | gen_pool_virt_to_phys(gdev->sram_pool, | ||
168 | gdev->sram_vaddr); | ||
159 | } | 169 | } |
160 | 170 | ||
161 | gdev->ddr_vaddr = dma_alloc_coherent(&dev->dev, extram_pool_sz, | 171 | gdev->ddr_vaddr = dma_alloc_coherent(&dev->dev, extram_pool_sz, |
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c index f994c8b8f10a..63ecdf8f7baf 100644 --- a/drivers/video/clps711xfb.c +++ b/drivers/video/clps711xfb.c | |||
@@ -22,19 +22,15 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/seq_file.h> | ||
26 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
27 | #include <linux/fb.h> | 26 | #include <linux/fb.h> |
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/proc_fs.h> | ||
30 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
31 | 29 | ||
32 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
33 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
34 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
35 | 33 | ||
36 | #include <mach/syspld.h> | ||
37 | |||
38 | struct fb_info *cfb; | 34 | struct fb_info *cfb; |
39 | 35 | ||
40 | #define CMAP_MAX_SIZE 16 | 36 | #define CMAP_MAX_SIZE 16 |
@@ -162,44 +158,12 @@ clps7111fb_set_par(struct fb_info *info) | |||
162 | 158 | ||
163 | static int clps7111fb_blank(int blank, struct fb_info *info) | 159 | static int clps7111fb_blank(int blank, struct fb_info *info) |
164 | { | 160 | { |
165 | if (blank) { | 161 | /* Enable/Disable LCD controller. */ |
166 | if (machine_is_edb7211()) { | 162 | if (blank) |
167 | /* Turn off the LCD backlight. */ | 163 | clps_writel(clps_readl(SYSCON1) & ~SYSCON1_LCDEN, SYSCON1); |
168 | clps_writeb(clps_readb(PDDR) & ~EDB_PD3_LCDBL, PDDR); | 164 | else |
169 | 165 | clps_writel(clps_readl(SYSCON1) | SYSCON1_LCDEN, SYSCON1); | |
170 | /* Power off the LCD DC-DC converter. */ | ||
171 | clps_writeb(clps_readb(PDDR) & ~EDB_PD1_LCD_DC_DC_EN, PDDR); | ||
172 | |||
173 | /* Delay for a little while (half a second). */ | ||
174 | udelay(100); | ||
175 | |||
176 | /* Power off the LCD panel. */ | ||
177 | clps_writeb(clps_readb(PDDR) & ~EDB_PD2_LCDEN, PDDR); | ||
178 | |||
179 | /* Power off the LCD controller. */ | ||
180 | clps_writel(clps_readl(SYSCON1) & ~SYSCON1_LCDEN, | ||
181 | SYSCON1); | ||
182 | } | ||
183 | } else { | ||
184 | if (machine_is_edb7211()) { | ||
185 | /* Power up the LCD controller. */ | ||
186 | clps_writel(clps_readl(SYSCON1) | SYSCON1_LCDEN, | ||
187 | SYSCON1); | ||
188 | |||
189 | /* Power up the LCD panel. */ | ||
190 | clps_writeb(clps_readb(PDDR) | EDB_PD2_LCDEN, PDDR); | ||
191 | |||
192 | /* Delay for a little while. */ | ||
193 | udelay(100); | ||
194 | 166 | ||
195 | /* Power up the LCD DC-DC converter. */ | ||
196 | clps_writeb(clps_readb(PDDR) | EDB_PD1_LCD_DC_DC_EN, | ||
197 | PDDR); | ||
198 | |||
199 | /* Turn on the LCD backlight. */ | ||
200 | clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR); | ||
201 | } | ||
202 | } | ||
203 | return 0; | 167 | return 0; |
204 | } | 168 | } |
205 | 169 | ||
@@ -214,63 +178,7 @@ static struct fb_ops clps7111fb_ops = { | |||
214 | .fb_imageblit = cfb_imageblit, | 178 | .fb_imageblit = cfb_imageblit, |
215 | }; | 179 | }; |
216 | 180 | ||
217 | static int backlight_proc_show(struct seq_file *m, void *v) | 181 | static void __devinit clps711x_guess_lcd_params(struct fb_info *info) |
218 | { | ||
219 | if (machine_is_edb7211()) { | ||
220 | seq_printf(m, "%d\n", | ||
221 | (clps_readb(PDDR) & EDB_PD3_LCDBL) ? 1 : 0); | ||
222 | } | ||
223 | |||
224 | return 0; | ||
225 | } | ||
226 | |||
227 | static int backlight_proc_open(struct inode *inode, struct file *file) | ||
228 | { | ||
229 | return single_open(file, backlight_proc_show, NULL); | ||
230 | } | ||
231 | |||
232 | static ssize_t backlight_proc_write(struct file *file, const char *buffer, | ||
233 | size_t count, loff_t *pos) | ||
234 | { | ||
235 | unsigned char char_value; | ||
236 | int value; | ||
237 | |||
238 | if (count < 1) { | ||
239 | return -EINVAL; | ||
240 | } | ||
241 | |||
242 | if (copy_from_user(&char_value, buffer, 1)) | ||
243 | return -EFAULT; | ||
244 | |||
245 | value = char_value - '0'; | ||
246 | |||
247 | if (machine_is_edb7211()) { | ||
248 | unsigned char port_d; | ||
249 | |||
250 | port_d = clps_readb(PDDR); | ||
251 | |||
252 | if (value) { | ||
253 | port_d |= EDB_PD3_LCDBL; | ||
254 | } else { | ||
255 | port_d &= ~EDB_PD3_LCDBL; | ||
256 | } | ||
257 | |||
258 | clps_writeb(port_d, PDDR); | ||
259 | } | ||
260 | |||
261 | return count; | ||
262 | } | ||
263 | |||
264 | static const struct file_operations backlight_proc_fops = { | ||
265 | .owner = THIS_MODULE, | ||
266 | .open = backlight_proc_open, | ||
267 | .read = seq_read, | ||
268 | .llseek = seq_lseek, | ||
269 | .release = single_release, | ||
270 | .write = backlight_proc_write, | ||
271 | }; | ||
272 | |||
273 | static void __init clps711x_guess_lcd_params(struct fb_info *info) | ||
274 | { | 182 | { |
275 | unsigned int lcdcon, syscon, size; | 183 | unsigned int lcdcon, syscon, size; |
276 | unsigned long phys_base = PAGE_OFFSET; | 184 | unsigned long phys_base = PAGE_OFFSET; |
@@ -358,7 +266,7 @@ static void __init clps711x_guess_lcd_params(struct fb_info *info) | |||
358 | info->fix.type = FB_TYPE_PACKED_PIXELS; | 266 | info->fix.type = FB_TYPE_PACKED_PIXELS; |
359 | } | 267 | } |
360 | 268 | ||
361 | int __init clps711xfb_init(void) | 269 | static int __devinit clps711x_fb_probe(struct platform_device *pdev) |
362 | { | 270 | { |
363 | int err = -ENOMEM; | 271 | int err = -ENOMEM; |
364 | 272 | ||
@@ -378,55 +286,29 @@ int __init clps711xfb_init(void) | |||
378 | 286 | ||
379 | fb_alloc_cmap(&cfb->cmap, CMAP_MAX_SIZE, 0); | 287 | fb_alloc_cmap(&cfb->cmap, CMAP_MAX_SIZE, 0); |
380 | 288 | ||
381 | if (!proc_create("backlight", 0444, NULL, &backlight_proc_fops)) { | ||
382 | printk("Couldn't create the /proc entry for the backlight.\n"); | ||
383 | return -EINVAL; | ||
384 | } | ||
385 | |||
386 | /* | ||
387 | * Power up the LCD | ||
388 | */ | ||
389 | if (machine_is_p720t()) { | ||
390 | PLD_LCDEN = PLD_LCDEN_EN; | ||
391 | PLD_PWR |= (PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | ||
392 | } | ||
393 | |||
394 | if (machine_is_edb7211()) { | ||
395 | /* Power up the LCD panel. */ | ||
396 | clps_writeb(clps_readb(PDDR) | EDB_PD2_LCDEN, PDDR); | ||
397 | |||
398 | /* Delay for a little while. */ | ||
399 | udelay(100); | ||
400 | |||
401 | /* Power up the LCD DC-DC converter. */ | ||
402 | clps_writeb(clps_readb(PDDR) | EDB_PD1_LCD_DC_DC_EN, PDDR); | ||
403 | |||
404 | /* Turn on the LCD backlight. */ | ||
405 | clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR); | ||
406 | } | ||
407 | |||
408 | err = register_framebuffer(cfb); | 289 | err = register_framebuffer(cfb); |
409 | 290 | ||
410 | out: return err; | 291 | out: return err; |
411 | } | 292 | } |
412 | 293 | ||
413 | static void __exit clps711xfb_exit(void) | 294 | static int __devexit clps711x_fb_remove(struct platform_device *pdev) |
414 | { | 295 | { |
415 | unregister_framebuffer(cfb); | 296 | unregister_framebuffer(cfb); |
416 | kfree(cfb); | 297 | kfree(cfb); |
417 | 298 | ||
418 | /* | 299 | return 0; |
419 | * Power down the LCD | ||
420 | */ | ||
421 | if (machine_is_p720t()) { | ||
422 | PLD_LCDEN = 0; | ||
423 | PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | ||
424 | } | ||
425 | } | 300 | } |
426 | 301 | ||
427 | module_init(clps711xfb_init); | 302 | static struct platform_driver clps711x_fb_driver = { |
428 | module_exit(clps711xfb_exit); | 303 | .driver = { |
304 | .name = "video-clps711x", | ||
305 | .owner = THIS_MODULE, | ||
306 | }, | ||
307 | .probe = clps711x_fb_probe, | ||
308 | .remove = __devexit_p(clps711x_fb_remove), | ||
309 | }; | ||
310 | module_platform_driver(clps711x_fb_driver); | ||
429 | 311 | ||
430 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); | 312 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); |
431 | MODULE_DESCRIPTION("CLPS711x framebuffer driver"); | 313 | MODULE_DESCRIPTION("CLPS711X framebuffer driver"); |
432 | MODULE_LICENSE("GPL"); | 314 | MODULE_LICENSE("GPL"); |
diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000000000000..e074fdd5a236 --- /dev/null +++ b/include/linux/clk/sunxi.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __LINUX_CLK_SUNXI_H_ | ||
18 | #define __LINUX_CLK_SUNXI_H_ | ||
19 | |||
20 | void __init sunxi_init_clocks(void); | ||
21 | |||
22 | #endif | ||
diff --git a/include/linux/irqchip/sunxi.h b/include/linux/irqchip/sunxi.h new file mode 100644 index 000000000000..1fe2c2260e2b --- /dev/null +++ b/include/linux/irqchip/sunxi.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __LINUX_IRQCHIP_SUNXI_H | ||
18 | #define __LINUX_IRQCHIP_SUNXI_H | ||
19 | |||
20 | #include <asm/exception.h> | ||
21 | |||
22 | extern void sunxi_init_irq(void); | ||
23 | |||
24 | extern asmlinkage void __exception_irq_entry sunxi_handle_irq( | ||
25 | struct pt_regs *regs); | ||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/plat-versatile/include/plat/fpga-irq.h b/include/linux/irqchip/versatile-fpga.h index 1fac9651d3ca..1fac9651d3ca 100644 --- a/arch/arm/plat-versatile/include/plat/fpga-irq.h +++ b/include/linux/irqchip/versatile-fpga.h | |||
diff --git a/include/linux/platform_data/uio_pruss.h b/include/linux/platform_data/uio_pruss.h index f39140aabc6f..3d47d219827f 100644 --- a/include/linux/platform_data/uio_pruss.h +++ b/include/linux/platform_data/uio_pruss.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | /* To configure the PRUSS INTC base offset for UIO driver */ | 21 | /* To configure the PRUSS INTC base offset for UIO driver */ |
22 | struct uio_pruss_pdata { | 22 | struct uio_pruss_pdata { |
23 | u32 pintc_base; | 23 | u32 pintc_base; |
24 | struct gen_pool *sram_pool; | ||
24 | }; | 25 | }; |
25 | #endif /* _UIO_PRUSS_H_ */ | 26 | #endif /* _UIO_PRUSS_H_ */ |
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h index 50910913b268..60c72395ec6b 100644 --- a/include/linux/sh_clk.h +++ b/include/linux/sh_clk.h | |||
@@ -199,4 +199,13 @@ int sh_clk_div6_reparent_register(struct clk *clks, int nr); | |||
199 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } | 199 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } |
200 | #define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk } | 200 | #define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk } |
201 | 201 | ||
202 | /* .enable_reg will be updated to .mapping on sh_clk_fsidiv_register() */ | ||
203 | #define SH_CLK_FSIDIV(_reg, _parent) \ | ||
204 | { \ | ||
205 | .enable_reg = (void __iomem *)_reg, \ | ||
206 | .parent = _parent, \ | ||
207 | } | ||
208 | |||
209 | int sh_clk_fsidiv_register(struct clk *clks, int nr); | ||
210 | |||
202 | #endif /* __SH_CLOCK_H */ | 211 | #endif /* __SH_CLOCK_H */ |
diff --git a/include/linux/sunxi_timer.h b/include/linux/sunxi_timer.h new file mode 100644 index 000000000000..b9165bba6e61 --- /dev/null +++ b/include/linux/sunxi_timer.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __SUNXI_TIMER_H | ||
18 | #define __SUNXI_TIMER_H | ||
19 | |||
20 | #include <asm/mach/time.h> | ||
21 | |||
22 | extern struct sys_timer sunxi_timer; | ||
23 | |||
24 | #endif | ||
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h new file mode 100644 index 000000000000..c52215ff4245 --- /dev/null +++ b/include/linux/vexpress.h | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License version 2 as | ||
4 | * published by the Free Software Foundation. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * Copyright (C) 2012 ARM Limited | ||
12 | */ | ||
13 | |||
14 | #ifndef _LINUX_VEXPRESS_H | ||
15 | #define _LINUX_VEXPRESS_H | ||
16 | |||
17 | #include <linux/device.h> | ||
18 | |||
19 | #define VEXPRESS_SITE_MB 0 | ||
20 | #define VEXPRESS_SITE_DB1 1 | ||
21 | #define VEXPRESS_SITE_DB2 2 | ||
22 | #define VEXPRESS_SITE_MASTER 0xf | ||
23 | |||
24 | #define VEXPRESS_CONFIG_STATUS_DONE 0 | ||
25 | #define VEXPRESS_CONFIG_STATUS_WAIT 1 | ||
26 | |||
27 | #define VEXPRESS_GPIO_MMC_CARDIN 0 | ||
28 | #define VEXPRESS_GPIO_MMC_WPROT 1 | ||
29 | #define VEXPRESS_GPIO_FLASH_WPn 2 | ||
30 | |||
31 | #define VEXPRESS_RES_FUNC(_site, _func) \ | ||
32 | { \ | ||
33 | .start = (_site), \ | ||
34 | .end = (_func), \ | ||
35 | .flags = IORESOURCE_BUS, \ | ||
36 | } | ||
37 | |||
38 | /* Config bridge API */ | ||
39 | |||
40 | /** | ||
41 | * struct vexpress_config_bridge_info - description of the platform | ||
42 | * configuration infrastructure bridge. | ||
43 | * | ||
44 | * @name: Bridge name | ||
45 | * | ||
46 | * @func_get: Obtains pointer to a configuration function for a given | ||
47 | * device or a Device Tree node, to be used with @func_put | ||
48 | * and @func_exec. The node pointer should take precedence | ||
49 | * over device pointer when both are passed. | ||
50 | * | ||
51 | * @func_put: Tells the bridge that the function will not be used any | ||
52 | * more, so all allocated resources can be released. | ||
53 | * | ||
54 | * @func_exec: Executes a configuration function read or write operation. | ||
55 | * The offset selects a 32 bit word of the value accessed. | ||
56 | * Must return VEXPRESS_CONFIG_STATUS_DONE when operation | ||
57 | * is finished immediately, VEXPRESS_CONFIG_STATUS_WAIT when | ||
58 | * will be completed in some time or negative value in case | ||
59 | * of error. | ||
60 | */ | ||
61 | struct vexpress_config_bridge_info { | ||
62 | const char *name; | ||
63 | void *(*func_get)(struct device *dev, struct device_node *node); | ||
64 | void (*func_put)(void *func); | ||
65 | int (*func_exec)(void *func, int offset, bool write, u32 *data); | ||
66 | }; | ||
67 | |||
68 | struct vexpress_config_bridge; | ||
69 | |||
70 | struct vexpress_config_bridge *vexpress_config_bridge_register( | ||
71 | struct device_node *node, | ||
72 | struct vexpress_config_bridge_info *info); | ||
73 | void vexpress_config_bridge_unregister(struct vexpress_config_bridge *bridge); | ||
74 | |||
75 | void vexpress_config_complete(struct vexpress_config_bridge *bridge, | ||
76 | int status); | ||
77 | |||
78 | /* Config function API */ | ||
79 | |||
80 | struct vexpress_config_func; | ||
81 | |||
82 | struct vexpress_config_func *__vexpress_config_func_get(struct device *dev, | ||
83 | struct device_node *node); | ||
84 | #define vexpress_config_func_get_by_dev(dev) \ | ||
85 | __vexpress_config_func_get(dev, NULL) | ||
86 | #define vexpress_config_func_get_by_node(node) \ | ||
87 | __vexpress_config_func_get(NULL, node) | ||
88 | void vexpress_config_func_put(struct vexpress_config_func *func); | ||
89 | |||
90 | /* Both may sleep! */ | ||
91 | int vexpress_config_read(struct vexpress_config_func *func, int offset, | ||
92 | u32 *data); | ||
93 | int vexpress_config_write(struct vexpress_config_func *func, int offset, | ||
94 | u32 data); | ||
95 | |||
96 | /* Platform control */ | ||
97 | |||
98 | u32 vexpress_get_procid(int site); | ||
99 | u32 vexpress_get_hbi(int site); | ||
100 | void *vexpress_get_24mhz_clock_base(void); | ||
101 | void vexpress_flags_set(u32 data); | ||
102 | |||
103 | #define vexpress_get_site_by_node(node) __vexpress_get_site(NULL, node) | ||
104 | #define vexpress_get_site_by_dev(dev) __vexpress_get_site(dev, NULL) | ||
105 | unsigned __vexpress_get_site(struct device *dev, struct device_node *node); | ||
106 | |||
107 | void vexpress_sysreg_early_init(void __iomem *base); | ||
108 | void vexpress_sysreg_of_early_init(void); | ||
109 | |||
110 | void vexpress_power_off(void); | ||
111 | void vexpress_restart(char str, const char *cmd); | ||
112 | |||
113 | /* Clocks */ | ||
114 | |||
115 | struct clk *vexpress_osc_setup(struct device *dev); | ||
116 | void vexpress_osc_of_setup(struct device_node *node); | ||
117 | |||
118 | void vexpress_clk_init(void __iomem *sp810_base); | ||
119 | void vexpress_clk_of_init(void); | ||
120 | |||
121 | #endif | ||