diff options
150 files changed, 8269 insertions, 885 deletions
diff --git a/Documentation/devicetree/bindings/crypto/mv_cesa.txt b/Documentation/devicetree/bindings/crypto/mv_cesa.txt new file mode 100644 index 000000000000..47229b1a594b --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/mv_cesa.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Marvell Cryptographic Engines And Security Accelerator | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "marvell,orion-crypto" | ||
5 | - reg : base physical address of the engine and length of memory mapped | ||
6 | region, followed by base physical address of sram and its memory | ||
7 | length | ||
8 | - reg-names : "regs" , "sram"; | ||
9 | - interrupts : interrupt number | ||
10 | |||
11 | Examples: | ||
12 | |||
13 | crypto@30000 { | ||
14 | compatible = "marvell,orion-crypto"; | ||
15 | reg = <0x30000 0x10000>, | ||
16 | <0x4000000 0x800>; | ||
17 | reg-names = "regs" , "sram"; | ||
18 | interrupts = <22>; | ||
19 | status = "okay"; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-fan.txt b/Documentation/devicetree/bindings/gpio/gpio-fan.txt new file mode 100644 index 000000000000..2dd457a3469a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-fan.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Bindings for fan connected to GPIO lines | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "gpio-fan" | ||
5 | - gpios: Specifies the pins that map to bits in the control value, | ||
6 | ordered MSB-->LSB. | ||
7 | - gpio-fan,speed-map: A mapping of possible fan RPM speeds and the | ||
8 | control value that should be set to achieve them. This array | ||
9 | must have the RPM values in ascending order. | ||
10 | |||
11 | Optional properties: | ||
12 | - alarm-gpios: This pin going active indicates something is wrong with | ||
13 | the fan, and a udev event will be fired. | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | gpio_fan { | ||
18 | compatible = "gpio-fan"; | ||
19 | gpios = <&gpio1 14 1 | ||
20 | &gpio1 13 1>; | ||
21 | gpio-fan,speed-map = <0 0 | ||
22 | 3000 1 | ||
23 | 6000 2>; | ||
24 | alarm-gpios = <&gpio1 15 1>; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt b/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt new file mode 100644 index 000000000000..a6f3bec1da7d --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt | |||
@@ -0,0 +1,53 @@ | |||
1 | * Marvell EBU GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should be "marvell,orion-gpio", "marvell,mv78200-gpio" | ||
6 | or "marvell,armadaxp-gpio". "marvell,orion-gpio" should be used for | ||
7 | Orion, Kirkwood, Dove, Discovery (except MV78200) and Armada | ||
8 | 370. "marvell,mv78200-gpio" should be used for the Discovery | ||
9 | MV78200. "marvel,armadaxp-gpio" should be used for all Armada XP | ||
10 | SoCs (MV78230, MV78260, MV78460). | ||
11 | |||
12 | - reg: Address and length of the register set for the device. Only one | ||
13 | entry is expected, except for the "marvell,armadaxp-gpio" variant | ||
14 | for which two entries are expected: one for the general registers, | ||
15 | one for the per-cpu registers. | ||
16 | |||
17 | - interrupts: The list of interrupts that are used for all the pins | ||
18 | managed by this GPIO bank. There can be more than one interrupt | ||
19 | (example: 1 interrupt per 8 pins on Armada XP, which means 4 | ||
20 | interrupts per bank of 32 GPIOs). | ||
21 | |||
22 | - interrupt-controller: identifies the node as an interrupt controller | ||
23 | |||
24 | - #interrupt-cells: specifies the number of cells needed to encode an | ||
25 | interrupt source. Should be two. | ||
26 | The first cell is the GPIO number. | ||
27 | The second cell is used to specify flags: | ||
28 | bits[3:0] trigger type and level flags: | ||
29 | 1 = low-to-high edge triggered. | ||
30 | 2 = high-to-low edge triggered. | ||
31 | 4 = active high level-sensitive. | ||
32 | 8 = active low level-sensitive. | ||
33 | |||
34 | - gpio-controller: marks the device node as a gpio controller | ||
35 | |||
36 | - ngpios: number of GPIOs this controller has | ||
37 | |||
38 | - #gpio-cells: Should be two. The first cell is the pin number. The | ||
39 | second cell is reserved for flags, unused at the moment. | ||
40 | |||
41 | Example: | ||
42 | |||
43 | gpio0: gpio@d0018100 { | ||
44 | compatible = "marvell,armadaxp-gpio"; | ||
45 | reg = <0xd0018100 0x40>, | ||
46 | <0xd0018800 0x30>; | ||
47 | ngpios = <32>; | ||
48 | gpio-controller; | ||
49 | #gpio-cells = <2>; | ||
50 | interrupt-controller; | ||
51 | #interrupt-cells = <2>; | ||
52 | interrupts = <16>, <17>, <18>, <19>; | ||
53 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt new file mode 100644 index 000000000000..01ef408e205f --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt | |||
@@ -0,0 +1,95 @@ | |||
1 | * Marvell Armada 370 SoC pinctrl driver for mpp | ||
2 | |||
3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
4 | part and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "marvell,88f6710-pinctrl" | ||
8 | |||
9 | Available mpp pins/groups and functions: | ||
10 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
11 | only for more detailed description in this document. | ||
12 | |||
13 | name pins functions | ||
14 | ================================================================================ | ||
15 | mpp0 0 gpio, uart0(rxd) | ||
16 | mpp1 1 gpo, uart0(txd) | ||
17 | mpp2 2 gpio, i2c0(sck), uart0(txd) | ||
18 | mpp3 3 gpio, i2c0(sda), uart0(rxd) | ||
19 | mpp4 4 gpio, cpu_pd(vdd) | ||
20 | mpp5 5 gpo, ge0(txclko), uart1(txd), spi1(clk), audio(mclk) | ||
21 | mpp6 6 gpio, ge0(txd0), sata0(prsnt), tdm(rst), audio(sdo) | ||
22 | mpp7 7 gpo, ge0(txd1), tdm(tdx), audio(lrclk) | ||
23 | mpp8 8 gpio, ge0(txd2), uart0(rts), tdm(drx), audio(bclk) | ||
24 | mpp9 9 gpo, ge0(txd3), uart1(txd), sd0(clk), audio(spdifo) | ||
25 | mpp10 10 gpio, ge0(txctl), uart0(cts), tdm(fsync), audio(sdi) | ||
26 | mpp11 11 gpio, ge0(rxd0), uart1(rxd), sd0(cmd), spi0(cs1), | ||
27 | sata1(prsnt), spi1(cs1) | ||
28 | mpp12 12 gpio, ge0(rxd1), i2c1(sda), sd0(d0), spi1(cs0), | ||
29 | audio(spdifi) | ||
30 | mpp13 13 gpio, ge0(rxd2), i2c1(sck), sd0(d1), tdm(pclk), | ||
31 | audio(rmclk) | ||
32 | mpp14 14 gpio, ge0(rxd3), pcie(clkreq0), sd0(d2), spi1(mosi), | ||
33 | spi0(cs2) | ||
34 | mpp15 15 gpio, ge0(rxctl), pcie(clkreq1), sd0(d3), spi1(miso), | ||
35 | spi0(cs3) | ||
36 | mpp16 16 gpio, ge0(rxclk), uart1(rxd), tdm(int), audio(extclk) | ||
37 | mpp17 17 gpo, ge(mdc) | ||
38 | mpp18 18 gpio, ge(mdio) | ||
39 | mpp19 19 gpio, ge0(txclk), ge1(txclkout), tdm(pclk) | ||
40 | mpp20 20 gpo, ge0(txd4), ge1(txd0) | ||
41 | mpp21 21 gpo, ge0(txd5), ge1(txd1), uart1(txd) | ||
42 | mpp22 22 gpo, ge0(txd6), ge1(txd2), uart0(rts) | ||
43 | mpp23 23 gpo, ge0(txd7), ge1(txd3), spi1(mosi) | ||
44 | mpp24 24 gpio, ge0(col), ge1(txctl), spi1(cs0) | ||
45 | mpp25 25 gpio, ge0(rxerr), ge1(rxd0), uart1(rxd) | ||
46 | mpp26 26 gpio, ge0(crs), ge1(rxd1), spi1(miso) | ||
47 | mpp27 27 gpio, ge0(rxd4), ge1(rxd2), uart0(cts) | ||
48 | mpp28 28 gpio, ge0(rxd5), ge1(rxd3) | ||
49 | mpp29 29 gpio, ge0(rxd6), ge1(rxctl), i2c1(sda) | ||
50 | mpp30 30 gpio, ge0(rxd7), ge1(rxclk), i2c1(sck) | ||
51 | mpp31 31 gpio, tclk, ge0(txerr) | ||
52 | mpp32 32 gpio, spi0(cs0) | ||
53 | mpp33 33 gpio, dev(bootcs), spi0(cs0) | ||
54 | mpp34 34 gpo, dev(wen0), spi0(mosi) | ||
55 | mpp35 35 gpo, dev(oen), spi0(sck) | ||
56 | mpp36 36 gpo, dev(a1), spi0(miso) | ||
57 | mpp37 37 gpo, dev(a0), sata0(prsnt) | ||
58 | mpp38 38 gpio, dev(ready), uart1(cts), uart0(cts) | ||
59 | mpp39 39 gpo, dev(ad0), audio(spdifo) | ||
60 | mpp40 40 gpio, dev(ad1), uart1(rts), uart0(rts) | ||
61 | mpp41 41 gpio, dev(ad2), uart1(rxd) | ||
62 | mpp42 42 gpo, dev(ad3), uart1(txd) | ||
63 | mpp43 43 gpo, dev(ad4), audio(bclk) | ||
64 | mpp44 44 gpo, dev(ad5), audio(mclk) | ||
65 | mpp45 45 gpo, dev(ad6), audio(lrclk) | ||
66 | mpp46 46 gpo, dev(ad7), audio(sdo) | ||
67 | mpp47 47 gpo, dev(ad8), sd0(clk), audio(spdifo) | ||
68 | mpp48 48 gpio, dev(ad9), uart0(rts), sd0(cmd), sata1(prsnt), | ||
69 | spi0(cs1) | ||
70 | mpp49 49 gpio, dev(ad10), pcie(clkreq1), sd0(d0), spi1(cs0), | ||
71 | audio(spdifi) | ||
72 | mpp50 50 gpio, dev(ad11), uart0(cts), sd0(d1), spi1(miso), | ||
73 | audio(rmclk) | ||
74 | mpp51 51 gpio, dev(ad12), i2c1(sda), sd0(d2), spi1(mosi) | ||
75 | mpp52 52 gpio, dev(ad13), i2c1(sck), sd0(d3), spi1(sck) | ||
76 | mpp53 53 gpio, dev(ad14), sd0(clk), tdm(pclk), spi0(cs2), | ||
77 | pcie(clkreq1) | ||
78 | mpp54 54 gpo, dev(ad15), tdm(dtx) | ||
79 | mpp55 55 gpio, dev(cs1), uart1(txd), tdm(rst), sata1(prsnt), | ||
80 | sata0(prsnt) | ||
81 | mpp56 56 gpio, dev(cs2), uart1(cts), uart0(cts), spi0(cs3), | ||
82 | pcie(clkreq0), spi1(cs1) | ||
83 | mpp57 57 gpio, dev(cs3), uart1(rxd), tdm(fsync), sata0(prsnt), | ||
84 | audio(sdo) | ||
85 | mpp58 58 gpio, dev(cs0), uart1(rts), tdm(int), audio(extclk), | ||
86 | uart0(rts) | ||
87 | mpp59 59 gpo, dev(ale0), uart1(rts), uart0(rts), audio(bclk) | ||
88 | mpp60 60 gpio, dev(ale1), uart1(rxd), sata0(prsnt), pcie(rst-out), | ||
89 | audio(sdi) | ||
90 | mpp61 61 gpo, dev(wen1), uart1(txd), audio(rclk) | ||
91 | mpp62 62 gpio, dev(a2), uart1(cts), tdm(drx), pcie(clkreq0), | ||
92 | audio(mclk), uart0(cts) | ||
93 | mpp63 63 gpo, spi0(sck), tclk | ||
94 | mpp64 64 gpio, spi0(miso), spi0-1(cs1) | ||
95 | mpp65 65 gpio, spi0(mosi), spi0-1(cs2) | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt new file mode 100644 index 000000000000..bfa0a2e5e0cb --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt | |||
@@ -0,0 +1,100 @@ | |||
1 | * Marvell Armada XP SoC pinctrl driver for mpp | ||
2 | |||
3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
4 | part and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "marvell,mv78230-pinctrl", "marvell,mv78260-pinctrl", | ||
8 | "marvell,mv78460-pinctrl" | ||
9 | |||
10 | This driver supports all Armada XP variants, i.e. mv78230, mv78260, and mv78460. | ||
11 | |||
12 | Available mpp pins/groups and functions: | ||
13 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
14 | only for more detailed description in this document. | ||
15 | |||
16 | * Marvell Armada XP (all variants) | ||
17 | |||
18 | name pins functions | ||
19 | ================================================================================ | ||
20 | mpp0 0 gpio, ge0(txclko), lcd(d0) | ||
21 | mpp1 1 gpio, ge0(txd0), lcd(d1) | ||
22 | mpp2 2 gpio, ge0(txd1), lcd(d2) | ||
23 | mpp3 3 gpio, ge0(txd2), lcd(d3) | ||
24 | mpp4 4 gpio, ge0(txd3), lcd(d4) | ||
25 | mpp5 5 gpio, ge0(txctl), lcd(d5) | ||
26 | mpp6 6 gpio, ge0(rxd0), lcd(d6) | ||
27 | mpp7 7 gpio, ge0(rxd1), lcd(d7) | ||
28 | mpp8 8 gpio, ge0(rxd2), lcd(d8) | ||
29 | mpp9 9 gpio, ge0(rxd3), lcd(d9) | ||
30 | mpp10 10 gpio, ge0(rxctl), lcd(d10) | ||
31 | mpp11 11 gpio, ge0(rxclk), lcd(d11) | ||
32 | mpp12 12 gpio, ge0(txd4), ge1(txd0), lcd(d12) | ||
33 | mpp13 13 gpio, ge0(txd5), ge1(txd1), lcd(d13) | ||
34 | mpp14 14 gpio, ge0(txd6), ge1(txd2), lcd(d15) | ||
35 | mpp15 15 gpio, ge0(txd7), ge1(txd3), lcd(d16) | ||
36 | mpp16 16 gpio, ge0(txd7), ge1(txd3), lcd(d16) | ||
37 | mpp17 17 gpio, ge0(col), ge1(txctl), lcd(d17) | ||
38 | mpp18 18 gpio, ge0(rxerr), ge1(rxd0), lcd(d18), ptp(trig) | ||
39 | mpp19 19 gpio, ge0(crs), ge1(rxd1), lcd(d19), ptp(evreq) | ||
40 | mpp20 20 gpio, ge0(rxd4), ge1(rxd2), lcd(d20), ptp(clk) | ||
41 | mpp21 21 gpio, ge0(rxd5), ge1(rxd3), lcd(d21), mem(bat) | ||
42 | mpp22 22 gpio, ge0(rxd6), ge1(rxctl), lcd(d22), sata0(prsnt) | ||
43 | mpp23 23 gpio, ge0(rxd7), ge1(rxclk), lcd(d23), sata1(prsnt) | ||
44 | mpp24 24 gpio, lcd(hsync), sata1(prsnt), nf(bootcs-re), tdm(rst) | ||
45 | mpp25 25 gpio, lcd(vsync), sata0(prsnt), nf(bootcs-we), tdm(pclk) | ||
46 | mpp26 26 gpio, lcd(clk), tdm(fsync), vdd(cpu1-pd) | ||
47 | mpp27 27 gpio, lcd(e), tdm(dtx), ptp(trig) | ||
48 | mpp28 28 gpio, lcd(pwm), tdm(drx), ptp(evreq) | ||
49 | mpp29 29 gpio, lcd(ref-clk), tdm(int0), ptp(clk), vdd(cpu0-pd) | ||
50 | mpp30 30 gpio, tdm(int1), sd0(clk) | ||
51 | mpp31 31 gpio, tdm(int2), sd0(cmd), vdd(cpu0-pd) | ||
52 | mpp32 32 gpio, tdm(int3), sd0(d0), vdd(cpu1-pd) | ||
53 | mpp33 33 gpio, tdm(int4), sd0(d1), mem(bat) | ||
54 | mpp34 34 gpio, tdm(int5), sd0(d2), sata0(prsnt) | ||
55 | mpp35 35 gpio, tdm(int6), sd0(d3), sata1(prsnt) | ||
56 | mpp36 36 gpio, spi(mosi) | ||
57 | mpp37 37 gpio, spi(miso) | ||
58 | mpp38 38 gpio, spi(sck) | ||
59 | mpp39 39 gpio, spi(cs0) | ||
60 | mpp40 40 gpio, spi(cs1), uart2(cts), lcd(vga-hsync), vdd(cpu1-pd), | ||
61 | pcie(clkreq0) | ||
62 | mpp41 41 gpio, spi(cs2), uart2(rts), lcd(vga-vsync), sata1(prsnt), | ||
63 | pcie(clkreq1) | ||
64 | mpp42 42 gpio, uart2(rxd), uart0(cts), tdm(int7), tdm-1(timer), | ||
65 | vdd(cpu0-pd) | ||
66 | mpp43 43 gpio, uart2(txd), uart0(rts), spi(cs3), pcie(rstout), | ||
67 | vdd(cpu2-3-pd){1} | ||
68 | mpp44 44 gpio, uart2(cts), uart3(rxd), spi(cs4), pcie(clkreq2), | ||
69 | mem(bat) | ||
70 | mpp45 45 gpio, uart2(rts), uart3(txd), spi(cs5), sata1(prsnt) | ||
71 | mpp46 46 gpio, uart3(rts), uart1(rts), spi(cs6), sata0(prsnt) | ||
72 | mpp47 47 gpio, uart3(cts), uart1(cts), spi(cs7), pcie(clkreq3), | ||
73 | ref(clkout) | ||
74 | mpp48 48 gpio, tclk, dev(burst/last) | ||
75 | |||
76 | * Marvell Armada XP (mv78260 and mv78460 only) | ||
77 | |||
78 | name pins functions | ||
79 | ================================================================================ | ||
80 | mpp49 49 gpio, dev(we3) | ||
81 | mpp50 50 gpio, dev(we2) | ||
82 | mpp51 51 gpio, dev(ad16) | ||
83 | mpp52 52 gpio, dev(ad17) | ||
84 | mpp53 53 gpio, dev(ad18) | ||
85 | mpp54 54 gpio, dev(ad19) | ||
86 | mpp55 55 gpio, dev(ad20), vdd(cpu0-pd) | ||
87 | mpp56 56 gpio, dev(ad21), vdd(cpu1-pd) | ||
88 | mpp57 57 gpio, dev(ad22), vdd(cpu2-3-pd){1} | ||
89 | mpp58 58 gpio, dev(ad23) | ||
90 | mpp59 59 gpio, dev(ad24) | ||
91 | mpp60 60 gpio, dev(ad25) | ||
92 | mpp61 61 gpio, dev(ad26) | ||
93 | mpp62 62 gpio, dev(ad27) | ||
94 | mpp63 63 gpio, dev(ad28) | ||
95 | mpp64 64 gpio, dev(ad29) | ||
96 | mpp65 65 gpio, dev(ad30) | ||
97 | mpp66 66 gpio, dev(ad31) | ||
98 | |||
99 | Notes: | ||
100 | * {1} vdd(cpu2-3-pd) only available on mv78460. | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt new file mode 100644 index 000000000000..a648aaad6110 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt | |||
@@ -0,0 +1,72 @@ | |||
1 | * Marvell Dove SoC pinctrl driver for mpp | ||
2 | |||
3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
4 | part and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "marvell,dove-pinctrl" | ||
8 | - clocks: (optional) phandle of pdma clock | ||
9 | |||
10 | Available mpp pins/groups and functions: | ||
11 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
12 | only for more detailed description in this document. | ||
13 | |||
14 | name pins functions | ||
15 | ================================================================================ | ||
16 | mpp0 0 gpio, pmu, uart2(rts), sdio0(cd), lcd0(pwm) | ||
17 | mpp1 1 gpio, pmu, uart2(cts), sdio0(wp), lcd1(pwm) | ||
18 | mpp2 2 gpio, pmu, uart2(txd), sdio0(buspwr), sata(prsnt), | ||
19 | uart1(rts) | ||
20 | mpp3 3 gpio, pmu, uart2(rxd), sdio0(ledctrl), sata(act), | ||
21 | uart1(cts), lcd-spi(cs1) | ||
22 | mpp4 4 gpio, pmu, uart3(rts), sdio1(cd), spi1(miso) | ||
23 | mpp5 5 gpio, pmu, uart3(cts), sdio1(wp), spi1(cs) | ||
24 | mpp6 6 gpio, pmu, uart3(txd), sdio1(buspwr), spi1(mosi) | ||
25 | mpp7 7 gpio, pmu, uart3(rxd), sdio1(ledctrl), spi1(sck) | ||
26 | mpp8 8 gpio, pmu, watchdog(rstout) | ||
27 | mpp9 9 gpio, pmu, pex1(clkreq) | ||
28 | mpp10 10 gpio, pmu, ssp(sclk) | ||
29 | mpp11 11 gpio, pmu, sata(prsnt), sata-1(act), sdio0(ledctrl), | ||
30 | sdio1(ledctrl), pex0(clkreq) | ||
31 | mpp12 12 gpio, pmu, uart2(rts), audio0(extclk), sdio1(cd), sata(act) | ||
32 | mpp13 13 gpio, pmu, uart2(cts), audio1(extclk), sdio1(wp), | ||
33 | ssp(extclk) | ||
34 | mpp14 14 gpio, pmu, uart2(txd), sdio1(buspwr), ssp(rxd) | ||
35 | mpp15 15 gpio, pmu, uart2(rxd), sdio1(ledctrl), ssp(sfrm) | ||
36 | mpp16 16 gpio, uart3(rts), sdio0(cd), ac97(sdi1), lcd-spi(cs1) | ||
37 | mpp17 17 gpio, uart3(cts), sdio0(wp), ac97(sdi2), twsi(sda), | ||
38 | ac97-1(sysclko) | ||
39 | mpp18 18 gpio, uart3(txd), sdio0(buspwr), ac97(sdi3), lcd0(pwm) | ||
40 | mpp19 19 gpio, uart3(rxd), sdio0(ledctrl), twsi(sck) | ||
41 | mpp20 20 gpio, sdio0(cd), sdio1(cd), spi1(miso), lcd-spi(miso), | ||
42 | ac97(sysclko) | ||
43 | mpp21 21 gpio, sdio0(wp), sdio1(wp), spi1(cs), lcd-spi(cs0), | ||
44 | uart1(cts), ssp(sfrm) | ||
45 | mpp22 22 gpio, sdio0(buspwr), sdio1(buspwr), spi1(mosi), | ||
46 | lcd-spi(mosi), uart1(cts), ssp(txd) | ||
47 | mpp23 23 gpio, sdio0(ledctrl), sdio1(ledctrl), spi1(sck), | ||
48 | lcd-spi(sck), ssp(sclk) | ||
49 | mpp_camera 24-39 gpio, camera | ||
50 | mpp_sdio0 40-45 gpio, sdio0 | ||
51 | mpp_sdio1 46-51 gpio, sdio1 | ||
52 | mpp_audio1 52-57 gpio, i2s1/spdifo, i2s1, spdifo, twsi, ssp/spdifo, ssp, | ||
53 | ssp/twsi | ||
54 | mpp_spi0 58-61 gpio, spi0 | ||
55 | mpp_uart1 62-63 gpio, uart1 | ||
56 | mpp_nand 64-71 gpo, nand | ||
57 | audio0 - i2s, ac97 | ||
58 | twsi - none, opt1, opt2, opt3 | ||
59 | |||
60 | Notes: | ||
61 | * group "mpp_audio1" allows the following functions and gpio pins: | ||
62 | - gpio : gpio on pins 52-57 | ||
63 | - i2s1/spdifo : audio1 i2s on pins 52-55 and spdifo on 57, no gpios | ||
64 | - i2s1 : audio1 i2s on pins 52-55, gpio on pins 56,57 | ||
65 | - spdifo : spdifo on pin 57, gpio on pins 52-55 | ||
66 | - twsi : twsi on pins 56,57, gpio on pins 52-55 | ||
67 | - ssp/spdifo : ssp on pins 52-55, spdifo on pin 57, no gpios | ||
68 | - ssp : ssp on pins 52-55, gpio on pins 56,57 | ||
69 | - ssp/twsi : ssp on pins 52-55, twsi on pins 56,57, no gpios | ||
70 | * group "audio0" internally muxes i2s0 or ac97 controller to the dedicated | ||
71 | audio0 pins. | ||
72 | * group "twsi" internally muxes twsi controller to the dedicated or option pins. | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt new file mode 100644 index 000000000000..361bccb7ec89 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt | |||
@@ -0,0 +1,279 @@ | |||
1 | * Marvell Kirkwood SoC pinctrl driver for mpp | ||
2 | |||
3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
4 | part and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "marvell,88f6180-pinctrl", | ||
8 | "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", | ||
9 | "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" | ||
10 | |||
11 | This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. | ||
12 | |||
13 | Available mpp pins/groups and functions: | ||
14 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
15 | only for more detailed description in this document. | ||
16 | |||
17 | * Marvell Kirkwood 88f6180 | ||
18 | |||
19 | name pins functions | ||
20 | ================================================================================ | ||
21 | mpp0 0 gpio, nand(io2), spi(cs) | ||
22 | mpp1 1 gpo, nand(io3), spi(mosi) | ||
23 | mpp2 2 gpo, nand(io4), spi(sck) | ||
24 | mpp3 3 gpo, nand(io5), spi(miso) | ||
25 | mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk) | ||
26 | mpp5 5 gpo, nand(io7), uart0(txd), ptp(trig) | ||
27 | mpp6 6 sysrst(out), spi(mosi), ptp(trig) | ||
28 | mpp7 7 gpo, pex(rsto), spi(cs), ptp(trig) | ||
29 | mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk), | ||
30 | mii(col) | ||
31 | mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq), | ||
32 | mii(crs) | ||
33 | mpp10 10 gpo, spi(sck), uart0(txd), ptp(trig) | ||
34 | mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), | ||
35 | ptp-2(trig) | ||
36 | mpp12 12 gpo, sdio(clk) | ||
37 | mpp13 13 gpio, sdio(cmd), uart1(txd) | ||
38 | mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col) | ||
39 | mpp15 15 gpio, sdio(d1), uart0(rts), uart1(txd) | ||
40 | mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs) | ||
41 | mpp17 17 gpio, sdio(d3) | ||
42 | mpp18 18 gpo, nand(io0) | ||
43 | mpp19 19 gpo, nand(io1) | ||
44 | mpp20 20 gpio, mii(rxerr) | ||
45 | mpp21 21 gpio, audio(spdifi) | ||
46 | mpp22 22 gpio, audio(spdifo) | ||
47 | mpp23 23 gpio, audio(rmclk) | ||
48 | mpp24 24 gpio, audio(bclk) | ||
49 | mpp25 25 gpio, audio(sdo) | ||
50 | mpp26 26 gpio, audio(lrclk) | ||
51 | mpp27 27 gpio, audio(mclk) | ||
52 | mpp28 28 gpio, audio(sdi) | ||
53 | mpp29 29 gpio, audio(extclk) | ||
54 | |||
55 | * Marvell Kirkwood 88f6190 | ||
56 | |||
57 | name pins functions | ||
58 | ================================================================================ | ||
59 | mpp0 0 gpio, nand(io2), spi(cs) | ||
60 | mpp1 1 gpo, nand(io3), spi(mosi) | ||
61 | mpp2 2 gpo, nand(io4), spi(sck) | ||
62 | mpp3 3 gpo, nand(io5), spi(miso) | ||
63 | mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk) | ||
64 | mpp5 5 gpo, nand(io7), uart0(txd), ptp(trig), sata0(act) | ||
65 | mpp6 6 sysrst(out), spi(mosi), ptp(trig) | ||
66 | mpp7 7 gpo, pex(rsto), spi(cs), ptp(trig) | ||
67 | mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk), | ||
68 | mii(col), mii-1(rxerr) | ||
69 | mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq), | ||
70 | mii(crs), sata0(prsnt) | ||
71 | mpp10 10 gpo, spi(sck), uart0(txd), ptp(trig) | ||
72 | mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), | ||
73 | ptp-2(trig), sata0(act) | ||
74 | mpp12 12 gpo, sdio(clk) | ||
75 | mpp13 13 gpio, sdio(cmd), uart1(txd) | ||
76 | mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col) | ||
77 | mpp15 15 gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act) | ||
78 | mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs) | ||
79 | mpp17 17 gpio, sdio(d3), sata0(prsnt) | ||
80 | mpp18 18 gpo, nand(io0) | ||
81 | mpp19 19 gpo, nand(io1) | ||
82 | mpp20 20 gpio, ge1(txd0) | ||
83 | mpp21 21 gpio, ge1(txd1), sata0(act) | ||
84 | mpp22 22 gpio, ge1(txd2) | ||
85 | mpp23 23 gpio, ge1(txd3), sata0(prsnt) | ||
86 | mpp24 24 gpio, ge1(rxd0) | ||
87 | mpp25 25 gpio, ge1(rxd1) | ||
88 | mpp26 26 gpio, ge1(rxd2) | ||
89 | mpp27 27 gpio, ge1(rxd3) | ||
90 | mpp28 28 gpio, ge1(col) | ||
91 | mpp29 29 gpio, ge1(txclk) | ||
92 | mpp30 30 gpio, ge1(rxclk) | ||
93 | mpp31 31 gpio, ge1(rxclk) | ||
94 | mpp32 32 gpio, ge1(txclko) | ||
95 | mpp33 33 gpo, ge1(txclk) | ||
96 | mpp34 34 gpio, ge1(txen) | ||
97 | mpp35 35 gpio, ge1(rxerr), sata0(act), mii(rxerr) | ||
98 | |||
99 | * Marvell Kirkwood 88f6192 | ||
100 | |||
101 | name pins functions | ||
102 | ================================================================================ | ||
103 | mpp0 0 gpio, nand(io2), spi(cs) | ||
104 | mpp1 1 gpo, nand(io3), spi(mosi) | ||
105 | mpp2 2 gpo, nand(io4), spi(sck) | ||
106 | mpp3 3 gpo, nand(io5), spi(miso) | ||
107 | mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk), sata1(act) | ||
108 | mpp5 5 gpo, nand(io7), uart0(txd), ptp(trig), sata0(act) | ||
109 | mpp6 6 sysrst(out), spi(mosi), ptp(trig) | ||
110 | mpp7 7 gpo, pex(rsto), spi(cs), ptp(trig) | ||
111 | mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk), | ||
112 | mii(col), mii-1(rxerr), sata1(prsnt) | ||
113 | mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq), | ||
114 | mii(crs), sata0(prsnt) | ||
115 | mpp10 10 gpo, spi(sck), uart0(txd), ptp(trig), sata1(act) | ||
116 | mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), | ||
117 | ptp-2(trig), sata0(act) | ||
118 | mpp12 12 gpo, sdio(clk) | ||
119 | mpp13 13 gpio, sdio(cmd), uart1(txd) | ||
120 | mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col), sata1(prsnt) | ||
121 | mpp15 15 gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act) | ||
122 | mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs), | ||
123 | sata1(act) | ||
124 | mpp17 17 gpio, sdio(d3), sata0(prsnt) | ||
125 | mpp18 18 gpo, nand(io0) | ||
126 | mpp19 19 gpo, nand(io1) | ||
127 | mpp20 20 gpio, ge1(txd0), ts(mp0), tdm(tx0ql), audio(spdifi), | ||
128 | sata1(act) | ||
129 | mpp21 21 gpio, ge1(txd1), sata0(act), ts(mp1), tdm(rx0ql), | ||
130 | audio(spdifo) | ||
131 | mpp22 22 gpio, ge1(txd2), ts(mp2), tdm(tx2ql), audio(rmclk), | ||
132 | sata1(prsnt) | ||
133 | mpp23 23 gpio, ge1(txd3), sata0(prsnt), ts(mp3), tdm(rx2ql), | ||
134 | audio(bclk) | ||
135 | mpp24 24 gpio, ge1(rxd0), ts(mp4), tdm(spi-cs0), audio(sdo) | ||
136 | mpp25 25 gpio, ge1(rxd1), ts(mp5), tdm(spi-sck), audio(lrclk) | ||
137 | mpp26 26 gpio, ge1(rxd2), ts(mp6), tdm(spi-miso), audio(mclk) | ||
138 | mpp27 27 gpio, ge1(rxd3), ts(mp7), tdm(spi-mosi), audio(sdi) | ||
139 | mpp28 28 gpio, ge1(col), ts(mp8), tdm(int), audio(extclk) | ||
140 | mpp29 29 gpio, ge1(txclk), ts(mp9), tdm(rst) | ||
141 | mpp30 30 gpio, ge1(rxclk), ts(mp10), tdm(pclk) | ||
142 | mpp31 31 gpio, ge1(rxclk), ts(mp11), tdm(fs) | ||
143 | mpp32 32 gpio, ge1(txclko), ts(mp12), tdm(drx) | ||
144 | mpp33 33 gpo, ge1(txclk), tdm(drx) | ||
145 | mpp34 34 gpio, ge1(txen), tdm(spi-cs1) | ||
146 | mpp35 35 gpio, ge1(rxerr), sata0(act), mii(rxerr), tdm(tx0ql) | ||
147 | |||
148 | * Marvell Kirkwood 88f6281 | ||
149 | |||
150 | name pins functions | ||
151 | ================================================================================ | ||
152 | mpp0 0 gpio, nand(io2), spi(cs) | ||
153 | mpp1 1 gpo, nand(io3), spi(mosi) | ||
154 | mpp2 2 gpo, nand(io4), spi(sck) | ||
155 | mpp3 3 gpo, nand(io5), spi(miso) | ||
156 | mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk), sata1(act) | ||
157 | mpp5 5 gpo, nand(io7), uart0(txd), ptp(trig), sata0(act) | ||
158 | mpp6 6 sysrst(out), spi(mosi), ptp(trig) | ||
159 | mpp7 7 gpo, pex(rsto), spi(cs), ptp(trig) | ||
160 | mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk), | ||
161 | mii(col), mii-1(rxerr), sata1(prsnt) | ||
162 | mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq), | ||
163 | mii(crs), sata0(prsnt) | ||
164 | mpp10 10 gpo, spi(sck), uart0(txd), ptp(trig), sata1(act) | ||
165 | mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq), | ||
166 | ptp-2(trig), sata0(act) | ||
167 | mpp12 12 gpio, sdio(clk) | ||
168 | mpp13 13 gpio, sdio(cmd), uart1(txd) | ||
169 | mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col), sata1(prsnt) | ||
170 | mpp15 15 gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act) | ||
171 | mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs), | ||
172 | sata1(act) | ||
173 | mpp17 17 gpio, sdio(d3), sata0(prsnt) | ||
174 | mpp18 18 gpo, nand(io0) | ||
175 | mpp19 19 gpo, nand(io1) | ||
176 | mpp20 20 gpio, ge1(txd0), ts(mp0), tdm(tx0ql), audio(spdifi), | ||
177 | sata1(act) | ||
178 | mpp21 21 gpio, ge1(txd1), sata0(act), ts(mp1), tdm(rx0ql), | ||
179 | audio(spdifo) | ||
180 | mpp22 22 gpio, ge1(txd2), ts(mp2), tdm(tx2ql), audio(rmclk), | ||
181 | sata1(prsnt) | ||
182 | mpp23 23 gpio, ge1(txd3), sata0(prsnt), ts(mp3), tdm(rx2ql), | ||
183 | audio(bclk) | ||
184 | mpp24 24 gpio, ge1(rxd0), ts(mp4), tdm(spi-cs0), audio(sdo) | ||
185 | mpp25 25 gpio, ge1(rxd1), ts(mp5), tdm(spi-sck), audio(lrclk) | ||
186 | mpp26 26 gpio, ge1(rxd2), ts(mp6), tdm(spi-miso), audio(mclk) | ||
187 | mpp27 27 gpio, ge1(rxd3), ts(mp7), tdm(spi-mosi), audio(sdi) | ||
188 | mpp28 28 gpio, ge1(col), ts(mp8), tdm(int), audio(extclk) | ||
189 | mpp29 29 gpio, ge1(txclk), ts(mp9), tdm(rst) | ||
190 | mpp30 30 gpio, ge1(rxclk), ts(mp10), tdm(pclk) | ||
191 | mpp31 31 gpio, ge1(rxclk), ts(mp11), tdm(fs) | ||
192 | mpp32 32 gpio, ge1(txclko), ts(mp12), tdm(drx) | ||
193 | mpp33 33 gpo, ge1(txclk), tdm(drx) | ||
194 | mpp34 34 gpio, ge1(txen), tdm(spi-cs1), sata1(act) | ||
195 | mpp35 35 gpio, ge1(rxerr), sata0(act), mii(rxerr), tdm(tx0ql) | ||
196 | mpp36 36 gpio, ts(mp0), tdm(spi-cs1), audio(spdifi) | ||
197 | mpp37 37 gpio, ts(mp1), tdm(tx2ql), audio(spdifo) | ||
198 | mpp38 38 gpio, ts(mp2), tdm(rx2ql), audio(rmclk) | ||
199 | mpp39 39 gpio, ts(mp3), tdm(spi-cs0), audio(bclk) | ||
200 | mpp40 40 gpio, ts(mp4), tdm(spi-sck), audio(sdo) | ||
201 | mpp41 41 gpio, ts(mp5), tdm(spi-miso), audio(lrclk) | ||
202 | mpp42 42 gpio, ts(mp6), tdm(spi-mosi), audio(mclk) | ||
203 | mpp43 43 gpio, ts(mp7), tdm(int), audio(sdi) | ||
204 | mpp44 44 gpio, ts(mp8), tdm(rst), audio(extclk) | ||
205 | mpp45 45 gpio, ts(mp9), tdm(pclk) | ||
206 | mpp46 46 gpio, ts(mp10), tdm(fs) | ||
207 | mpp47 47 gpio, ts(mp11), tdm(drx) | ||
208 | mpp48 48 gpio, ts(mp12), tdm(dtx) | ||
209 | mpp49 49 gpio, ts(mp9), tdm(rx0ql), ptp(clk) | ||
210 | |||
211 | * Marvell Kirkwood 88f6282 | ||
212 | |||
213 | name pins functions | ||
214 | ================================================================================ | ||
215 | mpp0 0 gpio, nand(io2), spi(cs) | ||
216 | mpp1 1 gpo, nand(io3), spi(mosi) | ||
217 | mpp2 2 gpo, nand(io4), spi(sck) | ||
218 | mpp3 3 gpo, nand(io5), spi(miso) | ||
219 | mpp4 4 gpio, nand(io6), uart0(rxd), sata1(act), lcd(hsync) | ||
220 | mpp5 5 gpo, nand(io7), uart0(txd), sata0(act), lcd(vsync) | ||
221 | mpp6 6 sysrst(out), spi(mosi) | ||
222 | mpp7 7 gpo, spi(cs), lcd(pwm) | ||
223 | mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), mii(col), | ||
224 | mii-1(rxerr), sata1(prsnt) | ||
225 | mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), mii(crs), | ||
226 | sata0(prsnt) | ||
227 | mpp10 10 gpo, spi(sck), uart0(txd), sata1(act) | ||
228 | mpp11 11 gpio, spi(miso), uart0(rxd), sata0(act) | ||
229 | mpp12 12 gpo, sdio(clk), audio(spdifo), spi(mosi), twsi(sda) | ||
230 | mpp13 13 gpio, sdio(cmd), uart1(txd), audio(rmclk), lcd(pwm) | ||
231 | mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col), sata1(prsnt), | ||
232 | audio(spdifi), audio-1(sdi) | ||
233 | mpp15 15 gpio, sdio(d1), uart0(rts), uart1(txd), sata0(act), | ||
234 | spi(cs) | ||
235 | mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs), | ||
236 | sata1(act), lcd(extclk) | ||
237 | mpp17 17 gpio, sdio(d3), sata0(prsnt), sata1(act), twsi1(sck) | ||
238 | mpp18 18 gpo, nand(io0), pex(clkreq) | ||
239 | mpp19 19 gpo, nand(io1) | ||
240 | mpp20 20 gpio, ge1(txd0), ts(mp0), tdm(tx0ql), audio(spdifi), | ||
241 | sata1(act), lcd(d0) | ||
242 | mpp21 21 gpio, ge1(txd1), sata0(act), ts(mp1), tdm(rx0ql), | ||
243 | audio(spdifo), lcd(d1) | ||
244 | mpp22 22 gpio, ge1(txd2), ts(mp2), tdm(tx2ql), audio(rmclk), | ||
245 | sata1(prsnt), lcd(d2) | ||
246 | mpp23 23 gpio, ge1(txd3), sata0(prsnt), ts(mp3), tdm(rx2ql), | ||
247 | audio(bclk), lcd(d3) | ||
248 | mpp24 24 gpio, ge1(rxd0), ts(mp4), tdm(spi-cs0), audio(sdo), | ||
249 | lcd(d4) | ||
250 | mpp25 25 gpio, ge1(rxd1), ts(mp5), tdm(spi-sck), audio(lrclk), | ||
251 | lcd(d5) | ||
252 | mpp26 26 gpio, ge1(rxd2), ts(mp6), tdm(spi-miso), audio(mclk), | ||
253 | lcd(d6) | ||
254 | mpp27 27 gpio, ge1(rxd3), ts(mp7), tdm(spi-mosi), audio(sdi), | ||
255 | lcd(d7) | ||
256 | mpp28 28 gpio, ge1(col), ts(mp8), tdm(int), audio(extclk), | ||
257 | lcd(d8) | ||
258 | mpp29 29 gpio, ge1(txclk), ts(mp9), tdm(rst), lcd(d9) | ||
259 | mpp30 30 gpio, ge1(rxclk), ts(mp10), tdm(pclk), lcd(d10) | ||
260 | mpp31 31 gpio, ge1(rxclk), ts(mp11), tdm(fs), lcd(d11) | ||
261 | mpp32 32 gpio, ge1(txclko), ts(mp12), tdm(drx), lcd(d12) | ||
262 | mpp33 33 gpo, ge1(txclk), tdm(drx), lcd(d13) | ||
263 | mpp34 34 gpio, ge1(txen), tdm(spi-cs1), sata1(act), lcd(d14) | ||
264 | mpp35 35 gpio, ge1(rxerr), sata0(act), mii(rxerr), tdm(tx0ql), | ||
265 | lcd(d15) | ||
266 | mpp36 36 gpio, ts(mp0), tdm(spi-cs1), audio(spdifi), twsi1(sda) | ||
267 | mpp37 37 gpio, ts(mp1), tdm(tx2ql), audio(spdifo), twsi1(sck) | ||
268 | mpp38 38 gpio, ts(mp2), tdm(rx2ql), audio(rmclk), lcd(d18) | ||
269 | mpp39 39 gpio, ts(mp3), tdm(spi-cs0), audio(bclk), lcd(d19) | ||
270 | mpp40 40 gpio, ts(mp4), tdm(spi-sck), audio(sdo), lcd(d20) | ||
271 | mpp41 41 gpio, ts(mp5), tdm(spi-miso), audio(lrclk), lcd(d21) | ||
272 | mpp42 42 gpio, ts(mp6), tdm(spi-mosi), audio(mclk), lcd(d22) | ||
273 | mpp43 43 gpio, ts(mp7), tdm(int), audio(sdi), lcd(d23) | ||
274 | mpp44 44 gpio, ts(mp8), tdm(rst), audio(extclk), lcd(clk) | ||
275 | mpp45 45 gpio, ts(mp9), tdm(pclk), lcd(e) | ||
276 | mpp46 46 gpio, ts(mp10), tdm(fs), lcd(hsync) | ||
277 | mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync) | ||
278 | mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16) | ||
279 | mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17) | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt new file mode 100644 index 000000000000..0a26c3aa4e6d --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | * Marvell SoC pinctrl core driver for mpp | ||
2 | |||
3 | The pinctrl driver enables Marvell SoCs to configure the multi-purpose pins | ||
4 | (mpp) to a specific function. For each SoC family there is a SoC specific | ||
5 | driver using this core driver. | ||
6 | |||
7 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
8 | common pinctrl bindings used by client devices, including the meaning of the | ||
9 | phrase "pin configuration node". | ||
10 | |||
11 | A Marvell SoC pin configuration node is a node of a group of pins which can | ||
12 | be used for a specific device or function. Each node requires one or more | ||
13 | mpp pins or group of pins and a mpp function common to all pins. | ||
14 | |||
15 | Required properties for pinctrl driver: | ||
16 | - compatible: "marvell,<soc>-pinctrl" | ||
17 | Please refer to each marvell,<soc>-pinctrl.txt binding doc for supported SoCs. | ||
18 | |||
19 | Required properties for pin configuration node: | ||
20 | - marvell,pins: string array of mpp pins or group of pins to be muxed. | ||
21 | - marvell,function: string representing a function to mux to for all | ||
22 | marvell,pins given in this pin configuration node. The function has to be | ||
23 | common for all marvell,pins. Please refer to marvell,<soc>-pinctrl.txt for | ||
24 | valid pin/pin group names and available function names for each SoC. | ||
25 | |||
26 | Examples: | ||
27 | |||
28 | uart1: serial@12100 { | ||
29 | compatible = "ns16550a"; | ||
30 | reg = <0x12100 0x100>; | ||
31 | reg-shift = <2>; | ||
32 | interrupts = <7>; | ||
33 | |||
34 | pinctrl-0 = <&pmx_uart1_sw>; | ||
35 | pinctrl-names = "default"; | ||
36 | }; | ||
37 | |||
38 | pinctrl: pinctrl@d0200 { | ||
39 | compatible = "marvell,dove-pinctrl"; | ||
40 | reg = <0xd0200 0x20>; | ||
41 | |||
42 | pmx_uart1_sw: pmx-uart1-sw { | ||
43 | marvell,pins = "mpp_uart1"; | ||
44 | marvell,function = "uart1"; | ||
45 | }; | ||
46 | }; | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3975d10cb3ed..8ac460a8f4ca 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -529,10 +529,11 @@ config ARCH_IXP4XX | |||
529 | config ARCH_DOVE | 529 | config ARCH_DOVE |
530 | bool "Marvell Dove" | 530 | bool "Marvell Dove" |
531 | select CPU_V7 | 531 | select CPU_V7 |
532 | select PCI | ||
533 | select ARCH_REQUIRE_GPIOLIB | 532 | select ARCH_REQUIRE_GPIOLIB |
534 | select GENERIC_CLOCKEVENTS | 533 | select GENERIC_CLOCKEVENTS |
535 | select PLAT_ORION | 534 | select MIGHT_HAVE_PCI |
535 | select PLAT_ORION_LEGACY | ||
536 | select USB_ARCH_HAS_EHCI | ||
536 | help | 537 | help |
537 | Support for the Marvell Dove SoC 88AP510 | 538 | Support for the Marvell Dove SoC 88AP510 |
538 | 539 | ||
@@ -542,7 +543,7 @@ config ARCH_KIRKWOOD | |||
542 | select PCI | 543 | select PCI |
543 | select ARCH_REQUIRE_GPIOLIB | 544 | select ARCH_REQUIRE_GPIOLIB |
544 | select GENERIC_CLOCKEVENTS | 545 | select GENERIC_CLOCKEVENTS |
545 | select PLAT_ORION | 546 | select PLAT_ORION_LEGACY |
546 | help | 547 | help |
547 | Support for the following Marvell Kirkwood series SoCs: | 548 | Support for the following Marvell Kirkwood series SoCs: |
548 | 88F6180, 88F6192 and 88F6281. | 549 | 88F6180, 88F6192 and 88F6281. |
@@ -568,7 +569,7 @@ config ARCH_MV78XX0 | |||
568 | select PCI | 569 | select PCI |
569 | select ARCH_REQUIRE_GPIOLIB | 570 | select ARCH_REQUIRE_GPIOLIB |
570 | select GENERIC_CLOCKEVENTS | 571 | select GENERIC_CLOCKEVENTS |
571 | select PLAT_ORION | 572 | select PLAT_ORION_LEGACY |
572 | help | 573 | help |
573 | Support for the following Marvell MV78xx0 series SoCs: | 574 | Support for the following Marvell MV78xx0 series SoCs: |
574 | MV781x0, MV782x0. | 575 | MV781x0, MV782x0. |
@@ -580,7 +581,7 @@ config ARCH_ORION5X | |||
580 | select PCI | 581 | select PCI |
581 | select ARCH_REQUIRE_GPIOLIB | 582 | select ARCH_REQUIRE_GPIOLIB |
582 | select GENERIC_CLOCKEVENTS | 583 | select GENERIC_CLOCKEVENTS |
583 | select PLAT_ORION | 584 | select PLAT_ORION_LEGACY |
584 | help | 585 | help |
585 | Support for the following Marvell Orion 5x series SoCs: | 586 | Support for the following Marvell Orion 5x series SoCs: |
586 | Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), | 587 | Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), |
@@ -1138,6 +1139,10 @@ config PLAT_ORION | |||
1138 | select IRQ_DOMAIN | 1139 | select IRQ_DOMAIN |
1139 | select COMMON_CLK | 1140 | select COMMON_CLK |
1140 | 1141 | ||
1142 | config PLAT_ORION_LEGACY | ||
1143 | bool | ||
1144 | select PLAT_ORION | ||
1145 | |||
1141 | config PLAT_PXA | 1146 | config PLAT_PXA |
1142 | bool | 1147 | bool |
1143 | 1148 | ||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 4745c1f68b49..29f541f0e653 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -17,6 +17,9 @@ dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb \ | |||
17 | usb_a9263.dtb \ | 17 | usb_a9263.dtb \ |
18 | usb_a9g20.dtb | 18 | usb_a9g20.dtb |
19 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb | 19 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb |
20 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ | ||
21 | dove-cubox.dtb \ | ||
22 | dove-dove-db.dtb | ||
20 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ | 23 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ |
21 | exynos4210-smdkv310.dtb \ | 24 | exynos4210-smdkv310.dtb \ |
22 | exynos4210-trats.dtb \ | 25 | exynos4210-trats.dtb \ |
@@ -33,10 +36,13 @@ dtb-$(CONFIG_SOC_IMX6Q) += imx6q-arm2.dtb \ | |||
33 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb | 36 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb |
34 | dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ | 37 | dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ |
35 | kirkwood-dns325.dtb \ | 38 | kirkwood-dns325.dtb \ |
39 | kirkwood-dockstar.dtb \ | ||
36 | kirkwood-dreamplug.dtb \ | 40 | kirkwood-dreamplug.dtb \ |
37 | kirkwood-goflexnet.dtb \ | 41 | kirkwood-goflexnet.dtb \ |
38 | kirkwood-ib62x0.dtb \ | 42 | kirkwood-ib62x0.dtb \ |
39 | kirkwood-iconnect.dtb \ | 43 | kirkwood-iconnect.dtb \ |
44 | kirkwood-iomega_ix2_200.dtb \ | ||
45 | kirkwood-km_kirkwood.dtb \ | ||
40 | kirkwood-lschlv2.dtb \ | 46 | kirkwood-lschlv2.dtb \ |
41 | kirkwood-lsxhl.dtb \ | 47 | kirkwood-lsxhl.dtb \ |
42 | kirkwood-ts219-6281.dtb \ | 48 | kirkwood-ts219-6281.dtb \ |
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 6b6b932a5a7d..16cc82cdaa81 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi | |||
@@ -63,6 +63,11 @@ | |||
63 | reg = <0xd0020300 0x30>; | 63 | reg = <0xd0020300 0x30>; |
64 | interrupts = <37>, <38>, <39>, <40>; | 64 | interrupts = <37>, <38>, <39>, <40>; |
65 | }; | 65 | }; |
66 | |||
67 | addr-decoding@d0020000 { | ||
68 | compatible = "marvell,armada-addr-decoding-controller"; | ||
69 | reg = <0xd0020000 0x258>; | ||
70 | }; | ||
66 | }; | 71 | }; |
67 | }; | 72 | }; |
68 | 73 | ||
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index 3228ccc83332..2069151afe01 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi | |||
@@ -21,6 +21,12 @@ | |||
21 | model = "Marvell Armada 370 family SoC"; | 21 | model = "Marvell Armada 370 family SoC"; |
22 | compatible = "marvell,armada370", "marvell,armada-370-xp"; | 22 | compatible = "marvell,armada370", "marvell,armada-370-xp"; |
23 | 23 | ||
24 | aliases { | ||
25 | gpio0 = &gpio0; | ||
26 | gpio1 = &gpio1; | ||
27 | gpio2 = &gpio2; | ||
28 | }; | ||
29 | |||
24 | mpic: interrupt-controller@d0020000 { | 30 | mpic: interrupt-controller@d0020000 { |
25 | reg = <0xd0020a00 0x1d0>, | 31 | reg = <0xd0020a00 0x1d0>, |
26 | <0xd0021870 0x58>; | 32 | <0xd0021870 0x58>; |
@@ -31,5 +37,43 @@ | |||
31 | compatible = "marvell,armada-370-xp-system-controller"; | 37 | compatible = "marvell,armada-370-xp-system-controller"; |
32 | reg = <0xd0018200 0x100>; | 38 | reg = <0xd0018200 0x100>; |
33 | }; | 39 | }; |
40 | |||
41 | pinctrl { | ||
42 | compatible = "marvell,mv88f6710-pinctrl"; | ||
43 | reg = <0xd0018000 0x38>; | ||
44 | }; | ||
45 | |||
46 | gpio0: gpio@d0018100 { | ||
47 | compatible = "marvell,orion-gpio"; | ||
48 | reg = <0xd0018100 0x40>; | ||
49 | ngpios = <32>; | ||
50 | gpio-controller; | ||
51 | #gpio-cells = <2>; | ||
52 | interrupt-controller; | ||
53 | #interrupts-cells = <2>; | ||
54 | interrupts = <82>, <83>, <84>, <85>; | ||
55 | }; | ||
56 | |||
57 | gpio1: gpio@d0018140 { | ||
58 | compatible = "marvell,orion-gpio"; | ||
59 | reg = <0xd0018140 0x40>; | ||
60 | ngpios = <32>; | ||
61 | gpio-controller; | ||
62 | #gpio-cells = <2>; | ||
63 | interrupt-controller; | ||
64 | #interrupts-cells = <2>; | ||
65 | interrupts = <87>, <88>, <89>, <90>; | ||
66 | }; | ||
67 | |||
68 | gpio2: gpio@d0018180 { | ||
69 | compatible = "marvell,orion-gpio"; | ||
70 | reg = <0xd0018180 0x40>; | ||
71 | ngpios = <2>; | ||
72 | gpio-controller; | ||
73 | #gpio-cells = <2>; | ||
74 | interrupt-controller; | ||
75 | #interrupts-cells = <2>; | ||
76 | interrupts = <91>; | ||
77 | }; | ||
34 | }; | 78 | }; |
35 | }; | 79 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts index f97040d4258d..b1fc728515e9 100644 --- a/arch/arm/boot/dts/armada-xp-db.dts +++ b/arch/arm/boot/dts/armada-xp-db.dts | |||
@@ -14,11 +14,11 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | /dts-v1/; | 16 | /dts-v1/; |
17 | /include/ "armada-xp.dtsi" | 17 | /include/ "armada-xp-mv78460.dtsi" |
18 | 18 | ||
19 | / { | 19 | / { |
20 | model = "Marvell Armada XP Evaluation Board"; | 20 | model = "Marvell Armada XP Evaluation Board"; |
21 | compatible = "marvell,axp-db", "marvell,armadaxp", "marvell,armada-370-xp"; | 21 | compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; |
22 | 22 | ||
23 | chosen { | 23 | chosen { |
24 | bootargs = "console=ttyS0,115200 earlyprintk"; | 24 | bootargs = "console=ttyS0,115200 earlyprintk"; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi new file mode 100644 index 000000000000..ea355192be6f --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Device Tree Include file for Marvell Armada XP family SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@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 | * Contains definitions specific to the Armada XP MV78230 SoC that are not | ||
13 | * common to all Armada XP SoCs. | ||
14 | */ | ||
15 | |||
16 | /include/ "armada-xp.dtsi" | ||
17 | |||
18 | / { | ||
19 | model = "Marvell Armada XP MV78230 SoC"; | ||
20 | compatible = "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; | ||
21 | |||
22 | aliases { | ||
23 | gpio0 = &gpio0; | ||
24 | gpio1 = &gpio1; | ||
25 | }; | ||
26 | |||
27 | soc { | ||
28 | pinctrl { | ||
29 | compatible = "marvell,mv78230-pinctrl"; | ||
30 | reg = <0xd0018000 0x38>; | ||
31 | }; | ||
32 | |||
33 | gpio0: gpio@d0018100 { | ||
34 | compatible = "marvell,armadaxp-gpio"; | ||
35 | reg = <0xd0018100 0x40>, | ||
36 | <0xd0018800 0x30>; | ||
37 | ngpios = <32>; | ||
38 | gpio-controller; | ||
39 | #gpio-cells = <2>; | ||
40 | interrupt-controller; | ||
41 | #interrupts-cells = <2>; | ||
42 | interrupts = <16>, <17>, <18>, <19>; | ||
43 | }; | ||
44 | |||
45 | gpio1: gpio@d0018140 { | ||
46 | compatible = "marvell,armadaxp-gpio"; | ||
47 | reg = <0xd0018140 0x40>, | ||
48 | <0xd0018840 0x30>; | ||
49 | ngpios = <17>; | ||
50 | gpio-controller; | ||
51 | #gpio-cells = <2>; | ||
52 | interrupt-controller; | ||
53 | #interrupts-cells = <2>; | ||
54 | interrupts = <20>, <21>, <22>; | ||
55 | }; | ||
56 | }; | ||
57 | }; | ||
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi new file mode 100644 index 000000000000..2057863f3dfa --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Device Tree Include file for Marvell Armada XP family SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@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 | * Contains definitions specific to the Armada XP MV78260 SoC that are not | ||
13 | * common to all Armada XP SoCs. | ||
14 | */ | ||
15 | |||
16 | /include/ "armada-xp.dtsi" | ||
17 | |||
18 | / { | ||
19 | model = "Marvell Armada XP MV78260 SoC"; | ||
20 | compatible = "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp"; | ||
21 | |||
22 | aliases { | ||
23 | gpio0 = &gpio0; | ||
24 | gpio1 = &gpio1; | ||
25 | gpio2 = &gpio2; | ||
26 | }; | ||
27 | |||
28 | soc { | ||
29 | pinctrl { | ||
30 | compatible = "marvell,mv78260-pinctrl"; | ||
31 | reg = <0xd0018000 0x38>; | ||
32 | }; | ||
33 | |||
34 | gpio0: gpio@d0018100 { | ||
35 | compatible = "marvell,armadaxp-gpio"; | ||
36 | reg = <0xd0018100 0x40>, | ||
37 | <0xd0018800 0x30>; | ||
38 | ngpios = <32>; | ||
39 | gpio-controller; | ||
40 | #gpio-cells = <2>; | ||
41 | interrupt-controller; | ||
42 | #interrupts-cells = <2>; | ||
43 | interrupts = <16>, <17>, <18>, <19>; | ||
44 | }; | ||
45 | |||
46 | gpio1: gpio@d0018140 { | ||
47 | compatible = "marvell,armadaxp-gpio"; | ||
48 | reg = <0xd0018140 0x40>, | ||
49 | <0xd0018840 0x30>; | ||
50 | ngpios = <32>; | ||
51 | gpio-controller; | ||
52 | #gpio-cells = <2>; | ||
53 | interrupt-controller; | ||
54 | #interrupts-cells = <2>; | ||
55 | interrupts = <20>, <21>, <22>, <23>; | ||
56 | }; | ||
57 | |||
58 | gpio2: gpio@d0018180 { | ||
59 | compatible = "marvell,armadaxp-gpio"; | ||
60 | reg = <0xd0018180 0x40>, | ||
61 | <0xd0018870 0x30>; | ||
62 | ngpios = <3>; | ||
63 | gpio-controller; | ||
64 | #gpio-cells = <2>; | ||
65 | interrupt-controller; | ||
66 | #interrupts-cells = <2>; | ||
67 | interrupts = <24>; | ||
68 | }; | ||
69 | }; | ||
70 | }; | ||
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi new file mode 100644 index 000000000000..ffac98373792 --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Device Tree Include file for Marvell Armada XP family SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@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 | * Contains definitions specific to the Armada XP MV78460 SoC that are not | ||
13 | * common to all Armada XP SoCs. | ||
14 | */ | ||
15 | |||
16 | /include/ "armada-xp.dtsi" | ||
17 | |||
18 | / { | ||
19 | model = "Marvell Armada XP MV78460 SoC"; | ||
20 | compatible = "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; | ||
21 | |||
22 | aliases { | ||
23 | gpio0 = &gpio0; | ||
24 | gpio1 = &gpio1; | ||
25 | gpio2 = &gpio2; | ||
26 | }; | ||
27 | |||
28 | soc { | ||
29 | pinctrl { | ||
30 | compatible = "marvell,mv78460-pinctrl"; | ||
31 | reg = <0xd0018000 0x38>; | ||
32 | }; | ||
33 | |||
34 | gpio0: gpio@d0018100 { | ||
35 | compatible = "marvell,armadaxp-gpio"; | ||
36 | reg = <0xd0018100 0x40>, | ||
37 | <0xd0018800 0x30>; | ||
38 | ngpios = <32>; | ||
39 | gpio-controller; | ||
40 | #gpio-cells = <2>; | ||
41 | interrupt-controller; | ||
42 | #interrupts-cells = <2>; | ||
43 | interrupts = <16>, <17>, <18>, <19>; | ||
44 | }; | ||
45 | |||
46 | gpio1: gpio@d0018140 { | ||
47 | compatible = "marvell,armadaxp-gpio"; | ||
48 | reg = <0xd0018140 0x40>, | ||
49 | <0xd0018840 0x30>; | ||
50 | ngpios = <32>; | ||
51 | gpio-controller; | ||
52 | #gpio-cells = <2>; | ||
53 | interrupt-controller; | ||
54 | #interrupts-cells = <2>; | ||
55 | interrupts = <20>, <21>, <22>, <23>; | ||
56 | }; | ||
57 | |||
58 | gpio2: gpio@d0018180 { | ||
59 | compatible = "marvell,armadaxp-gpio"; | ||
60 | reg = <0xd0018180 0x40>, | ||
61 | <0xd0018870 0x30>; | ||
62 | ngpios = <3>; | ||
63 | gpio-controller; | ||
64 | #gpio-cells = <2>; | ||
65 | interrupt-controller; | ||
66 | #interrupts-cells = <2>; | ||
67 | interrupts = <24>; | ||
68 | }; | ||
69 | }; | ||
70 | }; | ||
diff --git a/arch/arm/boot/dts/dove-cm-a510.dts b/arch/arm/boot/dts/dove-cm-a510.dts new file mode 100644 index 000000000000..61a8062e56de --- /dev/null +++ b/arch/arm/boot/dts/dove-cm-a510.dts | |||
@@ -0,0 +1,38 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "dove.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Compulab CM-A510"; | ||
7 | compatible = "compulab,cm-a510", "marvell,dove"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x40000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
16 | }; | ||
17 | }; | ||
18 | |||
19 | &uart0 { status = "okay"; }; | ||
20 | &uart1 { status = "okay"; }; | ||
21 | &sdio0 { status = "okay"; }; | ||
22 | &sdio1 { status = "okay"; }; | ||
23 | &sata0 { status = "okay"; }; | ||
24 | |||
25 | &spi0 { | ||
26 | status = "okay"; | ||
27 | |||
28 | /* spi0.0: 4M Flash Winbond W25Q32BV */ | ||
29 | spi-flash@0 { | ||
30 | compatible = "st,w25q32"; | ||
31 | spi-max-frequency = <20000000>; | ||
32 | reg = <0>; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | &i2c0 { | ||
37 | status = "okay"; | ||
38 | }; | ||
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts new file mode 100644 index 000000000000..0adbd5a38095 --- /dev/null +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
@@ -0,0 +1,42 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "dove.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "SolidRun CuBox"; | ||
7 | compatible = "solidrun,cubox", "marvell,dove"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x40000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
16 | }; | ||
17 | |||
18 | leds { | ||
19 | compatible = "gpio-leds"; | ||
20 | power { | ||
21 | label = "Power"; | ||
22 | gpios = <&gpio0 18 1>; | ||
23 | linux,default-trigger = "default-on"; | ||
24 | }; | ||
25 | }; | ||
26 | }; | ||
27 | |||
28 | &uart0 { status = "okay"; }; | ||
29 | &sdio0 { status = "okay"; }; | ||
30 | &sata0 { status = "okay"; }; | ||
31 | &i2c0 { status = "okay"; }; | ||
32 | |||
33 | &spi0 { | ||
34 | status = "okay"; | ||
35 | |||
36 | /* spi0.0: 4M Flash Winbond W25Q32BV */ | ||
37 | spi-flash@0 { | ||
38 | compatible = "st,w25q32"; | ||
39 | spi-max-frequency = <20000000>; | ||
40 | reg = <0>; | ||
41 | }; | ||
42 | }; | ||
diff --git a/arch/arm/boot/dts/dove-dove-db.dts b/arch/arm/boot/dts/dove-dove-db.dts new file mode 100644 index 000000000000..e5a920beab45 --- /dev/null +++ b/arch/arm/boot/dts/dove-dove-db.dts | |||
@@ -0,0 +1,38 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "dove.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Marvell DB-MV88AP510-BP Development Board"; | ||
7 | compatible = "marvell,dove-db", "marvell,dove"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x40000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
16 | }; | ||
17 | }; | ||
18 | |||
19 | &uart0 { status = "okay"; }; | ||
20 | &uart1 { status = "okay"; }; | ||
21 | &sdio0 { status = "okay"; }; | ||
22 | &sdio1 { status = "okay"; }; | ||
23 | &sata0 { status = "okay"; }; | ||
24 | |||
25 | &spi0 { | ||
26 | status = "okay"; | ||
27 | |||
28 | /* spi0.0: 4M Flash ST-M25P32-VMF6P */ | ||
29 | spi-flash@0 { | ||
30 | compatible = "st,m25p32"; | ||
31 | spi-max-frequency = <20000000>; | ||
32 | reg = <0>; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | &i2c0 { | ||
37 | status = "okay"; | ||
38 | }; | ||
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi new file mode 100644 index 000000000000..96fb824b5e6e --- /dev/null +++ b/arch/arm/boot/dts/dove.dtsi | |||
@@ -0,0 +1,143 @@ | |||
1 | /include/ "skeleton.dtsi" | ||
2 | |||
3 | / { | ||
4 | compatible = "marvell,dove"; | ||
5 | model = "Marvell Armada 88AP510 SoC"; | ||
6 | |||
7 | interrupt-parent = <&intc>; | ||
8 | |||
9 | intc: interrupt-controller { | ||
10 | compatible = "marvell,orion-intc"; | ||
11 | interrupt-controller; | ||
12 | #interrupt-cells = <1>; | ||
13 | reg = <0xf1020204 0x04>, | ||
14 | <0xf1020214 0x04>; | ||
15 | }; | ||
16 | |||
17 | mbus@f1000000 { | ||
18 | compatible = "simple-bus"; | ||
19 | ranges = <0 0xf1000000 0x4000000>; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | |||
23 | uart0: serial@12000 { | ||
24 | compatible = "ns16550a"; | ||
25 | reg = <0x12000 0x100>; | ||
26 | reg-shift = <2>; | ||
27 | interrupts = <7>; | ||
28 | clock-frequency = <166666667>; | ||
29 | status = "disabled"; | ||
30 | }; | ||
31 | |||
32 | uart1: serial@12100 { | ||
33 | compatible = "ns16550a"; | ||
34 | reg = <0x12100 0x100>; | ||
35 | reg-shift = <2>; | ||
36 | interrupts = <8>; | ||
37 | clock-frequency = <166666667>; | ||
38 | status = "disabled"; | ||
39 | }; | ||
40 | |||
41 | uart2: serial@12200 { | ||
42 | compatible = "ns16550a"; | ||
43 | reg = <0x12000 0x100>; | ||
44 | reg-shift = <2>; | ||
45 | interrupts = <9>; | ||
46 | clock-frequency = <166666667>; | ||
47 | status = "disabled"; | ||
48 | }; | ||
49 | |||
50 | uart3: serial@12300 { | ||
51 | compatible = "ns16550a"; | ||
52 | reg = <0x12100 0x100>; | ||
53 | reg-shift = <2>; | ||
54 | interrupts = <10>; | ||
55 | clock-frequency = <166666667>; | ||
56 | status = "disabled"; | ||
57 | }; | ||
58 | |||
59 | wdt: wdt@20300 { | ||
60 | compatible = "marvell,orion-wdt"; | ||
61 | reg = <0x20300 0x28>; | ||
62 | }; | ||
63 | |||
64 | gpio0: gpio@d0400 { | ||
65 | compatible = "marvell,orion-gpio"; | ||
66 | #gpio-cells = <2>; | ||
67 | gpio-controller; | ||
68 | reg = <0xd0400 0x20>; | ||
69 | ngpio = <32>; | ||
70 | interrupts = <12>, <13>, <14>, <60>; | ||
71 | }; | ||
72 | |||
73 | gpio1: gpio@d0420 { | ||
74 | compatible = "marvell,orion-gpio"; | ||
75 | #gpio-cells = <2>; | ||
76 | gpio-controller; | ||
77 | reg = <0xd0420 0x20>; | ||
78 | ngpio = <32>; | ||
79 | interrupts = <61>; | ||
80 | }; | ||
81 | |||
82 | gpio2: gpio@e8400 { | ||
83 | compatible = "marvell,orion-gpio"; | ||
84 | #gpio-cells = <2>; | ||
85 | gpio-controller; | ||
86 | reg = <0xe8400 0x0c>; | ||
87 | ngpio = <8>; | ||
88 | }; | ||
89 | |||
90 | spi0: spi@10600 { | ||
91 | compatible = "marvell,orion-spi"; | ||
92 | #address-cells = <1>; | ||
93 | #size-cells = <0>; | ||
94 | cell-index = <0>; | ||
95 | interrupts = <6>; | ||
96 | reg = <0x10600 0x28>; | ||
97 | status = "disabled"; | ||
98 | }; | ||
99 | |||
100 | spi1: spi@14600 { | ||
101 | compatible = "marvell,orion-spi"; | ||
102 | #address-cells = <1>; | ||
103 | #size-cells = <0>; | ||
104 | cell-index = <1>; | ||
105 | interrupts = <5>; | ||
106 | reg = <0x14600 0x28>; | ||
107 | status = "disabled"; | ||
108 | }; | ||
109 | |||
110 | i2c0: i2c@11000 { | ||
111 | compatible = "marvell,mv64xxx-i2c"; | ||
112 | reg = <0x11000 0x20>; | ||
113 | #address-cells = <1>; | ||
114 | #size-cells = <0>; | ||
115 | interrupts = <11>; | ||
116 | clock-frequency = <400000>; | ||
117 | timeout-ms = <1000>; | ||
118 | status = "disabled"; | ||
119 | }; | ||
120 | |||
121 | sdio0: sdio@92000 { | ||
122 | compatible = "marvell,dove-sdhci"; | ||
123 | reg = <0x92000 0x100>; | ||
124 | interrupts = <35>, <37>; | ||
125 | status = "disabled"; | ||
126 | }; | ||
127 | |||
128 | sdio1: sdio@90000 { | ||
129 | compatible = "marvell,dove-sdhci"; | ||
130 | reg = <0x90000 0x100>; | ||
131 | interrupts = <36>, <38>; | ||
132 | status = "disabled"; | ||
133 | }; | ||
134 | |||
135 | sata0: sata@a0000 { | ||
136 | compatible = "marvell,orion-sata"; | ||
137 | reg = <0xa0000 0x2400>; | ||
138 | interrupts = <62>; | ||
139 | nr-ports = <1>; | ||
140 | status = "disabled"; | ||
141 | }; | ||
142 | }; | ||
143 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi index 7408655f91b5..9b32d0272825 100644 --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi | |||
@@ -25,6 +25,16 @@ | |||
25 | }; | 25 | }; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | gpio_fan { | ||
29 | /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ | ||
30 | compatible = "gpio-fan"; | ||
31 | gpios = <&gpio1 14 1 | ||
32 | &gpio1 13 1>; | ||
33 | gpio-fan,speed-map = <0 0 | ||
34 | 3000 1 | ||
35 | 6000 2>; | ||
36 | }; | ||
37 | |||
28 | ocp@f1000000 { | 38 | ocp@f1000000 { |
29 | sata@80000 { | 39 | sata@80000 { |
30 | status = "okay"; | 40 | status = "okay"; |
diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts new file mode 100644 index 000000000000..08a582414b88 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-dockstar.dts | |||
@@ -0,0 +1,57 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Seagate FreeAgent Dockstar"; | ||
7 | compatible = "seagate,dockstar", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x8000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10"; | ||
16 | }; | ||
17 | |||
18 | ocp@f1000000 { | ||
19 | serial@12000 { | ||
20 | clock-frequency = <200000000>; | ||
21 | status = "ok"; | ||
22 | }; | ||
23 | |||
24 | nand@3000000 { | ||
25 | status = "okay"; | ||
26 | |||
27 | partition@0 { | ||
28 | label = "u-boot"; | ||
29 | reg = <0x0000000 0x100000>; | ||
30 | read-only; | ||
31 | }; | ||
32 | |||
33 | partition@100000 { | ||
34 | label = "uImage"; | ||
35 | reg = <0x0100000 0x400000>; | ||
36 | }; | ||
37 | |||
38 | partition@500000 { | ||
39 | label = "data"; | ||
40 | reg = <0x0500000 0xfb00000>; | ||
41 | }; | ||
42 | }; | ||
43 | }; | ||
44 | gpio-leds { | ||
45 | compatible = "gpio-leds"; | ||
46 | |||
47 | health { | ||
48 | label = "status:green:health"; | ||
49 | gpios = <&gpio1 14 1>; | ||
50 | linux,default-trigger = "default-on"; | ||
51 | }; | ||
52 | fault { | ||
53 | label = "status:orange:fault"; | ||
54 | gpios = <&gpio1 15 1>; | ||
55 | }; | ||
56 | }; | ||
57 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts index f8ca6fa88192..d97cd9d4753e 100644 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts | |||
@@ -12,7 +12,7 @@ | |||
12 | }; | 12 | }; |
13 | 13 | ||
14 | chosen { | 14 | chosen { |
15 | bootargs = "console=ttyS0,115200n8 earlyprintk mtdparts=orion_nand:0xc0000@0x0(uboot),0x20000@0xa0000(env),0x300000@0x100000(zImage),0x300000@0x540000(initrd),0x1f400000@0x980000(boot)"; | 15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; |
16 | linux,initrd-start = <0x4500040>; | 16 | linux,initrd-start = <0x4500040>; |
17 | linux,initrd-end = <0x4800000>; | 17 | linux,initrd-end = <0x4800000>; |
18 | }; | 18 | }; |
@@ -30,7 +30,37 @@ | |||
30 | clock-frequency = <200000000>; | 30 | clock-frequency = <200000000>; |
31 | status = "ok"; | 31 | status = "ok"; |
32 | }; | 32 | }; |
33 | |||
34 | nand@3000000 { | ||
35 | status = "okay"; | ||
36 | |||
37 | partition@0 { | ||
38 | label = "uboot"; | ||
39 | reg = <0x0000000 0xc0000>; | ||
40 | }; | ||
41 | |||
42 | partition@a0000 { | ||
43 | label = "env"; | ||
44 | reg = <0xa0000 0x20000>; | ||
45 | }; | ||
46 | |||
47 | partition@100000 { | ||
48 | label = "zImage"; | ||
49 | reg = <0x100000 0x300000>; | ||
50 | }; | ||
51 | |||
52 | partition@540000 { | ||
53 | label = "initrd"; | ||
54 | reg = <0x540000 0x300000>; | ||
55 | }; | ||
56 | |||
57 | partition@980000 { | ||
58 | label = "boot"; | ||
59 | reg = <0x980000 0x1f400000>; | ||
60 | }; | ||
61 | }; | ||
33 | }; | 62 | }; |
63 | |||
34 | gpio-leds { | 64 | gpio-leds { |
35 | compatible = "gpio-leds"; | 65 | compatible = "gpio-leds"; |
36 | 66 | ||
@@ -69,4 +99,22 @@ | |||
69 | gpios = <&gpio1 16 0>; | 99 | gpios = <&gpio1 16 0>; |
70 | }; | 100 | }; |
71 | }; | 101 | }; |
102 | |||
103 | gpio_keys { | ||
104 | compatible = "gpio-keys"; | ||
105 | #address-cells = <1>; | ||
106 | #size-cells = <0>; | ||
107 | button@1 { | ||
108 | label = "OTB Button"; | ||
109 | linux,code = <133>; | ||
110 | gpios = <&gpio1 3 1>; | ||
111 | debounce-interval = <100>; | ||
112 | }; | ||
113 | button@2 { | ||
114 | label = "Reset"; | ||
115 | linux,code = <0x198>; | ||
116 | gpios = <&gpio0 12 1>; | ||
117 | debounce-interval = <100>; | ||
118 | }; | ||
119 | }; | ||
72 | }; | 120 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts new file mode 100644 index 000000000000..865aeec40a26 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | |||
@@ -0,0 +1,105 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Iomega StorCenter ix2-200"; | ||
7 | compatible = "iom,ix2-200", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x10000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
16 | }; | ||
17 | |||
18 | ocp@f1000000 { | ||
19 | i2c@11000 { | ||
20 | status = "okay"; | ||
21 | |||
22 | lm63: lm63@4c { | ||
23 | compatible = "national,lm63"; | ||
24 | reg = <0x4c>; | ||
25 | }; | ||
26 | }; | ||
27 | |||
28 | serial@12000 { | ||
29 | clock-frequency = <200000000>; | ||
30 | status = "ok"; | ||
31 | }; | ||
32 | |||
33 | nand@3000000 { | ||
34 | status = "okay"; | ||
35 | |||
36 | partition@0 { | ||
37 | label = "u-boot"; | ||
38 | reg = <0x0000000 0x100000>; | ||
39 | read-only; | ||
40 | }; | ||
41 | |||
42 | partition@a0000 { | ||
43 | label = "env"; | ||
44 | reg = <0xa0000 0x20000>; | ||
45 | read-only; | ||
46 | }; | ||
47 | |||
48 | partition@100000 { | ||
49 | label = "uImage"; | ||
50 | reg = <0x100000 0x300000>; | ||
51 | }; | ||
52 | |||
53 | partition@400000 { | ||
54 | label = "uInitrd"; | ||
55 | reg = <0x540000 0x1000000>; | ||
56 | }; | ||
57 | }; | ||
58 | sata@80000 { | ||
59 | status = "okay"; | ||
60 | nr-ports = <2>; | ||
61 | }; | ||
62 | |||
63 | }; | ||
64 | gpio-leds { | ||
65 | compatible = "gpio-leds"; | ||
66 | |||
67 | power_led { | ||
68 | label = "status:white:power_led"; | ||
69 | gpios = <&gpio0 16 0>; | ||
70 | linux,default-trigger = "default-on"; | ||
71 | }; | ||
72 | health_led1 { | ||
73 | label = "status:red:health_led"; | ||
74 | gpios = <&gpio1 5 0>; | ||
75 | }; | ||
76 | health_led2 { | ||
77 | label = "status:white:health_led"; | ||
78 | gpios = <&gpio1 4 0>; | ||
79 | }; | ||
80 | backup_led { | ||
81 | label = "status:blue:backup_led"; | ||
82 | gpios = <&gpio0 15 0>; | ||
83 | }; | ||
84 | }; | ||
85 | gpio-keys { | ||
86 | compatible = "gpio-keys"; | ||
87 | #address-cells = <1>; | ||
88 | #size-cells = <0>; | ||
89 | Power { | ||
90 | label = "Power Button"; | ||
91 | linux,code = <116>; | ||
92 | gpios = <&gpio0 14 1>; | ||
93 | }; | ||
94 | Reset { | ||
95 | label = "Reset Button"; | ||
96 | linux,code = <0x198>; | ||
97 | gpios = <&gpio0 12 1>; | ||
98 | }; | ||
99 | OTB { | ||
100 | label = "OTB Button"; | ||
101 | linux,code = <133>; | ||
102 | gpios = <&gpio1 3 1>; | ||
103 | }; | ||
104 | }; | ||
105 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts new file mode 100644 index 000000000000..75bdb93fed26 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts | |||
@@ -0,0 +1,29 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "kirkwood.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Keymile Kirkwood Reference Design"; | ||
7 | compatible = "keymile,km_kirkwood", "marvell,kirkwood-98DX4122", "marvell,kirkwood"; | ||
8 | |||
9 | memory { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x00000000 0x08000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
16 | }; | ||
17 | |||
18 | ocp@f1000000 { | ||
19 | serial@12000 { | ||
20 | clock-frequency = <200000000>; | ||
21 | status = "ok"; | ||
22 | }; | ||
23 | |||
24 | nand@3000000 { | ||
25 | status = "ok"; | ||
26 | chip-delay = <25>; | ||
27 | }; | ||
28 | }; | ||
29 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index cef9616f330a..4e5b8154a5be 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
@@ -14,7 +14,8 @@ | |||
14 | 14 | ||
15 | ocp@f1000000 { | 15 | ocp@f1000000 { |
16 | compatible = "simple-bus"; | 16 | compatible = "simple-bus"; |
17 | ranges = <0 0xf1000000 0x4000000>; | 17 | ranges = <0x00000000 0xf1000000 0x4000000 |
18 | 0xf5000000 0xf5000000 0x0000400>; | ||
18 | #address-cells = <1>; | 19 | #address-cells = <1>; |
19 | #size-cells = <1>; | 20 | #size-cells = <1>; |
20 | 21 | ||
@@ -105,5 +106,14 @@ | |||
105 | clock-frequency = <100000>; | 106 | clock-frequency = <100000>; |
106 | status = "disabled"; | 107 | status = "disabled"; |
107 | }; | 108 | }; |
109 | |||
110 | crypto@30000 { | ||
111 | compatible = "marvell,orion-crypto"; | ||
112 | reg = <0x30000 0x10000>, | ||
113 | <0xf5000000 0x800>; | ||
114 | reg-names = "regs", "sram"; | ||
115 | interrupts = <22>; | ||
116 | status = "okay"; | ||
117 | }; | ||
108 | }; | 118 | }; |
109 | }; | 119 | }; |
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index aeb3af541fed..74eee0c78f28 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
@@ -1,5 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_HIGH_RES_TIMERS=y | ||
3 | CONFIG_LOG_BUF_SHIFT=19 | 5 | CONFIG_LOG_BUF_SHIFT=19 |
4 | CONFIG_PROFILING=y | 6 | CONFIG_PROFILING=y |
5 | CONFIG_OPROFILE=y | 7 | CONFIG_OPROFILE=y |
@@ -15,9 +17,19 @@ CONFIG_MACH_MV88F6281GTW_GE=y | |||
15 | CONFIG_MACH_SHEEVAPLUG=y | 17 | CONFIG_MACH_SHEEVAPLUG=y |
16 | CONFIG_MACH_ESATA_SHEEVAPLUG=y | 18 | CONFIG_MACH_ESATA_SHEEVAPLUG=y |
17 | CONFIG_MACH_GURUPLUG=y | 19 | CONFIG_MACH_GURUPLUG=y |
18 | CONFIG_MACH_DOCKSTAR=y | 20 | CONFIG_MACH_DREAMPLUG_DT=y |
21 | CONFIG_MACH_ICONNECT_DT=y | ||
22 | CONFIG_MACH_DLINK_KIRKWOOD_DT=y | ||
23 | CONFIG_MACH_IB62X0_DT=y | ||
24 | CONFIG_MACH_TS219_DT=y | ||
25 | CONFIG_MACH_DOCKSTAR_DT=y | ||
26 | CONFIG_MACH_GOFLEXNET_DT=y | ||
27 | CONFIG_MACH_LSXL_DT=y | ||
28 | CONFIG_MACH_IOMEGA_IX2_200_DT=y | ||
29 | CONFIG_MACH_KM_KIRKWOOD_DT=y | ||
19 | CONFIG_MACH_TS219=y | 30 | CONFIG_MACH_TS219=y |
20 | CONFIG_MACH_TS41X=y | 31 | CONFIG_MACH_TS41X=y |
32 | CONFIG_MACH_DOCKSTAR=y | ||
21 | CONFIG_MACH_OPENRD_BASE=y | 33 | CONFIG_MACH_OPENRD_BASE=y |
22 | CONFIG_MACH_OPENRD_CLIENT=y | 34 | CONFIG_MACH_OPENRD_CLIENT=y |
23 | CONFIG_MACH_OPENRD_ULTIMATE=y | 35 | CONFIG_MACH_OPENRD_ULTIMATE=y |
@@ -29,8 +41,6 @@ CONFIG_MACH_NET2BIG_V2=y | |||
29 | CONFIG_MACH_NET5BIG_V2=y | 41 | CONFIG_MACH_NET5BIG_V2=y |
30 | CONFIG_MACH_T5325=y | 42 | CONFIG_MACH_T5325=y |
31 | # CONFIG_CPU_FEROCEON_OLD_ID is not set | 43 | # CONFIG_CPU_FEROCEON_OLD_ID is not set |
32 | CONFIG_NO_HZ=y | ||
33 | CONFIG_HIGH_RES_TIMERS=y | ||
34 | CONFIG_PREEMPT=y | 44 | CONFIG_PREEMPT=y |
35 | CONFIG_AEABI=y | 45 | CONFIG_AEABI=y |
36 | # CONFIG_OABI_COMPAT is not set | 46 | # CONFIG_OABI_COMPAT is not set |
@@ -47,13 +57,11 @@ CONFIG_IP_PNP_DHCP=y | |||
47 | CONFIG_IP_PNP_BOOTP=y | 57 | CONFIG_IP_PNP_BOOTP=y |
48 | # CONFIG_IPV6 is not set | 58 | # CONFIG_IPV6 is not set |
49 | CONFIG_NET_DSA=y | 59 | CONFIG_NET_DSA=y |
50 | CONFIG_NET_DSA_MV88E6123_61_65=y | ||
51 | CONFIG_NET_PKTGEN=m | 60 | CONFIG_NET_PKTGEN=m |
52 | CONFIG_CFG80211=y | 61 | CONFIG_CFG80211=y |
53 | CONFIG_MAC80211=y | 62 | CONFIG_MAC80211=y |
54 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 63 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
55 | CONFIG_MTD=y | 64 | CONFIG_MTD=y |
56 | CONFIG_MTD_PARTITIONS=y | ||
57 | CONFIG_MTD_CMDLINE_PARTS=y | 65 | CONFIG_MTD_CMDLINE_PARTS=y |
58 | CONFIG_MTD_CHAR=y | 66 | CONFIG_MTD_CHAR=y |
59 | CONFIG_MTD_BLOCK=y | 67 | CONFIG_MTD_BLOCK=y |
@@ -69,7 +77,6 @@ CONFIG_MTD_M25P80=y | |||
69 | CONFIG_MTD_NAND=y | 77 | CONFIG_MTD_NAND=y |
70 | CONFIG_MTD_NAND_ORION=y | 78 | CONFIG_MTD_NAND_ORION=y |
71 | CONFIG_BLK_DEV_LOOP=y | 79 | CONFIG_BLK_DEV_LOOP=y |
72 | # CONFIG_MISC_DEVICES is not set | ||
73 | # CONFIG_SCSI_PROC_FS is not set | 80 | # CONFIG_SCSI_PROC_FS is not set |
74 | CONFIG_BLK_DEV_SD=y | 81 | CONFIG_BLK_DEV_SD=y |
75 | CONFIG_BLK_DEV_SR=m | 82 | CONFIG_BLK_DEV_SR=m |
@@ -78,22 +85,21 @@ CONFIG_ATA=y | |||
78 | CONFIG_SATA_AHCI=y | 85 | CONFIG_SATA_AHCI=y |
79 | CONFIG_SATA_MV=y | 86 | CONFIG_SATA_MV=y |
80 | CONFIG_NETDEVICES=y | 87 | CONFIG_NETDEVICES=y |
81 | CONFIG_MARVELL_PHY=y | ||
82 | CONFIG_NET_ETHERNET=y | ||
83 | CONFIG_MII=y | 88 | CONFIG_MII=y |
84 | CONFIG_NET_PCI=y | 89 | CONFIG_NET_DSA_MV88E6123_61_65=y |
85 | CONFIG_MV643XX_ETH=y | 90 | CONFIG_MV643XX_ETH=y |
86 | # CONFIG_NETDEV_10000 is not set | 91 | CONFIG_MARVELL_PHY=y |
87 | CONFIG_LIBERTAS=y | 92 | CONFIG_LIBERTAS=y |
88 | CONFIG_LIBERTAS_SDIO=y | 93 | CONFIG_LIBERTAS_SDIO=y |
89 | CONFIG_INPUT_EVDEV=y | 94 | CONFIG_INPUT_EVDEV=y |
90 | CONFIG_KEYBOARD_GPIO=y | 95 | CONFIG_KEYBOARD_GPIO=y |
91 | # CONFIG_INPUT_MOUSE is not set | 96 | # CONFIG_INPUT_MOUSE is not set |
97 | CONFIG_LEGACY_PTY_COUNT=16 | ||
92 | # CONFIG_DEVKMEM is not set | 98 | # CONFIG_DEVKMEM is not set |
93 | CONFIG_SERIAL_8250=y | 99 | CONFIG_SERIAL_8250=y |
94 | CONFIG_SERIAL_8250_CONSOLE=y | 100 | CONFIG_SERIAL_8250_CONSOLE=y |
95 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | 101 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 |
96 | CONFIG_LEGACY_PTY_COUNT=16 | 102 | CONFIG_SERIAL_OF_PLATFORM=y |
97 | # CONFIG_HW_RANDOM is not set | 103 | # CONFIG_HW_RANDOM is not set |
98 | CONFIG_I2C=y | 104 | CONFIG_I2C=y |
99 | # CONFIG_I2C_COMPAT is not set | 105 | # CONFIG_I2C_COMPAT is not set |
@@ -103,7 +109,8 @@ CONFIG_SPI=y | |||
103 | CONFIG_SPI_ORION=y | 109 | CONFIG_SPI_ORION=y |
104 | CONFIG_GPIO_SYSFS=y | 110 | CONFIG_GPIO_SYSFS=y |
105 | # CONFIG_HWMON is not set | 111 | # CONFIG_HWMON is not set |
106 | # CONFIG_VGA_CONSOLE is not set | 112 | CONFIG_WATCHDOG=y |
113 | CONFIG_ORION_WATCHDOG=y | ||
107 | CONFIG_HID_DRAGONRISE=y | 114 | CONFIG_HID_DRAGONRISE=y |
108 | CONFIG_HID_GYRATION=y | 115 | CONFIG_HID_GYRATION=y |
109 | CONFIG_HID_TWINHAN=y | 116 | CONFIG_HID_TWINHAN=y |
@@ -119,10 +126,8 @@ CONFIG_HID_TOPSEED=y | |||
119 | CONFIG_HID_THRUSTMASTER=y | 126 | CONFIG_HID_THRUSTMASTER=y |
120 | CONFIG_HID_ZEROPLUS=y | 127 | CONFIG_HID_ZEROPLUS=y |
121 | CONFIG_USB=y | 128 | CONFIG_USB=y |
122 | CONFIG_USB_DEVICEFS=y | ||
123 | CONFIG_USB_EHCI_HCD=y | 129 | CONFIG_USB_EHCI_HCD=y |
124 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 130 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
125 | CONFIG_USB_EHCI_TT_NEWSCHED=y | ||
126 | CONFIG_USB_PRINTER=m | 131 | CONFIG_USB_PRINTER=m |
127 | CONFIG_USB_STORAGE=y | 132 | CONFIG_USB_STORAGE=y |
128 | CONFIG_USB_STORAGE_DATAFAB=y | 133 | CONFIG_USB_STORAGE_DATAFAB=y |
@@ -148,7 +153,6 @@ CONFIG_MV_XOR=y | |||
148 | CONFIG_EXT2_FS=y | 153 | CONFIG_EXT2_FS=y |
149 | CONFIG_EXT3_FS=y | 154 | CONFIG_EXT3_FS=y |
150 | # CONFIG_EXT3_FS_XATTR is not set | 155 | # CONFIG_EXT3_FS_XATTR is not set |
151 | CONFIG_INOTIFY=y | ||
152 | CONFIG_ISO9660_FS=m | 156 | CONFIG_ISO9660_FS=m |
153 | CONFIG_JOLIET=y | 157 | CONFIG_JOLIET=y |
154 | CONFIG_UDF_FS=m | 158 | CONFIG_UDF_FS=m |
@@ -158,7 +162,6 @@ CONFIG_TMPFS=y | |||
158 | CONFIG_JFFS2_FS=y | 162 | CONFIG_JFFS2_FS=y |
159 | CONFIG_CRAMFS=y | 163 | CONFIG_CRAMFS=y |
160 | CONFIG_NFS_FS=y | 164 | CONFIG_NFS_FS=y |
161 | CONFIG_NFS_V3=y | ||
162 | CONFIG_ROOT_NFS=y | 165 | CONFIG_ROOT_NFS=y |
163 | CONFIG_NLS_CODEPAGE_437=y | 166 | CONFIG_NLS_CODEPAGE_437=y |
164 | CONFIG_NLS_CODEPAGE_850=y | 167 | CONFIG_NLS_CODEPAGE_850=y |
@@ -171,11 +174,8 @@ CONFIG_DEBUG_KERNEL=y | |||
171 | # CONFIG_SCHED_DEBUG is not set | 174 | # CONFIG_SCHED_DEBUG is not set |
172 | # CONFIG_DEBUG_PREEMPT is not set | 175 | # CONFIG_DEBUG_PREEMPT is not set |
173 | CONFIG_DEBUG_INFO=y | 176 | CONFIG_DEBUG_INFO=y |
174 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
175 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
176 | # CONFIG_FTRACE is not set | 177 | # CONFIG_FTRACE is not set |
177 | CONFIG_DEBUG_USER=y | 178 | CONFIG_DEBUG_USER=y |
178 | CONFIG_DEBUG_ERRORS=y | ||
179 | CONFIG_DEBUG_LL=y | 179 | CONFIG_DEBUG_LL=y |
180 | CONFIG_CRYPTO_CBC=m | 180 | CONFIG_CRYPTO_CBC=m |
181 | CONFIG_CRYPTO_PCBC=m | 181 | CONFIG_CRYPTO_PCBC=m |
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 2e86b31c33cf..7bcf850eddcd 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig | |||
@@ -21,6 +21,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
21 | CONFIG_SERIAL_8250=y | 21 | CONFIG_SERIAL_8250=y |
22 | CONFIG_SERIAL_8250_CONSOLE=y | 22 | CONFIG_SERIAL_8250_CONSOLE=y |
23 | CONFIG_SERIAL_OF_PLATFORM=y | 23 | CONFIG_SERIAL_OF_PLATFORM=y |
24 | CONFIG_GPIOLIB=y | ||
25 | CONFIG_GPIO_SYSFS=y | ||
24 | CONFIG_EXT2_FS=y | 26 | CONFIG_EXT2_FS=y |
25 | CONFIG_EXT3_FS=y | 27 | CONFIG_EXT3_FS=y |
26 | # CONFIG_EXT3_FS_XATTR is not set | 28 | # CONFIG_EXT3_FS_XATTR is not set |
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig index dd937c526a45..00154e74ce6b 100644 --- a/arch/arm/mach-dove/Kconfig +++ b/arch/arm/mach-dove/Kconfig | |||
@@ -15,6 +15,13 @@ config MACH_CM_A510 | |||
15 | Say 'Y' here if you want your kernel to support the | 15 | Say 'Y' here if you want your kernel to support the |
16 | CompuLab CM-A510 Board. | 16 | CompuLab CM-A510 Board. |
17 | 17 | ||
18 | config MACH_DOVE_DT | ||
19 | bool "Marvell Dove Flattened Device Tree" | ||
20 | select USE_OF | ||
21 | help | ||
22 | Say 'Y' here if you want your kernel to support the | ||
23 | Marvell Dove using flattened device tree. | ||
24 | |||
18 | endmenu | 25 | endmenu |
19 | 26 | ||
20 | endif | 27 | endif |
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile index fa0f01856060..5e683baf96cf 100644 --- a/arch/arm/mach-dove/Makefile +++ b/arch/arm/mach-dove/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y += common.o addr-map.o irq.o pcie.o mpp.o | 1 | obj-y += common.o addr-map.o irq.o mpp.o |
2 | 2 | obj-$(CONFIG_PCI) += pcie.o | |
3 | obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o | 3 | obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o |
4 | obj-$(CONFIG_MACH_CM_A510) += cm-a510.o | 4 | obj-$(CONFIG_MACH_CM_A510) += cm-a510.o |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 950ad9533d19..b37bef1d5ffa 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/clk-provider.h> | 16 | #include <linux/clk-provider.h> |
17 | #include <linux/ata_platform.h> | 17 | #include <linux/ata_platform.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/of.h> | ||
20 | #include <linux/of_platform.h> | ||
19 | #include <asm/page.h> | 21 | #include <asm/page.h> |
20 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
21 | #include <asm/timex.h> | 23 | #include <asm/timex.h> |
@@ -24,6 +26,7 @@ | |||
24 | #include <asm/mach/time.h> | 26 | #include <asm/mach/time.h> |
25 | #include <asm/mach/pci.h> | 27 | #include <asm/mach/pci.h> |
26 | #include <mach/dove.h> | 28 | #include <mach/dove.h> |
29 | #include <mach/pm.h> | ||
27 | #include <mach/bridge-regs.h> | 30 | #include <mach/bridge-regs.h> |
28 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
29 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
@@ -33,19 +36,17 @@ | |||
33 | #include <plat/addr-map.h> | 36 | #include <plat/addr-map.h> |
34 | #include "common.h" | 37 | #include "common.h" |
35 | 38 | ||
36 | static int get_tclk(void); | ||
37 | |||
38 | /***************************************************************************** | 39 | /***************************************************************************** |
39 | * I/O Address Mapping | 40 | * I/O Address Mapping |
40 | ****************************************************************************/ | 41 | ****************************************************************************/ |
41 | static struct map_desc dove_io_desc[] __initdata = { | 42 | static struct map_desc dove_io_desc[] __initdata = { |
42 | { | 43 | { |
43 | .virtual = DOVE_SB_REGS_VIRT_BASE, | 44 | .virtual = (unsigned long) DOVE_SB_REGS_VIRT_BASE, |
44 | .pfn = __phys_to_pfn(DOVE_SB_REGS_PHYS_BASE), | 45 | .pfn = __phys_to_pfn(DOVE_SB_REGS_PHYS_BASE), |
45 | .length = DOVE_SB_REGS_SIZE, | 46 | .length = DOVE_SB_REGS_SIZE, |
46 | .type = MT_DEVICE, | 47 | .type = MT_DEVICE, |
47 | }, { | 48 | }, { |
48 | .virtual = DOVE_NB_REGS_VIRT_BASE, | 49 | .virtual = (unsigned long) DOVE_NB_REGS_VIRT_BASE, |
49 | .pfn = __phys_to_pfn(DOVE_NB_REGS_PHYS_BASE), | 50 | .pfn = __phys_to_pfn(DOVE_NB_REGS_PHYS_BASE), |
50 | .length = DOVE_NB_REGS_SIZE, | 51 | .length = DOVE_NB_REGS_SIZE, |
51 | .type = MT_DEVICE, | 52 | .type = MT_DEVICE, |
@@ -60,14 +61,69 @@ void __init dove_map_io(void) | |||
60 | /***************************************************************************** | 61 | /***************************************************************************** |
61 | * CLK tree | 62 | * CLK tree |
62 | ****************************************************************************/ | 63 | ****************************************************************************/ |
64 | static int dove_tclk; | ||
65 | |||
66 | static DEFINE_SPINLOCK(gating_lock); | ||
63 | static struct clk *tclk; | 67 | static struct clk *tclk; |
64 | 68 | ||
65 | static void __init clk_init(void) | 69 | static struct clk __init *dove_register_gate(const char *name, |
70 | const char *parent, u8 bit_idx) | ||
66 | { | 71 | { |
67 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT, | 72 | return clk_register_gate(NULL, name, parent, 0, |
68 | get_tclk()); | 73 | (void __iomem *)CLOCK_GATING_CONTROL, |
74 | bit_idx, 0, &gating_lock); | ||
75 | } | ||
76 | |||
77 | static void __init dove_clk_init(void) | ||
78 | { | ||
79 | struct clk *usb0, *usb1, *sata, *pex0, *pex1, *sdio0, *sdio1; | ||
80 | struct clk *nand, *camera, *i2s0, *i2s1, *crypto, *ac97, *pdma; | ||
81 | struct clk *xor0, *xor1, *ge, *gephy; | ||
69 | 82 | ||
70 | orion_clkdev_init(tclk); | 83 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT, |
84 | dove_tclk); | ||
85 | |||
86 | usb0 = dove_register_gate("usb0", "tclk", CLOCK_GATING_BIT_USB0); | ||
87 | usb1 = dove_register_gate("usb1", "tclk", CLOCK_GATING_BIT_USB1); | ||
88 | sata = dove_register_gate("sata", "tclk", CLOCK_GATING_BIT_SATA); | ||
89 | pex0 = dove_register_gate("pex0", "tclk", CLOCK_GATING_BIT_PCIE0); | ||
90 | pex1 = dove_register_gate("pex1", "tclk", CLOCK_GATING_BIT_PCIE1); | ||
91 | sdio0 = dove_register_gate("sdio0", "tclk", CLOCK_GATING_BIT_SDIO0); | ||
92 | sdio1 = dove_register_gate("sdio1", "tclk", CLOCK_GATING_BIT_SDIO1); | ||
93 | nand = dove_register_gate("nand", "tclk", CLOCK_GATING_BIT_NAND); | ||
94 | camera = dove_register_gate("camera", "tclk", CLOCK_GATING_BIT_CAMERA); | ||
95 | i2s0 = dove_register_gate("i2s0", "tclk", CLOCK_GATING_BIT_I2S0); | ||
96 | i2s1 = dove_register_gate("i2s1", "tclk", CLOCK_GATING_BIT_I2S1); | ||
97 | crypto = dove_register_gate("crypto", "tclk", CLOCK_GATING_BIT_CRYPTO); | ||
98 | ac97 = dove_register_gate("ac97", "tclk", CLOCK_GATING_BIT_AC97); | ||
99 | pdma = dove_register_gate("pdma", "tclk", CLOCK_GATING_BIT_PDMA); | ||
100 | xor0 = dove_register_gate("xor0", "tclk", CLOCK_GATING_BIT_XOR0); | ||
101 | xor1 = dove_register_gate("xor1", "tclk", CLOCK_GATING_BIT_XOR1); | ||
102 | gephy = dove_register_gate("gephy", "tclk", CLOCK_GATING_BIT_GIGA_PHY); | ||
103 | ge = dove_register_gate("ge", "gephy", CLOCK_GATING_BIT_GBE); | ||
104 | |||
105 | orion_clkdev_add(NULL, "orion_spi.0", tclk); | ||
106 | orion_clkdev_add(NULL, "orion_spi.1", tclk); | ||
107 | orion_clkdev_add(NULL, "orion_wdt", tclk); | ||
108 | orion_clkdev_add(NULL, "mv64xxx_i2c.0", tclk); | ||
109 | |||
110 | orion_clkdev_add(NULL, "orion-ehci.0", usb0); | ||
111 | orion_clkdev_add(NULL, "orion-ehci.1", usb1); | ||
112 | orion_clkdev_add(NULL, "mv643xx_eth.0", ge); | ||
113 | orion_clkdev_add("0", "sata_mv.0", sata); | ||
114 | orion_clkdev_add("0", "pcie", pex0); | ||
115 | orion_clkdev_add("1", "pcie", pex1); | ||
116 | orion_clkdev_add(NULL, "sdhci-dove.0", sdio0); | ||
117 | orion_clkdev_add(NULL, "sdhci-dove.1", sdio1); | ||
118 | orion_clkdev_add(NULL, "orion_nand", nand); | ||
119 | orion_clkdev_add(NULL, "cafe1000-ccic.0", camera); | ||
120 | orion_clkdev_add(NULL, "kirkwood-i2s.0", i2s0); | ||
121 | orion_clkdev_add(NULL, "kirkwood-i2s.1", i2s1); | ||
122 | orion_clkdev_add(NULL, "mv_crypto", crypto); | ||
123 | orion_clkdev_add(NULL, "dove-ac97", ac97); | ||
124 | orion_clkdev_add(NULL, "dove-pdma", pdma); | ||
125 | orion_clkdev_add(NULL, "mv_xor_shared.0", xor0); | ||
126 | orion_clkdev_add(NULL, "mv_xor_shared.1", xor1); | ||
71 | } | 127 | } |
72 | 128 | ||
73 | /***************************************************************************** | 129 | /***************************************************************************** |
@@ -178,16 +234,16 @@ void __init dove_init_early(void) | |||
178 | orion_time_set_base(TIMER_VIRT_BASE); | 234 | orion_time_set_base(TIMER_VIRT_BASE); |
179 | } | 235 | } |
180 | 236 | ||
181 | static int get_tclk(void) | 237 | static int __init dove_find_tclk(void) |
182 | { | 238 | { |
183 | /* use DOVE_RESET_SAMPLE_HI/LO to detect tclk */ | ||
184 | return 166666667; | 239 | return 166666667; |
185 | } | 240 | } |
186 | 241 | ||
187 | static void __init dove_timer_init(void) | 242 | static void __init dove_timer_init(void) |
188 | { | 243 | { |
244 | dove_tclk = dove_find_tclk(); | ||
189 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, | 245 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, |
190 | IRQ_DOVE_BRIDGE, get_tclk()); | 246 | IRQ_DOVE_BRIDGE, dove_tclk); |
191 | } | 247 | } |
192 | 248 | ||
193 | struct sys_timer dove_timer = { | 249 | struct sys_timer dove_timer = { |
@@ -195,6 +251,15 @@ struct sys_timer dove_timer = { | |||
195 | }; | 251 | }; |
196 | 252 | ||
197 | /***************************************************************************** | 253 | /***************************************************************************** |
254 | * Cryptographic Engines and Security Accelerator (CESA) | ||
255 | ****************************************************************************/ | ||
256 | void __init dove_crypto_init(void) | ||
257 | { | ||
258 | orion_crypto_init(DOVE_CRYPT_PHYS_BASE, DOVE_CESA_PHYS_BASE, | ||
259 | DOVE_CESA_SIZE, IRQ_DOVE_CRYPTO); | ||
260 | } | ||
261 | |||
262 | /***************************************************************************** | ||
198 | * XOR 0 | 263 | * XOR 0 |
199 | ****************************************************************************/ | 264 | ****************************************************************************/ |
200 | void __init dove_xor0_init(void) | 265 | void __init dove_xor0_init(void) |
@@ -275,8 +340,8 @@ void __init dove_sdio1_init(void) | |||
275 | 340 | ||
276 | void __init dove_init(void) | 341 | void __init dove_init(void) |
277 | { | 342 | { |
278 | printk(KERN_INFO "Dove 88AP510 SoC, "); | 343 | pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n", |
279 | printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000); | 344 | (dove_tclk + 499999) / 1000000); |
280 | 345 | ||
281 | #ifdef CONFIG_CACHE_TAUROS2 | 346 | #ifdef CONFIG_CACHE_TAUROS2 |
282 | tauros2_init(0); | 347 | tauros2_init(0); |
@@ -284,7 +349,7 @@ void __init dove_init(void) | |||
284 | dove_setup_cpu_mbus(); | 349 | dove_setup_cpu_mbus(); |
285 | 350 | ||
286 | /* Setup root of clk tree */ | 351 | /* Setup root of clk tree */ |
287 | clk_init(); | 352 | dove_clk_init(); |
288 | 353 | ||
289 | /* internal devices that every board has */ | 354 | /* internal devices that every board has */ |
290 | dove_rtc_init(); | 355 | dove_rtc_init(); |
@@ -307,3 +372,67 @@ void dove_restart(char mode, const char *cmd) | |||
307 | while (1) | 372 | while (1) |
308 | ; | 373 | ; |
309 | } | 374 | } |
375 | |||
376 | #if defined(CONFIG_MACH_DOVE_DT) | ||
377 | /* | ||
378 | * Auxdata required until real OF clock provider | ||
379 | */ | ||
380 | struct of_dev_auxdata dove_auxdata_lookup[] __initdata = { | ||
381 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), | ||
382 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1014600, "orion_spi.1", NULL), | ||
383 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), | ||
384 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", | ||
385 | NULL), | ||
386 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf10a0000, "sata_mv.0", NULL), | ||
387 | OF_DEV_AUXDATA("marvell,dove-sdhci", 0xf1092000, "sdhci-dove.0", NULL), | ||
388 | OF_DEV_AUXDATA("marvell,dove-sdhci", 0xf1090000, "sdhci-dove.1", NULL), | ||
389 | {}, | ||
390 | }; | ||
391 | |||
392 | static struct mv643xx_eth_platform_data dove_dt_ge00_data = { | ||
393 | .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, | ||
394 | }; | ||
395 | |||
396 | static void __init dove_dt_init(void) | ||
397 | { | ||
398 | pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n", | ||
399 | (dove_tclk + 499999) / 1000000); | ||
400 | |||
401 | #ifdef CONFIG_CACHE_TAUROS2 | ||
402 | tauros2_init(); | ||
403 | #endif | ||
404 | dove_setup_cpu_mbus(); | ||
405 | |||
406 | /* Setup root of clk tree */ | ||
407 | dove_clk_init(); | ||
408 | |||
409 | /* Internal devices not ported to DT yet */ | ||
410 | dove_rtc_init(); | ||
411 | dove_xor0_init(); | ||
412 | dove_xor1_init(); | ||
413 | |||
414 | dove_ge00_init(&dove_dt_ge00_data); | ||
415 | dove_ehci0_init(); | ||
416 | dove_ehci1_init(); | ||
417 | dove_pcie_init(1, 1); | ||
418 | dove_crypto_init(); | ||
419 | |||
420 | of_platform_populate(NULL, of_default_bus_match_table, | ||
421 | dove_auxdata_lookup, NULL); | ||
422 | } | ||
423 | |||
424 | static const char * const dove_dt_board_compat[] = { | ||
425 | "marvell,dove", | ||
426 | NULL | ||
427 | }; | ||
428 | |||
429 | DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") | ||
430 | .map_io = dove_map_io, | ||
431 | .init_early = dove_init_early, | ||
432 | .init_irq = orion_dt_init_irq, | ||
433 | .timer = &dove_timer, | ||
434 | .init_machine = dove_dt_init, | ||
435 | .restart = dove_restart, | ||
436 | .dt_compat = dove_dt_board_compat, | ||
437 | MACHINE_END | ||
438 | #endif | ||
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h index 6432a3ba864b..1a233404b735 100644 --- a/arch/arm/mach-dove/common.h +++ b/arch/arm/mach-dove/common.h | |||
@@ -26,7 +26,11 @@ void dove_init_irq(void); | |||
26 | void dove_setup_cpu_mbus(void); | 26 | void dove_setup_cpu_mbus(void); |
27 | void dove_ge00_init(struct mv643xx_eth_platform_data *eth_data); | 27 | void dove_ge00_init(struct mv643xx_eth_platform_data *eth_data); |
28 | void dove_sata_init(struct mv_sata_platform_data *sata_data); | 28 | void dove_sata_init(struct mv_sata_platform_data *sata_data); |
29 | #ifdef CONFIG_PCI | ||
29 | void dove_pcie_init(int init_port0, int init_port1); | 30 | void dove_pcie_init(int init_port0, int init_port1); |
31 | #else | ||
32 | static inline void dove_pcie_init(int init_port0, int init_port1) { } | ||
33 | #endif | ||
30 | void dove_ehci0_init(void); | 34 | void dove_ehci0_init(void); |
31 | void dove_ehci1_init(void); | 35 | void dove_ehci1_init(void); |
32 | void dove_uart0_init(void); | 36 | void dove_uart0_init(void); |
diff --git a/arch/arm/mach-dove/include/mach/bridge-regs.h b/arch/arm/mach-dove/include/mach/bridge-regs.h index f953bb54aa9d..99f259e8cf33 100644 --- a/arch/arm/mach-dove/include/mach/bridge-regs.h +++ b/arch/arm/mach-dove/include/mach/bridge-regs.h | |||
@@ -13,22 +13,22 @@ | |||
13 | 13 | ||
14 | #include <mach/dove.h> | 14 | #include <mach/dove.h> |
15 | 15 | ||
16 | #define CPU_CONFIG (BRIDGE_VIRT_BASE | 0x0000) | 16 | #define CPU_CONFIG (BRIDGE_VIRT_BASE + 0x0000) |
17 | 17 | ||
18 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) | 18 | #define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) |
19 | #define CPU_CTRL_PCIE0_LINK 0x00000001 | 19 | #define CPU_CTRL_PCIE0_LINK 0x00000001 |
20 | #define CPU_RESET 0x00000002 | 20 | #define CPU_RESET 0x00000002 |
21 | #define CPU_CTRL_PCIE1_LINK 0x00000008 | 21 | #define CPU_CTRL_PCIE1_LINK 0x00000008 |
22 | 22 | ||
23 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | 23 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108) |
24 | #define SOFT_RESET_OUT_EN 0x00000004 | 24 | #define SOFT_RESET_OUT_EN 0x00000004 |
25 | 25 | ||
26 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | 26 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c) |
27 | #define SOFT_RESET 0x00000001 | 27 | #define SOFT_RESET 0x00000001 |
28 | 28 | ||
29 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 29 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
30 | 30 | ||
31 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | 31 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200) |
32 | #define IRQ_CAUSE_LOW_OFF 0x0000 | 32 | #define IRQ_CAUSE_LOW_OFF 0x0000 |
33 | #define IRQ_MASK_LOW_OFF 0x0004 | 33 | #define IRQ_MASK_LOW_OFF 0x0004 |
34 | #define FIQ_MASK_LOW_OFF 0x0008 | 34 | #define FIQ_MASK_LOW_OFF 0x0008 |
@@ -47,9 +47,9 @@ | |||
47 | #define ENDPOINT_MASK_HIGH (IRQ_VIRT_BASE + ENDPOINT_MASK_HIGH_OFF) | 47 | #define ENDPOINT_MASK_HIGH (IRQ_VIRT_BASE + ENDPOINT_MASK_HIGH_OFF) |
48 | #define PCIE_INTERRUPT_MASK (IRQ_VIRT_BASE + PCIE_INTERRUPT_MASK_OFF) | 48 | #define PCIE_INTERRUPT_MASK (IRQ_VIRT_BASE + PCIE_INTERRUPT_MASK_OFF) |
49 | 49 | ||
50 | #define POWER_MANAGEMENT (BRIDGE_VIRT_BASE | 0x011c) | 50 | #define POWER_MANAGEMENT (BRIDGE_VIRT_BASE + 0x011c) |
51 | 51 | ||
52 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | 52 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0300) |
53 | #define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE | 0x0300) | 53 | #define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE + 0x0300) |
54 | 54 | ||
55 | #endif | 55 | #endif |
diff --git a/arch/arm/mach-dove/include/mach/dove.h b/arch/arm/mach-dove/include/mach/dove.h index c91e3004a47b..661725e3115a 100644 --- a/arch/arm/mach-dove/include/mach/dove.h +++ b/arch/arm/mach-dove/include/mach/dove.h | |||
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define DOVE_CESA_PHYS_BASE 0xc8000000 | 27 | #define DOVE_CESA_PHYS_BASE 0xc8000000 |
28 | #define DOVE_CESA_VIRT_BASE 0xfdb00000 | 28 | #define DOVE_CESA_VIRT_BASE IOMEM(0xfdb00000) |
29 | #define DOVE_CESA_SIZE SZ_1M | 29 | #define DOVE_CESA_SIZE SZ_1M |
30 | 30 | ||
31 | #define DOVE_PCIE0_MEM_PHYS_BASE 0xe0000000 | 31 | #define DOVE_PCIE0_MEM_PHYS_BASE 0xe0000000 |
@@ -38,15 +38,15 @@ | |||
38 | #define DOVE_BOOTROM_SIZE SZ_128M | 38 | #define DOVE_BOOTROM_SIZE SZ_128M |
39 | 39 | ||
40 | #define DOVE_SCRATCHPAD_PHYS_BASE 0xf0000000 | 40 | #define DOVE_SCRATCHPAD_PHYS_BASE 0xf0000000 |
41 | #define DOVE_SCRATCHPAD_VIRT_BASE 0xfdd00000 | 41 | #define DOVE_SCRATCHPAD_VIRT_BASE IOMEM(0xfdd00000) |
42 | #define DOVE_SCRATCHPAD_SIZE SZ_1M | 42 | #define DOVE_SCRATCHPAD_SIZE SZ_1M |
43 | 43 | ||
44 | #define DOVE_SB_REGS_PHYS_BASE 0xf1000000 | 44 | #define DOVE_SB_REGS_PHYS_BASE 0xf1000000 |
45 | #define DOVE_SB_REGS_VIRT_BASE 0xfde00000 | 45 | #define DOVE_SB_REGS_VIRT_BASE IOMEM(0xfde00000) |
46 | #define DOVE_SB_REGS_SIZE SZ_8M | 46 | #define DOVE_SB_REGS_SIZE SZ_8M |
47 | 47 | ||
48 | #define DOVE_NB_REGS_PHYS_BASE 0xf1800000 | 48 | #define DOVE_NB_REGS_PHYS_BASE 0xf1800000 |
49 | #define DOVE_NB_REGS_VIRT_BASE 0xfe600000 | 49 | #define DOVE_NB_REGS_VIRT_BASE IOMEM(0xfe600000) |
50 | #define DOVE_NB_REGS_SIZE SZ_8M | 50 | #define DOVE_NB_REGS_SIZE SZ_8M |
51 | 51 | ||
52 | #define DOVE_PCIE0_IO_PHYS_BASE 0xf2000000 | 52 | #define DOVE_PCIE0_IO_PHYS_BASE 0xf2000000 |
@@ -62,75 +62,75 @@ | |||
62 | */ | 62 | */ |
63 | 63 | ||
64 | /* SPI, I2C, UART */ | 64 | /* SPI, I2C, UART */ |
65 | #define DOVE_I2C_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x11000) | 65 | #define DOVE_I2C_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x11000) |
66 | #define DOVE_UART0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12000) | 66 | #define DOVE_UART0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12000) |
67 | #define DOVE_UART0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12000) | 67 | #define DOVE_UART0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12000) |
68 | #define DOVE_UART1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12100) | 68 | #define DOVE_UART1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12100) |
69 | #define DOVE_UART1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12100) | 69 | #define DOVE_UART1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12100) |
70 | #define DOVE_UART2_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12200) | 70 | #define DOVE_UART2_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12200) |
71 | #define DOVE_UART2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12200) | 71 | #define DOVE_UART2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12200) |
72 | #define DOVE_UART3_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x12300) | 72 | #define DOVE_UART3_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x12300) |
73 | #define DOVE_UART3_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x12300) | 73 | #define DOVE_UART3_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x12300) |
74 | #define DOVE_SPI0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x10600) | 74 | #define DOVE_SPI0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x10600) |
75 | #define DOVE_SPI1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x14600) | 75 | #define DOVE_SPI1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x14600) |
76 | 76 | ||
77 | /* North-South Bridge */ | 77 | /* North-South Bridge */ |
78 | #define BRIDGE_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x20000) | 78 | #define BRIDGE_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x20000) |
79 | #define BRIDGE_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x20000) | 79 | #define BRIDGE_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x20000) |
80 | 80 | ||
81 | /* Cryptographic Engine */ | 81 | /* Cryptographic Engine */ |
82 | #define DOVE_CRYPT_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x30000) | 82 | #define DOVE_CRYPT_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x30000) |
83 | 83 | ||
84 | /* PCIe 0 */ | 84 | /* PCIe 0 */ |
85 | #define DOVE_PCIE0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x40000) | 85 | #define DOVE_PCIE0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x40000) |
86 | 86 | ||
87 | /* USB */ | 87 | /* USB */ |
88 | #define DOVE_USB0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x50000) | 88 | #define DOVE_USB0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x50000) |
89 | #define DOVE_USB1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x51000) | 89 | #define DOVE_USB1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x51000) |
90 | 90 | ||
91 | /* XOR 0 Engine */ | 91 | /* XOR 0 Engine */ |
92 | #define DOVE_XOR0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60800) | 92 | #define DOVE_XOR0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60800) |
93 | #define DOVE_XOR0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60800) | 93 | #define DOVE_XOR0_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60800) |
94 | #define DOVE_XOR0_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60A00) | 94 | #define DOVE_XOR0_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60A00) |
95 | #define DOVE_XOR0_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60A00) | 95 | #define DOVE_XOR0_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60A00) |
96 | 96 | ||
97 | /* XOR 1 Engine */ | 97 | /* XOR 1 Engine */ |
98 | #define DOVE_XOR1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60900) | 98 | #define DOVE_XOR1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60900) |
99 | #define DOVE_XOR1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60900) | 99 | #define DOVE_XOR1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60900) |
100 | #define DOVE_XOR1_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x60B00) | 100 | #define DOVE_XOR1_HIGH_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x60B00) |
101 | #define DOVE_XOR1_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x60B00) | 101 | #define DOVE_XOR1_HIGH_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x60B00) |
102 | 102 | ||
103 | /* Gigabit Ethernet */ | 103 | /* Gigabit Ethernet */ |
104 | #define DOVE_GE00_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x70000) | 104 | #define DOVE_GE00_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x70000) |
105 | 105 | ||
106 | /* PCIe 1 */ | 106 | /* PCIe 1 */ |
107 | #define DOVE_PCIE1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0x80000) | 107 | #define DOVE_PCIE1_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0x80000) |
108 | 108 | ||
109 | /* CAFE */ | 109 | /* CAFE */ |
110 | #define DOVE_SDIO0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x92000) | 110 | #define DOVE_SDIO0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x92000) |
111 | #define DOVE_SDIO1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x90000) | 111 | #define DOVE_SDIO1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x90000) |
112 | #define DOVE_CAM_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x94000) | 112 | #define DOVE_CAM_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x94000) |
113 | #define DOVE_CAFE_WIN_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0x98000) | 113 | #define DOVE_CAFE_WIN_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0x98000) |
114 | 114 | ||
115 | /* SATA */ | 115 | /* SATA */ |
116 | #define DOVE_SATA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xa0000) | 116 | #define DOVE_SATA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xa0000) |
117 | 117 | ||
118 | /* I2S/SPDIF */ | 118 | /* I2S/SPDIF */ |
119 | #define DOVE_AUD0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xb0000) | 119 | #define DOVE_AUD0_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xb0000) |
120 | #define DOVE_AUD1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xb4000) | 120 | #define DOVE_AUD1_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xb4000) |
121 | 121 | ||
122 | /* NAND Flash Controller */ | 122 | /* NAND Flash Controller */ |
123 | #define DOVE_NFC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xc0000) | 123 | #define DOVE_NFC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xc0000) |
124 | 124 | ||
125 | /* MPP, GPIO, Reset Sampling */ | 125 | /* MPP, GPIO, Reset Sampling */ |
126 | #define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0200) | 126 | #define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0200) |
127 | #define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10) | 127 | #define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10) |
128 | #define DOVE_RESET_SAMPLE_LO (DOVE_MPP_VIRT_BASE | 0x014) | 128 | #define DOVE_RESET_SAMPLE_LO (DOVE_MPP_VIRT_BASE + 0x014) |
129 | #define DOVE_RESET_SAMPLE_HI (DOVE_MPP_VIRT_BASE | 0x018) | 129 | #define DOVE_RESET_SAMPLE_HI (DOVE_MPP_VIRT_BASE + 0x018) |
130 | #define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0400) | 130 | #define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0400) |
131 | #define DOVE_GPIO_HI_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0420) | 131 | #define DOVE_GPIO_HI_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0420) |
132 | #define DOVE_GPIO2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe8400) | 132 | #define DOVE_GPIO2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe8400) |
133 | #define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe803c) | 133 | #define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe803c) |
134 | #define DOVE_AU1_SPDIFO_GPIO_EN (1 << 1) | 134 | #define DOVE_AU1_SPDIFO_GPIO_EN (1 << 1) |
135 | #define DOVE_NAND_GPIO_EN (1 << 0) | 135 | #define DOVE_NAND_GPIO_EN (1 << 0) |
136 | #define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_LO_VIRT_BASE + 0x40) | 136 | #define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_LO_VIRT_BASE + 0x40) |
@@ -142,44 +142,44 @@ | |||
142 | #define DOVE_SD0_GPIO_SEL (1 << 0) | 142 | #define DOVE_SD0_GPIO_SEL (1 << 0) |
143 | 143 | ||
144 | /* Power Management */ | 144 | /* Power Management */ |
145 | #define DOVE_PMU_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0000) | 145 | #define DOVE_PMU_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0000) |
146 | #define DOVE_PMU_SIG_CTRL (DOVE_PMU_VIRT_BASE + 0x802c) | 146 | #define DOVE_PMU_SIG_CTRL (DOVE_PMU_VIRT_BASE + 0x802c) |
147 | 147 | ||
148 | /* Real Time Clock */ | 148 | /* Real Time Clock */ |
149 | #define DOVE_RTC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xd8500) | 149 | #define DOVE_RTC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xd8500) |
150 | 150 | ||
151 | /* AC97 */ | 151 | /* AC97 */ |
152 | #define DOVE_AC97_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xe0000) | 152 | #define DOVE_AC97_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xe0000) |
153 | #define DOVE_AC97_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe0000) | 153 | #define DOVE_AC97_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe0000) |
154 | 154 | ||
155 | /* Peripheral DMA */ | 155 | /* Peripheral DMA */ |
156 | #define DOVE_PDMA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xe4000) | 156 | #define DOVE_PDMA_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xe4000) |
157 | #define DOVE_PDMA_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe4000) | 157 | #define DOVE_PDMA_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe4000) |
158 | 158 | ||
159 | #define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE | 0xe802C) | 159 | #define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE + 0xe802C) |
160 | #define DOVE_TWSI_ENABLE_OPTION1 (1 << 7) | 160 | #define DOVE_TWSI_ENABLE_OPTION1 (1 << 7) |
161 | #define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE | 0xe8030) | 161 | #define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE + 0xe8030) |
162 | #define DOVE_TWSI_ENABLE_OPTION2 (1 << 20) | 162 | #define DOVE_TWSI_ENABLE_OPTION2 (1 << 20) |
163 | #define DOVE_TWSI_ENABLE_OPTION3 (1 << 21) | 163 | #define DOVE_TWSI_ENABLE_OPTION3 (1 << 21) |
164 | #define DOVE_TWSI_OPTION3_GPIO (1 << 22) | 164 | #define DOVE_TWSI_OPTION3_GPIO (1 << 22) |
165 | #define DOVE_SSP_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xec000) | 165 | #define DOVE_SSP_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE + 0xec000) |
166 | #define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE | 0xe8034) | 166 | #define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE + 0xe8034) |
167 | #define DOVE_SSP_ON_AU1 (1 << 0) | 167 | #define DOVE_SSP_ON_AU1 (1 << 0) |
168 | #define DOVE_SSP_CLOCK_ENABLE (1 << 1) | 168 | #define DOVE_SSP_CLOCK_ENABLE (1 << 1) |
169 | #define DOVE_SSP_BPB_CLOCK_SRC_SSP (1 << 11) | 169 | #define DOVE_SSP_BPB_CLOCK_SRC_SSP (1 << 11) |
170 | /* Memory Controller */ | 170 | /* Memory Controller */ |
171 | #define DOVE_MC_VIRT_BASE (DOVE_NB_REGS_VIRT_BASE | 0x00000) | 171 | #define DOVE_MC_VIRT_BASE (DOVE_NB_REGS_VIRT_BASE + 0x00000) |
172 | 172 | ||
173 | /* LCD Controller */ | 173 | /* LCD Controller */ |
174 | #define DOVE_LCD_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x10000) | 174 | #define DOVE_LCD_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x10000) |
175 | #define DOVE_LCD1_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x20000) | 175 | #define DOVE_LCD1_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x20000) |
176 | #define DOVE_LCD2_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x10000) | 176 | #define DOVE_LCD2_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x10000) |
177 | #define DOVE_LCD_DCON_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x30000) | 177 | #define DOVE_LCD_DCON_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x30000) |
178 | 178 | ||
179 | /* Graphic Engine */ | 179 | /* Graphic Engine */ |
180 | #define DOVE_GPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x40000) | 180 | #define DOVE_GPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x40000) |
181 | 181 | ||
182 | /* Video Engine */ | 182 | /* Video Engine */ |
183 | #define DOVE_VPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE | 0x400000) | 183 | #define DOVE_VPU_PHYS_BASE (DOVE_NB_REGS_PHYS_BASE + 0x400000) |
184 | 184 | ||
185 | #endif | 185 | #endif |
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h index 3ad9f946a9e8..7bcd0dfce4b1 100644 --- a/arch/arm/mach-dove/include/mach/pm.h +++ b/arch/arm/mach-dove/include/mach/pm.h | |||
@@ -13,24 +13,42 @@ | |||
13 | #include <mach/irqs.h> | 13 | #include <mach/irqs.h> |
14 | 14 | ||
15 | #define CLOCK_GATING_CONTROL (DOVE_PMU_VIRT_BASE + 0x38) | 15 | #define CLOCK_GATING_CONTROL (DOVE_PMU_VIRT_BASE + 0x38) |
16 | #define CLOCK_GATING_USB0_MASK (1 << 0) | 16 | #define CLOCK_GATING_BIT_USB0 0 |
17 | #define CLOCK_GATING_USB1_MASK (1 << 1) | 17 | #define CLOCK_GATING_BIT_USB1 1 |
18 | #define CLOCK_GATING_GBE_MASK (1 << 2) | 18 | #define CLOCK_GATING_BIT_GBE 2 |
19 | #define CLOCK_GATING_SATA_MASK (1 << 3) | 19 | #define CLOCK_GATING_BIT_SATA 3 |
20 | #define CLOCK_GATING_PCIE0_MASK (1 << 4) | 20 | #define CLOCK_GATING_BIT_PCIE0 4 |
21 | #define CLOCK_GATING_PCIE1_MASK (1 << 5) | 21 | #define CLOCK_GATING_BIT_PCIE1 5 |
22 | #define CLOCK_GATING_SDIO0_MASK (1 << 8) | 22 | #define CLOCK_GATING_BIT_SDIO0 8 |
23 | #define CLOCK_GATING_SDIO1_MASK (1 << 9) | 23 | #define CLOCK_GATING_BIT_SDIO1 9 |
24 | #define CLOCK_GATING_NAND_MASK (1 << 10) | 24 | #define CLOCK_GATING_BIT_NAND 10 |
25 | #define CLOCK_GATING_CAMERA_MASK (1 << 11) | 25 | #define CLOCK_GATING_BIT_CAMERA 11 |
26 | #define CLOCK_GATING_I2S0_MASK (1 << 12) | 26 | #define CLOCK_GATING_BIT_I2S0 12 |
27 | #define CLOCK_GATING_I2S1_MASK (1 << 13) | 27 | #define CLOCK_GATING_BIT_I2S1 13 |
28 | #define CLOCK_GATING_CRYPTO_MASK (1 << 15) | 28 | #define CLOCK_GATING_BIT_CRYPTO 15 |
29 | #define CLOCK_GATING_AC97_MASK (1 << 21) | 29 | #define CLOCK_GATING_BIT_AC97 21 |
30 | #define CLOCK_GATING_PDMA_MASK (1 << 22) | 30 | #define CLOCK_GATING_BIT_PDMA 22 |
31 | #define CLOCK_GATING_XOR0_MASK (1 << 23) | 31 | #define CLOCK_GATING_BIT_XOR0 23 |
32 | #define CLOCK_GATING_XOR1_MASK (1 << 24) | 32 | #define CLOCK_GATING_BIT_XOR1 24 |
33 | #define CLOCK_GATING_GIGA_PHY_MASK (1 << 30) | 33 | #define CLOCK_GATING_BIT_GIGA_PHY 30 |
34 | #define CLOCK_GATING_USB0_MASK (1 << CLOCK_GATING_BIT_USB0) | ||
35 | #define CLOCK_GATING_USB1_MASK (1 << CLOCK_GATING_BIT_USB1) | ||
36 | #define CLOCK_GATING_GBE_MASK (1 << CLOCK_GATING_BIT_GBE) | ||
37 | #define CLOCK_GATING_SATA_MASK (1 << CLOCK_GATING_BIT_SATA) | ||
38 | #define CLOCK_GATING_PCIE0_MASK (1 << CLOCK_GATING_BIT_PCIE0) | ||
39 | #define CLOCK_GATING_PCIE1_MASK (1 << CLOCK_GATING_BIT_PCIE1) | ||
40 | #define CLOCK_GATING_SDIO0_MASK (1 << CLOCK_GATING_BIT_SDIO0) | ||
41 | #define CLOCK_GATING_SDIO1_MASK (1 << CLOCK_GATING_BIT_SDIO1) | ||
42 | #define CLOCK_GATING_NAND_MASK (1 << CLOCK_GATING_BIT_NAND) | ||
43 | #define CLOCK_GATING_CAMERA_MASK (1 << CLOCK_GATING_BIT_CAMERA) | ||
44 | #define CLOCK_GATING_I2S0_MASK (1 << CLOCK_GATING_BIT_I2S0) | ||
45 | #define CLOCK_GATING_I2S1_MASK (1 << CLOCK_GATING_BIT_I2S1) | ||
46 | #define CLOCK_GATING_CRYPTO_MASK (1 << CLOCK_GATING_BIT_CRYPTO) | ||
47 | #define CLOCK_GATING_AC97_MASK (1 << CLOCK_GATING_BIT_AC97) | ||
48 | #define CLOCK_GATING_PDMA_MASK (1 << CLOCK_GATING_BIT_PDMA) | ||
49 | #define CLOCK_GATING_XOR0_MASK (1 << CLOCK_GATING_BIT_XOR0) | ||
50 | #define CLOCK_GATING_XOR1_MASK (1 << CLOCK_GATING_BIT_XOR1) | ||
51 | #define CLOCK_GATING_GIGA_PHY_MASK (1 << CLOCK_GATING_BIT_GIGA_PHY) | ||
34 | 52 | ||
35 | #define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) | 53 | #define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) |
36 | #define PMU_INTERRUPT_MASK (DOVE_PMU_VIRT_BASE + 0x54) | 54 | #define PMU_INTERRUPT_MASK (DOVE_PMU_VIRT_BASE + 0x54) |
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c index 186357f3b4db..087711524e8a 100644 --- a/arch/arm/mach-dove/irq.c +++ b/arch/arm/mach-dove/irq.c | |||
@@ -100,19 +100,19 @@ void __init dove_init_irq(void) | |||
100 | { | 100 | { |
101 | int i; | 101 | int i; |
102 | 102 | ||
103 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); | 103 | orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); |
104 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); | 104 | orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Initialize gpiolib for GPIOs 0-71. | 107 | * Initialize gpiolib for GPIOs 0-71. |
108 | */ | 108 | */ |
109 | orion_gpio_init(NULL, 0, 32, (void __iomem *)DOVE_GPIO_LO_VIRT_BASE, 0, | 109 | orion_gpio_init(NULL, 0, 32, DOVE_GPIO_LO_VIRT_BASE, 0, |
110 | IRQ_DOVE_GPIO_START, gpio0_irqs); | 110 | IRQ_DOVE_GPIO_START, gpio0_irqs); |
111 | 111 | ||
112 | orion_gpio_init(NULL, 32, 32, (void __iomem *)DOVE_GPIO_HI_VIRT_BASE, 0, | 112 | orion_gpio_init(NULL, 32, 32, DOVE_GPIO_HI_VIRT_BASE, 0, |
113 | IRQ_DOVE_GPIO_START + 32, gpio1_irqs); | 113 | IRQ_DOVE_GPIO_START + 32, gpio1_irqs); |
114 | 114 | ||
115 | orion_gpio_init(NULL, 64, 8, (void __iomem *)DOVE_GPIO2_VIRT_BASE, 0, | 115 | orion_gpio_init(NULL, 64, 8, DOVE_GPIO2_VIRT_BASE, 0, |
116 | IRQ_DOVE_GPIO_START + 64, gpio2_irqs); | 116 | IRQ_DOVE_GPIO_START + 64, gpio2_irqs); |
117 | 117 | ||
118 | /* | 118 | /* |
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index 355332d502cb..bb15b26041cb 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
@@ -182,18 +182,18 @@ static struct hw_pci dove_pci __initdata = { | |||
182 | .map_irq = dove_pcie_map_irq, | 182 | .map_irq = dove_pcie_map_irq, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static void __init add_pcie_port(int index, unsigned long base) | 185 | static void __init add_pcie_port(int index, void __iomem *base) |
186 | { | 186 | { |
187 | printk(KERN_INFO "Dove PCIe port %d: ", index); | 187 | printk(KERN_INFO "Dove PCIe port %d: ", index); |
188 | 188 | ||
189 | if (orion_pcie_link_up((void __iomem *)base)) { | 189 | if (orion_pcie_link_up(base)) { |
190 | struct pcie_port *pp = &pcie_port[num_pcie_ports++]; | 190 | struct pcie_port *pp = &pcie_port[num_pcie_ports++]; |
191 | 191 | ||
192 | printk(KERN_INFO "link up\n"); | 192 | printk(KERN_INFO "link up\n"); |
193 | 193 | ||
194 | pp->index = index; | 194 | pp->index = index; |
195 | pp->root_bus_nr = -1; | 195 | pp->root_bus_nr = -1; |
196 | pp->base = (void __iomem *)base; | 196 | pp->base = base; |
197 | spin_lock_init(&pp->conf_lock); | 197 | spin_lock_init(&pp->conf_lock); |
198 | memset(&pp->res, 0, sizeof(pp->res)); | 198 | memset(&pp->res, 0, sizeof(pp->res)); |
199 | } else { | 199 | } else { |
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index ca5c15a4e626..50bca5032b7e 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -94,6 +94,13 @@ config MACH_TS219_DT | |||
94 | or MV6282. If you have the wrong one, the buttons will not | 94 | or MV6282. If you have the wrong one, the buttons will not |
95 | work. | 95 | work. |
96 | 96 | ||
97 | config MACH_DOCKSTAR_DT | ||
98 | bool "Seagate FreeAgent Dockstar (Flattened Device Tree)" | ||
99 | select ARCH_KIRKWOOD_DT | ||
100 | help | ||
101 | Say 'Y' here if you want your kernel to support the | ||
102 | Seagate FreeAgent Dockstar (Flattened Device Tree). | ||
103 | |||
97 | config MACH_GOFLEXNET_DT | 104 | config MACH_GOFLEXNET_DT |
98 | bool "Seagate GoFlex Net (Flattened Device Tree)" | 105 | bool "Seagate GoFlex Net (Flattened Device Tree)" |
99 | select ARCH_KIRKWOOD_DT | 106 | select ARCH_KIRKWOOD_DT |
@@ -109,6 +116,20 @@ config MACH_LSXL_DT | |||
109 | Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using | 116 | Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using |
110 | Flattened Device Tree. | 117 | Flattened Device Tree. |
111 | 118 | ||
119 | config MACH_IOMEGA_IX2_200_DT | ||
120 | bool "Iomega StorCenter ix2-200 (Flattened Device Tree)" | ||
121 | select ARCH_KIRKWOOD_DT | ||
122 | help | ||
123 | Say 'Y' here if you want your kernel to support the | ||
124 | Iomega StorCenter ix2-200 (Flattened Device Tree). | ||
125 | |||
126 | config MACH_KM_KIRKWOOD_DT | ||
127 | bool "Keymile Kirkwood Reference Design (Flattened Device Tree)" | ||
128 | select ARCH_KIRKWOOD_DT | ||
129 | help | ||
130 | Say 'Y' here if you want your kernel to support the | ||
131 | Keymile Kirkwood Reference Desgin, using Flattened Device Tree. | ||
132 | |||
112 | config MACH_TS219 | 133 | config MACH_TS219 |
113 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | 134 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" |
114 | help | 135 | help |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 055c85a1cc46..294779f892d9 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -26,5 +26,8 @@ obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o | |||
26 | obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o | 26 | obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o |
27 | obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o | 27 | obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o |
28 | obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o | 28 | obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o |
29 | obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o | ||
29 | obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o | 30 | obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o |
30 | obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o | 31 | obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o |
32 | obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o | ||
33 | obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o | ||
diff --git a/arch/arm/mach-kirkwood/addr-map.c b/arch/arm/mach-kirkwood/addr-map.c index e9a7180863d9..8f0d162a1e1d 100644 --- a/arch/arm/mach-kirkwood/addr-map.c +++ b/arch/arm/mach-kirkwood/addr-map.c | |||
@@ -86,5 +86,6 @@ void __init kirkwood_setup_cpu_mbus(void) | |||
86 | /* | 86 | /* |
87 | * Setup MBUS dram target info. | 87 | * Setup MBUS dram target info. |
88 | */ | 88 | */ |
89 | orion_setup_cpu_mbus_target(&addr_map_cfg, DDR_WINDOW_CPU_BASE); | 89 | orion_setup_cpu_mbus_target(&addr_map_cfg, |
90 | (void __iomem *) DDR_WINDOW_CPU_BASE); | ||
90 | } | 91 | } |
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index 4ab35065a144..43d16d6714b8 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c | |||
@@ -14,18 +14,8 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/ata_platform.h> | ||
18 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
19 | #include <linux/of.h> | ||
20 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
21 | #include <linux/input.h> | ||
22 | #include <linux/gpio-fan.h> | ||
23 | #include <linux/leds.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <mach/kirkwood.h> | ||
28 | #include <mach/bridge-regs.h> | ||
29 | #include "common.h" | 19 | #include "common.h" |
30 | #include "mpp.h" | 20 | #include "mpp.h" |
31 | 21 | ||
@@ -67,29 +57,6 @@ static unsigned int dnskw_mpp_config[] __initdata = { | |||
67 | 0 | 57 | 0 |
68 | }; | 58 | }; |
69 | 59 | ||
70 | /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ | ||
71 | static struct gpio_fan_speed dnskw_fan_speed[] = { | ||
72 | { 0, 0 }, | ||
73 | { 3000, 1 }, | ||
74 | { 6000, 2 }, | ||
75 | }; | ||
76 | static unsigned dnskw_fan_pins[] = {46, 45}; | ||
77 | |||
78 | static struct gpio_fan_platform_data dnskw_fan_data = { | ||
79 | .num_ctrl = ARRAY_SIZE(dnskw_fan_pins), | ||
80 | .ctrl = dnskw_fan_pins, | ||
81 | .num_speed = ARRAY_SIZE(dnskw_fan_speed), | ||
82 | .speed = dnskw_fan_speed, | ||
83 | }; | ||
84 | |||
85 | static struct platform_device dnskw_fan_device = { | ||
86 | .name = "gpio-fan", | ||
87 | .id = -1, | ||
88 | .dev = { | ||
89 | .platform_data = &dnskw_fan_data, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | static void dnskw_power_off(void) | 60 | static void dnskw_power_off(void) |
94 | { | 61 | { |
95 | gpio_set_value(36, 1); | 62 | gpio_set_value(36, 1); |
@@ -114,8 +81,6 @@ void __init dnskw_init(void) | |||
114 | kirkwood_ehci_init(); | 81 | kirkwood_ehci_init(); |
115 | kirkwood_ge00_init(&dnskw_ge00_data); | 82 | kirkwood_ge00_init(&dnskw_ge00_data); |
116 | 83 | ||
117 | platform_device_register(&dnskw_fan_device); | ||
118 | |||
119 | /* Register power-off GPIO. */ | 84 | /* Register power-off GPIO. */ |
120 | if (gpio_request(36, "dnskw:power:off") == 0 | 85 | if (gpio_request(36, "dnskw:power:off") == 0 |
121 | && gpio_direction_output(36, 0) == 0) | 86 | && gpio_direction_output(36, 0) == 0) |
diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c new file mode 100644 index 000000000000..f2fbb023e679 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-dockstar.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-dockstar.c | ||
3 | * | ||
4 | * Seagate FreeAgent Dockstar Board Init for drivers not converted to | ||
5 | * flattened device tree yet. | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | * | ||
11 | * Copied and modified for Seagate GoFlex Net support by | ||
12 | * Joshua Coombs <josh.coombs@gmail.com> based on ArchLinux ARM's | ||
13 | * GoFlex kernel patches. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/ata_platform.h> | ||
21 | #include <linux/mv643xx_eth.h> | ||
22 | #include <linux/of.h> | ||
23 | #include <linux/of_address.h> | ||
24 | #include <linux/of_fdt.h> | ||
25 | #include <linux/of_irq.h> | ||
26 | #include <linux/of_platform.h> | ||
27 | #include <linux/gpio.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | #include <mach/kirkwood.h> | ||
32 | #include <mach/bridge-regs.h> | ||
33 | #include <linux/platform_data/mmc-mvsdio.h> | ||
34 | #include "common.h" | ||
35 | #include "mpp.h" | ||
36 | |||
37 | static struct mv643xx_eth_platform_data dockstar_ge00_data = { | ||
38 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
39 | }; | ||
40 | |||
41 | static unsigned int dockstar_mpp_config[] __initdata = { | ||
42 | MPP29_GPIO, /* USB Power Enable */ | ||
43 | MPP46_GPIO, /* LED green */ | ||
44 | MPP47_GPIO, /* LED orange */ | ||
45 | 0 | ||
46 | }; | ||
47 | |||
48 | void __init dockstar_dt_init(void) | ||
49 | { | ||
50 | /* | ||
51 | * Basic setup. Needs to be called early. | ||
52 | */ | ||
53 | kirkwood_mpp_conf(dockstar_mpp_config); | ||
54 | |||
55 | if (gpio_request(29, "USB Power Enable") != 0 || | ||
56 | gpio_direction_output(29, 1) != 0) | ||
57 | pr_err("can't setup GPIO 29 (USB Power Enable)\n"); | ||
58 | kirkwood_ehci_init(); | ||
59 | |||
60 | kirkwood_ge00_init(&dockstar_ge00_data); | ||
61 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index e4eb450de301..70c5a2882409 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -33,6 +33,7 @@ struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = { | |||
33 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), | 33 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), |
34 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), | 34 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), |
35 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), | 35 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), |
36 | OF_DEV_AUXDATA("marvell,orion-crypto", 0xf1030000, "mv_crypto", NULL), | ||
36 | {}, | 37 | {}, |
37 | }; | 38 | }; |
38 | 39 | ||
@@ -60,7 +61,6 @@ static void __init kirkwood_dt_init(void) | |||
60 | /* internal devices that every board has */ | 61 | /* internal devices that every board has */ |
61 | kirkwood_xor0_init(); | 62 | kirkwood_xor0_init(); |
62 | kirkwood_xor1_init(); | 63 | kirkwood_xor1_init(); |
63 | kirkwood_crypto_init(); | ||
64 | 64 | ||
65 | #ifdef CONFIG_KEXEC | 65 | #ifdef CONFIG_KEXEC |
66 | kexec_reinit = kirkwood_enable_pcie; | 66 | kexec_reinit = kirkwood_enable_pcie; |
@@ -81,12 +81,21 @@ static void __init kirkwood_dt_init(void) | |||
81 | if (of_machine_is_compatible("qnap,ts219")) | 81 | if (of_machine_is_compatible("qnap,ts219")) |
82 | qnap_dt_ts219_init(); | 82 | qnap_dt_ts219_init(); |
83 | 83 | ||
84 | if (of_machine_is_compatible("seagate,dockstar")) | ||
85 | dockstar_dt_init(); | ||
86 | |||
84 | if (of_machine_is_compatible("seagate,goflexnet")) | 87 | if (of_machine_is_compatible("seagate,goflexnet")) |
85 | goflexnet_init(); | 88 | goflexnet_init(); |
86 | 89 | ||
87 | if (of_machine_is_compatible("buffalo,lsxl")) | 90 | if (of_machine_is_compatible("buffalo,lsxl")) |
88 | lsxl_init(); | 91 | lsxl_init(); |
89 | 92 | ||
93 | if (of_machine_is_compatible("iom,ix2-200")) | ||
94 | iomega_ix2_200_init(); | ||
95 | |||
96 | if (of_machine_is_compatible("keymile,km_kirkwood")) | ||
97 | km_kirkwood_init(); | ||
98 | |||
90 | of_platform_populate(NULL, kirkwood_dt_match_table, | 99 | of_platform_populate(NULL, kirkwood_dt_match_table, |
91 | kirkwood_auxdata_lookup, NULL); | 100 | kirkwood_auxdata_lookup, NULL); |
92 | } | 101 | } |
@@ -98,8 +107,11 @@ static const char *kirkwood_dt_board_compat[] = { | |||
98 | "iom,iconnect", | 107 | "iom,iconnect", |
99 | "raidsonic,ib-nas62x0", | 108 | "raidsonic,ib-nas62x0", |
100 | "qnap,ts219", | 109 | "qnap,ts219", |
110 | "seagate,dockstar", | ||
101 | "seagate,goflexnet", | 111 | "seagate,goflexnet", |
102 | "buffalo,lsxl", | 112 | "buffalo,lsxl", |
113 | "iom,ix2-200", | ||
114 | "keymile,km_kirkwood", | ||
103 | NULL | 115 | NULL |
104 | }; | 116 | }; |
105 | 117 | ||
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c index d7a9198ed300..d084b1e2943a 100644 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ b/arch/arm/mach-kirkwood/board-iconnect.c | |||
@@ -16,11 +16,8 @@ | |||
16 | #include <linux/of_fdt.h> | 16 | #include <linux/of_fdt.h> |
17 | #include <linux/of_irq.h> | 17 | #include <linux/of_irq.h> |
18 | #include <linux/of_platform.h> | 18 | #include <linux/of_platform.h> |
19 | #include <linux/mtd/partitions.h> | ||
20 | #include <linux/mv643xx_eth.h> | 19 | #include <linux/mv643xx_eth.h> |
21 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
22 | #include <linux/input.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
25 | #include <mach/kirkwood.h> | 22 | #include <mach/kirkwood.h> |
26 | #include "common.h" | 23 | #include "common.h" |
@@ -44,57 +41,12 @@ static unsigned int iconnect_mpp_config[] __initdata = { | |||
44 | 0 | 41 | 0 |
45 | }; | 42 | }; |
46 | 43 | ||
47 | static struct mtd_partition iconnect_nand_parts[] = { | ||
48 | { | ||
49 | .name = "flash", | ||
50 | .offset = 0, | ||
51 | .size = MTDPART_SIZ_FULL, | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | /* yikes... theses are the original input buttons */ | ||
56 | /* but I'm not convinced by the sw event choices */ | ||
57 | static struct gpio_keys_button iconnect_buttons[] = { | ||
58 | { | ||
59 | .type = EV_SW, | ||
60 | .code = SW_LID, | ||
61 | .gpio = 12, | ||
62 | .desc = "Reset Button", | ||
63 | .active_low = 1, | ||
64 | .debounce_interval = 100, | ||
65 | }, { | ||
66 | .type = EV_SW, | ||
67 | .code = SW_TABLET_MODE, | ||
68 | .gpio = 35, | ||
69 | .desc = "OTB Button", | ||
70 | .active_low = 1, | ||
71 | .debounce_interval = 100, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | static struct gpio_keys_platform_data iconnect_button_data = { | ||
76 | .buttons = iconnect_buttons, | ||
77 | .nbuttons = ARRAY_SIZE(iconnect_buttons), | ||
78 | }; | ||
79 | |||
80 | static struct platform_device iconnect_button_device = { | ||
81 | .name = "gpio-keys", | ||
82 | .id = -1, | ||
83 | .num_resources = 0, | ||
84 | .dev = { | ||
85 | .platform_data = &iconnect_button_data, | ||
86 | }, | ||
87 | }; | ||
88 | |||
89 | void __init iconnect_init(void) | 44 | void __init iconnect_init(void) |
90 | { | 45 | { |
91 | kirkwood_mpp_conf(iconnect_mpp_config); | 46 | kirkwood_mpp_conf(iconnect_mpp_config); |
92 | kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25); | ||
93 | 47 | ||
94 | kirkwood_ehci_init(); | 48 | kirkwood_ehci_init(); |
95 | kirkwood_ge00_init(&iconnect_ge00_data); | 49 | kirkwood_ge00_init(&iconnect_ge00_data); |
96 | |||
97 | platform_device_register(&iconnect_button_device); | ||
98 | } | 50 | } |
99 | 51 | ||
100 | static int __init iconnect_pci_init(void) | 52 | static int __init iconnect_pci_init(void) |
diff --git a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c new file mode 100644 index 000000000000..158fb97d0397 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/board-iomega_ix2_200.c | ||
3 | * | ||
4 | * Iomega StorCenter ix2-200 | ||
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 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include <linux/ethtool.h> | ||
16 | #include <mach/kirkwood.h> | ||
17 | #include "common.h" | ||
18 | #include "mpp.h" | ||
19 | |||
20 | static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { | ||
21 | .phy_addr = MV643XX_ETH_PHY_NONE, | ||
22 | .speed = SPEED_1000, | ||
23 | .duplex = DUPLEX_FULL, | ||
24 | }; | ||
25 | |||
26 | static unsigned int iomega_ix2_200_mpp_config[] __initdata = { | ||
27 | MPP12_GPIO, /* Reset Button */ | ||
28 | MPP14_GPIO, /* Power Button */ | ||
29 | MPP15_GPIO, /* Backup LED (blue) */ | ||
30 | MPP16_GPIO, /* Power LED (white) */ | ||
31 | MPP35_GPIO, /* OTB Button */ | ||
32 | MPP36_GPIO, /* Rebuild LED (white) */ | ||
33 | MPP37_GPIO, /* Health LED (red) */ | ||
34 | MPP38_GPIO, /* SATA LED brightness control 1 */ | ||
35 | MPP39_GPIO, /* SATA LED brightness control 2 */ | ||
36 | MPP40_GPIO, /* Backup LED brightness control 1 */ | ||
37 | MPP41_GPIO, /* Backup LED brightness control 2 */ | ||
38 | MPP42_GPIO, /* Power LED brightness control 1 */ | ||
39 | MPP43_GPIO, /* Power LED brightness control 2 */ | ||
40 | MPP44_GPIO, /* Health LED brightness control 1 */ | ||
41 | MPP45_GPIO, /* Health LED brightness control 2 */ | ||
42 | MPP46_GPIO, /* Rebuild LED brightness control 1 */ | ||
43 | MPP47_GPIO, /* Rebuild LED brightness control 2 */ | ||
44 | 0 | ||
45 | }; | ||
46 | |||
47 | void __init iomega_ix2_200_init(void) | ||
48 | { | ||
49 | /* | ||
50 | * Basic setup. Needs to be called early. | ||
51 | */ | ||
52 | kirkwood_mpp_conf(iomega_ix2_200_mpp_config); | ||
53 | |||
54 | kirkwood_ehci_init(); | ||
55 | |||
56 | kirkwood_ge01_init(&iomega_ix2_200_ge00_data); | ||
57 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c new file mode 100644 index 000000000000..f7d32834b757 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-km_kirkwood.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Copyright 2012 2012 KEYMILE AG, CH-3097 Bern | ||
3 | * Valentin Longchamp <valentin.longchamp@keymile.com> | ||
4 | * | ||
5 | * arch/arm/mach-kirkwood/board-km_kirkwood.c | ||
6 | * | ||
7 | * Keymile km_kirkwood Reference Desing Init for drivers not converted to | ||
8 | * flattened device tree yet. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/clk-private.h> | ||
20 | #include "common.h" | ||
21 | #include "mpp.h" | ||
22 | |||
23 | static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { | ||
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
25 | }; | ||
26 | |||
27 | static unsigned int km_kirkwood_mpp_config[] __initdata = { | ||
28 | MPP8_GPIO, /* I2C SDA */ | ||
29 | MPP9_GPIO, /* I2C SCL */ | ||
30 | 0 | ||
31 | }; | ||
32 | |||
33 | void __init km_kirkwood_init(void) | ||
34 | { | ||
35 | struct clk *sata_clk; | ||
36 | /* | ||
37 | * Basic setup. Needs to be called early. | ||
38 | */ | ||
39 | kirkwood_mpp_conf(km_kirkwood_mpp_config); | ||
40 | |||
41 | /* | ||
42 | * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing | ||
43 | * SATA bits (14-15) of the Clock Gating Control Register. Since these | ||
44 | * devices are also not present in this variant, their clocks get | ||
45 | * disabled because unused when clk_disable_unused() gets called. | ||
46 | * That's why we change the flags to these clocks to CLK_IGNORE_UNUSED | ||
47 | */ | ||
48 | sata_clk = clk_get_sys("sata_mv.0", "0"); | ||
49 | if (!IS_ERR(sata_clk)) | ||
50 | sata_clk->flags |= CLK_IGNORE_UNUSED; | ||
51 | sata_clk = clk_get_sys("sata_mv.0", "1"); | ||
52 | if (!IS_ERR(sata_clk)) | ||
53 | sata_clk->flags |= CLK_IGNORE_UNUSED; | ||
54 | |||
55 | kirkwood_ehci_init(); | ||
56 | kirkwood_ge00_init(&km_kirkwood_ge00_data); | ||
57 | } | ||
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 5c38c94b79a2..3991077f58a2 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -42,7 +42,7 @@ | |||
42 | ****************************************************************************/ | 42 | ****************************************************************************/ |
43 | static struct map_desc kirkwood_io_desc[] __initdata = { | 43 | static struct map_desc kirkwood_io_desc[] __initdata = { |
44 | { | 44 | { |
45 | .virtual = KIRKWOOD_REGS_VIRT_BASE, | 45 | .virtual = (unsigned long) KIRKWOOD_REGS_VIRT_BASE, |
46 | .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE), | 46 | .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE), |
47 | .length = KIRKWOOD_REGS_SIZE, | 47 | .length = KIRKWOOD_REGS_SIZE, |
48 | .type = MT_DEVICE, | 48 | .type = MT_DEVICE, |
@@ -205,8 +205,7 @@ static struct clk *tclk; | |||
205 | 205 | ||
206 | static struct clk __init *kirkwood_register_gate(const char *name, u8 bit_idx) | 206 | static struct clk __init *kirkwood_register_gate(const char *name, u8 bit_idx) |
207 | { | 207 | { |
208 | return clk_register_gate(NULL, name, "tclk", 0, | 208 | return clk_register_gate(NULL, name, "tclk", 0, CLOCK_GATING_CTRL, |
209 | (void __iomem *)CLOCK_GATING_CTRL, | ||
210 | bit_idx, 0, &gating_lock); | 209 | bit_idx, 0, &gating_lock); |
211 | } | 210 | } |
212 | 211 | ||
@@ -215,8 +214,7 @@ static struct clk __init *kirkwood_register_gate_fn(const char *name, | |||
215 | void (*fn_en)(void), | 214 | void (*fn_en)(void), |
216 | void (*fn_dis)(void)) | 215 | void (*fn_dis)(void)) |
217 | { | 216 | { |
218 | return clk_register_gate_fn(NULL, name, "tclk", 0, | 217 | return clk_register_gate_fn(NULL, name, "tclk", 0, CLOCK_GATING_CTRL, |
219 | (void __iomem *)CLOCK_GATING_CTRL, | ||
220 | bit_idx, 0, &gating_lock, fn_en, fn_dis); | 218 | bit_idx, 0, &gating_lock, fn_en, fn_dis); |
221 | } | 219 | } |
222 | 220 | ||
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 304dd1abfdca..bcffd7ca1ca2 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -82,6 +82,12 @@ void ib62x0_init(void); | |||
82 | static inline void ib62x0_init(void) {}; | 82 | static inline void ib62x0_init(void) {}; |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | #ifdef CONFIG_MACH_DOCKSTAR_DT | ||
86 | void dockstar_dt_init(void); | ||
87 | #else | ||
88 | static inline void dockstar_dt_init(void) {}; | ||
89 | #endif | ||
90 | |||
85 | #ifdef CONFIG_MACH_GOFLEXNET_DT | 91 | #ifdef CONFIG_MACH_GOFLEXNET_DT |
86 | void goflexnet_init(void); | 92 | void goflexnet_init(void); |
87 | #else | 93 | #else |
@@ -94,6 +100,18 @@ void lsxl_init(void); | |||
94 | static inline void lsxl_init(void) {}; | 100 | static inline void lsxl_init(void) {}; |
95 | #endif | 101 | #endif |
96 | 102 | ||
103 | #ifdef CONFIG_MACH_IOMEGA_IX2_200_DT | ||
104 | void iomega_ix2_200_init(void); | ||
105 | #else | ||
106 | static inline void iomega_ix2_200_init(void) {}; | ||
107 | #endif | ||
108 | |||
109 | #ifdef CONFIG_MACH_KM_KIRKWOOD_DT | ||
110 | void km_kirkwood_init(void); | ||
111 | #else | ||
112 | static inline void km_kirkwood_init(void) {}; | ||
113 | #endif | ||
114 | |||
97 | /* early init functions not converted to fdt yet */ | 115 | /* early init functions not converted to fdt yet */ |
98 | char *kirkwood_id(void); | 116 | char *kirkwood_id(void); |
99 | void kirkwood_l2_init(void); | 117 | void kirkwood_l2_init(void); |
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h index a115142f8690..5c82b7dce4e2 100644 --- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h | |||
@@ -13,37 +13,37 @@ | |||
13 | 13 | ||
14 | #include <mach/kirkwood.h> | 14 | #include <mach/kirkwood.h> |
15 | 15 | ||
16 | #define CPU_CONFIG (BRIDGE_VIRT_BASE | 0x0100) | 16 | #define CPU_CONFIG (BRIDGE_VIRT_BASE + 0x0100) |
17 | #define CPU_CONFIG_ERROR_PROP 0x00000004 | 17 | #define CPU_CONFIG_ERROR_PROP 0x00000004 |
18 | 18 | ||
19 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) | 19 | #define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) |
20 | #define CPU_RESET 0x00000002 | 20 | #define CPU_RESET 0x00000002 |
21 | 21 | ||
22 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | 22 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108) |
23 | #define WDT_RESET_OUT_EN 0x00000002 | 23 | #define WDT_RESET_OUT_EN 0x00000002 |
24 | #define SOFT_RESET_OUT_EN 0x00000004 | 24 | #define SOFT_RESET_OUT_EN 0x00000004 |
25 | 25 | ||
26 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | 26 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c) |
27 | #define SOFT_RESET 0x00000001 | 27 | #define SOFT_RESET 0x00000001 |
28 | 28 | ||
29 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | 29 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110) |
30 | #define WDT_INT_REQ 0x0008 | 30 | #define WDT_INT_REQ 0x0008 |
31 | 31 | ||
32 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 32 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
33 | 33 | ||
34 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | 34 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200) |
35 | #define IRQ_CAUSE_LOW_OFF 0x0000 | 35 | #define IRQ_CAUSE_LOW_OFF 0x0000 |
36 | #define IRQ_MASK_LOW_OFF 0x0004 | 36 | #define IRQ_MASK_LOW_OFF 0x0004 |
37 | #define IRQ_CAUSE_HIGH_OFF 0x0010 | 37 | #define IRQ_CAUSE_HIGH_OFF 0x0010 |
38 | #define IRQ_MASK_HIGH_OFF 0x0014 | 38 | #define IRQ_MASK_HIGH_OFF 0x0014 |
39 | 39 | ||
40 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | 40 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0300) |
41 | #define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE | 0x0300) | 41 | #define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE + 0x0300) |
42 | 42 | ||
43 | #define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128) | 43 | #define L2_CONFIG_REG (BRIDGE_VIRT_BASE + 0x0128) |
44 | #define L2_WRITETHROUGH 0x00000010 | 44 | #define L2_WRITETHROUGH 0x00000010 |
45 | 45 | ||
46 | #define CLOCK_GATING_CTRL (BRIDGE_VIRT_BASE | 0x11c) | 46 | #define CLOCK_GATING_CTRL (BRIDGE_VIRT_BASE + 0x11c) |
47 | #define CGC_BIT_GE0 (0) | 47 | #define CGC_BIT_GE0 (0) |
48 | #define CGC_BIT_PEX0 (2) | 48 | #define CGC_BIT_PEX0 (2) |
49 | #define CGC_BIT_USB0 (3) | 49 | #define CGC_BIT_USB0 (3) |
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h index af4f0000dcef..041653a04a9c 100644 --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h | |||
@@ -45,7 +45,7 @@ | |||
45 | #define KIRKWOOD_PCIE_IO_SIZE SZ_64K | 45 | #define KIRKWOOD_PCIE_IO_SIZE SZ_64K |
46 | 46 | ||
47 | #define KIRKWOOD_REGS_PHYS_BASE 0xf1000000 | 47 | #define KIRKWOOD_REGS_PHYS_BASE 0xf1000000 |
48 | #define KIRKWOOD_REGS_VIRT_BASE 0xfed00000 | 48 | #define KIRKWOOD_REGS_VIRT_BASE IOMEM(0xfed00000) |
49 | #define KIRKWOOD_REGS_SIZE SZ_1M | 49 | #define KIRKWOOD_REGS_SIZE SZ_1M |
50 | 50 | ||
51 | #define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000 | 51 | #define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000 |
@@ -59,61 +59,61 @@ | |||
59 | /* | 59 | /* |
60 | * Register Map | 60 | * Register Map |
61 | */ | 61 | */ |
62 | #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000) | 62 | #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x00000) |
63 | #define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500) | 63 | #define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE + 0x1500) |
64 | #define DDR_OPERATION_BASE (DDR_VIRT_BASE | 0x1418) | 64 | #define DDR_OPERATION_BASE (DDR_VIRT_BASE + 0x1418) |
65 | 65 | ||
66 | #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000) | 66 | #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x10000) |
67 | #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000) | 67 | #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x10000) |
68 | #define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030) | 68 | #define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE + 0x0030) |
69 | #define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034) | 69 | #define DEVICE_ID (DEV_BUS_VIRT_BASE + 0x0034) |
70 | #define GPIO_LOW_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x0100) | 70 | #define GPIO_LOW_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x0100) |
71 | #define GPIO_HIGH_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x0140) | 71 | #define GPIO_HIGH_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x0140) |
72 | #define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300) | 72 | #define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x0300) |
73 | #define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600) | 73 | #define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x0600) |
74 | #define I2C_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x1000) | 74 | #define I2C_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x1000) |
75 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000) | 75 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2000) |
76 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000) | 76 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2000) |
77 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100) | 77 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2100) |
78 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100) | 78 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2100) |
79 | 79 | ||
80 | #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000) | 80 | #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x20000) |
81 | #define BRIDGE_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x20000) | 81 | #define BRIDGE_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x20000) |
82 | 82 | ||
83 | #define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x30000) | 83 | #define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x30000) |
84 | 84 | ||
85 | #define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000) | 85 | #define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x40000) |
86 | #define PCIE_LINK_CTRL (PCIE_VIRT_BASE | 0x70) | 86 | #define PCIE_LINK_CTRL (PCIE_VIRT_BASE + 0x70) |
87 | #define PCIE_STATUS (PCIE_VIRT_BASE | 0x1a04) | 87 | #define PCIE_STATUS (PCIE_VIRT_BASE + 0x1a04) |
88 | #define PCIE1_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x44000) | 88 | #define PCIE1_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x44000) |
89 | #define PCIE1_LINK_CTRL (PCIE1_VIRT_BASE | 0x70) | 89 | #define PCIE1_LINK_CTRL (PCIE1_VIRT_BASE + 0x70) |
90 | #define PCIE1_STATUS (PCIE1_VIRT_BASE | 0x1a04) | 90 | #define PCIE1_STATUS (PCIE1_VIRT_BASE + 0x1a04) |
91 | 91 | ||
92 | #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000) | 92 | #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x50000) |
93 | 93 | ||
94 | #define XOR0_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60800) | 94 | #define XOR0_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60800) |
95 | #define XOR0_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60800) | 95 | #define XOR0_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60800) |
96 | #define XOR1_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60900) | 96 | #define XOR1_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60900) |
97 | #define XOR1_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60900) | 97 | #define XOR1_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60900) |
98 | #define XOR0_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60A00) | 98 | #define XOR0_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60A00) |
99 | #define XOR0_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60A00) | 99 | #define XOR0_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60A00) |
100 | #define XOR1_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x60B00) | 100 | #define XOR1_HIGH_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x60B00) |
101 | #define XOR1_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x60B00) | 101 | #define XOR1_HIGH_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x60B00) |
102 | 102 | ||
103 | #define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000) | 103 | #define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x70000) |
104 | #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000) | 104 | #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x74000) |
105 | 105 | ||
106 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) | 106 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x80000) |
107 | #define SATA_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x80000) | 107 | #define SATA_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x80000) |
108 | #define SATA0_IF_CTRL (SATA_VIRT_BASE | 0x2050) | 108 | #define SATA0_IF_CTRL (SATA_VIRT_BASE + 0x2050) |
109 | #define SATA0_PHY_MODE_2 (SATA_VIRT_BASE | 0x2330) | 109 | #define SATA0_PHY_MODE_2 (SATA_VIRT_BASE + 0x2330) |
110 | #define SATA1_IF_CTRL (SATA_VIRT_BASE | 0x4050) | 110 | #define SATA1_IF_CTRL (SATA_VIRT_BASE + 0x4050) |
111 | #define SATA1_PHY_MODE_2 (SATA_VIRT_BASE | 0x4330) | 111 | #define SATA1_PHY_MODE_2 (SATA_VIRT_BASE + 0x4330) |
112 | 112 | ||
113 | #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000) | 113 | #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x90000) |
114 | 114 | ||
115 | #define AUDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0xA0000) | 115 | #define AUDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0xA0000) |
116 | #define AUDIO_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0xA0000) | 116 | #define AUDIO_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0xA0000) |
117 | 117 | ||
118 | /* | 118 | /* |
119 | * Supported devices and revisions. | 119 | * Supported devices and revisions. |
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c index 20149a7fd280..884703535a0a 100644 --- a/arch/arm/mach-kirkwood/irq.c +++ b/arch/arm/mach-kirkwood/irq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/gpio.h> | 10 | #include <linux/gpio.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
13 | #include <linux/io.h> | ||
13 | #include <mach/bridge-regs.h> | 14 | #include <mach/bridge-regs.h> |
14 | #include <plat/orion-gpio.h> | 15 | #include <plat/orion-gpio.h> |
15 | #include <plat/irq.h> | 16 | #include <plat/irq.h> |
@@ -30,14 +31,14 @@ static int __initdata gpio1_irqs[4] = { | |||
30 | 31 | ||
31 | void __init kirkwood_init_irq(void) | 32 | void __init kirkwood_init_irq(void) |
32 | { | 33 | { |
33 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); | 34 | orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); |
34 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); | 35 | orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); |
35 | 36 | ||
36 | /* | 37 | /* |
37 | * Initialize gpiolib for GPIOs 0-49. | 38 | * Initialize gpiolib for GPIOs 0-49. |
38 | */ | 39 | */ |
39 | orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_LOW_VIRT_BASE, 0, | 40 | orion_gpio_init(NULL, 0, 32, GPIO_LOW_VIRT_BASE, 0, |
40 | IRQ_KIRKWOOD_GPIO_START, gpio0_irqs); | 41 | IRQ_KIRKWOOD_GPIO_START, gpio0_irqs); |
41 | orion_gpio_init(NULL, 32, 18, (void __iomem *)GPIO_HIGH_VIRT_BASE, 0, | 42 | orion_gpio_init(NULL, 32, 18, GPIO_HIGH_VIRT_BASE, 0, |
42 | IRQ_KIRKWOOD_GPIO_START + 32, gpio1_irqs); | 43 | IRQ_KIRKWOOD_GPIO_START + 32, gpio1_irqs); |
43 | } | 44 | } |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index 532d8acb38f9..ec544918b12c 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -47,8 +47,8 @@ void kirkwood_enable_pcie(void) | |||
47 | void kirkwood_pcie_id(u32 *dev, u32 *rev) | 47 | void kirkwood_pcie_id(u32 *dev, u32 *rev) |
48 | { | 48 | { |
49 | kirkwood_enable_pcie(); | 49 | kirkwood_enable_pcie(); |
50 | *dev = orion_pcie_dev_id((void __iomem *)PCIE_VIRT_BASE); | 50 | *dev = orion_pcie_dev_id(PCIE_VIRT_BASE); |
51 | *rev = orion_pcie_rev((void __iomem *)PCIE_VIRT_BASE); | 51 | *rev = orion_pcie_rev(PCIE_VIRT_BASE); |
52 | } | 52 | } |
53 | 53 | ||
54 | struct pcie_port { | 54 | struct pcie_port { |
@@ -133,7 +133,7 @@ static struct pci_ops pcie_ops = { | |||
133 | 133 | ||
134 | static void __init pcie0_ioresources_init(struct pcie_port *pp) | 134 | static void __init pcie0_ioresources_init(struct pcie_port *pp) |
135 | { | 135 | { |
136 | pp->base = (void __iomem *)PCIE_VIRT_BASE; | 136 | pp->base = PCIE_VIRT_BASE; |
137 | pp->irq = IRQ_KIRKWOOD_PCIE; | 137 | pp->irq = IRQ_KIRKWOOD_PCIE; |
138 | 138 | ||
139 | /* | 139 | /* |
@@ -147,7 +147,7 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp) | |||
147 | 147 | ||
148 | static void __init pcie1_ioresources_init(struct pcie_port *pp) | 148 | static void __init pcie1_ioresources_init(struct pcie_port *pp) |
149 | { | 149 | { |
150 | pp->base = (void __iomem *)PCIE1_VIRT_BASE; | 150 | pp->base = PCIE1_VIRT_BASE; |
151 | pp->irq = IRQ_KIRKWOOD_PCIE1; | 151 | pp->irq = IRQ_KIRKWOOD_PCIE1; |
152 | 152 | ||
153 | /* | 153 | /* |
@@ -255,11 +255,11 @@ static struct hw_pci kirkwood_pci __initdata = { | |||
255 | .map_irq = kirkwood_pcie_map_irq, | 255 | .map_irq = kirkwood_pcie_map_irq, |
256 | }; | 256 | }; |
257 | 257 | ||
258 | static void __init add_pcie_port(int index, unsigned long base) | 258 | static void __init add_pcie_port(int index, void __iomem *base) |
259 | { | 259 | { |
260 | printk(KERN_INFO "Kirkwood PCIe port %d: ", index); | 260 | printk(KERN_INFO "Kirkwood PCIe port %d: ", index); |
261 | 261 | ||
262 | if (orion_pcie_link_up((void __iomem *)base)) { | 262 | if (orion_pcie_link_up(base)) { |
263 | printk(KERN_INFO "link up\n"); | 263 | printk(KERN_INFO "link up\n"); |
264 | pcie_port_map[num_pcie_ports++] = index; | 264 | pcie_port_map[num_pcie_ports++] = index; |
265 | } else | 265 | } else |
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c index 5bbca2680442..367a9400f532 100644 --- a/arch/arm/mach-kirkwood/ts41x-setup.c +++ b/arch/arm/mach-kirkwood/ts41x-setup.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/gpio_keys.h> | 21 | #include <linux/gpio_keys.h> |
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/io.h> | ||
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
25 | #include <mach/kirkwood.h> | 26 | #include <mach/kirkwood.h> |
@@ -161,7 +162,7 @@ static int __init ts41x_pci_init(void) | |||
161 | * (Marvell 88sx7042/sata_mv) is known to stop working | 162 | * (Marvell 88sx7042/sata_mv) is known to stop working |
162 | * after a few minutes. | 163 | * after a few minutes. |
163 | */ | 164 | */ |
164 | orion_pcie_reset((void __iomem *)PCIE_VIRT_BASE); | 165 | orion_pcie_reset(PCIE_VIRT_BASE); |
165 | 166 | ||
166 | kirkwood_pcie_id(&dev, &rev); | 167 | kirkwood_pcie_id(&dev, &rev); |
167 | if (dev == MV88F6282_DEV_ID) | 168 | if (dev == MV88F6282_DEV_ID) |
diff --git a/arch/arm/mach-mv78xx0/addr-map.c b/arch/arm/mach-mv78xx0/addr-map.c index 137e479d15a0..343c435b4176 100644 --- a/arch/arm/mach-mv78xx0/addr-map.c +++ b/arch/arm/mach-mv78xx0/addr-map.c | |||
@@ -48,7 +48,7 @@ static void __init __iomem *win_cfg_base(const struct orion_addr_map_cfg *cfg, i | |||
48 | * so we don't need to take that into account here. | 48 | * so we don't need to take that into account here. |
49 | */ | 49 | */ |
50 | 50 | ||
51 | return (void __iomem *)((win < 8) ? WIN0_OFF(win) : WIN8_OFF(win)); | 51 | return (win < 8) ? WIN0_OFF(win) : WIN8_OFF(win); |
52 | } | 52 | } |
53 | 53 | ||
54 | /* | 54 | /* |
@@ -72,10 +72,10 @@ void __init mv78xx0_setup_cpu_mbus(void) | |||
72 | */ | 72 | */ |
73 | if (mv78xx0_core_index() == 0) | 73 | if (mv78xx0_core_index() == 0) |
74 | orion_setup_cpu_mbus_target(&addr_map_cfg, | 74 | orion_setup_cpu_mbus_target(&addr_map_cfg, |
75 | DDR_WINDOW_CPU0_BASE); | 75 | (void __iomem *) DDR_WINDOW_CPU0_BASE); |
76 | else | 76 | else |
77 | orion_setup_cpu_mbus_target(&addr_map_cfg, | 77 | orion_setup_cpu_mbus_target(&addr_map_cfg, |
78 | DDR_WINDOW_CPU1_BASE); | 78 | (void __iomem *) DDR_WINDOW_CPU1_BASE); |
79 | } | 79 | } |
80 | 80 | ||
81 | void __init mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size, | 81 | void __init mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size, |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index a6f3cd21e8c2..131cd4883f3d 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -130,12 +130,12 @@ static int get_tclk(void) | |||
130 | ****************************************************************************/ | 130 | ****************************************************************************/ |
131 | static struct map_desc mv78xx0_io_desc[] __initdata = { | 131 | static struct map_desc mv78xx0_io_desc[] __initdata = { |
132 | { | 132 | { |
133 | .virtual = MV78XX0_CORE_REGS_VIRT_BASE, | 133 | .virtual = (unsigned long) MV78XX0_CORE_REGS_VIRT_BASE, |
134 | .pfn = 0, | 134 | .pfn = 0, |
135 | .length = MV78XX0_CORE_REGS_SIZE, | 135 | .length = MV78XX0_CORE_REGS_SIZE, |
136 | .type = MT_DEVICE, | 136 | .type = MT_DEVICE, |
137 | }, { | 137 | }, { |
138 | .virtual = MV78XX0_REGS_VIRT_BASE, | 138 | .virtual = (unsigned long) MV78XX0_REGS_VIRT_BASE, |
139 | .pfn = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE), | 139 | .pfn = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE), |
140 | .length = MV78XX0_REGS_SIZE, | 140 | .length = MV78XX0_REGS_SIZE, |
141 | .type = MT_DEVICE, | 141 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h b/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h index eb187e0e059b..5f03484584d4 100644 --- a/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h +++ b/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h | |||
@@ -11,18 +11,18 @@ | |||
11 | 11 | ||
12 | #include <mach/mv78xx0.h> | 12 | #include <mach/mv78xx0.h> |
13 | 13 | ||
14 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) | 14 | #define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) |
15 | #define L2_WRITETHROUGH 0x00020000 | 15 | #define L2_WRITETHROUGH 0x00020000 |
16 | 16 | ||
17 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | 17 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108) |
18 | #define SOFT_RESET_OUT_EN 0x00000004 | 18 | #define SOFT_RESET_OUT_EN 0x00000004 |
19 | 19 | ||
20 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | 20 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c) |
21 | #define SOFT_RESET 0x00000001 | 21 | #define SOFT_RESET 0x00000001 |
22 | 22 | ||
23 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 23 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
24 | 24 | ||
25 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | 25 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200) |
26 | #define IRQ_CAUSE_ERR_OFF 0x0000 | 26 | #define IRQ_CAUSE_ERR_OFF 0x0000 |
27 | #define IRQ_CAUSE_LOW_OFF 0x0004 | 27 | #define IRQ_CAUSE_LOW_OFF 0x0004 |
28 | #define IRQ_CAUSE_HIGH_OFF 0x0008 | 28 | #define IRQ_CAUSE_HIGH_OFF 0x0008 |
@@ -30,7 +30,7 @@ | |||
30 | #define IRQ_MASK_LOW_OFF 0x0010 | 30 | #define IRQ_MASK_LOW_OFF 0x0010 |
31 | #define IRQ_MASK_HIGH_OFF 0x0014 | 31 | #define IRQ_MASK_HIGH_OFF 0x0014 |
32 | 32 | ||
33 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | 33 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0300) |
34 | #define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE | 0x0300) | 34 | #define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE + 0x0300) |
35 | 35 | ||
36 | #endif | 36 | #endif |
diff --git a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h index bd03fed1128e..46200a183cf2 100644 --- a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h +++ b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h | |||
@@ -41,7 +41,7 @@ | |||
41 | */ | 41 | */ |
42 | #define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000 | 42 | #define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000 |
43 | #define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000 | 43 | #define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000 |
44 | #define MV78XX0_CORE_REGS_VIRT_BASE 0xfe400000 | 44 | #define MV78XX0_CORE_REGS_VIRT_BASE IOMEM(0xfe400000) |
45 | #define MV78XX0_CORE_REGS_PHYS_BASE 0xfe400000 | 45 | #define MV78XX0_CORE_REGS_PHYS_BASE 0xfe400000 |
46 | #define MV78XX0_CORE_REGS_SIZE SZ_16K | 46 | #define MV78XX0_CORE_REGS_SIZE SZ_16K |
47 | 47 | ||
@@ -49,7 +49,7 @@ | |||
49 | #define MV78XX0_PCIE_IO_SIZE SZ_1M | 49 | #define MV78XX0_PCIE_IO_SIZE SZ_1M |
50 | 50 | ||
51 | #define MV78XX0_REGS_PHYS_BASE 0xf1000000 | 51 | #define MV78XX0_REGS_PHYS_BASE 0xf1000000 |
52 | #define MV78XX0_REGS_VIRT_BASE 0xfd000000 | 52 | #define MV78XX0_REGS_VIRT_BASE IOMEM(0xfd000000) |
53 | #define MV78XX0_REGS_SIZE SZ_1M | 53 | #define MV78XX0_REGS_SIZE SZ_1M |
54 | 54 | ||
55 | #define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000 | 55 | #define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000 |
@@ -64,47 +64,47 @@ | |||
64 | /* | 64 | /* |
65 | * Register Map | 65 | * Register Map |
66 | */ | 66 | */ |
67 | #define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x00000) | 67 | #define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x00000) |
68 | #define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE | 0x1500) | 68 | #define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE + 0x1500) |
69 | #define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE | 0x1570) | 69 | #define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE + 0x1570) |
70 | 70 | ||
71 | #define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x10000) | 71 | #define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x10000) |
72 | #define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000) | 72 | #define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x10000) |
73 | #define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030) | 73 | #define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE + 0x0030) |
74 | #define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034) | 74 | #define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE + 0x0034) |
75 | #define GPIO_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x0100) | 75 | #define GPIO_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x0100) |
76 | #define I2C_0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x1000) | 76 | #define I2C_0_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x1000) |
77 | #define I2C_1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x1100) | 77 | #define I2C_1_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x1100) |
78 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000) | 78 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2000) |
79 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000) | 79 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2000) |
80 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100) | 80 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2100) |
81 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100) | 81 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2100) |
82 | #define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2200) | 82 | #define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2200) |
83 | #define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2200) | 83 | #define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2200) |
84 | #define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2300) | 84 | #define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE + 0x2300) |
85 | #define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2300) | 85 | #define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE + 0x2300) |
86 | 86 | ||
87 | #define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x30000) | 87 | #define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x30000) |
88 | #define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x34000) | 88 | #define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x34000) |
89 | 89 | ||
90 | #define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x40000) | 90 | #define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x40000) |
91 | #define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x44000) | 91 | #define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x44000) |
92 | #define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x48000) | 92 | #define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x48000) |
93 | #define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x4c000) | 93 | #define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x4c000) |
94 | 94 | ||
95 | #define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x50000) | 95 | #define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x50000) |
96 | #define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x51000) | 96 | #define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x51000) |
97 | #define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x52000) | 97 | #define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x52000) |
98 | 98 | ||
99 | #define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x70000) | 99 | #define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x70000) |
100 | #define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x74000) | 100 | #define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0x74000) |
101 | 101 | ||
102 | #define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x80000) | 102 | #define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x80000) |
103 | #define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x84000) | 103 | #define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x84000) |
104 | #define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x88000) | 104 | #define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x88000) |
105 | #define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x8c000) | 105 | #define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE + 0x8c000) |
106 | 106 | ||
107 | #define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000) | 107 | #define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE + 0xa0000) |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * Supported devices and revisions. | 110 | * Supported devices and revisions. |
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c index 4d720f2aedba..32073444024b 100644 --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/gpio.h> | 10 | #include <linux/gpio.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
13 | #include <linux/io.h> | ||
13 | #include <mach/bridge-regs.h> | 14 | #include <mach/bridge-regs.h> |
14 | #include <plat/orion-gpio.h> | 15 | #include <plat/orion-gpio.h> |
15 | #include <plat/irq.h> | 16 | #include <plat/irq.h> |
@@ -24,16 +25,16 @@ static int __initdata gpio0_irqs[4] = { | |||
24 | 25 | ||
25 | void __init mv78xx0_init_irq(void) | 26 | void __init mv78xx0_init_irq(void) |
26 | { | 27 | { |
27 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); | 28 | orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); |
28 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); | 29 | orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); |
29 | orion_irq_init(64, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF)); | 30 | orion_irq_init(64, IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF); |
30 | 31 | ||
31 | /* | 32 | /* |
32 | * Initialize gpiolib for GPIOs 0-31. (The GPIO interrupt mask | 33 | * Initialize gpiolib for GPIOs 0-31. (The GPIO interrupt mask |
33 | * registers for core #1 are at an offset of 0x18 from those of | 34 | * registers for core #1 are at an offset of 0x18 from those of |
34 | * core #0.) | 35 | * core #0.) |
35 | */ | 36 | */ |
36 | orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_VIRT_BASE, | 37 | orion_gpio_init(NULL, 0, 32, GPIO_VIRT_BASE, |
37 | mv78xx0_core_index() ? 0x18 : 0, | 38 | mv78xx0_core_index() ? 0x18 : 0, |
38 | IRQ_MV78XX0_GPIO_START, gpio0_irqs); | 39 | IRQ_MV78XX0_GPIO_START, gpio0_irqs); |
39 | } | 40 | } |
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 26a059b4f472..a9a154a646dd 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
@@ -34,8 +34,8 @@ static struct resource pcie_io_space; | |||
34 | 34 | ||
35 | void __init mv78xx0_pcie_id(u32 *dev, u32 *rev) | 35 | void __init mv78xx0_pcie_id(u32 *dev, u32 *rev) |
36 | { | 36 | { |
37 | *dev = orion_pcie_dev_id((void __iomem *)PCIE00_VIRT_BASE); | 37 | *dev = orion_pcie_dev_id(PCIE00_VIRT_BASE); |
38 | *rev = orion_pcie_rev((void __iomem *)PCIE00_VIRT_BASE); | 38 | *rev = orion_pcie_rev(PCIE00_VIRT_BASE); |
39 | } | 39 | } |
40 | 40 | ||
41 | u32 pcie_port_size[8] = { | 41 | u32 pcie_port_size[8] = { |
@@ -223,11 +223,11 @@ static struct hw_pci mv78xx0_pci __initdata = { | |||
223 | .map_irq = mv78xx0_pcie_map_irq, | 223 | .map_irq = mv78xx0_pcie_map_irq, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static void __init add_pcie_port(int maj, int min, unsigned long base) | 226 | static void __init add_pcie_port(int maj, int min, void __iomem *base) |
227 | { | 227 | { |
228 | printk(KERN_INFO "MV78xx0 PCIe port %d.%d: ", maj, min); | 228 | printk(KERN_INFO "MV78xx0 PCIe port %d.%d: ", maj, min); |
229 | 229 | ||
230 | if (orion_pcie_link_up((void __iomem *)base)) { | 230 | if (orion_pcie_link_up(base)) { |
231 | struct pcie_port *pp = &pcie_port[num_pcie_ports++]; | 231 | struct pcie_port *pp = &pcie_port[num_pcie_ports++]; |
232 | 232 | ||
233 | printk("link up\n"); | 233 | printk("link up\n"); |
@@ -235,7 +235,7 @@ static void __init add_pcie_port(int maj, int min, unsigned long base) | |||
235 | pp->maj = maj; | 235 | pp->maj = maj; |
236 | pp->min = min; | 236 | pp->min = min; |
237 | pp->root_bus_nr = -1; | 237 | pp->root_bus_nr = -1; |
238 | pp->base = (void __iomem *)base; | 238 | pp->base = base; |
239 | spin_lock_init(&pp->conf_lock); | 239 | spin_lock_init(&pp->conf_lock); |
240 | memset(&pp->res, 0, sizeof(pp->res)); | 240 | memset(&pp->res, 0, sizeof(pp->res)); |
241 | } else { | 241 | } else { |
@@ -249,7 +249,7 @@ void __init mv78xx0_pcie_init(int init_port0, int init_port1) | |||
249 | 249 | ||
250 | if (init_port0) { | 250 | if (init_port0) { |
251 | add_pcie_port(0, 0, PCIE00_VIRT_BASE); | 251 | add_pcie_port(0, 0, PCIE00_VIRT_BASE); |
252 | if (!orion_pcie_x4_mode((void __iomem *)PCIE00_VIRT_BASE)) { | 252 | if (!orion_pcie_x4_mode(PCIE00_VIRT_BASE)) { |
253 | add_pcie_port(0, 1, PCIE01_VIRT_BASE); | 253 | add_pcie_port(0, 1, PCIE01_VIRT_BASE); |
254 | add_pcie_port(0, 2, PCIE02_VIRT_BASE); | 254 | add_pcie_port(0, 2, PCIE02_VIRT_BASE); |
255 | add_pcie_port(0, 3, PCIE03_VIRT_BASE); | 255 | add_pcie_port(0, 3, PCIE03_VIRT_BASE); |
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 7b270358536e..416d46ef7ebd 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig | |||
@@ -6,6 +6,8 @@ config ARCH_MVEBU | |||
6 | select GENERIC_IRQ_CHIP | 6 | select GENERIC_IRQ_CHIP |
7 | select IRQ_DOMAIN | 7 | select IRQ_DOMAIN |
8 | select MULTI_IRQ_HANDLER | 8 | select MULTI_IRQ_HANDLER |
9 | select PINCTRL | ||
10 | select PLAT_ORION | ||
9 | select SPARSE_IRQ | 11 | select SPARSE_IRQ |
10 | 12 | ||
11 | if ARCH_MVEBU | 13 | if ARCH_MVEBU |
@@ -13,13 +15,25 @@ if ARCH_MVEBU | |||
13 | menu "Marvell SOC with device tree" | 15 | menu "Marvell SOC with device tree" |
14 | 16 | ||
15 | config MACH_ARMADA_370_XP | 17 | config MACH_ARMADA_370_XP |
16 | bool "Marvell Armada 370 and Aramada XP boards" | 18 | bool |
17 | select ARMADA_370_XP_TIMER | 19 | select ARMADA_370_XP_TIMER |
18 | select CPU_V7 | 20 | select CPU_V7 |
21 | |||
22 | config MACH_ARMADA_370 | ||
23 | bool "Marvell Armada 370 boards" | ||
24 | select MACH_ARMADA_370_XP | ||
25 | select PINCTRL_ARMADA_370 | ||
19 | help | 26 | help |
27 | Say 'Y' here if you want your kernel to support boards based | ||
28 | on the Marvell Armada 370 SoC with device tree. | ||
20 | 29 | ||
21 | Say 'Y' here if you want your kernel to support boards based on | 30 | config MACH_ARMADA_XP |
22 | Marvell Armada 370 or Armada XP with device tree. | 31 | bool "Marvell Armada XP boards" |
32 | select MACH_ARMADA_370_XP | ||
33 | select PINCTRL_ARMADA_XP | ||
34 | help | ||
35 | Say 'Y' here if you want your kernel to support boards based | ||
36 | on the Marvell Armada XP SoC with device tree. | ||
23 | 37 | ||
24 | endmenu | 38 | endmenu |
25 | 39 | ||
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 6ea8998ab8f1..57f996b6aa0e 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | ccflags-$(ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include | 1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ |
2 | -I$(srctree)/arch/arm/plat-orion/include | ||
2 | 3 | ||
3 | obj-y += system-controller.o | 4 | obj-y += system-controller.o |
4 | obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o | 5 | obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o |
diff --git a/arch/arm/mach-mvebu/addr-map.c b/arch/arm/mach-mvebu/addr-map.c new file mode 100644 index 000000000000..fe454a4430be --- /dev/null +++ b/arch/arm/mach-mvebu/addr-map.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * Address map functions for Marvell 370 / XP SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@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/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mbus.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/of.h> | ||
18 | #include <linux/of_address.h> | ||
19 | #include <plat/addr-map.h> | ||
20 | |||
21 | /* | ||
22 | * Generic Address Decode Windows bit settings | ||
23 | */ | ||
24 | #define ARMADA_XP_TARGET_DEV_BUS 1 | ||
25 | #define ARMADA_XP_ATTR_DEV_BOOTROM 0x1D | ||
26 | #define ARMADA_XP_TARGET_ETH1 3 | ||
27 | #define ARMADA_XP_TARGET_PCIE_0_2 4 | ||
28 | #define ARMADA_XP_TARGET_ETH0 7 | ||
29 | #define ARMADA_XP_TARGET_PCIE_1_3 8 | ||
30 | |||
31 | #define ARMADA_370_TARGET_DEV_BUS 1 | ||
32 | #define ARMADA_370_ATTR_DEV_BOOTROM 0x1D | ||
33 | #define ARMADA_370_TARGET_PCIE_0 4 | ||
34 | #define ARMADA_370_TARGET_PCIE_1 8 | ||
35 | |||
36 | #define ARMADA_WINDOW_8_PLUS_OFFSET 0x90 | ||
37 | #define ARMADA_SDRAM_ADDR_DECODING_OFFSET 0x180 | ||
38 | |||
39 | static const struct __initdata orion_addr_map_info | ||
40 | armada_xp_addr_map_info[] = { | ||
41 | /* | ||
42 | * Window for the BootROM, needed for SMP on Armada XP | ||
43 | */ | ||
44 | { 0, 0xfff00000, SZ_1M, ARMADA_XP_TARGET_DEV_BUS, | ||
45 | ARMADA_XP_ATTR_DEV_BOOTROM, -1 }, | ||
46 | /* End marker */ | ||
47 | { -1, 0, 0, 0, 0, 0 }, | ||
48 | }; | ||
49 | |||
50 | static const struct __initdata orion_addr_map_info | ||
51 | armada_370_addr_map_info[] = { | ||
52 | /* End marker */ | ||
53 | { -1, 0, 0, 0, 0, 0 }, | ||
54 | }; | ||
55 | |||
56 | static struct of_device_id of_addr_decoding_controller_table[] = { | ||
57 | { .compatible = "marvell,armada-addr-decoding-controller" }, | ||
58 | { /* end of list */ }, | ||
59 | }; | ||
60 | |||
61 | static void __iomem * | ||
62 | armada_cfg_base(const struct orion_addr_map_cfg *cfg, int win) | ||
63 | { | ||
64 | unsigned int offset; | ||
65 | |||
66 | /* The register layout is a bit annoying and the below code | ||
67 | * tries to cope with it. | ||
68 | * - At offset 0x0, there are the registers for the first 8 | ||
69 | * windows, with 4 registers of 32 bits per window (ctrl, | ||
70 | * base, remap low, remap high) | ||
71 | * - Then at offset 0x80, there is a hole of 0x10 bytes for | ||
72 | * the internal registers base address and internal units | ||
73 | * sync barrier register. | ||
74 | * - Then at offset 0x90, there the registers for 12 | ||
75 | * windows, with only 2 registers of 32 bits per window | ||
76 | * (ctrl, base). | ||
77 | */ | ||
78 | if (win < 8) | ||
79 | offset = (win << 4); | ||
80 | else | ||
81 | offset = ARMADA_WINDOW_8_PLUS_OFFSET + (win << 3); | ||
82 | |||
83 | return cfg->bridge_virt_base + offset; | ||
84 | } | ||
85 | |||
86 | static struct __initdata orion_addr_map_cfg addr_map_cfg = { | ||
87 | .num_wins = 20, | ||
88 | .remappable_wins = 8, | ||
89 | .win_cfg_base = armada_cfg_base, | ||
90 | }; | ||
91 | |||
92 | static int __init armada_setup_cpu_mbus(void) | ||
93 | { | ||
94 | struct device_node *np; | ||
95 | void __iomem *mbus_unit_addr_decoding_base; | ||
96 | void __iomem *sdram_addr_decoding_base; | ||
97 | |||
98 | np = of_find_matching_node(NULL, of_addr_decoding_controller_table); | ||
99 | if (!np) | ||
100 | return -ENODEV; | ||
101 | |||
102 | mbus_unit_addr_decoding_base = of_iomap(np, 0); | ||
103 | BUG_ON(!mbus_unit_addr_decoding_base); | ||
104 | |||
105 | sdram_addr_decoding_base = | ||
106 | mbus_unit_addr_decoding_base + | ||
107 | ARMADA_SDRAM_ADDR_DECODING_OFFSET; | ||
108 | |||
109 | addr_map_cfg.bridge_virt_base = mbus_unit_addr_decoding_base; | ||
110 | |||
111 | /* | ||
112 | * Disable, clear and configure windows. | ||
113 | */ | ||
114 | if (of_machine_is_compatible("marvell,armadaxp")) | ||
115 | orion_config_wins(&addr_map_cfg, armada_xp_addr_map_info); | ||
116 | else if (of_machine_is_compatible("marvell,armada370")) | ||
117 | orion_config_wins(&addr_map_cfg, armada_370_addr_map_info); | ||
118 | else { | ||
119 | pr_err("Unsupported SoC\n"); | ||
120 | return -EINVAL; | ||
121 | } | ||
122 | |||
123 | /* | ||
124 | * Setup MBUS dram target info. | ||
125 | */ | ||
126 | orion_setup_cpu_mbus_target(&addr_map_cfg, | ||
127 | sdram_addr_decoding_base); | ||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | /* Using a early_initcall is needed so that this initialization gets | ||
132 | * done before the SMP initialization, which requires the BootROM to | ||
133 | * be remapped. */ | ||
134 | early_initcall(armada_setup_cpu_mbus); | ||
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index b46418a8b352..49d791548ad6 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | static struct map_desc armada_370_xp_io_desc[] __initdata = { | 26 | static struct map_desc armada_370_xp_io_desc[] __initdata = { |
27 | { | 27 | { |
28 | .virtual = ARMADA_370_XP_REGS_VIRT_BASE, | 28 | .virtual = (unsigned long) ARMADA_370_XP_REGS_VIRT_BASE, |
29 | .pfn = __phys_to_pfn(ARMADA_370_XP_REGS_PHYS_BASE), | 29 | .pfn = __phys_to_pfn(ARMADA_370_XP_REGS_PHYS_BASE), |
30 | .length = ARMADA_370_XP_REGS_SIZE, | 30 | .length = ARMADA_370_XP_REGS_SIZE, |
31 | .type = MT_DEVICE, | 31 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h index 25f0ca8d7820..aac9bebc6b03 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.h +++ b/arch/arm/mach-mvebu/armada-370-xp.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define __MACH_ARMADA_370_XP_H | 16 | #define __MACH_ARMADA_370_XP_H |
17 | 17 | ||
18 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 | 18 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 |
19 | #define ARMADA_370_XP_REGS_VIRT_BASE 0xfeb00000 | 19 | #define ARMADA_370_XP_REGS_VIRT_BASE IOMEM(0xfeb00000) |
20 | #define ARMADA_370_XP_REGS_SIZE SZ_1M | 20 | #define ARMADA_370_XP_REGS_SIZE SZ_1M |
21 | 21 | ||
22 | #endif /* __MACH_ARMADA_370_XP_H */ | 22 | #endif /* __MACH_ARMADA_370_XP_H */ |
diff --git a/arch/arm/mach-mvebu/include/mach/gpio.h b/arch/arm/mach-mvebu/include/mach/gpio.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/arch/arm/mach-mvebu/include/mach/gpio.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 0cc54dd553e3..726c02c9c0cd 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -357,6 +357,33 @@ static inline void omap_init_uwire(void) {} | |||
357 | #endif | 357 | #endif |
358 | 358 | ||
359 | 359 | ||
360 | #define OMAP1_RNG_BASE 0xfffe5000 | ||
361 | |||
362 | static struct resource omap1_rng_resources[] = { | ||
363 | { | ||
364 | .start = OMAP1_RNG_BASE, | ||
365 | .end = OMAP1_RNG_BASE + 0x4f, | ||
366 | .flags = IORESOURCE_MEM, | ||
367 | }, | ||
368 | }; | ||
369 | |||
370 | static struct platform_device omap1_rng_device = { | ||
371 | .name = "omap_rng", | ||
372 | .id = -1, | ||
373 | .num_resources = ARRAY_SIZE(omap1_rng_resources), | ||
374 | .resource = omap1_rng_resources, | ||
375 | }; | ||
376 | |||
377 | static void omap1_init_rng(void) | ||
378 | { | ||
379 | if (!cpu_is_omap16xx()) | ||
380 | return; | ||
381 | |||
382 | (void) platform_device_register(&omap1_rng_device); | ||
383 | } | ||
384 | |||
385 | /*-------------------------------------------------------------------------*/ | ||
386 | |||
360 | /* | 387 | /* |
361 | * This gets called after board-specific INIT_MACHINE, and initializes most | 388 | * This gets called after board-specific INIT_MACHINE, and initializes most |
362 | * on-chip peripherals accessible on this board (except for few like USB): | 389 | * on-chip peripherals accessible on this board (except for few like USB): |
@@ -395,6 +422,7 @@ static int __init omap1_init_devices(void) | |||
395 | omap_init_spi100k(); | 422 | omap_init_spi100k(); |
396 | omap_init_sti(); | 423 | omap_init_sti(); |
397 | omap_init_uwire(); | 424 | omap_init_uwire(); |
425 | omap1_init_rng(); | ||
398 | 426 | ||
399 | return 0; | 427 | return 0; |
400 | } | 428 | } |
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c index aa81593db1af..cdeb9d3ef640 100644 --- a/arch/arm/mach-omap1/timer.c +++ b/arch/arm/mach-omap1/timer.c | |||
@@ -141,7 +141,7 @@ static int __init omap1_dm_timer_init(void) | |||
141 | 141 | ||
142 | pdata->set_timer_src = omap1_dm_timer_set_src; | 142 | pdata->set_timer_src = omap1_dm_timer_set_src; |
143 | pdata->timer_capability = OMAP_TIMER_ALWON | | 143 | pdata->timer_capability = OMAP_TIMER_ALWON | |
144 | OMAP_TIMER_NEEDS_RESET; | 144 | OMAP_TIMER_NEEDS_RESET | OMAP_TIMER_HAS_DSP_IRQ; |
145 | 145 | ||
146 | ret = platform_device_add_data(pdev, pdata, sizeof(*pdata)); | 146 | ret = platform_device_add_data(pdev, pdata, sizeof(*pdata)); |
147 | if (ret) { | 147 | if (ret) { |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 7d6abda3b74e..fe40d9e488c9 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -179,6 +179,7 @@ obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o | |||
179 | 179 | ||
180 | # EMU peripherals | 180 | # EMU peripherals |
181 | obj-$(CONFIG_OMAP3_EMU) += emu.o | 181 | obj-$(CONFIG_OMAP3_EMU) += emu.o |
182 | obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o | ||
182 | 183 | ||
183 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o | 184 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o |
184 | mailbox_mach-objs := mailbox.o | 185 | mailbox_mach-objs := mailbox.o |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 3e2d76f05af4..cea3abace815 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -202,7 +202,7 @@ static inline void __init apollon_init_smc91x(void) | |||
202 | return; | 202 | return; |
203 | } | 203 | } |
204 | 204 | ||
205 | clk_enable(gpmc_fck); | 205 | clk_prepare_enable(gpmc_fck); |
206 | rate = clk_get_rate(gpmc_fck); | 206 | rate = clk_get_rate(gpmc_fck); |
207 | 207 | ||
208 | eth_cs = APOLLON_ETH_CS; | 208 | eth_cs = APOLLON_ETH_CS; |
@@ -246,7 +246,7 @@ static inline void __init apollon_init_smc91x(void) | |||
246 | gpmc_cs_free(APOLLON_ETH_CS); | 246 | gpmc_cs_free(APOLLON_ETH_CS); |
247 | } | 247 | } |
248 | out: | 248 | out: |
249 | clk_disable(gpmc_fck); | 249 | clk_disable_unprepare(gpmc_fck); |
250 | clk_put(gpmc_fck); | 250 | clk_put(gpmc_fck); |
251 | } | 251 | } |
252 | 252 | ||
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index f6c48dd764fe..8d04bf851af4 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -265,9 +265,9 @@ static inline void __init h4_init_debug(void) | |||
265 | return; | 265 | return; |
266 | } | 266 | } |
267 | 267 | ||
268 | clk_enable(gpmc_fck); | 268 | clk_prepare_enable(gpmc_fck); |
269 | rate = clk_get_rate(gpmc_fck); | 269 | rate = clk_get_rate(gpmc_fck); |
270 | clk_disable(gpmc_fck); | 270 | clk_disable_unprepare(gpmc_fck); |
271 | clk_put(gpmc_fck); | 271 | clk_put(gpmc_fck); |
272 | 272 | ||
273 | if (is_gpmc_muxed()) | 273 | if (is_gpmc_muxed()) |
@@ -311,7 +311,7 @@ static inline void __init h4_init_debug(void) | |||
311 | gpmc_cs_free(eth_cs); | 311 | gpmc_cs_free(eth_cs); |
312 | 312 | ||
313 | out: | 313 | out: |
314 | clk_disable(gpmc_fck); | 314 | clk_disable_unprepare(gpmc_fck); |
315 | clk_put(gpmc_fck); | 315 | clk_put(gpmc_fck); |
316 | } | 316 | } |
317 | 317 | ||
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index e0dd70b9d917..2b012f9d6925 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -171,7 +171,7 @@ static void __init omap4_ehci_init(void) | |||
171 | return; | 171 | return; |
172 | } | 172 | } |
173 | clk_set_rate(phy_ref_clk, 19200000); | 173 | clk_set_rate(phy_ref_clk, 19200000); |
174 | clk_enable(phy_ref_clk); | 174 | clk_prepare_enable(phy_ref_clk); |
175 | 175 | ||
176 | /* disable the power to the usb hub prior to init and reset phy+hub */ | 176 | /* disable the power to the usb hub prior to init and reset phy+hub */ |
177 | ret = gpio_request_array(panda_ehci_gpios, | 177 | ret = gpio_request_array(panda_ehci_gpios, |
diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c index b19a1f7234ae..c2d15212d64d 100644 --- a/arch/arm/mach-omap2/clkt2xxx_apll.c +++ b/arch/arm/mach-omap2/clkt2xxx_apll.c | |||
@@ -59,7 +59,7 @@ static int omap2_clk_apll_enable(struct clk *clk, u32 status_mask) | |||
59 | omap2_cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); | 59 | omap2_cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); |
60 | 60 | ||
61 | omap2_cm_wait_idlest(cm_idlest_pll, status_mask, | 61 | omap2_cm_wait_idlest(cm_idlest_pll, status_mask, |
62 | OMAP24XX_CM_IDLEST_VAL, clk->name); | 62 | OMAP24XX_CM_IDLEST_VAL, __clk_get_name(clk)); |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * REVISIT: Should we return an error code if omap2_wait_clock_ready() | 65 | * REVISIT: Should we return an error code if omap2_wait_clock_ready() |
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index cabcfdba5246..3524f0e7b6d5 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | |||
@@ -68,14 +68,15 @@ unsigned long omap2_table_mpu_recalc(struct clk *clk) | |||
68 | long omap2_round_to_table_rate(struct clk *clk, unsigned long rate) | 68 | long omap2_round_to_table_rate(struct clk *clk, unsigned long rate) |
69 | { | 69 | { |
70 | const struct prcm_config *ptr; | 70 | const struct prcm_config *ptr; |
71 | long highest_rate; | 71 | long highest_rate, sys_clk_rate; |
72 | 72 | ||
73 | highest_rate = -EINVAL; | 73 | highest_rate = -EINVAL; |
74 | sys_clk_rate = __clk_get_rate(sclk); | ||
74 | 75 | ||
75 | for (ptr = rate_table; ptr->mpu_speed; ptr++) { | 76 | for (ptr = rate_table; ptr->mpu_speed; ptr++) { |
76 | if (!(ptr->flags & cpu_mask)) | 77 | if (!(ptr->flags & cpu_mask)) |
77 | continue; | 78 | continue; |
78 | if (ptr->xtal_speed != sclk->rate) | 79 | if (ptr->xtal_speed != sys_clk_rate) |
79 | continue; | 80 | continue; |
80 | 81 | ||
81 | highest_rate = ptr->mpu_speed; | 82 | highest_rate = ptr->mpu_speed; |
@@ -94,12 +95,15 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate) | |||
94 | const struct prcm_config *prcm; | 95 | const struct prcm_config *prcm; |
95 | unsigned long found_speed = 0; | 96 | unsigned long found_speed = 0; |
96 | unsigned long flags; | 97 | unsigned long flags; |
98 | long sys_clk_rate; | ||
99 | |||
100 | sys_clk_rate = __clk_get_rate(sclk); | ||
97 | 101 | ||
98 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { | 102 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { |
99 | if (!(prcm->flags & cpu_mask)) | 103 | if (!(prcm->flags & cpu_mask)) |
100 | continue; | 104 | continue; |
101 | 105 | ||
102 | if (prcm->xtal_speed != sclk->rate) | 106 | if (prcm->xtal_speed != sys_clk_rate) |
103 | continue; | 107 | continue; |
104 | 108 | ||
105 | if (prcm->mpu_speed <= rate) { | 109 | if (prcm->mpu_speed <= rate) { |
diff --git a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c index 298887b5bf66..7c6da2f731dc 100644 --- a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c +++ b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c | |||
@@ -56,6 +56,7 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) | |||
56 | struct omap_sdrc_params *sdrc_cs0; | 56 | struct omap_sdrc_params *sdrc_cs0; |
57 | struct omap_sdrc_params *sdrc_cs1; | 57 | struct omap_sdrc_params *sdrc_cs1; |
58 | int ret; | 58 | int ret; |
59 | unsigned long clkrate; | ||
59 | 60 | ||
60 | if (!clk || !rate) | 61 | if (!clk || !rate) |
61 | return -EINVAL; | 62 | return -EINVAL; |
@@ -64,11 +65,12 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) | |||
64 | if (validrate != rate) | 65 | if (validrate != rate) |
65 | return -EINVAL; | 66 | return -EINVAL; |
66 | 67 | ||
67 | sdrcrate = sdrc_ick_p->rate; | 68 | sdrcrate = __clk_get_rate(sdrc_ick_p); |
68 | if (rate > clk->rate) | 69 | clkrate = __clk_get_rate(clk); |
69 | sdrcrate <<= ((rate / clk->rate) >> 1); | 70 | if (rate > clkrate) |
71 | sdrcrate <<= ((rate / clkrate) >> 1); | ||
70 | else | 72 | else |
71 | sdrcrate >>= ((clk->rate / rate) >> 1); | 73 | sdrcrate >>= ((clkrate / rate) >> 1); |
72 | 74 | ||
73 | ret = omap2_sdrc_get_params(sdrcrate, &sdrc_cs0, &sdrc_cs1); | 75 | ret = omap2_sdrc_get_params(sdrcrate, &sdrc_cs0, &sdrc_cs1); |
74 | if (ret) | 76 | if (ret) |
@@ -82,7 +84,7 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) | |||
82 | /* | 84 | /* |
83 | * XXX This only needs to be done when the CPU frequency changes | 85 | * XXX This only needs to be done when the CPU frequency changes |
84 | */ | 86 | */ |
85 | _mpurate = arm_fck_p->rate / CYCLES_PER_MHZ; | 87 | _mpurate = __clk_get_rate(arm_fck_p) / CYCLES_PER_MHZ; |
86 | c = (_mpurate << SDRC_MPURATE_SCALE) >> SDRC_MPURATE_BASE_SHIFT; | 88 | c = (_mpurate << SDRC_MPURATE_SCALE) >> SDRC_MPURATE_BASE_SHIFT; |
87 | c += 1; /* for safety */ | 89 | c += 1; /* for safety */ |
88 | c *= SDRC_MPURATE_LOOPS; | 90 | c *= SDRC_MPURATE_LOOPS; |
@@ -90,8 +92,8 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) | |||
90 | if (c == 0) | 92 | if (c == 0) |
91 | c = 1; | 93 | c = 1; |
92 | 94 | ||
93 | pr_debug("clock: changing CORE DPLL rate from %lu to %lu\n", clk->rate, | 95 | pr_debug("clock: changing CORE DPLL rate from %lu to %lu\n", |
94 | validrate); | 96 | clkrate, validrate); |
95 | pr_debug("clock: SDRC CS0 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n", | 97 | pr_debug("clock: SDRC CS0 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n", |
96 | sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, | 98 | sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, |
97 | sdrc_cs0->actim_ctrlb, sdrc_cs0->mr); | 99 | sdrc_cs0->actim_ctrlb, sdrc_cs0->mr); |
@@ -102,14 +104,14 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) | |||
102 | 104 | ||
103 | if (sdrc_cs1) | 105 | if (sdrc_cs1) |
104 | omap3_configure_core_dpll( | 106 | omap3_configure_core_dpll( |
105 | new_div, unlock_dll, c, rate > clk->rate, | 107 | new_div, unlock_dll, c, rate > clkrate, |
106 | sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, | 108 | sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, |
107 | sdrc_cs0->actim_ctrlb, sdrc_cs0->mr, | 109 | sdrc_cs0->actim_ctrlb, sdrc_cs0->mr, |
108 | sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla, | 110 | sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla, |
109 | sdrc_cs1->actim_ctrlb, sdrc_cs1->mr); | 111 | sdrc_cs1->actim_ctrlb, sdrc_cs1->mr); |
110 | else | 112 | else |
111 | omap3_configure_core_dpll( | 113 | omap3_configure_core_dpll( |
112 | new_div, unlock_dll, c, rate > clk->rate, | 114 | new_div, unlock_dll, c, rate > clkrate, |
113 | sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, | 115 | sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, |
114 | sdrc_cs0->actim_ctrlb, sdrc_cs0->mr, | 116 | sdrc_cs0->actim_ctrlb, sdrc_cs0->mr, |
115 | 0, 0, 0, 0); | 117 | 0, 0, 0, 0); |
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c index 19a980956d44..eaed3900a83c 100644 --- a/arch/arm/mach-omap2/clkt_clksel.c +++ b/arch/arm/mach-omap2/clkt_clksel.c | |||
@@ -72,7 +72,7 @@ static const struct clksel *_get_clksel_by_parent(struct clk *clk, | |||
72 | if (!clks->parent) { | 72 | if (!clks->parent) { |
73 | /* This indicates a data problem */ | 73 | /* This indicates a data problem */ |
74 | WARN(1, "clock: %s: could not find parent clock %s in clksel array\n", | 74 | WARN(1, "clock: %s: could not find parent clock %s in clksel array\n", |
75 | clk->name, src_clk->name); | 75 | __clk_get_name(clk), __clk_get_name(src_clk)); |
76 | return NULL; | 76 | return NULL; |
77 | } | 77 | } |
78 | 78 | ||
@@ -127,7 +127,8 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk, | |||
127 | if (max_div == 0) { | 127 | if (max_div == 0) { |
128 | /* This indicates an error in the clksel data */ | 128 | /* This indicates an error in the clksel data */ |
129 | WARN(1, "clock: %s: could not find divisor for parent %s\n", | 129 | WARN(1, "clock: %s: could not find divisor for parent %s\n", |
130 | clk->name, src_clk->parent->name); | 130 | __clk_get_name(clk), |
131 | __clk_get_name(__clk_get_parent(src_clk))); | ||
131 | return 0; | 132 | return 0; |
132 | } | 133 | } |
133 | 134 | ||
@@ -176,8 +177,10 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 field_val) | |||
176 | { | 177 | { |
177 | const struct clksel *clks; | 178 | const struct clksel *clks; |
178 | const struct clksel_rate *clkr; | 179 | const struct clksel_rate *clkr; |
180 | struct clk *parent; | ||
179 | 181 | ||
180 | clks = _get_clksel_by_parent(clk, clk->parent); | 182 | parent = __clk_get_parent(clk); |
183 | clks = _get_clksel_by_parent(clk, parent); | ||
181 | if (!clks) | 184 | if (!clks) |
182 | return 0; | 185 | return 0; |
183 | 186 | ||
@@ -191,8 +194,8 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 field_val) | |||
191 | 194 | ||
192 | if (!clkr->div) { | 195 | if (!clkr->div) { |
193 | /* This indicates a data error */ | 196 | /* This indicates a data error */ |
194 | WARN(1, "clock: %s: could not find fieldval %d parent %s\n", | 197 | WARN(1, "clock: %s: could not find fieldval %d for parent %s\n", |
195 | clk->name, field_val, clk->parent->name); | 198 | __clk_get_name(clk), field_val, __clk_get_name(parent)); |
196 | return 0; | 199 | return 0; |
197 | } | 200 | } |
198 | 201 | ||
@@ -213,11 +216,13 @@ static u32 _divisor_to_clksel(struct clk *clk, u32 div) | |||
213 | { | 216 | { |
214 | const struct clksel *clks; | 217 | const struct clksel *clks; |
215 | const struct clksel_rate *clkr; | 218 | const struct clksel_rate *clkr; |
219 | struct clk *parent; | ||
216 | 220 | ||
217 | /* should never happen */ | 221 | /* should never happen */ |
218 | WARN_ON(div == 0); | 222 | WARN_ON(div == 0); |
219 | 223 | ||
220 | clks = _get_clksel_by_parent(clk, clk->parent); | 224 | parent = __clk_get_parent(clk); |
225 | clks = _get_clksel_by_parent(clk, parent); | ||
221 | if (!clks) | 226 | if (!clks) |
222 | return ~0; | 227 | return ~0; |
223 | 228 | ||
@@ -230,8 +235,8 @@ static u32 _divisor_to_clksel(struct clk *clk, u32 div) | |||
230 | } | 235 | } |
231 | 236 | ||
232 | if (!clkr->div) { | 237 | if (!clkr->div) { |
233 | pr_err("clock: %s: could not find divisor %d parent %s\n", | 238 | pr_err("clock: %s: could not find divisor %d for parent %s\n", |
234 | clk->name, div, clk->parent->name); | 239 | __clk_get_name(clk), div, __clk_get_name(parent)); |
235 | return ~0; | 240 | return ~0; |
236 | } | 241 | } |
237 | 242 | ||
@@ -281,16 +286,23 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate, | |||
281 | const struct clksel *clks; | 286 | const struct clksel *clks; |
282 | const struct clksel_rate *clkr; | 287 | const struct clksel_rate *clkr; |
283 | u32 last_div = 0; | 288 | u32 last_div = 0; |
289 | struct clk *parent; | ||
290 | unsigned long parent_rate; | ||
291 | const char *clk_name; | ||
292 | |||
293 | parent = __clk_get_parent(clk); | ||
294 | parent_rate = __clk_get_rate(parent); | ||
295 | clk_name = __clk_get_name(clk); | ||
284 | 296 | ||
285 | if (!clk->clksel || !clk->clksel_mask) | 297 | if (!clk->clksel || !clk->clksel_mask) |
286 | return ~0; | 298 | return ~0; |
287 | 299 | ||
288 | pr_debug("clock: clksel_round_rate_div: %s target_rate %ld\n", | 300 | pr_debug("clock: clksel_round_rate_div: %s target_rate %ld\n", |
289 | clk->name, target_rate); | 301 | clk_name, target_rate); |
290 | 302 | ||
291 | *new_div = 1; | 303 | *new_div = 1; |
292 | 304 | ||
293 | clks = _get_clksel_by_parent(clk, clk->parent); | 305 | clks = _get_clksel_by_parent(clk, parent); |
294 | if (!clks) | 306 | if (!clks) |
295 | return ~0; | 307 | return ~0; |
296 | 308 | ||
@@ -300,29 +312,29 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate, | |||
300 | 312 | ||
301 | /* Sanity check */ | 313 | /* Sanity check */ |
302 | if (clkr->div <= last_div) | 314 | if (clkr->div <= last_div) |
303 | pr_err("clock: %s: clksel_rate table not sorted", | 315 | pr_err("clock: %s: clksel_rate table not sorted\n", |
304 | clk->name); | 316 | clk_name); |
305 | 317 | ||
306 | last_div = clkr->div; | 318 | last_div = clkr->div; |
307 | 319 | ||
308 | test_rate = clk->parent->rate / clkr->div; | 320 | test_rate = parent_rate / clkr->div; |
309 | 321 | ||
310 | if (test_rate <= target_rate) | 322 | if (test_rate <= target_rate) |
311 | break; /* found it */ | 323 | break; /* found it */ |
312 | } | 324 | } |
313 | 325 | ||
314 | if (!clkr->div) { | 326 | if (!clkr->div) { |
315 | pr_err("clock: %s: could not find divisor for target rate %ld parent %s\n", | 327 | pr_err("clock: %s: could not find divisor for target rate %ld for parent %s\n", |
316 | clk->name, target_rate, clk->parent->name); | 328 | clk_name, target_rate, __clk_get_name(parent)); |
317 | return ~0; | 329 | return ~0; |
318 | } | 330 | } |
319 | 331 | ||
320 | *new_div = clkr->div; | 332 | *new_div = clkr->div; |
321 | 333 | ||
322 | pr_debug("clock: new_div = %d, new_rate = %ld\n", *new_div, | 334 | pr_debug("clock: new_div = %d, new_rate = %ld\n", *new_div, |
323 | (clk->parent->rate / clkr->div)); | 335 | (parent_rate / clkr->div)); |
324 | 336 | ||
325 | return clk->parent->rate / clkr->div; | 337 | return parent_rate / clkr->div; |
326 | } | 338 | } |
327 | 339 | ||
328 | /* | 340 | /* |
@@ -344,10 +356,15 @@ void omap2_init_clksel_parent(struct clk *clk) | |||
344 | const struct clksel *clks; | 356 | const struct clksel *clks; |
345 | const struct clksel_rate *clkr; | 357 | const struct clksel_rate *clkr; |
346 | u32 r, found = 0; | 358 | u32 r, found = 0; |
359 | struct clk *parent; | ||
360 | const char *clk_name; | ||
347 | 361 | ||
348 | if (!clk->clksel || !clk->clksel_mask) | 362 | if (!clk->clksel || !clk->clksel_mask) |
349 | return; | 363 | return; |
350 | 364 | ||
365 | parent = __clk_get_parent(clk); | ||
366 | clk_name = __clk_get_name(clk); | ||
367 | |||
351 | r = __raw_readl(clk->clksel_reg) & clk->clksel_mask; | 368 | r = __raw_readl(clk->clksel_reg) & clk->clksel_mask; |
352 | r >>= __ffs(clk->clksel_mask); | 369 | r >>= __ffs(clk->clksel_mask); |
353 | 370 | ||
@@ -357,11 +374,13 @@ void omap2_init_clksel_parent(struct clk *clk) | |||
357 | continue; | 374 | continue; |
358 | 375 | ||
359 | if (clkr->val == r) { | 376 | if (clkr->val == r) { |
360 | if (clk->parent != clks->parent) { | 377 | if (parent != clks->parent) { |
361 | pr_debug("clock: %s: inited parent to %s (was %s)\n", | 378 | pr_debug("clock: %s: inited parent to %s (was %s)\n", |
362 | clk->name, clks->parent->name, | 379 | clk_name, |
363 | ((clk->parent) ? | 380 | __clk_get_name(clks->parent), |
364 | clk->parent->name : "NULL")); | 381 | ((parent) ? |
382 | __clk_get_name(parent) : | ||
383 | "NULL")); | ||
365 | clk_reparent(clk, clks->parent); | 384 | clk_reparent(clk, clks->parent); |
366 | }; | 385 | }; |
367 | found = 1; | 386 | found = 1; |
@@ -371,7 +390,7 @@ void omap2_init_clksel_parent(struct clk *clk) | |||
371 | 390 | ||
372 | /* This indicates a data error */ | 391 | /* This indicates a data error */ |
373 | WARN(!found, "clock: %s: init parent: could not find regval %0x\n", | 392 | WARN(!found, "clock: %s: init parent: could not find regval %0x\n", |
374 | clk->name, r); | 393 | clk_name, r); |
375 | 394 | ||
376 | return; | 395 | return; |
377 | } | 396 | } |
@@ -389,15 +408,17 @@ unsigned long omap2_clksel_recalc(struct clk *clk) | |||
389 | { | 408 | { |
390 | unsigned long rate; | 409 | unsigned long rate; |
391 | u32 div = 0; | 410 | u32 div = 0; |
411 | struct clk *parent; | ||
392 | 412 | ||
393 | div = _read_divisor(clk); | 413 | div = _read_divisor(clk); |
394 | if (div == 0) | 414 | if (div == 0) |
395 | return clk->rate; | 415 | return __clk_get_rate(clk); |
396 | 416 | ||
397 | rate = clk->parent->rate / div; | 417 | parent = __clk_get_parent(clk); |
418 | rate = __clk_get_rate(parent) / div; | ||
398 | 419 | ||
399 | pr_debug("clock: %s: recalc'd rate is %ld (div %d)\n", clk->name, | 420 | pr_debug("clock: %s: recalc'd rate is %ld (div %d)\n", |
400 | rate, div); | 421 | __clk_get_name(clk), rate, div); |
401 | 422 | ||
402 | return rate; | 423 | return rate; |
403 | } | 424 | } |
@@ -452,9 +473,10 @@ int omap2_clksel_set_rate(struct clk *clk, unsigned long rate) | |||
452 | 473 | ||
453 | _write_clksel_reg(clk, field_val); | 474 | _write_clksel_reg(clk, field_val); |
454 | 475 | ||
455 | clk->rate = clk->parent->rate / new_div; | 476 | clk->rate = __clk_get_rate(__clk_get_parent(clk)) / new_div; |
456 | 477 | ||
457 | pr_debug("clock: %s: set rate to %ld\n", clk->name, clk->rate); | 478 | pr_debug("clock: %s: set rate to %ld\n", __clk_get_name(clk), |
479 | __clk_get_rate(clk)); | ||
458 | 480 | ||
459 | return 0; | 481 | return 0; |
460 | } | 482 | } |
@@ -496,13 +518,15 @@ int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent) | |||
496 | clk_reparent(clk, new_parent); | 518 | clk_reparent(clk, new_parent); |
497 | 519 | ||
498 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ | 520 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ |
499 | clk->rate = new_parent->rate; | 521 | clk->rate = __clk_get_rate(new_parent); |
500 | 522 | ||
501 | if (parent_div > 0) | 523 | if (parent_div > 0) |
502 | clk->rate /= parent_div; | 524 | __clk_get_rate(clk) /= parent_div; |
503 | 525 | ||
504 | pr_debug("clock: %s: set parent to %s (new rate %ld)\n", | 526 | pr_debug("clock: %s: set parent to %s (new rate %ld)\n", |
505 | clk->name, clk->parent->name, clk->rate); | 527 | __clk_get_name(clk), |
528 | __clk_get_name(__clk_get_parent(clk)), | ||
529 | __clk_get_rate(clk)); | ||
506 | 530 | ||
507 | return 0; | 531 | return 0; |
508 | } | 532 | } |
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c index 83b658bf385a..80411142f482 100644 --- a/arch/arm/mach-omap2/clkt_dpll.c +++ b/arch/arm/mach-omap2/clkt_dpll.c | |||
@@ -87,7 +87,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n) | |||
87 | dd = clk->dpll_data; | 87 | dd = clk->dpll_data; |
88 | 88 | ||
89 | /* DPLL divider must result in a valid jitter correction val */ | 89 | /* DPLL divider must result in a valid jitter correction val */ |
90 | fint = clk->parent->rate / n; | 90 | fint = __clk_get_rate(__clk_get_parent(clk)) / n; |
91 | 91 | ||
92 | if (cpu_is_omap24xx()) { | 92 | if (cpu_is_omap24xx()) { |
93 | /* Should not be called for OMAP2, so warn if it is called */ | 93 | /* Should not be called for OMAP2, so warn if it is called */ |
@@ -252,16 +252,16 @@ u32 omap2_get_dpll_rate(struct clk *clk) | |||
252 | if (cpu_is_omap24xx()) { | 252 | if (cpu_is_omap24xx()) { |
253 | if (v == OMAP2XXX_EN_DPLL_LPBYPASS || | 253 | if (v == OMAP2XXX_EN_DPLL_LPBYPASS || |
254 | v == OMAP2XXX_EN_DPLL_FRBYPASS) | 254 | v == OMAP2XXX_EN_DPLL_FRBYPASS) |
255 | return dd->clk_bypass->rate; | 255 | return __clk_get_rate(dd->clk_bypass); |
256 | } else if (cpu_is_omap34xx()) { | 256 | } else if (cpu_is_omap34xx()) { |
257 | if (v == OMAP3XXX_EN_DPLL_LPBYPASS || | 257 | if (v == OMAP3XXX_EN_DPLL_LPBYPASS || |
258 | v == OMAP3XXX_EN_DPLL_FRBYPASS) | 258 | v == OMAP3XXX_EN_DPLL_FRBYPASS) |
259 | return dd->clk_bypass->rate; | 259 | return __clk_get_rate(dd->clk_bypass); |
260 | } else if (soc_is_am33xx() || cpu_is_omap44xx()) { | 260 | } else if (soc_is_am33xx() || cpu_is_omap44xx()) { |
261 | if (v == OMAP4XXX_EN_DPLL_LPBYPASS || | 261 | if (v == OMAP4XXX_EN_DPLL_LPBYPASS || |
262 | v == OMAP4XXX_EN_DPLL_FRBYPASS || | 262 | v == OMAP4XXX_EN_DPLL_FRBYPASS || |
263 | v == OMAP4XXX_EN_DPLL_MNBYPASS) | 263 | v == OMAP4XXX_EN_DPLL_MNBYPASS) |
264 | return dd->clk_bypass->rate; | 264 | return __clk_get_rate(dd->clk_bypass); |
265 | } | 265 | } |
266 | 266 | ||
267 | v = __raw_readl(dd->mult_div1_reg); | 267 | v = __raw_readl(dd->mult_div1_reg); |
@@ -270,7 +270,7 @@ u32 omap2_get_dpll_rate(struct clk *clk) | |||
270 | dpll_div = v & dd->div1_mask; | 270 | dpll_div = v & dd->div1_mask; |
271 | dpll_div >>= __ffs(dd->div1_mask); | 271 | dpll_div >>= __ffs(dd->div1_mask); |
272 | 272 | ||
273 | dpll_clk = (long long)dd->clk_ref->rate * dpll_mult; | 273 | dpll_clk = (long long) __clk_get_rate(dd->clk_ref) * dpll_mult; |
274 | do_div(dpll_clk, dpll_div + 1); | 274 | do_div(dpll_clk, dpll_div + 1); |
275 | 275 | ||
276 | return dpll_clk; | 276 | return dpll_clk; |
@@ -296,16 +296,20 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) | |||
296 | unsigned long scaled_rt_rp; | 296 | unsigned long scaled_rt_rp; |
297 | unsigned long new_rate = 0; | 297 | unsigned long new_rate = 0; |
298 | struct dpll_data *dd; | 298 | struct dpll_data *dd; |
299 | unsigned long ref_rate; | ||
300 | const char *clk_name; | ||
299 | 301 | ||
300 | if (!clk || !clk->dpll_data) | 302 | if (!clk || !clk->dpll_data) |
301 | return ~0; | 303 | return ~0; |
302 | 304 | ||
303 | dd = clk->dpll_data; | 305 | dd = clk->dpll_data; |
304 | 306 | ||
307 | ref_rate = __clk_get_rate(dd->clk_ref); | ||
308 | clk_name = __clk_get_name(clk); | ||
305 | pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n", | 309 | pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n", |
306 | clk->name, target_rate); | 310 | clk_name, target_rate); |
307 | 311 | ||
308 | scaled_rt_rp = target_rate / (dd->clk_ref->rate / DPLL_SCALE_FACTOR); | 312 | scaled_rt_rp = target_rate / (ref_rate / DPLL_SCALE_FACTOR); |
309 | scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR; | 313 | scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR; |
310 | 314 | ||
311 | dd->last_rounded_rate = 0; | 315 | dd->last_rounded_rate = 0; |
@@ -332,14 +336,14 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) | |||
332 | break; | 336 | break; |
333 | 337 | ||
334 | r = _dpll_test_mult(&m, n, &new_rate, target_rate, | 338 | r = _dpll_test_mult(&m, n, &new_rate, target_rate, |
335 | dd->clk_ref->rate); | 339 | ref_rate); |
336 | 340 | ||
337 | /* m can't be set low enough for this n - try with a larger n */ | 341 | /* m can't be set low enough for this n - try with a larger n */ |
338 | if (r == DPLL_MULT_UNDERFLOW) | 342 | if (r == DPLL_MULT_UNDERFLOW) |
339 | continue; | 343 | continue; |
340 | 344 | ||
341 | pr_debug("clock: %s: m = %d: n = %d: new_rate = %ld\n", | 345 | pr_debug("clock: %s: m = %d: n = %d: new_rate = %ld\n", |
342 | clk->name, m, n, new_rate); | 346 | clk_name, m, n, new_rate); |
343 | 347 | ||
344 | if (target_rate == new_rate) { | 348 | if (target_rate == new_rate) { |
345 | dd->last_rounded_m = m; | 349 | dd->last_rounded_m = m; |
@@ -350,8 +354,8 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) | |||
350 | } | 354 | } |
351 | 355 | ||
352 | if (target_rate != new_rate) { | 356 | if (target_rate != new_rate) { |
353 | pr_debug("clock: %s: cannot round to rate %ld\n", clk->name, | 357 | pr_debug("clock: %s: cannot round to rate %ld\n", |
354 | target_rate); | 358 | clk_name, target_rate); |
355 | return ~0; | 359 | return ~0; |
356 | } | 360 | } |
357 | 361 | ||
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index e97f98ffe8b2..961ac8f7e13d 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -78,7 +78,7 @@ static void _omap2_module_wait_ready(struct clk *clk) | |||
78 | clk->ops->find_idlest(clk, &idlest_reg, &idlest_bit, &idlest_val); | 78 | clk->ops->find_idlest(clk, &idlest_reg, &idlest_bit, &idlest_val); |
79 | 79 | ||
80 | omap2_cm_wait_idlest(idlest_reg, (1 << idlest_bit), idlest_val, | 80 | omap2_cm_wait_idlest(idlest_reg, (1 << idlest_bit), idlest_val, |
81 | clk->name); | 81 | __clk_get_name(clk)); |
82 | } | 82 | } |
83 | 83 | ||
84 | /* Public functions */ | 84 | /* Public functions */ |
@@ -94,18 +94,21 @@ static void _omap2_module_wait_ready(struct clk *clk) | |||
94 | void omap2_init_clk_clkdm(struct clk *clk) | 94 | void omap2_init_clk_clkdm(struct clk *clk) |
95 | { | 95 | { |
96 | struct clockdomain *clkdm; | 96 | struct clockdomain *clkdm; |
97 | const char *clk_name; | ||
97 | 98 | ||
98 | if (!clk->clkdm_name) | 99 | if (!clk->clkdm_name) |
99 | return; | 100 | return; |
100 | 101 | ||
102 | clk_name = __clk_get_name(clk); | ||
103 | |||
101 | clkdm = clkdm_lookup(clk->clkdm_name); | 104 | clkdm = clkdm_lookup(clk->clkdm_name); |
102 | if (clkdm) { | 105 | if (clkdm) { |
103 | pr_debug("clock: associated clk %s to clkdm %s\n", | 106 | pr_debug("clock: associated clk %s to clkdm %s\n", |
104 | clk->name, clk->clkdm_name); | 107 | clk_name, clk->clkdm_name); |
105 | clk->clkdm = clkdm; | 108 | clk->clkdm = clkdm; |
106 | } else { | 109 | } else { |
107 | pr_debug("clock: could not associate clk %s to clkdm %s\n", | 110 | pr_debug("clock: could not associate clk %s to clkdm %s\n", |
108 | clk->name, clk->clkdm_name); | 111 | clk_name, clk->clkdm_name); |
109 | } | 112 | } |
110 | } | 113 | } |
111 | 114 | ||
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index 12c178dbc9f5..c3cde1a2b6de 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
@@ -1804,6 +1804,7 @@ static struct omap_clk omap2420_clks[] = { | |||
1804 | CLK(NULL, "gfx_ick", &gfx_ick, CK_242X), | 1804 | CLK(NULL, "gfx_ick", &gfx_ick, CK_242X), |
1805 | /* DSS domain clocks */ | 1805 | /* DSS domain clocks */ |
1806 | CLK("omapdss_dss", "ick", &dss_ick, CK_242X), | 1806 | CLK("omapdss_dss", "ick", &dss_ick, CK_242X), |
1807 | CLK(NULL, "dss_ick", &dss_ick, CK_242X), | ||
1807 | CLK(NULL, "dss1_fck", &dss1_fck, CK_242X), | 1808 | CLK(NULL, "dss1_fck", &dss1_fck, CK_242X), |
1808 | CLK(NULL, "dss2_fck", &dss2_fck, CK_242X), | 1809 | CLK(NULL, "dss2_fck", &dss2_fck, CK_242X), |
1809 | CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_242X), | 1810 | CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_242X), |
@@ -1843,12 +1844,16 @@ static struct omap_clk omap2420_clks[] = { | |||
1843 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X), | 1844 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X), |
1844 | CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X), | 1845 | CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X), |
1845 | CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X), | 1846 | CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X), |
1847 | CLK(NULL, "mcbsp1_ick", &mcbsp1_ick, CK_242X), | ||
1846 | CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_242X), | 1848 | CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_242X), |
1847 | CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X), | 1849 | CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X), |
1850 | CLK(NULL, "mcbsp2_ick", &mcbsp2_ick, CK_242X), | ||
1848 | CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_242X), | 1851 | CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_242X), |
1849 | CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X), | 1852 | CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X), |
1853 | CLK(NULL, "mcspi1_ick", &mcspi1_ick, CK_242X), | ||
1850 | CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_242X), | 1854 | CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_242X), |
1851 | CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X), | 1855 | CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X), |
1856 | CLK(NULL, "mcspi2_ick", &mcspi2_ick, CK_242X), | ||
1852 | CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_242X), | 1857 | CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_242X), |
1853 | CLK(NULL, "uart1_ick", &uart1_ick, CK_242X), | 1858 | CLK(NULL, "uart1_ick", &uart1_ick, CK_242X), |
1854 | CLK(NULL, "uart1_fck", &uart1_fck, CK_242X), | 1859 | CLK(NULL, "uart1_fck", &uart1_fck, CK_242X), |
@@ -1859,12 +1864,15 @@ static struct omap_clk omap2420_clks[] = { | |||
1859 | CLK(NULL, "gpios_ick", &gpios_ick, CK_242X), | 1864 | CLK(NULL, "gpios_ick", &gpios_ick, CK_242X), |
1860 | CLK(NULL, "gpios_fck", &gpios_fck, CK_242X), | 1865 | CLK(NULL, "gpios_fck", &gpios_fck, CK_242X), |
1861 | CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X), | 1866 | CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X), |
1867 | CLK(NULL, "mpu_wdt_ick", &mpu_wdt_ick, CK_242X), | ||
1862 | CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_242X), | 1868 | CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_242X), |
1863 | CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X), | 1869 | CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X), |
1864 | CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X), | 1870 | CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X), |
1865 | CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X), | 1871 | CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X), |
1866 | CLK("omap24xxcam", "fck", &cam_fck, CK_242X), | 1872 | CLK("omap24xxcam", "fck", &cam_fck, CK_242X), |
1873 | CLK(NULL, "cam_fck", &cam_fck, CK_242X), | ||
1867 | CLK("omap24xxcam", "ick", &cam_ick, CK_242X), | 1874 | CLK("omap24xxcam", "ick", &cam_ick, CK_242X), |
1875 | CLK(NULL, "cam_ick", &cam_ick, CK_242X), | ||
1868 | CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_242X), | 1876 | CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_242X), |
1869 | CLK(NULL, "wdt4_ick", &wdt4_ick, CK_242X), | 1877 | CLK(NULL, "wdt4_ick", &wdt4_ick, CK_242X), |
1870 | CLK(NULL, "wdt4_fck", &wdt4_fck, CK_242X), | 1878 | CLK(NULL, "wdt4_fck", &wdt4_fck, CK_242X), |
@@ -1873,16 +1881,22 @@ static struct omap_clk omap2420_clks[] = { | |||
1873 | CLK(NULL, "mspro_ick", &mspro_ick, CK_242X), | 1881 | CLK(NULL, "mspro_ick", &mspro_ick, CK_242X), |
1874 | CLK(NULL, "mspro_fck", &mspro_fck, CK_242X), | 1882 | CLK(NULL, "mspro_fck", &mspro_fck, CK_242X), |
1875 | CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X), | 1883 | CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X), |
1884 | CLK(NULL, "mmc_ick", &mmc_ick, CK_242X), | ||
1876 | CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X), | 1885 | CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X), |
1886 | CLK(NULL, "mmc_fck", &mmc_fck, CK_242X), | ||
1877 | CLK(NULL, "fac_ick", &fac_ick, CK_242X), | 1887 | CLK(NULL, "fac_ick", &fac_ick, CK_242X), |
1878 | CLK(NULL, "fac_fck", &fac_fck, CK_242X), | 1888 | CLK(NULL, "fac_fck", &fac_fck, CK_242X), |
1879 | CLK(NULL, "eac_ick", &eac_ick, CK_242X), | 1889 | CLK(NULL, "eac_ick", &eac_ick, CK_242X), |
1880 | CLK(NULL, "eac_fck", &eac_fck, CK_242X), | 1890 | CLK(NULL, "eac_fck", &eac_fck, CK_242X), |
1881 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X), | 1891 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X), |
1892 | CLK(NULL, "hdq_ick", &hdq_ick, CK_242X), | ||
1882 | CLK("omap_hdq.0", "fck", &hdq_fck, CK_242X), | 1893 | CLK("omap_hdq.0", "fck", &hdq_fck, CK_242X), |
1894 | CLK(NULL, "hdq_fck", &hdq_fck, CK_242X), | ||
1883 | CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X), | 1895 | CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X), |
1896 | CLK(NULL, "i2c1_ick", &i2c1_ick, CK_242X), | ||
1884 | CLK(NULL, "i2c1_fck", &i2c1_fck, CK_242X), | 1897 | CLK(NULL, "i2c1_fck", &i2c1_fck, CK_242X), |
1885 | CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X), | 1898 | CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X), |
1899 | CLK(NULL, "i2c2_ick", &i2c2_ick, CK_242X), | ||
1886 | CLK(NULL, "i2c2_fck", &i2c2_fck, CK_242X), | 1900 | CLK(NULL, "i2c2_fck", &i2c2_fck, CK_242X), |
1887 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X), | 1901 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X), |
1888 | CLK(NULL, "sdma_fck", &sdma_fck, CK_242X), | 1902 | CLK(NULL, "sdma_fck", &sdma_fck, CK_242X), |
@@ -1892,14 +1906,18 @@ static struct omap_clk omap2420_clks[] = { | |||
1892 | CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), | 1906 | CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), |
1893 | CLK(NULL, "des_ick", &des_ick, CK_242X), | 1907 | CLK(NULL, "des_ick", &des_ick, CK_242X), |
1894 | CLK("omap-sham", "ick", &sha_ick, CK_242X), | 1908 | CLK("omap-sham", "ick", &sha_ick, CK_242X), |
1909 | CLK(NULL, "sha_ick", &sha_ick, CK_242X), | ||
1895 | CLK("omap_rng", "ick", &rng_ick, CK_242X), | 1910 | CLK("omap_rng", "ick", &rng_ick, CK_242X), |
1911 | CLK(NULL, "rng_ick", &rng_ick, CK_242X), | ||
1896 | CLK("omap-aes", "ick", &aes_ick, CK_242X), | 1912 | CLK("omap-aes", "ick", &aes_ick, CK_242X), |
1913 | CLK(NULL, "aes_ick", &aes_ick, CK_242X), | ||
1897 | CLK(NULL, "pka_ick", &pka_ick, CK_242X), | 1914 | CLK(NULL, "pka_ick", &pka_ick, CK_242X), |
1898 | CLK(NULL, "usb_fck", &usb_fck, CK_242X), | 1915 | CLK(NULL, "usb_fck", &usb_fck, CK_242X), |
1899 | CLK("musb-hdrc", "fck", &osc_ck, CK_242X), | 1916 | CLK("musb-hdrc", "fck", &osc_ck, CK_242X), |
1900 | CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_243X), | 1917 | CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_242X), |
1901 | CLK(NULL, "timer_sys_ck", &sys_ck, CK_243X), | 1918 | CLK(NULL, "timer_sys_ck", &sys_ck, CK_242X), |
1902 | CLK(NULL, "timer_ext_ck", &alt_ck, CK_243X), | 1919 | CLK(NULL, "timer_ext_ck", &alt_ck, CK_242X), |
1920 | CLK(NULL, "cpufreq_ck", &virt_prcm_set, CK_242X), | ||
1903 | }; | 1921 | }; |
1904 | 1922 | ||
1905 | /* | 1923 | /* |
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c index 7ea91398217a..22404fe435e7 100644 --- a/arch/arm/mach-omap2/clock2430_data.c +++ b/arch/arm/mach-omap2/clock2430_data.c | |||
@@ -1888,6 +1888,7 @@ static struct omap_clk omap2430_clks[] = { | |||
1888 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), | 1888 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), |
1889 | /* DSS domain clocks */ | 1889 | /* DSS domain clocks */ |
1890 | CLK("omapdss_dss", "ick", &dss_ick, CK_243X), | 1890 | CLK("omapdss_dss", "ick", &dss_ick, CK_243X), |
1891 | CLK(NULL, "dss_ick", &dss_ick, CK_243X), | ||
1891 | CLK(NULL, "dss1_fck", &dss1_fck, CK_243X), | 1892 | CLK(NULL, "dss1_fck", &dss1_fck, CK_243X), |
1892 | CLK(NULL, "dss2_fck", &dss2_fck, CK_243X), | 1893 | CLK(NULL, "dss2_fck", &dss2_fck, CK_243X), |
1893 | CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X), | 1894 | CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X), |
@@ -1927,20 +1928,28 @@ static struct omap_clk omap2430_clks[] = { | |||
1927 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X), | 1928 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X), |
1928 | CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X), | 1929 | CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X), |
1929 | CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X), | 1930 | CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X), |
1931 | CLK(NULL, "mcbsp1_ick", &mcbsp1_ick, CK_243X), | ||
1930 | CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_243X), | 1932 | CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_243X), |
1931 | CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X), | 1933 | CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X), |
1934 | CLK(NULL, "mcbsp2_ick", &mcbsp2_ick, CK_243X), | ||
1932 | CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_243X), | 1935 | CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_243X), |
1933 | CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X), | 1936 | CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X), |
1937 | CLK(NULL, "mcbsp3_ick", &mcbsp3_ick, CK_243X), | ||
1934 | CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_243X), | 1938 | CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_243X), |
1935 | CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X), | 1939 | CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X), |
1940 | CLK(NULL, "mcbsp4_ick", &mcbsp4_ick, CK_243X), | ||
1936 | CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_243X), | 1941 | CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_243X), |
1937 | CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X), | 1942 | CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X), |
1943 | CLK(NULL, "mcbsp5_ick", &mcbsp5_ick, CK_243X), | ||
1938 | CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_243X), | 1944 | CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_243X), |
1939 | CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X), | 1945 | CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X), |
1946 | CLK(NULL, "mcspi1_ick", &mcspi1_ick, CK_243X), | ||
1940 | CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_243X), | 1947 | CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_243X), |
1941 | CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X), | 1948 | CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X), |
1949 | CLK(NULL, "mcspi2_ick", &mcspi2_ick, CK_243X), | ||
1942 | CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_243X), | 1950 | CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_243X), |
1943 | CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X), | 1951 | CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X), |
1952 | CLK(NULL, "mcspi3_ick", &mcspi3_ick, CK_243X), | ||
1944 | CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_243X), | 1953 | CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_243X), |
1945 | CLK(NULL, "uart1_ick", &uart1_ick, CK_243X), | 1954 | CLK(NULL, "uart1_ick", &uart1_ick, CK_243X), |
1946 | CLK(NULL, "uart1_fck", &uart1_fck, CK_243X), | 1955 | CLK(NULL, "uart1_fck", &uart1_fck, CK_243X), |
@@ -1951,13 +1960,16 @@ static struct omap_clk omap2430_clks[] = { | |||
1951 | CLK(NULL, "gpios_ick", &gpios_ick, CK_243X), | 1960 | CLK(NULL, "gpios_ick", &gpios_ick, CK_243X), |
1952 | CLK(NULL, "gpios_fck", &gpios_fck, CK_243X), | 1961 | CLK(NULL, "gpios_fck", &gpios_fck, CK_243X), |
1953 | CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X), | 1962 | CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X), |
1963 | CLK(NULL, "mpu_wdt_ick", &mpu_wdt_ick, CK_243X), | ||
1954 | CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_243X), | 1964 | CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_243X), |
1955 | CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X), | 1965 | CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X), |
1956 | CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X), | 1966 | CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X), |
1957 | CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X), | 1967 | CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X), |
1958 | CLK(NULL, "icr_ick", &icr_ick, CK_243X), | 1968 | CLK(NULL, "icr_ick", &icr_ick, CK_243X), |
1959 | CLK("omap24xxcam", "fck", &cam_fck, CK_243X), | 1969 | CLK("omap24xxcam", "fck", &cam_fck, CK_243X), |
1970 | CLK(NULL, "cam_fck", &cam_fck, CK_243X), | ||
1960 | CLK("omap24xxcam", "ick", &cam_ick, CK_243X), | 1971 | CLK("omap24xxcam", "ick", &cam_ick, CK_243X), |
1972 | CLK(NULL, "cam_ick", &cam_ick, CK_243X), | ||
1961 | CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_243X), | 1973 | CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_243X), |
1962 | CLK(NULL, "wdt4_ick", &wdt4_ick, CK_243X), | 1974 | CLK(NULL, "wdt4_ick", &wdt4_ick, CK_243X), |
1963 | CLK(NULL, "wdt4_fck", &wdt4_fck, CK_243X), | 1975 | CLK(NULL, "wdt4_fck", &wdt4_fck, CK_243X), |
@@ -1966,10 +1978,14 @@ static struct omap_clk omap2430_clks[] = { | |||
1966 | CLK(NULL, "fac_ick", &fac_ick, CK_243X), | 1978 | CLK(NULL, "fac_ick", &fac_ick, CK_243X), |
1967 | CLK(NULL, "fac_fck", &fac_fck, CK_243X), | 1979 | CLK(NULL, "fac_fck", &fac_fck, CK_243X), |
1968 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X), | 1980 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X), |
1981 | CLK(NULL, "hdq_ick", &hdq_ick, CK_243X), | ||
1969 | CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X), | 1982 | CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X), |
1983 | CLK(NULL, "hdq_fck", &hdq_fck, CK_243X), | ||
1970 | CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X), | 1984 | CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X), |
1985 | CLK(NULL, "i2c1_ick", &i2c1_ick, CK_243X), | ||
1971 | CLK(NULL, "i2chs1_fck", &i2chs1_fck, CK_243X), | 1986 | CLK(NULL, "i2chs1_fck", &i2chs1_fck, CK_243X), |
1972 | CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X), | 1987 | CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X), |
1988 | CLK(NULL, "i2c2_ick", &i2c2_ick, CK_243X), | ||
1973 | CLK(NULL, "i2chs2_fck", &i2chs2_fck, CK_243X), | 1989 | CLK(NULL, "i2chs2_fck", &i2chs2_fck, CK_243X), |
1974 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X), | 1990 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X), |
1975 | CLK(NULL, "sdma_fck", &sdma_fck, CK_243X), | 1991 | CLK(NULL, "sdma_fck", &sdma_fck, CK_243X), |
@@ -1978,22 +1994,29 @@ static struct omap_clk omap2430_clks[] = { | |||
1978 | CLK(NULL, "des_ick", &des_ick, CK_243X), | 1994 | CLK(NULL, "des_ick", &des_ick, CK_243X), |
1979 | CLK("omap-sham", "ick", &sha_ick, CK_243X), | 1995 | CLK("omap-sham", "ick", &sha_ick, CK_243X), |
1980 | CLK("omap_rng", "ick", &rng_ick, CK_243X), | 1996 | CLK("omap_rng", "ick", &rng_ick, CK_243X), |
1997 | CLK(NULL, "rng_ick", &rng_ick, CK_243X), | ||
1981 | CLK("omap-aes", "ick", &aes_ick, CK_243X), | 1998 | CLK("omap-aes", "ick", &aes_ick, CK_243X), |
1982 | CLK(NULL, "pka_ick", &pka_ick, CK_243X), | 1999 | CLK(NULL, "pka_ick", &pka_ick, CK_243X), |
1983 | CLK(NULL, "usb_fck", &usb_fck, CK_243X), | 2000 | CLK(NULL, "usb_fck", &usb_fck, CK_243X), |
1984 | CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X), | 2001 | CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X), |
2002 | CLK(NULL, "usbhs_ick", &usbhs_ick, CK_243X), | ||
1985 | CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X), | 2003 | CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X), |
2004 | CLK(NULL, "mmchs1_ick", &mmchs1_ick, CK_243X), | ||
1986 | CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_243X), | 2005 | CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_243X), |
1987 | CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X), | 2006 | CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X), |
2007 | CLK(NULL, "mmchs2_ick", &mmchs2_ick, CK_243X), | ||
1988 | CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_243X), | 2008 | CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_243X), |
1989 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), | 2009 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), |
1990 | CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), | 2010 | CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), |
1991 | CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), | 2011 | CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), |
1992 | CLK("omap_hsmmc.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X), | 2012 | CLK("omap_hsmmc.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X), |
2013 | CLK(NULL, "mmchsdb1_fck", &mmchsdb1_fck, CK_243X), | ||
1993 | CLK("omap_hsmmc.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X), | 2014 | CLK("omap_hsmmc.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X), |
2015 | CLK(NULL, "mmchsdb2_fck", &mmchsdb2_fck, CK_243X), | ||
1994 | CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_243X), | 2016 | CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_243X), |
1995 | CLK(NULL, "timer_sys_ck", &sys_ck, CK_243X), | 2017 | CLK(NULL, "timer_sys_ck", &sys_ck, CK_243X), |
1996 | CLK(NULL, "timer_ext_ck", &alt_ck, CK_243X), | 2018 | CLK(NULL, "timer_ext_ck", &alt_ck, CK_243X), |
2019 | CLK(NULL, "cpufreq_ck", &virt_prcm_set, CK_243X), | ||
1997 | }; | 2020 | }; |
1998 | 2021 | ||
1999 | /* | 2022 | /* |
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c index 2026311a4ff6..b87b88c2638b 100644 --- a/arch/arm/mach-omap2/clock33xx_data.c +++ b/arch/arm/mach-omap2/clock33xx_data.c | |||
@@ -1013,6 +1013,7 @@ static struct omap_clk am33xx_clks[] = { | |||
1013 | CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_AM33XX), | 1013 | CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_AM33XX), |
1014 | CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_AM33XX), | 1014 | CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_AM33XX), |
1015 | CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_AM33XX), | 1015 | CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_AM33XX), |
1016 | CLK("cpu0", NULL, &dpll_mpu_ck, CK_AM33XX), | ||
1016 | CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_AM33XX), | 1017 | CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_AM33XX), |
1017 | CLK(NULL, "dpll_ddr_ck", &dpll_ddr_ck, CK_AM33XX), | 1018 | CLK(NULL, "dpll_ddr_ck", &dpll_ddr_ck, CK_AM33XX), |
1018 | CLK(NULL, "dpll_ddr_m2_ck", &dpll_ddr_m2_ck, CK_AM33XX), | 1019 | CLK(NULL, "dpll_ddr_m2_ck", &dpll_ddr_m2_ck, CK_AM33XX), |
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c index 15cdc6471737..83bb01427d40 100644 --- a/arch/arm/mach-omap2/clock3xxx.c +++ b/arch/arm/mach-omap2/clock3xxx.c | |||
@@ -63,15 +63,15 @@ void __init omap3_clk_lock_dpll5(void) | |||
63 | 63 | ||
64 | dpll5_clk = clk_get(NULL, "dpll5_ck"); | 64 | dpll5_clk = clk_get(NULL, "dpll5_ck"); |
65 | clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST); | 65 | clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST); |
66 | clk_enable(dpll5_clk); | 66 | clk_prepare_enable(dpll5_clk); |
67 | 67 | ||
68 | /* Program dpll5_m2_clk divider for no division */ | 68 | /* Program dpll5_m2_clk divider for no division */ |
69 | dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck"); | 69 | dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck"); |
70 | clk_enable(dpll5_m2_clk); | 70 | clk_prepare_enable(dpll5_m2_clk); |
71 | clk_set_rate(dpll5_m2_clk, DPLL5_FREQ_FOR_USBHOST); | 71 | clk_set_rate(dpll5_m2_clk, DPLL5_FREQ_FOR_USBHOST); |
72 | 72 | ||
73 | clk_disable(dpll5_m2_clk); | 73 | clk_disable_unprepare(dpll5_m2_clk); |
74 | clk_disable(dpll5_clk); | 74 | clk_disable_unprepare(dpll5_clk); |
75 | return; | 75 | return; |
76 | } | 76 | } |
77 | 77 | ||
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 700317a1bd16..1f42c9d5ecf3 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3215,7 +3215,6 @@ static struct clk dummy_apb_pclk = { | |||
3215 | * clkdev | 3215 | * clkdev |
3216 | */ | 3216 | */ |
3217 | 3217 | ||
3218 | /* XXX At some point we should rename this file to clock3xxx_data.c */ | ||
3219 | static struct omap_clk omap3xxx_clks[] = { | 3218 | static struct omap_clk omap3xxx_clks[] = { |
3220 | CLK(NULL, "apb_pclk", &dummy_apb_pclk, CK_3XXX), | 3219 | CLK(NULL, "apb_pclk", &dummy_apb_pclk, CK_3XXX), |
3221 | CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_3XXX), | 3220 | CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_3XXX), |
@@ -3243,11 +3242,13 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3243 | CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_3XXX), | 3242 | CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_3XXX), |
3244 | CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck, CK_3XXX), | 3243 | CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck, CK_3XXX), |
3245 | CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_3XXX), | 3244 | CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_3XXX), |
3245 | CLK(NULL, "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX), | ||
3246 | CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX), | 3246 | CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX), |
3247 | CLK(NULL, "dpll4_ck", &dpll4_ck, CK_3XXX), | 3247 | CLK(NULL, "dpll4_ck", &dpll4_ck, CK_3XXX), |
3248 | CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_3XXX), | 3248 | CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_3XXX), |
3249 | CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck, CK_36XX), | 3249 | CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck, CK_36XX), |
3250 | CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_3XXX), | 3250 | CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_3XXX), |
3251 | CLK(NULL, "omap_96m_alwon_fck_3630", &omap_96m_alwon_fck_3630, CK_36XX), | ||
3251 | CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_3XXX), | 3252 | CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_3XXX), |
3252 | CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_3XXX), | 3253 | CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_3XXX), |
3253 | CLK(NULL, "omap_54m_fck", &omap_54m_fck, CK_3XXX), | 3254 | CLK(NULL, "omap_54m_fck", &omap_54m_fck, CK_3XXX), |
@@ -3263,6 +3264,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3263 | CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_3XXX), | 3264 | CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_3XXX), |
3264 | CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck, CK_3XXX), | 3265 | CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck, CK_3XXX), |
3265 | CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_3XXX), | 3266 | CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_3XXX), |
3267 | CLK(NULL, "emu_per_alwon_ck", &emu_per_alwon_ck, CK_3XXX), | ||
3266 | CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck, CK_3XXX), | 3268 | CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck, CK_3XXX), |
3267 | CLK(NULL, "dpll5_ck", &dpll5_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3269 | CLK(NULL, "dpll5_ck", &dpll5_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3268 | CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3270 | CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
@@ -3272,6 +3274,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3272 | CLK(NULL, "dpll1_fck", &dpll1_fck, CK_3XXX), | 3274 | CLK(NULL, "dpll1_fck", &dpll1_fck, CK_3XXX), |
3273 | CLK(NULL, "mpu_ck", &mpu_ck, CK_3XXX), | 3275 | CLK(NULL, "mpu_ck", &mpu_ck, CK_3XXX), |
3274 | CLK(NULL, "arm_fck", &arm_fck, CK_3XXX), | 3276 | CLK(NULL, "arm_fck", &arm_fck, CK_3XXX), |
3277 | CLK(NULL, "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_3XXX), | ||
3275 | CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_3XXX), | 3278 | CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_3XXX), |
3276 | CLK(NULL, "dpll2_fck", &dpll2_fck, CK_34XX | CK_36XX), | 3279 | CLK(NULL, "dpll2_fck", &dpll2_fck, CK_34XX | CK_36XX), |
3277 | CLK(NULL, "iva2_ck", &iva2_ck, CK_34XX | CK_36XX), | 3280 | CLK(NULL, "iva2_ck", &iva2_ck, CK_34XX | CK_36XX), |
@@ -3295,6 +3298,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3295 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3298 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3296 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3299 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3297 | CLK("usbhs_omap", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3300 | CLK("usbhs_omap", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3301 | CLK("usbhs_tll", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | ||
3298 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), | 3302 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), |
3299 | CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3303 | CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3300 | CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX), | 3304 | CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX), |
@@ -3315,6 +3319,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3315 | CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1), | 3319 | CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1), |
3316 | CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX), | 3320 | CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX), |
3317 | CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX), | 3321 | CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX), |
3322 | CLK(NULL, "hdq_fck", &hdq_fck, CK_3XXX), | ||
3318 | CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1), | 3323 | CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1), |
3319 | CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX), | 3324 | CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX), |
3320 | CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1), | 3325 | CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1), |
@@ -3322,6 +3327,8 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3322 | CLK(NULL, "core_l3_ick", &core_l3_ick, CK_3XXX), | 3327 | CLK(NULL, "core_l3_ick", &core_l3_ick, CK_3XXX), |
3323 | CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1, CK_3430ES1), | 3328 | CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1, CK_3430ES1), |
3324 | CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX), | 3329 | CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX), |
3330 | CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es1, CK_3430ES1), | ||
3331 | CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX), | ||
3325 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_3XXX), | 3332 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_3XXX), |
3326 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_3XXX), | 3333 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_3XXX), |
3327 | CLK(NULL, "security_l3_ick", &security_l3_ick, CK_34XX | CK_36XX), | 3334 | CLK(NULL, "security_l3_ick", &security_l3_ick, CK_34XX | CK_36XX), |
@@ -3329,28 +3336,42 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3329 | CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), | 3336 | CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), |
3330 | CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3337 | CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3331 | CLK("usbhs_omap", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3338 | CLK("usbhs_omap", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3339 | CLK("usbhs_tll", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | ||
3332 | CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3340 | CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3341 | CLK(NULL, "mmchs3_ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | ||
3333 | CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), | 3342 | CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), |
3334 | CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), | 3343 | CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), |
3335 | CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX), | 3344 | CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX), |
3336 | CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX), | 3345 | CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX), |
3337 | CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_3XXX), | 3346 | CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_3XXX), |
3338 | CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_3XXX), | 3347 | CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_3XXX), |
3348 | CLK(NULL, "mmchs2_ick", &mmchs2_ick, CK_3XXX), | ||
3349 | CLK(NULL, "mmchs1_ick", &mmchs1_ick, CK_3XXX), | ||
3339 | CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX), | 3350 | CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX), |
3340 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX), | 3351 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX), |
3352 | CLK(NULL, "hdq_ick", &hdq_ick, CK_3XXX), | ||
3341 | CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX), | 3353 | CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX), |
3342 | CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_3XXX), | 3354 | CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_3XXX), |
3343 | CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_3XXX), | 3355 | CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_3XXX), |
3344 | CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_3XXX), | 3356 | CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_3XXX), |
3357 | CLK(NULL, "mcspi4_ick", &mcspi4_ick, CK_3XXX), | ||
3358 | CLK(NULL, "mcspi3_ick", &mcspi3_ick, CK_3XXX), | ||
3359 | CLK(NULL, "mcspi2_ick", &mcspi2_ick, CK_3XXX), | ||
3360 | CLK(NULL, "mcspi1_ick", &mcspi1_ick, CK_3XXX), | ||
3345 | CLK("omap_i2c.3", "ick", &i2c3_ick, CK_3XXX), | 3361 | CLK("omap_i2c.3", "ick", &i2c3_ick, CK_3XXX), |
3346 | CLK("omap_i2c.2", "ick", &i2c2_ick, CK_3XXX), | 3362 | CLK("omap_i2c.2", "ick", &i2c2_ick, CK_3XXX), |
3347 | CLK("omap_i2c.1", "ick", &i2c1_ick, CK_3XXX), | 3363 | CLK("omap_i2c.1", "ick", &i2c1_ick, CK_3XXX), |
3364 | CLK(NULL, "i2c3_ick", &i2c3_ick, CK_3XXX), | ||
3365 | CLK(NULL, "i2c2_ick", &i2c2_ick, CK_3XXX), | ||
3366 | CLK(NULL, "i2c1_ick", &i2c1_ick, CK_3XXX), | ||
3348 | CLK(NULL, "uart2_ick", &uart2_ick, CK_3XXX), | 3367 | CLK(NULL, "uart2_ick", &uart2_ick, CK_3XXX), |
3349 | CLK(NULL, "uart1_ick", &uart1_ick, CK_3XXX), | 3368 | CLK(NULL, "uart1_ick", &uart1_ick, CK_3XXX), |
3350 | CLK(NULL, "gpt11_ick", &gpt11_ick, CK_3XXX), | 3369 | CLK(NULL, "gpt11_ick", &gpt11_ick, CK_3XXX), |
3351 | CLK(NULL, "gpt10_ick", &gpt10_ick, CK_3XXX), | 3370 | CLK(NULL, "gpt10_ick", &gpt10_ick, CK_3XXX), |
3352 | CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_3XXX), | 3371 | CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_3XXX), |
3353 | CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_3XXX), | 3372 | CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_3XXX), |
3373 | CLK(NULL, "mcbsp5_ick", &mcbsp5_ick, CK_3XXX), | ||
3374 | CLK(NULL, "mcbsp1_ick", &mcbsp1_ick, CK_3XXX), | ||
3354 | CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1), | 3375 | CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1), |
3355 | CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_34XX | CK_36XX), | 3376 | CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_34XX | CK_36XX), |
3356 | CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_3XXX), | 3377 | CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_3XXX), |
@@ -3369,7 +3390,9 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3369 | CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_3XXX), | 3390 | CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_3XXX), |
3370 | CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_3XXX), | 3391 | CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_3XXX), |
3371 | CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1), | 3392 | CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1), |
3393 | CLK(NULL, "dss_ick", &dss_ick_3430es1, CK_3430ES1), | ||
3372 | CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3394 | CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3395 | CLK(NULL, "dss_ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | ||
3373 | CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX), | 3396 | CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX), |
3374 | CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX), | 3397 | CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX), |
3375 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX), | 3398 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX), |
@@ -3385,6 +3408,8 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3385 | CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX), | 3408 | CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX), |
3386 | CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX), | 3409 | CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX), |
3387 | CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX), | 3410 | CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX), |
3411 | CLK("usbhs_tll", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX), | ||
3412 | CLK("usbhs_tll", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX), | ||
3388 | CLK(NULL, "init_60m_fclk", &dummy_ck, CK_3XXX), | 3413 | CLK(NULL, "init_60m_fclk", &dummy_ck, CK_3XXX), |
3389 | CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX), | 3414 | CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX), |
3390 | CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), | 3415 | CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), |
@@ -3394,6 +3419,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3394 | CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX), | 3419 | CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX), |
3395 | CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX), | 3420 | CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX), |
3396 | CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX), | 3421 | CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX), |
3422 | CLK(NULL, "wdt2_ick", &wdt2_ick, CK_3XXX), | ||
3397 | CLK(NULL, "wdt1_ick", &wdt1_ick, CK_3XXX), | 3423 | CLK(NULL, "wdt1_ick", &wdt1_ick, CK_3XXX), |
3398 | CLK(NULL, "gpio1_ick", &gpio1_ick, CK_3XXX), | 3424 | CLK(NULL, "gpio1_ick", &gpio1_ick, CK_3XXX), |
3399 | CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX), | 3425 | CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX), |
@@ -3439,9 +3465,13 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3439 | CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX), | 3465 | CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX), |
3440 | CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX), | 3466 | CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX), |
3441 | CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX), | 3467 | CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX), |
3468 | CLK(NULL, "mcbsp4_ick", &mcbsp2_ick, CK_3XXX), | ||
3469 | CLK(NULL, "mcbsp3_ick", &mcbsp3_ick, CK_3XXX), | ||
3470 | CLK(NULL, "mcbsp2_ick", &mcbsp4_ick, CK_3XXX), | ||
3442 | CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_3XXX), | 3471 | CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_3XXX), |
3443 | CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_3XXX), | 3472 | CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_3XXX), |
3444 | CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_3XXX), | 3473 | CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_3XXX), |
3474 | CLK(NULL, "emu_src_ck", &emu_src_ck, CK_3XXX), | ||
3445 | CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX), | 3475 | CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX), |
3446 | CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX), | 3476 | CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX), |
3447 | CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX), | 3477 | CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX), |
@@ -3457,8 +3487,12 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3457 | CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX), | 3487 | CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX), |
3458 | CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX), | 3488 | CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX), |
3459 | CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX), | 3489 | CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX), |
3490 | CLK(NULL, "emac_ick", &emac_ick, CK_AM35XX), | ||
3491 | CLK(NULL, "emac_fck", &emac_fck, CK_AM35XX), | ||
3460 | CLK("davinci_emac.0", NULL, &emac_ick, CK_AM35XX), | 3492 | CLK("davinci_emac.0", NULL, &emac_ick, CK_AM35XX), |
3461 | CLK("davinci_mdio.0", NULL, &emac_fck, CK_AM35XX), | 3493 | CLK("davinci_mdio.0", NULL, &emac_fck, CK_AM35XX), |
3494 | CLK(NULL, "vpfe_ick", &emac_ick, CK_AM35XX), | ||
3495 | CLK(NULL, "vpfe_fck", &emac_fck, CK_AM35XX), | ||
3462 | CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX), | 3496 | CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX), |
3463 | CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX), | 3497 | CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX), |
3464 | CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_am35xx, CK_AM35XX), | 3498 | CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_am35xx, CK_AM35XX), |
@@ -3467,6 +3501,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3467 | CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX), | 3501 | CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX), |
3468 | CLK(NULL, "timer_32k_ck", &omap_32k_fck, CK_3XXX), | 3502 | CLK(NULL, "timer_32k_ck", &omap_32k_fck, CK_3XXX), |
3469 | CLK(NULL, "timer_sys_ck", &sys_ck, CK_3XXX), | 3503 | CLK(NULL, "timer_sys_ck", &sys_ck, CK_3XXX), |
3504 | CLK(NULL, "cpufreq_ck", &dpll1_ck, CK_3XXX), | ||
3470 | }; | 3505 | }; |
3471 | 3506 | ||
3472 | 3507 | ||
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 500682c051c1..d661d138f270 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -3156,6 +3156,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3156 | CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), | 3156 | CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), |
3157 | CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), | 3157 | CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), |
3158 | CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X), | 3158 | CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X), |
3159 | CLK(NULL, "dss_fck", &dss_fck, CK_443X), | ||
3159 | CLK("omapdss_dss", "ick", &dss_fck, CK_443X), | 3160 | CLK("omapdss_dss", "ick", &dss_fck, CK_443X), |
3160 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), | 3161 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), |
3161 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), | 3162 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), |
@@ -3212,6 +3213,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3212 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), | 3213 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), |
3213 | CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), | 3214 | CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), |
3214 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), | 3215 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), |
3216 | CLK(NULL, "rng_ick", &rng_ick, CK_443X), | ||
3215 | CLK("omap_rng", "ick", &rng_ick, CK_443X), | 3217 | CLK("omap_rng", "ick", &rng_ick, CK_443X), |
3216 | CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), | 3218 | CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), |
3217 | CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X), | 3219 | CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X), |
@@ -3243,6 +3245,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3243 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), | 3245 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), |
3244 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), | 3246 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), |
3245 | CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X), | 3247 | CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X), |
3248 | CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X), | ||
3246 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), | 3249 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), |
3247 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), | 3250 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), |
3248 | CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), | 3251 | CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), |
@@ -3253,15 +3256,19 @@ static struct omap_clk omap44xx_clks[] = { | |||
3253 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), | 3256 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), |
3254 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), | 3257 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), |
3255 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), | 3258 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), |
3259 | CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X), | ||
3256 | CLK("usbhs_omap", "hs_fck", &usb_host_hs_fck, CK_443X), | 3260 | CLK("usbhs_omap", "hs_fck", &usb_host_hs_fck, CK_443X), |
3257 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), | 3261 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), |
3258 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), | 3262 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), |
3263 | CLK(NULL, "usb_otg_hs_ick", &usb_otg_hs_ick, CK_443X), | ||
3259 | CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), | 3264 | CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), |
3260 | CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X), | 3265 | CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X), |
3261 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), | 3266 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), |
3262 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), | 3267 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), |
3263 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), | 3268 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), |
3269 | CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X), | ||
3264 | CLK("usbhs_omap", "usbtll_ick", &usb_tll_hs_ick, CK_443X), | 3270 | CLK("usbhs_omap", "usbtll_ick", &usb_tll_hs_ick, CK_443X), |
3271 | CLK("usbhs_tll", "usbtll_ick", &usb_tll_hs_ick, CK_443X), | ||
3265 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), | 3272 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), |
3266 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), | 3273 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), |
3267 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), | 3274 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), |
@@ -3312,8 +3319,10 @@ static struct omap_clk omap44xx_clks[] = { | |||
3312 | CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), | 3319 | CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), |
3313 | CLK("usbhs_omap", "usbhost_ick", &dummy_ck, CK_443X), | 3320 | CLK("usbhs_omap", "usbhost_ick", &dummy_ck, CK_443X), |
3314 | CLK("usbhs_omap", "usbtll_fck", &dummy_ck, CK_443X), | 3321 | CLK("usbhs_omap", "usbtll_fck", &dummy_ck, CK_443X), |
3322 | CLK("usbhs_tll", "usbtll_fck", &dummy_ck, CK_443X), | ||
3315 | CLK("omap_wdt", "ick", &dummy_ck, CK_443X), | 3323 | CLK("omap_wdt", "ick", &dummy_ck, CK_443X), |
3316 | CLK(NULL, "timer_32k_ck", &sys_32k_ck, CK_443X), | 3324 | CLK(NULL, "timer_32k_ck", &sys_32k_ck, CK_443X), |
3325 | /* TODO: Remove "omap_timer.X" aliases once DT migration is complete */ | ||
3317 | CLK("omap_timer.1", "timer_sys_ck", &sys_clkin_ck, CK_443X), | 3326 | CLK("omap_timer.1", "timer_sys_ck", &sys_clkin_ck, CK_443X), |
3318 | CLK("omap_timer.2", "timer_sys_ck", &sys_clkin_ck, CK_443X), | 3327 | CLK("omap_timer.2", "timer_sys_ck", &sys_clkin_ck, CK_443X), |
3319 | CLK("omap_timer.3", "timer_sys_ck", &sys_clkin_ck, CK_443X), | 3328 | CLK("omap_timer.3", "timer_sys_ck", &sys_clkin_ck, CK_443X), |
@@ -3325,6 +3334,18 @@ static struct omap_clk omap44xx_clks[] = { | |||
3325 | CLK("omap_timer.6", "timer_sys_ck", &syc_clk_div_ck, CK_443X), | 3334 | CLK("omap_timer.6", "timer_sys_ck", &syc_clk_div_ck, CK_443X), |
3326 | CLK("omap_timer.7", "timer_sys_ck", &syc_clk_div_ck, CK_443X), | 3335 | CLK("omap_timer.7", "timer_sys_ck", &syc_clk_div_ck, CK_443X), |
3327 | CLK("omap_timer.8", "timer_sys_ck", &syc_clk_div_ck, CK_443X), | 3336 | CLK("omap_timer.8", "timer_sys_ck", &syc_clk_div_ck, CK_443X), |
3337 | CLK("4a318000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X), | ||
3338 | CLK("48032000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X), | ||
3339 | CLK("48034000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X), | ||
3340 | CLK("48036000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X), | ||
3341 | CLK("4803e000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X), | ||
3342 | CLK("48086000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X), | ||
3343 | CLK("48088000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X), | ||
3344 | CLK("49038000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X), | ||
3345 | CLK("4903a000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X), | ||
3346 | CLK("4903c000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X), | ||
3347 | CLK("4903e000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X), | ||
3348 | CLK(NULL, "cpufreq_ck", &dpll_mpu_ck, CK_443X), | ||
3328 | }; | 3349 | }; |
3329 | 3350 | ||
3330 | int __init omap4xxx_clk_init(void) | 3351 | int __init omap4xxx_clk_init(void) |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index a1555627ad97..cbb879139c51 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -899,6 +899,23 @@ bool clkdm_in_hwsup(struct clockdomain *clkdm) | |||
899 | return ret; | 899 | return ret; |
900 | } | 900 | } |
901 | 901 | ||
902 | /** | ||
903 | * clkdm_missing_idle_reporting - can @clkdm enter autoidle even if in use? | ||
904 | * @clkdm: struct clockdomain * | ||
905 | * | ||
906 | * Returns true if clockdomain @clkdm has the | ||
907 | * CLKDM_MISSING_IDLE_REPORTING flag set, or false if not or @clkdm is | ||
908 | * null. More information is available in the documentation for the | ||
909 | * CLKDM_MISSING_IDLE_REPORTING macro. | ||
910 | */ | ||
911 | bool clkdm_missing_idle_reporting(struct clockdomain *clkdm) | ||
912 | { | ||
913 | if (!clkdm) | ||
914 | return false; | ||
915 | |||
916 | return (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) ? true : false; | ||
917 | } | ||
918 | |||
902 | /* Clockdomain-to-clock/hwmod framework interface code */ | 919 | /* Clockdomain-to-clock/hwmod framework interface code */ |
903 | 920 | ||
904 | static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm) | 921 | static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm) |
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 5601dc13785e..629576be7444 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-omap/include/mach/clockdomain.h | ||
3 | * | ||
4 | * OMAP2/3 clockdomain framework functions | 2 | * OMAP2/3 clockdomain framework functions |
5 | * | 3 | * |
6 | * Copyright (C) 2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2008, 2012 Texas Instruments, Inc. |
7 | * Copyright (C) 2008-2011 Nokia Corporation | 5 | * Copyright (C) 2008-2011 Nokia Corporation |
8 | * | 6 | * |
9 | * Paul Walmsley | 7 | * Paul Walmsley |
@@ -34,6 +32,20 @@ | |||
34 | * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is | 32 | * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is |
35 | * active whenever the MPU is active. True for interconnects and | 33 | * active whenever the MPU is active. True for interconnects and |
36 | * the WKUP clockdomains. | 34 | * the WKUP clockdomains. |
35 | * CLKDM_MISSING_IDLE_REPORTING: The idle status of the IP blocks and | ||
36 | * clocks inside this clockdomain are not taken into account by | ||
37 | * the PRCM when determining whether the clockdomain is idle. | ||
38 | * Without this flag, if the clockdomain is set to | ||
39 | * hardware-supervised idle mode, the PRCM may transition the | ||
40 | * enclosing powerdomain to a low power state, even when devices | ||
41 | * inside the clockdomain and powerdomain are in use. (An example | ||
42 | * of such a clockdomain is the EMU clockdomain on OMAP3/4.) If | ||
43 | * this flag is set, and the clockdomain does not support the | ||
44 | * force-sleep mode, then the HW_AUTO mode will be used to put the | ||
45 | * clockdomain to sleep. Similarly, if the clockdomain supports | ||
46 | * the force-wakeup mode, then it will be used whenever a clock or | ||
47 | * IP block inside the clockdomain is active, rather than the | ||
48 | * HW_AUTO mode. | ||
37 | */ | 49 | */ |
38 | #define CLKDM_CAN_FORCE_SLEEP (1 << 0) | 50 | #define CLKDM_CAN_FORCE_SLEEP (1 << 0) |
39 | #define CLKDM_CAN_FORCE_WAKEUP (1 << 1) | 51 | #define CLKDM_CAN_FORCE_WAKEUP (1 << 1) |
@@ -41,6 +53,7 @@ | |||
41 | #define CLKDM_CAN_DISABLE_AUTO (1 << 3) | 53 | #define CLKDM_CAN_DISABLE_AUTO (1 << 3) |
42 | #define CLKDM_NO_AUTODEPS (1 << 4) | 54 | #define CLKDM_NO_AUTODEPS (1 << 4) |
43 | #define CLKDM_ACTIVE_WITH_MPU (1 << 5) | 55 | #define CLKDM_ACTIVE_WITH_MPU (1 << 5) |
56 | #define CLKDM_MISSING_IDLE_REPORTING (1 << 6) | ||
44 | 57 | ||
45 | #define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) | 58 | #define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) |
46 | #define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) | 59 | #define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) |
@@ -187,6 +200,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); | |||
187 | void clkdm_allow_idle(struct clockdomain *clkdm); | 200 | void clkdm_allow_idle(struct clockdomain *clkdm); |
188 | void clkdm_deny_idle(struct clockdomain *clkdm); | 201 | void clkdm_deny_idle(struct clockdomain *clkdm); |
189 | bool clkdm_in_hwsup(struct clockdomain *clkdm); | 202 | bool clkdm_in_hwsup(struct clockdomain *clkdm); |
203 | bool clkdm_missing_idle_reporting(struct clockdomain *clkdm); | ||
190 | 204 | ||
191 | int clkdm_wakeup(struct clockdomain *clkdm); | 205 | int clkdm_wakeup(struct clockdomain *clkdm); |
192 | int clkdm_sleep(struct clockdomain *clkdm); | 206 | int clkdm_sleep(struct clockdomain *clkdm); |
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c index f99e65cfb862..9a7792aec673 100644 --- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c +++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c | |||
@@ -162,6 +162,19 @@ static void _disable_hwsup(struct clockdomain *clkdm) | |||
162 | clkdm->clktrctrl_mask); | 162 | clkdm->clktrctrl_mask); |
163 | } | 163 | } |
164 | 164 | ||
165 | static int omap3_clkdm_sleep(struct clockdomain *clkdm) | ||
166 | { | ||
167 | omap3xxx_cm_clkdm_force_sleep(clkdm->pwrdm.ptr->prcm_offs, | ||
168 | clkdm->clktrctrl_mask); | ||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | static int omap3_clkdm_wakeup(struct clockdomain *clkdm) | ||
173 | { | ||
174 | omap3xxx_cm_clkdm_force_wakeup(clkdm->pwrdm.ptr->prcm_offs, | ||
175 | clkdm->clktrctrl_mask); | ||
176 | return 0; | ||
177 | } | ||
165 | 178 | ||
166 | static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) | 179 | static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) |
167 | { | 180 | { |
@@ -170,6 +183,17 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) | |||
170 | if (!clkdm->clktrctrl_mask) | 183 | if (!clkdm->clktrctrl_mask) |
171 | return 0; | 184 | return 0; |
172 | 185 | ||
186 | /* | ||
187 | * The CLKDM_MISSING_IDLE_REPORTING flag documentation has | ||
188 | * more details on the unpleasant problem this is working | ||
189 | * around | ||
190 | */ | ||
191 | if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING && | ||
192 | !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) { | ||
193 | _enable_hwsup(clkdm); | ||
194 | return 0; | ||
195 | } | ||
196 | |||
173 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 197 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, |
174 | clkdm->clktrctrl_mask); | 198 | clkdm->clktrctrl_mask); |
175 | 199 | ||
@@ -193,6 +217,17 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm) | |||
193 | if (!clkdm->clktrctrl_mask) | 217 | if (!clkdm->clktrctrl_mask) |
194 | return 0; | 218 | return 0; |
195 | 219 | ||
220 | /* | ||
221 | * The CLKDM_MISSING_IDLE_REPORTING flag documentation has | ||
222 | * more details on the unpleasant problem this is working | ||
223 | * around | ||
224 | */ | ||
225 | if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) && | ||
226 | (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) { | ||
227 | omap3_clkdm_wakeup(clkdm); | ||
228 | return 0; | ||
229 | } | ||
230 | |||
196 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 231 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, |
197 | clkdm->clktrctrl_mask); | 232 | clkdm->clktrctrl_mask); |
198 | 233 | ||
@@ -209,20 +244,6 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm) | |||
209 | return 0; | 244 | return 0; |
210 | } | 245 | } |
211 | 246 | ||
212 | static int omap3_clkdm_sleep(struct clockdomain *clkdm) | ||
213 | { | ||
214 | omap3xxx_cm_clkdm_force_sleep(clkdm->pwrdm.ptr->prcm_offs, | ||
215 | clkdm->clktrctrl_mask); | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | static int omap3_clkdm_wakeup(struct clockdomain *clkdm) | ||
220 | { | ||
221 | omap3xxx_cm_clkdm_force_wakeup(clkdm->pwrdm.ptr->prcm_offs, | ||
222 | clkdm->clktrctrl_mask); | ||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | static void omap3_clkdm_allow_idle(struct clockdomain *clkdm) | 247 | static void omap3_clkdm_allow_idle(struct clockdomain *clkdm) |
227 | { | 248 | { |
228 | if (atomic_read(&clkdm->usecount) > 0) | 249 | if (atomic_read(&clkdm->usecount) > 0) |
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c index 762f2cc542ce..6fc6155625bc 100644 --- a/arch/arm/mach-omap2/clockdomain44xx.c +++ b/arch/arm/mach-omap2/clockdomain44xx.c | |||
@@ -113,6 +113,17 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) | |||
113 | if (!clkdm->prcm_partition) | 113 | if (!clkdm->prcm_partition) |
114 | return 0; | 114 | return 0; |
115 | 115 | ||
116 | /* | ||
117 | * The CLKDM_MISSING_IDLE_REPORTING flag documentation has | ||
118 | * more details on the unpleasant problem this is working | ||
119 | * around | ||
120 | */ | ||
121 | if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING && | ||
122 | !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) { | ||
123 | omap4_clkdm_allow_idle(clkdm); | ||
124 | return 0; | ||
125 | } | ||
126 | |||
116 | hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, | 127 | hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, |
117 | clkdm->cm_inst, clkdm->clkdm_offs); | 128 | clkdm->cm_inst, clkdm->clkdm_offs); |
118 | 129 | ||
diff --git a/arch/arm/mach-omap2/clockdomains3xxx_data.c b/arch/arm/mach-omap2/clockdomains3xxx_data.c index 56089c49142a..933a35cd124a 100644 --- a/arch/arm/mach-omap2/clockdomains3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains3xxx_data.c | |||
@@ -387,14 +387,11 @@ static struct clockdomain per_am35x_clkdm = { | |||
387 | .clktrctrl_mask = OMAP3430_CLKTRCTRL_PER_MASK, | 387 | .clktrctrl_mask = OMAP3430_CLKTRCTRL_PER_MASK, |
388 | }; | 388 | }; |
389 | 389 | ||
390 | /* | ||
391 | * Disable hw supervised mode for emu_clkdm, because emu_pwrdm is | ||
392 | * switched of even if sdti is in use | ||
393 | */ | ||
394 | static struct clockdomain emu_clkdm = { | 390 | static struct clockdomain emu_clkdm = { |
395 | .name = "emu_clkdm", | 391 | .name = "emu_clkdm", |
396 | .pwrdm = { .name = "emu_pwrdm" }, | 392 | .pwrdm = { .name = "emu_pwrdm" }, |
397 | .flags = /* CLKDM_CAN_ENABLE_AUTO | */CLKDM_CAN_SWSUP, | 393 | .flags = (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_SWSUP | |
394 | CLKDM_MISSING_IDLE_REPORTING), | ||
398 | .clktrctrl_mask = OMAP3430_CLKTRCTRL_EMU_MASK, | 395 | .clktrctrl_mask = OMAP3430_CLKTRCTRL_EMU_MASK, |
399 | }; | 396 | }; |
400 | 397 | ||
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index 63d60a773d3b..b56d06b48782 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c | |||
@@ -390,7 +390,8 @@ static struct clockdomain emu_sys_44xx_clkdm = { | |||
390 | .prcm_partition = OMAP4430_PRM_PARTITION, | 390 | .prcm_partition = OMAP4430_PRM_PARTITION, |
391 | .cm_inst = OMAP4430_PRM_EMU_CM_INST, | 391 | .cm_inst = OMAP4430_PRM_EMU_CM_INST, |
392 | .clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS, | 392 | .clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS, |
393 | .flags = CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_FORCE_WAKEUP, | 393 | .flags = (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_FORCE_WAKEUP | |
394 | CLKDM_MISSING_IDLE_REPORTING), | ||
394 | }; | 395 | }; |
395 | 396 | ||
396 | static struct clockdomain l3_dma_44xx_clkdm = { | 397 | static struct clockdomain l3_dma_44xx_clkdm = { |
diff --git a/arch/arm/mach-omap2/cm-regbits-33xx.h b/arch/arm/mach-omap2/cm-regbits-33xx.h index 532027ee3d8d..adf7bb79b18f 100644 --- a/arch/arm/mach-omap2/cm-regbits-33xx.h +++ b/arch/arm/mach-omap2/cm-regbits-33xx.h | |||
@@ -25,263 +25,328 @@ | |||
25 | * CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER | 25 | * CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER |
26 | */ | 26 | */ |
27 | #define AM33XX_AUTO_DPLL_MODE_SHIFT 0 | 27 | #define AM33XX_AUTO_DPLL_MODE_SHIFT 0 |
28 | #define AM33XX_AUTO_DPLL_MODE_WIDTH 3 | ||
28 | #define AM33XX_AUTO_DPLL_MODE_MASK (0x7 << 0) | 29 | #define AM33XX_AUTO_DPLL_MODE_MASK (0x7 << 0) |
29 | 30 | ||
30 | /* Used by CM_WKUP_CLKSTCTRL */ | 31 | /* Used by CM_WKUP_CLKSTCTRL */ |
31 | #define AM33XX_CLKACTIVITY_ADC_FCLK_SHIFT 14 | 32 | #define AM33XX_CLKACTIVITY_ADC_FCLK_SHIFT 14 |
33 | #define AM33XX_CLKACTIVITY_ADC_FCLK_WIDTH 1 | ||
32 | #define AM33XX_CLKACTIVITY_ADC_FCLK_MASK (1 << 16) | 34 | #define AM33XX_CLKACTIVITY_ADC_FCLK_MASK (1 << 16) |
33 | 35 | ||
34 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 36 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
35 | #define AM33XX_CLKACTIVITY_CAN_CLK_SHIFT 11 | 37 | #define AM33XX_CLKACTIVITY_CAN_CLK_SHIFT 11 |
38 | #define AM33XX_CLKACTIVITY_CAN_CLK_WIDTH 1 | ||
36 | #define AM33XX_CLKACTIVITY_CAN_CLK_MASK (1 << 11) | 39 | #define AM33XX_CLKACTIVITY_CAN_CLK_MASK (1 << 11) |
37 | 40 | ||
38 | /* Used by CM_PER_CLK_24MHZ_CLKSTCTRL */ | 41 | /* Used by CM_PER_CLK_24MHZ_CLKSTCTRL */ |
39 | #define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_SHIFT 4 | 42 | #define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_SHIFT 4 |
43 | #define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_WIDTH 1 | ||
40 | #define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_MASK (1 << 4) | 44 | #define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_MASK (1 << 4) |
41 | 45 | ||
42 | /* Used by CM_PER_CPSW_CLKSTCTRL */ | 46 | /* Used by CM_PER_CPSW_CLKSTCTRL */ |
43 | #define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_SHIFT 4 | 47 | #define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_SHIFT 4 |
48 | #define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_WIDTH 1 | ||
44 | #define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_MASK (1 << 4) | 49 | #define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_MASK (1 << 4) |
45 | 50 | ||
46 | /* Used by CM_PER_L4HS_CLKSTCTRL */ | 51 | /* Used by CM_PER_L4HS_CLKSTCTRL */ |
47 | #define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_SHIFT 4 | 52 | #define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_SHIFT 4 |
53 | #define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_WIDTH 1 | ||
48 | #define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_MASK (1 << 4) | 54 | #define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_MASK (1 << 4) |
49 | 55 | ||
50 | /* Used by CM_PER_L4HS_CLKSTCTRL */ | 56 | /* Used by CM_PER_L4HS_CLKSTCTRL */ |
51 | #define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_SHIFT 5 | 57 | #define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_SHIFT 5 |
58 | #define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_WIDTH 1 | ||
52 | #define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_MASK (1 << 5) | 59 | #define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_MASK (1 << 5) |
53 | 60 | ||
54 | /* Used by CM_PER_L4HS_CLKSTCTRL */ | 61 | /* Used by CM_PER_L4HS_CLKSTCTRL */ |
55 | #define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_SHIFT 6 | 62 | #define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_SHIFT 6 |
63 | #define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_WIDTH 1 | ||
56 | #define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_MASK (1 << 6) | 64 | #define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_MASK (1 << 6) |
57 | 65 | ||
58 | /* Used by CM_PER_L3_CLKSTCTRL */ | 66 | /* Used by CM_PER_L3_CLKSTCTRL */ |
59 | #define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_SHIFT 6 | 67 | #define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_SHIFT 6 |
68 | #define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_WIDTH 1 | ||
60 | #define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_MASK (1 << 6) | 69 | #define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_MASK (1 << 6) |
61 | 70 | ||
62 | /* Used by CM_CEFUSE_CLKSTCTRL */ | 71 | /* Used by CM_CEFUSE_CLKSTCTRL */ |
63 | #define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 | 72 | #define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 |
73 | #define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_WIDTH 1 | ||
64 | #define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) | 74 | #define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) |
65 | 75 | ||
66 | /* Used by CM_L3_AON_CLKSTCTRL */ | 76 | /* Used by CM_L3_AON_CLKSTCTRL */ |
67 | #define AM33XX_CLKACTIVITY_DBGSYSCLK_SHIFT 2 | 77 | #define AM33XX_CLKACTIVITY_DBGSYSCLK_SHIFT 2 |
78 | #define AM33XX_CLKACTIVITY_DBGSYSCLK_WIDTH 1 | ||
68 | #define AM33XX_CLKACTIVITY_DBGSYSCLK_MASK (1 << 2) | 79 | #define AM33XX_CLKACTIVITY_DBGSYSCLK_MASK (1 << 2) |
69 | 80 | ||
70 | /* Used by CM_L3_AON_CLKSTCTRL */ | 81 | /* Used by CM_L3_AON_CLKSTCTRL */ |
71 | #define AM33XX_CLKACTIVITY_DEBUG_CLKA_SHIFT 4 | 82 | #define AM33XX_CLKACTIVITY_DEBUG_CLKA_SHIFT 4 |
83 | #define AM33XX_CLKACTIVITY_DEBUG_CLKA_WIDTH 1 | ||
72 | #define AM33XX_CLKACTIVITY_DEBUG_CLKA_MASK (1 << 4) | 84 | #define AM33XX_CLKACTIVITY_DEBUG_CLKA_MASK (1 << 4) |
73 | 85 | ||
74 | /* Used by CM_PER_L3_CLKSTCTRL */ | 86 | /* Used by CM_PER_L3_CLKSTCTRL */ |
75 | #define AM33XX_CLKACTIVITY_EMIF_GCLK_SHIFT 2 | 87 | #define AM33XX_CLKACTIVITY_EMIF_GCLK_SHIFT 2 |
88 | #define AM33XX_CLKACTIVITY_EMIF_GCLK_WIDTH 1 | ||
76 | #define AM33XX_CLKACTIVITY_EMIF_GCLK_MASK (1 << 2) | 89 | #define AM33XX_CLKACTIVITY_EMIF_GCLK_MASK (1 << 2) |
77 | 90 | ||
78 | /* Used by CM_GFX_L3_CLKSTCTRL */ | 91 | /* Used by CM_GFX_L3_CLKSTCTRL */ |
79 | #define AM33XX_CLKACTIVITY_GFX_FCLK_SHIFT 9 | 92 | #define AM33XX_CLKACTIVITY_GFX_FCLK_SHIFT 9 |
93 | #define AM33XX_CLKACTIVITY_GFX_FCLK_WIDTH 1 | ||
80 | #define AM33XX_CLKACTIVITY_GFX_FCLK_MASK (1 << 9) | 94 | #define AM33XX_CLKACTIVITY_GFX_FCLK_MASK (1 << 9) |
81 | 95 | ||
82 | /* Used by CM_GFX_L3_CLKSTCTRL */ | 96 | /* Used by CM_GFX_L3_CLKSTCTRL */ |
83 | #define AM33XX_CLKACTIVITY_GFX_L3_GCLK_SHIFT 8 | 97 | #define AM33XX_CLKACTIVITY_GFX_L3_GCLK_SHIFT 8 |
98 | #define AM33XX_CLKACTIVITY_GFX_L3_GCLK_WIDTH 1 | ||
84 | #define AM33XX_CLKACTIVITY_GFX_L3_GCLK_MASK (1 << 8) | 99 | #define AM33XX_CLKACTIVITY_GFX_L3_GCLK_MASK (1 << 8) |
85 | 100 | ||
86 | /* Used by CM_WKUP_CLKSTCTRL */ | 101 | /* Used by CM_WKUP_CLKSTCTRL */ |
87 | #define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_SHIFT 8 | 102 | #define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_SHIFT 8 |
103 | #define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_WIDTH 1 | ||
88 | #define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_MASK (1 << 8) | 104 | #define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_MASK (1 << 8) |
89 | 105 | ||
90 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 106 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
91 | #define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_SHIFT 19 | 107 | #define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_SHIFT 19 |
108 | #define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_WIDTH 1 | ||
92 | #define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_MASK (1 << 19) | 109 | #define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_MASK (1 << 19) |
93 | 110 | ||
94 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 111 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
95 | #define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_SHIFT 20 | 112 | #define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_SHIFT 20 |
113 | #define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_WIDTH 1 | ||
96 | #define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_MASK (1 << 20) | 114 | #define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_MASK (1 << 20) |
97 | 115 | ||
98 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 116 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
99 | #define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_SHIFT 21 | 117 | #define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_SHIFT 21 |
118 | #define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_WIDTH 1 | ||
100 | #define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_MASK (1 << 21) | 119 | #define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_MASK (1 << 21) |
101 | 120 | ||
102 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 121 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
103 | #define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_SHIFT 22 | 122 | #define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_SHIFT 22 |
123 | #define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_WIDTH 1 | ||
104 | #define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_MASK (1 << 22) | 124 | #define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_MASK (1 << 22) |
105 | 125 | ||
106 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 126 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
107 | #define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_SHIFT 26 | 127 | #define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_SHIFT 26 |
128 | #define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_WIDTH 1 | ||
108 | #define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_MASK (1 << 26) | 129 | #define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_MASK (1 << 26) |
109 | 130 | ||
110 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 131 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
111 | #define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_SHIFT 18 | 132 | #define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_SHIFT 18 |
133 | #define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_WIDTH 1 | ||
112 | #define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_MASK (1 << 18) | 134 | #define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_MASK (1 << 18) |
113 | 135 | ||
114 | /* Used by CM_WKUP_CLKSTCTRL */ | 136 | /* Used by CM_WKUP_CLKSTCTRL */ |
115 | #define AM33XX_CLKACTIVITY_I2C0_GFCLK_SHIFT 11 | 137 | #define AM33XX_CLKACTIVITY_I2C0_GFCLK_SHIFT 11 |
138 | #define AM33XX_CLKACTIVITY_I2C0_GFCLK_WIDTH 1 | ||
116 | #define AM33XX_CLKACTIVITY_I2C0_GFCLK_MASK (1 << 11) | 139 | #define AM33XX_CLKACTIVITY_I2C0_GFCLK_MASK (1 << 11) |
117 | 140 | ||
118 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 141 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
119 | #define AM33XX_CLKACTIVITY_I2C_FCLK_SHIFT 24 | 142 | #define AM33XX_CLKACTIVITY_I2C_FCLK_SHIFT 24 |
143 | #define AM33XX_CLKACTIVITY_I2C_FCLK_WIDTH 1 | ||
120 | #define AM33XX_CLKACTIVITY_I2C_FCLK_MASK (1 << 24) | 144 | #define AM33XX_CLKACTIVITY_I2C_FCLK_MASK (1 << 24) |
121 | 145 | ||
122 | /* Used by CM_PER_PRUSS_CLKSTCTRL */ | 146 | /* Used by CM_PER_PRUSS_CLKSTCTRL */ |
123 | #define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_SHIFT 5 | 147 | #define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_SHIFT 5 |
148 | #define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_WIDTH 1 | ||
124 | #define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_MASK (1 << 5) | 149 | #define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_MASK (1 << 5) |
125 | 150 | ||
126 | /* Used by CM_PER_PRUSS_CLKSTCTRL */ | 151 | /* Used by CM_PER_PRUSS_CLKSTCTRL */ |
127 | #define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_SHIFT 4 | 152 | #define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_SHIFT 4 |
153 | #define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_WIDTH 1 | ||
128 | #define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_MASK (1 << 4) | 154 | #define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_MASK (1 << 4) |
129 | 155 | ||
130 | /* Used by CM_PER_PRUSS_CLKSTCTRL */ | 156 | /* Used by CM_PER_PRUSS_CLKSTCTRL */ |
131 | #define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_SHIFT 6 | 157 | #define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_SHIFT 6 |
158 | #define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_WIDTH 1 | ||
132 | #define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_MASK (1 << 6) | 159 | #define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_MASK (1 << 6) |
133 | 160 | ||
134 | /* Used by CM_PER_L3S_CLKSTCTRL */ | 161 | /* Used by CM_PER_L3S_CLKSTCTRL */ |
135 | #define AM33XX_CLKACTIVITY_L3S_GCLK_SHIFT 3 | 162 | #define AM33XX_CLKACTIVITY_L3S_GCLK_SHIFT 3 |
163 | #define AM33XX_CLKACTIVITY_L3S_GCLK_WIDTH 1 | ||
136 | #define AM33XX_CLKACTIVITY_L3S_GCLK_MASK (1 << 3) | 164 | #define AM33XX_CLKACTIVITY_L3S_GCLK_MASK (1 << 3) |
137 | 165 | ||
138 | /* Used by CM_L3_AON_CLKSTCTRL */ | 166 | /* Used by CM_L3_AON_CLKSTCTRL */ |
139 | #define AM33XX_CLKACTIVITY_L3_AON_GCLK_SHIFT 3 | 167 | #define AM33XX_CLKACTIVITY_L3_AON_GCLK_SHIFT 3 |
168 | #define AM33XX_CLKACTIVITY_L3_AON_GCLK_WIDTH 1 | ||
140 | #define AM33XX_CLKACTIVITY_L3_AON_GCLK_MASK (1 << 3) | 169 | #define AM33XX_CLKACTIVITY_L3_AON_GCLK_MASK (1 << 3) |
141 | 170 | ||
142 | /* Used by CM_PER_L3_CLKSTCTRL */ | 171 | /* Used by CM_PER_L3_CLKSTCTRL */ |
143 | #define AM33XX_CLKACTIVITY_L3_GCLK_SHIFT 4 | 172 | #define AM33XX_CLKACTIVITY_L3_GCLK_SHIFT 4 |
173 | #define AM33XX_CLKACTIVITY_L3_GCLK_WIDTH 1 | ||
144 | #define AM33XX_CLKACTIVITY_L3_GCLK_MASK (1 << 4) | 174 | #define AM33XX_CLKACTIVITY_L3_GCLK_MASK (1 << 4) |
145 | 175 | ||
146 | /* Used by CM_PER_L4FW_CLKSTCTRL */ | 176 | /* Used by CM_PER_L4FW_CLKSTCTRL */ |
147 | #define AM33XX_CLKACTIVITY_L4FW_GCLK_SHIFT 8 | 177 | #define AM33XX_CLKACTIVITY_L4FW_GCLK_SHIFT 8 |
178 | #define AM33XX_CLKACTIVITY_L4FW_GCLK_WIDTH 1 | ||
148 | #define AM33XX_CLKACTIVITY_L4FW_GCLK_MASK (1 << 8) | 179 | #define AM33XX_CLKACTIVITY_L4FW_GCLK_MASK (1 << 8) |
149 | 180 | ||
150 | /* Used by CM_PER_L4HS_CLKSTCTRL */ | 181 | /* Used by CM_PER_L4HS_CLKSTCTRL */ |
151 | #define AM33XX_CLKACTIVITY_L4HS_GCLK_SHIFT 3 | 182 | #define AM33XX_CLKACTIVITY_L4HS_GCLK_SHIFT 3 |
183 | #define AM33XX_CLKACTIVITY_L4HS_GCLK_WIDTH 1 | ||
152 | #define AM33XX_CLKACTIVITY_L4HS_GCLK_MASK (1 << 3) | 184 | #define AM33XX_CLKACTIVITY_L4HS_GCLK_MASK (1 << 3) |
153 | 185 | ||
154 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 186 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
155 | #define AM33XX_CLKACTIVITY_L4LS_GCLK_SHIFT 8 | 187 | #define AM33XX_CLKACTIVITY_L4LS_GCLK_SHIFT 8 |
188 | #define AM33XX_CLKACTIVITY_L4LS_GCLK_WIDTH 1 | ||
156 | #define AM33XX_CLKACTIVITY_L4LS_GCLK_MASK (1 << 8) | 189 | #define AM33XX_CLKACTIVITY_L4LS_GCLK_MASK (1 << 8) |
157 | 190 | ||
158 | /* Used by CM_GFX_L4LS_GFX_CLKSTCTRL__1 */ | 191 | /* Used by CM_GFX_L4LS_GFX_CLKSTCTRL__1 */ |
159 | #define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_SHIFT 8 | 192 | #define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_SHIFT 8 |
193 | #define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_WIDTH 1 | ||
160 | #define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_MASK (1 << 8) | 194 | #define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_MASK (1 << 8) |
161 | 195 | ||
162 | /* Used by CM_CEFUSE_CLKSTCTRL */ | 196 | /* Used by CM_CEFUSE_CLKSTCTRL */ |
163 | #define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 | 197 | #define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 |
198 | #define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_WIDTH 1 | ||
164 | #define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) | 199 | #define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) |
165 | 200 | ||
166 | /* Used by CM_RTC_CLKSTCTRL */ | 201 | /* Used by CM_RTC_CLKSTCTRL */ |
167 | #define AM33XX_CLKACTIVITY_L4_RTC_GCLK_SHIFT 8 | 202 | #define AM33XX_CLKACTIVITY_L4_RTC_GCLK_SHIFT 8 |
203 | #define AM33XX_CLKACTIVITY_L4_RTC_GCLK_WIDTH 1 | ||
168 | #define AM33XX_CLKACTIVITY_L4_RTC_GCLK_MASK (1 << 8) | 204 | #define AM33XX_CLKACTIVITY_L4_RTC_GCLK_MASK (1 << 8) |
169 | 205 | ||
170 | /* Used by CM_L4_WKUP_AON_CLKSTCTRL */ | 206 | /* Used by CM_L4_WKUP_AON_CLKSTCTRL */ |
171 | #define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_SHIFT 2 | 207 | #define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_SHIFT 2 |
208 | #define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_WIDTH 1 | ||
172 | #define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_MASK (1 << 2) | 209 | #define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_MASK (1 << 2) |
173 | 210 | ||
174 | /* Used by CM_WKUP_CLKSTCTRL */ | 211 | /* Used by CM_WKUP_CLKSTCTRL */ |
175 | #define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_SHIFT 2 | 212 | #define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_SHIFT 2 |
213 | #define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_WIDTH 1 | ||
176 | #define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_MASK (1 << 2) | 214 | #define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_MASK (1 << 2) |
177 | 215 | ||
178 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 216 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
179 | #define AM33XX_CLKACTIVITY_LCDC_GCLK_SHIFT 17 | 217 | #define AM33XX_CLKACTIVITY_LCDC_GCLK_SHIFT 17 |
218 | #define AM33XX_CLKACTIVITY_LCDC_GCLK_WIDTH 1 | ||
180 | #define AM33XX_CLKACTIVITY_LCDC_GCLK_MASK (1 << 17) | 219 | #define AM33XX_CLKACTIVITY_LCDC_GCLK_MASK (1 << 17) |
181 | 220 | ||
182 | /* Used by CM_PER_LCDC_CLKSTCTRL */ | 221 | /* Used by CM_PER_LCDC_CLKSTCTRL */ |
183 | #define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_SHIFT 4 | 222 | #define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_SHIFT 4 |
223 | #define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_WIDTH 1 | ||
184 | #define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_MASK (1 << 4) | 224 | #define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_MASK (1 << 4) |
185 | 225 | ||
186 | /* Used by CM_PER_LCDC_CLKSTCTRL */ | 226 | /* Used by CM_PER_LCDC_CLKSTCTRL */ |
187 | #define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_SHIFT 5 | 227 | #define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_SHIFT 5 |
228 | #define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_WIDTH 1 | ||
188 | #define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_MASK (1 << 5) | 229 | #define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_MASK (1 << 5) |
189 | 230 | ||
190 | /* Used by CM_PER_L3_CLKSTCTRL */ | 231 | /* Used by CM_PER_L3_CLKSTCTRL */ |
191 | #define AM33XX_CLKACTIVITY_MCASP_GCLK_SHIFT 7 | 232 | #define AM33XX_CLKACTIVITY_MCASP_GCLK_SHIFT 7 |
233 | #define AM33XX_CLKACTIVITY_MCASP_GCLK_WIDTH 1 | ||
192 | #define AM33XX_CLKACTIVITY_MCASP_GCLK_MASK (1 << 7) | 234 | #define AM33XX_CLKACTIVITY_MCASP_GCLK_MASK (1 << 7) |
193 | 235 | ||
194 | /* Used by CM_PER_L3_CLKSTCTRL */ | 236 | /* Used by CM_PER_L3_CLKSTCTRL */ |
195 | #define AM33XX_CLKACTIVITY_MMC_FCLK_SHIFT 3 | 237 | #define AM33XX_CLKACTIVITY_MMC_FCLK_SHIFT 3 |
238 | #define AM33XX_CLKACTIVITY_MMC_FCLK_WIDTH 1 | ||
196 | #define AM33XX_CLKACTIVITY_MMC_FCLK_MASK (1 << 3) | 239 | #define AM33XX_CLKACTIVITY_MMC_FCLK_MASK (1 << 3) |
197 | 240 | ||
198 | /* Used by CM_MPU_CLKSTCTRL */ | 241 | /* Used by CM_MPU_CLKSTCTRL */ |
199 | #define AM33XX_CLKACTIVITY_MPU_CLK_SHIFT 2 | 242 | #define AM33XX_CLKACTIVITY_MPU_CLK_SHIFT 2 |
243 | #define AM33XX_CLKACTIVITY_MPU_CLK_WIDTH 1 | ||
200 | #define AM33XX_CLKACTIVITY_MPU_CLK_MASK (1 << 2) | 244 | #define AM33XX_CLKACTIVITY_MPU_CLK_MASK (1 << 2) |
201 | 245 | ||
202 | /* Used by CM_PER_OCPWP_L3_CLKSTCTRL */ | 246 | /* Used by CM_PER_OCPWP_L3_CLKSTCTRL */ |
203 | #define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_SHIFT 4 | 247 | #define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_SHIFT 4 |
248 | #define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_WIDTH 1 | ||
204 | #define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_MASK (1 << 4) | 249 | #define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_MASK (1 << 4) |
205 | 250 | ||
206 | /* Used by CM_PER_OCPWP_L3_CLKSTCTRL */ | 251 | /* Used by CM_PER_OCPWP_L3_CLKSTCTRL */ |
207 | #define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_SHIFT 5 | 252 | #define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_SHIFT 5 |
253 | #define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_WIDTH 1 | ||
208 | #define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_MASK (1 << 5) | 254 | #define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_MASK (1 << 5) |
209 | 255 | ||
210 | /* Used by CM_RTC_CLKSTCTRL */ | 256 | /* Used by CM_RTC_CLKSTCTRL */ |
211 | #define AM33XX_CLKACTIVITY_RTC_32KCLK_SHIFT 9 | 257 | #define AM33XX_CLKACTIVITY_RTC_32KCLK_SHIFT 9 |
258 | #define AM33XX_CLKACTIVITY_RTC_32KCLK_WIDTH 1 | ||
212 | #define AM33XX_CLKACTIVITY_RTC_32KCLK_MASK (1 << 9) | 259 | #define AM33XX_CLKACTIVITY_RTC_32KCLK_MASK (1 << 9) |
213 | 260 | ||
214 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 261 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
215 | #define AM33XX_CLKACTIVITY_SPI_GCLK_SHIFT 25 | 262 | #define AM33XX_CLKACTIVITY_SPI_GCLK_SHIFT 25 |
263 | #define AM33XX_CLKACTIVITY_SPI_GCLK_WIDTH 1 | ||
216 | #define AM33XX_CLKACTIVITY_SPI_GCLK_MASK (1 << 25) | 264 | #define AM33XX_CLKACTIVITY_SPI_GCLK_MASK (1 << 25) |
217 | 265 | ||
218 | /* Used by CM_WKUP_CLKSTCTRL */ | 266 | /* Used by CM_WKUP_CLKSTCTRL */ |
219 | #define AM33XX_CLKACTIVITY_SR_SYSCLK_SHIFT 3 | 267 | #define AM33XX_CLKACTIVITY_SR_SYSCLK_SHIFT 3 |
268 | #define AM33XX_CLKACTIVITY_SR_SYSCLK_WIDTH 1 | ||
220 | #define AM33XX_CLKACTIVITY_SR_SYSCLK_MASK (1 << 3) | 269 | #define AM33XX_CLKACTIVITY_SR_SYSCLK_MASK (1 << 3) |
221 | 270 | ||
222 | /* Used by CM_WKUP_CLKSTCTRL */ | 271 | /* Used by CM_WKUP_CLKSTCTRL */ |
223 | #define AM33XX_CLKACTIVITY_TIMER0_GCLK_SHIFT 10 | 272 | #define AM33XX_CLKACTIVITY_TIMER0_GCLK_SHIFT 10 |
273 | #define AM33XX_CLKACTIVITY_TIMER0_GCLK_WIDTH 1 | ||
224 | #define AM33XX_CLKACTIVITY_TIMER0_GCLK_MASK (1 << 10) | 274 | #define AM33XX_CLKACTIVITY_TIMER0_GCLK_MASK (1 << 10) |
225 | 275 | ||
226 | /* Used by CM_WKUP_CLKSTCTRL */ | 276 | /* Used by CM_WKUP_CLKSTCTRL */ |
227 | #define AM33XX_CLKACTIVITY_TIMER1_GCLK_SHIFT 13 | 277 | #define AM33XX_CLKACTIVITY_TIMER1_GCLK_SHIFT 13 |
278 | #define AM33XX_CLKACTIVITY_TIMER1_GCLK_WIDTH 1 | ||
228 | #define AM33XX_CLKACTIVITY_TIMER1_GCLK_MASK (1 << 13) | 279 | #define AM33XX_CLKACTIVITY_TIMER1_GCLK_MASK (1 << 13) |
229 | 280 | ||
230 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 281 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
231 | #define AM33XX_CLKACTIVITY_TIMER2_GCLK_SHIFT 14 | 282 | #define AM33XX_CLKACTIVITY_TIMER2_GCLK_SHIFT 14 |
283 | #define AM33XX_CLKACTIVITY_TIMER2_GCLK_WIDTH 1 | ||
232 | #define AM33XX_CLKACTIVITY_TIMER2_GCLK_MASK (1 << 14) | 284 | #define AM33XX_CLKACTIVITY_TIMER2_GCLK_MASK (1 << 14) |
233 | 285 | ||
234 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 286 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
235 | #define AM33XX_CLKACTIVITY_TIMER3_GCLK_SHIFT 15 | 287 | #define AM33XX_CLKACTIVITY_TIMER3_GCLK_SHIFT 15 |
288 | #define AM33XX_CLKACTIVITY_TIMER3_GCLK_WIDTH 1 | ||
236 | #define AM33XX_CLKACTIVITY_TIMER3_GCLK_MASK (1 << 15) | 289 | #define AM33XX_CLKACTIVITY_TIMER3_GCLK_MASK (1 << 15) |
237 | 290 | ||
238 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 291 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
239 | #define AM33XX_CLKACTIVITY_TIMER4_GCLK_SHIFT 16 | 292 | #define AM33XX_CLKACTIVITY_TIMER4_GCLK_SHIFT 16 |
293 | #define AM33XX_CLKACTIVITY_TIMER4_GCLK_WIDTH 1 | ||
240 | #define AM33XX_CLKACTIVITY_TIMER4_GCLK_MASK (1 << 16) | 294 | #define AM33XX_CLKACTIVITY_TIMER4_GCLK_MASK (1 << 16) |
241 | 295 | ||
242 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 296 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
243 | #define AM33XX_CLKACTIVITY_TIMER5_GCLK_SHIFT 27 | 297 | #define AM33XX_CLKACTIVITY_TIMER5_GCLK_SHIFT 27 |
298 | #define AM33XX_CLKACTIVITY_TIMER5_GCLK_WIDTH 1 | ||
244 | #define AM33XX_CLKACTIVITY_TIMER5_GCLK_MASK (1 << 27) | 299 | #define AM33XX_CLKACTIVITY_TIMER5_GCLK_MASK (1 << 27) |
245 | 300 | ||
246 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 301 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
247 | #define AM33XX_CLKACTIVITY_TIMER6_GCLK_SHIFT 28 | 302 | #define AM33XX_CLKACTIVITY_TIMER6_GCLK_SHIFT 28 |
303 | #define AM33XX_CLKACTIVITY_TIMER6_GCLK_WIDTH 1 | ||
248 | #define AM33XX_CLKACTIVITY_TIMER6_GCLK_MASK (1 << 28) | 304 | #define AM33XX_CLKACTIVITY_TIMER6_GCLK_MASK (1 << 28) |
249 | 305 | ||
250 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 306 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
251 | #define AM33XX_CLKACTIVITY_TIMER7_GCLK_SHIFT 13 | 307 | #define AM33XX_CLKACTIVITY_TIMER7_GCLK_SHIFT 13 |
308 | #define AM33XX_CLKACTIVITY_TIMER7_GCLK_WIDTH 1 | ||
252 | #define AM33XX_CLKACTIVITY_TIMER7_GCLK_MASK (1 << 13) | 309 | #define AM33XX_CLKACTIVITY_TIMER7_GCLK_MASK (1 << 13) |
253 | 310 | ||
254 | /* Used by CM_WKUP_CLKSTCTRL */ | 311 | /* Used by CM_WKUP_CLKSTCTRL */ |
255 | #define AM33XX_CLKACTIVITY_UART0_GFCLK_SHIFT 12 | 312 | #define AM33XX_CLKACTIVITY_UART0_GFCLK_SHIFT 12 |
313 | #define AM33XX_CLKACTIVITY_UART0_GFCLK_WIDTH 1 | ||
256 | #define AM33XX_CLKACTIVITY_UART0_GFCLK_MASK (1 << 12) | 314 | #define AM33XX_CLKACTIVITY_UART0_GFCLK_MASK (1 << 12) |
257 | 315 | ||
258 | /* Used by CM_PER_L4LS_CLKSTCTRL */ | 316 | /* Used by CM_PER_L4LS_CLKSTCTRL */ |
259 | #define AM33XX_CLKACTIVITY_UART_GFCLK_SHIFT 10 | 317 | #define AM33XX_CLKACTIVITY_UART_GFCLK_SHIFT 10 |
318 | #define AM33XX_CLKACTIVITY_UART_GFCLK_WIDTH 1 | ||
260 | #define AM33XX_CLKACTIVITY_UART_GFCLK_MASK (1 << 10) | 319 | #define AM33XX_CLKACTIVITY_UART_GFCLK_MASK (1 << 10) |
261 | 320 | ||
262 | /* Used by CM_WKUP_CLKSTCTRL */ | 321 | /* Used by CM_WKUP_CLKSTCTRL */ |
263 | #define AM33XX_CLKACTIVITY_WDT0_GCLK_SHIFT 9 | 322 | #define AM33XX_CLKACTIVITY_WDT0_GCLK_SHIFT 9 |
323 | #define AM33XX_CLKACTIVITY_WDT0_GCLK_WIDTH 1 | ||
264 | #define AM33XX_CLKACTIVITY_WDT0_GCLK_MASK (1 << 9) | 324 | #define AM33XX_CLKACTIVITY_WDT0_GCLK_MASK (1 << 9) |
265 | 325 | ||
266 | /* Used by CM_WKUP_CLKSTCTRL */ | 326 | /* Used by CM_WKUP_CLKSTCTRL */ |
267 | #define AM33XX_CLKACTIVITY_WDT1_GCLK_SHIFT 4 | 327 | #define AM33XX_CLKACTIVITY_WDT1_GCLK_SHIFT 4 |
328 | #define AM33XX_CLKACTIVITY_WDT1_GCLK_WIDTH 1 | ||
268 | #define AM33XX_CLKACTIVITY_WDT1_GCLK_MASK (1 << 4) | 329 | #define AM33XX_CLKACTIVITY_WDT1_GCLK_MASK (1 << 4) |
269 | 330 | ||
270 | /* Used by CLKSEL_GFX_FCLK */ | 331 | /* Used by CLKSEL_GFX_FCLK */ |
271 | #define AM33XX_CLKDIV_SEL_GFX_FCLK_SHIFT 0 | 332 | #define AM33XX_CLKDIV_SEL_GFX_FCLK_SHIFT 0 |
333 | #define AM33XX_CLKDIV_SEL_GFX_FCLK_WIDTH 1 | ||
272 | #define AM33XX_CLKDIV_SEL_GFX_FCLK_MASK (1 << 0) | 334 | #define AM33XX_CLKDIV_SEL_GFX_FCLK_MASK (1 << 0) |
273 | 335 | ||
274 | /* Used by CM_CLKOUT_CTRL */ | 336 | /* Used by CM_CLKOUT_CTRL */ |
275 | #define AM33XX_CLKOUT2DIV_SHIFT 3 | 337 | #define AM33XX_CLKOUT2DIV_SHIFT 3 |
276 | #define AM33XX_CLKOUT2DIV_MASK (0x05 << 3) | 338 | #define AM33XX_CLKOUT2DIV_WIDTH 3 |
339 | #define AM33XX_CLKOUT2DIV_MASK (0x7 << 3) | ||
277 | 340 | ||
278 | /* Used by CM_CLKOUT_CTRL */ | 341 | /* Used by CM_CLKOUT_CTRL */ |
279 | #define AM33XX_CLKOUT2EN_SHIFT 7 | 342 | #define AM33XX_CLKOUT2EN_SHIFT 7 |
343 | #define AM33XX_CLKOUT2EN_WIDTH 1 | ||
280 | #define AM33XX_CLKOUT2EN_MASK (1 << 7) | 344 | #define AM33XX_CLKOUT2EN_MASK (1 << 7) |
281 | 345 | ||
282 | /* Used by CM_CLKOUT_CTRL */ | 346 | /* Used by CM_CLKOUT_CTRL */ |
283 | #define AM33XX_CLKOUT2SOURCE_SHIFT 0 | 347 | #define AM33XX_CLKOUT2SOURCE_SHIFT 0 |
284 | #define AM33XX_CLKOUT2SOURCE_MASK (0x02 << 0) | 348 | #define AM33XX_CLKOUT2SOURCE_WIDTH 3 |
349 | #define AM33XX_CLKOUT2SOURCE_MASK (0x7 << 0) | ||
285 | 350 | ||
286 | /* | 351 | /* |
287 | * Used by CLKSEL_GPIO0_DBCLK, CLKSEL_LCDC_PIXEL_CLK, CLKSEL_TIMER2_CLK, | 352 | * Used by CLKSEL_GPIO0_DBCLK, CLKSEL_LCDC_PIXEL_CLK, CLKSEL_TIMER2_CLK, |
@@ -289,6 +354,7 @@ | |||
289 | * CLKSEL_TIMER7_CLK | 354 | * CLKSEL_TIMER7_CLK |
290 | */ | 355 | */ |
291 | #define AM33XX_CLKSEL_SHIFT 0 | 356 | #define AM33XX_CLKSEL_SHIFT 0 |
357 | #define AM33XX_CLKSEL_WIDTH 1 | ||
292 | #define AM33XX_CLKSEL_MASK (0x01 << 0) | 358 | #define AM33XX_CLKSEL_MASK (0x01 << 0) |
293 | 359 | ||
294 | /* | 360 | /* |
@@ -296,17 +362,21 @@ | |||
296 | * CM_CPTS_RFT_CLKSEL | 362 | * CM_CPTS_RFT_CLKSEL |
297 | */ | 363 | */ |
298 | #define AM33XX_CLKSEL_0_0_SHIFT 0 | 364 | #define AM33XX_CLKSEL_0_0_SHIFT 0 |
365 | #define AM33XX_CLKSEL_0_0_WIDTH 1 | ||
299 | #define AM33XX_CLKSEL_0_0_MASK (1 << 0) | 366 | #define AM33XX_CLKSEL_0_0_MASK (1 << 0) |
300 | 367 | ||
301 | #define AM33XX_CLKSEL_0_1_SHIFT 0 | 368 | #define AM33XX_CLKSEL_0_1_SHIFT 0 |
369 | #define AM33XX_CLKSEL_0_1_WIDTH 2 | ||
302 | #define AM33XX_CLKSEL_0_1_MASK (3 << 0) | 370 | #define AM33XX_CLKSEL_0_1_MASK (3 << 0) |
303 | 371 | ||
304 | /* Renamed from CLKSEL Used by CLKSEL_TIMER1MS_CLK */ | 372 | /* Renamed from CLKSEL Used by CLKSEL_TIMER1MS_CLK */ |
305 | #define AM33XX_CLKSEL_0_2_SHIFT 0 | 373 | #define AM33XX_CLKSEL_0_2_SHIFT 0 |
374 | #define AM33XX_CLKSEL_0_2_WIDTH 3 | ||
306 | #define AM33XX_CLKSEL_0_2_MASK (7 << 0) | 375 | #define AM33XX_CLKSEL_0_2_MASK (7 << 0) |
307 | 376 | ||
308 | /* Used by CLKSEL_GFX_FCLK */ | 377 | /* Used by CLKSEL_GFX_FCLK */ |
309 | #define AM33XX_CLKSEL_GFX_FCLK_SHIFT 1 | 378 | #define AM33XX_CLKSEL_GFX_FCLK_SHIFT 1 |
379 | #define AM33XX_CLKSEL_GFX_FCLK_WIDTH 1 | ||
310 | #define AM33XX_CLKSEL_GFX_FCLK_MASK (1 << 1) | 380 | #define AM33XX_CLKSEL_GFX_FCLK_MASK (1 << 1) |
311 | 381 | ||
312 | /* | 382 | /* |
@@ -318,6 +388,7 @@ | |||
318 | * CM_GFX_L3_CLKSTCTRL, CM_GFX_L4LS_GFX_CLKSTCTRL__1, CM_CEFUSE_CLKSTCTRL | 388 | * CM_GFX_L3_CLKSTCTRL, CM_GFX_L4LS_GFX_CLKSTCTRL__1, CM_CEFUSE_CLKSTCTRL |
319 | */ | 389 | */ |
320 | #define AM33XX_CLKTRCTRL_SHIFT 0 | 390 | #define AM33XX_CLKTRCTRL_SHIFT 0 |
391 | #define AM33XX_CLKTRCTRL_WIDTH 2 | ||
321 | #define AM33XX_CLKTRCTRL_MASK (0x3 << 0) | 392 | #define AM33XX_CLKTRCTRL_MASK (0x3 << 0) |
322 | 393 | ||
323 | /* | 394 | /* |
@@ -326,34 +397,42 @@ | |||
326 | * CM_SSC_DELTAMSTEP_DPLL_PER | 397 | * CM_SSC_DELTAMSTEP_DPLL_PER |
327 | */ | 398 | */ |
328 | #define AM33XX_DELTAMSTEP_SHIFT 0 | 399 | #define AM33XX_DELTAMSTEP_SHIFT 0 |
329 | #define AM33XX_DELTAMSTEP_MASK (0x19 << 0) | 400 | #define AM33XX_DELTAMSTEP_WIDTH 20 |
401 | #define AM33XX_DELTAMSTEP_MASK (0xfffff << 0) | ||
330 | 402 | ||
331 | /* Used by CM_CLKSEL_DPLL_DDR, CM_CLKSEL_DPLL_DISP, CM_CLKSEL_DPLL_MPU */ | 403 | /* Used by CM_CLKSEL_DPLL_DDR, CM_CLKSEL_DPLL_DISP, CM_CLKSEL_DPLL_MPU */ |
332 | #define AM33XX_DPLL_BYP_CLKSEL_SHIFT 23 | 404 | #define AM33XX_DPLL_BYP_CLKSEL_SHIFT 23 |
405 | #define AM33XX_DPLL_BYP_CLKSEL_WIDTH 1 | ||
333 | #define AM33XX_DPLL_BYP_CLKSEL_MASK (1 << 23) | 406 | #define AM33XX_DPLL_BYP_CLKSEL_MASK (1 << 23) |
334 | 407 | ||
335 | /* Used by CM_CLKDCOLDO_DPLL_PER */ | 408 | /* Used by CM_CLKDCOLDO_DPLL_PER */ |
336 | #define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 | 409 | #define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 |
410 | #define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_WIDTH 1 | ||
337 | #define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) | 411 | #define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) |
338 | 412 | ||
339 | /* Used by CM_CLKDCOLDO_DPLL_PER */ | 413 | /* Used by CM_CLKDCOLDO_DPLL_PER */ |
340 | #define AM33XX_DPLL_CLKDCOLDO_PWDN_SHIFT 12 | 414 | #define AM33XX_DPLL_CLKDCOLDO_PWDN_SHIFT 12 |
415 | #define AM33XX_DPLL_CLKDCOLDO_PWDN_WIDTH 1 | ||
341 | #define AM33XX_DPLL_CLKDCOLDO_PWDN_MASK (1 << 12) | 416 | #define AM33XX_DPLL_CLKDCOLDO_PWDN_MASK (1 << 12) |
342 | 417 | ||
343 | /* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */ | 418 | /* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */ |
344 | #define AM33XX_DPLL_CLKOUT_DIV_SHIFT 0 | 419 | #define AM33XX_DPLL_CLKOUT_DIV_SHIFT 0 |
420 | #define AM33XX_DPLL_CLKOUT_DIV_WIDTH 5 | ||
345 | #define AM33XX_DPLL_CLKOUT_DIV_MASK (0x1f << 0) | 421 | #define AM33XX_DPLL_CLKOUT_DIV_MASK (0x1f << 0) |
346 | 422 | ||
347 | /* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_PER */ | 423 | /* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_PER */ |
348 | #define AM33XX_DPLL_CLKOUT_DIV_0_6_SHIFT 0 | 424 | #define AM33XX_DPLL_CLKOUT_DIV_0_6_SHIFT 0 |
349 | #define AM33XX_DPLL_CLKOUT_DIV_0_6_MASK (0x06 << 0) | 425 | #define AM33XX_DPLL_CLKOUT_DIV_0_6_WIDTH 7 |
426 | #define AM33XX_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) | ||
350 | 427 | ||
351 | /* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */ | 428 | /* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */ |
352 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_SHIFT 5 | 429 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_SHIFT 5 |
430 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_WIDTH 1 | ||
353 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) | 431 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) |
354 | 432 | ||
355 | /* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_PER */ | 433 | /* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_PER */ |
356 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_SHIFT 7 | 434 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_SHIFT 7 |
435 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_WIDTH 1 | ||
357 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_MASK (1 << 7) | 436 | #define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_MASK (1 << 7) |
358 | 437 | ||
359 | /* | 438 | /* |
@@ -361,6 +440,7 @@ | |||
361 | * CM_DIV_M2_DPLL_PER | 440 | * CM_DIV_M2_DPLL_PER |
362 | */ | 441 | */ |
363 | #define AM33XX_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 | 442 | #define AM33XX_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 |
443 | #define AM33XX_DPLL_CLKOUT_GATE_CTRL_WIDTH 1 | ||
364 | #define AM33XX_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) | 444 | #define AM33XX_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) |
365 | 445 | ||
366 | /* | 446 | /* |
@@ -368,19 +448,22 @@ | |||
368 | * CM_CLKSEL_DPLL_MPU | 448 | * CM_CLKSEL_DPLL_MPU |
369 | */ | 449 | */ |
370 | #define AM33XX_DPLL_DIV_SHIFT 0 | 450 | #define AM33XX_DPLL_DIV_SHIFT 0 |
451 | #define AM33XX_DPLL_DIV_WIDTH 7 | ||
371 | #define AM33XX_DPLL_DIV_MASK (0x7f << 0) | 452 | #define AM33XX_DPLL_DIV_MASK (0x7f << 0) |
372 | 453 | ||
373 | #define AM33XX_DPLL_PER_DIV_MASK (0xff << 0) | 454 | #define AM33XX_DPLL_PER_DIV_MASK (0xff << 0) |
374 | 455 | ||
375 | /* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_PERIPH */ | 456 | /* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_PERIPH */ |
376 | #define AM33XX_DPLL_DIV_0_7_SHIFT 0 | 457 | #define AM33XX_DPLL_DIV_0_7_SHIFT 0 |
377 | #define AM33XX_DPLL_DIV_0_7_MASK (0x07 << 0) | 458 | #define AM33XX_DPLL_DIV_0_7_WIDTH 8 |
459 | #define AM33XX_DPLL_DIV_0_7_MASK (0xff << 0) | ||
378 | 460 | ||
379 | /* | 461 | /* |
380 | * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP, | 462 | * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP, |
381 | * CM_CLKMODE_DPLL_MPU | 463 | * CM_CLKMODE_DPLL_MPU |
382 | */ | 464 | */ |
383 | #define AM33XX_DPLL_DRIFTGUARD_EN_SHIFT 8 | 465 | #define AM33XX_DPLL_DRIFTGUARD_EN_SHIFT 8 |
466 | #define AM33XX_DPLL_DRIFTGUARD_EN_WIDTH 1 | ||
384 | #define AM33XX_DPLL_DRIFTGUARD_EN_MASK (1 << 8) | 467 | #define AM33XX_DPLL_DRIFTGUARD_EN_MASK (1 << 8) |
385 | 468 | ||
386 | /* | 469 | /* |
@@ -388,6 +471,7 @@ | |||
388 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER | 471 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER |
389 | */ | 472 | */ |
390 | #define AM33XX_DPLL_EN_SHIFT 0 | 473 | #define AM33XX_DPLL_EN_SHIFT 0 |
474 | #define AM33XX_DPLL_EN_WIDTH 3 | ||
391 | #define AM33XX_DPLL_EN_MASK (0x7 << 0) | 475 | #define AM33XX_DPLL_EN_MASK (0x7 << 0) |
392 | 476 | ||
393 | /* | 477 | /* |
@@ -395,6 +479,7 @@ | |||
395 | * CM_CLKMODE_DPLL_MPU | 479 | * CM_CLKMODE_DPLL_MPU |
396 | */ | 480 | */ |
397 | #define AM33XX_DPLL_LPMODE_EN_SHIFT 10 | 481 | #define AM33XX_DPLL_LPMODE_EN_SHIFT 10 |
482 | #define AM33XX_DPLL_LPMODE_EN_WIDTH 1 | ||
398 | #define AM33XX_DPLL_LPMODE_EN_MASK (1 << 10) | 483 | #define AM33XX_DPLL_LPMODE_EN_MASK (1 << 10) |
399 | 484 | ||
400 | /* | 485 | /* |
@@ -402,10 +487,12 @@ | |||
402 | * CM_CLKSEL_DPLL_MPU | 487 | * CM_CLKSEL_DPLL_MPU |
403 | */ | 488 | */ |
404 | #define AM33XX_DPLL_MULT_SHIFT 8 | 489 | #define AM33XX_DPLL_MULT_SHIFT 8 |
490 | #define AM33XX_DPLL_MULT_WIDTH 11 | ||
405 | #define AM33XX_DPLL_MULT_MASK (0x7ff << 8) | 491 | #define AM33XX_DPLL_MULT_MASK (0x7ff << 8) |
406 | 492 | ||
407 | /* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_PERIPH */ | 493 | /* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_PERIPH */ |
408 | #define AM33XX_DPLL_MULT_PERIPH_SHIFT 8 | 494 | #define AM33XX_DPLL_MULT_PERIPH_SHIFT 8 |
495 | #define AM33XX_DPLL_MULT_PERIPH_WIDTH 12 | ||
409 | #define AM33XX_DPLL_MULT_PERIPH_MASK (0xfff << 8) | 496 | #define AM33XX_DPLL_MULT_PERIPH_MASK (0xfff << 8) |
410 | 497 | ||
411 | /* | 498 | /* |
@@ -413,17 +500,20 @@ | |||
413 | * CM_CLKMODE_DPLL_MPU | 500 | * CM_CLKMODE_DPLL_MPU |
414 | */ | 501 | */ |
415 | #define AM33XX_DPLL_REGM4XEN_SHIFT 11 | 502 | #define AM33XX_DPLL_REGM4XEN_SHIFT 11 |
503 | #define AM33XX_DPLL_REGM4XEN_WIDTH 1 | ||
416 | #define AM33XX_DPLL_REGM4XEN_MASK (1 << 11) | 504 | #define AM33XX_DPLL_REGM4XEN_MASK (1 << 11) |
417 | 505 | ||
418 | /* Used by CM_CLKSEL_DPLL_PERIPH */ | 506 | /* Used by CM_CLKSEL_DPLL_PERIPH */ |
419 | #define AM33XX_DPLL_SD_DIV_SHIFT 24 | 507 | #define AM33XX_DPLL_SD_DIV_SHIFT 24 |
420 | #define AM33XX_DPLL_SD_DIV_MASK (24, 31) | 508 | #define AM33XX_DPLL_SD_DIV_WIDTH 8 |
509 | #define AM33XX_DPLL_SD_DIV_MASK (0xff << 24) | ||
421 | 510 | ||
422 | /* | 511 | /* |
423 | * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP, | 512 | * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP, |
424 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER | 513 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER |
425 | */ | 514 | */ |
426 | #define AM33XX_DPLL_SSC_ACK_SHIFT 13 | 515 | #define AM33XX_DPLL_SSC_ACK_SHIFT 13 |
516 | #define AM33XX_DPLL_SSC_ACK_WIDTH 1 | ||
427 | #define AM33XX_DPLL_SSC_ACK_MASK (1 << 13) | 517 | #define AM33XX_DPLL_SSC_ACK_MASK (1 << 13) |
428 | 518 | ||
429 | /* | 519 | /* |
@@ -431,6 +521,7 @@ | |||
431 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER | 521 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER |
432 | */ | 522 | */ |
433 | #define AM33XX_DPLL_SSC_DOWNSPREAD_SHIFT 14 | 523 | #define AM33XX_DPLL_SSC_DOWNSPREAD_SHIFT 14 |
524 | #define AM33XX_DPLL_SSC_DOWNSPREAD_WIDTH 1 | ||
434 | #define AM33XX_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) | 525 | #define AM33XX_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) |
435 | 526 | ||
436 | /* | 527 | /* |
@@ -438,54 +529,67 @@ | |||
438 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER | 529 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER |
439 | */ | 530 | */ |
440 | #define AM33XX_DPLL_SSC_EN_SHIFT 12 | 531 | #define AM33XX_DPLL_SSC_EN_SHIFT 12 |
532 | #define AM33XX_DPLL_SSC_EN_WIDTH 1 | ||
441 | #define AM33XX_DPLL_SSC_EN_MASK (1 << 12) | 533 | #define AM33XX_DPLL_SSC_EN_MASK (1 << 12) |
442 | 534 | ||
443 | /* Used by CM_DIV_M4_DPLL_CORE */ | 535 | /* Used by CM_DIV_M4_DPLL_CORE */ |
444 | #define AM33XX_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 | 536 | #define AM33XX_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 |
537 | #define AM33XX_HSDIVIDER_CLKOUT1_DIV_WIDTH 5 | ||
445 | #define AM33XX_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) | 538 | #define AM33XX_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) |
446 | 539 | ||
447 | /* Used by CM_DIV_M4_DPLL_CORE */ | 540 | /* Used by CM_DIV_M4_DPLL_CORE */ |
448 | #define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 | 541 | #define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 |
542 | #define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_WIDTH 1 | ||
449 | #define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) | 543 | #define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) |
450 | 544 | ||
451 | /* Used by CM_DIV_M4_DPLL_CORE */ | 545 | /* Used by CM_DIV_M4_DPLL_CORE */ |
452 | #define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 | 546 | #define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 |
547 | #define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_WIDTH 1 | ||
453 | #define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) | 548 | #define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) |
454 | 549 | ||
455 | /* Used by CM_DIV_M4_DPLL_CORE */ | 550 | /* Used by CM_DIV_M4_DPLL_CORE */ |
456 | #define AM33XX_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 | 551 | #define AM33XX_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 |
552 | #define AM33XX_HSDIVIDER_CLKOUT1_PWDN_WIDTH 1 | ||
457 | #define AM33XX_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) | 553 | #define AM33XX_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) |
458 | 554 | ||
459 | /* Used by CM_DIV_M5_DPLL_CORE */ | 555 | /* Used by CM_DIV_M5_DPLL_CORE */ |
460 | #define AM33XX_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 | 556 | #define AM33XX_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 |
557 | #define AM33XX_HSDIVIDER_CLKOUT2_DIV_WIDTH 5 | ||
461 | #define AM33XX_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) | 558 | #define AM33XX_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) |
462 | 559 | ||
463 | /* Used by CM_DIV_M5_DPLL_CORE */ | 560 | /* Used by CM_DIV_M5_DPLL_CORE */ |
464 | #define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 | 561 | #define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 |
562 | #define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_WIDTH 1 | ||
465 | #define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) | 563 | #define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) |
466 | 564 | ||
467 | /* Used by CM_DIV_M5_DPLL_CORE */ | 565 | /* Used by CM_DIV_M5_DPLL_CORE */ |
468 | #define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 | 566 | #define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 |
567 | #define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_WIDTH 1 | ||
469 | #define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) | 568 | #define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) |
470 | 569 | ||
471 | /* Used by CM_DIV_M5_DPLL_CORE */ | 570 | /* Used by CM_DIV_M5_DPLL_CORE */ |
472 | #define AM33XX_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 | 571 | #define AM33XX_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 |
572 | #define AM33XX_HSDIVIDER_CLKOUT2_PWDN_WIDTH 1 | ||
473 | #define AM33XX_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) | 573 | #define AM33XX_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) |
474 | 574 | ||
475 | /* Used by CM_DIV_M6_DPLL_CORE */ | 575 | /* Used by CM_DIV_M6_DPLL_CORE */ |
476 | #define AM33XX_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 | 576 | #define AM33XX_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 |
477 | #define AM33XX_HSDIVIDER_CLKOUT3_DIV_MASK (0x04 << 0) | 577 | #define AM33XX_HSDIVIDER_CLKOUT3_DIV_WIDTH 5 |
578 | #define AM33XX_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) | ||
478 | 579 | ||
479 | /* Used by CM_DIV_M6_DPLL_CORE */ | 580 | /* Used by CM_DIV_M6_DPLL_CORE */ |
480 | #define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 | 581 | #define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 |
582 | #define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_WIDTH 1 | ||
481 | #define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) | 583 | #define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) |
482 | 584 | ||
483 | /* Used by CM_DIV_M6_DPLL_CORE */ | 585 | /* Used by CM_DIV_M6_DPLL_CORE */ |
484 | #define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 | 586 | #define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 |
587 | #define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_WIDTH 1 | ||
485 | #define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) | 588 | #define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) |
486 | 589 | ||
487 | /* Used by CM_DIV_M6_DPLL_CORE */ | 590 | /* Used by CM_DIV_M6_DPLL_CORE */ |
488 | #define AM33XX_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 | 591 | #define AM33XX_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 |
592 | #define AM33XX_HSDIVIDER_CLKOUT3_PWDN_WIDTH 1 | ||
489 | #define AM33XX_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) | 593 | #define AM33XX_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) |
490 | 594 | ||
491 | /* | 595 | /* |
@@ -522,11 +626,12 @@ | |||
522 | * CM_GFX_MMUCFG_CLKCTRL, CM_GFX_MMUDATA_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL | 626 | * CM_GFX_MMUCFG_CLKCTRL, CM_GFX_MMUDATA_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL |
523 | */ | 627 | */ |
524 | #define AM33XX_IDLEST_SHIFT 16 | 628 | #define AM33XX_IDLEST_SHIFT 16 |
629 | #define AM33XX_IDLEST_WIDTH 2 | ||
525 | #define AM33XX_IDLEST_MASK (0x3 << 16) | 630 | #define AM33XX_IDLEST_MASK (0x3 << 16) |
526 | #define AM33XX_IDLEST_VAL 0x3 | ||
527 | 631 | ||
528 | /* Used by CM_MAC_CLKSEL */ | 632 | /* Used by CM_MAC_CLKSEL */ |
529 | #define AM33XX_MII_CLK_SEL_SHIFT 2 | 633 | #define AM33XX_MII_CLK_SEL_SHIFT 2 |
634 | #define AM33XX_MII_CLK_SEL_WIDTH 1 | ||
530 | #define AM33XX_MII_CLK_SEL_MASK (1 << 2) | 635 | #define AM33XX_MII_CLK_SEL_MASK (1 << 2) |
531 | 636 | ||
532 | /* | 637 | /* |
@@ -535,7 +640,8 @@ | |||
535 | * CM_SSC_MODFREQDIV_DPLL_PER | 640 | * CM_SSC_MODFREQDIV_DPLL_PER |
536 | */ | 641 | */ |
537 | #define AM33XX_MODFREQDIV_EXPONENT_SHIFT 8 | 642 | #define AM33XX_MODFREQDIV_EXPONENT_SHIFT 8 |
538 | #define AM33XX_MODFREQDIV_EXPONENT_MASK (0x10 << 8) | 643 | #define AM33XX_MODFREQDIV_EXPONENT_WIDTH 3 |
644 | #define AM33XX_MODFREQDIV_EXPONENT_MASK (0x7 << 8) | ||
539 | 645 | ||
540 | /* | 646 | /* |
541 | * Used by CM_SSC_MODFREQDIV_DPLL_CORE, CM_SSC_MODFREQDIV_DPLL_DDR, | 647 | * Used by CM_SSC_MODFREQDIV_DPLL_CORE, CM_SSC_MODFREQDIV_DPLL_DDR, |
@@ -543,7 +649,8 @@ | |||
543 | * CM_SSC_MODFREQDIV_DPLL_PER | 649 | * CM_SSC_MODFREQDIV_DPLL_PER |
544 | */ | 650 | */ |
545 | #define AM33XX_MODFREQDIV_MANTISSA_SHIFT 0 | 651 | #define AM33XX_MODFREQDIV_MANTISSA_SHIFT 0 |
546 | #define AM33XX_MODFREQDIV_MANTISSA_MASK (0x06 << 0) | 652 | #define AM33XX_MODFREQDIV_MANTISSA_WIDTH 7 |
653 | #define AM33XX_MODFREQDIV_MANTISSA_MASK (0x7f << 0) | ||
547 | 654 | ||
548 | /* | 655 | /* |
549 | * Used by CM_MPU_MPU_CLKCTRL, CM_RTC_RTC_CLKCTRL, CM_PER_AES0_CLKCTRL, | 656 | * Used by CM_MPU_MPU_CLKCTRL, CM_RTC_RTC_CLKCTRL, CM_PER_AES0_CLKCTRL, |
@@ -580,42 +687,52 @@ | |||
580 | * CM_CEFUSE_CEFUSE_CLKCTRL | 687 | * CM_CEFUSE_CEFUSE_CLKCTRL |
581 | */ | 688 | */ |
582 | #define AM33XX_MODULEMODE_SHIFT 0 | 689 | #define AM33XX_MODULEMODE_SHIFT 0 |
690 | #define AM33XX_MODULEMODE_WIDTH 2 | ||
583 | #define AM33XX_MODULEMODE_MASK (0x3 << 0) | 691 | #define AM33XX_MODULEMODE_MASK (0x3 << 0) |
584 | 692 | ||
585 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ | 693 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ |
586 | #define AM33XX_OPTCLK_DEBUG_CLKA_SHIFT 30 | 694 | #define AM33XX_OPTCLK_DEBUG_CLKA_SHIFT 30 |
695 | #define AM33XX_OPTCLK_DEBUG_CLKA_WIDTH 1 | ||
587 | #define AM33XX_OPTCLK_DEBUG_CLKA_MASK (1 << 30) | 696 | #define AM33XX_OPTCLK_DEBUG_CLKA_MASK (1 << 30) |
588 | 697 | ||
589 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ | 698 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ |
590 | #define AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT 19 | 699 | #define AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT 19 |
700 | #define AM33XX_OPTFCLKEN_DBGSYSCLK_WIDTH 1 | ||
591 | #define AM33XX_OPTFCLKEN_DBGSYSCLK_MASK (1 << 19) | 701 | #define AM33XX_OPTFCLKEN_DBGSYSCLK_MASK (1 << 19) |
592 | 702 | ||
593 | /* Used by CM_WKUP_GPIO0_CLKCTRL */ | 703 | /* Used by CM_WKUP_GPIO0_CLKCTRL */ |
594 | #define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_SHIFT 18 | 704 | #define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_SHIFT 18 |
705 | #define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_WIDTH 1 | ||
595 | #define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_MASK (1 << 18) | 706 | #define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_MASK (1 << 18) |
596 | 707 | ||
597 | /* Used by CM_PER_GPIO1_CLKCTRL */ | 708 | /* Used by CM_PER_GPIO1_CLKCTRL */ |
598 | #define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_SHIFT 18 | 709 | #define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_SHIFT 18 |
710 | #define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_WIDTH 1 | ||
599 | #define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_MASK (1 << 18) | 711 | #define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_MASK (1 << 18) |
600 | 712 | ||
601 | /* Used by CM_PER_GPIO2_CLKCTRL */ | 713 | /* Used by CM_PER_GPIO2_CLKCTRL */ |
602 | #define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_SHIFT 18 | 714 | #define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_SHIFT 18 |
715 | #define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_WIDTH 1 | ||
603 | #define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_MASK (1 << 18) | 716 | #define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_MASK (1 << 18) |
604 | 717 | ||
605 | /* Used by CM_PER_GPIO3_CLKCTRL */ | 718 | /* Used by CM_PER_GPIO3_CLKCTRL */ |
606 | #define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_SHIFT 18 | 719 | #define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_SHIFT 18 |
720 | #define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_WIDTH 1 | ||
607 | #define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_MASK (1 << 18) | 721 | #define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_MASK (1 << 18) |
608 | 722 | ||
609 | /* Used by CM_PER_GPIO4_CLKCTRL */ | 723 | /* Used by CM_PER_GPIO4_CLKCTRL */ |
610 | #define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_SHIFT 18 | 724 | #define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_SHIFT 18 |
725 | #define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_WIDTH 1 | ||
611 | #define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_MASK (1 << 18) | 726 | #define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_MASK (1 << 18) |
612 | 727 | ||
613 | /* Used by CM_PER_GPIO5_CLKCTRL */ | 728 | /* Used by CM_PER_GPIO5_CLKCTRL */ |
614 | #define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_SHIFT 18 | 729 | #define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_SHIFT 18 |
730 | #define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_WIDTH 1 | ||
615 | #define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_MASK (1 << 18) | 731 | #define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_MASK (1 << 18) |
616 | 732 | ||
617 | /* Used by CM_PER_GPIO6_CLKCTRL */ | 733 | /* Used by CM_PER_GPIO6_CLKCTRL */ |
618 | #define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_SHIFT 18 | 734 | #define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_SHIFT 18 |
735 | #define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_WIDTH 1 | ||
619 | #define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_MASK (1 << 18) | 736 | #define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_MASK (1 << 18) |
620 | 737 | ||
621 | /* | 738 | /* |
@@ -627,25 +744,30 @@ | |||
627 | * CM_WKUP_WKUP_M3_CLKCTRL, CM_GFX_BITBLT_CLKCTRL, CM_GFX_GFX_CLKCTRL | 744 | * CM_WKUP_WKUP_M3_CLKCTRL, CM_GFX_BITBLT_CLKCTRL, CM_GFX_GFX_CLKCTRL |
628 | */ | 745 | */ |
629 | #define AM33XX_STBYST_SHIFT 18 | 746 | #define AM33XX_STBYST_SHIFT 18 |
747 | #define AM33XX_STBYST_WIDTH 1 | ||
630 | #define AM33XX_STBYST_MASK (1 << 18) | 748 | #define AM33XX_STBYST_MASK (1 << 18) |
631 | 749 | ||
632 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ | 750 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ |
633 | #define AM33XX_STM_PMD_CLKDIVSEL_SHIFT 27 | 751 | #define AM33XX_STM_PMD_CLKDIVSEL_SHIFT 27 |
634 | #define AM33XX_STM_PMD_CLKDIVSEL_MASK (0x29 << 27) | 752 | #define AM33XX_STM_PMD_CLKDIVSEL_WIDTH 3 |
753 | #define AM33XX_STM_PMD_CLKDIVSEL_MASK (0x7 << 27) | ||
635 | 754 | ||
636 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ | 755 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ |
637 | #define AM33XX_STM_PMD_CLKSEL_SHIFT 22 | 756 | #define AM33XX_STM_PMD_CLKSEL_SHIFT 22 |
638 | #define AM33XX_STM_PMD_CLKSEL_MASK (0x23 << 22) | 757 | #define AM33XX_STM_PMD_CLKSEL_WIDTH 2 |
758 | #define AM33XX_STM_PMD_CLKSEL_MASK (0x3 << 22) | ||
639 | 759 | ||
640 | /* | 760 | /* |
641 | * Used by CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDR, CM_IDLEST_DPLL_DISP, | 761 | * Used by CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDR, CM_IDLEST_DPLL_DISP, |
642 | * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER | 762 | * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER |
643 | */ | 763 | */ |
644 | #define AM33XX_ST_DPLL_CLK_SHIFT 0 | 764 | #define AM33XX_ST_DPLL_CLK_SHIFT 0 |
765 | #define AM33XX_ST_DPLL_CLK_WIDTH 1 | ||
645 | #define AM33XX_ST_DPLL_CLK_MASK (1 << 0) | 766 | #define AM33XX_ST_DPLL_CLK_MASK (1 << 0) |
646 | 767 | ||
647 | /* Used by CM_CLKDCOLDO_DPLL_PER */ | 768 | /* Used by CM_CLKDCOLDO_DPLL_PER */ |
648 | #define AM33XX_ST_DPLL_CLKDCOLDO_SHIFT 8 | 769 | #define AM33XX_ST_DPLL_CLKDCOLDO_SHIFT 8 |
770 | #define AM33XX_ST_DPLL_CLKDCOLDO_WIDTH 1 | ||
649 | #define AM33XX_ST_DPLL_CLKDCOLDO_MASK (1 << 8) | 771 | #define AM33XX_ST_DPLL_CLKDCOLDO_MASK (1 << 8) |
650 | 772 | ||
651 | /* | 773 | /* |
@@ -653,18 +775,22 @@ | |||
653 | * CM_DIV_M2_DPLL_PER | 775 | * CM_DIV_M2_DPLL_PER |
654 | */ | 776 | */ |
655 | #define AM33XX_ST_DPLL_CLKOUT_SHIFT 9 | 777 | #define AM33XX_ST_DPLL_CLKOUT_SHIFT 9 |
778 | #define AM33XX_ST_DPLL_CLKOUT_WIDTH 1 | ||
656 | #define AM33XX_ST_DPLL_CLKOUT_MASK (1 << 9) | 779 | #define AM33XX_ST_DPLL_CLKOUT_MASK (1 << 9) |
657 | 780 | ||
658 | /* Used by CM_DIV_M4_DPLL_CORE */ | 781 | /* Used by CM_DIV_M4_DPLL_CORE */ |
659 | #define AM33XX_ST_HSDIVIDER_CLKOUT1_SHIFT 9 | 782 | #define AM33XX_ST_HSDIVIDER_CLKOUT1_SHIFT 9 |
783 | #define AM33XX_ST_HSDIVIDER_CLKOUT1_WIDTH 1 | ||
660 | #define AM33XX_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) | 784 | #define AM33XX_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) |
661 | 785 | ||
662 | /* Used by CM_DIV_M5_DPLL_CORE */ | 786 | /* Used by CM_DIV_M5_DPLL_CORE */ |
663 | #define AM33XX_ST_HSDIVIDER_CLKOUT2_SHIFT 9 | 787 | #define AM33XX_ST_HSDIVIDER_CLKOUT2_SHIFT 9 |
788 | #define AM33XX_ST_HSDIVIDER_CLKOUT2_WIDTH 1 | ||
664 | #define AM33XX_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) | 789 | #define AM33XX_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) |
665 | 790 | ||
666 | /* Used by CM_DIV_M6_DPLL_CORE */ | 791 | /* Used by CM_DIV_M6_DPLL_CORE */ |
667 | #define AM33XX_ST_HSDIVIDER_CLKOUT3_SHIFT 9 | 792 | #define AM33XX_ST_HSDIVIDER_CLKOUT3_SHIFT 9 |
793 | #define AM33XX_ST_HSDIVIDER_CLKOUT3_WIDTH 1 | ||
668 | #define AM33XX_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) | 794 | #define AM33XX_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) |
669 | 795 | ||
670 | /* | 796 | /* |
@@ -672,16 +798,20 @@ | |||
672 | * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER | 798 | * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER |
673 | */ | 799 | */ |
674 | #define AM33XX_ST_MN_BYPASS_SHIFT 8 | 800 | #define AM33XX_ST_MN_BYPASS_SHIFT 8 |
801 | #define AM33XX_ST_MN_BYPASS_WIDTH 1 | ||
675 | #define AM33XX_ST_MN_BYPASS_MASK (1 << 8) | 802 | #define AM33XX_ST_MN_BYPASS_MASK (1 << 8) |
676 | 803 | ||
677 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ | 804 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ |
678 | #define AM33XX_TRC_PMD_CLKDIVSEL_SHIFT 24 | 805 | #define AM33XX_TRC_PMD_CLKDIVSEL_SHIFT 24 |
679 | #define AM33XX_TRC_PMD_CLKDIVSEL_MASK (0x26 << 24) | 806 | #define AM33XX_TRC_PMD_CLKDIVSEL_WIDTH 3 |
807 | #define AM33XX_TRC_PMD_CLKDIVSEL_MASK (0x7 << 24) | ||
680 | 808 | ||
681 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ | 809 | /* Used by CM_WKUP_DEBUGSS_CLKCTRL */ |
682 | #define AM33XX_TRC_PMD_CLKSEL_SHIFT 20 | 810 | #define AM33XX_TRC_PMD_CLKSEL_SHIFT 20 |
683 | #define AM33XX_TRC_PMD_CLKSEL_MASK (0x21 << 20) | 811 | #define AM33XX_TRC_PMD_CLKSEL_WIDTH 2 |
812 | #define AM33XX_TRC_PMD_CLKSEL_MASK (0x3 << 20) | ||
684 | 813 | ||
685 | /* Used by CONTROL_SEC_CLK_CTRL */ | 814 | /* Used by CONTROL_SEC_CLK_CTRL */ |
815 | #define AM33XX_TIMER0_CLKSEL_WIDTH 2 | ||
686 | #define AM33XX_TIMER0_CLKSEL_MASK (0x3 << 4) | 816 | #define AM33XX_TIMER0_CLKSEL_MASK (0x3 << 4) |
687 | #endif | 817 | #endif |
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h index 975f6bda0e0b..59598ffd8783 100644 --- a/arch/arm/mach-omap2/cm-regbits-34xx.h +++ b/arch/arm/mach-omap2/cm-regbits-34xx.h | |||
@@ -218,6 +218,8 @@ | |||
218 | #define OMAP3430_ST_MAILBOXES_MASK (1 << 7) | 218 | #define OMAP3430_ST_MAILBOXES_MASK (1 << 7) |
219 | #define OMAP3430_ST_OMAPCTRL_SHIFT 6 | 219 | #define OMAP3430_ST_OMAPCTRL_SHIFT 6 |
220 | #define OMAP3430_ST_OMAPCTRL_MASK (1 << 6) | 220 | #define OMAP3430_ST_OMAPCTRL_MASK (1 << 6) |
221 | #define OMAP3430_ST_SAD2D_SHIFT 3 | ||
222 | #define OMAP3430_ST_SAD2D_MASK (1 << 3) | ||
221 | #define OMAP3430_ST_SDMA_SHIFT 2 | 223 | #define OMAP3430_ST_SDMA_SHIFT 2 |
222 | #define OMAP3430_ST_SDMA_MASK (1 << 2) | 224 | #define OMAP3430_ST_SDMA_MASK (1 << 2) |
223 | #define OMAP3430_ST_SDRC_SHIFT 1 | 225 | #define OMAP3430_ST_SDRC_SHIFT 1 |
diff --git a/arch/arm/mach-omap2/cm-regbits-44xx.h b/arch/arm/mach-omap2/cm-regbits-44xx.h index 65597a745638..4c6c2f7de65b 100644 --- a/arch/arm/mach-omap2/cm-regbits-44xx.h +++ b/arch/arm/mach-omap2/cm-regbits-44xx.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP44xx Clock Management register bits | 2 | * OMAP44xx Clock Management register bits |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2012 Texas Instruments, Inc. |
5 | * Copyright (C) 2009-2010 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
6 | * | 6 | * |
7 | * Paul Walmsley (paul@pwsan.com) | 7 | * Paul Walmsley (paul@pwsan.com) |
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | /* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ | 25 | /* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ |
26 | #define OMAP4430_ABE_DYNDEP_SHIFT 3 | 26 | #define OMAP4430_ABE_DYNDEP_SHIFT 3 |
27 | #define OMAP4430_ABE_DYNDEP_WIDTH 0x1 | ||
27 | #define OMAP4430_ABE_DYNDEP_MASK (1 << 3) | 28 | #define OMAP4430_ABE_DYNDEP_MASK (1 << 3) |
28 | 29 | ||
29 | /* | 30 | /* |
@@ -31,14 +32,17 @@ | |||
31 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 32 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
32 | */ | 33 | */ |
33 | #define OMAP4430_ABE_STATDEP_SHIFT 3 | 34 | #define OMAP4430_ABE_STATDEP_SHIFT 3 |
35 | #define OMAP4430_ABE_STATDEP_WIDTH 0x1 | ||
34 | #define OMAP4430_ABE_STATDEP_MASK (1 << 3) | 36 | #define OMAP4430_ABE_STATDEP_MASK (1 << 3) |
35 | 37 | ||
36 | /* Used by CM_L4CFG_DYNAMICDEP */ | 38 | /* Used by CM_L4CFG_DYNAMICDEP */ |
37 | #define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 | 39 | #define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 |
40 | #define OMAP4430_ALWONCORE_DYNDEP_WIDTH 0x1 | ||
38 | #define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16) | 41 | #define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16) |
39 | 42 | ||
40 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ | 43 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ |
41 | #define OMAP4430_ALWONCORE_STATDEP_SHIFT 16 | 44 | #define OMAP4430_ALWONCORE_STATDEP_SHIFT 16 |
45 | #define OMAP4430_ALWONCORE_STATDEP_WIDTH 0x1 | ||
42 | #define OMAP4430_ALWONCORE_STATDEP_MASK (1 << 16) | 46 | #define OMAP4430_ALWONCORE_STATDEP_MASK (1 << 16) |
43 | 47 | ||
44 | /* | 48 | /* |
@@ -47,294 +51,367 @@ | |||
47 | * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB | 51 | * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB |
48 | */ | 52 | */ |
49 | #define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 | 53 | #define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 |
54 | #define OMAP4430_AUTO_DPLL_MODE_WIDTH 0x3 | ||
50 | #define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) | 55 | #define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) |
51 | 56 | ||
52 | /* Used by CM_L4CFG_DYNAMICDEP */ | 57 | /* Used by CM_L4CFG_DYNAMICDEP */ |
53 | #define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 | 58 | #define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 |
59 | #define OMAP4430_CEFUSE_DYNDEP_WIDTH 0x1 | ||
54 | #define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17) | 60 | #define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17) |
55 | 61 | ||
56 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ | 62 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ |
57 | #define OMAP4430_CEFUSE_STATDEP_SHIFT 17 | 63 | #define OMAP4430_CEFUSE_STATDEP_SHIFT 17 |
64 | #define OMAP4430_CEFUSE_STATDEP_WIDTH 0x1 | ||
58 | #define OMAP4430_CEFUSE_STATDEP_MASK (1 << 17) | 65 | #define OMAP4430_CEFUSE_STATDEP_MASK (1 << 17) |
59 | 66 | ||
60 | /* Used by CM1_ABE_CLKSTCTRL */ | 67 | /* Used by CM1_ABE_CLKSTCTRL */ |
61 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13 | 68 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13 |
69 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_WIDTH 0x1 | ||
62 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13) | 70 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13) |
63 | 71 | ||
64 | /* Used by CM1_ABE_CLKSTCTRL */ | 72 | /* Used by CM1_ABE_CLKSTCTRL */ |
65 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT 12 | 73 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT 12 |
74 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_WIDTH 0x1 | ||
66 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK (1 << 12) | 75 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK (1 << 12) |
67 | 76 | ||
68 | /* Used by CM_WKUP_CLKSTCTRL */ | 77 | /* Used by CM_WKUP_CLKSTCTRL */ |
69 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT 9 | 78 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT 9 |
79 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_WIDTH 0x1 | ||
70 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9) | 80 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9) |
71 | 81 | ||
72 | /* Used by CM1_ABE_CLKSTCTRL */ | 82 | /* Used by CM1_ABE_CLKSTCTRL */ |
73 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT 11 | 83 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT 11 |
84 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_WIDTH 0x1 | ||
74 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK (1 << 11) | 85 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK (1 << 11) |
75 | 86 | ||
76 | /* Used by CM1_ABE_CLKSTCTRL */ | 87 | /* Used by CM1_ABE_CLKSTCTRL */ |
77 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 | 88 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 |
89 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_WIDTH 0x1 | ||
78 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8) | 90 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8) |
79 | 91 | ||
80 | /* Used by CM_MEMIF_CLKSTCTRL */ | 92 | /* Used by CM_MEMIF_CLKSTCTRL */ |
81 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 | 93 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 |
94 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_WIDTH 0x1 | ||
82 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11) | 95 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11) |
83 | 96 | ||
84 | /* Used by CM_MEMIF_CLKSTCTRL */ | 97 | /* Used by CM_MEMIF_CLKSTCTRL */ |
85 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 | 98 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 |
99 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_WIDTH 0x1 | ||
86 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12) | 100 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12) |
87 | 101 | ||
88 | /* Used by CM_MEMIF_CLKSTCTRL */ | 102 | /* Used by CM_MEMIF_CLKSTCTRL */ |
89 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 | 103 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 |
104 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_WIDTH 0x1 | ||
90 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13) | 105 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13) |
91 | 106 | ||
92 | /* Used by CM_CAM_CLKSTCTRL */ | 107 | /* Used by CM_CAM_CLKSTCTRL */ |
93 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT 9 | 108 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT 9 |
109 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_WIDTH 0x1 | ||
94 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK (1 << 9) | 110 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK (1 << 9) |
95 | 111 | ||
96 | /* Used by CM_ALWON_CLKSTCTRL */ | 112 | /* Used by CM_ALWON_CLKSTCTRL */ |
97 | #define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_SHIFT 12 | 113 | #define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_SHIFT 12 |
114 | #define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_WIDTH 0x1 | ||
98 | #define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_MASK (1 << 12) | 115 | #define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_MASK (1 << 12) |
99 | 116 | ||
100 | /* Used by CM_EMU_CLKSTCTRL */ | 117 | /* Used by CM_EMU_CLKSTCTRL */ |
101 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9 | 118 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9 |
119 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_WIDTH 0x1 | ||
102 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9) | 120 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9) |
103 | 121 | ||
104 | /* Used by CM_L4CFG_CLKSTCTRL */ | 122 | /* Used by CM_L4CFG_CLKSTCTRL */ |
105 | #define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_SHIFT 9 | 123 | #define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_SHIFT 9 |
124 | #define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_WIDTH 0x1 | ||
106 | #define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_MASK (1 << 9) | 125 | #define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_MASK (1 << 9) |
107 | 126 | ||
108 | /* Used by CM_CEFUSE_CLKSTCTRL */ | 127 | /* Used by CM_CEFUSE_CLKSTCTRL */ |
109 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 | 128 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 |
129 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_WIDTH 0x1 | ||
110 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) | 130 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) |
111 | 131 | ||
112 | /* Used by CM_MEMIF_CLKSTCTRL */ | 132 | /* Used by CM_MEMIF_CLKSTCTRL */ |
113 | #define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 | 133 | #define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 |
134 | #define OMAP4430_CLKACTIVITY_DLL_CLK_WIDTH 0x1 | ||
114 | #define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9) | 135 | #define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9) |
115 | 136 | ||
116 | /* Used by CM_L4PER_CLKSTCTRL */ | 137 | /* Used by CM_L4PER_CLKSTCTRL */ |
117 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 | 138 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 |
139 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_WIDTH 0x1 | ||
118 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9) | 140 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9) |
119 | 141 | ||
120 | /* Used by CM_L4PER_CLKSTCTRL */ | 142 | /* Used by CM_L4PER_CLKSTCTRL */ |
121 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 | 143 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 |
144 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_WIDTH 0x1 | ||
122 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10) | 145 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10) |
123 | 146 | ||
124 | /* Used by CM_L4PER_CLKSTCTRL */ | 147 | /* Used by CM_L4PER_CLKSTCTRL */ |
125 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 | 148 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 |
149 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_WIDTH 0x1 | ||
126 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11) | 150 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11) |
127 | 151 | ||
128 | /* Used by CM_L4PER_CLKSTCTRL */ | 152 | /* Used by CM_L4PER_CLKSTCTRL */ |
129 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 | 153 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 |
154 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_WIDTH 0x1 | ||
130 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12) | 155 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12) |
131 | 156 | ||
132 | /* Used by CM_L4PER_CLKSTCTRL */ | 157 | /* Used by CM_L4PER_CLKSTCTRL */ |
133 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 | 158 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 |
159 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_WIDTH 0x1 | ||
134 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13) | 160 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13) |
135 | 161 | ||
136 | /* Used by CM_L4PER_CLKSTCTRL */ | 162 | /* Used by CM_L4PER_CLKSTCTRL */ |
137 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 | 163 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 |
164 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_WIDTH 0x1 | ||
138 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14) | 165 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14) |
139 | 166 | ||
140 | /* Used by CM_DSS_CLKSTCTRL */ | 167 | /* Used by CM_DSS_CLKSTCTRL */ |
141 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT 10 | 168 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT 10 |
169 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_WIDTH 0x1 | ||
142 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK (1 << 10) | 170 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK (1 << 10) |
143 | 171 | ||
144 | /* Used by CM_DSS_CLKSTCTRL */ | 172 | /* Used by CM_DSS_CLKSTCTRL */ |
145 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT 9 | 173 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT 9 |
174 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_WIDTH 0x1 | ||
146 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK (1 << 9) | 175 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK (1 << 9) |
147 | 176 | ||
148 | /* Used by CM_DUCATI_CLKSTCTRL */ | 177 | /* Used by CM_DUCATI_CLKSTCTRL */ |
149 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT 8 | 178 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT 8 |
179 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_WIDTH 0x1 | ||
150 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK (1 << 8) | 180 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK (1 << 8) |
151 | 181 | ||
152 | /* Used by CM_EMU_CLKSTCTRL */ | 182 | /* Used by CM_EMU_CLKSTCTRL */ |
153 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT 8 | 183 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT 8 |
184 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_WIDTH 0x1 | ||
154 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK (1 << 8) | 185 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK (1 << 8) |
155 | 186 | ||
156 | /* Used by CM_CAM_CLKSTCTRL */ | 187 | /* Used by CM_CAM_CLKSTCTRL */ |
157 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 | 188 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 |
189 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_WIDTH 0x1 | ||
158 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10) | 190 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10) |
159 | 191 | ||
160 | /* Used by CM_L4PER_CLKSTCTRL */ | 192 | /* Used by CM_L4PER_CLKSTCTRL */ |
161 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 | 193 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 |
194 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_WIDTH 0x1 | ||
162 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15) | 195 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15) |
163 | 196 | ||
164 | /* Used by CM1_ABE_CLKSTCTRL */ | 197 | /* Used by CM1_ABE_CLKSTCTRL */ |
165 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10 | 198 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10 |
199 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_WIDTH 0x1 | ||
166 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10) | 200 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10) |
167 | 201 | ||
168 | /* Used by CM_DSS_CLKSTCTRL */ | 202 | /* Used by CM_DSS_CLKSTCTRL */ |
169 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 | 203 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 |
204 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_WIDTH 0x1 | ||
170 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11) | 205 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11) |
171 | 206 | ||
172 | /* Used by CM_L3INIT_CLKSTCTRL */ | 207 | /* Used by CM_L3INIT_CLKSTCTRL */ |
173 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 | 208 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 |
209 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_WIDTH 0x1 | ||
174 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20) | 210 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20) |
175 | 211 | ||
176 | /* Used by CM_L3INIT_CLKSTCTRL */ | 212 | /* Used by CM_L3INIT_CLKSTCTRL */ |
177 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 | 213 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 |
214 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_WIDTH 0x1 | ||
178 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26) | 215 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26) |
179 | 216 | ||
180 | /* Used by CM_L3INIT_CLKSTCTRL */ | 217 | /* Used by CM_L3INIT_CLKSTCTRL */ |
181 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 | 218 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 |
219 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_WIDTH 0x1 | ||
182 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21) | 220 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21) |
183 | 221 | ||
184 | /* Used by CM_L3INIT_CLKSTCTRL */ | 222 | /* Used by CM_L3INIT_CLKSTCTRL */ |
185 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 | 223 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 |
224 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_WIDTH 0x1 | ||
186 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27) | 225 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27) |
187 | 226 | ||
188 | /* Used by CM_L3INIT_CLKSTCTRL */ | 227 | /* Used by CM_L3INIT_CLKSTCTRL */ |
189 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 | 228 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 |
229 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_WIDTH 0x1 | ||
190 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13) | 230 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13) |
191 | 231 | ||
192 | /* Used by CM_L3INIT_CLKSTCTRL */ | 232 | /* Used by CM_L3INIT_CLKSTCTRL */ |
193 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 | 233 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 |
234 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_WIDTH 0x1 | ||
194 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12) | 235 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12) |
195 | 236 | ||
196 | /* Used by CM_L3INIT_CLKSTCTRL */ | 237 | /* Used by CM_L3INIT_CLKSTCTRL */ |
197 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 | 238 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 |
239 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_WIDTH 0x1 | ||
198 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28) | 240 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28) |
199 | 241 | ||
200 | /* Used by CM_L3INIT_CLKSTCTRL */ | 242 | /* Used by CM_L3INIT_CLKSTCTRL */ |
201 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 | 243 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 |
244 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_WIDTH 0x1 | ||
202 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29) | 245 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29) |
203 | 246 | ||
204 | /* Used by CM_L3INIT_CLKSTCTRL */ | 247 | /* Used by CM_L3INIT_CLKSTCTRL */ |
205 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 | 248 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 |
249 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_WIDTH 0x1 | ||
206 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11) | 250 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11) |
207 | 251 | ||
208 | /* Used by CM_L3INIT_CLKSTCTRL */ | 252 | /* Used by CM_L3INIT_CLKSTCTRL */ |
209 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 | 253 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 |
254 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_WIDTH 0x1 | ||
210 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16) | 255 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16) |
211 | 256 | ||
212 | /* Used by CM_L3INIT_CLKSTCTRL */ | 257 | /* Used by CM_L3INIT_CLKSTCTRL */ |
213 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 | 258 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 |
259 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_WIDTH 0x1 | ||
214 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17) | 260 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17) |
215 | 261 | ||
216 | /* Used by CM_L3INIT_CLKSTCTRL */ | 262 | /* Used by CM_L3INIT_CLKSTCTRL */ |
217 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 | 263 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 |
264 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_WIDTH 0x1 | ||
218 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18) | 265 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18) |
219 | 266 | ||
220 | /* Used by CM_L3INIT_CLKSTCTRL */ | 267 | /* Used by CM_L3INIT_CLKSTCTRL */ |
221 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 | 268 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 |
269 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_WIDTH 0x1 | ||
222 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19) | 270 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19) |
223 | 271 | ||
224 | /* Used by CM_CAM_CLKSTCTRL */ | 272 | /* Used by CM_CAM_CLKSTCTRL */ |
225 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT 8 | 273 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT 8 |
274 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_WIDTH 0x1 | ||
226 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK (1 << 8) | 275 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK (1 << 8) |
227 | 276 | ||
228 | /* Used by CM_IVAHD_CLKSTCTRL */ | 277 | /* Used by CM_IVAHD_CLKSTCTRL */ |
229 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT 8 | 278 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT 8 |
279 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_WIDTH 0x1 | ||
230 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK (1 << 8) | 280 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK (1 << 8) |
231 | 281 | ||
232 | /* Used by CM_D2D_CLKSTCTRL */ | 282 | /* Used by CM_D2D_CLKSTCTRL */ |
233 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10 | 283 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10 |
284 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_WIDTH 0x1 | ||
234 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10) | 285 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10) |
235 | 286 | ||
236 | /* Used by CM_L3_1_CLKSTCTRL */ | 287 | /* Used by CM_L3_1_CLKSTCTRL */ |
237 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 | 288 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 |
289 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_WIDTH 0x1 | ||
238 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8) | 290 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8) |
239 | 291 | ||
240 | /* Used by CM_L3_2_CLKSTCTRL */ | 292 | /* Used by CM_L3_2_CLKSTCTRL */ |
241 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 | 293 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 |
294 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_WIDTH 0x1 | ||
242 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8) | 295 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8) |
243 | 296 | ||
244 | /* Used by CM_D2D_CLKSTCTRL */ | 297 | /* Used by CM_D2D_CLKSTCTRL */ |
245 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT 8 | 298 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT 8 |
299 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_WIDTH 0x1 | ||
246 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK (1 << 8) | 300 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK (1 << 8) |
247 | 301 | ||
248 | /* Used by CM_SDMA_CLKSTCTRL */ | 302 | /* Used by CM_SDMA_CLKSTCTRL */ |
249 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT 8 | 303 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT 8 |
304 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_WIDTH 0x1 | ||
250 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK (1 << 8) | 305 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK (1 << 8) |
251 | 306 | ||
252 | /* Used by CM_DSS_CLKSTCTRL */ | 307 | /* Used by CM_DSS_CLKSTCTRL */ |
253 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 | 308 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 |
309 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_WIDTH 0x1 | ||
254 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8) | 310 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8) |
255 | 311 | ||
256 | /* Used by CM_MEMIF_CLKSTCTRL */ | 312 | /* Used by CM_MEMIF_CLKSTCTRL */ |
257 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 | 313 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 |
314 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_WIDTH 0x1 | ||
258 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8) | 315 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8) |
259 | 316 | ||
260 | /* Used by CM_GFX_CLKSTCTRL */ | 317 | /* Used by CM_GFX_CLKSTCTRL */ |
261 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 | 318 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 |
319 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_WIDTH 0x1 | ||
262 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8) | 320 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8) |
263 | 321 | ||
264 | /* Used by CM_L3INIT_CLKSTCTRL */ | 322 | /* Used by CM_L3INIT_CLKSTCTRL */ |
265 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 | 323 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 |
324 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_WIDTH 0x1 | ||
266 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8) | 325 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8) |
267 | 326 | ||
268 | /* Used by CM_L3INSTR_CLKSTCTRL */ | 327 | /* Used by CM_L3INSTR_CLKSTCTRL */ |
269 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT 8 | 328 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT 8 |
329 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_WIDTH 0x1 | ||
270 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK (1 << 8) | 330 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK (1 << 8) |
271 | 331 | ||
272 | /* Used by CM_L4SEC_CLKSTCTRL */ | 332 | /* Used by CM_L4SEC_CLKSTCTRL */ |
273 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT 8 | 333 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT 8 |
334 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_WIDTH 0x1 | ||
274 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK (1 << 8) | 335 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK (1 << 8) |
275 | 336 | ||
276 | /* Used by CM_ALWON_CLKSTCTRL */ | 337 | /* Used by CM_ALWON_CLKSTCTRL */ |
277 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT 8 | 338 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT 8 |
339 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_WIDTH 0x1 | ||
278 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK (1 << 8) | 340 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK (1 << 8) |
279 | 341 | ||
280 | /* Used by CM_CEFUSE_CLKSTCTRL */ | 342 | /* Used by CM_CEFUSE_CLKSTCTRL */ |
281 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 | 343 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 |
344 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_WIDTH 0x1 | ||
282 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) | 345 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) |
283 | 346 | ||
284 | /* Used by CM_L4CFG_CLKSTCTRL */ | 347 | /* Used by CM_L4CFG_CLKSTCTRL */ |
285 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 | 348 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 |
349 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_WIDTH 0x1 | ||
286 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8) | 350 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8) |
287 | 351 | ||
288 | /* Used by CM_D2D_CLKSTCTRL */ | 352 | /* Used by CM_D2D_CLKSTCTRL */ |
289 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 | 353 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 |
354 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_WIDTH 0x1 | ||
290 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9) | 355 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9) |
291 | 356 | ||
292 | /* Used by CM_L3INIT_CLKSTCTRL */ | 357 | /* Used by CM_L3INIT_CLKSTCTRL */ |
293 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 | 358 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 |
359 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_WIDTH 0x1 | ||
294 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9) | 360 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9) |
295 | 361 | ||
296 | /* Used by CM_L4PER_CLKSTCTRL */ | 362 | /* Used by CM_L4PER_CLKSTCTRL */ |
297 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 | 363 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 |
364 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_WIDTH 0x1 | ||
298 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8) | 365 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8) |
299 | 366 | ||
300 | /* Used by CM_L4SEC_CLKSTCTRL */ | 367 | /* Used by CM_L4SEC_CLKSTCTRL */ |
301 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT 9 | 368 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT 9 |
369 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_WIDTH 0x1 | ||
302 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK (1 << 9) | 370 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK (1 << 9) |
303 | 371 | ||
304 | /* Used by CM_WKUP_CLKSTCTRL */ | 372 | /* Used by CM_WKUP_CLKSTCTRL */ |
305 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 | 373 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 |
374 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_WIDTH 0x1 | ||
306 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12) | 375 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12) |
307 | 376 | ||
308 | /* Used by CM_MPU_CLKSTCTRL */ | 377 | /* Used by CM_MPU_CLKSTCTRL */ |
309 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 | 378 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 |
379 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_WIDTH 0x1 | ||
310 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8) | 380 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8) |
311 | 381 | ||
312 | /* Used by CM1_ABE_CLKSTCTRL */ | 382 | /* Used by CM1_ABE_CLKSTCTRL */ |
313 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 | 383 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 |
384 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_WIDTH 0x1 | ||
314 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9) | 385 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9) |
315 | 386 | ||
316 | /* Used by CM_L4PER_CLKSTCTRL */ | 387 | /* Used by CM_L4PER_CLKSTCTRL */ |
317 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 | 388 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 |
389 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_WIDTH 0x1 | ||
318 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16) | 390 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16) |
319 | 391 | ||
320 | /* Used by CM_L4PER_CLKSTCTRL */ | 392 | /* Used by CM_L4PER_CLKSTCTRL */ |
321 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 | 393 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 |
394 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_WIDTH 0x1 | ||
322 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17) | 395 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17) |
323 | 396 | ||
324 | /* Used by CM_L4PER_CLKSTCTRL */ | 397 | /* Used by CM_L4PER_CLKSTCTRL */ |
325 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 | 398 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 |
399 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_WIDTH 0x1 | ||
326 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18) | 400 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18) |
327 | 401 | ||
328 | /* Used by CM_L4PER_CLKSTCTRL */ | 402 | /* Used by CM_L4PER_CLKSTCTRL */ |
329 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 | 403 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 |
404 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_WIDTH 0x1 | ||
330 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19) | 405 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19) |
331 | 406 | ||
332 | /* Used by CM_L4PER_CLKSTCTRL */ | 407 | /* Used by CM_L4PER_CLKSTCTRL */ |
333 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 | 408 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 |
409 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_WIDTH 0x1 | ||
334 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25) | 410 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25) |
335 | 411 | ||
336 | /* Used by CM_L4PER_CLKSTCTRL */ | 412 | /* Used by CM_L4PER_CLKSTCTRL */ |
337 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 | 413 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 |
414 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_WIDTH 0x1 | ||
338 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20) | 415 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20) |
339 | 416 | ||
340 | /* Used by CM_L4PER_CLKSTCTRL */ | 417 | /* Used by CM_L4PER_CLKSTCTRL */ |
@@ -343,94 +420,114 @@ | |||
343 | 420 | ||
344 | /* Used by CM_L4PER_CLKSTCTRL */ | 421 | /* Used by CM_L4PER_CLKSTCTRL */ |
345 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 | 422 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 |
423 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_WIDTH 0x1 | ||
346 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22) | 424 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22) |
347 | 425 | ||
348 | /* Used by CM_L4PER_CLKSTCTRL */ | 426 | /* Used by CM_L4PER_CLKSTCTRL */ |
349 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 | 427 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 |
428 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_WIDTH 0x1 | ||
350 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24) | 429 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24) |
351 | 430 | ||
352 | /* Used by CM_MEMIF_CLKSTCTRL */ | 431 | /* Used by CM_MEMIF_CLKSTCTRL */ |
353 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 | 432 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 |
433 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_WIDTH 0x1 | ||
354 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10) | 434 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10) |
355 | 435 | ||
356 | /* Used by CM_GFX_CLKSTCTRL */ | 436 | /* Used by CM_GFX_CLKSTCTRL */ |
357 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT 9 | 437 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT 9 |
438 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_WIDTH 0x1 | ||
358 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK (1 << 9) | 439 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK (1 << 9) |
359 | 440 | ||
360 | /* Used by CM_ALWON_CLKSTCTRL */ | 441 | /* Used by CM_ALWON_CLKSTCTRL */ |
361 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT 11 | 442 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT 11 |
443 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_WIDTH 0x1 | ||
362 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK (1 << 11) | 444 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK (1 << 11) |
363 | 445 | ||
364 | /* Used by CM_ALWON_CLKSTCTRL */ | 446 | /* Used by CM_ALWON_CLKSTCTRL */ |
365 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT 10 | 447 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT 10 |
448 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_WIDTH 0x1 | ||
366 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK (1 << 10) | 449 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK (1 << 10) |
367 | 450 | ||
368 | /* Used by CM_ALWON_CLKSTCTRL */ | 451 | /* Used by CM_ALWON_CLKSTCTRL */ |
369 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT 9 | 452 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT 9 |
453 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_WIDTH 0x1 | ||
370 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK (1 << 9) | 454 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK (1 << 9) |
371 | 455 | ||
372 | /* Used by CM_WKUP_CLKSTCTRL */ | 456 | /* Used by CM_WKUP_CLKSTCTRL */ |
373 | #define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT 8 | 457 | #define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT 8 |
458 | #define OMAP4430_CLKACTIVITY_SYS_CLK_WIDTH 0x1 | ||
374 | #define OMAP4430_CLKACTIVITY_SYS_CLK_MASK (1 << 8) | 459 | #define OMAP4430_CLKACTIVITY_SYS_CLK_MASK (1 << 8) |
375 | 460 | ||
376 | /* Used by CM_TESLA_CLKSTCTRL */ | 461 | /* Used by CM_TESLA_CLKSTCTRL */ |
377 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 | 462 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 |
463 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_WIDTH 0x1 | ||
378 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8) | 464 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8) |
379 | 465 | ||
380 | /* Used by CM_L3INIT_CLKSTCTRL */ | 466 | /* Used by CM_L3INIT_CLKSTCTRL */ |
381 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 | 467 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 |
468 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_WIDTH 0x1 | ||
382 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22) | 469 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22) |
383 | 470 | ||
384 | /* Used by CM_L3INIT_CLKSTCTRL */ | 471 | /* Used by CM_L3INIT_CLKSTCTRL */ |
385 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 | 472 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 |
473 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_WIDTH 0x1 | ||
386 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23) | 474 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23) |
387 | 475 | ||
388 | /* Used by CM_L3INIT_CLKSTCTRL */ | 476 | /* Used by CM_L3INIT_CLKSTCTRL */ |
389 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 | 477 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 |
478 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_WIDTH 0x1 | ||
390 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24) | 479 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24) |
391 | 480 | ||
392 | /* Used by CM_L3INIT_CLKSTCTRL */ | 481 | /* Used by CM_L3INIT_CLKSTCTRL */ |
393 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10 | 482 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10 |
483 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_WIDTH 0x1 | ||
394 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10) | 484 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10) |
395 | 485 | ||
396 | /* Used by CM_L3INIT_CLKSTCTRL */ | 486 | /* Used by CM_L3INIT_CLKSTCTRL */ |
397 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14 | 487 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14 |
488 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_WIDTH 0x1 | ||
398 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14) | 489 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14) |
399 | 490 | ||
400 | /* Used by CM_L3INIT_CLKSTCTRL */ | 491 | /* Used by CM_L3INIT_CLKSTCTRL */ |
401 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 | 492 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 |
493 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_WIDTH 0x1 | ||
402 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15) | 494 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15) |
403 | 495 | ||
404 | /* Used by CM_WKUP_CLKSTCTRL */ | 496 | /* Used by CM_WKUP_CLKSTCTRL */ |
405 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 | 497 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 |
498 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_WIDTH 0x1 | ||
406 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10) | 499 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10) |
407 | 500 | ||
408 | /* Used by CM_L3INIT_CLKSTCTRL */ | 501 | /* Used by CM_L3INIT_CLKSTCTRL */ |
409 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 | 502 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 |
503 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_WIDTH 0x1 | ||
410 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30) | 504 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30) |
411 | 505 | ||
412 | /* Used by CM_L3INIT_CLKSTCTRL */ | 506 | /* Used by CM_L3INIT_CLKSTCTRL */ |
413 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 | 507 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 |
508 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_WIDTH 0x1 | ||
414 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25) | 509 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25) |
415 | 510 | ||
416 | /* Used by CM_WKUP_CLKSTCTRL */ | 511 | /* Used by CM_WKUP_CLKSTCTRL */ |
417 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11 | 512 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11 |
513 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_WIDTH 0x1 | ||
418 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11) | 514 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11) |
419 | 515 | ||
420 | /* Used by CM_WKUP_CLKSTCTRL */ | 516 | /* Used by CM_WKUP_CLKSTCTRL */ |
421 | #define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_SHIFT 13 | 517 | #define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_SHIFT 13 |
518 | #define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_WIDTH 0x1 | ||
422 | #define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_MASK (1 << 13) | 519 | #define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_MASK (1 << 13) |
423 | 520 | ||
424 | /* | 521 | /* |
425 | * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, | 522 | * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, |
426 | * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, | 523 | * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, |
427 | * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MMC6_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL, | 524 | * CM_L3INIT_MMC2_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL, |
428 | * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL, | 525 | * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL, |
429 | * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL, | 526 | * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL, |
430 | * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, | 527 | * CM_L4PER_DMTIMER9_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL |
431 | * CM_WKUP_TIMER1_CLKCTRL | ||
432 | */ | 528 | */ |
433 | #define OMAP4430_CLKSEL_SHIFT 24 | 529 | #define OMAP4430_CLKSEL_SHIFT 24 |
530 | #define OMAP4430_CLKSEL_WIDTH 0x1 | ||
434 | #define OMAP4430_CLKSEL_MASK (1 << 24) | 531 | #define OMAP4430_CLKSEL_MASK (1 << 24) |
435 | 532 | ||
436 | /* | 533 | /* |
@@ -438,50 +535,62 @@ | |||
438 | * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL | 535 | * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL |
439 | */ | 536 | */ |
440 | #define OMAP4430_CLKSEL_0_0_SHIFT 0 | 537 | #define OMAP4430_CLKSEL_0_0_SHIFT 0 |
538 | #define OMAP4430_CLKSEL_0_0_WIDTH 0x1 | ||
441 | #define OMAP4430_CLKSEL_0_0_MASK (1 << 0) | 539 | #define OMAP4430_CLKSEL_0_0_MASK (1 << 0) |
442 | 540 | ||
443 | /* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */ | 541 | /* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */ |
444 | #define OMAP4430_CLKSEL_0_1_SHIFT 0 | 542 | #define OMAP4430_CLKSEL_0_1_SHIFT 0 |
543 | #define OMAP4430_CLKSEL_0_1_WIDTH 0x2 | ||
445 | #define OMAP4430_CLKSEL_0_1_MASK (0x3 << 0) | 544 | #define OMAP4430_CLKSEL_0_1_MASK (0x3 << 0) |
446 | 545 | ||
447 | /* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */ | 546 | /* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */ |
448 | #define OMAP4430_CLKSEL_24_25_SHIFT 24 | 547 | #define OMAP4430_CLKSEL_24_25_SHIFT 24 |
548 | #define OMAP4430_CLKSEL_24_25_WIDTH 0x2 | ||
449 | #define OMAP4430_CLKSEL_24_25_MASK (0x3 << 24) | 549 | #define OMAP4430_CLKSEL_24_25_MASK (0x3 << 24) |
450 | 550 | ||
451 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ | 551 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ |
452 | #define OMAP4430_CLKSEL_60M_SHIFT 24 | 552 | #define OMAP4430_CLKSEL_60M_SHIFT 24 |
553 | #define OMAP4430_CLKSEL_60M_WIDTH 0x1 | ||
453 | #define OMAP4430_CLKSEL_60M_MASK (1 << 24) | 554 | #define OMAP4430_CLKSEL_60M_MASK (1 << 24) |
454 | 555 | ||
455 | /* Used by CM_MPU_MPU_CLKCTRL */ | 556 | /* Used by CM_MPU_MPU_CLKCTRL */ |
456 | #define OMAP4460_CLKSEL_ABE_DIV_MODE_SHIFT 25 | 557 | #define OMAP4460_CLKSEL_ABE_DIV_MODE_SHIFT 25 |
558 | #define OMAP4460_CLKSEL_ABE_DIV_MODE_WIDTH 0x1 | ||
457 | #define OMAP4460_CLKSEL_ABE_DIV_MODE_MASK (1 << 25) | 559 | #define OMAP4460_CLKSEL_ABE_DIV_MODE_MASK (1 << 25) |
458 | 560 | ||
459 | /* Used by CM1_ABE_AESS_CLKCTRL */ | 561 | /* Used by CM1_ABE_AESS_CLKCTRL */ |
460 | #define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 | 562 | #define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 |
563 | #define OMAP4430_CLKSEL_AESS_FCLK_WIDTH 0x1 | ||
461 | #define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24) | 564 | #define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24) |
462 | 565 | ||
463 | /* Used by CM_CLKSEL_CORE */ | 566 | /* Used by CM_CLKSEL_CORE */ |
464 | #define OMAP4430_CLKSEL_CORE_SHIFT 0 | 567 | #define OMAP4430_CLKSEL_CORE_SHIFT 0 |
568 | #define OMAP4430_CLKSEL_CORE_WIDTH 0x1 | ||
465 | #define OMAP4430_CLKSEL_CORE_MASK (1 << 0) | 569 | #define OMAP4430_CLKSEL_CORE_MASK (1 << 0) |
466 | 570 | ||
467 | /* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */ | 571 | /* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */ |
468 | #define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 | 572 | #define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 |
573 | #define OMAP4430_CLKSEL_CORE_1_1_WIDTH 0x1 | ||
469 | #define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1) | 574 | #define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1) |
470 | 575 | ||
471 | /* Used by CM_WKUP_USIM_CLKCTRL */ | 576 | /* Used by CM_WKUP_USIM_CLKCTRL */ |
472 | #define OMAP4430_CLKSEL_DIV_SHIFT 24 | 577 | #define OMAP4430_CLKSEL_DIV_SHIFT 24 |
578 | #define OMAP4430_CLKSEL_DIV_WIDTH 0x1 | ||
473 | #define OMAP4430_CLKSEL_DIV_MASK (1 << 24) | 579 | #define OMAP4430_CLKSEL_DIV_MASK (1 << 24) |
474 | 580 | ||
475 | /* Used by CM_MPU_MPU_CLKCTRL */ | 581 | /* Used by CM_MPU_MPU_CLKCTRL */ |
476 | #define OMAP4460_CLKSEL_EMIF_DIV_MODE_SHIFT 24 | 582 | #define OMAP4460_CLKSEL_EMIF_DIV_MODE_SHIFT 24 |
583 | #define OMAP4460_CLKSEL_EMIF_DIV_MODE_WIDTH 0x1 | ||
477 | #define OMAP4460_CLKSEL_EMIF_DIV_MODE_MASK (1 << 24) | 584 | #define OMAP4460_CLKSEL_EMIF_DIV_MODE_MASK (1 << 24) |
478 | 585 | ||
479 | /* Used by CM_CAM_FDIF_CLKCTRL */ | 586 | /* Used by CM_CAM_FDIF_CLKCTRL */ |
480 | #define OMAP4430_CLKSEL_FCLK_SHIFT 24 | 587 | #define OMAP4430_CLKSEL_FCLK_SHIFT 24 |
588 | #define OMAP4430_CLKSEL_FCLK_WIDTH 0x2 | ||
481 | #define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24) | 589 | #define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24) |
482 | 590 | ||
483 | /* Used by CM_L4PER_MCBSP4_CLKCTRL */ | 591 | /* Used by CM_L4PER_MCBSP4_CLKCTRL */ |
484 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25 | 592 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25 |
593 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_WIDTH 0x1 | ||
485 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK (1 << 25) | 594 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK (1 << 25) |
486 | 595 | ||
487 | /* | 596 | /* |
@@ -490,34 +599,42 @@ | |||
490 | * CM1_ABE_MCBSP3_CLKCTRL | 599 | * CM1_ABE_MCBSP3_CLKCTRL |
491 | */ | 600 | */ |
492 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 | 601 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 |
602 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_WIDTH 0x2 | ||
493 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26) | 603 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26) |
494 | 604 | ||
495 | /* Used by CM_CLKSEL_CORE */ | 605 | /* Used by CM_CLKSEL_CORE */ |
496 | #define OMAP4430_CLKSEL_L3_SHIFT 4 | 606 | #define OMAP4430_CLKSEL_L3_SHIFT 4 |
607 | #define OMAP4430_CLKSEL_L3_WIDTH 0x1 | ||
497 | #define OMAP4430_CLKSEL_L3_MASK (1 << 4) | 608 | #define OMAP4430_CLKSEL_L3_MASK (1 << 4) |
498 | 609 | ||
499 | /* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */ | 610 | /* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */ |
500 | #define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 | 611 | #define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 |
612 | #define OMAP4430_CLKSEL_L3_SHADOW_WIDTH 0x1 | ||
501 | #define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2) | 613 | #define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2) |
502 | 614 | ||
503 | /* Used by CM_CLKSEL_CORE */ | 615 | /* Used by CM_CLKSEL_CORE */ |
504 | #define OMAP4430_CLKSEL_L4_SHIFT 8 | 616 | #define OMAP4430_CLKSEL_L4_SHIFT 8 |
617 | #define OMAP4430_CLKSEL_L4_WIDTH 0x1 | ||
505 | #define OMAP4430_CLKSEL_L4_MASK (1 << 8) | 618 | #define OMAP4430_CLKSEL_L4_MASK (1 << 8) |
506 | 619 | ||
507 | /* Used by CM_CLKSEL_ABE */ | 620 | /* Used by CM_CLKSEL_ABE */ |
508 | #define OMAP4430_CLKSEL_OPP_SHIFT 0 | 621 | #define OMAP4430_CLKSEL_OPP_SHIFT 0 |
622 | #define OMAP4430_CLKSEL_OPP_WIDTH 0x2 | ||
509 | #define OMAP4430_CLKSEL_OPP_MASK (0x3 << 0) | 623 | #define OMAP4430_CLKSEL_OPP_MASK (0x3 << 0) |
510 | 624 | ||
511 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 625 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
512 | #define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27 | 626 | #define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27 |
627 | #define OMAP4430_CLKSEL_PMD_STM_CLK_WIDTH 0x3 | ||
513 | #define OMAP4430_CLKSEL_PMD_STM_CLK_MASK (0x7 << 27) | 628 | #define OMAP4430_CLKSEL_PMD_STM_CLK_MASK (0x7 << 27) |
514 | 629 | ||
515 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 630 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
516 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT 24 | 631 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT 24 |
632 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_WIDTH 0x3 | ||
517 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK (0x7 << 24) | 633 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK (0x7 << 24) |
518 | 634 | ||
519 | /* Used by CM_GFX_GFX_CLKCTRL */ | 635 | /* Used by CM_GFX_GFX_CLKCTRL */ |
520 | #define OMAP4430_CLKSEL_SGX_FCLK_SHIFT 24 | 636 | #define OMAP4430_CLKSEL_SGX_FCLK_SHIFT 24 |
637 | #define OMAP4430_CLKSEL_SGX_FCLK_WIDTH 0x1 | ||
521 | #define OMAP4430_CLKSEL_SGX_FCLK_MASK (1 << 24) | 638 | #define OMAP4430_CLKSEL_SGX_FCLK_MASK (1 << 24) |
522 | 639 | ||
523 | /* | 640 | /* |
@@ -525,18 +642,22 @@ | |||
525 | * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL | 642 | * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL |
526 | */ | 643 | */ |
527 | #define OMAP4430_CLKSEL_SOURCE_SHIFT 24 | 644 | #define OMAP4430_CLKSEL_SOURCE_SHIFT 24 |
645 | #define OMAP4430_CLKSEL_SOURCE_WIDTH 0x2 | ||
528 | #define OMAP4430_CLKSEL_SOURCE_MASK (0x3 << 24) | 646 | #define OMAP4430_CLKSEL_SOURCE_MASK (0x3 << 24) |
529 | 647 | ||
530 | /* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */ | 648 | /* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */ |
531 | #define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 | 649 | #define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 |
650 | #define OMAP4430_CLKSEL_SOURCE_24_24_WIDTH 0x1 | ||
532 | #define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) | 651 | #define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) |
533 | 652 | ||
534 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 653 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
535 | #define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 | 654 | #define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 |
655 | #define OMAP4430_CLKSEL_UTMI_P1_WIDTH 0x1 | ||
536 | #define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24) | 656 | #define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24) |
537 | 657 | ||
538 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 658 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
539 | #define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 | 659 | #define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 |
660 | #define OMAP4430_CLKSEL_UTMI_P2_WIDTH 0x1 | ||
540 | #define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25) | 661 | #define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25) |
541 | 662 | ||
542 | /* | 663 | /* |
@@ -549,30 +670,37 @@ | |||
549 | * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL | 670 | * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL |
550 | */ | 671 | */ |
551 | #define OMAP4430_CLKTRCTRL_SHIFT 0 | 672 | #define OMAP4430_CLKTRCTRL_SHIFT 0 |
673 | #define OMAP4430_CLKTRCTRL_WIDTH 0x2 | ||
552 | #define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) | 674 | #define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) |
553 | 675 | ||
554 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ | 676 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ |
555 | #define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT 0 | 677 | #define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT 0 |
678 | #define OMAP4430_CORE_DPLL_EMU_DIV_WIDTH 0x7 | ||
556 | #define OMAP4430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0) | 679 | #define OMAP4430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0) |
557 | 680 | ||
558 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ | 681 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ |
559 | #define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT 8 | 682 | #define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT 8 |
683 | #define OMAP4430_CORE_DPLL_EMU_MULT_WIDTH 0xb | ||
560 | #define OMAP4430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8) | 684 | #define OMAP4430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8) |
561 | 685 | ||
562 | /* Used by REVISION_CM1, REVISION_CM2 */ | 686 | /* Used by REVISION_CM1, REVISION_CM2 */ |
563 | #define OMAP4430_CUSTOM_SHIFT 6 | 687 | #define OMAP4430_CUSTOM_SHIFT 6 |
688 | #define OMAP4430_CUSTOM_WIDTH 0x2 | ||
564 | #define OMAP4430_CUSTOM_MASK (0x3 << 6) | 689 | #define OMAP4430_CUSTOM_MASK (0x3 << 6) |
565 | 690 | ||
566 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ | 691 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ |
567 | #define OMAP4430_D2D_DYNDEP_SHIFT 18 | 692 | #define OMAP4430_D2D_DYNDEP_SHIFT 18 |
693 | #define OMAP4430_D2D_DYNDEP_WIDTH 0x1 | ||
568 | #define OMAP4430_D2D_DYNDEP_MASK (1 << 18) | 694 | #define OMAP4430_D2D_DYNDEP_MASK (1 << 18) |
569 | 695 | ||
570 | /* Used by CM_MPU_STATICDEP */ | 696 | /* Used by CM_MPU_STATICDEP */ |
571 | #define OMAP4430_D2D_STATDEP_SHIFT 18 | 697 | #define OMAP4430_D2D_STATDEP_SHIFT 18 |
698 | #define OMAP4430_D2D_STATDEP_WIDTH 0x1 | ||
572 | #define OMAP4430_D2D_STATDEP_MASK (1 << 18) | 699 | #define OMAP4430_D2D_STATDEP_MASK (1 << 18) |
573 | 700 | ||
574 | /* Used by CM_CLKSEL_DPLL_MPU */ | 701 | /* Used by CM_CLKSEL_DPLL_MPU */ |
575 | #define OMAP4460_DCC_COUNT_MAX_SHIFT 24 | 702 | #define OMAP4460_DCC_COUNT_MAX_SHIFT 24 |
703 | #define OMAP4460_DCC_COUNT_MAX_WIDTH 0x8 | ||
576 | #define OMAP4460_DCC_COUNT_MAX_MASK (0xff << 24) | 704 | #define OMAP4460_DCC_COUNT_MAX_MASK (0xff << 24) |
577 | 705 | ||
578 | /* Used by CM_CLKSEL_DPLL_MPU */ | 706 | /* Used by CM_CLKSEL_DPLL_MPU */ |
@@ -586,22 +714,27 @@ | |||
586 | * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB | 714 | * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB |
587 | */ | 715 | */ |
588 | #define OMAP4430_DELTAMSTEP_SHIFT 0 | 716 | #define OMAP4430_DELTAMSTEP_SHIFT 0 |
717 | #define OMAP4430_DELTAMSTEP_WIDTH 0x14 | ||
589 | #define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0) | 718 | #define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0) |
590 | 719 | ||
591 | /* Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_USB */ | 720 | /* Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_USB */ |
592 | #define OMAP4460_DELTAMSTEP_0_20_SHIFT 0 | 721 | #define OMAP4460_DELTAMSTEP_0_20_SHIFT 0 |
722 | #define OMAP4460_DELTAMSTEP_0_20_WIDTH 0x15 | ||
593 | #define OMAP4460_DELTAMSTEP_0_20_MASK (0x1fffff << 0) | 723 | #define OMAP4460_DELTAMSTEP_0_20_MASK (0x1fffff << 0) |
594 | 724 | ||
595 | /* Used by CM_DLL_CTRL */ | 725 | /* Used by CM_DLL_CTRL */ |
596 | #define OMAP4430_DLL_OVERRIDE_SHIFT 0 | 726 | #define OMAP4430_DLL_OVERRIDE_SHIFT 0 |
727 | #define OMAP4430_DLL_OVERRIDE_WIDTH 0x1 | ||
597 | #define OMAP4430_DLL_OVERRIDE_MASK (1 << 0) | 728 | #define OMAP4430_DLL_OVERRIDE_MASK (1 << 0) |
598 | 729 | ||
599 | /* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */ | 730 | /* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */ |
600 | #define OMAP4430_DLL_OVERRIDE_2_2_SHIFT 2 | 731 | #define OMAP4430_DLL_OVERRIDE_2_2_SHIFT 2 |
732 | #define OMAP4430_DLL_OVERRIDE_2_2_WIDTH 0x1 | ||
601 | #define OMAP4430_DLL_OVERRIDE_2_2_MASK (1 << 2) | 733 | #define OMAP4430_DLL_OVERRIDE_2_2_MASK (1 << 2) |
602 | 734 | ||
603 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ | 735 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
604 | #define OMAP4430_DLL_RESET_SHIFT 3 | 736 | #define OMAP4430_DLL_RESET_SHIFT 3 |
737 | #define OMAP4430_DLL_RESET_WIDTH 0x1 | ||
605 | #define OMAP4430_DLL_RESET_MASK (1 << 3) | 738 | #define OMAP4430_DLL_RESET_MASK (1 << 3) |
606 | 739 | ||
607 | /* | 740 | /* |
@@ -610,30 +743,37 @@ | |||
610 | * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB | 743 | * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB |
611 | */ | 744 | */ |
612 | #define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 | 745 | #define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 |
746 | #define OMAP4430_DPLL_BYP_CLKSEL_WIDTH 0x1 | ||
613 | #define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23) | 747 | #define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23) |
614 | 748 | ||
615 | /* Used by CM_CLKDCOLDO_DPLL_USB */ | 749 | /* Used by CM_CLKDCOLDO_DPLL_USB */ |
616 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 | 750 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 |
751 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_WIDTH 0x1 | ||
617 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) | 752 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) |
618 | 753 | ||
619 | /* Used by CM_CLKSEL_DPLL_CORE */ | 754 | /* Used by CM_CLKSEL_DPLL_CORE */ |
620 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 | 755 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 |
756 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_WIDTH 0x1 | ||
621 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20) | 757 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20) |
622 | 758 | ||
623 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ | 759 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
624 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 | 760 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 |
761 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_WIDTH 0x5 | ||
625 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) | 762 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) |
626 | 763 | ||
627 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ | 764 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
628 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 | 765 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 |
766 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_WIDTH 0x1 | ||
629 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5) | 767 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5) |
630 | 768 | ||
631 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ | 769 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
632 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 | 770 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 |
771 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_WIDTH 0x1 | ||
633 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8) | 772 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8) |
634 | 773 | ||
635 | /* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ | 774 | /* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ |
636 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT 10 | 775 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT 10 |
776 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_WIDTH 0x1 | ||
637 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) | 777 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) |
638 | 778 | ||
639 | /* | 779 | /* |
@@ -641,10 +781,12 @@ | |||
641 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO | 781 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO |
642 | */ | 782 | */ |
643 | #define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 | 783 | #define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 |
784 | #define OMAP4430_DPLL_CLKOUT_DIV_WIDTH 0x5 | ||
644 | #define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) | 785 | #define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) |
645 | 786 | ||
646 | /* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */ | 787 | /* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */ |
647 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT 0 | 788 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT 0 |
789 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_WIDTH 0x7 | ||
648 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) | 790 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) |
649 | 791 | ||
650 | /* | 792 | /* |
@@ -652,10 +794,12 @@ | |||
652 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO | 794 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO |
653 | */ | 795 | */ |
654 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 | 796 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 |
797 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_WIDTH 0x1 | ||
655 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) | 798 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) |
656 | 799 | ||
657 | /* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */ | 800 | /* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */ |
658 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT 7 | 801 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT 7 |
802 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_WIDTH 0x1 | ||
659 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7) | 803 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7) |
660 | 804 | ||
661 | /* | 805 | /* |
@@ -663,18 +807,22 @@ | |||
663 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB | 807 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB |
664 | */ | 808 | */ |
665 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 | 809 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 |
810 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_WIDTH 0x1 | ||
666 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) | 811 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) |
667 | 812 | ||
668 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ | 813 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
669 | #define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 | 814 | #define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 |
815 | #define OMAP4430_DPLL_CORE_DPLL_EN_WIDTH 0x3 | ||
670 | #define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8) | 816 | #define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8) |
671 | 817 | ||
672 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ | 818 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
673 | #define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 | 819 | #define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 |
820 | #define OMAP4430_DPLL_CORE_M2_DIV_WIDTH 0x5 | ||
674 | #define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11) | 821 | #define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11) |
675 | 822 | ||
676 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ | 823 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ |
677 | #define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 | 824 | #define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 |
825 | #define OMAP4430_DPLL_CORE_M5_DIV_WIDTH 0x5 | ||
678 | #define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3) | 826 | #define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3) |
679 | 827 | ||
680 | /* | 828 | /* |
@@ -683,10 +831,12 @@ | |||
683 | * CM_CLKSEL_DPLL_UNIPRO | 831 | * CM_CLKSEL_DPLL_UNIPRO |
684 | */ | 832 | */ |
685 | #define OMAP4430_DPLL_DIV_SHIFT 0 | 833 | #define OMAP4430_DPLL_DIV_SHIFT 0 |
834 | #define OMAP4430_DPLL_DIV_WIDTH 0x7 | ||
686 | #define OMAP4430_DPLL_DIV_MASK (0x7f << 0) | 835 | #define OMAP4430_DPLL_DIV_MASK (0x7f << 0) |
687 | 836 | ||
688 | /* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */ | 837 | /* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */ |
689 | #define OMAP4430_DPLL_DIV_0_7_SHIFT 0 | 838 | #define OMAP4430_DPLL_DIV_0_7_SHIFT 0 |
839 | #define OMAP4430_DPLL_DIV_0_7_WIDTH 0x8 | ||
690 | #define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) | 840 | #define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) |
691 | 841 | ||
692 | /* | 842 | /* |
@@ -694,10 +844,12 @@ | |||
694 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER | 844 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER |
695 | */ | 845 | */ |
696 | #define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 | 846 | #define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 |
847 | #define OMAP4430_DPLL_DRIFTGUARD_EN_WIDTH 0x1 | ||
697 | #define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8) | 848 | #define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8) |
698 | 849 | ||
699 | /* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */ | 850 | /* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */ |
700 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT 3 | 851 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT 3 |
852 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_WIDTH 0x1 | ||
701 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3) | 853 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3) |
702 | 854 | ||
703 | /* | 855 | /* |
@@ -706,6 +858,7 @@ | |||
706 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB | 858 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
707 | */ | 859 | */ |
708 | #define OMAP4430_DPLL_EN_SHIFT 0 | 860 | #define OMAP4430_DPLL_EN_SHIFT 0 |
861 | #define OMAP4430_DPLL_EN_WIDTH 0x3 | ||
709 | #define OMAP4430_DPLL_EN_MASK (0x7 << 0) | 862 | #define OMAP4430_DPLL_EN_MASK (0x7 << 0) |
710 | 863 | ||
711 | /* | 864 | /* |
@@ -714,6 +867,7 @@ | |||
714 | * CM_CLKMODE_DPLL_UNIPRO | 867 | * CM_CLKMODE_DPLL_UNIPRO |
715 | */ | 868 | */ |
716 | #define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 | 869 | #define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 |
870 | #define OMAP4430_DPLL_LPMODE_EN_WIDTH 0x1 | ||
717 | #define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) | 871 | #define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) |
718 | 872 | ||
719 | /* | 873 | /* |
@@ -722,10 +876,12 @@ | |||
722 | * CM_CLKSEL_DPLL_UNIPRO | 876 | * CM_CLKSEL_DPLL_UNIPRO |
723 | */ | 877 | */ |
724 | #define OMAP4430_DPLL_MULT_SHIFT 8 | 878 | #define OMAP4430_DPLL_MULT_SHIFT 8 |
879 | #define OMAP4430_DPLL_MULT_WIDTH 0xb | ||
725 | #define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) | 880 | #define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) |
726 | 881 | ||
727 | /* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */ | 882 | /* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */ |
728 | #define OMAP4430_DPLL_MULT_USB_SHIFT 8 | 883 | #define OMAP4430_DPLL_MULT_USB_SHIFT 8 |
884 | #define OMAP4430_DPLL_MULT_USB_WIDTH 0xc | ||
729 | #define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) | 885 | #define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) |
730 | 886 | ||
731 | /* | 887 | /* |
@@ -734,10 +890,12 @@ | |||
734 | * CM_CLKMODE_DPLL_UNIPRO | 890 | * CM_CLKMODE_DPLL_UNIPRO |
735 | */ | 891 | */ |
736 | #define OMAP4430_DPLL_REGM4XEN_SHIFT 11 | 892 | #define OMAP4430_DPLL_REGM4XEN_SHIFT 11 |
893 | #define OMAP4430_DPLL_REGM4XEN_WIDTH 0x1 | ||
737 | #define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) | 894 | #define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) |
738 | 895 | ||
739 | /* Used by CM_CLKSEL_DPLL_USB */ | 896 | /* Used by CM_CLKSEL_DPLL_USB */ |
740 | #define OMAP4430_DPLL_SD_DIV_SHIFT 24 | 897 | #define OMAP4430_DPLL_SD_DIV_SHIFT 24 |
898 | #define OMAP4430_DPLL_SD_DIV_WIDTH 0x8 | ||
741 | #define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) | 899 | #define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) |
742 | 900 | ||
743 | /* | 901 | /* |
@@ -746,6 +904,7 @@ | |||
746 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB | 904 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
747 | */ | 905 | */ |
748 | #define OMAP4430_DPLL_SSC_ACK_SHIFT 13 | 906 | #define OMAP4430_DPLL_SSC_ACK_SHIFT 13 |
907 | #define OMAP4430_DPLL_SSC_ACK_WIDTH 0x1 | ||
749 | #define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13) | 908 | #define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13) |
750 | 909 | ||
751 | /* | 910 | /* |
@@ -754,6 +913,7 @@ | |||
754 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB | 913 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
755 | */ | 914 | */ |
756 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 | 915 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 |
916 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_WIDTH 0x1 | ||
757 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) | 917 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) |
758 | 918 | ||
759 | /* | 919 | /* |
@@ -762,42 +922,52 @@ | |||
762 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB | 922 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
763 | */ | 923 | */ |
764 | #define OMAP4430_DPLL_SSC_EN_SHIFT 12 | 924 | #define OMAP4430_DPLL_SSC_EN_SHIFT 12 |
925 | #define OMAP4430_DPLL_SSC_EN_WIDTH 0x1 | ||
765 | #define OMAP4430_DPLL_SSC_EN_MASK (1 << 12) | 926 | #define OMAP4430_DPLL_SSC_EN_MASK (1 << 12) |
766 | 927 | ||
767 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ | 928 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ |
768 | #define OMAP4430_DSS_DYNDEP_SHIFT 8 | 929 | #define OMAP4430_DSS_DYNDEP_SHIFT 8 |
930 | #define OMAP4430_DSS_DYNDEP_WIDTH 0x1 | ||
769 | #define OMAP4430_DSS_DYNDEP_MASK (1 << 8) | 931 | #define OMAP4430_DSS_DYNDEP_MASK (1 << 8) |
770 | 932 | ||
771 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ | 933 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ |
772 | #define OMAP4430_DSS_STATDEP_SHIFT 8 | 934 | #define OMAP4430_DSS_STATDEP_SHIFT 8 |
935 | #define OMAP4430_DSS_STATDEP_WIDTH 0x1 | ||
773 | #define OMAP4430_DSS_STATDEP_MASK (1 << 8) | 936 | #define OMAP4430_DSS_STATDEP_MASK (1 << 8) |
774 | 937 | ||
775 | /* Used by CM_L3_2_DYNAMICDEP */ | 938 | /* Used by CM_L3_2_DYNAMICDEP */ |
776 | #define OMAP4430_DUCATI_DYNDEP_SHIFT 0 | 939 | #define OMAP4430_DUCATI_DYNDEP_SHIFT 0 |
940 | #define OMAP4430_DUCATI_DYNDEP_WIDTH 0x1 | ||
777 | #define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0) | 941 | #define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0) |
778 | 942 | ||
779 | /* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ | 943 | /* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ |
780 | #define OMAP4430_DUCATI_STATDEP_SHIFT 0 | 944 | #define OMAP4430_DUCATI_STATDEP_SHIFT 0 |
945 | #define OMAP4430_DUCATI_STATDEP_WIDTH 0x1 | ||
781 | #define OMAP4430_DUCATI_STATDEP_MASK (1 << 0) | 946 | #define OMAP4430_DUCATI_STATDEP_MASK (1 << 0) |
782 | 947 | ||
783 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ | 948 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
784 | #define OMAP4430_FREQ_UPDATE_SHIFT 0 | 949 | #define OMAP4430_FREQ_UPDATE_SHIFT 0 |
950 | #define OMAP4430_FREQ_UPDATE_WIDTH 0x1 | ||
785 | #define OMAP4430_FREQ_UPDATE_MASK (1 << 0) | 951 | #define OMAP4430_FREQ_UPDATE_MASK (1 << 0) |
786 | 952 | ||
787 | /* Used by REVISION_CM1, REVISION_CM2 */ | 953 | /* Used by REVISION_CM1, REVISION_CM2 */ |
788 | #define OMAP4430_FUNC_SHIFT 16 | 954 | #define OMAP4430_FUNC_SHIFT 16 |
955 | #define OMAP4430_FUNC_WIDTH 0xc | ||
789 | #define OMAP4430_FUNC_MASK (0xfff << 16) | 956 | #define OMAP4430_FUNC_MASK (0xfff << 16) |
790 | 957 | ||
791 | /* Used by CM_L3_2_DYNAMICDEP */ | 958 | /* Used by CM_L3_2_DYNAMICDEP */ |
792 | #define OMAP4430_GFX_DYNDEP_SHIFT 10 | 959 | #define OMAP4430_GFX_DYNDEP_SHIFT 10 |
960 | #define OMAP4430_GFX_DYNDEP_WIDTH 0x1 | ||
793 | #define OMAP4430_GFX_DYNDEP_MASK (1 << 10) | 961 | #define OMAP4430_GFX_DYNDEP_MASK (1 << 10) |
794 | 962 | ||
795 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ | 963 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ |
796 | #define OMAP4430_GFX_STATDEP_SHIFT 10 | 964 | #define OMAP4430_GFX_STATDEP_SHIFT 10 |
965 | #define OMAP4430_GFX_STATDEP_WIDTH 0x1 | ||
797 | #define OMAP4430_GFX_STATDEP_MASK (1 << 10) | 966 | #define OMAP4430_GFX_STATDEP_MASK (1 << 10) |
798 | 967 | ||
799 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ | 968 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ |
800 | #define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 | 969 | #define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 |
970 | #define OMAP4430_GPMC_FREQ_UPDATE_WIDTH 0x1 | ||
801 | #define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0) | 971 | #define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0) |
802 | 972 | ||
803 | /* | 973 | /* |
@@ -805,6 +975,7 @@ | |||
805 | * CM_DIV_M4_DPLL_PER | 975 | * CM_DIV_M4_DPLL_PER |
806 | */ | 976 | */ |
807 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 | 977 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 |
978 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_WIDTH 0x5 | ||
808 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) | 979 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) |
809 | 980 | ||
810 | /* | 981 | /* |
@@ -812,6 +983,7 @@ | |||
812 | * CM_DIV_M4_DPLL_PER | 983 | * CM_DIV_M4_DPLL_PER |
813 | */ | 984 | */ |
814 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 | 985 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 |
986 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_WIDTH 0x1 | ||
815 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) | 987 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) |
816 | 988 | ||
817 | /* | 989 | /* |
@@ -819,6 +991,7 @@ | |||
819 | * CM_DIV_M4_DPLL_PER | 991 | * CM_DIV_M4_DPLL_PER |
820 | */ | 992 | */ |
821 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 | 993 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 |
994 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_WIDTH 0x1 | ||
822 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) | 995 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) |
823 | 996 | ||
824 | /* | 997 | /* |
@@ -826,6 +999,7 @@ | |||
826 | * CM_DIV_M4_DPLL_PER | 999 | * CM_DIV_M4_DPLL_PER |
827 | */ | 1000 | */ |
828 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 | 1001 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 |
1002 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_WIDTH 0x1 | ||
829 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) | 1003 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) |
830 | 1004 | ||
831 | /* | 1005 | /* |
@@ -833,6 +1007,7 @@ | |||
833 | * CM_DIV_M5_DPLL_PER | 1007 | * CM_DIV_M5_DPLL_PER |
834 | */ | 1008 | */ |
835 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 | 1009 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 |
1010 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_WIDTH 0x5 | ||
836 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) | 1011 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) |
837 | 1012 | ||
838 | /* | 1013 | /* |
@@ -840,6 +1015,7 @@ | |||
840 | * CM_DIV_M5_DPLL_PER | 1015 | * CM_DIV_M5_DPLL_PER |
841 | */ | 1016 | */ |
842 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 | 1017 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 |
1018 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_WIDTH 0x1 | ||
843 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) | 1019 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) |
844 | 1020 | ||
845 | /* | 1021 | /* |
@@ -847,6 +1023,7 @@ | |||
847 | * CM_DIV_M5_DPLL_PER | 1023 | * CM_DIV_M5_DPLL_PER |
848 | */ | 1024 | */ |
849 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 | 1025 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 |
1026 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_WIDTH 0x1 | ||
850 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) | 1027 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) |
851 | 1028 | ||
852 | /* | 1029 | /* |
@@ -854,38 +1031,47 @@ | |||
854 | * CM_DIV_M5_DPLL_PER | 1031 | * CM_DIV_M5_DPLL_PER |
855 | */ | 1032 | */ |
856 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 | 1033 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 |
1034 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_WIDTH 0x1 | ||
857 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) | 1035 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) |
858 | 1036 | ||
859 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ | 1037 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
860 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 | 1038 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 |
1039 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_WIDTH 0x5 | ||
861 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) | 1040 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) |
862 | 1041 | ||
863 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ | 1042 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
864 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 | 1043 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 |
1044 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_WIDTH 0x1 | ||
865 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) | 1045 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) |
866 | 1046 | ||
867 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ | 1047 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
868 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 | 1048 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 |
1049 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_WIDTH 0x1 | ||
869 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) | 1050 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) |
870 | 1051 | ||
871 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ | 1052 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
872 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 | 1053 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 |
1054 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_WIDTH 0x1 | ||
873 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) | 1055 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) |
874 | 1056 | ||
875 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ | 1057 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
876 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 | 1058 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 |
1059 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_WIDTH 0x5 | ||
877 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) | 1060 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) |
878 | 1061 | ||
879 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ | 1062 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
880 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 | 1063 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 |
1064 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_WIDTH 0x1 | ||
881 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5) | 1065 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5) |
882 | 1066 | ||
883 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ | 1067 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
884 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 | 1068 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 |
1069 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_WIDTH 0x1 | ||
885 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8) | 1070 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8) |
886 | 1071 | ||
887 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ | 1072 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
888 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 | 1073 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 |
1074 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_WIDTH 0x1 | ||
889 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12) | 1075 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12) |
890 | 1076 | ||
891 | /* | 1077 | /* |
@@ -893,53 +1079,48 @@ | |||
893 | * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, | 1079 | * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, |
894 | * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, | 1080 | * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, |
895 | * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, | 1081 | * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, |
896 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, | 1082 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL, |
897 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, | 1083 | * CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, CM_CAM_FDIF_CLKCTRL, |
898 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, | 1084 | * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, CM_CM1_PROFILING_CLKCTRL, |
899 | * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, | 1085 | * CM_CM2_PROFILING_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, |
900 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, | 1086 | * CM_D2D_SAD2D_FW_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, |
901 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, | ||
902 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, | 1087 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, |
903 | * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, | 1088 | * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, |
904 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, | 1089 | * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
905 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 1090 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL, |
906 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 1091 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, |
907 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, | 1092 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL, |
908 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, | 1093 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, |
909 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL, | 1094 | * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, |
910 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL, | 1095 | * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, |
911 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, | ||
912 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, | ||
913 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, | ||
914 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, | 1096 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, |
915 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, | 1097 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, |
916 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, | 1098 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, |
917 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, | 1099 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, |
918 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, | 1100 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, |
919 | * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, | 1101 | * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, |
920 | * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, | 1102 | * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, |
921 | * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, | 1103 | * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, |
922 | * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, | 1104 | * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, |
923 | * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, | 1105 | * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL, |
924 | * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, | 1106 | * CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, |
925 | * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, | 1107 | * CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL, |
926 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, | 1108 | * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, |
927 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, | ||
928 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, | ||
929 | * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, | 1109 | * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, |
930 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, | 1110 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, |
931 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, | 1111 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, |
932 | * CM_MEMIF_EMIF_H2_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, | ||
933 | * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, | 1112 | * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, |
934 | * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, | 1113 | * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL, |
935 | * CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, | 1114 | * CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL, |
936 | * CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL | 1115 | * CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL |
937 | */ | 1116 | */ |
938 | #define OMAP4430_IDLEST_SHIFT 16 | 1117 | #define OMAP4430_IDLEST_SHIFT 16 |
1118 | #define OMAP4430_IDLEST_WIDTH 0x2 | ||
939 | #define OMAP4430_IDLEST_MASK (0x3 << 16) | 1119 | #define OMAP4430_IDLEST_MASK (0x3 << 16) |
940 | 1120 | ||
941 | /* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ | 1121 | /* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ |
942 | #define OMAP4430_ISS_DYNDEP_SHIFT 9 | 1122 | #define OMAP4430_ISS_DYNDEP_SHIFT 9 |
1123 | #define OMAP4430_ISS_DYNDEP_WIDTH 0x1 | ||
943 | #define OMAP4430_ISS_DYNDEP_MASK (1 << 9) | 1124 | #define OMAP4430_ISS_DYNDEP_MASK (1 << 9) |
944 | 1125 | ||
945 | /* | 1126 | /* |
@@ -947,10 +1128,12 @@ | |||
947 | * CM_TESLA_STATICDEP | 1128 | * CM_TESLA_STATICDEP |
948 | */ | 1129 | */ |
949 | #define OMAP4430_ISS_STATDEP_SHIFT 9 | 1130 | #define OMAP4430_ISS_STATDEP_SHIFT 9 |
1131 | #define OMAP4430_ISS_STATDEP_WIDTH 0x1 | ||
950 | #define OMAP4430_ISS_STATDEP_MASK (1 << 9) | 1132 | #define OMAP4430_ISS_STATDEP_MASK (1 << 9) |
951 | 1133 | ||
952 | /* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ | 1134 | /* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ |
953 | #define OMAP4430_IVAHD_DYNDEP_SHIFT 2 | 1135 | #define OMAP4430_IVAHD_DYNDEP_SHIFT 2 |
1136 | #define OMAP4430_IVAHD_DYNDEP_WIDTH 0x1 | ||
954 | #define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2) | 1137 | #define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2) |
955 | 1138 | ||
956 | /* | 1139 | /* |
@@ -959,10 +1142,12 @@ | |||
959 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1142 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
960 | */ | 1143 | */ |
961 | #define OMAP4430_IVAHD_STATDEP_SHIFT 2 | 1144 | #define OMAP4430_IVAHD_STATDEP_SHIFT 2 |
1145 | #define OMAP4430_IVAHD_STATDEP_WIDTH 0x1 | ||
962 | #define OMAP4430_IVAHD_STATDEP_MASK (1 << 2) | 1146 | #define OMAP4430_IVAHD_STATDEP_MASK (1 << 2) |
963 | 1147 | ||
964 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ | 1148 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ |
965 | #define OMAP4430_L3INIT_DYNDEP_SHIFT 7 | 1149 | #define OMAP4430_L3INIT_DYNDEP_SHIFT 7 |
1150 | #define OMAP4430_L3INIT_DYNDEP_WIDTH 0x1 | ||
966 | #define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7) | 1151 | #define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7) |
967 | 1152 | ||
968 | /* | 1153 | /* |
@@ -970,6 +1155,7 @@ | |||
970 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1155 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
971 | */ | 1156 | */ |
972 | #define OMAP4430_L3INIT_STATDEP_SHIFT 7 | 1157 | #define OMAP4430_L3INIT_STATDEP_SHIFT 7 |
1158 | #define OMAP4430_L3INIT_STATDEP_WIDTH 0x1 | ||
973 | #define OMAP4430_L3INIT_STATDEP_MASK (1 << 7) | 1159 | #define OMAP4430_L3INIT_STATDEP_MASK (1 << 7) |
974 | 1160 | ||
975 | /* | 1161 | /* |
@@ -977,6 +1163,7 @@ | |||
977 | * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | 1163 | * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP |
978 | */ | 1164 | */ |
979 | #define OMAP4430_L3_1_DYNDEP_SHIFT 5 | 1165 | #define OMAP4430_L3_1_DYNDEP_SHIFT 5 |
1166 | #define OMAP4430_L3_1_DYNDEP_WIDTH 0x1 | ||
980 | #define OMAP4430_L3_1_DYNDEP_MASK (1 << 5) | 1167 | #define OMAP4430_L3_1_DYNDEP_MASK (1 << 5) |
981 | 1168 | ||
982 | /* | 1169 | /* |
@@ -986,6 +1173,7 @@ | |||
986 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1173 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
987 | */ | 1174 | */ |
988 | #define OMAP4430_L3_1_STATDEP_SHIFT 5 | 1175 | #define OMAP4430_L3_1_STATDEP_SHIFT 5 |
1176 | #define OMAP4430_L3_1_STATDEP_WIDTH 0x1 | ||
989 | #define OMAP4430_L3_1_STATDEP_MASK (1 << 5) | 1177 | #define OMAP4430_L3_1_STATDEP_MASK (1 << 5) |
990 | 1178 | ||
991 | /* | 1179 | /* |
@@ -995,6 +1183,7 @@ | |||
995 | * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP | 1183 | * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP |
996 | */ | 1184 | */ |
997 | #define OMAP4430_L3_2_DYNDEP_SHIFT 6 | 1185 | #define OMAP4430_L3_2_DYNDEP_SHIFT 6 |
1186 | #define OMAP4430_L3_2_DYNDEP_WIDTH 0x1 | ||
998 | #define OMAP4430_L3_2_DYNDEP_MASK (1 << 6) | 1187 | #define OMAP4430_L3_2_DYNDEP_MASK (1 << 6) |
999 | 1188 | ||
1000 | /* | 1189 | /* |
@@ -1004,10 +1193,12 @@ | |||
1004 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1193 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1005 | */ | 1194 | */ |
1006 | #define OMAP4430_L3_2_STATDEP_SHIFT 6 | 1195 | #define OMAP4430_L3_2_STATDEP_SHIFT 6 |
1196 | #define OMAP4430_L3_2_STATDEP_WIDTH 0x1 | ||
1007 | #define OMAP4430_L3_2_STATDEP_MASK (1 << 6) | 1197 | #define OMAP4430_L3_2_STATDEP_MASK (1 << 6) |
1008 | 1198 | ||
1009 | /* Used by CM_L3_1_DYNAMICDEP */ | 1199 | /* Used by CM_L3_1_DYNAMICDEP */ |
1010 | #define OMAP4430_L4CFG_DYNDEP_SHIFT 12 | 1200 | #define OMAP4430_L4CFG_DYNDEP_SHIFT 12 |
1201 | #define OMAP4430_L4CFG_DYNDEP_WIDTH 0x1 | ||
1011 | #define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12) | 1202 | #define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12) |
1012 | 1203 | ||
1013 | /* | 1204 | /* |
@@ -1015,10 +1206,12 @@ | |||
1015 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1206 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1016 | */ | 1207 | */ |
1017 | #define OMAP4430_L4CFG_STATDEP_SHIFT 12 | 1208 | #define OMAP4430_L4CFG_STATDEP_SHIFT 12 |
1209 | #define OMAP4430_L4CFG_STATDEP_WIDTH 0x1 | ||
1018 | #define OMAP4430_L4CFG_STATDEP_MASK (1 << 12) | 1210 | #define OMAP4430_L4CFG_STATDEP_MASK (1 << 12) |
1019 | 1211 | ||
1020 | /* Used by CM_L3_2_DYNAMICDEP */ | 1212 | /* Used by CM_L3_2_DYNAMICDEP */ |
1021 | #define OMAP4430_L4PER_DYNDEP_SHIFT 13 | 1213 | #define OMAP4430_L4PER_DYNDEP_SHIFT 13 |
1214 | #define OMAP4430_L4PER_DYNDEP_WIDTH 0x1 | ||
1022 | #define OMAP4430_L4PER_DYNDEP_MASK (1 << 13) | 1215 | #define OMAP4430_L4PER_DYNDEP_MASK (1 << 13) |
1023 | 1216 | ||
1024 | /* | 1217 | /* |
@@ -1026,10 +1219,12 @@ | |||
1026 | * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1219 | * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1027 | */ | 1220 | */ |
1028 | #define OMAP4430_L4PER_STATDEP_SHIFT 13 | 1221 | #define OMAP4430_L4PER_STATDEP_SHIFT 13 |
1222 | #define OMAP4430_L4PER_STATDEP_WIDTH 0x1 | ||
1029 | #define OMAP4430_L4PER_STATDEP_MASK (1 << 13) | 1223 | #define OMAP4430_L4PER_STATDEP_MASK (1 << 13) |
1030 | 1224 | ||
1031 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ | 1225 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ |
1032 | #define OMAP4430_L4SEC_DYNDEP_SHIFT 14 | 1226 | #define OMAP4430_L4SEC_DYNDEP_SHIFT 14 |
1227 | #define OMAP4430_L4SEC_DYNDEP_WIDTH 0x1 | ||
1033 | #define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14) | 1228 | #define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14) |
1034 | 1229 | ||
1035 | /* | 1230 | /* |
@@ -1037,10 +1232,12 @@ | |||
1037 | * CM_SDMA_STATICDEP | 1232 | * CM_SDMA_STATICDEP |
1038 | */ | 1233 | */ |
1039 | #define OMAP4430_L4SEC_STATDEP_SHIFT 14 | 1234 | #define OMAP4430_L4SEC_STATDEP_SHIFT 14 |
1235 | #define OMAP4430_L4SEC_STATDEP_WIDTH 0x1 | ||
1040 | #define OMAP4430_L4SEC_STATDEP_MASK (1 << 14) | 1236 | #define OMAP4430_L4SEC_STATDEP_MASK (1 << 14) |
1041 | 1237 | ||
1042 | /* Used by CM_L4CFG_DYNAMICDEP */ | 1238 | /* Used by CM_L4CFG_DYNAMICDEP */ |
1043 | #define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 | 1239 | #define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 |
1240 | #define OMAP4430_L4WKUP_DYNDEP_WIDTH 0x1 | ||
1044 | #define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15) | 1241 | #define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15) |
1045 | 1242 | ||
1046 | /* | 1243 | /* |
@@ -1048,6 +1245,7 @@ | |||
1048 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1245 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1049 | */ | 1246 | */ |
1050 | #define OMAP4430_L4WKUP_STATDEP_SHIFT 15 | 1247 | #define OMAP4430_L4WKUP_STATDEP_SHIFT 15 |
1248 | #define OMAP4430_L4WKUP_STATDEP_WIDTH 0x1 | ||
1051 | #define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15) | 1249 | #define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15) |
1052 | 1250 | ||
1053 | /* | 1251 | /* |
@@ -1055,6 +1253,7 @@ | |||
1055 | * CM_MPU_DYNAMICDEP | 1253 | * CM_MPU_DYNAMICDEP |
1056 | */ | 1254 | */ |
1057 | #define OMAP4430_MEMIF_DYNDEP_SHIFT 4 | 1255 | #define OMAP4430_MEMIF_DYNDEP_SHIFT 4 |
1256 | #define OMAP4430_MEMIF_DYNDEP_WIDTH 0x1 | ||
1058 | #define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4) | 1257 | #define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4) |
1059 | 1258 | ||
1060 | /* | 1259 | /* |
@@ -1064,6 +1263,7 @@ | |||
1064 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP | 1263 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1065 | */ | 1264 | */ |
1066 | #define OMAP4430_MEMIF_STATDEP_SHIFT 4 | 1265 | #define OMAP4430_MEMIF_STATDEP_SHIFT 4 |
1266 | #define OMAP4430_MEMIF_STATDEP_WIDTH 0x1 | ||
1067 | #define OMAP4430_MEMIF_STATDEP_MASK (1 << 4) | 1267 | #define OMAP4430_MEMIF_STATDEP_MASK (1 << 4) |
1068 | 1268 | ||
1069 | /* | 1269 | /* |
@@ -1073,6 +1273,7 @@ | |||
1073 | * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB | 1273 | * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB |
1074 | */ | 1274 | */ |
1075 | #define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 | 1275 | #define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 |
1276 | #define OMAP4430_MODFREQDIV_EXPONENT_WIDTH 0x3 | ||
1076 | #define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8) | 1277 | #define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8) |
1077 | 1278 | ||
1078 | /* | 1279 | /* |
@@ -1082,6 +1283,7 @@ | |||
1082 | * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB | 1283 | * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB |
1083 | */ | 1284 | */ |
1084 | #define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 | 1285 | #define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 |
1286 | #define OMAP4430_MODFREQDIV_MANTISSA_WIDTH 0x7 | ||
1085 | #define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0) | 1287 | #define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0) |
1086 | 1288 | ||
1087 | /* | 1289 | /* |
@@ -1089,69 +1291,68 @@ | |||
1089 | * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, | 1291 | * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, |
1090 | * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, | 1292 | * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, |
1091 | * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, | 1293 | * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, |
1092 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, | 1294 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL, |
1093 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, | 1295 | * CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, CM_CAM_FDIF_CLKCTRL, |
1094 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, | 1296 | * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, CM_CM1_PROFILING_CLKCTRL, |
1095 | * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, | 1297 | * CM_CM2_PROFILING_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, |
1096 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, | 1298 | * CM_D2D_SAD2D_FW_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, |
1097 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, | ||
1098 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, | 1299 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, |
1099 | * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, | 1300 | * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, |
1100 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, | 1301 | * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
1101 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 1302 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL, |
1102 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 1303 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, |
1103 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, | 1304 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL, |
1104 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, | 1305 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, |
1105 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL, | 1306 | * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, |
1106 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL, | 1307 | * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, |
1107 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, | ||
1108 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, | ||
1109 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, | ||
1110 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, | 1308 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, |
1111 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, | 1309 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, |
1112 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, | 1310 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, |
1113 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, | 1311 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, |
1114 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, | 1312 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, |
1115 | * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, | 1313 | * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, |
1116 | * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, | 1314 | * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, |
1117 | * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, | 1315 | * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, |
1118 | * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, | 1316 | * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, |
1119 | * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, | 1317 | * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL, |
1120 | * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, | 1318 | * CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, |
1121 | * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, | 1319 | * CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL, |
1122 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, | 1320 | * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, |
1123 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, | ||
1124 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, | ||
1125 | * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, | 1321 | * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, |
1126 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, | 1322 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, |
1127 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, | 1323 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, |
1128 | * CM_MEMIF_EMIF_H2_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, | ||
1129 | * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, | 1324 | * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, |
1130 | * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, | 1325 | * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL, |
1131 | * CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, | 1326 | * CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL, |
1132 | * CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL | 1327 | * CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL |
1133 | */ | 1328 | */ |
1134 | #define OMAP4430_MODULEMODE_SHIFT 0 | 1329 | #define OMAP4430_MODULEMODE_SHIFT 0 |
1330 | #define OMAP4430_MODULEMODE_WIDTH 0x2 | ||
1135 | #define OMAP4430_MODULEMODE_MASK (0x3 << 0) | 1331 | #define OMAP4430_MODULEMODE_MASK (0x3 << 0) |
1136 | 1332 | ||
1137 | /* Used by CM_L4CFG_DYNAMICDEP */ | 1333 | /* Used by CM_L4CFG_DYNAMICDEP */ |
1138 | #define OMAP4460_MPU_DYNDEP_SHIFT 19 | 1334 | #define OMAP4460_MPU_DYNDEP_SHIFT 19 |
1335 | #define OMAP4460_MPU_DYNDEP_WIDTH 0x1 | ||
1139 | #define OMAP4460_MPU_DYNDEP_MASK (1 << 19) | 1336 | #define OMAP4460_MPU_DYNDEP_MASK (1 << 19) |
1140 | 1337 | ||
1141 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1338 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1142 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9 | 1339 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9 |
1340 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_WIDTH 0x1 | ||
1143 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9) | 1341 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9) |
1144 | 1342 | ||
1145 | /* Used by CM_WKUP_BANDGAP_CLKCTRL */ | 1343 | /* Used by CM_WKUP_BANDGAP_CLKCTRL */ |
1146 | #define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8 | 1344 | #define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8 |
1345 | #define OMAP4430_OPTFCLKEN_BGAP_32K_WIDTH 0x1 | ||
1147 | #define OMAP4430_OPTFCLKEN_BGAP_32K_MASK (1 << 8) | 1346 | #define OMAP4430_OPTFCLKEN_BGAP_32K_MASK (1 << 8) |
1148 | 1347 | ||
1149 | /* Used by CM_ALWON_USBPHY_CLKCTRL */ | 1348 | /* Used by CM_ALWON_USBPHY_CLKCTRL */ |
1150 | #define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 8 | 1349 | #define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 8 |
1350 | #define OMAP4430_OPTFCLKEN_CLK32K_WIDTH 0x1 | ||
1151 | #define OMAP4430_OPTFCLKEN_CLK32K_MASK (1 << 8) | 1351 | #define OMAP4430_OPTFCLKEN_CLK32K_MASK (1 << 8) |
1152 | 1352 | ||
1153 | /* Used by CM_CAM_ISS_CLKCTRL */ | 1353 | /* Used by CM_CAM_ISS_CLKCTRL */ |
1154 | #define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8 | 1354 | #define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8 |
1355 | #define OMAP4430_OPTFCLKEN_CTRLCLK_WIDTH 0x1 | ||
1155 | #define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8) | 1356 | #define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8) |
1156 | 1357 | ||
1157 | /* | 1358 | /* |
@@ -1160,126 +1361,157 @@ | |||
1160 | * CM_WKUP_GPIO1_CLKCTRL | 1361 | * CM_WKUP_GPIO1_CLKCTRL |
1161 | */ | 1362 | */ |
1162 | #define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 | 1363 | #define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 |
1364 | #define OMAP4430_OPTFCLKEN_DBCLK_WIDTH 0x1 | ||
1163 | #define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8) | 1365 | #define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8) |
1164 | 1366 | ||
1165 | /* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */ | 1367 | /* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */ |
1166 | #define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT 8 | 1368 | #define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT 8 |
1369 | #define OMAP4430_OPTFCLKEN_DLL_CLK_WIDTH 0x1 | ||
1167 | #define OMAP4430_OPTFCLKEN_DLL_CLK_MASK (1 << 8) | 1370 | #define OMAP4430_OPTFCLKEN_DLL_CLK_MASK (1 << 8) |
1168 | 1371 | ||
1169 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1372 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1170 | #define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8 | 1373 | #define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8 |
1374 | #define OMAP4430_OPTFCLKEN_DSSCLK_WIDTH 0x1 | ||
1171 | #define OMAP4430_OPTFCLKEN_DSSCLK_MASK (1 << 8) | 1375 | #define OMAP4430_OPTFCLKEN_DSSCLK_MASK (1 << 8) |
1172 | 1376 | ||
1173 | /* Used by CM_WKUP_USIM_CLKCTRL */ | 1377 | /* Used by CM_WKUP_USIM_CLKCTRL */ |
1174 | #define OMAP4430_OPTFCLKEN_FCLK_SHIFT 8 | 1378 | #define OMAP4430_OPTFCLKEN_FCLK_SHIFT 8 |
1379 | #define OMAP4430_OPTFCLKEN_FCLK_WIDTH 0x1 | ||
1175 | #define OMAP4430_OPTFCLKEN_FCLK_MASK (1 << 8) | 1380 | #define OMAP4430_OPTFCLKEN_FCLK_MASK (1 << 8) |
1176 | 1381 | ||
1177 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1382 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1178 | #define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8 | 1383 | #define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8 |
1384 | #define OMAP4430_OPTFCLKEN_FCLK0_WIDTH 0x1 | ||
1179 | #define OMAP4430_OPTFCLKEN_FCLK0_MASK (1 << 8) | 1385 | #define OMAP4430_OPTFCLKEN_FCLK0_MASK (1 << 8) |
1180 | 1386 | ||
1181 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1387 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1182 | #define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9 | 1388 | #define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9 |
1389 | #define OMAP4430_OPTFCLKEN_FCLK1_WIDTH 0x1 | ||
1183 | #define OMAP4430_OPTFCLKEN_FCLK1_MASK (1 << 9) | 1390 | #define OMAP4430_OPTFCLKEN_FCLK1_MASK (1 << 9) |
1184 | 1391 | ||
1185 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1392 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1186 | #define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 | 1393 | #define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 |
1394 | #define OMAP4430_OPTFCLKEN_FCLK2_WIDTH 0x1 | ||
1187 | #define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10) | 1395 | #define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10) |
1188 | 1396 | ||
1189 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1397 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1190 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 | 1398 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 |
1399 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_WIDTH 0x1 | ||
1191 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15) | 1400 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15) |
1192 | 1401 | ||
1193 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1402 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1194 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 | 1403 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 |
1404 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_WIDTH 0x1 | ||
1195 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13) | 1405 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13) |
1196 | 1406 | ||
1197 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1407 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1198 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 | 1408 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 |
1409 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_WIDTH 0x1 | ||
1199 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14) | 1410 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14) |
1200 | 1411 | ||
1201 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1412 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1202 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 | 1413 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 |
1414 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_WIDTH 0x1 | ||
1203 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11) | 1415 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11) |
1204 | 1416 | ||
1205 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1417 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1206 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 | 1418 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 |
1419 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_WIDTH 0x1 | ||
1207 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12) | 1420 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12) |
1208 | 1421 | ||
1209 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ | 1422 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ |
1210 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8 | 1423 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8 |
1424 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_WIDTH 0x1 | ||
1211 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK (1 << 8) | 1425 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK (1 << 8) |
1212 | 1426 | ||
1213 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ | 1427 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ |
1214 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9 | 1428 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9 |
1429 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_WIDTH 0x1 | ||
1215 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK (1 << 9) | 1430 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK (1 << 9) |
1216 | 1431 | ||
1217 | /* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */ | 1432 | /* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */ |
1218 | #define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8 | 1433 | #define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8 |
1434 | #define OMAP4430_OPTFCLKEN_PHY_48M_WIDTH 0x1 | ||
1219 | #define OMAP4430_OPTFCLKEN_PHY_48M_MASK (1 << 8) | 1435 | #define OMAP4430_OPTFCLKEN_PHY_48M_MASK (1 << 8) |
1220 | 1436 | ||
1221 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ | 1437 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ |
1222 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10 | 1438 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10 |
1439 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_WIDTH 0x1 | ||
1223 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 10) | 1440 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 10) |
1224 | 1441 | ||
1225 | /* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1442 | /* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1226 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11 | 1443 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11 |
1444 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_WIDTH 0x1 | ||
1227 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK (1 << 11) | 1445 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK (1 << 11) |
1228 | 1446 | ||
1229 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1447 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1230 | #define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10 | 1448 | #define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10 |
1449 | #define OMAP4430_OPTFCLKEN_SYS_CLK_WIDTH 0x1 | ||
1231 | #define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10) | 1450 | #define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10) |
1232 | 1451 | ||
1233 | /* Used by CM_WKUP_BANDGAP_CLKCTRL */ | 1452 | /* Used by CM_WKUP_BANDGAP_CLKCTRL */ |
1234 | #define OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT 8 | 1453 | #define OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT 8 |
1454 | #define OMAP4460_OPTFCLKEN_TS_FCLK_WIDTH 0x1 | ||
1235 | #define OMAP4460_OPTFCLKEN_TS_FCLK_MASK (1 << 8) | 1455 | #define OMAP4460_OPTFCLKEN_TS_FCLK_MASK (1 << 8) |
1236 | 1456 | ||
1237 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1457 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1238 | #define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11 | 1458 | #define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11 |
1459 | #define OMAP4430_OPTFCLKEN_TV_CLK_WIDTH 0x1 | ||
1239 | #define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11) | 1460 | #define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11) |
1240 | 1461 | ||
1241 | /* Used by CM_L3INIT_UNIPRO1_CLKCTRL */ | 1462 | /* Used by CM_L3INIT_UNIPRO1_CLKCTRL */ |
1242 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 | 1463 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 |
1464 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_WIDTH 0x1 | ||
1243 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8) | 1465 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8) |
1244 | 1466 | ||
1245 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ | 1467 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ |
1246 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 | 1468 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 |
1469 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_WIDTH 0x1 | ||
1247 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8) | 1470 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8) |
1248 | 1471 | ||
1249 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ | 1472 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ |
1250 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 | 1473 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 |
1474 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_WIDTH 0x1 | ||
1251 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9) | 1475 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9) |
1252 | 1476 | ||
1253 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ | 1477 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ |
1254 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 | 1478 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 |
1479 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_WIDTH 0x1 | ||
1255 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10) | 1480 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10) |
1256 | 1481 | ||
1257 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1482 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1258 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 | 1483 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 |
1484 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_WIDTH 0x1 | ||
1259 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8) | 1485 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8) |
1260 | 1486 | ||
1261 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1487 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1262 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 | 1488 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 |
1489 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_WIDTH 0x1 | ||
1263 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9) | 1490 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9) |
1264 | 1491 | ||
1265 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ | 1492 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1266 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 | 1493 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 |
1494 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_WIDTH 0x1 | ||
1267 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10) | 1495 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10) |
1268 | 1496 | ||
1269 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ | 1497 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ |
1270 | #define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8 | 1498 | #define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8 |
1499 | #define OMAP4430_OPTFCLKEN_XCLK_WIDTH 0x1 | ||
1271 | #define OMAP4430_OPTFCLKEN_XCLK_MASK (1 << 8) | 1500 | #define OMAP4430_OPTFCLKEN_XCLK_MASK (1 << 8) |
1272 | 1501 | ||
1273 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ | 1502 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ |
1274 | #define OMAP4430_OVERRIDE_ENABLE_SHIFT 19 | 1503 | #define OMAP4430_OVERRIDE_ENABLE_SHIFT 19 |
1504 | #define OMAP4430_OVERRIDE_ENABLE_WIDTH 0x1 | ||
1275 | #define OMAP4430_OVERRIDE_ENABLE_MASK (1 << 19) | 1505 | #define OMAP4430_OVERRIDE_ENABLE_MASK (1 << 19) |
1276 | 1506 | ||
1277 | /* Used by CM_CLKSEL_ABE */ | 1507 | /* Used by CM_CLKSEL_ABE */ |
1278 | #define OMAP4430_PAD_CLKS_GATE_SHIFT 8 | 1508 | #define OMAP4430_PAD_CLKS_GATE_SHIFT 8 |
1509 | #define OMAP4430_PAD_CLKS_GATE_WIDTH 0x1 | ||
1279 | #define OMAP4430_PAD_CLKS_GATE_MASK (1 << 8) | 1510 | #define OMAP4430_PAD_CLKS_GATE_MASK (1 << 8) |
1280 | 1511 | ||
1281 | /* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */ | 1512 | /* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */ |
1282 | #define OMAP4430_PERF_CURRENT_SHIFT 0 | 1513 | #define OMAP4430_PERF_CURRENT_SHIFT 0 |
1514 | #define OMAP4430_PERF_CURRENT_WIDTH 0x8 | ||
1283 | #define OMAP4430_PERF_CURRENT_MASK (0xff << 0) | 1515 | #define OMAP4430_PERF_CURRENT_MASK (0xff << 0) |
1284 | 1516 | ||
1285 | /* | 1517 | /* |
@@ -1288,74 +1520,85 @@ | |||
1288 | * CM_IVA_DVFS_PERF_TESLA | 1520 | * CM_IVA_DVFS_PERF_TESLA |
1289 | */ | 1521 | */ |
1290 | #define OMAP4430_PERF_REQ_SHIFT 0 | 1522 | #define OMAP4430_PERF_REQ_SHIFT 0 |
1523 | #define OMAP4430_PERF_REQ_WIDTH 0x8 | ||
1291 | #define OMAP4430_PERF_REQ_MASK (0xff << 0) | 1524 | #define OMAP4430_PERF_REQ_MASK (0xff << 0) |
1292 | 1525 | ||
1293 | /* Used by CM_RESTORE_ST */ | 1526 | /* Used by CM_RESTORE_ST */ |
1294 | #define OMAP4430_PHASE1_COMPLETED_SHIFT 0 | 1527 | #define OMAP4430_PHASE1_COMPLETED_SHIFT 0 |
1528 | #define OMAP4430_PHASE1_COMPLETED_WIDTH 0x1 | ||
1295 | #define OMAP4430_PHASE1_COMPLETED_MASK (1 << 0) | 1529 | #define OMAP4430_PHASE1_COMPLETED_MASK (1 << 0) |
1296 | 1530 | ||
1297 | /* Used by CM_RESTORE_ST */ | 1531 | /* Used by CM_RESTORE_ST */ |
1298 | #define OMAP4430_PHASE2A_COMPLETED_SHIFT 1 | 1532 | #define OMAP4430_PHASE2A_COMPLETED_SHIFT 1 |
1533 | #define OMAP4430_PHASE2A_COMPLETED_WIDTH 0x1 | ||
1299 | #define OMAP4430_PHASE2A_COMPLETED_MASK (1 << 1) | 1534 | #define OMAP4430_PHASE2A_COMPLETED_MASK (1 << 1) |
1300 | 1535 | ||
1301 | /* Used by CM_RESTORE_ST */ | 1536 | /* Used by CM_RESTORE_ST */ |
1302 | #define OMAP4430_PHASE2B_COMPLETED_SHIFT 2 | 1537 | #define OMAP4430_PHASE2B_COMPLETED_SHIFT 2 |
1538 | #define OMAP4430_PHASE2B_COMPLETED_WIDTH 0x1 | ||
1303 | #define OMAP4430_PHASE2B_COMPLETED_MASK (1 << 2) | 1539 | #define OMAP4430_PHASE2B_COMPLETED_MASK (1 << 2) |
1304 | 1540 | ||
1305 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 1541 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
1306 | #define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20 | 1542 | #define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20 |
1543 | #define OMAP4430_PMD_STM_MUX_CTRL_WIDTH 0x2 | ||
1307 | #define OMAP4430_PMD_STM_MUX_CTRL_MASK (0x3 << 20) | 1544 | #define OMAP4430_PMD_STM_MUX_CTRL_MASK (0x3 << 20) |
1308 | 1545 | ||
1309 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 1546 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
1310 | #define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 | 1547 | #define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 |
1548 | #define OMAP4430_PMD_TRACE_MUX_CTRL_WIDTH 0x2 | ||
1311 | #define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22) | 1549 | #define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22) |
1312 | 1550 | ||
1313 | /* Used by CM_DYN_DEP_PRESCAL */ | 1551 | /* Used by CM_DYN_DEP_PRESCAL */ |
1314 | #define OMAP4430_PRESCAL_SHIFT 0 | 1552 | #define OMAP4430_PRESCAL_SHIFT 0 |
1553 | #define OMAP4430_PRESCAL_WIDTH 0x6 | ||
1315 | #define OMAP4430_PRESCAL_MASK (0x3f << 0) | 1554 | #define OMAP4430_PRESCAL_MASK (0x3f << 0) |
1316 | 1555 | ||
1317 | /* Used by REVISION_CM1, REVISION_CM2 */ | 1556 | /* Used by REVISION_CM1, REVISION_CM2 */ |
1318 | #define OMAP4430_R_RTL_SHIFT 11 | 1557 | #define OMAP4430_R_RTL_SHIFT 11 |
1558 | #define OMAP4430_R_RTL_WIDTH 0x5 | ||
1319 | #define OMAP4430_R_RTL_MASK (0x1f << 11) | 1559 | #define OMAP4430_R_RTL_MASK (0x1f << 11) |
1320 | 1560 | ||
1321 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */ | 1561 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */ |
1322 | #define OMAP4430_SAR_MODE_SHIFT 4 | 1562 | #define OMAP4430_SAR_MODE_SHIFT 4 |
1563 | #define OMAP4430_SAR_MODE_WIDTH 0x1 | ||
1323 | #define OMAP4430_SAR_MODE_MASK (1 << 4) | 1564 | #define OMAP4430_SAR_MODE_MASK (1 << 4) |
1324 | 1565 | ||
1325 | /* Used by CM_SCALE_FCLK */ | 1566 | /* Used by CM_SCALE_FCLK */ |
1326 | #define OMAP4430_SCALE_FCLK_SHIFT 0 | 1567 | #define OMAP4430_SCALE_FCLK_SHIFT 0 |
1568 | #define OMAP4430_SCALE_FCLK_WIDTH 0x1 | ||
1327 | #define OMAP4430_SCALE_FCLK_MASK (1 << 0) | 1569 | #define OMAP4430_SCALE_FCLK_MASK (1 << 0) |
1328 | 1570 | ||
1329 | /* Used by REVISION_CM1, REVISION_CM2 */ | 1571 | /* Used by REVISION_CM1, REVISION_CM2 */ |
1330 | #define OMAP4430_SCHEME_SHIFT 30 | 1572 | #define OMAP4430_SCHEME_SHIFT 30 |
1573 | #define OMAP4430_SCHEME_WIDTH 0x2 | ||
1331 | #define OMAP4430_SCHEME_MASK (0x3 << 30) | 1574 | #define OMAP4430_SCHEME_MASK (0x3 << 30) |
1332 | 1575 | ||
1333 | /* Used by CM_L4CFG_DYNAMICDEP */ | 1576 | /* Used by CM_L4CFG_DYNAMICDEP */ |
1334 | #define OMAP4430_SDMA_DYNDEP_SHIFT 11 | 1577 | #define OMAP4430_SDMA_DYNDEP_SHIFT 11 |
1578 | #define OMAP4430_SDMA_DYNDEP_WIDTH 0x1 | ||
1335 | #define OMAP4430_SDMA_DYNDEP_MASK (1 << 11) | 1579 | #define OMAP4430_SDMA_DYNDEP_MASK (1 << 11) |
1336 | 1580 | ||
1337 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ | 1581 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ |
1338 | #define OMAP4430_SDMA_STATDEP_SHIFT 11 | 1582 | #define OMAP4430_SDMA_STATDEP_SHIFT 11 |
1583 | #define OMAP4430_SDMA_STATDEP_WIDTH 0x1 | ||
1339 | #define OMAP4430_SDMA_STATDEP_MASK (1 << 11) | 1584 | #define OMAP4430_SDMA_STATDEP_MASK (1 << 11) |
1340 | 1585 | ||
1341 | /* Used by CM_CLKSEL_ABE */ | 1586 | /* Used by CM_CLKSEL_ABE */ |
1342 | #define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10 | 1587 | #define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10 |
1588 | #define OMAP4430_SLIMBUS_CLK_GATE_WIDTH 0x1 | ||
1343 | #define OMAP4430_SLIMBUS_CLK_GATE_MASK (1 << 10) | 1589 | #define OMAP4430_SLIMBUS_CLK_GATE_MASK (1 << 10) |
1344 | 1590 | ||
1345 | /* | 1591 | /* |
1346 | * Used by CM1_ABE_AESS_CLKCTRL, CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, | 1592 | * Used by CM1_ABE_AESS_CLKCTRL, CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, |
1347 | * CM_D2D_SAD2D_CLKCTRL, CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, | 1593 | * CM_D2D_SAD2D_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, |
1348 | * CM_DUCATI_DUCATI_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, | 1594 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, |
1349 | * CM_IVAHD_IVAHD_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, | ||
1350 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, | 1595 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, |
1351 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | ||
1352 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | ||
1353 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL, | 1596 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL, |
1354 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, | 1597 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, |
1355 | * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, | 1598 | * CM_SDMA_SDMA_CLKCTRL, CM_TESLA_TESLA_CLKCTRL |
1356 | * CM_TESLA_TESLA_CLKCTRL | ||
1357 | */ | 1599 | */ |
1358 | #define OMAP4430_STBYST_SHIFT 18 | 1600 | #define OMAP4430_STBYST_SHIFT 18 |
1601 | #define OMAP4430_STBYST_WIDTH 0x1 | ||
1359 | #define OMAP4430_STBYST_MASK (1 << 18) | 1602 | #define OMAP4430_STBYST_MASK (1 << 18) |
1360 | 1603 | ||
1361 | /* | 1604 | /* |
@@ -1364,10 +1607,12 @@ | |||
1364 | * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB | 1607 | * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB |
1365 | */ | 1608 | */ |
1366 | #define OMAP4430_ST_DPLL_CLK_SHIFT 0 | 1609 | #define OMAP4430_ST_DPLL_CLK_SHIFT 0 |
1610 | #define OMAP4430_ST_DPLL_CLK_WIDTH 0x1 | ||
1367 | #define OMAP4430_ST_DPLL_CLK_MASK (1 << 0) | 1611 | #define OMAP4430_ST_DPLL_CLK_MASK (1 << 0) |
1368 | 1612 | ||
1369 | /* Used by CM_CLKDCOLDO_DPLL_USB */ | 1613 | /* Used by CM_CLKDCOLDO_DPLL_USB */ |
1370 | #define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT 9 | 1614 | #define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT 9 |
1615 | #define OMAP4430_ST_DPLL_CLKDCOLDO_WIDTH 0x1 | ||
1371 | #define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9) | 1616 | #define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9) |
1372 | 1617 | ||
1373 | /* | 1618 | /* |
@@ -1375,14 +1620,17 @@ | |||
1375 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB | 1620 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB |
1376 | */ | 1621 | */ |
1377 | #define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 | 1622 | #define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 |
1623 | #define OMAP4430_ST_DPLL_CLKOUT_WIDTH 0x1 | ||
1378 | #define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9) | 1624 | #define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9) |
1379 | 1625 | ||
1380 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ | 1626 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
1381 | #define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 | 1627 | #define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 |
1628 | #define OMAP4430_ST_DPLL_CLKOUTHIF_WIDTH 0x1 | ||
1382 | #define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9) | 1629 | #define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9) |
1383 | 1630 | ||
1384 | /* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ | 1631 | /* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ |
1385 | #define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT 11 | 1632 | #define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT 11 |
1633 | #define OMAP4430_ST_DPLL_CLKOUTX2_WIDTH 0x1 | ||
1386 | #define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11) | 1634 | #define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11) |
1387 | 1635 | ||
1388 | /* | 1636 | /* |
@@ -1390,6 +1638,7 @@ | |||
1390 | * CM_DIV_M4_DPLL_PER | 1638 | * CM_DIV_M4_DPLL_PER |
1391 | */ | 1639 | */ |
1392 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 | 1640 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 |
1641 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_WIDTH 0x1 | ||
1393 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) | 1642 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) |
1394 | 1643 | ||
1395 | /* | 1644 | /* |
@@ -1397,14 +1646,17 @@ | |||
1397 | * CM_DIV_M5_DPLL_PER | 1646 | * CM_DIV_M5_DPLL_PER |
1398 | */ | 1647 | */ |
1399 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 | 1648 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 |
1649 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_WIDTH 0x1 | ||
1400 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) | 1650 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) |
1401 | 1651 | ||
1402 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ | 1652 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
1403 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 | 1653 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 |
1654 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_WIDTH 0x1 | ||
1404 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) | 1655 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) |
1405 | 1656 | ||
1406 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ | 1657 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
1407 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 | 1658 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 |
1659 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_WIDTH 0x1 | ||
1408 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9) | 1660 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9) |
1409 | 1661 | ||
1410 | /* | 1662 | /* |
@@ -1413,18 +1665,22 @@ | |||
1413 | * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB | 1665 | * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB |
1414 | */ | 1666 | */ |
1415 | #define OMAP4430_ST_MN_BYPASS_SHIFT 8 | 1667 | #define OMAP4430_ST_MN_BYPASS_SHIFT 8 |
1668 | #define OMAP4430_ST_MN_BYPASS_WIDTH 0x1 | ||
1416 | #define OMAP4430_ST_MN_BYPASS_MASK (1 << 8) | 1669 | #define OMAP4430_ST_MN_BYPASS_MASK (1 << 8) |
1417 | 1670 | ||
1418 | /* Used by CM_SYS_CLKSEL */ | 1671 | /* Used by CM_SYS_CLKSEL */ |
1419 | #define OMAP4430_SYS_CLKSEL_SHIFT 0 | 1672 | #define OMAP4430_SYS_CLKSEL_SHIFT 0 |
1673 | #define OMAP4430_SYS_CLKSEL_WIDTH 0x3 | ||
1420 | #define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0) | 1674 | #define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0) |
1421 | 1675 | ||
1422 | /* Used by CM_L4CFG_DYNAMICDEP */ | 1676 | /* Used by CM_L4CFG_DYNAMICDEP */ |
1423 | #define OMAP4430_TESLA_DYNDEP_SHIFT 1 | 1677 | #define OMAP4430_TESLA_DYNDEP_SHIFT 1 |
1678 | #define OMAP4430_TESLA_DYNDEP_WIDTH 0x1 | ||
1424 | #define OMAP4430_TESLA_DYNDEP_MASK (1 << 1) | 1679 | #define OMAP4430_TESLA_DYNDEP_MASK (1 << 1) |
1425 | 1680 | ||
1426 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ | 1681 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ |
1427 | #define OMAP4430_TESLA_STATDEP_SHIFT 1 | 1682 | #define OMAP4430_TESLA_STATDEP_SHIFT 1 |
1683 | #define OMAP4430_TESLA_STATDEP_WIDTH 0x1 | ||
1428 | #define OMAP4430_TESLA_STATDEP_MASK (1 << 1) | 1684 | #define OMAP4430_TESLA_STATDEP_MASK (1 << 1) |
1429 | 1685 | ||
1430 | /* | 1686 | /* |
@@ -1433,13 +1689,16 @@ | |||
1433 | * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | 1689 | * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP |
1434 | */ | 1690 | */ |
1435 | #define OMAP4430_WINDOWSIZE_SHIFT 24 | 1691 | #define OMAP4430_WINDOWSIZE_SHIFT 24 |
1692 | #define OMAP4430_WINDOWSIZE_WIDTH 0x4 | ||
1436 | #define OMAP4430_WINDOWSIZE_MASK (0xf << 24) | 1693 | #define OMAP4430_WINDOWSIZE_MASK (0xf << 24) |
1437 | 1694 | ||
1438 | /* Used by REVISION_CM1, REVISION_CM2 */ | 1695 | /* Used by REVISION_CM1, REVISION_CM2 */ |
1439 | #define OMAP4430_X_MAJOR_SHIFT 8 | 1696 | #define OMAP4430_X_MAJOR_SHIFT 8 |
1697 | #define OMAP4430_X_MAJOR_WIDTH 0x3 | ||
1440 | #define OMAP4430_X_MAJOR_MASK (0x7 << 8) | 1698 | #define OMAP4430_X_MAJOR_MASK (0x7 << 8) |
1441 | 1699 | ||
1442 | /* Used by REVISION_CM1, REVISION_CM2 */ | 1700 | /* Used by REVISION_CM1, REVISION_CM2 */ |
1443 | #define OMAP4430_Y_MINOR_SHIFT 0 | 1701 | #define OMAP4430_Y_MINOR_SHIFT 0 |
1702 | #define OMAP4430_Y_MINOR_WIDTH 0x6 | ||
1444 | #define OMAP4430_Y_MINOR_MASK (0x3f << 0) | 1703 | #define OMAP4430_Y_MINOR_MASK (0x3f << 0) |
1445 | #endif | 1704 | #endif |
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c index a911e76b4ecf..7f07ab02a5b3 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #define OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP 0x3 | 35 | #define OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP 0x3 |
36 | 36 | ||
37 | static const u8 cm_idlest_offs[] = { | 37 | static const u8 cm_idlest_offs[] = { |
38 | CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3 | 38 | CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3, OMAP24XX_CM_IDLEST4 |
39 | }; | 39 | }; |
40 | 40 | ||
41 | u32 omap2_cm_read_mod_reg(s16 module, u16 idx) | 41 | u32 omap2_cm_read_mod_reg(s16 module, u16 idx) |
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h index 088bbad73db5..57b2f3c2fbf3 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.h +++ b/arch/arm/mach-omap2/cm2xxx_3xxx.h | |||
@@ -71,6 +71,7 @@ | |||
71 | #define OMAP24XX_CM_FCLKEN2 0x0004 | 71 | #define OMAP24XX_CM_FCLKEN2 0x0004 |
72 | #define OMAP24XX_CM_ICLKEN4 0x001c | 72 | #define OMAP24XX_CM_ICLKEN4 0x001c |
73 | #define OMAP24XX_CM_AUTOIDLE4 0x003c | 73 | #define OMAP24XX_CM_AUTOIDLE4 0x003c |
74 | #define OMAP24XX_CM_IDLEST4 0x002c | ||
74 | 75 | ||
75 | #define OMAP2430_CM_IDLEST3 0x0028 | 76 | #define OMAP2430_CM_IDLEST3 0x0028 |
76 | 77 | ||
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index 123186ac7d2e..a89e8256fd0e 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h | |||
@@ -354,6 +354,7 @@ | |||
354 | 354 | ||
355 | /* AM33XX CONTROL_STATUS bitfields (partial) */ | 355 | /* AM33XX CONTROL_STATUS bitfields (partial) */ |
356 | #define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT 22 | 356 | #define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT 22 |
357 | #define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2 | ||
357 | #define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) | 358 | #define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) |
358 | 359 | ||
359 | /* CONTROL OMAP STATUS register to identify OMAP3 features */ | 360 | /* CONTROL OMAP STATUS register to identify OMAP3 features */ |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index d092d2a89ee0..c8c211731d26 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -433,35 +433,24 @@ static void omap_init_mcspi(void) | |||
433 | static inline void omap_init_mcspi(void) {} | 433 | static inline void omap_init_mcspi(void) {} |
434 | #endif | 434 | #endif |
435 | 435 | ||
436 | static struct resource omap2_pmu_resource = { | 436 | /** |
437 | .start = 3 + OMAP_INTC_START, | 437 | * omap_init_rng - bind the RNG hwmod to the RNG omap_device |
438 | .flags = IORESOURCE_IRQ, | 438 | * |
439 | }; | 439 | * Bind the RNG hwmod to the RNG omap_device. No return value. |
440 | 440 | */ | |
441 | static struct resource omap3_pmu_resource = { | 441 | static void omap_init_rng(void) |
442 | .start = 3 + OMAP_INTC_START, | ||
443 | .flags = IORESOURCE_IRQ, | ||
444 | }; | ||
445 | |||
446 | static struct platform_device omap_pmu_device = { | ||
447 | .name = "arm-pmu", | ||
448 | .id = -1, | ||
449 | .num_resources = 1, | ||
450 | }; | ||
451 | |||
452 | static void omap_init_pmu(void) | ||
453 | { | 442 | { |
454 | if (cpu_is_omap24xx()) | 443 | struct omap_hwmod *oh; |
455 | omap_pmu_device.resource = &omap2_pmu_resource; | 444 | struct platform_device *pdev; |
456 | else if (cpu_is_omap34xx()) | 445 | |
457 | omap_pmu_device.resource = &omap3_pmu_resource; | 446 | oh = omap_hwmod_lookup("rng"); |
458 | else | 447 | if (!oh) |
459 | return; | 448 | return; |
460 | 449 | ||
461 | platform_device_register(&omap_pmu_device); | 450 | pdev = omap_device_build("omap_rng", -1, oh, NULL, 0, NULL, 0, 0); |
451 | WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n"); | ||
462 | } | 452 | } |
463 | 453 | ||
464 | |||
465 | #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) | 454 | #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) |
466 | 455 | ||
467 | #ifdef CONFIG_ARCH_OMAP2 | 456 | #ifdef CONFIG_ARCH_OMAP2 |
@@ -646,8 +635,8 @@ static int __init omap2_init_devices(void) | |||
646 | omap_init_mcpdm(); | 635 | omap_init_mcpdm(); |
647 | omap_init_mcspi(); | 636 | omap_init_mcspi(); |
648 | } | 637 | } |
649 | omap_init_pmu(); | ||
650 | omap_init_sti(); | 638 | omap_init_sti(); |
639 | omap_init_rng(); | ||
651 | omap_init_sham(); | 640 | omap_init_sham(); |
652 | omap_init_aes(); | 641 | omap_init_aes(); |
653 | omap_init_vout(); | 642 | omap_init_vout(); |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index e470c6e50acd..7012068ccbf6 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -488,7 +488,7 @@ int omap_dss_reset(struct omap_hwmod *oh) | |||
488 | 488 | ||
489 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | 489 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) |
490 | if (oc->_clk) | 490 | if (oc->_clk) |
491 | clk_enable(oc->_clk); | 491 | clk_prepare_enable(oc->_clk); |
492 | 492 | ||
493 | dispc_disable_outputs(); | 493 | dispc_disable_outputs(); |
494 | 494 | ||
@@ -515,7 +515,7 @@ int omap_dss_reset(struct omap_hwmod *oh) | |||
515 | 515 | ||
516 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | 516 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) |
517 | if (oc->_clk) | 517 | if (oc->_clk) |
518 | clk_disable(oc->_clk); | 518 | clk_disable_unprepare(oc->_clk); |
519 | 519 | ||
520 | r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0; | 520 | r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0; |
521 | 521 | ||
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index 27d79deb4ba2..814e1808e158 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c | |||
@@ -63,8 +63,10 @@ static int _omap3_wait_dpll_status(struct clk *clk, u8 state) | |||
63 | const struct dpll_data *dd; | 63 | const struct dpll_data *dd; |
64 | int i = 0; | 64 | int i = 0; |
65 | int ret = -EINVAL; | 65 | int ret = -EINVAL; |
66 | const char *clk_name; | ||
66 | 67 | ||
67 | dd = clk->dpll_data; | 68 | dd = clk->dpll_data; |
69 | clk_name = __clk_get_name(clk); | ||
68 | 70 | ||
69 | state <<= __ffs(dd->idlest_mask); | 71 | state <<= __ffs(dd->idlest_mask); |
70 | 72 | ||
@@ -76,10 +78,10 @@ static int _omap3_wait_dpll_status(struct clk *clk, u8 state) | |||
76 | 78 | ||
77 | if (i == MAX_DPLL_WAIT_TRIES) { | 79 | if (i == MAX_DPLL_WAIT_TRIES) { |
78 | printk(KERN_ERR "clock: %s failed transition to '%s'\n", | 80 | printk(KERN_ERR "clock: %s failed transition to '%s'\n", |
79 | clk->name, (state) ? "locked" : "bypassed"); | 81 | clk_name, (state) ? "locked" : "bypassed"); |
80 | } else { | 82 | } else { |
81 | pr_debug("clock: %s transition to '%s' in %d loops\n", | 83 | pr_debug("clock: %s transition to '%s' in %d loops\n", |
82 | clk->name, (state) ? "locked" : "bypassed", i); | 84 | clk_name, (state) ? "locked" : "bypassed", i); |
83 | 85 | ||
84 | ret = 0; | 86 | ret = 0; |
85 | } | 87 | } |
@@ -93,7 +95,7 @@ static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n) | |||
93 | unsigned long fint; | 95 | unsigned long fint; |
94 | u16 f = 0; | 96 | u16 f = 0; |
95 | 97 | ||
96 | fint = clk->dpll_data->clk_ref->rate / n; | 98 | fint = __clk_get_rate(clk->dpll_data->clk_ref) / n; |
97 | 99 | ||
98 | pr_debug("clock: fint is %lu\n", fint); | 100 | pr_debug("clock: fint is %lu\n", fint); |
99 | 101 | ||
@@ -140,7 +142,7 @@ static int _omap3_noncore_dpll_lock(struct clk *clk) | |||
140 | u8 state = 1; | 142 | u8 state = 1; |
141 | int r = 0; | 143 | int r = 0; |
142 | 144 | ||
143 | pr_debug("clock: locking DPLL %s\n", clk->name); | 145 | pr_debug("clock: locking DPLL %s\n", __clk_get_name(clk)); |
144 | 146 | ||
145 | dd = clk->dpll_data; | 147 | dd = clk->dpll_data; |
146 | state <<= __ffs(dd->idlest_mask); | 148 | state <<= __ffs(dd->idlest_mask); |
@@ -187,7 +189,7 @@ static int _omap3_noncore_dpll_bypass(struct clk *clk) | |||
187 | return -EINVAL; | 189 | return -EINVAL; |
188 | 190 | ||
189 | pr_debug("clock: configuring DPLL %s for low-power bypass\n", | 191 | pr_debug("clock: configuring DPLL %s for low-power bypass\n", |
190 | clk->name); | 192 | __clk_get_name(clk)); |
191 | 193 | ||
192 | ai = omap3_dpll_autoidle_read(clk); | 194 | ai = omap3_dpll_autoidle_read(clk); |
193 | 195 | ||
@@ -217,7 +219,7 @@ static int _omap3_noncore_dpll_stop(struct clk *clk) | |||
217 | if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP))) | 219 | if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP))) |
218 | return -EINVAL; | 220 | return -EINVAL; |
219 | 221 | ||
220 | pr_debug("clock: stopping DPLL %s\n", clk->name); | 222 | pr_debug("clock: stopping DPLL %s\n", __clk_get_name(clk)); |
221 | 223 | ||
222 | ai = omap3_dpll_autoidle_read(clk); | 224 | ai = omap3_dpll_autoidle_read(clk); |
223 | 225 | ||
@@ -245,7 +247,7 @@ static void _lookup_dco(struct clk *clk, u8 *dco, u16 m, u8 n) | |||
245 | { | 247 | { |
246 | unsigned long fint, clkinp; /* watch out for overflow */ | 248 | unsigned long fint, clkinp; /* watch out for overflow */ |
247 | 249 | ||
248 | clkinp = clk->parent->rate; | 250 | clkinp = __clk_get_rate(__clk_get_parent(clk)); |
249 | fint = (clkinp / n) * m; | 251 | fint = (clkinp / n) * m; |
250 | 252 | ||
251 | if (fint < 1000000000) | 253 | if (fint < 1000000000) |
@@ -271,7 +273,7 @@ static void _lookup_sddiv(struct clk *clk, u8 *sd_div, u16 m, u8 n) | |||
271 | unsigned long clkinp, sd; /* watch out for overflow */ | 273 | unsigned long clkinp, sd; /* watch out for overflow */ |
272 | int mod1, mod2; | 274 | int mod1, mod2; |
273 | 275 | ||
274 | clkinp = clk->parent->rate; | 276 | clkinp = __clk_get_rate(__clk_get_parent(clk)); |
275 | 277 | ||
276 | /* | 278 | /* |
277 | * target sigma-delta to near 250MHz | 279 | * target sigma-delta to near 250MHz |
@@ -380,16 +382,19 @@ int omap3_noncore_dpll_enable(struct clk *clk) | |||
380 | { | 382 | { |
381 | int r; | 383 | int r; |
382 | struct dpll_data *dd; | 384 | struct dpll_data *dd; |
385 | struct clk *parent; | ||
383 | 386 | ||
384 | dd = clk->dpll_data; | 387 | dd = clk->dpll_data; |
385 | if (!dd) | 388 | if (!dd) |
386 | return -EINVAL; | 389 | return -EINVAL; |
387 | 390 | ||
388 | if (clk->rate == dd->clk_bypass->rate) { | 391 | parent = __clk_get_parent(clk); |
389 | WARN_ON(clk->parent != dd->clk_bypass); | 392 | |
393 | if (__clk_get_rate(clk) == __clk_get_rate(dd->clk_bypass)) { | ||
394 | WARN_ON(parent != dd->clk_bypass); | ||
390 | r = _omap3_noncore_dpll_bypass(clk); | 395 | r = _omap3_noncore_dpll_bypass(clk); |
391 | } else { | 396 | } else { |
392 | WARN_ON(clk->parent != dd->clk_ref); | 397 | WARN_ON(parent != dd->clk_ref); |
393 | r = _omap3_noncore_dpll_lock(clk); | 398 | r = _omap3_noncore_dpll_lock(clk); |
394 | } | 399 | } |
395 | /* | 400 | /* |
@@ -432,7 +437,7 @@ void omap3_noncore_dpll_disable(struct clk *clk) | |||
432 | int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) | 437 | int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) |
433 | { | 438 | { |
434 | struct clk *new_parent = NULL; | 439 | struct clk *new_parent = NULL; |
435 | unsigned long hw_rate; | 440 | unsigned long hw_rate, bypass_rate; |
436 | u16 freqsel = 0; | 441 | u16 freqsel = 0; |
437 | struct dpll_data *dd; | 442 | struct dpll_data *dd; |
438 | int ret; | 443 | int ret; |
@@ -456,7 +461,8 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) | |||
456 | omap2_clk_enable(dd->clk_bypass); | 461 | omap2_clk_enable(dd->clk_bypass); |
457 | omap2_clk_enable(dd->clk_ref); | 462 | omap2_clk_enable(dd->clk_ref); |
458 | 463 | ||
459 | if (dd->clk_bypass->rate == rate && | 464 | bypass_rate = __clk_get_rate(dd->clk_bypass); |
465 | if (bypass_rate == rate && | ||
460 | (clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) { | 466 | (clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) { |
461 | pr_debug("clock: %s: set rate: entering bypass.\n", clk->name); | 467 | pr_debug("clock: %s: set rate: entering bypass.\n", clk->name); |
462 | 468 | ||
@@ -479,7 +485,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) | |||
479 | } | 485 | } |
480 | 486 | ||
481 | pr_debug("clock: %s: set rate: locking rate to %lu.\n", | 487 | pr_debug("clock: %s: set rate: locking rate to %lu.\n", |
482 | clk->name, rate); | 488 | __clk_get_name(clk), rate); |
483 | 489 | ||
484 | ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m, | 490 | ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m, |
485 | dd->last_rounded_n, freqsel); | 491 | dd->last_rounded_n, freqsel); |
@@ -557,7 +563,7 @@ void omap3_dpll_allow_idle(struct clk *clk) | |||
557 | 563 | ||
558 | if (!dd->autoidle_reg) { | 564 | if (!dd->autoidle_reg) { |
559 | pr_debug("clock: DPLL %s: autoidle not supported\n", | 565 | pr_debug("clock: DPLL %s: autoidle not supported\n", |
560 | clk->name); | 566 | __clk_get_name(clk)); |
561 | return; | 567 | return; |
562 | } | 568 | } |
563 | 569 | ||
@@ -591,7 +597,7 @@ void omap3_dpll_deny_idle(struct clk *clk) | |||
591 | 597 | ||
592 | if (!dd->autoidle_reg) { | 598 | if (!dd->autoidle_reg) { |
593 | pr_debug("clock: DPLL %s: autoidle not supported\n", | 599 | pr_debug("clock: DPLL %s: autoidle not supported\n", |
594 | clk->name); | 600 | __clk_get_name(clk)); |
595 | return; | 601 | return; |
596 | } | 602 | } |
597 | 603 | ||
@@ -617,11 +623,12 @@ unsigned long omap3_clkoutx2_recalc(struct clk *clk) | |||
617 | unsigned long rate; | 623 | unsigned long rate; |
618 | u32 v; | 624 | u32 v; |
619 | struct clk *pclk; | 625 | struct clk *pclk; |
626 | unsigned long parent_rate; | ||
620 | 627 | ||
621 | /* Walk up the parents of clk, looking for a DPLL */ | 628 | /* Walk up the parents of clk, looking for a DPLL */ |
622 | pclk = clk->parent; | 629 | pclk = __clk_get_parent(clk); |
623 | while (pclk && !pclk->dpll_data) | 630 | while (pclk && !pclk->dpll_data) |
624 | pclk = pclk->parent; | 631 | pclk = __clk_get_parent(pclk); |
625 | 632 | ||
626 | /* clk does not have a DPLL as a parent? error in the clock data */ | 633 | /* clk does not have a DPLL as a parent? error in the clock data */ |
627 | if (!pclk) { | 634 | if (!pclk) { |
@@ -633,12 +640,13 @@ unsigned long omap3_clkoutx2_recalc(struct clk *clk) | |||
633 | 640 | ||
634 | WARN_ON(!dd->enable_mask); | 641 | WARN_ON(!dd->enable_mask); |
635 | 642 | ||
643 | parent_rate = __clk_get_rate(__clk_get_parent(clk)); | ||
636 | v = __raw_readl(dd->control_reg) & dd->enable_mask; | 644 | v = __raw_readl(dd->control_reg) & dd->enable_mask; |
637 | v >>= __ffs(dd->enable_mask); | 645 | v >>= __ffs(dd->enable_mask); |
638 | if ((v != OMAP3XXX_EN_DPLL_LOCKED) || (dd->flags & DPLL_J_TYPE)) | 646 | if ((v != OMAP3XXX_EN_DPLL_LOCKED) || (dd->flags & DPLL_J_TYPE)) |
639 | rate = clk->parent->rate; | 647 | rate = parent_rate; |
640 | else | 648 | else |
641 | rate = clk->parent->rate * 2; | 649 | rate = parent_rate * 2; |
642 | return rate; | 650 | return rate; |
643 | } | 651 | } |
644 | 652 | ||
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 72428bd45efc..8ab1e1bde5e9 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/platform_device.h> | ||
27 | 28 | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <plat/gpmc.h> | 30 | #include <plat/gpmc.h> |
@@ -31,10 +32,13 @@ | |||
31 | #include <plat/cpu.h> | 32 | #include <plat/cpu.h> |
32 | #include <plat/gpmc.h> | 33 | #include <plat/gpmc.h> |
33 | #include <plat/sdrc.h> | 34 | #include <plat/sdrc.h> |
35 | #include <plat/omap_device.h> | ||
34 | 36 | ||
35 | #include "soc.h" | 37 | #include "soc.h" |
36 | #include "common.h" | 38 | #include "common.h" |
37 | 39 | ||
40 | #define DEVICE_NAME "omap-gpmc" | ||
41 | |||
38 | /* GPMC register offsets */ | 42 | /* GPMC register offsets */ |
39 | #define GPMC_REVISION 0x00 | 43 | #define GPMC_REVISION 0x00 |
40 | #define GPMC_SYSCONFIG 0x10 | 44 | #define GPMC_SYSCONFIG 0x10 |
@@ -83,6 +87,12 @@ | |||
83 | #define ENABLE_PREFETCH (0x1 << 7) | 87 | #define ENABLE_PREFETCH (0x1 << 7) |
84 | #define DMA_MPU_MODE 2 | 88 | #define DMA_MPU_MODE 2 |
85 | 89 | ||
90 | #define GPMC_REVISION_MAJOR(l) ((l >> 4) & 0xf) | ||
91 | #define GPMC_REVISION_MINOR(l) (l & 0xf) | ||
92 | |||
93 | #define GPMC_HAS_WR_ACCESS 0x1 | ||
94 | #define GPMC_HAS_WR_DATA_MUX_BUS 0x2 | ||
95 | |||
86 | /* XXX: Only NAND irq has been considered,currently these are the only ones used | 96 | /* XXX: Only NAND irq has been considered,currently these are the only ones used |
87 | */ | 97 | */ |
88 | #define GPMC_NR_IRQ 2 | 98 | #define GPMC_NR_IRQ 2 |
@@ -128,7 +138,10 @@ static struct resource gpmc_cs_mem[GPMC_CS_NUM]; | |||
128 | static DEFINE_SPINLOCK(gpmc_mem_lock); | 138 | static DEFINE_SPINLOCK(gpmc_mem_lock); |
129 | static unsigned int gpmc_cs_map; /* flag for cs which are initialized */ | 139 | static unsigned int gpmc_cs_map; /* flag for cs which are initialized */ |
130 | static int gpmc_ecc_used = -EINVAL; /* cs using ecc engine */ | 140 | static int gpmc_ecc_used = -EINVAL; /* cs using ecc engine */ |
131 | 141 | static struct device *gpmc_dev; | |
142 | static int gpmc_irq; | ||
143 | static resource_size_t phys_base, mem_size; | ||
144 | static unsigned gpmc_capability; | ||
132 | static void __iomem *gpmc_base; | 145 | static void __iomem *gpmc_base; |
133 | 146 | ||
134 | static struct clk *gpmc_l3_clk; | 147 | static struct clk *gpmc_l3_clk; |
@@ -318,10 +331,10 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t) | |||
318 | 331 | ||
319 | GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access); | 332 | GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access); |
320 | 333 | ||
321 | if (cpu_is_omap34xx()) { | 334 | if (gpmc_capability & GPMC_HAS_WR_DATA_MUX_BUS) |
322 | GPMC_SET_ONE(GPMC_CS_CONFIG6, 16, 19, wr_data_mux_bus); | 335 | GPMC_SET_ONE(GPMC_CS_CONFIG6, 16, 19, wr_data_mux_bus); |
336 | if (gpmc_capability & GPMC_HAS_WR_ACCESS) | ||
323 | GPMC_SET_ONE(GPMC_CS_CONFIG6, 24, 28, wr_access); | 337 | GPMC_SET_ONE(GPMC_CS_CONFIG6, 24, 28, wr_access); |
324 | } | ||
325 | 338 | ||
326 | /* caller is expected to have initialized CONFIG1 to cover | 339 | /* caller is expected to have initialized CONFIG1 to cover |
327 | * at least sync vs async | 340 | * at least sync vs async |
@@ -431,6 +444,20 @@ static int gpmc_cs_insert_mem(int cs, unsigned long base, unsigned long size) | |||
431 | return r; | 444 | return r; |
432 | } | 445 | } |
433 | 446 | ||
447 | static int gpmc_cs_delete_mem(int cs) | ||
448 | { | ||
449 | struct resource *res = &gpmc_cs_mem[cs]; | ||
450 | int r; | ||
451 | |||
452 | spin_lock(&gpmc_mem_lock); | ||
453 | r = release_resource(&gpmc_cs_mem[cs]); | ||
454 | res->start = 0; | ||
455 | res->end = 0; | ||
456 | spin_unlock(&gpmc_mem_lock); | ||
457 | |||
458 | return r; | ||
459 | } | ||
460 | |||
434 | int gpmc_cs_request(int cs, unsigned long size, unsigned long *base) | 461 | int gpmc_cs_request(int cs, unsigned long size, unsigned long *base) |
435 | { | 462 | { |
436 | struct resource *res = &gpmc_cs_mem[cs]; | 463 | struct resource *res = &gpmc_cs_mem[cs]; |
@@ -767,7 +794,7 @@ static void gpmc_irq_noop(struct irq_data *data) { } | |||
767 | 794 | ||
768 | static unsigned int gpmc_irq_noop_ret(struct irq_data *data) { return 0; } | 795 | static unsigned int gpmc_irq_noop_ret(struct irq_data *data) { return 0; } |
769 | 796 | ||
770 | static int gpmc_setup_irq(int gpmc_irq) | 797 | static int gpmc_setup_irq(void) |
771 | { | 798 | { |
772 | int i; | 799 | int i; |
773 | u32 regval; | 800 | u32 regval; |
@@ -811,7 +838,37 @@ static int gpmc_setup_irq(int gpmc_irq) | |||
811 | return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL); | 838 | return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL); |
812 | } | 839 | } |
813 | 840 | ||
814 | static void __init gpmc_mem_init(void) | 841 | static __exit int gpmc_free_irq(void) |
842 | { | ||
843 | int i; | ||
844 | |||
845 | if (gpmc_irq) | ||
846 | free_irq(gpmc_irq, NULL); | ||
847 | |||
848 | for (i = 0; i < GPMC_NR_IRQ; i++) { | ||
849 | irq_set_handler(gpmc_client_irq[i].irq, NULL); | ||
850 | irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip); | ||
851 | irq_modify_status(gpmc_client_irq[i].irq, 0, 0); | ||
852 | } | ||
853 | |||
854 | irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ); | ||
855 | |||
856 | return 0; | ||
857 | } | ||
858 | |||
859 | static void __devexit gpmc_mem_exit(void) | ||
860 | { | ||
861 | int cs; | ||
862 | |||
863 | for (cs = 0; cs < GPMC_CS_NUM; cs++) { | ||
864 | if (!gpmc_cs_mem_enabled(cs)) | ||
865 | continue; | ||
866 | gpmc_cs_delete_mem(cs); | ||
867 | } | ||
868 | |||
869 | } | ||
870 | |||
871 | static void __devinit gpmc_mem_init(void) | ||
815 | { | 872 | { |
816 | int cs; | 873 | int cs; |
817 | unsigned long boot_rom_space = 0; | 874 | unsigned long boot_rom_space = 0; |
@@ -838,65 +895,104 @@ static void __init gpmc_mem_init(void) | |||
838 | } | 895 | } |
839 | } | 896 | } |
840 | 897 | ||
841 | static int __init gpmc_init(void) | 898 | static __devinit int gpmc_probe(struct platform_device *pdev) |
842 | { | 899 | { |
843 | u32 l; | 900 | u32 l; |
844 | int ret = -EINVAL; | 901 | struct resource *res; |
845 | int gpmc_irq; | 902 | |
846 | char *ck = NULL; | 903 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
847 | 904 | if (res == NULL) | |
848 | if (cpu_is_omap24xx()) { | 905 | return -ENOENT; |
849 | ck = "core_l3_ck"; | 906 | |
850 | if (cpu_is_omap2420()) | 907 | phys_base = res->start; |
851 | l = OMAP2420_GPMC_BASE; | 908 | mem_size = resource_size(res); |
852 | else | 909 | |
853 | l = OMAP34XX_GPMC_BASE; | 910 | gpmc_base = devm_request_and_ioremap(&pdev->dev, res); |
854 | gpmc_irq = 20 + OMAP_INTC_START; | 911 | if (!gpmc_base) { |
855 | } else if (cpu_is_omap34xx()) { | 912 | dev_err(&pdev->dev, "error: request memory / ioremap\n"); |
856 | ck = "gpmc_fck"; | 913 | return -EADDRNOTAVAIL; |
857 | l = OMAP34XX_GPMC_BASE; | ||
858 | gpmc_irq = 20 + OMAP_INTC_START; | ||
859 | } else if (cpu_is_omap44xx() || soc_is_omap54xx()) { | ||
860 | /* Base address and irq number are same for OMAP4/5 */ | ||
861 | ck = "gpmc_ck"; | ||
862 | l = OMAP44XX_GPMC_BASE; | ||
863 | gpmc_irq = 20 + OMAP44XX_IRQ_GIC_START; | ||
864 | } | 914 | } |
865 | 915 | ||
866 | if (WARN_ON(!ck)) | 916 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
867 | return ret; | 917 | if (res == NULL) |
918 | dev_warn(&pdev->dev, "Failed to get resource: irq\n"); | ||
919 | else | ||
920 | gpmc_irq = res->start; | ||
868 | 921 | ||
869 | gpmc_l3_clk = clk_get(NULL, ck); | 922 | gpmc_l3_clk = clk_get(&pdev->dev, "fck"); |
870 | if (IS_ERR(gpmc_l3_clk)) { | 923 | if (IS_ERR(gpmc_l3_clk)) { |
871 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); | 924 | dev_err(&pdev->dev, "error: clk_get\n"); |
872 | BUG(); | 925 | gpmc_irq = 0; |
926 | return PTR_ERR(gpmc_l3_clk); | ||
873 | } | 927 | } |
874 | 928 | ||
875 | gpmc_base = ioremap(l, SZ_4K); | 929 | clk_prepare_enable(gpmc_l3_clk); |
876 | if (!gpmc_base) { | ||
877 | clk_put(gpmc_l3_clk); | ||
878 | printk(KERN_ERR "Could not get GPMC register memory\n"); | ||
879 | BUG(); | ||
880 | } | ||
881 | 930 | ||
882 | clk_enable(gpmc_l3_clk); | 931 | gpmc_dev = &pdev->dev; |
883 | 932 | ||
884 | l = gpmc_read_reg(GPMC_REVISION); | 933 | l = gpmc_read_reg(GPMC_REVISION); |
885 | printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); | 934 | if (GPMC_REVISION_MAJOR(l) > 0x4) |
886 | /* Set smart idle mode and automatic L3 clock gating */ | 935 | gpmc_capability = GPMC_HAS_WR_ACCESS | GPMC_HAS_WR_DATA_MUX_BUS; |
887 | l = gpmc_read_reg(GPMC_SYSCONFIG); | 936 | dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), |
888 | l &= 0x03 << 3; | 937 | GPMC_REVISION_MINOR(l)); |
889 | l |= (0x02 << 3) | (1 << 0); | 938 | |
890 | gpmc_write_reg(GPMC_SYSCONFIG, l); | ||
891 | gpmc_mem_init(); | 939 | gpmc_mem_init(); |
892 | 940 | ||
893 | ret = gpmc_setup_irq(gpmc_irq); | 941 | if (IS_ERR_VALUE(gpmc_setup_irq())) |
894 | if (ret) | 942 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); |
895 | pr_err("gpmc: irq-%d could not claim: err %d\n", | 943 | |
896 | gpmc_irq, ret); | 944 | return 0; |
897 | return ret; | ||
898 | } | 945 | } |
946 | |||
947 | static __exit int gpmc_remove(struct platform_device *pdev) | ||
948 | { | ||
949 | gpmc_free_irq(); | ||
950 | gpmc_mem_exit(); | ||
951 | gpmc_dev = NULL; | ||
952 | return 0; | ||
953 | } | ||
954 | |||
955 | static struct platform_driver gpmc_driver = { | ||
956 | .probe = gpmc_probe, | ||
957 | .remove = __devexit_p(gpmc_remove), | ||
958 | .driver = { | ||
959 | .name = DEVICE_NAME, | ||
960 | .owner = THIS_MODULE, | ||
961 | }, | ||
962 | }; | ||
963 | |||
964 | static __init int gpmc_init(void) | ||
965 | { | ||
966 | return platform_driver_register(&gpmc_driver); | ||
967 | } | ||
968 | |||
969 | static __exit void gpmc_exit(void) | ||
970 | { | ||
971 | platform_driver_unregister(&gpmc_driver); | ||
972 | |||
973 | } | ||
974 | |||
899 | postcore_initcall(gpmc_init); | 975 | postcore_initcall(gpmc_init); |
976 | module_exit(gpmc_exit); | ||
977 | |||
978 | static int __init omap_gpmc_init(void) | ||
979 | { | ||
980 | struct omap_hwmod *oh; | ||
981 | struct platform_device *pdev; | ||
982 | char *oh_name = "gpmc"; | ||
983 | |||
984 | oh = omap_hwmod_lookup(oh_name); | ||
985 | if (!oh) { | ||
986 | pr_err("Could not look up %s\n", oh_name); | ||
987 | return -ENODEV; | ||
988 | } | ||
989 | |||
990 | pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0, NULL, 0, 0); | ||
991 | WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); | ||
992 | |||
993 | return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; | ||
994 | } | ||
995 | postcore_initcall(omap_gpmc_init); | ||
900 | 996 | ||
901 | static irqreturn_t gpmc_handle_irq(int irq, void *dev) | 997 | static irqreturn_t gpmc_handle_irq(int irq, void *dev) |
902 | { | 998 | { |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 00c006686b0d..299ca2821ad1 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -679,16 +679,25 @@ static int _init_main_clk(struct omap_hwmod *oh) | |||
679 | if (!oh->main_clk) | 679 | if (!oh->main_clk) |
680 | return 0; | 680 | return 0; |
681 | 681 | ||
682 | oh->_clk = omap_clk_get_by_name(oh->main_clk); | 682 | oh->_clk = clk_get(NULL, oh->main_clk); |
683 | if (!oh->_clk) { | 683 | if (IS_ERR(oh->_clk)) { |
684 | pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", | 684 | pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", |
685 | oh->name, oh->main_clk); | 685 | oh->name, oh->main_clk); |
686 | return -EINVAL; | 686 | return -EINVAL; |
687 | } | 687 | } |
688 | /* | ||
689 | * HACK: This needs a re-visit once clk_prepare() is implemented | ||
690 | * to do something meaningful. Today its just a no-op. | ||
691 | * If clk_prepare() is used at some point to do things like | ||
692 | * voltage scaling etc, then this would have to be moved to | ||
693 | * some point where subsystems like i2c and pmic become | ||
694 | * available. | ||
695 | */ | ||
696 | clk_prepare(oh->_clk); | ||
688 | 697 | ||
689 | if (!oh->_clk->clkdm) | 698 | if (!oh->_clk->clkdm) |
690 | pr_warning("omap_hwmod: %s: missing clockdomain for %s.\n", | 699 | pr_debug("omap_hwmod: %s: missing clockdomain for %s.\n", |
691 | oh->main_clk, oh->_clk->name); | 700 | oh->name, oh->main_clk); |
692 | 701 | ||
693 | return ret; | 702 | return ret; |
694 | } | 703 | } |
@@ -715,13 +724,22 @@ static int _init_interface_clks(struct omap_hwmod *oh) | |||
715 | if (!os->clk) | 724 | if (!os->clk) |
716 | continue; | 725 | continue; |
717 | 726 | ||
718 | c = omap_clk_get_by_name(os->clk); | 727 | c = clk_get(NULL, os->clk); |
719 | if (!c) { | 728 | if (IS_ERR(c)) { |
720 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", | 729 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", |
721 | oh->name, os->clk); | 730 | oh->name, os->clk); |
722 | ret = -EINVAL; | 731 | ret = -EINVAL; |
723 | } | 732 | } |
724 | os->_clk = c; | 733 | os->_clk = c; |
734 | /* | ||
735 | * HACK: This needs a re-visit once clk_prepare() is implemented | ||
736 | * to do something meaningful. Today its just a no-op. | ||
737 | * If clk_prepare() is used at some point to do things like | ||
738 | * voltage scaling etc, then this would have to be moved to | ||
739 | * some point where subsystems like i2c and pmic become | ||
740 | * available. | ||
741 | */ | ||
742 | clk_prepare(os->_clk); | ||
725 | } | 743 | } |
726 | 744 | ||
727 | return ret; | 745 | return ret; |
@@ -742,13 +760,22 @@ static int _init_opt_clks(struct omap_hwmod *oh) | |||
742 | int ret = 0; | 760 | int ret = 0; |
743 | 761 | ||
744 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { | 762 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { |
745 | c = omap_clk_get_by_name(oc->clk); | 763 | c = clk_get(NULL, oc->clk); |
746 | if (!c) { | 764 | if (IS_ERR(c)) { |
747 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", | 765 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", |
748 | oh->name, oc->clk); | 766 | oh->name, oc->clk); |
749 | ret = -EINVAL; | 767 | ret = -EINVAL; |
750 | } | 768 | } |
751 | oc->_clk = c; | 769 | oc->_clk = c; |
770 | /* | ||
771 | * HACK: This needs a re-visit once clk_prepare() is implemented | ||
772 | * to do something meaningful. Today its just a no-op. | ||
773 | * If clk_prepare() is used at some point to do things like | ||
774 | * voltage scaling etc, then this would have to be moved to | ||
775 | * some point where subsystems like i2c and pmic become | ||
776 | * available. | ||
777 | */ | ||
778 | clk_prepare(oc->_clk); | ||
752 | } | 779 | } |
753 | 780 | ||
754 | return ret; | 781 | return ret; |
@@ -827,7 +854,7 @@ static void _enable_optional_clocks(struct omap_hwmod *oh) | |||
827 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | 854 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) |
828 | if (oc->_clk) { | 855 | if (oc->_clk) { |
829 | pr_debug("omap_hwmod: enable %s:%s\n", oc->role, | 856 | pr_debug("omap_hwmod: enable %s:%s\n", oc->role, |
830 | oc->_clk->name); | 857 | __clk_get_name(oc->_clk)); |
831 | clk_enable(oc->_clk); | 858 | clk_enable(oc->_clk); |
832 | } | 859 | } |
833 | } | 860 | } |
@@ -842,7 +869,7 @@ static void _disable_optional_clocks(struct omap_hwmod *oh) | |||
842 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | 869 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) |
843 | if (oc->_clk) { | 870 | if (oc->_clk) { |
844 | pr_debug("omap_hwmod: disable %s:%s\n", oc->role, | 871 | pr_debug("omap_hwmod: disable %s:%s\n", oc->role, |
845 | oc->_clk->name); | 872 | __clk_get_name(oc->_clk)); |
846 | clk_disable(oc->_clk); | 873 | clk_disable(oc->_clk); |
847 | } | 874 | } |
848 | } | 875 | } |
@@ -900,10 +927,10 @@ static void _am33xx_enable_module(struct omap_hwmod *oh) | |||
900 | */ | 927 | */ |
901 | static int _omap4_wait_target_disable(struct omap_hwmod *oh) | 928 | static int _omap4_wait_target_disable(struct omap_hwmod *oh) |
902 | { | 929 | { |
903 | if (!oh || !oh->clkdm) | 930 | if (!oh) |
904 | return -EINVAL; | 931 | return -EINVAL; |
905 | 932 | ||
906 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) | 933 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT || !oh->clkdm) |
907 | return 0; | 934 | return 0; |
908 | 935 | ||
909 | if (oh->flags & HWMOD_NO_IDLEST) | 936 | if (oh->flags & HWMOD_NO_IDLEST) |
@@ -1427,8 +1454,10 @@ static struct omap_hwmod *_lookup(const char *name) | |||
1427 | */ | 1454 | */ |
1428 | static int _init_clkdm(struct omap_hwmod *oh) | 1455 | static int _init_clkdm(struct omap_hwmod *oh) |
1429 | { | 1456 | { |
1430 | if (!oh->clkdm_name) | 1457 | if (!oh->clkdm_name) { |
1458 | pr_debug("omap_hwmod: %s: missing clockdomain\n", oh->name); | ||
1431 | return 0; | 1459 | return 0; |
1460 | } | ||
1432 | 1461 | ||
1433 | oh->clkdm = clkdm_lookup(oh->clkdm_name); | 1462 | oh->clkdm = clkdm_lookup(oh->clkdm_name); |
1434 | if (!oh->clkdm) { | 1463 | if (!oh->clkdm) { |
@@ -1556,6 +1585,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1556 | { | 1585 | { |
1557 | struct omap_hwmod_rst_info ohri; | 1586 | struct omap_hwmod_rst_info ohri; |
1558 | int ret = -EINVAL; | 1587 | int ret = -EINVAL; |
1588 | int hwsup = 0; | ||
1559 | 1589 | ||
1560 | if (!oh) | 1590 | if (!oh) |
1561 | return -EINVAL; | 1591 | return -EINVAL; |
@@ -1567,10 +1597,46 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1567 | if (IS_ERR_VALUE(ret)) | 1597 | if (IS_ERR_VALUE(ret)) |
1568 | return ret; | 1598 | return ret; |
1569 | 1599 | ||
1600 | if (oh->clkdm) { | ||
1601 | /* | ||
1602 | * A clockdomain must be in SW_SUP otherwise reset | ||
1603 | * might not be completed. The clockdomain can be set | ||
1604 | * in HW_AUTO only when the module become ready. | ||
1605 | */ | ||
1606 | hwsup = clkdm_in_hwsup(oh->clkdm); | ||
1607 | ret = clkdm_hwmod_enable(oh->clkdm, oh); | ||
1608 | if (ret) { | ||
1609 | WARN(1, "omap_hwmod: %s: could not enable clockdomain %s: %d\n", | ||
1610 | oh->name, oh->clkdm->name, ret); | ||
1611 | return ret; | ||
1612 | } | ||
1613 | } | ||
1614 | |||
1615 | _enable_clocks(oh); | ||
1616 | if (soc_ops.enable_module) | ||
1617 | soc_ops.enable_module(oh); | ||
1618 | |||
1570 | ret = soc_ops.deassert_hardreset(oh, &ohri); | 1619 | ret = soc_ops.deassert_hardreset(oh, &ohri); |
1620 | |||
1621 | if (soc_ops.disable_module) | ||
1622 | soc_ops.disable_module(oh); | ||
1623 | _disable_clocks(oh); | ||
1624 | |||
1571 | if (ret == -EBUSY) | 1625 | if (ret == -EBUSY) |
1572 | pr_warning("omap_hwmod: %s: failed to hardreset\n", oh->name); | 1626 | pr_warning("omap_hwmod: %s: failed to hardreset\n", oh->name); |
1573 | 1627 | ||
1628 | if (!ret) { | ||
1629 | /* | ||
1630 | * Set the clockdomain to HW_AUTO, assuming that the | ||
1631 | * previous state was HW_AUTO. | ||
1632 | */ | ||
1633 | if (oh->clkdm && hwsup) | ||
1634 | clkdm_allow_idle(oh->clkdm); | ||
1635 | } else { | ||
1636 | if (oh->clkdm) | ||
1637 | clkdm_hwmod_disable(oh->clkdm, oh); | ||
1638 | } | ||
1639 | |||
1574 | return ret; | 1640 | return ret; |
1575 | } | 1641 | } |
1576 | 1642 | ||
@@ -1605,25 +1671,28 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name) | |||
1605 | } | 1671 | } |
1606 | 1672 | ||
1607 | /** | 1673 | /** |
1608 | * _are_any_hardreset_lines_asserted - return true if part of @oh is hard-reset | 1674 | * _are_all_hardreset_lines_asserted - return true if the @oh is hard-reset |
1609 | * @oh: struct omap_hwmod * | 1675 | * @oh: struct omap_hwmod * |
1610 | * | 1676 | * |
1611 | * If any hardreset line associated with @oh is asserted, then return true. | 1677 | * If all hardreset lines associated with @oh are asserted, then return true. |
1612 | * Otherwise, if @oh has no hardreset lines associated with it, or if | 1678 | * Otherwise, if part of @oh is out hardreset or if no hardreset lines |
1613 | * no hardreset lines associated with @oh are asserted, then return false. | 1679 | * associated with @oh are asserted, then return false. |
1614 | * This function is used to avoid executing some parts of the IP block | 1680 | * This function is used to avoid executing some parts of the IP block |
1615 | * enable/disable sequence if a hardreset line is set. | 1681 | * enable/disable sequence if its hardreset line is set. |
1616 | */ | 1682 | */ |
1617 | static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh) | 1683 | static bool _are_all_hardreset_lines_asserted(struct omap_hwmod *oh) |
1618 | { | 1684 | { |
1619 | int i; | 1685 | int i, rst_cnt = 0; |
1620 | 1686 | ||
1621 | if (oh->rst_lines_cnt == 0) | 1687 | if (oh->rst_lines_cnt == 0) |
1622 | return false; | 1688 | return false; |
1623 | 1689 | ||
1624 | for (i = 0; i < oh->rst_lines_cnt; i++) | 1690 | for (i = 0; i < oh->rst_lines_cnt; i++) |
1625 | if (_read_hardreset(oh, oh->rst_lines[i].name) > 0) | 1691 | if (_read_hardreset(oh, oh->rst_lines[i].name) > 0) |
1626 | return true; | 1692 | rst_cnt++; |
1693 | |||
1694 | if (oh->rst_lines_cnt == rst_cnt) | ||
1695 | return true; | ||
1627 | 1696 | ||
1628 | return false; | 1697 | return false; |
1629 | } | 1698 | } |
@@ -1642,6 +1711,13 @@ static int _omap4_disable_module(struct omap_hwmod *oh) | |||
1642 | if (!oh->clkdm || !oh->prcm.omap4.modulemode) | 1711 | if (!oh->clkdm || !oh->prcm.omap4.modulemode) |
1643 | return -EINVAL; | 1712 | return -EINVAL; |
1644 | 1713 | ||
1714 | /* | ||
1715 | * Since integration code might still be doing something, only | ||
1716 | * disable if all lines are under hardreset. | ||
1717 | */ | ||
1718 | if (!_are_all_hardreset_lines_asserted(oh)) | ||
1719 | return 0; | ||
1720 | |||
1645 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); | 1721 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); |
1646 | 1722 | ||
1647 | omap4_cminst_module_disable(oh->clkdm->prcm_partition, | 1723 | omap4_cminst_module_disable(oh->clkdm->prcm_partition, |
@@ -1649,9 +1725,6 @@ static int _omap4_disable_module(struct omap_hwmod *oh) | |||
1649 | oh->clkdm->clkdm_offs, | 1725 | oh->clkdm->clkdm_offs, |
1650 | oh->prcm.omap4.clkctrl_offs); | 1726 | oh->prcm.omap4.clkctrl_offs); |
1651 | 1727 | ||
1652 | if (_are_any_hardreset_lines_asserted(oh)) | ||
1653 | return 0; | ||
1654 | |||
1655 | v = _omap4_wait_target_disable(oh); | 1728 | v = _omap4_wait_target_disable(oh); |
1656 | if (v) | 1729 | if (v) |
1657 | pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", | 1730 | pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", |
@@ -1679,7 +1752,7 @@ static int _am33xx_disable_module(struct omap_hwmod *oh) | |||
1679 | am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs, | 1752 | am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs, |
1680 | oh->prcm.omap4.clkctrl_offs); | 1753 | oh->prcm.omap4.clkctrl_offs); |
1681 | 1754 | ||
1682 | if (_are_any_hardreset_lines_asserted(oh)) | 1755 | if (_are_all_hardreset_lines_asserted(oh)) |
1683 | return 0; | 1756 | return 0; |
1684 | 1757 | ||
1685 | v = _am33xx_wait_target_disable(oh); | 1758 | v = _am33xx_wait_target_disable(oh); |
@@ -1907,7 +1980,7 @@ static int _enable(struct omap_hwmod *oh) | |||
1907 | } | 1980 | } |
1908 | 1981 | ||
1909 | /* | 1982 | /* |
1910 | * If an IP block contains HW reset lines and any of them are | 1983 | * If an IP block contains HW reset lines and all of them are |
1911 | * asserted, we let integration code associated with that | 1984 | * asserted, we let integration code associated with that |
1912 | * block handle the enable. We've received very little | 1985 | * block handle the enable. We've received very little |
1913 | * information on what those driver authors need, and until | 1986 | * information on what those driver authors need, and until |
@@ -1915,7 +1988,7 @@ static int _enable(struct omap_hwmod *oh) | |||
1915 | * posted to the public lists, this is probably the best we | 1988 | * posted to the public lists, this is probably the best we |
1916 | * can do. | 1989 | * can do. |
1917 | */ | 1990 | */ |
1918 | if (_are_any_hardreset_lines_asserted(oh)) | 1991 | if (_are_all_hardreset_lines_asserted(oh)) |
1919 | return 0; | 1992 | return 0; |
1920 | 1993 | ||
1921 | /* Mux pins for device runtime if populated */ | 1994 | /* Mux pins for device runtime if populated */ |
@@ -1934,7 +2007,8 @@ static int _enable(struct omap_hwmod *oh) | |||
1934 | * completely the module. The clockdomain can be set | 2007 | * completely the module. The clockdomain can be set |
1935 | * in HW_AUTO only when the module become ready. | 2008 | * in HW_AUTO only when the module become ready. |
1936 | */ | 2009 | */ |
1937 | hwsup = clkdm_in_hwsup(oh->clkdm); | 2010 | hwsup = clkdm_in_hwsup(oh->clkdm) && |
2011 | !clkdm_missing_idle_reporting(oh->clkdm); | ||
1938 | r = clkdm_hwmod_enable(oh->clkdm, oh); | 2012 | r = clkdm_hwmod_enable(oh->clkdm, oh); |
1939 | if (r) { | 2013 | if (r) { |
1940 | WARN(1, "omap_hwmod: %s: could not enable clockdomain %s: %d\n", | 2014 | WARN(1, "omap_hwmod: %s: could not enable clockdomain %s: %d\n", |
@@ -1996,7 +2070,7 @@ static int _idle(struct omap_hwmod *oh) | |||
1996 | return -EINVAL; | 2070 | return -EINVAL; |
1997 | } | 2071 | } |
1998 | 2072 | ||
1999 | if (_are_any_hardreset_lines_asserted(oh)) | 2073 | if (_are_all_hardreset_lines_asserted(oh)) |
2000 | return 0; | 2074 | return 0; |
2001 | 2075 | ||
2002 | if (oh->class->sysc) | 2076 | if (oh->class->sysc) |
@@ -2084,7 +2158,7 @@ static int _shutdown(struct omap_hwmod *oh) | |||
2084 | return -EINVAL; | 2158 | return -EINVAL; |
2085 | } | 2159 | } |
2086 | 2160 | ||
2087 | if (_are_any_hardreset_lines_asserted(oh)) | 2161 | if (_are_all_hardreset_lines_asserted(oh)) |
2088 | return 0; | 2162 | return 0; |
2089 | 2163 | ||
2090 | pr_debug("omap_hwmod: %s: disabling\n", oh->name); | 2164 | pr_debug("omap_hwmod: %s: disabling\n", oh->name); |
@@ -2608,10 +2682,10 @@ static int _omap2_wait_target_ready(struct omap_hwmod *oh) | |||
2608 | */ | 2682 | */ |
2609 | static int _omap4_wait_target_ready(struct omap_hwmod *oh) | 2683 | static int _omap4_wait_target_ready(struct omap_hwmod *oh) |
2610 | { | 2684 | { |
2611 | if (!oh || !oh->clkdm) | 2685 | if (!oh) |
2612 | return -EINVAL; | 2686 | return -EINVAL; |
2613 | 2687 | ||
2614 | if (oh->flags & HWMOD_NO_IDLEST) | 2688 | if (oh->flags & HWMOD_NO_IDLEST || !oh->clkdm) |
2615 | return 0; | 2689 | return 0; |
2616 | 2690 | ||
2617 | if (!_find_mpu_rt_port(oh)) | 2691 | if (!_find_mpu_rt_port(oh)) |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index 10575a1bc1f1..b5db6007c523 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -536,6 +536,15 @@ static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = { | |||
536 | { } | 536 | { } |
537 | }; | 537 | }; |
538 | 538 | ||
539 | static struct omap_hwmod_addr_space omap2420_gpmc_addrs[] = { | ||
540 | { | ||
541 | .pa_start = 0x6800a000, | ||
542 | .pa_end = 0x6800afff, | ||
543 | .flags = ADDR_TYPE_RT | ||
544 | }, | ||
545 | { } | ||
546 | }; | ||
547 | |||
539 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { | 548 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { |
540 | .master = &omap2xxx_l4_wkup_hwmod, | 549 | .master = &omap2xxx_l4_wkup_hwmod, |
541 | .slave = &omap2xxx_counter_32k_hwmod, | 550 | .slave = &omap2xxx_counter_32k_hwmod, |
@@ -544,6 +553,14 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { | |||
544 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 553 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
545 | }; | 554 | }; |
546 | 555 | ||
556 | static struct omap_hwmod_ocp_if omap2420_l3__gpmc = { | ||
557 | .master = &omap2xxx_l3_main_hwmod, | ||
558 | .slave = &omap2xxx_gpmc_hwmod, | ||
559 | .clk = "core_l3_ck", | ||
560 | .addr = omap2420_gpmc_addrs, | ||
561 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
562 | }; | ||
563 | |||
547 | static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { | 564 | static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { |
548 | &omap2xxx_l3_main__l4_core, | 565 | &omap2xxx_l3_main__l4_core, |
549 | &omap2xxx_mpu__l3_main, | 566 | &omap2xxx_mpu__l3_main, |
@@ -585,8 +602,10 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { | |||
585 | &omap2420_l4_core__mcbsp1, | 602 | &omap2420_l4_core__mcbsp1, |
586 | &omap2420_l4_core__mcbsp2, | 603 | &omap2420_l4_core__mcbsp2, |
587 | &omap2420_l4_core__msdi1, | 604 | &omap2420_l4_core__msdi1, |
605 | &omap2xxx_l4_core__rng, | ||
588 | &omap2420_l4_core__hdq1w, | 606 | &omap2420_l4_core__hdq1w, |
589 | &omap2420_l4_wkup__counter_32k, | 607 | &omap2420_l4_wkup__counter_32k, |
608 | &omap2420_l3__gpmc, | ||
590 | NULL, | 609 | NULL, |
591 | }; | 610 | }; |
592 | 611 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 60de70feeae5..c455e41b0237 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -888,6 +888,15 @@ static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = { | |||
888 | { } | 888 | { } |
889 | }; | 889 | }; |
890 | 890 | ||
891 | static struct omap_hwmod_addr_space omap2430_gpmc_addrs[] = { | ||
892 | { | ||
893 | .pa_start = 0x6e000000, | ||
894 | .pa_end = 0x6e000fff, | ||
895 | .flags = ADDR_TYPE_RT | ||
896 | }, | ||
897 | { } | ||
898 | }; | ||
899 | |||
891 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = { | 900 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = { |
892 | .master = &omap2xxx_l4_wkup_hwmod, | 901 | .master = &omap2xxx_l4_wkup_hwmod, |
893 | .slave = &omap2xxx_counter_32k_hwmod, | 902 | .slave = &omap2xxx_counter_32k_hwmod, |
@@ -896,6 +905,14 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = { | |||
896 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 905 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
897 | }; | 906 | }; |
898 | 907 | ||
908 | static struct omap_hwmod_ocp_if omap2430_l3__gpmc = { | ||
909 | .master = &omap2xxx_l3_main_hwmod, | ||
910 | .slave = &omap2xxx_gpmc_hwmod, | ||
911 | .clk = "core_l3_ck", | ||
912 | .addr = omap2430_gpmc_addrs, | ||
913 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
914 | }; | ||
915 | |||
899 | static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { | 916 | static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { |
900 | &omap2xxx_l3_main__l4_core, | 917 | &omap2xxx_l3_main__l4_core, |
901 | &omap2xxx_mpu__l3_main, | 918 | &omap2xxx_mpu__l3_main, |
@@ -945,7 +962,9 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { | |||
945 | &omap2430_l4_core__mcbsp4, | 962 | &omap2430_l4_core__mcbsp4, |
946 | &omap2430_l4_core__mcbsp5, | 963 | &omap2430_l4_core__mcbsp5, |
947 | &omap2430_l4_core__hdq1w, | 964 | &omap2430_l4_core__hdq1w, |
965 | &omap2xxx_l4_core__rng, | ||
948 | &omap2430_l4_wkup__counter_32k, | 966 | &omap2430_l4_wkup__counter_32k, |
967 | &omap2430_l3__gpmc, | ||
949 | NULL, | 968 | NULL, |
950 | }; | 969 | }; |
951 | 970 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c index f853a0b1d5ca..1a1287d62648 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c | |||
@@ -129,6 +129,15 @@ struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = { | |||
129 | { } | 129 | { } |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static struct omap_hwmod_addr_space omap2_rng_addr_space[] = { | ||
133 | { | ||
134 | .pa_start = 0x480a0000, | ||
135 | .pa_end = 0x480a004f, | ||
136 | .flags = ADDR_TYPE_RT | ||
137 | }, | ||
138 | { } | ||
139 | }; | ||
140 | |||
132 | /* | 141 | /* |
133 | * Common interconnect data | 142 | * Common interconnect data |
134 | */ | 143 | */ |
@@ -372,3 +381,11 @@ struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc = { | |||
372 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 381 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
373 | }; | 382 | }; |
374 | 383 | ||
384 | /* l4_core -> rng */ | ||
385 | struct omap_hwmod_ocp_if omap2xxx_l4_core__rng = { | ||
386 | .master = &omap2xxx_l4_core_hwmod, | ||
387 | .slave = &omap2xxx_rng_hwmod, | ||
388 | .clk = "rng_ick", | ||
389 | .addr = omap2_rng_addr_space, | ||
390 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
391 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index feeb401cf87e..35dcdb66a4e0 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -173,6 +173,26 @@ struct omap_hwmod_class omap2xxx_mcspi_class = { | |||
173 | }; | 173 | }; |
174 | 174 | ||
175 | /* | 175 | /* |
176 | * 'gpmc' class | ||
177 | * general purpose memory controller | ||
178 | */ | ||
179 | |||
180 | static struct omap_hwmod_class_sysconfig omap2xxx_gpmc_sysc = { | ||
181 | .rev_offs = 0x0000, | ||
182 | .sysc_offs = 0x0010, | ||
183 | .syss_offs = 0x0014, | ||
184 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | | ||
185 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
186 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
187 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
188 | }; | ||
189 | |||
190 | static struct omap_hwmod_class omap2xxx_gpmc_hwmod_class = { | ||
191 | .name = "gpmc", | ||
192 | .sysc = &omap2xxx_gpmc_sysc, | ||
193 | }; | ||
194 | |||
195 | /* | ||
176 | * IP blocks | 196 | * IP blocks |
177 | */ | 197 | */ |
178 | 198 | ||
@@ -198,8 +218,14 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = { | |||
198 | }; | 218 | }; |
199 | 219 | ||
200 | /* MPU */ | 220 | /* MPU */ |
221 | static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = { | ||
222 | { .name = "pmu", .irq = 3 }, | ||
223 | { .irq = -1 } | ||
224 | }; | ||
225 | |||
201 | struct omap_hwmod omap2xxx_mpu_hwmod = { | 226 | struct omap_hwmod omap2xxx_mpu_hwmod = { |
202 | .name = "mpu", | 227 | .name = "mpu", |
228 | .mpu_irqs = omap2xxx_mpu_irqs, | ||
203 | .class = &mpu_hwmod_class, | 229 | .class = &mpu_hwmod_class, |
204 | .main_clk = "mpu_ck", | 230 | .main_clk = "mpu_ck", |
205 | }; | 231 | }; |
@@ -220,6 +246,11 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | |||
220 | .timer_capability = OMAP_TIMER_HAS_PWM, | 246 | .timer_capability = OMAP_TIMER_HAS_PWM, |
221 | }; | 247 | }; |
222 | 248 | ||
249 | /* timers with DSP interrupt dev attribute */ | ||
250 | static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = { | ||
251 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ, | ||
252 | }; | ||
253 | |||
223 | /* timer1 */ | 254 | /* timer1 */ |
224 | 255 | ||
225 | struct omap_hwmod omap2xxx_timer1_hwmod = { | 256 | struct omap_hwmod omap2xxx_timer1_hwmod = { |
@@ -308,6 +339,7 @@ struct omap_hwmod omap2xxx_timer5_hwmod = { | |||
308 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | 339 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, |
309 | }, | 340 | }, |
310 | }, | 341 | }, |
342 | .dev_attr = &capability_dsp_dev_attr, | ||
311 | .class = &omap2xxx_timer_hwmod_class, | 343 | .class = &omap2xxx_timer_hwmod_class, |
312 | }; | 344 | }; |
313 | 345 | ||
@@ -326,6 +358,7 @@ struct omap_hwmod omap2xxx_timer6_hwmod = { | |||
326 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | 358 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, |
327 | }, | 359 | }, |
328 | }, | 360 | }, |
361 | .dev_attr = &capability_dsp_dev_attr, | ||
329 | .class = &omap2xxx_timer_hwmod_class, | 362 | .class = &omap2xxx_timer_hwmod_class, |
330 | }; | 363 | }; |
331 | 364 | ||
@@ -344,6 +377,7 @@ struct omap_hwmod omap2xxx_timer7_hwmod = { | |||
344 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | 377 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, |
345 | }, | 378 | }, |
346 | }, | 379 | }, |
380 | .dev_attr = &capability_dsp_dev_attr, | ||
347 | .class = &omap2xxx_timer_hwmod_class, | 381 | .class = &omap2xxx_timer_hwmod_class, |
348 | }; | 382 | }; |
349 | 383 | ||
@@ -362,6 +396,7 @@ struct omap_hwmod omap2xxx_timer8_hwmod = { | |||
362 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | 396 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, |
363 | }, | 397 | }, |
364 | }, | 398 | }, |
399 | .dev_attr = &capability_dsp_dev_attr, | ||
365 | .class = &omap2xxx_timer_hwmod_class, | 400 | .class = &omap2xxx_timer_hwmod_class, |
366 | }; | 401 | }; |
367 | 402 | ||
@@ -724,7 +759,6 @@ struct omap_hwmod omap2xxx_mcspi2_hwmod = { | |||
724 | .dev_attr = &omap_mcspi2_dev_attr, | 759 | .dev_attr = &omap_mcspi2_dev_attr, |
725 | }; | 760 | }; |
726 | 761 | ||
727 | |||
728 | static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { | 762 | static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { |
729 | .name = "counter", | 763 | .name = "counter", |
730 | }; | 764 | }; |
@@ -743,3 +777,77 @@ struct omap_hwmod omap2xxx_counter_32k_hwmod = { | |||
743 | }, | 777 | }, |
744 | .class = &omap2xxx_counter_hwmod_class, | 778 | .class = &omap2xxx_counter_hwmod_class, |
745 | }; | 779 | }; |
780 | |||
781 | /* gpmc */ | ||
782 | static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = { | ||
783 | { .irq = 20 }, | ||
784 | { .irq = -1 } | ||
785 | }; | ||
786 | |||
787 | struct omap_hwmod omap2xxx_gpmc_hwmod = { | ||
788 | .name = "gpmc", | ||
789 | .class = &omap2xxx_gpmc_hwmod_class, | ||
790 | .mpu_irqs = omap2xxx_gpmc_irqs, | ||
791 | .main_clk = "gpmc_fck", | ||
792 | /* | ||
793 | * XXX HWMOD_INIT_NO_RESET should not be needed for this IP | ||
794 | * block. It is not being added due to any known bugs with | ||
795 | * resetting the GPMC IP block, but rather because any timings | ||
796 | * set by the bootloader are not being correctly programmed by | ||
797 | * the kernel from the board file or DT data. | ||
798 | * HWMOD_INIT_NO_RESET should be removed ASAP. | ||
799 | */ | ||
800 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET | | ||
801 | HWMOD_NO_IDLEST), | ||
802 | .prcm = { | ||
803 | .omap2 = { | ||
804 | .prcm_reg_id = 3, | ||
805 | .module_bit = OMAP24XX_EN_GPMC_MASK, | ||
806 | .module_offs = CORE_MOD, | ||
807 | }, | ||
808 | }, | ||
809 | }; | ||
810 | |||
811 | /* RNG */ | ||
812 | |||
813 | static struct omap_hwmod_class_sysconfig omap2_rng_sysc = { | ||
814 | .rev_offs = 0x3c, | ||
815 | .sysc_offs = 0x40, | ||
816 | .syss_offs = 0x44, | ||
817 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
818 | SYSS_HAS_RESET_STATUS), | ||
819 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
820 | }; | ||
821 | |||
822 | static struct omap_hwmod_class omap2_rng_hwmod_class = { | ||
823 | .name = "rng", | ||
824 | .sysc = &omap2_rng_sysc, | ||
825 | }; | ||
826 | |||
827 | static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = { | ||
828 | { .irq = 52 }, | ||
829 | { .irq = -1 } | ||
830 | }; | ||
831 | |||
832 | struct omap_hwmod omap2xxx_rng_hwmod = { | ||
833 | .name = "rng", | ||
834 | .mpu_irqs = omap2_rng_mpu_irqs, | ||
835 | .main_clk = "l4_ck", | ||
836 | .prcm = { | ||
837 | .omap2 = { | ||
838 | .module_offs = CORE_MOD, | ||
839 | .prcm_reg_id = 4, | ||
840 | .module_bit = OMAP24XX_EN_RNG_SHIFT, | ||
841 | .idlest_reg_id = 4, | ||
842 | .idlest_idle_bit = OMAP24XX_ST_RNG_SHIFT, | ||
843 | }, | ||
844 | }, | ||
845 | /* | ||
846 | * XXX The first read from the SYSSTATUS register of the RNG | ||
847 | * after the SYSCONFIG SOFTRESET bit is set triggers an | ||
848 | * imprecise external abort. It's unclear why this happens. | ||
849 | * Until this is analyzed, skip the IP block reset. | ||
850 | */ | ||
851 | .flags = HWMOD_INIT_NO_RESET, | ||
852 | .class = &omap2_rng_hwmod_class, | ||
853 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 94b38af17055..285777241d5a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 27 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
28 | #include <linux/platform_data/spi-omap2-mcspi.h> | 28 | #include <linux/platform_data/spi-omap2-mcspi.h> |
29 | #include <plat/dmtimer.h> | 29 | #include <plat/dmtimer.h> |
30 | #include <plat/iommu.h> | ||
30 | 31 | ||
31 | #include "am35xx.h" | 32 | #include "am35xx.h" |
32 | 33 | ||
@@ -92,8 +93,14 @@ static struct omap_hwmod omap3xxx_l4_sec_hwmod = { | |||
92 | }; | 93 | }; |
93 | 94 | ||
94 | /* MPU */ | 95 | /* MPU */ |
96 | static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = { | ||
97 | { .name = "pmu", .irq = 3 }, | ||
98 | { .irq = -1 } | ||
99 | }; | ||
100 | |||
95 | static struct omap_hwmod omap3xxx_mpu_hwmod = { | 101 | static struct omap_hwmod omap3xxx_mpu_hwmod = { |
96 | .name = "mpu", | 102 | .name = "mpu", |
103 | .mpu_irqs = omap3xxx_mpu_irqs, | ||
97 | .class = &mpu_hwmod_class, | 104 | .class = &mpu_hwmod_class, |
98 | .main_clk = "arm_fck", | 105 | .main_clk = "arm_fck", |
99 | }; | 106 | }; |
@@ -123,6 +130,24 @@ static struct omap_hwmod omap3xxx_iva_hwmod = { | |||
123 | }, | 130 | }, |
124 | }; | 131 | }; |
125 | 132 | ||
133 | /* | ||
134 | * 'debugss' class | ||
135 | * debug and emulation sub system | ||
136 | */ | ||
137 | |||
138 | static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = { | ||
139 | .name = "debugss", | ||
140 | }; | ||
141 | |||
142 | /* debugss */ | ||
143 | static struct omap_hwmod omap3xxx_debugss_hwmod = { | ||
144 | .name = "debugss", | ||
145 | .class = &omap3xxx_debugss_hwmod_class, | ||
146 | .clkdm_name = "emu_clkdm", | ||
147 | .main_clk = "emu_src_ck", | ||
148 | .flags = HWMOD_NO_IDLEST, | ||
149 | }; | ||
150 | |||
126 | /* timer class */ | 151 | /* timer class */ |
127 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { | 152 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { |
128 | .rev_offs = 0x0000, | 153 | .rev_offs = 0x0000, |
@@ -170,6 +195,16 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | |||
170 | .timer_capability = OMAP_TIMER_HAS_PWM, | 195 | .timer_capability = OMAP_TIMER_HAS_PWM, |
171 | }; | 196 | }; |
172 | 197 | ||
198 | /* timers with DSP interrupt dev attribute */ | ||
199 | static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = { | ||
200 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ, | ||
201 | }; | ||
202 | |||
203 | /* pwm timers with DSP interrupt dev attribute */ | ||
204 | static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = { | ||
205 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM, | ||
206 | }; | ||
207 | |||
173 | /* timer1 */ | 208 | /* timer1 */ |
174 | static struct omap_hwmod omap3xxx_timer1_hwmod = { | 209 | static struct omap_hwmod omap3xxx_timer1_hwmod = { |
175 | .name = "timer1", | 210 | .name = "timer1", |
@@ -253,6 +288,7 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = { | |||
253 | .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT, | 288 | .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT, |
254 | }, | 289 | }, |
255 | }, | 290 | }, |
291 | .dev_attr = &capability_dsp_dev_attr, | ||
256 | .class = &omap3xxx_timer_hwmod_class, | 292 | .class = &omap3xxx_timer_hwmod_class, |
257 | }; | 293 | }; |
258 | 294 | ||
@@ -270,6 +306,7 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = { | |||
270 | .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT, | 306 | .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT, |
271 | }, | 307 | }, |
272 | }, | 308 | }, |
309 | .dev_attr = &capability_dsp_dev_attr, | ||
273 | .class = &omap3xxx_timer_hwmod_class, | 310 | .class = &omap3xxx_timer_hwmod_class, |
274 | }; | 311 | }; |
275 | 312 | ||
@@ -287,6 +324,7 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = { | |||
287 | .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT, | 324 | .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT, |
288 | }, | 325 | }, |
289 | }, | 326 | }, |
327 | .dev_attr = &capability_dsp_dev_attr, | ||
290 | .class = &omap3xxx_timer_hwmod_class, | 328 | .class = &omap3xxx_timer_hwmod_class, |
291 | }; | 329 | }; |
292 | 330 | ||
@@ -304,7 +342,7 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = { | |||
304 | .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT, | 342 | .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT, |
305 | }, | 343 | }, |
306 | }, | 344 | }, |
307 | .dev_attr = &capability_pwm_dev_attr, | 345 | .dev_attr = &capability_dsp_pwm_dev_attr, |
308 | .class = &omap3xxx_timer_hwmod_class, | 346 | .class = &omap3xxx_timer_hwmod_class, |
309 | }; | 347 | }; |
310 | 348 | ||
@@ -2033,6 +2071,33 @@ static struct omap_hwmod omap3xxx_hdq1w_hwmod = { | |||
2033 | .class = &omap2_hdq1w_class, | 2071 | .class = &omap2_hdq1w_class, |
2034 | }; | 2072 | }; |
2035 | 2073 | ||
2074 | /* SAD2D */ | ||
2075 | static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = { | ||
2076 | { .name = "rst_modem_pwron_sw", .rst_shift = 0 }, | ||
2077 | { .name = "rst_modem_sw", .rst_shift = 1 }, | ||
2078 | }; | ||
2079 | |||
2080 | static struct omap_hwmod_class omap3xxx_sad2d_class = { | ||
2081 | .name = "sad2d", | ||
2082 | }; | ||
2083 | |||
2084 | static struct omap_hwmod omap3xxx_sad2d_hwmod = { | ||
2085 | .name = "sad2d", | ||
2086 | .rst_lines = omap3xxx_sad2d_resets, | ||
2087 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets), | ||
2088 | .main_clk = "sad2d_ick", | ||
2089 | .prcm = { | ||
2090 | .omap2 = { | ||
2091 | .module_offs = CORE_MOD, | ||
2092 | .prcm_reg_id = 1, | ||
2093 | .module_bit = OMAP3430_EN_SAD2D_SHIFT, | ||
2094 | .idlest_reg_id = 1, | ||
2095 | .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT, | ||
2096 | }, | ||
2097 | }, | ||
2098 | .class = &omap3xxx_sad2d_class, | ||
2099 | }; | ||
2100 | |||
2036 | /* | 2101 | /* |
2037 | * '32K sync counter' class | 2102 | * '32K sync counter' class |
2038 | * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock | 2103 | * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock |
@@ -2068,6 +2133,49 @@ static struct omap_hwmod omap3xxx_counter_32k_hwmod = { | |||
2068 | }; | 2133 | }; |
2069 | 2134 | ||
2070 | /* | 2135 | /* |
2136 | * 'gpmc' class | ||
2137 | * general purpose memory controller | ||
2138 | */ | ||
2139 | |||
2140 | static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = { | ||
2141 | .rev_offs = 0x0000, | ||
2142 | .sysc_offs = 0x0010, | ||
2143 | .syss_offs = 0x0014, | ||
2144 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | | ||
2145 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
2146 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2147 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2148 | }; | ||
2149 | |||
2150 | static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = { | ||
2151 | .name = "gpmc", | ||
2152 | .sysc = &omap3xxx_gpmc_sysc, | ||
2153 | }; | ||
2154 | |||
2155 | static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = { | ||
2156 | { .irq = 20 }, | ||
2157 | { .irq = -1 } | ||
2158 | }; | ||
2159 | |||
2160 | static struct omap_hwmod omap3xxx_gpmc_hwmod = { | ||
2161 | .name = "gpmc", | ||
2162 | .class = &omap3xxx_gpmc_hwmod_class, | ||
2163 | .clkdm_name = "core_l3_clkdm", | ||
2164 | .mpu_irqs = omap3xxx_gpmc_irqs, | ||
2165 | .main_clk = "gpmc_fck", | ||
2166 | /* | ||
2167 | * XXX HWMOD_INIT_NO_RESET should not be needed for this IP | ||
2168 | * block. It is not being added due to any known bugs with | ||
2169 | * resetting the GPMC IP block, but rather because any timings | ||
2170 | * set by the bootloader are not being correctly programmed by | ||
2171 | * the kernel from the board file or DT data. | ||
2172 | * HWMOD_INIT_NO_RESET should be removed ASAP. | ||
2173 | */ | ||
2174 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET | | ||
2175 | HWMOD_NO_IDLEST), | ||
2176 | }; | ||
2177 | |||
2178 | /* | ||
2071 | * interfaces | 2179 | * interfaces |
2072 | */ | 2180 | */ |
2073 | 2181 | ||
@@ -2102,6 +2210,23 @@ static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { | |||
2102 | .user = OCP_USER_MPU, | 2210 | .user = OCP_USER_MPU, |
2103 | }; | 2211 | }; |
2104 | 2212 | ||
2213 | static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = { | ||
2214 | { | ||
2215 | .pa_start = 0x54000000, | ||
2216 | .pa_end = 0x547fffff, | ||
2217 | .flags = ADDR_TYPE_RT, | ||
2218 | }, | ||
2219 | { } | ||
2220 | }; | ||
2221 | |||
2222 | /* l3 -> debugss */ | ||
2223 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = { | ||
2224 | .master = &omap3xxx_l3_main_hwmod, | ||
2225 | .slave = &omap3xxx_debugss_hwmod, | ||
2226 | .addr = omap3xxx_l4_emu_addrs, | ||
2227 | .user = OCP_USER_MPU, | ||
2228 | }; | ||
2229 | |||
2105 | /* DSS -> l3 */ | 2230 | /* DSS -> l3 */ |
2106 | static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = { | 2231 | static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = { |
2107 | .master = &omap3430es1_dss_core_hwmod, | 2232 | .master = &omap3430es1_dss_core_hwmod, |
@@ -2137,6 +2262,14 @@ static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { | |||
2137 | .user = OCP_USER_MPU, | 2262 | .user = OCP_USER_MPU, |
2138 | }; | 2263 | }; |
2139 | 2264 | ||
2265 | /* l3_core -> sad2d interface */ | ||
2266 | static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = { | ||
2267 | .master = &omap3xxx_sad2d_hwmod, | ||
2268 | .slave = &omap3xxx_l3_main_hwmod, | ||
2269 | .clk = "core_l3_ick", | ||
2270 | .user = OCP_USER_MPU, | ||
2271 | }; | ||
2272 | |||
2140 | /* L4_CORE -> L4_WKUP interface */ | 2273 | /* L4_CORE -> L4_WKUP interface */ |
2141 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | 2274 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { |
2142 | .master = &omap3xxx_l4_core_hwmod, | 2275 | .master = &omap3xxx_l4_core_hwmod, |
@@ -2823,6 +2956,122 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { | |||
2823 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2956 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2824 | }; | 2957 | }; |
2825 | 2958 | ||
2959 | /* | ||
2960 | * 'mmu' class | ||
2961 | * The memory management unit performs virtual to physical address translation | ||
2962 | * for its requestors. | ||
2963 | */ | ||
2964 | |||
2965 | static struct omap_hwmod_class_sysconfig mmu_sysc = { | ||
2966 | .rev_offs = 0x000, | ||
2967 | .sysc_offs = 0x010, | ||
2968 | .syss_offs = 0x014, | ||
2969 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
2970 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
2971 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2972 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2973 | }; | ||
2974 | |||
2975 | static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = { | ||
2976 | .name = "mmu", | ||
2977 | .sysc = &mmu_sysc, | ||
2978 | }; | ||
2979 | |||
2980 | /* mmu isp */ | ||
2981 | |||
2982 | static struct omap_mmu_dev_attr mmu_isp_dev_attr = { | ||
2983 | .da_start = 0x0, | ||
2984 | .da_end = 0xfffff000, | ||
2985 | .nr_tlb_entries = 8, | ||
2986 | }; | ||
2987 | |||
2988 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod; | ||
2989 | static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = { | ||
2990 | { .irq = 24 }, | ||
2991 | { .irq = -1 } | ||
2992 | }; | ||
2993 | |||
2994 | static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = { | ||
2995 | { | ||
2996 | .pa_start = 0x480bd400, | ||
2997 | .pa_end = 0x480bd47f, | ||
2998 | .flags = ADDR_TYPE_RT, | ||
2999 | }, | ||
3000 | { } | ||
3001 | }; | ||
3002 | |||
3003 | /* l4_core -> mmu isp */ | ||
3004 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = { | ||
3005 | .master = &omap3xxx_l4_core_hwmod, | ||
3006 | .slave = &omap3xxx_mmu_isp_hwmod, | ||
3007 | .addr = omap3xxx_mmu_isp_addrs, | ||
3008 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3009 | }; | ||
3010 | |||
3011 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod = { | ||
3012 | .name = "mmu_isp", | ||
3013 | .class = &omap3xxx_mmu_hwmod_class, | ||
3014 | .mpu_irqs = omap3xxx_mmu_isp_irqs, | ||
3015 | .main_clk = "cam_ick", | ||
3016 | .dev_attr = &mmu_isp_dev_attr, | ||
3017 | .flags = HWMOD_NO_IDLEST, | ||
3018 | }; | ||
3019 | |||
3020 | #ifdef CONFIG_OMAP_IOMMU_IVA2 | ||
3021 | |||
3022 | /* mmu iva */ | ||
3023 | |||
3024 | static struct omap_mmu_dev_attr mmu_iva_dev_attr = { | ||
3025 | .da_start = 0x11000000, | ||
3026 | .da_end = 0xfffff000, | ||
3027 | .nr_tlb_entries = 32, | ||
3028 | }; | ||
3029 | |||
3030 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod; | ||
3031 | static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = { | ||
3032 | { .irq = 28 }, | ||
3033 | { .irq = -1 } | ||
3034 | }; | ||
3035 | |||
3036 | static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = { | ||
3037 | { .name = "mmu", .rst_shift = 1, .st_shift = 9 }, | ||
3038 | }; | ||
3039 | |||
3040 | static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = { | ||
3041 | { | ||
3042 | .pa_start = 0x5d000000, | ||
3043 | .pa_end = 0x5d00007f, | ||
3044 | .flags = ADDR_TYPE_RT, | ||
3045 | }, | ||
3046 | { } | ||
3047 | }; | ||
3048 | |||
3049 | /* l3_main -> iva mmu */ | ||
3050 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = { | ||
3051 | .master = &omap3xxx_l3_main_hwmod, | ||
3052 | .slave = &omap3xxx_mmu_iva_hwmod, | ||
3053 | .addr = omap3xxx_mmu_iva_addrs, | ||
3054 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3055 | }; | ||
3056 | |||
3057 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod = { | ||
3058 | .name = "mmu_iva", | ||
3059 | .class = &omap3xxx_mmu_hwmod_class, | ||
3060 | .mpu_irqs = omap3xxx_mmu_iva_irqs, | ||
3061 | .rst_lines = omap3xxx_mmu_iva_resets, | ||
3062 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets), | ||
3063 | .main_clk = "iva2_ck", | ||
3064 | .prcm = { | ||
3065 | .omap2 = { | ||
3066 | .module_offs = OMAP3430_IVA2_MOD, | ||
3067 | }, | ||
3068 | }, | ||
3069 | .dev_attr = &mmu_iva_dev_attr, | ||
3070 | .flags = HWMOD_NO_IDLEST, | ||
3071 | }; | ||
3072 | |||
3073 | #endif | ||
3074 | |||
2826 | /* l4_per -> gpio4 */ | 3075 | /* l4_per -> gpio4 */ |
2827 | static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { | 3076 | static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { |
2828 | { | 3077 | { |
@@ -3168,6 +3417,15 @@ static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = { | |||
3168 | { } | 3417 | { } |
3169 | }; | 3418 | }; |
3170 | 3419 | ||
3420 | static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = { | ||
3421 | { | ||
3422 | .pa_start = 0x6e000000, | ||
3423 | .pa_end = 0x6e000fff, | ||
3424 | .flags = ADDR_TYPE_RT | ||
3425 | }, | ||
3426 | { } | ||
3427 | }; | ||
3428 | |||
3171 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = { | 3429 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = { |
3172 | .master = &omap3xxx_l4_wkup_hwmod, | 3430 | .master = &omap3xxx_l4_wkup_hwmod, |
3173 | .slave = &omap3xxx_counter_32k_hwmod, | 3431 | .slave = &omap3xxx_counter_32k_hwmod, |
@@ -3277,10 +3535,19 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__emac = { | |||
3277 | .user = OCP_USER_MPU, | 3535 | .user = OCP_USER_MPU, |
3278 | }; | 3536 | }; |
3279 | 3537 | ||
3538 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = { | ||
3539 | .master = &omap3xxx_l3_main_hwmod, | ||
3540 | .slave = &omap3xxx_gpmc_hwmod, | ||
3541 | .clk = "core_l3_ick", | ||
3542 | .addr = omap3xxx_gpmc_addrs, | ||
3543 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3544 | }; | ||
3545 | |||
3280 | static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { | 3546 | static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { |
3281 | &omap3xxx_l3_main__l4_core, | 3547 | &omap3xxx_l3_main__l4_core, |
3282 | &omap3xxx_l3_main__l4_per, | 3548 | &omap3xxx_l3_main__l4_per, |
3283 | &omap3xxx_mpu__l3_main, | 3549 | &omap3xxx_mpu__l3_main, |
3550 | &omap3xxx_l3_main__l4_debugss, | ||
3284 | &omap3xxx_l4_core__l4_wkup, | 3551 | &omap3xxx_l4_core__l4_wkup, |
3285 | &omap3xxx_l4_core__mmc3, | 3552 | &omap3xxx_l4_core__mmc3, |
3286 | &omap3_l4_core__uart1, | 3553 | &omap3_l4_core__uart1, |
@@ -3322,6 +3589,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { | |||
3322 | &omap34xx_l4_core__mcspi3, | 3589 | &omap34xx_l4_core__mcspi3, |
3323 | &omap34xx_l4_core__mcspi4, | 3590 | &omap34xx_l4_core__mcspi4, |
3324 | &omap3xxx_l4_wkup__counter_32k, | 3591 | &omap3xxx_l4_wkup__counter_32k, |
3592 | &omap3xxx_l3_main__gpmc, | ||
3325 | NULL, | 3593 | NULL, |
3326 | }; | 3594 | }; |
3327 | 3595 | ||
@@ -3371,6 +3639,11 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = { | |||
3371 | &omap34xx_l4_core__sr2, | 3639 | &omap34xx_l4_core__sr2, |
3372 | &omap3xxx_l4_core__mailbox, | 3640 | &omap3xxx_l4_core__mailbox, |
3373 | &omap3xxx_l4_core__hdq1w, | 3641 | &omap3xxx_l4_core__hdq1w, |
3642 | &omap3xxx_sad2d__l3, | ||
3643 | &omap3xxx_l4_core__mmu_isp, | ||
3644 | #ifdef CONFIG_OMAP_IOMMU_IVA2 | ||
3645 | &omap3xxx_l3_main__mmu_iva, | ||
3646 | #endif | ||
3374 | NULL | 3647 | NULL |
3375 | }; | 3648 | }; |
3376 | 3649 | ||
@@ -3391,6 +3664,11 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = { | |||
3391 | &omap3xxx_l4_core__es3plus_mmc1, | 3664 | &omap3xxx_l4_core__es3plus_mmc1, |
3392 | &omap3xxx_l4_core__es3plus_mmc2, | 3665 | &omap3xxx_l4_core__es3plus_mmc2, |
3393 | &omap3xxx_l4_core__hdq1w, | 3666 | &omap3xxx_l4_core__hdq1w, |
3667 | &omap3xxx_sad2d__l3, | ||
3668 | &omap3xxx_l4_core__mmu_isp, | ||
3669 | #ifdef CONFIG_OMAP_IOMMU_IVA2 | ||
3670 | &omap3xxx_l3_main__mmu_iva, | ||
3671 | #endif | ||
3394 | NULL | 3672 | NULL |
3395 | }; | 3673 | }; |
3396 | 3674 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index c7dcb606cd0c..8d7a93525bc6 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
31 | #include <plat/dmtimer.h> | 31 | #include <plat/dmtimer.h> |
32 | #include <plat/common.h> | 32 | #include <plat/common.h> |
33 | #include <plat/iommu.h> | ||
33 | 34 | ||
34 | #include "omap_hwmod_common_data.h" | 35 | #include "omap_hwmod_common_data.h" |
35 | #include "cm1_44xx.h" | 36 | #include "cm1_44xx.h" |
@@ -202,6 +203,9 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = { | |||
202 | .prcm = { | 203 | .prcm = { |
203 | .omap4 = { | 204 | .omap4 = { |
204 | .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, | 205 | .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, |
206 | .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET, | ||
207 | .lostcontext_mask = OMAP4430_LOSTMEM_AESSMEM_MASK, | ||
208 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
205 | }, | 209 | }, |
206 | }, | 210 | }, |
207 | }; | 211 | }; |
@@ -258,6 +262,11 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
258 | .name = "mpu_private", | 262 | .name = "mpu_private", |
259 | .class = &omap44xx_mpu_bus_hwmod_class, | 263 | .class = &omap44xx_mpu_bus_hwmod_class, |
260 | .clkdm_name = "mpuss_clkdm", | 264 | .clkdm_name = "mpuss_clkdm", |
265 | .prcm = { | ||
266 | .omap4 = { | ||
267 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
268 | }, | ||
269 | }, | ||
261 | }; | 270 | }; |
262 | 271 | ||
263 | /* | 272 | /* |
@@ -342,6 +351,7 @@ static struct omap_hwmod omap44xx_aess_hwmod = { | |||
342 | .omap4 = { | 351 | .omap4 = { |
343 | .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET, | 352 | .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET, |
344 | .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET, | 353 | .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET, |
354 | .lostcontext_mask = OMAP4430_LOSTCONTEXT_DFF_MASK, | ||
345 | .modulemode = MODULEMODE_SWCTRL, | 355 | .modulemode = MODULEMODE_SWCTRL, |
346 | }, | 356 | }, |
347 | }, | 357 | }, |
@@ -446,6 +456,11 @@ static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = { | |||
446 | .class = &omap44xx_ctrl_module_hwmod_class, | 456 | .class = &omap44xx_ctrl_module_hwmod_class, |
447 | .clkdm_name = "l4_cfg_clkdm", | 457 | .clkdm_name = "l4_cfg_clkdm", |
448 | .mpu_irqs = omap44xx_ctrl_module_core_irqs, | 458 | .mpu_irqs = omap44xx_ctrl_module_core_irqs, |
459 | .prcm = { | ||
460 | .omap4 = { | ||
461 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
462 | }, | ||
463 | }, | ||
449 | }; | 464 | }; |
450 | 465 | ||
451 | /* ctrl_module_pad_core */ | 466 | /* ctrl_module_pad_core */ |
@@ -453,6 +468,11 @@ static struct omap_hwmod omap44xx_ctrl_module_pad_core_hwmod = { | |||
453 | .name = "ctrl_module_pad_core", | 468 | .name = "ctrl_module_pad_core", |
454 | .class = &omap44xx_ctrl_module_hwmod_class, | 469 | .class = &omap44xx_ctrl_module_hwmod_class, |
455 | .clkdm_name = "l4_cfg_clkdm", | 470 | .clkdm_name = "l4_cfg_clkdm", |
471 | .prcm = { | ||
472 | .omap4 = { | ||
473 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
474 | }, | ||
475 | }, | ||
456 | }; | 476 | }; |
457 | 477 | ||
458 | /* ctrl_module_wkup */ | 478 | /* ctrl_module_wkup */ |
@@ -460,6 +480,11 @@ static struct omap_hwmod omap44xx_ctrl_module_wkup_hwmod = { | |||
460 | .name = "ctrl_module_wkup", | 480 | .name = "ctrl_module_wkup", |
461 | .class = &omap44xx_ctrl_module_hwmod_class, | 481 | .class = &omap44xx_ctrl_module_hwmod_class, |
462 | .clkdm_name = "l4_wkup_clkdm", | 482 | .clkdm_name = "l4_wkup_clkdm", |
483 | .prcm = { | ||
484 | .omap4 = { | ||
485 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
486 | }, | ||
487 | }, | ||
463 | }; | 488 | }; |
464 | 489 | ||
465 | /* ctrl_module_pad_wkup */ | 490 | /* ctrl_module_pad_wkup */ |
@@ -467,6 +492,11 @@ static struct omap_hwmod omap44xx_ctrl_module_pad_wkup_hwmod = { | |||
467 | .name = "ctrl_module_pad_wkup", | 492 | .name = "ctrl_module_pad_wkup", |
468 | .class = &omap44xx_ctrl_module_hwmod_class, | 493 | .class = &omap44xx_ctrl_module_hwmod_class, |
469 | .clkdm_name = "l4_wkup_clkdm", | 494 | .clkdm_name = "l4_wkup_clkdm", |
495 | .prcm = { | ||
496 | .omap4 = { | ||
497 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
498 | }, | ||
499 | }, | ||
470 | }; | 500 | }; |
471 | 501 | ||
472 | /* | 502 | /* |
@@ -611,7 +641,6 @@ static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = { | |||
611 | 641 | ||
612 | static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { | 642 | static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { |
613 | { .name = "dsp", .rst_shift = 0 }, | 643 | { .name = "dsp", .rst_shift = 0 }, |
614 | { .name = "mmu_cache", .rst_shift = 1 }, | ||
615 | }; | 644 | }; |
616 | 645 | ||
617 | static struct omap_hwmod omap44xx_dsp_hwmod = { | 646 | static struct omap_hwmod omap44xx_dsp_hwmod = { |
@@ -1323,6 +1352,14 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = { | |||
1323 | .name = "gpmc", | 1352 | .name = "gpmc", |
1324 | .class = &omap44xx_gpmc_hwmod_class, | 1353 | .class = &omap44xx_gpmc_hwmod_class, |
1325 | .clkdm_name = "l3_2_clkdm", | 1354 | .clkdm_name = "l3_2_clkdm", |
1355 | /* | ||
1356 | * XXX HWMOD_INIT_NO_RESET should not be needed for this IP | ||
1357 | * block. It is not being added due to any known bugs with | ||
1358 | * resetting the GPMC IP block, but rather because any timings | ||
1359 | * set by the bootloader are not being correctly programmed by | ||
1360 | * the kernel from the board file or DT data. | ||
1361 | * HWMOD_INIT_NO_RESET should be removed ASAP. | ||
1362 | */ | ||
1326 | .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, | 1363 | .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, |
1327 | .mpu_irqs = omap44xx_gpmc_irqs, | 1364 | .mpu_irqs = omap44xx_gpmc_irqs, |
1328 | .sdma_reqs = omap44xx_gpmc_sdma_reqs, | 1365 | .sdma_reqs = omap44xx_gpmc_sdma_reqs, |
@@ -1631,7 +1668,6 @@ static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = { | |||
1631 | static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { | 1668 | static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { |
1632 | { .name = "cpu0", .rst_shift = 0 }, | 1669 | { .name = "cpu0", .rst_shift = 0 }, |
1633 | { .name = "cpu1", .rst_shift = 1 }, | 1670 | { .name = "cpu1", .rst_shift = 1 }, |
1634 | { .name = "mmu_cache", .rst_shift = 2 }, | ||
1635 | }; | 1671 | }; |
1636 | 1672 | ||
1637 | static struct omap_hwmod omap44xx_ipu_hwmod = { | 1673 | static struct omap_hwmod omap44xx_ipu_hwmod = { |
@@ -2438,6 +2474,137 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = { | |||
2438 | }; | 2474 | }; |
2439 | 2475 | ||
2440 | /* | 2476 | /* |
2477 | * 'mmu' class | ||
2478 | * The memory management unit performs virtual to physical address translation | ||
2479 | * for its requestors. | ||
2480 | */ | ||
2481 | |||
2482 | static struct omap_hwmod_class_sysconfig mmu_sysc = { | ||
2483 | .rev_offs = 0x000, | ||
2484 | .sysc_offs = 0x010, | ||
2485 | .syss_offs = 0x014, | ||
2486 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
2487 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
2488 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2489 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2490 | }; | ||
2491 | |||
2492 | static struct omap_hwmod_class omap44xx_mmu_hwmod_class = { | ||
2493 | .name = "mmu", | ||
2494 | .sysc = &mmu_sysc, | ||
2495 | }; | ||
2496 | |||
2497 | /* mmu ipu */ | ||
2498 | |||
2499 | static struct omap_mmu_dev_attr mmu_ipu_dev_attr = { | ||
2500 | .da_start = 0x0, | ||
2501 | .da_end = 0xfffff000, | ||
2502 | .nr_tlb_entries = 32, | ||
2503 | }; | ||
2504 | |||
2505 | static struct omap_hwmod omap44xx_mmu_ipu_hwmod; | ||
2506 | static struct omap_hwmod_irq_info omap44xx_mmu_ipu_irqs[] = { | ||
2507 | { .irq = 100 + OMAP44XX_IRQ_GIC_START, }, | ||
2508 | { .irq = -1 } | ||
2509 | }; | ||
2510 | |||
2511 | static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = { | ||
2512 | { .name = "mmu_cache", .rst_shift = 2 }, | ||
2513 | }; | ||
2514 | |||
2515 | static struct omap_hwmod_addr_space omap44xx_mmu_ipu_addrs[] = { | ||
2516 | { | ||
2517 | .pa_start = 0x55082000, | ||
2518 | .pa_end = 0x550820ff, | ||
2519 | .flags = ADDR_TYPE_RT, | ||
2520 | }, | ||
2521 | { } | ||
2522 | }; | ||
2523 | |||
2524 | /* l3_main_2 -> mmu_ipu */ | ||
2525 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__mmu_ipu = { | ||
2526 | .master = &omap44xx_l3_main_2_hwmod, | ||
2527 | .slave = &omap44xx_mmu_ipu_hwmod, | ||
2528 | .clk = "l3_div_ck", | ||
2529 | .addr = omap44xx_mmu_ipu_addrs, | ||
2530 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2531 | }; | ||
2532 | |||
2533 | static struct omap_hwmod omap44xx_mmu_ipu_hwmod = { | ||
2534 | .name = "mmu_ipu", | ||
2535 | .class = &omap44xx_mmu_hwmod_class, | ||
2536 | .clkdm_name = "ducati_clkdm", | ||
2537 | .mpu_irqs = omap44xx_mmu_ipu_irqs, | ||
2538 | .rst_lines = omap44xx_mmu_ipu_resets, | ||
2539 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_ipu_resets), | ||
2540 | .main_clk = "ducati_clk_mux_ck", | ||
2541 | .prcm = { | ||
2542 | .omap4 = { | ||
2543 | .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET, | ||
2544 | .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET, | ||
2545 | .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET, | ||
2546 | .modulemode = MODULEMODE_HWCTRL, | ||
2547 | }, | ||
2548 | }, | ||
2549 | .dev_attr = &mmu_ipu_dev_attr, | ||
2550 | }; | ||
2551 | |||
2552 | /* mmu dsp */ | ||
2553 | |||
2554 | static struct omap_mmu_dev_attr mmu_dsp_dev_attr = { | ||
2555 | .da_start = 0x0, | ||
2556 | .da_end = 0xfffff000, | ||
2557 | .nr_tlb_entries = 32, | ||
2558 | }; | ||
2559 | |||
2560 | static struct omap_hwmod omap44xx_mmu_dsp_hwmod; | ||
2561 | static struct omap_hwmod_irq_info omap44xx_mmu_dsp_irqs[] = { | ||
2562 | { .irq = 28 + OMAP44XX_IRQ_GIC_START }, | ||
2563 | { .irq = -1 } | ||
2564 | }; | ||
2565 | |||
2566 | static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = { | ||
2567 | { .name = "mmu_cache", .rst_shift = 1 }, | ||
2568 | }; | ||
2569 | |||
2570 | static struct omap_hwmod_addr_space omap44xx_mmu_dsp_addrs[] = { | ||
2571 | { | ||
2572 | .pa_start = 0x4a066000, | ||
2573 | .pa_end = 0x4a0660ff, | ||
2574 | .flags = ADDR_TYPE_RT, | ||
2575 | }, | ||
2576 | { } | ||
2577 | }; | ||
2578 | |||
2579 | /* l4_cfg -> dsp */ | ||
2580 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mmu_dsp = { | ||
2581 | .master = &omap44xx_l4_cfg_hwmod, | ||
2582 | .slave = &omap44xx_mmu_dsp_hwmod, | ||
2583 | .clk = "l4_div_ck", | ||
2584 | .addr = omap44xx_mmu_dsp_addrs, | ||
2585 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2586 | }; | ||
2587 | |||
2588 | static struct omap_hwmod omap44xx_mmu_dsp_hwmod = { | ||
2589 | .name = "mmu_dsp", | ||
2590 | .class = &omap44xx_mmu_hwmod_class, | ||
2591 | .clkdm_name = "tesla_clkdm", | ||
2592 | .mpu_irqs = omap44xx_mmu_dsp_irqs, | ||
2593 | .rst_lines = omap44xx_mmu_dsp_resets, | ||
2594 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_dsp_resets), | ||
2595 | .main_clk = "dpll_iva_m4x2_ck", | ||
2596 | .prcm = { | ||
2597 | .omap4 = { | ||
2598 | .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET, | ||
2599 | .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET, | ||
2600 | .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET, | ||
2601 | .modulemode = MODULEMODE_HWCTRL, | ||
2602 | }, | ||
2603 | }, | ||
2604 | .dev_attr = &mmu_dsp_dev_attr, | ||
2605 | }; | ||
2606 | |||
2607 | /* | ||
2441 | * 'mpu' class | 2608 | * 'mpu' class |
2442 | * mpu sub-system | 2609 | * mpu sub-system |
2443 | */ | 2610 | */ |
@@ -2448,6 +2615,8 @@ static struct omap_hwmod_class omap44xx_mpu_hwmod_class = { | |||
2448 | 2615 | ||
2449 | /* mpu */ | 2616 | /* mpu */ |
2450 | static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { | 2617 | static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { |
2618 | { .name = "pmu0", .irq = 54 + OMAP44XX_IRQ_GIC_START }, | ||
2619 | { .name = "pmu1", .irq = 55 + OMAP44XX_IRQ_GIC_START }, | ||
2451 | { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, | 2620 | { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, |
2452 | { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, | 2621 | { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, |
2453 | { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, | 2622 | { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, |
@@ -2497,19 +2666,27 @@ static struct omap_hwmod omap44xx_ocmc_ram_hwmod = { | |||
2497 | * protocol | 2666 | * protocol |
2498 | */ | 2667 | */ |
2499 | 2668 | ||
2669 | static struct omap_hwmod_class_sysconfig omap44xx_ocp2scp_sysc = { | ||
2670 | .rev_offs = 0x0000, | ||
2671 | .sysc_offs = 0x0010, | ||
2672 | .syss_offs = 0x0014, | ||
2673 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | | ||
2674 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
2675 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2676 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2677 | }; | ||
2678 | |||
2500 | static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { | 2679 | static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { |
2501 | .name = "ocp2scp", | 2680 | .name = "ocp2scp", |
2681 | .sysc = &omap44xx_ocp2scp_sysc, | ||
2502 | }; | 2682 | }; |
2503 | 2683 | ||
2504 | /* ocp2scp_usb_phy */ | 2684 | /* ocp2scp_usb_phy */ |
2505 | static struct omap_hwmod_opt_clk ocp2scp_usb_phy_opt_clks[] = { | ||
2506 | { .role = "phy_48m", .clk = "ocp2scp_usb_phy_phy_48m" }, | ||
2507 | }; | ||
2508 | |||
2509 | static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { | 2685 | static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { |
2510 | .name = "ocp2scp_usb_phy", | 2686 | .name = "ocp2scp_usb_phy", |
2511 | .class = &omap44xx_ocp2scp_hwmod_class, | 2687 | .class = &omap44xx_ocp2scp_hwmod_class, |
2512 | .clkdm_name = "l3_init_clkdm", | 2688 | .clkdm_name = "l3_init_clkdm", |
2689 | .main_clk = "ocp2scp_usb_phy_phy_48m", | ||
2513 | .prcm = { | 2690 | .prcm = { |
2514 | .omap4 = { | 2691 | .omap4 = { |
2515 | .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET, | 2692 | .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET, |
@@ -2517,8 +2694,6 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { | |||
2517 | .modulemode = MODULEMODE_HWCTRL, | 2694 | .modulemode = MODULEMODE_HWCTRL, |
2518 | }, | 2695 | }, |
2519 | }, | 2696 | }, |
2520 | .opt_clks = ocp2scp_usb_phy_opt_clks, | ||
2521 | .opt_clks_cnt = ARRAY_SIZE(ocp2scp_usb_phy_opt_clks), | ||
2522 | }; | 2697 | }; |
2523 | 2698 | ||
2524 | /* | 2699 | /* |
@@ -2536,18 +2711,36 @@ static struct omap_hwmod omap44xx_prcm_mpu_hwmod = { | |||
2536 | .name = "prcm_mpu", | 2711 | .name = "prcm_mpu", |
2537 | .class = &omap44xx_prcm_hwmod_class, | 2712 | .class = &omap44xx_prcm_hwmod_class, |
2538 | .clkdm_name = "l4_wkup_clkdm", | 2713 | .clkdm_name = "l4_wkup_clkdm", |
2714 | .flags = HWMOD_NO_IDLEST, | ||
2715 | .prcm = { | ||
2716 | .omap4 = { | ||
2717 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2718 | }, | ||
2719 | }, | ||
2539 | }; | 2720 | }; |
2540 | 2721 | ||
2541 | /* cm_core_aon */ | 2722 | /* cm_core_aon */ |
2542 | static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { | 2723 | static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { |
2543 | .name = "cm_core_aon", | 2724 | .name = "cm_core_aon", |
2544 | .class = &omap44xx_prcm_hwmod_class, | 2725 | .class = &omap44xx_prcm_hwmod_class, |
2726 | .flags = HWMOD_NO_IDLEST, | ||
2727 | .prcm = { | ||
2728 | .omap4 = { | ||
2729 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2730 | }, | ||
2731 | }, | ||
2545 | }; | 2732 | }; |
2546 | 2733 | ||
2547 | /* cm_core */ | 2734 | /* cm_core */ |
2548 | static struct omap_hwmod omap44xx_cm_core_hwmod = { | 2735 | static struct omap_hwmod omap44xx_cm_core_hwmod = { |
2549 | .name = "cm_core", | 2736 | .name = "cm_core", |
2550 | .class = &omap44xx_prcm_hwmod_class, | 2737 | .class = &omap44xx_prcm_hwmod_class, |
2738 | .flags = HWMOD_NO_IDLEST, | ||
2739 | .prcm = { | ||
2740 | .omap4 = { | ||
2741 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2742 | }, | ||
2743 | }, | ||
2551 | }; | 2744 | }; |
2552 | 2745 | ||
2553 | /* prm */ | 2746 | /* prm */ |
@@ -2583,6 +2776,11 @@ static struct omap_hwmod omap44xx_scrm_hwmod = { | |||
2583 | .name = "scrm", | 2776 | .name = "scrm", |
2584 | .class = &omap44xx_scrm_hwmod_class, | 2777 | .class = &omap44xx_scrm_hwmod_class, |
2585 | .clkdm_name = "l4_wkup_clkdm", | 2778 | .clkdm_name = "l4_wkup_clkdm", |
2779 | .prcm = { | ||
2780 | .omap4 = { | ||
2781 | .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, | ||
2782 | }, | ||
2783 | }, | ||
2586 | }; | 2784 | }; |
2587 | 2785 | ||
2588 | /* | 2786 | /* |
@@ -2901,6 +3099,16 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | |||
2901 | .timer_capability = OMAP_TIMER_HAS_PWM, | 3099 | .timer_capability = OMAP_TIMER_HAS_PWM, |
2902 | }; | 3100 | }; |
2903 | 3101 | ||
3102 | /* timers with DSP interrupt dev attribute */ | ||
3103 | static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = { | ||
3104 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ, | ||
3105 | }; | ||
3106 | |||
3107 | /* pwm timers with DSP interrupt dev attribute */ | ||
3108 | static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = { | ||
3109 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM, | ||
3110 | }; | ||
3111 | |||
2904 | /* timer1 */ | 3112 | /* timer1 */ |
2905 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { | 3113 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { |
2906 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, | 3114 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, |
@@ -3005,6 +3213,7 @@ static struct omap_hwmod omap44xx_timer5_hwmod = { | |||
3005 | .modulemode = MODULEMODE_SWCTRL, | 3213 | .modulemode = MODULEMODE_SWCTRL, |
3006 | }, | 3214 | }, |
3007 | }, | 3215 | }, |
3216 | .dev_attr = &capability_dsp_dev_attr, | ||
3008 | }; | 3217 | }; |
3009 | 3218 | ||
3010 | /* timer6 */ | 3219 | /* timer6 */ |
@@ -3027,6 +3236,7 @@ static struct omap_hwmod omap44xx_timer6_hwmod = { | |||
3027 | .modulemode = MODULEMODE_SWCTRL, | 3236 | .modulemode = MODULEMODE_SWCTRL, |
3028 | }, | 3237 | }, |
3029 | }, | 3238 | }, |
3239 | .dev_attr = &capability_dsp_dev_attr, | ||
3030 | }; | 3240 | }; |
3031 | 3241 | ||
3032 | /* timer7 */ | 3242 | /* timer7 */ |
@@ -3048,6 +3258,7 @@ static struct omap_hwmod omap44xx_timer7_hwmod = { | |||
3048 | .modulemode = MODULEMODE_SWCTRL, | 3258 | .modulemode = MODULEMODE_SWCTRL, |
3049 | }, | 3259 | }, |
3050 | }, | 3260 | }, |
3261 | .dev_attr = &capability_dsp_dev_attr, | ||
3051 | }; | 3262 | }; |
3052 | 3263 | ||
3053 | /* timer8 */ | 3264 | /* timer8 */ |
@@ -3069,7 +3280,7 @@ static struct omap_hwmod omap44xx_timer8_hwmod = { | |||
3069 | .modulemode = MODULEMODE_SWCTRL, | 3280 | .modulemode = MODULEMODE_SWCTRL, |
3070 | }, | 3281 | }, |
3071 | }, | 3282 | }, |
3072 | .dev_attr = &capability_pwm_dev_attr, | 3283 | .dev_attr = &capability_dsp_pwm_dev_attr, |
3073 | }; | 3284 | }; |
3074 | 3285 | ||
3075 | /* timer9 */ | 3286 | /* timer9 */ |
@@ -5262,11 +5473,21 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = { | |||
5262 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 5473 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
5263 | }; | 5474 | }; |
5264 | 5475 | ||
5476 | static struct omap_hwmod_addr_space omap44xx_ocp2scp_usb_phy_addrs[] = { | ||
5477 | { | ||
5478 | .pa_start = 0x4a0ad000, | ||
5479 | .pa_end = 0x4a0ad01f, | ||
5480 | .flags = ADDR_TYPE_RT | ||
5481 | }, | ||
5482 | { } | ||
5483 | }; | ||
5484 | |||
5265 | /* l4_cfg -> ocp2scp_usb_phy */ | 5485 | /* l4_cfg -> ocp2scp_usb_phy */ |
5266 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = { | 5486 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = { |
5267 | .master = &omap44xx_l4_cfg_hwmod, | 5487 | .master = &omap44xx_l4_cfg_hwmod, |
5268 | .slave = &omap44xx_ocp2scp_usb_phy_hwmod, | 5488 | .slave = &omap44xx_ocp2scp_usb_phy_hwmod, |
5269 | .clk = "l4_div_ck", | 5489 | .clk = "l4_div_ck", |
5490 | .addr = omap44xx_ocp2scp_usb_phy_addrs, | ||
5270 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 5491 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
5271 | }; | 5492 | }; |
5272 | 5493 | ||
@@ -5886,7 +6107,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = { | |||
5886 | static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { | 6107 | static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { |
5887 | { | 6108 | { |
5888 | .pa_start = 0x4a0ab000, | 6109 | .pa_start = 0x4a0ab000, |
5889 | .pa_end = 0x4a0ab003, | 6110 | .pa_end = 0x4a0ab7ff, |
5890 | .flags = ADDR_TYPE_RT | 6111 | .flags = ADDR_TYPE_RT |
5891 | }, | 6112 | }, |
5892 | { | 6113 | { |
@@ -6097,6 +6318,8 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { | |||
6097 | &omap44xx_l4_per__mmc3, | 6318 | &omap44xx_l4_per__mmc3, |
6098 | &omap44xx_l4_per__mmc4, | 6319 | &omap44xx_l4_per__mmc4, |
6099 | &omap44xx_l4_per__mmc5, | 6320 | &omap44xx_l4_per__mmc5, |
6321 | &omap44xx_l3_main_2__mmu_ipu, | ||
6322 | &omap44xx_l4_cfg__mmu_dsp, | ||
6100 | &omap44xx_l3_main_2__ocmc_ram, | 6323 | &omap44xx_l3_main_2__ocmc_ram, |
6101 | &omap44xx_l4_cfg__ocp2scp_usb_phy, | 6324 | &omap44xx_l4_cfg__ocp2scp_usb_phy, |
6102 | &omap44xx_mpu_private__prcm_mpu, | 6325 | &omap44xx_mpu_private__prcm_mpu, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h index dddb677fed68..2bc8f1705d4a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h | |||
@@ -2,9 +2,8 @@ | |||
2 | * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations | 2 | * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations |
3 | * | 3 | * |
4 | * Copyright (C) 2010-2011 Nokia Corporation | 4 | * Copyright (C) 2010-2011 Nokia Corporation |
5 | * Copyright (C) 2010-2012 Texas Instruments, Inc. | ||
5 | * Paul Walmsley | 6 | * Paul Walmsley |
6 | * | ||
7 | * Copyright (C) 2010-2011 Texas Instruments, Inc. | ||
8 | * Benoît Cousson | 7 | * Benoît Cousson |
9 | * | 8 | * |
10 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
@@ -77,6 +76,8 @@ extern struct omap_hwmod omap2xxx_gpio4_hwmod; | |||
77 | extern struct omap_hwmod omap2xxx_mcspi1_hwmod; | 76 | extern struct omap_hwmod omap2xxx_mcspi1_hwmod; |
78 | extern struct omap_hwmod omap2xxx_mcspi2_hwmod; | 77 | extern struct omap_hwmod omap2xxx_mcspi2_hwmod; |
79 | extern struct omap_hwmod omap2xxx_counter_32k_hwmod; | 78 | extern struct omap_hwmod omap2xxx_counter_32k_hwmod; |
79 | extern struct omap_hwmod omap2xxx_gpmc_hwmod; | ||
80 | extern struct omap_hwmod omap2xxx_rng_hwmod; | ||
80 | 81 | ||
81 | /* Common interface data across OMAP2xxx */ | 82 | /* Common interface data across OMAP2xxx */ |
82 | extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; | 83 | extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; |
@@ -103,6 +104,7 @@ extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss; | |||
103 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc; | 104 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc; |
104 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi; | 105 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi; |
105 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc; | 106 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc; |
107 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__rng; | ||
106 | 108 | ||
107 | /* Common IP block data */ | 109 | /* Common IP block data */ |
108 | extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; | 110 | extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 939bd6f70b51..abefbc4d8e0b 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -80,7 +80,8 @@ static void __init omap2_init_processor_devices(void) | |||
80 | 80 | ||
81 | int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused) | 81 | int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused) |
82 | { | 82 | { |
83 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) | 83 | if ((clkdm->flags & CLKDM_CAN_ENABLE_AUTO) && |
84 | !(clkdm->flags & CLKDM_MISSING_IDLE_REPORTING)) | ||
84 | clkdm_allow_idle(clkdm); | 85 | clkdm_allow_idle(clkdm); |
85 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && | 86 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && |
86 | atomic_read(&clkdm->usecount) == 0) | 87 | atomic_read(&clkdm->usecount) == 0) |
@@ -188,7 +189,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
188 | goto exit; | 189 | goto exit; |
189 | } | 190 | } |
190 | 191 | ||
191 | freq = clk->rate; | 192 | freq = clk_get_rate(clk); |
192 | clk_put(clk); | 193 | clk_put(clk); |
193 | 194 | ||
194 | rcu_read_lock(); | 195 | rcu_read_lock(); |
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c new file mode 100644 index 000000000000..2a791766283d --- /dev/null +++ b/arch/arm/mach-omap2/pmu.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * OMAP2 ARM Performance Monitoring Unit (PMU) Support | ||
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Contacts: | ||
7 | * Jon Hunter <jon-hunter@ti.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 as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | #include <linux/pm_runtime.h> | ||
15 | |||
16 | #include <asm/pmu.h> | ||
17 | |||
18 | #include <plat/omap_hwmod.h> | ||
19 | #include <plat/omap_device.h> | ||
20 | |||
21 | static char *omap2_pmu_oh_names[] = {"mpu"}; | ||
22 | static char *omap3_pmu_oh_names[] = {"mpu", "debugss"}; | ||
23 | static char *omap4430_pmu_oh_names[] = {"l3_main_3", "l3_instr", "debugss"}; | ||
24 | static struct platform_device *omap_pmu_dev; | ||
25 | |||
26 | /** | ||
27 | * omap2_init_pmu - creates and registers PMU platform device | ||
28 | * @oh_num: Number of OMAP HWMODs required to create PMU device | ||
29 | * @oh_names: Array of OMAP HWMODS names required to create PMU device | ||
30 | * | ||
31 | * Uses OMAP HWMOD framework to create and register an ARM PMU device | ||
32 | * from a list of HWMOD names passed. Currently supports OMAP2, OMAP3 | ||
33 | * and OMAP4 devices. | ||
34 | */ | ||
35 | static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) | ||
36 | { | ||
37 | int i; | ||
38 | struct omap_hwmod *oh[3]; | ||
39 | char *dev_name = "arm-pmu"; | ||
40 | |||
41 | if ((!oh_num) || (oh_num > 3)) | ||
42 | return -EINVAL; | ||
43 | |||
44 | for (i = 0; i < oh_num; i++) { | ||
45 | oh[i] = omap_hwmod_lookup(oh_names[i]); | ||
46 | if (!oh[i]) { | ||
47 | pr_err("Could not look up %s hwmod\n", oh_names[i]); | ||
48 | return -ENODEV; | ||
49 | } | ||
50 | } | ||
51 | |||
52 | omap_pmu_dev = omap_device_build_ss(dev_name, -1, oh, oh_num, NULL, 0, | ||
53 | NULL, 0, 0); | ||
54 | WARN(IS_ERR(omap_pmu_dev), "Can't build omap_device for %s.\n", | ||
55 | dev_name); | ||
56 | |||
57 | if (IS_ERR(omap_pmu_dev)) | ||
58 | return PTR_ERR(omap_pmu_dev); | ||
59 | |||
60 | pm_runtime_enable(&omap_pmu_dev->dev); | ||
61 | |||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | static int __init omap_init_pmu(void) | ||
66 | { | ||
67 | unsigned oh_num; | ||
68 | char **oh_names; | ||
69 | |||
70 | /* | ||
71 | * To create an ARM-PMU device the following HWMODs | ||
72 | * are required for the various OMAP2+ devices. | ||
73 | * | ||
74 | * OMAP24xx: mpu | ||
75 | * OMAP3xxx: mpu, debugss | ||
76 | * OMAP4430: l3_main_3, l3_instr, debugss | ||
77 | * OMAP4460/70: mpu, debugss | ||
78 | */ | ||
79 | if (cpu_is_omap443x()) { | ||
80 | oh_num = ARRAY_SIZE(omap4430_pmu_oh_names); | ||
81 | oh_names = omap4430_pmu_oh_names; | ||
82 | /* XXX Remove the next two lines when CTI driver available */ | ||
83 | pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n"); | ||
84 | return 0; | ||
85 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { | ||
86 | oh_num = ARRAY_SIZE(omap3_pmu_oh_names); | ||
87 | oh_names = omap3_pmu_oh_names; | ||
88 | } else { | ||
89 | oh_num = ARRAY_SIZE(omap2_pmu_oh_names); | ||
90 | oh_names = omap2_pmu_oh_names; | ||
91 | } | ||
92 | |||
93 | return omap2_init_pmu(oh_num, oh_names); | ||
94 | } | ||
95 | subsys_initcall(omap_init_pmu); | ||
diff --git a/arch/arm/mach-omap2/powerdomain44xx.c b/arch/arm/mach-omap2/powerdomain44xx.c index aeac6f35ca10..aceb4f464c9b 100644 --- a/arch/arm/mach-omap2/powerdomain44xx.c +++ b/arch/arm/mach-omap2/powerdomain44xx.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP4 powerdomain control | 2 | * OMAP4 powerdomain control |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2010, 2012 Texas Instruments, Inc. |
5 | * Copyright (C) 2007-2009 Nokia Corporation | 5 | * Copyright (C) 2007-2009 Nokia Corporation |
6 | * | 6 | * |
7 | * Derived from mach-omap2/powerdomain.c written by Paul Walmsley | 7 | * Derived from mach-omap2/powerdomain.c written by Paul Walmsley |
@@ -151,6 +151,34 @@ static int omap4_pwrdm_read_logic_retst(struct powerdomain *pwrdm) | |||
151 | return v; | 151 | return v; |
152 | } | 152 | } |
153 | 153 | ||
154 | /** | ||
155 | * omap4_pwrdm_read_prev_logic_pwrst - read the previous logic powerstate | ||
156 | * @pwrdm: struct powerdomain * to read the state for | ||
157 | * | ||
158 | * Reads the previous logic powerstate for a powerdomain. This | ||
159 | * function must determine the previous logic powerstate by first | ||
160 | * checking the previous powerstate for the domain. If that was OFF, | ||
161 | * then logic has been lost. If previous state was RETENTION, the | ||
162 | * function reads the setting for the next retention logic state to | ||
163 | * see the actual value. In every other case, the logic is | ||
164 | * retained. Returns either PWRDM_POWER_OFF or PWRDM_POWER_RET | ||
165 | * depending whether the logic was retained or not. | ||
166 | */ | ||
167 | static int omap4_pwrdm_read_prev_logic_pwrst(struct powerdomain *pwrdm) | ||
168 | { | ||
169 | int state; | ||
170 | |||
171 | state = omap4_pwrdm_read_prev_pwrst(pwrdm); | ||
172 | |||
173 | if (state == PWRDM_POWER_OFF) | ||
174 | return PWRDM_POWER_OFF; | ||
175 | |||
176 | if (state != PWRDM_POWER_RET) | ||
177 | return PWRDM_POWER_RET; | ||
178 | |||
179 | return omap4_pwrdm_read_logic_retst(pwrdm); | ||
180 | } | ||
181 | |||
154 | static int omap4_pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank) | 182 | static int omap4_pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank) |
155 | { | 183 | { |
156 | u32 m, v; | 184 | u32 m, v; |
@@ -179,6 +207,35 @@ static int omap4_pwrdm_read_mem_retst(struct powerdomain *pwrdm, u8 bank) | |||
179 | return v; | 207 | return v; |
180 | } | 208 | } |
181 | 209 | ||
210 | /** | ||
211 | * omap4_pwrdm_read_prev_mem_pwrst - reads the previous memory powerstate | ||
212 | * @pwrdm: struct powerdomain * to read mem powerstate for | ||
213 | * @bank: memory bank index | ||
214 | * | ||
215 | * Reads the previous memory powerstate for a powerdomain. This | ||
216 | * function must determine the previous memory powerstate by first | ||
217 | * checking the previous powerstate for the domain. If that was OFF, | ||
218 | * then logic has been lost. If previous state was RETENTION, the | ||
219 | * function reads the setting for the next memory retention state to | ||
220 | * see the actual value. In every other case, the logic is | ||
221 | * retained. Returns either PWRDM_POWER_OFF or PWRDM_POWER_RET | ||
222 | * depending whether logic was retained or not. | ||
223 | */ | ||
224 | static int omap4_pwrdm_read_prev_mem_pwrst(struct powerdomain *pwrdm, u8 bank) | ||
225 | { | ||
226 | int state; | ||
227 | |||
228 | state = omap4_pwrdm_read_prev_pwrst(pwrdm); | ||
229 | |||
230 | if (state == PWRDM_POWER_OFF) | ||
231 | return PWRDM_POWER_OFF; | ||
232 | |||
233 | if (state != PWRDM_POWER_RET) | ||
234 | return PWRDM_POWER_RET; | ||
235 | |||
236 | return omap4_pwrdm_read_mem_retst(pwrdm, bank); | ||
237 | } | ||
238 | |||
182 | static int omap4_pwrdm_wait_transition(struct powerdomain *pwrdm) | 239 | static int omap4_pwrdm_wait_transition(struct powerdomain *pwrdm) |
183 | { | 240 | { |
184 | u32 c = 0; | 241 | u32 c = 0; |
@@ -217,9 +274,11 @@ struct pwrdm_ops omap4_pwrdm_operations = { | |||
217 | .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst, | 274 | .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst, |
218 | .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst, | 275 | .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst, |
219 | .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst, | 276 | .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst, |
277 | .pwrdm_read_prev_logic_pwrst = omap4_pwrdm_read_prev_logic_pwrst, | ||
220 | .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst, | 278 | .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst, |
221 | .pwrdm_read_mem_pwrst = omap4_pwrdm_read_mem_pwrst, | 279 | .pwrdm_read_mem_pwrst = omap4_pwrdm_read_mem_pwrst, |
222 | .pwrdm_read_mem_retst = omap4_pwrdm_read_mem_retst, | 280 | .pwrdm_read_mem_retst = omap4_pwrdm_read_mem_retst, |
281 | .pwrdm_read_prev_mem_pwrst = omap4_pwrdm_read_prev_mem_pwrst, | ||
223 | .pwrdm_set_mem_onst = omap4_pwrdm_set_mem_onst, | 282 | .pwrdm_set_mem_onst = omap4_pwrdm_set_mem_onst, |
224 | .pwrdm_set_mem_retst = omap4_pwrdm_set_mem_retst, | 283 | .pwrdm_set_mem_retst = omap4_pwrdm_set_mem_retst, |
225 | .pwrdm_wait_transition = omap4_pwrdm_wait_transition, | 284 | .pwrdm_wait_transition = omap4_pwrdm_wait_transition, |
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index e5f0503a68b0..72df97482cc0 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h | |||
@@ -109,6 +109,8 @@ | |||
109 | #define OMAP2430_EN_MDM_INTC_MASK (1 << 11) | 109 | #define OMAP2430_EN_MDM_INTC_MASK (1 << 11) |
110 | #define OMAP2430_EN_USBHS_SHIFT 6 | 110 | #define OMAP2430_EN_USBHS_SHIFT 6 |
111 | #define OMAP2430_EN_USBHS_MASK (1 << 6) | 111 | #define OMAP2430_EN_USBHS_MASK (1 << 6) |
112 | #define OMAP24XX_EN_GPMC_SHIFT 1 | ||
113 | #define OMAP24XX_EN_GPMC_MASK (1 << 1) | ||
112 | 114 | ||
113 | /* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */ | 115 | /* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */ |
114 | #define OMAP2420_ST_MMC_SHIFT 26 | 116 | #define OMAP2420_ST_MMC_SHIFT 26 |
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index eaac83d1df6f..b5efc0fd31cb 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -113,7 +113,8 @@ void __init orion5x_setup_cpu_mbus_bridge(void) | |||
113 | /* | 113 | /* |
114 | * Setup MBUS dram target info. | 114 | * Setup MBUS dram target info. |
115 | */ | 115 | */ |
116 | orion_setup_cpu_mbus_target(&addr_map_cfg, ORION5X_DDR_WINDOW_CPU_BASE); | 116 | orion_setup_cpu_mbus_target(&addr_map_cfg, |
117 | (void __iomem *) ORION5X_DDR_WINDOW_CPU_BASE); | ||
117 | } | 118 | } |
118 | 119 | ||
119 | void __init orion5x_setup_dev_boot_win(u32 base, u32 size) | 120 | void __init orion5x_setup_dev_boot_win(u32 base, u32 size) |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 073c7d799068..b3eb3da01160 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -42,12 +42,12 @@ | |||
42 | ****************************************************************************/ | 42 | ****************************************************************************/ |
43 | static struct map_desc orion5x_io_desc[] __initdata = { | 43 | static struct map_desc orion5x_io_desc[] __initdata = { |
44 | { | 44 | { |
45 | .virtual = ORION5X_REGS_VIRT_BASE, | 45 | .virtual = (unsigned long) ORION5X_REGS_VIRT_BASE, |
46 | .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE), | 46 | .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE), |
47 | .length = ORION5X_REGS_SIZE, | 47 | .length = ORION5X_REGS_SIZE, |
48 | .type = MT_DEVICE, | 48 | .type = MT_DEVICE, |
49 | }, { | 49 | }, { |
50 | .virtual = ORION5X_PCIE_WA_VIRT_BASE, | 50 | .virtual = (unsigned long) ORION5X_PCIE_WA_VIRT_BASE, |
51 | .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE), | 51 | .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE), |
52 | .length = ORION5X_PCIE_WA_SIZE, | 52 | .length = ORION5X_PCIE_WA_SIZE, |
53 | .type = MT_DEVICE, | 53 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 0e19db69f5c4..e533588880ff 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -701,7 +701,7 @@ static void __init dns323_init(void) | |||
701 | * Note: AFAIK, rev B1 needs the same treatement but I'll let | 701 | * Note: AFAIK, rev B1 needs the same treatement but I'll let |
702 | * somebody else test it. | 702 | * somebody else test it. |
703 | */ | 703 | */ |
704 | writel(0x5, ORION5X_SATA_VIRT_BASE | 0x2c); | 704 | writel(0x5, ORION5X_SATA_VIRT_BASE + 0x2c); |
705 | break; | 705 | break; |
706 | } | 706 | } |
707 | } | 707 | } |
diff --git a/arch/arm/mach-orion5x/include/mach/bridge-regs.h b/arch/arm/mach-orion5x/include/mach/bridge-regs.h index 11a3c1e9801f..461fd69a10ae 100644 --- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h +++ b/arch/arm/mach-orion5x/include/mach/bridge-regs.h | |||
@@ -13,27 +13,27 @@ | |||
13 | 13 | ||
14 | #include <mach/orion5x.h> | 14 | #include <mach/orion5x.h> |
15 | 15 | ||
16 | #define CPU_CONF (ORION5X_BRIDGE_VIRT_BASE | 0x100) | 16 | #define CPU_CONF (ORION5X_BRIDGE_VIRT_BASE + 0x100) |
17 | 17 | ||
18 | #define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE | 0x104) | 18 | #define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE + 0x104) |
19 | 19 | ||
20 | #define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x108) | 20 | #define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE + 0x108) |
21 | #define WDT_RESET_OUT_EN 0x0002 | 21 | #define WDT_RESET_OUT_EN 0x0002 |
22 | 22 | ||
23 | #define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE | 0x10c) | 23 | #define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE + 0x10c) |
24 | 24 | ||
25 | #define BRIDGE_CAUSE (ORION5X_BRIDGE_VIRT_BASE | 0x110) | 25 | #define BRIDGE_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x110) |
26 | 26 | ||
27 | #define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE | 0x11C) | 27 | #define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE + 0x11C) |
28 | 28 | ||
29 | #define WDT_INT_REQ 0x0008 | 29 | #define WDT_INT_REQ 0x0008 |
30 | 30 | ||
31 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 31 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
32 | 32 | ||
33 | #define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE | 0x200) | 33 | #define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x200) |
34 | 34 | ||
35 | #define MAIN_IRQ_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x204) | 35 | #define MAIN_IRQ_MASK (ORION5X_BRIDGE_VIRT_BASE + 0x204) |
36 | 36 | ||
37 | #define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE | 0x300) | 37 | #define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE + 0x300) |
38 | #define TIMER_PHYS_BASE (ORION5X_BRIDGE_PHYS_BASE | 0x300) | 38 | #define TIMER_PHYS_BASE (ORION5X_BRIDGE_PHYS_BASE + 0x300) |
39 | #endif | 39 | #endif |
diff --git a/arch/arm/mach-orion5x/include/mach/orion5x.h b/arch/arm/mach-orion5x/include/mach/orion5x.h index 1b60131b7f60..d265f5484a8e 100644 --- a/arch/arm/mach-orion5x/include/mach/orion5x.h +++ b/arch/arm/mach-orion5x/include/mach/orion5x.h | |||
@@ -37,7 +37,7 @@ | |||
37 | * fd000000 f0000000 16M PCIe WA space (Orion-1/Orion-NAS only) | 37 | * fd000000 f0000000 16M PCIe WA space (Orion-1/Orion-NAS only) |
38 | ****************************************************************************/ | 38 | ****************************************************************************/ |
39 | #define ORION5X_REGS_PHYS_BASE 0xf1000000 | 39 | #define ORION5X_REGS_PHYS_BASE 0xf1000000 |
40 | #define ORION5X_REGS_VIRT_BASE 0xfe000000 | 40 | #define ORION5X_REGS_VIRT_BASE IOMEM(0xfe000000) |
41 | #define ORION5X_REGS_SIZE SZ_1M | 41 | #define ORION5X_REGS_SIZE SZ_1M |
42 | 42 | ||
43 | #define ORION5X_PCIE_IO_PHYS_BASE 0xf2000000 | 43 | #define ORION5X_PCIE_IO_PHYS_BASE 0xf2000000 |
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | /* Relevant only for Orion-1/Orion-NAS */ | 54 | /* Relevant only for Orion-1/Orion-NAS */ |
55 | #define ORION5X_PCIE_WA_PHYS_BASE 0xf0000000 | 55 | #define ORION5X_PCIE_WA_PHYS_BASE 0xf0000000 |
56 | #define ORION5X_PCIE_WA_VIRT_BASE 0xfd000000 | 56 | #define ORION5X_PCIE_WA_VIRT_BASE IOMEM(0xfd000000) |
57 | #define ORION5X_PCIE_WA_SIZE SZ_16M | 57 | #define ORION5X_PCIE_WA_SIZE SZ_16M |
58 | 58 | ||
59 | #define ORION5X_PCIE_MEM_PHYS_BASE 0xe0000000 | 59 | #define ORION5X_PCIE_MEM_PHYS_BASE 0xe0000000 |
@@ -66,42 +66,42 @@ | |||
66 | * Orion Registers Map | 66 | * Orion Registers Map |
67 | ******************************************************************************/ | 67 | ******************************************************************************/ |
68 | 68 | ||
69 | #define ORION5X_DDR_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x00000) | 69 | #define ORION5X_DDR_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x00000) |
70 | #define ORION5X_DDR_WINDOW_CPU_BASE (ORION5X_DDR_VIRT_BASE | 0x1500) | 70 | #define ORION5X_DDR_WINDOW_CPU_BASE (ORION5X_DDR_VIRT_BASE + 0x1500) |
71 | #define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000) | 71 | #define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x10000) |
72 | #define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000) | 72 | #define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x10000) |
73 | #define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x)) | 73 | #define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE + (x)) |
74 | #define GPIO_VIRT_BASE ORION5X_DEV_BUS_REG(0x0100) | 74 | #define GPIO_VIRT_BASE ORION5X_DEV_BUS_REG(0x0100) |
75 | #define SPI_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x0600) | 75 | #define SPI_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE + 0x0600) |
76 | #define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000) | 76 | #define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE + 0x1000) |
77 | #define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000) | 77 | #define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE + 0x2000) |
78 | #define UART0_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2000) | 78 | #define UART0_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE + 0x2000) |
79 | #define UART1_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2100) | 79 | #define UART1_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE + 0x2100) |
80 | #define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2100) | 80 | #define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE + 0x2100) |
81 | 81 | ||
82 | #define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x20000) | 82 | #define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x20000) |
83 | #define ORION5X_BRIDGE_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x20000) | 83 | #define ORION5X_BRIDGE_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x20000) |
84 | 84 | ||
85 | #define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x30000) | 85 | #define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x30000) |
86 | 86 | ||
87 | #define ORION5X_PCIE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x40000) | 87 | #define ORION5X_PCIE_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x40000) |
88 | 88 | ||
89 | #define ORION5X_USB0_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x50000) | 89 | #define ORION5X_USB0_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x50000) |
90 | #define ORION5X_USB0_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x50000) | 90 | #define ORION5X_USB0_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x50000) |
91 | 91 | ||
92 | #define ORION5X_XOR_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x60900) | 92 | #define ORION5X_XOR_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x60900) |
93 | #define ORION5X_XOR_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x60900) | 93 | #define ORION5X_XOR_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x60900) |
94 | 94 | ||
95 | #define ORION5X_ETH_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x70000) | 95 | #define ORION5X_ETH_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x70000) |
96 | #define ORION5X_ETH_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x70000) | 96 | #define ORION5X_ETH_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x70000) |
97 | 97 | ||
98 | #define ORION5X_SATA_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x80000) | 98 | #define ORION5X_SATA_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x80000) |
99 | #define ORION5X_SATA_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x80000) | 99 | #define ORION5X_SATA_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x80000) |
100 | 100 | ||
101 | #define ORION5X_CRYPTO_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x90000) | 101 | #define ORION5X_CRYPTO_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x90000) |
102 | 102 | ||
103 | #define ORION5X_USB1_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0xa0000) | 103 | #define ORION5X_USB1_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0xa0000) |
104 | #define ORION5X_USB1_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0xa0000) | 104 | #define ORION5X_USB1_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0xa0000) |
105 | 105 | ||
106 | /******************************************************************************* | 106 | /******************************************************************************* |
107 | * Device Bus Registers | 107 | * Device Bus Registers |
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index e152641cdb0e..30a192b9c517 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/gpio.h> | 12 | #include <linux/gpio.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/io.h> | ||
15 | #include <mach/bridge-regs.h> | 16 | #include <mach/bridge-regs.h> |
16 | #include <plat/orion-gpio.h> | 17 | #include <plat/orion-gpio.h> |
17 | #include <plat/irq.h> | 18 | #include <plat/irq.h> |
@@ -25,11 +26,11 @@ static int __initdata gpio0_irqs[4] = { | |||
25 | 26 | ||
26 | void __init orion5x_init_irq(void) | 27 | void __init orion5x_init_irq(void) |
27 | { | 28 | { |
28 | orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK); | 29 | orion_irq_init(0, MAIN_IRQ_MASK); |
29 | 30 | ||
30 | /* | 31 | /* |
31 | * Initialize gpiolib for GPIOs 0-31. | 32 | * Initialize gpiolib for GPIOs 0-31. |
32 | */ | 33 | */ |
33 | orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_VIRT_BASE, 0, | 34 | orion_gpio_init(NULL, 0, 32, GPIO_VIRT_BASE, 0, |
34 | IRQ_ORION5X_GPIO_START, gpio0_irqs); | 35 | IRQ_ORION5X_GPIO_START, gpio0_irqs); |
35 | } | 36 | } |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 6921d49b988d..cd50e328db2a 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -38,7 +38,7 @@ | |||
38 | /***************************************************************************** | 38 | /***************************************************************************** |
39 | * PCIe controller | 39 | * PCIe controller |
40 | ****************************************************************************/ | 40 | ****************************************************************************/ |
41 | #define PCIE_BASE ((void __iomem *)ORION5X_PCIE_VIRT_BASE) | 41 | #define PCIE_BASE (ORION5X_PCIE_VIRT_BASE) |
42 | 42 | ||
43 | void __init orion5x_pcie_id(u32 *dev, u32 *rev) | 43 | void __init orion5x_pcie_id(u32 *dev, u32 *rev) |
44 | { | 44 | { |
@@ -111,7 +111,7 @@ static int pcie_rd_conf_wa(struct pci_bus *bus, u32 devfn, | |||
111 | return PCIBIOS_DEVICE_NOT_FOUND; | 111 | return PCIBIOS_DEVICE_NOT_FOUND; |
112 | } | 112 | } |
113 | 113 | ||
114 | ret = orion_pcie_rd_conf_wa((void __iomem *)ORION5X_PCIE_WA_VIRT_BASE, | 114 | ret = orion_pcie_rd_conf_wa(ORION5X_PCIE_WA_VIRT_BASE, |
115 | bus, devfn, where, size, val); | 115 | bus, devfn, where, size, val); |
116 | 116 | ||
117 | return ret; | 117 | return ret; |
@@ -188,7 +188,7 @@ static int __init pcie_setup(struct pci_sys_data *sys) | |||
188 | /***************************************************************************** | 188 | /***************************************************************************** |
189 | * PCI controller | 189 | * PCI controller |
190 | ****************************************************************************/ | 190 | ****************************************************************************/ |
191 | #define ORION5X_PCI_REG(x) (ORION5X_PCI_VIRT_BASE | (x)) | 191 | #define ORION5X_PCI_REG(x) (ORION5X_PCI_VIRT_BASE + (x)) |
192 | #define PCI_MODE ORION5X_PCI_REG(0xd00) | 192 | #define PCI_MODE ORION5X_PCI_REG(0xd00) |
193 | #define PCI_CMD ORION5X_PCI_REG(0xc00) | 193 | #define PCI_CMD ORION5X_PCI_REG(0xc00) |
194 | #define PCI_P2P_CONF ORION5X_PCI_REG(0x1d14) | 194 | #define PCI_P2P_CONF ORION5X_PCI_REG(0x1d14) |
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 706b7e29397f..9d7ac20ef8f9 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -312,33 +312,6 @@ void clk_enable_init_clocks(void) | |||
312 | } | 312 | } |
313 | } | 313 | } |
314 | 314 | ||
315 | /** | ||
316 | * omap_clk_get_by_name - locate OMAP struct clk by its name | ||
317 | * @name: name of the struct clk to locate | ||
318 | * | ||
319 | * Locate an OMAP struct clk by its name. Assumes that struct clk | ||
320 | * names are unique. Returns NULL if not found or a pointer to the | ||
321 | * struct clk if found. | ||
322 | */ | ||
323 | struct clk *omap_clk_get_by_name(const char *name) | ||
324 | { | ||
325 | struct clk *c; | ||
326 | struct clk *ret = NULL; | ||
327 | |||
328 | mutex_lock(&clocks_mutex); | ||
329 | |||
330 | list_for_each_entry(c, &clocks, node) { | ||
331 | if (!strcmp(c->name, name)) { | ||
332 | ret = c; | ||
333 | break; | ||
334 | } | ||
335 | } | ||
336 | |||
337 | mutex_unlock(&clocks_mutex); | ||
338 | |||
339 | return ret; | ||
340 | } | ||
341 | |||
342 | int omap_clk_enable_autoidle_all(void) | 315 | int omap_clk_enable_autoidle_all(void) |
343 | { | 316 | { |
344 | struct clk *c; | 317 | struct clk *c; |
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 656b9862279e..e2e2d045e428 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -19,6 +19,11 @@ struct module; | |||
19 | struct clk; | 19 | struct clk; |
20 | struct clockdomain; | 20 | struct clockdomain; |
21 | 21 | ||
22 | /* Temporary, needed during the common clock framework conversion */ | ||
23 | #define __clk_get_name(clk) (clk->name) | ||
24 | #define __clk_get_parent(clk) (clk->parent) | ||
25 | #define __clk_get_rate(clk) (clk->rate) | ||
26 | |||
22 | /** | 27 | /** |
23 | * struct clkops - some clock function pointers | 28 | * struct clkops - some clock function pointers |
24 | * @enable: fn ptr that enables the current clock in hardware | 29 | * @enable: fn ptr that enables the current clock in hardware |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index 19e7fa577bd0..85868e98c11c 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -60,6 +60,7 @@ | |||
60 | #define OMAP_TIMER_ALWON 0x40000000 | 60 | #define OMAP_TIMER_ALWON 0x40000000 |
61 | #define OMAP_TIMER_HAS_PWM 0x20000000 | 61 | #define OMAP_TIMER_HAS_PWM 0x20000000 |
62 | #define OMAP_TIMER_NEEDS_RESET 0x10000000 | 62 | #define OMAP_TIMER_NEEDS_RESET 0x10000000 |
63 | #define OMAP_TIMER_HAS_DSP_IRQ 0x08000000 | ||
63 | 64 | ||
64 | struct omap_timer_capability_dev_attr { | 65 | struct omap_timer_capability_dev_attr { |
65 | u32 timer_capability; | 66 | u32 timer_capability; |
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 88be3e628b33..68b5f0362f35 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h | |||
@@ -103,6 +103,19 @@ struct iommu_functions { | |||
103 | ssize_t (*dump_ctx)(struct omap_iommu *obj, char *buf, ssize_t len); | 103 | ssize_t (*dump_ctx)(struct omap_iommu *obj, char *buf, ssize_t len); |
104 | }; | 104 | }; |
105 | 105 | ||
106 | /** | ||
107 | * struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod | ||
108 | * @da_start: device address where the va space starts. | ||
109 | * @da_end: device address where the va space ends. | ||
110 | * @nr_tlb_entries: number of entries supported by the translation | ||
111 | * look-aside buffer (TLB). | ||
112 | */ | ||
113 | struct omap_mmu_dev_attr { | ||
114 | u32 da_start; | ||
115 | u32 da_end; | ||
116 | int nr_tlb_entries; | ||
117 | }; | ||
118 | |||
106 | struct iommu_platform_data { | 119 | struct iommu_platform_data { |
107 | const char *name; | 120 | const char *name; |
108 | const char *clk_name; | 121 | const char *clk_name; |
@@ -126,6 +139,7 @@ struct omap_iommu_arch_data { | |||
126 | struct omap_iommu *iommu_dev; | 139 | struct omap_iommu *iommu_dev; |
127 | }; | 140 | }; |
128 | 141 | ||
142 | #ifdef CONFIG_IOMMU_API | ||
129 | /** | 143 | /** |
130 | * dev_to_omap_iommu() - retrieves an omap iommu object from a user device | 144 | * dev_to_omap_iommu() - retrieves an omap iommu object from a user device |
131 | * @dev: iommu client device | 145 | * @dev: iommu client device |
@@ -136,6 +150,7 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) | |||
136 | 150 | ||
137 | return arch_data->iommu_dev; | 151 | return arch_data->iommu_dev; |
138 | } | 152 | } |
153 | #endif | ||
139 | 154 | ||
140 | /* IOMMU errors */ | 155 | /* IOMMU errors */ |
141 | #define OMAP_IOMMU_ERR_TLB_MISS (1 << 0) | 156 | #define OMAP_IOMMU_ERR_TLB_MISS (1 << 0) |
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index e7259c0d33ec..106f50665804 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h | |||
@@ -120,6 +120,10 @@ int omap_device_get_context_loss_count(struct platform_device *pdev); | |||
120 | 120 | ||
121 | /* Other */ | 121 | /* Other */ |
122 | 122 | ||
123 | int omap_device_assert_hardreset(struct platform_device *pdev, | ||
124 | const char *name); | ||
125 | int omap_device_deassert_hardreset(struct platform_device *pdev, | ||
126 | const char *name); | ||
123 | int omap_device_idle_hwmods(struct omap_device *od); | 127 | int omap_device_idle_hwmods(struct omap_device *od); |
124 | int omap_device_enable_hwmods(struct omap_device *od); | 128 | int omap_device_enable_hwmods(struct omap_device *od); |
125 | 129 | ||
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 05330735f23f..b3349f7b1a2c 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * omap_hwmod macros, structures | 2 | * omap_hwmod macros, structures |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Copyright (C) 2011 Texas Instruments, Inc. | 5 | * Copyright (C) 2012 Texas Instruments, Inc. |
6 | * Paul Walmsley | 6 | * Paul Walmsley |
7 | * | 7 | * |
8 | * Created in collaboration with (alphabetical order): Benoît Cousson, | 8 | * Created in collaboration with (alphabetical order): Benoît Cousson, |
@@ -384,21 +384,38 @@ struct omap_hwmod_omap2_prcm { | |||
384 | u8 idlest_stdby_bit; | 384 | u8 idlest_stdby_bit; |
385 | }; | 385 | }; |
386 | 386 | ||
387 | /* | ||
388 | * Possible values for struct omap_hwmod_omap4_prcm.flags | ||
389 | * | ||
390 | * HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM | ||
391 | * module-level context loss register associated with them; this | ||
392 | * flag bit should be set in those cases | ||
393 | */ | ||
394 | #define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0) | ||
387 | 395 | ||
388 | /** | 396 | /** |
389 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data | 397 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data |
390 | * @clkctrl_reg: PRCM address of the clock control register | 398 | * @clkctrl_reg: PRCM address of the clock control register |
391 | * @rstctrl_reg: address of the XXX_RSTCTRL register located in the PRM | 399 | * @rstctrl_reg: address of the XXX_RSTCTRL register located in the PRM |
400 | * @lostcontext_mask: bitmask for selecting bits from RM_*_CONTEXT register | ||
392 | * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM | 401 | * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM |
393 | * @submodule_wkdep_bit: bit shift of the WKDEP range | 402 | * @submodule_wkdep_bit: bit shift of the WKDEP range |
403 | * @flags: PRCM register capabilities for this IP block | ||
404 | * | ||
405 | * If @lostcontext_mask is not defined, context loss check code uses | ||
406 | * whole register without masking. @lostcontext_mask should only be | ||
407 | * defined in cases where @context_offs register is shared by two or | ||
408 | * more hwmods. | ||
394 | */ | 409 | */ |
395 | struct omap_hwmod_omap4_prcm { | 410 | struct omap_hwmod_omap4_prcm { |
396 | u16 clkctrl_offs; | 411 | u16 clkctrl_offs; |
397 | u16 rstctrl_offs; | 412 | u16 rstctrl_offs; |
398 | u16 rstst_offs; | 413 | u16 rstst_offs; |
399 | u16 context_offs; | 414 | u16 context_offs; |
415 | u32 lostcontext_mask; | ||
400 | u8 submodule_wkdep_bit; | 416 | u8 submodule_wkdep_bit; |
401 | u8 modulemode; | 417 | u8 modulemode; |
418 | u8 flags; | ||
402 | }; | 419 | }; |
403 | 420 | ||
404 | 421 | ||
@@ -591,9 +608,7 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | |||
591 | int __init omap_hwmod_setup_one(const char *name); | 608 | int __init omap_hwmod_setup_one(const char *name); |
592 | 609 | ||
593 | int omap_hwmod_enable(struct omap_hwmod *oh); | 610 | int omap_hwmod_enable(struct omap_hwmod *oh); |
594 | int _omap_hwmod_enable(struct omap_hwmod *oh); | ||
595 | int omap_hwmod_idle(struct omap_hwmod *oh); | 611 | int omap_hwmod_idle(struct omap_hwmod *oh); |
596 | int _omap_hwmod_idle(struct omap_hwmod *oh); | ||
597 | int omap_hwmod_shutdown(struct omap_hwmod *oh); | 612 | int omap_hwmod_shutdown(struct omap_hwmod *oh); |
598 | 613 | ||
599 | int omap_hwmod_assert_hardreset(struct omap_hwmod *oh, const char *name); | 614 | int omap_hwmod_assert_hardreset(struct omap_hwmod *oh, const char *name); |
@@ -627,11 +642,6 @@ int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh, | |||
627 | int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh, | 642 | int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh, |
628 | struct omap_hwmod *init_oh); | 643 | struct omap_hwmod *init_oh); |
629 | 644 | ||
630 | int omap_hwmod_set_clockact_both(struct omap_hwmod *oh); | ||
631 | int omap_hwmod_set_clockact_main(struct omap_hwmod *oh); | ||
632 | int omap_hwmod_set_clockact_iclk(struct omap_hwmod *oh); | ||
633 | int omap_hwmod_set_clockact_none(struct omap_hwmod *oh); | ||
634 | |||
635 | int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); | 645 | int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); |
636 | int omap_hwmod_disable_wakeup(struct omap_hwmod *oh); | 646 | int omap_hwmod_disable_wakeup(struct omap_hwmod *oh); |
637 | 647 | ||
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index d5f617c542d3..cee85a55bd82 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -261,10 +261,10 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias, | |||
261 | return; | 261 | return; |
262 | } | 262 | } |
263 | 263 | ||
264 | r = omap_clk_get_by_name(clk_name); | 264 | r = clk_get(NULL, clk_name); |
265 | if (IS_ERR(r)) { | 265 | if (IS_ERR(r)) { |
266 | dev_err(&od->pdev->dev, | 266 | dev_err(&od->pdev->dev, |
267 | "omap_clk_get_by_name for %s failed\n", clk_name); | 267 | "clk_get for %s failed\n", clk_name); |
268 | return; | 268 | return; |
269 | } | 269 | } |
270 | 270 | ||
@@ -983,6 +983,61 @@ int omap_device_shutdown(struct platform_device *pdev) | |||
983 | } | 983 | } |
984 | 984 | ||
985 | /** | 985 | /** |
986 | * omap_device_assert_hardreset - set a device's hardreset line | ||
987 | * @pdev: struct platform_device * to reset | ||
988 | * @name: const char * name of the reset line | ||
989 | * | ||
990 | * Set the hardreset line identified by @name on the IP blocks | ||
991 | * associated with the hwmods backing the platform_device @pdev. All | ||
992 | * of the hwmods associated with @pdev must have the same hardreset | ||
993 | * line linked to them for this to work. Passes along the return value | ||
994 | * of omap_hwmod_assert_hardreset() in the event of any failure, or | ||
995 | * returns 0 upon success. | ||
996 | */ | ||
997 | int omap_device_assert_hardreset(struct platform_device *pdev, const char *name) | ||
998 | { | ||
999 | struct omap_device *od = to_omap_device(pdev); | ||
1000 | int ret = 0; | ||
1001 | int i; | ||
1002 | |||
1003 | for (i = 0; i < od->hwmods_cnt; i++) { | ||
1004 | ret = omap_hwmod_assert_hardreset(od->hwmods[i], name); | ||
1005 | if (ret) | ||
1006 | break; | ||
1007 | } | ||
1008 | |||
1009 | return ret; | ||
1010 | } | ||
1011 | |||
1012 | /** | ||
1013 | * omap_device_deassert_hardreset - release a device's hardreset line | ||
1014 | * @pdev: struct platform_device * to reset | ||
1015 | * @name: const char * name of the reset line | ||
1016 | * | ||
1017 | * Release the hardreset line identified by @name on the IP blocks | ||
1018 | * associated with the hwmods backing the platform_device @pdev. All | ||
1019 | * of the hwmods associated with @pdev must have the same hardreset | ||
1020 | * line linked to them for this to work. Passes along the return | ||
1021 | * value of omap_hwmod_deassert_hardreset() in the event of any | ||
1022 | * failure, or returns 0 upon success. | ||
1023 | */ | ||
1024 | int omap_device_deassert_hardreset(struct platform_device *pdev, | ||
1025 | const char *name) | ||
1026 | { | ||
1027 | struct omap_device *od = to_omap_device(pdev); | ||
1028 | int ret = 0; | ||
1029 | int i; | ||
1030 | |||
1031 | for (i = 0; i < od->hwmods_cnt; i++) { | ||
1032 | ret = omap_hwmod_deassert_hardreset(od->hwmods[i], name); | ||
1033 | if (ret) | ||
1034 | break; | ||
1035 | } | ||
1036 | |||
1037 | return ret; | ||
1038 | } | ||
1039 | |||
1040 | /** | ||
986 | * omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim | 1041 | * omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim |
987 | * @od: struct omap_device * | 1042 | * @od: struct omap_device * |
988 | * | 1043 | * |
diff --git a/arch/arm/plat-orion/Makefile b/arch/arm/plat-orion/Makefile index c20ce0f5ce33..a82cecb84948 100644 --- a/arch/arm/plat-orion/Makefile +++ b/arch/arm/plat-orion/Makefile | |||
@@ -1,10 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include | ||
4 | 5 | ||
5 | obj-y := irq.o pcie.o time.o common.o mpp.o addr-map.o | 6 | obj-y += addr-map.o |
6 | obj-m := | ||
7 | obj-n := | ||
8 | obj- := | ||
9 | 7 | ||
10 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o | 8 | orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o |
9 | obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o | ||
10 | obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y) | ||
diff --git a/arch/arm/plat-orion/addr-map.c b/arch/arm/plat-orion/addr-map.c index 367ca89ac403..a7b8060c293a 100644 --- a/arch/arm/plat-orion/addr-map.c +++ b/arch/arm/plat-orion/addr-map.c | |||
@@ -48,7 +48,7 @@ EXPORT_SYMBOL_GPL(mv_mbus_dram_info); | |||
48 | static void __init __iomem * | 48 | static void __init __iomem * |
49 | orion_win_cfg_base(const struct orion_addr_map_cfg *cfg, int win) | 49 | orion_win_cfg_base(const struct orion_addr_map_cfg *cfg, int win) |
50 | { | 50 | { |
51 | return (void __iomem *)(cfg->bridge_virt_base + (win << 4)); | 51 | return cfg->bridge_virt_base + (win << 4); |
52 | } | 52 | } |
53 | 53 | ||
54 | /* | 54 | /* |
@@ -143,19 +143,16 @@ void __init orion_config_wins(struct orion_addr_map_cfg * cfg, | |||
143 | * Setup MBUS dram target info. | 143 | * Setup MBUS dram target info. |
144 | */ | 144 | */ |
145 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, | 145 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, |
146 | const u32 ddr_window_cpu_base) | 146 | const void __iomem *ddr_window_cpu_base) |
147 | { | 147 | { |
148 | void __iomem *addr; | ||
149 | int i; | 148 | int i; |
150 | int cs; | 149 | int cs; |
151 | 150 | ||
152 | orion_mbus_dram_info.mbus_dram_target_id = TARGET_DDR; | 151 | orion_mbus_dram_info.mbus_dram_target_id = TARGET_DDR; |
153 | 152 | ||
154 | addr = (void __iomem *)ddr_window_cpu_base; | ||
155 | |||
156 | for (i = 0, cs = 0; i < 4; i++) { | 153 | for (i = 0, cs = 0; i < 4; i++) { |
157 | u32 base = readl(addr + DDR_BASE_CS_OFF(i)); | 154 | u32 base = readl(ddr_window_cpu_base + DDR_BASE_CS_OFF(i)); |
158 | u32 size = readl(addr + DDR_SIZE_CS_OFF(i)); | 155 | u32 size = readl(ddr_window_cpu_base + DDR_SIZE_CS_OFF(i)); |
159 | 156 | ||
160 | /* | 157 | /* |
161 | * Chip select enabled? | 158 | * Chip select enabled? |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 87f53caef655..b8a688cad4c2 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -86,13 +86,13 @@ static void __init uart_complete( | |||
86 | struct platform_device *orion_uart, | 86 | struct platform_device *orion_uart, |
87 | struct plat_serial8250_port *data, | 87 | struct plat_serial8250_port *data, |
88 | struct resource *resources, | 88 | struct resource *resources, |
89 | unsigned int membase, | 89 | void __iomem *membase, |
90 | resource_size_t mapbase, | 90 | resource_size_t mapbase, |
91 | unsigned int irq, | 91 | unsigned int irq, |
92 | struct clk *clk) | 92 | struct clk *clk) |
93 | { | 93 | { |
94 | data->mapbase = mapbase; | 94 | data->mapbase = mapbase; |
95 | data->membase = (void __iomem *)membase; | 95 | data->membase = membase; |
96 | data->irq = irq; | 96 | data->irq = irq; |
97 | data->uartclk = uart_get_clk_rate(clk); | 97 | data->uartclk = uart_get_clk_rate(clk); |
98 | orion_uart->dev.platform_data = data; | 98 | orion_uart->dev.platform_data = data; |
@@ -120,7 +120,7 @@ static struct platform_device orion_uart0 = { | |||
120 | .id = PLAT8250_DEV_PLATFORM, | 120 | .id = PLAT8250_DEV_PLATFORM, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | void __init orion_uart0_init(unsigned int membase, | 123 | void __init orion_uart0_init(void __iomem *membase, |
124 | resource_size_t mapbase, | 124 | resource_size_t mapbase, |
125 | unsigned int irq, | 125 | unsigned int irq, |
126 | struct clk *clk) | 126 | struct clk *clk) |
@@ -148,7 +148,7 @@ static struct platform_device orion_uart1 = { | |||
148 | .id = PLAT8250_DEV_PLATFORM1, | 148 | .id = PLAT8250_DEV_PLATFORM1, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | void __init orion_uart1_init(unsigned int membase, | 151 | void __init orion_uart1_init(void __iomem *membase, |
152 | resource_size_t mapbase, | 152 | resource_size_t mapbase, |
153 | unsigned int irq, | 153 | unsigned int irq, |
154 | struct clk *clk) | 154 | struct clk *clk) |
@@ -176,7 +176,7 @@ static struct platform_device orion_uart2 = { | |||
176 | .id = PLAT8250_DEV_PLATFORM2, | 176 | .id = PLAT8250_DEV_PLATFORM2, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | void __init orion_uart2_init(unsigned int membase, | 179 | void __init orion_uart2_init(void __iomem *membase, |
180 | resource_size_t mapbase, | 180 | resource_size_t mapbase, |
181 | unsigned int irq, | 181 | unsigned int irq, |
182 | struct clk *clk) | 182 | struct clk *clk) |
@@ -204,7 +204,7 @@ static struct platform_device orion_uart3 = { | |||
204 | .id = 3, | 204 | .id = 3, |
205 | }; | 205 | }; |
206 | 206 | ||
207 | void __init orion_uart3_init(unsigned int membase, | 207 | void __init orion_uart3_init(void __iomem *membase, |
208 | resource_size_t mapbase, | 208 | resource_size_t mapbase, |
209 | unsigned int irq, | 209 | unsigned int irq, |
210 | struct clk *clk) | 210 | struct clk *clk) |
diff --git a/arch/arm/plat-orion/include/plat/addr-map.h b/arch/arm/plat-orion/include/plat/addr-map.h index fd556f77562c..ec63e4a627d0 100644 --- a/arch/arm/plat-orion/include/plat/addr-map.h +++ b/arch/arm/plat-orion/include/plat/addr-map.h | |||
@@ -16,7 +16,7 @@ extern struct mbus_dram_target_info orion_mbus_dram_info; | |||
16 | struct orion_addr_map_cfg { | 16 | struct orion_addr_map_cfg { |
17 | const int num_wins; /* Total number of windows */ | 17 | const int num_wins; /* Total number of windows */ |
18 | const int remappable_wins; | 18 | const int remappable_wins; |
19 | const u32 bridge_virt_base; | 19 | void __iomem *bridge_virt_base; |
20 | 20 | ||
21 | /* If NULL, the default cpu_win_can_remap will be used, using | 21 | /* If NULL, the default cpu_win_can_remap will be used, using |
22 | the value in remappable_wins */ | 22 | the value in remappable_wins */ |
@@ -49,5 +49,5 @@ void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg, | |||
49 | const u8 attr, const int remap); | 49 | const u8 attr, const int remap); |
50 | 50 | ||
51 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, | 51 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, |
52 | const u32 ddr_window_cpu_base); | 52 | const void __iomem *ddr_window_cpu_base); |
53 | #endif | 53 | #endif |
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index ae2377ef63e5..6bbc3fe5f58e 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -13,22 +13,22 @@ | |||
13 | 13 | ||
14 | struct dsa_platform_data; | 14 | struct dsa_platform_data; |
15 | 15 | ||
16 | void __init orion_uart0_init(unsigned int membase, | 16 | void __init orion_uart0_init(void __iomem *membase, |
17 | resource_size_t mapbase, | 17 | resource_size_t mapbase, |
18 | unsigned int irq, | 18 | unsigned int irq, |
19 | struct clk *clk); | 19 | struct clk *clk); |
20 | 20 | ||
21 | void __init orion_uart1_init(unsigned int membase, | 21 | void __init orion_uart1_init(void __iomem *membase, |
22 | resource_size_t mapbase, | 22 | resource_size_t mapbase, |
23 | unsigned int irq, | 23 | unsigned int irq, |
24 | struct clk *clk); | 24 | struct clk *clk); |
25 | 25 | ||
26 | void __init orion_uart2_init(unsigned int membase, | 26 | void __init orion_uart2_init(void __iomem *membase, |
27 | resource_size_t mapbase, | 27 | resource_size_t mapbase, |
28 | unsigned int irq, | 28 | unsigned int irq, |
29 | struct clk *clk); | 29 | struct clk *clk); |
30 | 30 | ||
31 | void __init orion_uart3_init(unsigned int membase, | 31 | void __init orion_uart3_init(void __iomem *membase, |
32 | resource_size_t mapbase, | 32 | resource_size_t mapbase, |
33 | unsigned int irq, | 33 | unsigned int irq, |
34 | struct clk *clk); | 34 | struct clk *clk); |
diff --git a/arch/arm/plat-orion/include/plat/mpp.h b/arch/arm/plat-orion/include/plat/mpp.h index 723adce99f41..254552fee889 100644 --- a/arch/arm/plat-orion/include/plat/mpp.h +++ b/arch/arm/plat-orion/include/plat/mpp.h | |||
@@ -29,6 +29,6 @@ | |||
29 | #define MPP_OUTPUT_MASK GENERIC_MPP(0, 0x0, 0, 1) | 29 | #define MPP_OUTPUT_MASK GENERIC_MPP(0, 0x0, 0, 1) |
30 | 30 | ||
31 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, | 31 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, |
32 | unsigned int mpp_max, unsigned int dev_bus); | 32 | unsigned int mpp_max, void __iomem *dev_bus); |
33 | 33 | ||
34 | #endif | 34 | #endif |
diff --git a/arch/arm/plat-orion/include/plat/time.h b/arch/arm/plat-orion/include/plat/time.h index 4d5f1f6e18df..07527e417c62 100644 --- a/arch/arm/plat-orion/include/plat/time.h +++ b/arch/arm/plat-orion/include/plat/time.h | |||
@@ -11,9 +11,9 @@ | |||
11 | #ifndef __PLAT_TIME_H | 11 | #ifndef __PLAT_TIME_H |
12 | #define __PLAT_TIME_H | 12 | #define __PLAT_TIME_H |
13 | 13 | ||
14 | void orion_time_set_base(u32 timer_base); | 14 | void orion_time_set_base(void __iomem *timer_base); |
15 | 15 | ||
16 | void orion_time_init(u32 bridge_base, u32 bridge_timer1_clr_mask, | 16 | void orion_time_init(void __iomem *bridge_base, u32 bridge_timer1_clr_mask, |
17 | unsigned int irq, unsigned int tclk); | 17 | unsigned int irq, unsigned int tclk); |
18 | 18 | ||
19 | 19 | ||
diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c index 7740bb31d662..e686fe76a96b 100644 --- a/arch/arm/plat-orion/mpp.c +++ b/arch/arm/plat-orion/mpp.c | |||
@@ -18,15 +18,15 @@ | |||
18 | #include <plat/mpp.h> | 18 | #include <plat/mpp.h> |
19 | 19 | ||
20 | /* Address of the ith MPP control register */ | 20 | /* Address of the ith MPP control register */ |
21 | static __init unsigned long mpp_ctrl_addr(unsigned int i, | 21 | static __init void __iomem *mpp_ctrl_addr(unsigned int i, |
22 | unsigned long dev_bus) | 22 | void __iomem *dev_bus) |
23 | { | 23 | { |
24 | return dev_bus + (i) * 4; | 24 | return dev_bus + (i) * 4; |
25 | } | 25 | } |
26 | 26 | ||
27 | 27 | ||
28 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, | 28 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, |
29 | unsigned int mpp_max, unsigned int dev_bus) | 29 | unsigned int mpp_max, void __iomem *dev_bus) |
30 | { | 30 | { |
31 | unsigned int mpp_nr_regs = (1 + mpp_max/8); | 31 | unsigned int mpp_nr_regs = (1 + mpp_max/8); |
32 | u32 mpp_ctrl[mpp_nr_regs]; | 32 | u32 mpp_ctrl[mpp_nr_regs]; |
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c index 1ed8d1397fcf..0f4fa863dd55 100644 --- a/arch/arm/plat-orion/time.c +++ b/arch/arm/plat-orion/time.c | |||
@@ -180,13 +180,13 @@ static struct irqaction orion_timer_irq = { | |||
180 | }; | 180 | }; |
181 | 181 | ||
182 | void __init | 182 | void __init |
183 | orion_time_set_base(u32 _timer_base) | 183 | orion_time_set_base(void __iomem *_timer_base) |
184 | { | 184 | { |
185 | timer_base = (void __iomem *)_timer_base; | 185 | timer_base = _timer_base; |
186 | } | 186 | } |
187 | 187 | ||
188 | void __init | 188 | void __init |
189 | orion_time_init(u32 _bridge_base, u32 _bridge_timer1_clr_mask, | 189 | orion_time_init(void __iomem *_bridge_base, u32 _bridge_timer1_clr_mask, |
190 | unsigned int irq, unsigned int tclk) | 190 | unsigned int irq, unsigned int tclk) |
191 | { | 191 | { |
192 | u32 u; | 192 | u32 u; |
@@ -194,7 +194,7 @@ orion_time_init(u32 _bridge_base, u32 _bridge_timer1_clr_mask, | |||
194 | /* | 194 | /* |
195 | * Set SoC-specific data. | 195 | * Set SoC-specific data. |
196 | */ | 196 | */ |
197 | bridge_base = (void __iomem *)_bridge_base; | 197 | bridge_base = _bridge_base; |
198 | bridge_timer1_clr_mask = _bridge_timer1_clr_mask; | 198 | bridge_timer1_clr_mask = _bridge_timer1_clr_mask; |
199 | 199 | ||
200 | ticks_per_jiffy = (tclk + HZ/2) / HZ; | 200 | ticks_per_jiffy = (tclk + HZ/2) / HZ; |
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 4fbdceb6f773..a5effd813abd 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
@@ -18,11 +18,12 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/random.h> | 20 | #include <linux/random.h> |
21 | #include <linux/clk.h> | ||
22 | #include <linux/err.h> | 21 | #include <linux/err.h> |
23 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
24 | #include <linux/hw_random.h> | 23 | #include <linux/hw_random.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/pm_runtime.h> | ||
26 | 27 | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | 29 | ||
@@ -46,26 +47,36 @@ | |||
46 | #define RNG_SYSSTATUS 0x44 /* System status | 47 | #define RNG_SYSSTATUS 0x44 /* System status |
47 | [0] = RESETDONE */ | 48 | [0] = RESETDONE */ |
48 | 49 | ||
49 | static void __iomem *rng_base; | 50 | /** |
50 | static struct clk *rng_ick; | 51 | * struct omap_rng_private_data - RNG IP block-specific data |
51 | static struct platform_device *rng_dev; | 52 | * @base: virtual address of the beginning of the RNG IP block registers |
53 | * @mem_res: struct resource * for the IP block registers physical memory | ||
54 | */ | ||
55 | struct omap_rng_private_data { | ||
56 | void __iomem *base; | ||
57 | struct resource *mem_res; | ||
58 | }; | ||
52 | 59 | ||
53 | static inline u32 omap_rng_read_reg(int reg) | 60 | static inline u32 omap_rng_read_reg(struct omap_rng_private_data *priv, int reg) |
54 | { | 61 | { |
55 | return __raw_readl(rng_base + reg); | 62 | return __raw_readl(priv->base + reg); |
56 | } | 63 | } |
57 | 64 | ||
58 | static inline void omap_rng_write_reg(int reg, u32 val) | 65 | static inline void omap_rng_write_reg(struct omap_rng_private_data *priv, |
66 | int reg, u32 val) | ||
59 | { | 67 | { |
60 | __raw_writel(val, rng_base + reg); | 68 | __raw_writel(val, priv->base + reg); |
61 | } | 69 | } |
62 | 70 | ||
63 | static int omap_rng_data_present(struct hwrng *rng, int wait) | 71 | static int omap_rng_data_present(struct hwrng *rng, int wait) |
64 | { | 72 | { |
73 | struct omap_rng_private_data *priv; | ||
65 | int data, i; | 74 | int data, i; |
66 | 75 | ||
76 | priv = (struct omap_rng_private_data *)rng->priv; | ||
77 | |||
67 | for (i = 0; i < 20; i++) { | 78 | for (i = 0; i < 20; i++) { |
68 | data = omap_rng_read_reg(RNG_STAT_REG) ? 0 : 1; | 79 | data = omap_rng_read_reg(priv, RNG_STAT_REG) ? 0 : 1; |
69 | if (data || !wait) | 80 | if (data || !wait) |
70 | break; | 81 | break; |
71 | /* RNG produces data fast enough (2+ MBit/sec, even | 82 | /* RNG produces data fast enough (2+ MBit/sec, even |
@@ -80,9 +91,13 @@ static int omap_rng_data_present(struct hwrng *rng, int wait) | |||
80 | 91 | ||
81 | static int omap_rng_data_read(struct hwrng *rng, u32 *data) | 92 | static int omap_rng_data_read(struct hwrng *rng, u32 *data) |
82 | { | 93 | { |
83 | *data = omap_rng_read_reg(RNG_OUT_REG); | 94 | struct omap_rng_private_data *priv; |
95 | |||
96 | priv = (struct omap_rng_private_data *)rng->priv; | ||
97 | |||
98 | *data = omap_rng_read_reg(priv, RNG_OUT_REG); | ||
84 | 99 | ||
85 | return 4; | 100 | return sizeof(u32); |
86 | } | 101 | } |
87 | 102 | ||
88 | static struct hwrng omap_rng_ops = { | 103 | static struct hwrng omap_rng_ops = { |
@@ -93,69 +108,68 @@ static struct hwrng omap_rng_ops = { | |||
93 | 108 | ||
94 | static int __devinit omap_rng_probe(struct platform_device *pdev) | 109 | static int __devinit omap_rng_probe(struct platform_device *pdev) |
95 | { | 110 | { |
96 | struct resource *res; | 111 | struct omap_rng_private_data *priv; |
97 | int ret; | 112 | int ret; |
98 | 113 | ||
99 | /* | 114 | priv = kzalloc(sizeof(struct omap_rng_private_data), GFP_KERNEL); |
100 | * A bit ugly, and it will never actually happen but there can | 115 | if (!priv) { |
101 | * be only one RNG and this catches any bork | 116 | dev_err(&pdev->dev, "could not allocate memory\n"); |
102 | */ | 117 | return -ENOMEM; |
103 | if (rng_dev) | 118 | }; |
104 | return -EBUSY; | ||
105 | |||
106 | if (cpu_is_omap24xx()) { | ||
107 | rng_ick = clk_get(&pdev->dev, "ick"); | ||
108 | if (IS_ERR(rng_ick)) { | ||
109 | dev_err(&pdev->dev, "Could not get rng_ick\n"); | ||
110 | ret = PTR_ERR(rng_ick); | ||
111 | return ret; | ||
112 | } else | ||
113 | clk_enable(rng_ick); | ||
114 | } | ||
115 | 119 | ||
116 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 120 | omap_rng_ops.priv = (unsigned long)priv; |
121 | dev_set_drvdata(&pdev->dev, priv); | ||
117 | 122 | ||
118 | rng_base = devm_request_and_ioremap(&pdev->dev, res); | 123 | priv->mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
119 | if (!rng_base) { | 124 | if (!priv->mem_res) { |
125 | ret = -ENOENT; | ||
126 | goto err_ioremap; | ||
127 | } | ||
128 | |||
129 | priv->base = devm_request_and_ioremap(&pdev->dev, priv->mem_res); | ||
130 | if (!priv->base) { | ||
120 | ret = -ENOMEM; | 131 | ret = -ENOMEM; |
121 | goto err_ioremap; | 132 | goto err_ioremap; |
122 | } | 133 | } |
123 | dev_set_drvdata(&pdev->dev, res); | 134 | dev_set_drvdata(&pdev->dev, priv); |
135 | |||
136 | pm_runtime_enable(&pdev->dev); | ||
137 | pm_runtime_get_sync(&pdev->dev); | ||
124 | 138 | ||
125 | ret = hwrng_register(&omap_rng_ops); | 139 | ret = hwrng_register(&omap_rng_ops); |
126 | if (ret) | 140 | if (ret) |
127 | goto err_register; | 141 | goto err_register; |
128 | 142 | ||
129 | dev_info(&pdev->dev, "OMAP Random Number Generator ver. %02x\n", | 143 | dev_info(&pdev->dev, "OMAP Random Number Generator ver. %02x\n", |
130 | omap_rng_read_reg(RNG_REV_REG)); | 144 | omap_rng_read_reg(priv, RNG_REV_REG)); |
131 | omap_rng_write_reg(RNG_MASK_REG, 0x1); | ||
132 | 145 | ||
133 | rng_dev = pdev; | 146 | omap_rng_write_reg(priv, RNG_MASK_REG, 0x1); |
134 | 147 | ||
135 | return 0; | 148 | return 0; |
136 | 149 | ||
137 | err_register: | 150 | err_register: |
138 | rng_base = NULL; | 151 | priv->base = NULL; |
152 | pm_runtime_disable(&pdev->dev); | ||
139 | err_ioremap: | 153 | err_ioremap: |
140 | if (cpu_is_omap24xx()) { | 154 | kfree(priv); |
141 | clk_disable(rng_ick); | 155 | |
142 | clk_put(rng_ick); | ||
143 | } | ||
144 | return ret; | 156 | return ret; |
145 | } | 157 | } |
146 | 158 | ||
147 | static int __exit omap_rng_remove(struct platform_device *pdev) | 159 | static int __exit omap_rng_remove(struct platform_device *pdev) |
148 | { | 160 | { |
161 | struct omap_rng_private_data *priv = dev_get_drvdata(&pdev->dev); | ||
162 | |||
149 | hwrng_unregister(&omap_rng_ops); | 163 | hwrng_unregister(&omap_rng_ops); |
150 | 164 | ||
151 | omap_rng_write_reg(RNG_MASK_REG, 0x0); | 165 | omap_rng_write_reg(priv, RNG_MASK_REG, 0x0); |
152 | 166 | ||
153 | if (cpu_is_omap24xx()) { | 167 | pm_runtime_put_sync(&pdev->dev); |
154 | clk_disable(rng_ick); | 168 | pm_runtime_disable(&pdev->dev); |
155 | clk_put(rng_ick); | 169 | |
156 | } | 170 | release_mem_region(priv->mem_res->start, resource_size(priv->mem_res)); |
157 | 171 | ||
158 | rng_base = NULL; | 172 | kfree(priv); |
159 | 173 | ||
160 | return 0; | 174 | return 0; |
161 | } | 175 | } |
@@ -164,13 +178,21 @@ static int __exit omap_rng_remove(struct platform_device *pdev) | |||
164 | 178 | ||
165 | static int omap_rng_suspend(struct device *dev) | 179 | static int omap_rng_suspend(struct device *dev) |
166 | { | 180 | { |
167 | omap_rng_write_reg(RNG_MASK_REG, 0x0); | 181 | struct omap_rng_private_data *priv = dev_get_drvdata(dev); |
182 | |||
183 | omap_rng_write_reg(priv, RNG_MASK_REG, 0x0); | ||
184 | pm_runtime_put_sync(dev); | ||
185 | |||
168 | return 0; | 186 | return 0; |
169 | } | 187 | } |
170 | 188 | ||
171 | static int omap_rng_resume(struct device *dev) | 189 | static int omap_rng_resume(struct device *dev) |
172 | { | 190 | { |
173 | omap_rng_write_reg(RNG_MASK_REG, 0x1); | 191 | struct omap_rng_private_data *priv = dev_get_drvdata(dev); |
192 | |||
193 | pm_runtime_get_sync(dev); | ||
194 | omap_rng_write_reg(priv, RNG_MASK_REG, 0x1); | ||
195 | |||
174 | return 0; | 196 | return 0; |
175 | } | 197 | } |
176 | 198 | ||
@@ -198,9 +220,6 @@ static struct platform_driver omap_rng_driver = { | |||
198 | 220 | ||
199 | static int __init omap_rng_init(void) | 221 | static int __init omap_rng_init(void) |
200 | { | 222 | { |
201 | if (!cpu_is_omap16xx() && !cpu_is_omap24xx()) | ||
202 | return -ENODEV; | ||
203 | |||
204 | return platform_driver_register(&omap_rng_driver); | 223 | return platform_driver_register(&omap_rng_driver); |
205 | } | 224 | } |
206 | 225 | ||
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 21c1a87032b7..24ccae453e79 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
@@ -19,6 +19,9 @@ | |||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <crypto/internal/hash.h> | 20 | #include <crypto/internal/hash.h> |
21 | #include <crypto/sha.h> | 21 | #include <crypto/sha.h> |
22 | #include <linux/of.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | #include <linux/of_irq.h> | ||
22 | 25 | ||
23 | #include "mv_cesa.h" | 26 | #include "mv_cesa.h" |
24 | 27 | ||
@@ -1062,7 +1065,10 @@ static int mv_probe(struct platform_device *pdev) | |||
1062 | goto err_unmap_reg; | 1065 | goto err_unmap_reg; |
1063 | } | 1066 | } |
1064 | 1067 | ||
1065 | irq = platform_get_irq(pdev, 0); | 1068 | if (pdev->dev.of_node) |
1069 | irq = irq_of_parse_and_map(pdev->dev.of_node, 0); | ||
1070 | else | ||
1071 | irq = platform_get_irq(pdev, 0); | ||
1066 | if (irq < 0 || irq == NO_IRQ) { | 1072 | if (irq < 0 || irq == NO_IRQ) { |
1067 | ret = irq; | 1073 | ret = irq; |
1068 | goto err_unmap_sram; | 1074 | goto err_unmap_sram; |
@@ -1170,12 +1176,19 @@ static int mv_remove(struct platform_device *pdev) | |||
1170 | return 0; | 1176 | return 0; |
1171 | } | 1177 | } |
1172 | 1178 | ||
1179 | static const struct of_device_id mv_cesa_of_match_table[] = { | ||
1180 | { .compatible = "marvell,orion-crypto", }, | ||
1181 | {} | ||
1182 | }; | ||
1183 | MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table); | ||
1184 | |||
1173 | static struct platform_driver marvell_crypto = { | 1185 | static struct platform_driver marvell_crypto = { |
1174 | .probe = mv_probe, | 1186 | .probe = mv_probe, |
1175 | .remove = mv_remove, | 1187 | .remove = __devexit_p(mv_remove), |
1176 | .driver = { | 1188 | .driver = { |
1177 | .owner = THIS_MODULE, | 1189 | .owner = THIS_MODULE, |
1178 | .name = "mv_crypto", | 1190 | .name = "mv_crypto", |
1191 | .of_match_table = of_match_ptr(mv_cesa_of_match_table), | ||
1179 | }, | 1192 | }, |
1180 | }; | 1193 | }; |
1181 | MODULE_ALIAS("platform:mv_crypto"); | 1194 | MODULE_ALIAS("platform:mv_crypto"); |
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index aa73ef3233b8..d055cee36942 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
@@ -150,6 +150,12 @@ config GPIO_MSM_V2 | |||
150 | Qualcomm MSM chips. Most of the pins on the MSM can be | 150 | Qualcomm MSM chips. Most of the pins on the MSM can be |
151 | selected for GPIO, and are controlled by this driver. | 151 | selected for GPIO, and are controlled by this driver. |
152 | 152 | ||
153 | config GPIO_MVEBU | ||
154 | def_bool y | ||
155 | depends on ARCH_MVEBU | ||
156 | select GPIO_GENERIC | ||
157 | select GENERIC_IRQ_CHIP | ||
158 | |||
153 | config GPIO_MXC | 159 | config GPIO_MXC |
154 | def_bool y | 160 | def_bool y |
155 | depends on ARCH_MXC | 161 | depends on ARCH_MXC |
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index b2c109d1303d..9aeed6707326 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile | |||
@@ -42,6 +42,7 @@ obj-$(CONFIG_GPIO_MPC8XXX) += gpio-mpc8xxx.o | |||
42 | obj-$(CONFIG_GPIO_MSIC) += gpio-msic.o | 42 | obj-$(CONFIG_GPIO_MSIC) += gpio-msic.o |
43 | obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o | 43 | obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o |
44 | obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o | 44 | obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o |
45 | obj-$(CONFIG_GPIO_MVEBU) += gpio-mvebu.o | ||
45 | obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o | 46 | obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o |
46 | obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o | 47 | obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o |
47 | obj-$(CONFIG_ARCH_OMAP) += gpio-omap.o | 48 | obj-$(CONFIG_ARCH_OMAP) += gpio-omap.o |
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c new file mode 100644 index 000000000000..902af437eaf2 --- /dev/null +++ b/drivers/gpio/gpio-mvebu.c | |||
@@ -0,0 +1,679 @@ | |||
1 | /* | ||
2 | * GPIO driver for Marvell SoCs | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
7 | * Andrew Lunn <andrew@lunn.ch> | ||
8 | * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | * | ||
14 | * This driver is a fairly straightforward GPIO driver for the | ||
15 | * complete family of Marvell EBU SoC platforms (Orion, Dove, | ||
16 | * Kirkwood, Discovery, Armada 370/XP). The only complexity of this | ||
17 | * driver is the different register layout that exists between the | ||
18 | * non-SMP platforms (Orion, Dove, Kirkwood, Armada 370) and the SMP | ||
19 | * platforms (MV78200 from the Discovery family and the Armada | ||
20 | * XP). Therefore, this driver handles three variants of the GPIO | ||
21 | * block: | ||
22 | * - the basic variant, called "orion-gpio", with the simplest | ||
23 | * register set. Used on Orion, Dove, Kirkwoord, Armada 370 and | ||
24 | * non-SMP Discovery systems | ||
25 | * - the mv78200 variant for MV78200 Discovery systems. This variant | ||
26 | * turns the edge mask and level mask registers into CPU0 edge | ||
27 | * mask/level mask registers, and adds CPU1 edge mask/level mask | ||
28 | * registers. | ||
29 | * - the armadaxp variant for Armada XP systems. This variant keeps | ||
30 | * the normal cause/edge mask/level mask registers when the global | ||
31 | * interrupts are used, but adds per-CPU cause/edge mask/level mask | ||
32 | * registers n a separate memory area for the per-CPU GPIO | ||
33 | * interrupts. | ||
34 | */ | ||
35 | |||
36 | #include <linux/module.h> | ||
37 | #include <linux/gpio.h> | ||
38 | #include <linux/irq.h> | ||
39 | #include <linux/slab.h> | ||
40 | #include <linux/irqdomain.h> | ||
41 | #include <linux/io.h> | ||
42 | #include <linux/of_irq.h> | ||
43 | #include <linux/of_device.h> | ||
44 | #include <linux/platform_device.h> | ||
45 | #include <linux/pinctrl/consumer.h> | ||
46 | |||
47 | /* | ||
48 | * GPIO unit register offsets. | ||
49 | */ | ||
50 | #define GPIO_OUT_OFF 0x0000 | ||
51 | #define GPIO_IO_CONF_OFF 0x0004 | ||
52 | #define GPIO_BLINK_EN_OFF 0x0008 | ||
53 | #define GPIO_IN_POL_OFF 0x000c | ||
54 | #define GPIO_DATA_IN_OFF 0x0010 | ||
55 | #define GPIO_EDGE_CAUSE_OFF 0x0014 | ||
56 | #define GPIO_EDGE_MASK_OFF 0x0018 | ||
57 | #define GPIO_LEVEL_MASK_OFF 0x001c | ||
58 | |||
59 | /* The MV78200 has per-CPU registers for edge mask and level mask */ | ||
60 | #define GPIO_EDGE_MASK_MV78200_OFF(cpu) ((cpu) ? 0x30 : 0x18) | ||
61 | #define GPIO_LEVEL_MASK_MV78200_OFF(cpu) ((cpu) ? 0x34 : 0x1C) | ||
62 | |||
63 | /* The Armada XP has per-CPU registers for interrupt cause, interrupt | ||
64 | * mask and interrupt level mask. Those are relative to the | ||
65 | * percpu_membase. */ | ||
66 | #define GPIO_EDGE_CAUSE_ARMADAXP_OFF(cpu) ((cpu) * 0x4) | ||
67 | #define GPIO_EDGE_MASK_ARMADAXP_OFF(cpu) (0x10 + (cpu) * 0x4) | ||
68 | #define GPIO_LEVEL_MASK_ARMADAXP_OFF(cpu) (0x20 + (cpu) * 0x4) | ||
69 | |||
70 | #define MVEBU_GPIO_SOC_VARIANT_ORION 0x1 | ||
71 | #define MVEBU_GPIO_SOC_VARIANT_MV78200 0x2 | ||
72 | #define MVEBU_GPIO_SOC_VARIANT_ARMADAXP 0x3 | ||
73 | |||
74 | #define MVEBU_MAX_GPIO_PER_BANK 32 | ||
75 | |||
76 | struct mvebu_gpio_chip { | ||
77 | struct gpio_chip chip; | ||
78 | spinlock_t lock; | ||
79 | void __iomem *membase; | ||
80 | void __iomem *percpu_membase; | ||
81 | unsigned int irqbase; | ||
82 | struct irq_domain *domain; | ||
83 | int soc_variant; | ||
84 | }; | ||
85 | |||
86 | /* | ||
87 | * Functions returning addresses of individual registers for a given | ||
88 | * GPIO controller. | ||
89 | */ | ||
90 | static inline void __iomem *mvebu_gpioreg_out(struct mvebu_gpio_chip *mvchip) | ||
91 | { | ||
92 | return mvchip->membase + GPIO_OUT_OFF; | ||
93 | } | ||
94 | |||
95 | static inline void __iomem *mvebu_gpioreg_io_conf(struct mvebu_gpio_chip *mvchip) | ||
96 | { | ||
97 | return mvchip->membase + GPIO_IO_CONF_OFF; | ||
98 | } | ||
99 | |||
100 | static inline void __iomem *mvebu_gpioreg_in_pol(struct mvebu_gpio_chip *mvchip) | ||
101 | { | ||
102 | return mvchip->membase + GPIO_IN_POL_OFF; | ||
103 | } | ||
104 | |||
105 | static inline void __iomem *mvebu_gpioreg_data_in(struct mvebu_gpio_chip *mvchip) | ||
106 | { | ||
107 | return mvchip->membase + GPIO_DATA_IN_OFF; | ||
108 | } | ||
109 | |||
110 | static inline void __iomem *mvebu_gpioreg_edge_cause(struct mvebu_gpio_chip *mvchip) | ||
111 | { | ||
112 | int cpu; | ||
113 | |||
114 | switch(mvchip->soc_variant) { | ||
115 | case MVEBU_GPIO_SOC_VARIANT_ORION: | ||
116 | case MVEBU_GPIO_SOC_VARIANT_MV78200: | ||
117 | return mvchip->membase + GPIO_EDGE_CAUSE_OFF; | ||
118 | case MVEBU_GPIO_SOC_VARIANT_ARMADAXP: | ||
119 | cpu = smp_processor_id(); | ||
120 | return mvchip->percpu_membase + GPIO_EDGE_CAUSE_ARMADAXP_OFF(cpu); | ||
121 | default: | ||
122 | BUG(); | ||
123 | } | ||
124 | } | ||
125 | |||
126 | static inline void __iomem *mvebu_gpioreg_edge_mask(struct mvebu_gpio_chip *mvchip) | ||
127 | { | ||
128 | int cpu; | ||
129 | |||
130 | switch(mvchip->soc_variant) { | ||
131 | case MVEBU_GPIO_SOC_VARIANT_ORION: | ||
132 | return mvchip->membase + GPIO_EDGE_MASK_OFF; | ||
133 | case MVEBU_GPIO_SOC_VARIANT_MV78200: | ||
134 | cpu = smp_processor_id(); | ||
135 | return mvchip->membase + GPIO_EDGE_MASK_MV78200_OFF(cpu); | ||
136 | case MVEBU_GPIO_SOC_VARIANT_ARMADAXP: | ||
137 | cpu = smp_processor_id(); | ||
138 | return mvchip->percpu_membase + GPIO_EDGE_MASK_ARMADAXP_OFF(cpu); | ||
139 | default: | ||
140 | BUG(); | ||
141 | } | ||
142 | } | ||
143 | |||
144 | static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip) | ||
145 | { | ||
146 | int cpu; | ||
147 | |||
148 | switch(mvchip->soc_variant) { | ||
149 | case MVEBU_GPIO_SOC_VARIANT_ORION: | ||
150 | return mvchip->membase + GPIO_LEVEL_MASK_OFF; | ||
151 | case MVEBU_GPIO_SOC_VARIANT_MV78200: | ||
152 | cpu = smp_processor_id(); | ||
153 | return mvchip->membase + GPIO_LEVEL_MASK_MV78200_OFF(cpu); | ||
154 | case MVEBU_GPIO_SOC_VARIANT_ARMADAXP: | ||
155 | cpu = smp_processor_id(); | ||
156 | return mvchip->percpu_membase + GPIO_LEVEL_MASK_ARMADAXP_OFF(cpu); | ||
157 | default: | ||
158 | BUG(); | ||
159 | } | ||
160 | } | ||
161 | |||
162 | /* | ||
163 | * Functions implementing the gpio_chip methods | ||
164 | */ | ||
165 | |||
166 | int mvebu_gpio_request(struct gpio_chip *chip, unsigned pin) | ||
167 | { | ||
168 | return pinctrl_request_gpio(chip->base + pin); | ||
169 | } | ||
170 | |||
171 | void mvebu_gpio_free(struct gpio_chip *chip, unsigned pin) | ||
172 | { | ||
173 | pinctrl_free_gpio(chip->base + pin); | ||
174 | } | ||
175 | |||
176 | static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value) | ||
177 | { | ||
178 | struct mvebu_gpio_chip *mvchip = | ||
179 | container_of(chip, struct mvebu_gpio_chip, chip); | ||
180 | unsigned long flags; | ||
181 | u32 u; | ||
182 | |||
183 | spin_lock_irqsave(&mvchip->lock, flags); | ||
184 | u = readl_relaxed(mvebu_gpioreg_out(mvchip)); | ||
185 | if (value) | ||
186 | u |= 1 << pin; | ||
187 | else | ||
188 | u &= ~(1 << pin); | ||
189 | writel_relaxed(u, mvebu_gpioreg_out(mvchip)); | ||
190 | spin_unlock_irqrestore(&mvchip->lock, flags); | ||
191 | } | ||
192 | |||
193 | static int mvebu_gpio_get(struct gpio_chip *chip, unsigned pin) | ||
194 | { | ||
195 | struct mvebu_gpio_chip *mvchip = | ||
196 | container_of(chip, struct mvebu_gpio_chip, chip); | ||
197 | u32 u; | ||
198 | |||
199 | if (readl_relaxed(mvebu_gpioreg_io_conf(mvchip)) & (1 << pin)) { | ||
200 | u = readl_relaxed(mvebu_gpioreg_data_in(mvchip)) ^ | ||
201 | readl_relaxed(mvebu_gpioreg_in_pol(mvchip)); | ||
202 | } else { | ||
203 | u = readl_relaxed(mvebu_gpioreg_out(mvchip)); | ||
204 | } | ||
205 | |||
206 | return (u >> pin) & 1; | ||
207 | } | ||
208 | |||
209 | static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin) | ||
210 | { | ||
211 | struct mvebu_gpio_chip *mvchip = | ||
212 | container_of(chip, struct mvebu_gpio_chip, chip); | ||
213 | unsigned long flags; | ||
214 | int ret; | ||
215 | u32 u; | ||
216 | |||
217 | /* Check with the pinctrl driver whether this pin is usable as | ||
218 | * an input GPIO */ | ||
219 | ret = pinctrl_gpio_direction_input(chip->base + pin); | ||
220 | if (ret) | ||
221 | return ret; | ||
222 | |||
223 | spin_lock_irqsave(&mvchip->lock, flags); | ||
224 | u = readl_relaxed(mvebu_gpioreg_io_conf(mvchip)); | ||
225 | u |= 1 << pin; | ||
226 | writel_relaxed(u, mvebu_gpioreg_io_conf(mvchip)); | ||
227 | spin_unlock_irqrestore(&mvchip->lock, flags); | ||
228 | |||
229 | return 0; | ||
230 | } | ||
231 | |||
232 | static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin, | ||
233 | int value) | ||
234 | { | ||
235 | struct mvebu_gpio_chip *mvchip = | ||
236 | container_of(chip, struct mvebu_gpio_chip, chip); | ||
237 | unsigned long flags; | ||
238 | int ret; | ||
239 | u32 u; | ||
240 | |||
241 | /* Check with the pinctrl driver whether this pin is usable as | ||
242 | * an output GPIO */ | ||
243 | ret = pinctrl_gpio_direction_output(chip->base + pin); | ||
244 | if (ret) | ||
245 | return ret; | ||
246 | |||
247 | spin_lock_irqsave(&mvchip->lock, flags); | ||
248 | u = readl_relaxed(mvebu_gpioreg_io_conf(mvchip)); | ||
249 | u &= ~(1 << pin); | ||
250 | writel_relaxed(u, mvebu_gpioreg_io_conf(mvchip)); | ||
251 | spin_unlock_irqrestore(&mvchip->lock, flags); | ||
252 | |||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | static int mvebu_gpio_to_irq(struct gpio_chip *chip, unsigned pin) | ||
257 | { | ||
258 | struct mvebu_gpio_chip *mvchip = | ||
259 | container_of(chip, struct mvebu_gpio_chip, chip); | ||
260 | return irq_create_mapping(mvchip->domain, pin); | ||
261 | } | ||
262 | |||
263 | /* | ||
264 | * Functions implementing the irq_chip methods | ||
265 | */ | ||
266 | static void mvebu_gpio_irq_ack(struct irq_data *d) | ||
267 | { | ||
268 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
269 | struct mvebu_gpio_chip *mvchip = gc->private; | ||
270 | u32 mask = ~(1 << (d->irq - gc->irq_base)); | ||
271 | |||
272 | irq_gc_lock(gc); | ||
273 | writel_relaxed(mask, mvebu_gpioreg_edge_cause(mvchip)); | ||
274 | irq_gc_unlock(gc); | ||
275 | } | ||
276 | |||
277 | static void mvebu_gpio_edge_irq_mask(struct irq_data *d) | ||
278 | { | ||
279 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
280 | struct mvebu_gpio_chip *mvchip = gc->private; | ||
281 | u32 mask = 1 << (d->irq - gc->irq_base); | ||
282 | |||
283 | irq_gc_lock(gc); | ||
284 | gc->mask_cache &= ~mask; | ||
285 | writel_relaxed(gc->mask_cache, mvebu_gpioreg_edge_mask(mvchip)); | ||
286 | irq_gc_unlock(gc); | ||
287 | } | ||
288 | |||
289 | static void mvebu_gpio_edge_irq_unmask(struct irq_data *d) | ||
290 | { | ||
291 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
292 | struct mvebu_gpio_chip *mvchip = gc->private; | ||
293 | u32 mask = 1 << (d->irq - gc->irq_base); | ||
294 | |||
295 | irq_gc_lock(gc); | ||
296 | gc->mask_cache |= mask; | ||
297 | writel_relaxed(gc->mask_cache, mvebu_gpioreg_edge_mask(mvchip)); | ||
298 | irq_gc_unlock(gc); | ||
299 | } | ||
300 | |||
301 | static void mvebu_gpio_level_irq_mask(struct irq_data *d) | ||
302 | { | ||
303 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
304 | struct mvebu_gpio_chip *mvchip = gc->private; | ||
305 | u32 mask = 1 << (d->irq - gc->irq_base); | ||
306 | |||
307 | irq_gc_lock(gc); | ||
308 | gc->mask_cache &= ~mask; | ||
309 | writel_relaxed(gc->mask_cache, mvebu_gpioreg_level_mask(mvchip)); | ||
310 | irq_gc_unlock(gc); | ||
311 | } | ||
312 | |||
313 | static void mvebu_gpio_level_irq_unmask(struct irq_data *d) | ||
314 | { | ||
315 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
316 | struct mvebu_gpio_chip *mvchip = gc->private; | ||
317 | u32 mask = 1 << (d->irq - gc->irq_base); | ||
318 | |||
319 | irq_gc_lock(gc); | ||
320 | gc->mask_cache |= mask; | ||
321 | writel_relaxed(gc->mask_cache, mvebu_gpioreg_level_mask(mvchip)); | ||
322 | irq_gc_unlock(gc); | ||
323 | } | ||
324 | |||
325 | /***************************************************************************** | ||
326 | * MVEBU GPIO IRQ | ||
327 | * | ||
328 | * GPIO_IN_POL register controls whether GPIO_DATA_IN will hold the same | ||
329 | * value of the line or the opposite value. | ||
330 | * | ||
331 | * Level IRQ handlers: DATA_IN is used directly as cause register. | ||
332 | * Interrupt are masked by LEVEL_MASK registers. | ||
333 | * Edge IRQ handlers: Change in DATA_IN are latched in EDGE_CAUSE. | ||
334 | * Interrupt are masked by EDGE_MASK registers. | ||
335 | * Both-edge handlers: Similar to regular Edge handlers, but also swaps | ||
336 | * the polarity to catch the next line transaction. | ||
337 | * This is a race condition that might not perfectly | ||
338 | * work on some use cases. | ||
339 | * | ||
340 | * Every eight GPIO lines are grouped (OR'ed) before going up to main | ||
341 | * cause register. | ||
342 | * | ||
343 | * EDGE cause mask | ||
344 | * data-in /--------| |-----| |----\ | ||
345 | * -----| |----- ---- to main cause reg | ||
346 | * X \----------------| |----/ | ||
347 | * polarity LEVEL mask | ||
348 | * | ||
349 | ****************************************************************************/ | ||
350 | |||
351 | static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type) | ||
352 | { | ||
353 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
354 | struct irq_chip_type *ct = irq_data_get_chip_type(d); | ||
355 | struct mvebu_gpio_chip *mvchip = gc->private; | ||
356 | int pin; | ||
357 | u32 u; | ||
358 | |||
359 | pin = d->hwirq; | ||
360 | |||
361 | u = readl_relaxed(mvebu_gpioreg_io_conf(mvchip)) & (1 << pin); | ||
362 | if (!u) { | ||
363 | return -EINVAL; | ||
364 | } | ||
365 | |||
366 | type &= IRQ_TYPE_SENSE_MASK; | ||
367 | if (type == IRQ_TYPE_NONE) | ||
368 | return -EINVAL; | ||
369 | |||
370 | /* Check if we need to change chip and handler */ | ||
371 | if (!(ct->type & type)) | ||
372 | if (irq_setup_alt_chip(d, type)) | ||
373 | return -EINVAL; | ||
374 | |||
375 | /* | ||
376 | * Configure interrupt polarity. | ||
377 | */ | ||
378 | switch(type) { | ||
379 | case IRQ_TYPE_EDGE_RISING: | ||
380 | case IRQ_TYPE_LEVEL_HIGH: | ||
381 | u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip)); | ||
382 | u &= ~(1 << pin); | ||
383 | writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip)); | ||
384 | case IRQ_TYPE_EDGE_FALLING: | ||
385 | case IRQ_TYPE_LEVEL_LOW: | ||
386 | u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip)); | ||
387 | u |= 1 << pin; | ||
388 | writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip)); | ||
389 | case IRQ_TYPE_EDGE_BOTH: { | ||
390 | u32 v; | ||
391 | |||
392 | v = readl_relaxed(mvebu_gpioreg_in_pol(mvchip)) ^ | ||
393 | readl_relaxed(mvebu_gpioreg_data_in(mvchip)); | ||
394 | |||
395 | /* | ||
396 | * set initial polarity based on current input level | ||
397 | */ | ||
398 | u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip)); | ||
399 | if (v & (1 << pin)) | ||
400 | u |= 1 << pin; /* falling */ | ||
401 | else | ||
402 | u &= ~(1 << pin); /* rising */ | ||
403 | writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip)); | ||
404 | } | ||
405 | } | ||
406 | return 0; | ||
407 | } | ||
408 | |||
409 | static void mvebu_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
410 | { | ||
411 | struct mvebu_gpio_chip *mvchip = irq_get_handler_data(irq); | ||
412 | u32 cause, type; | ||
413 | int i; | ||
414 | |||
415 | if (mvchip == NULL) | ||
416 | return; | ||
417 | |||
418 | cause = readl_relaxed(mvebu_gpioreg_data_in(mvchip)) & | ||
419 | readl_relaxed(mvebu_gpioreg_level_mask(mvchip)); | ||
420 | cause |= readl_relaxed(mvebu_gpioreg_edge_cause(mvchip)) & | ||
421 | readl_relaxed(mvebu_gpioreg_edge_mask(mvchip)); | ||
422 | |||
423 | for (i = 0; i < mvchip->chip.ngpio; i++) { | ||
424 | int irq; | ||
425 | |||
426 | irq = mvchip->irqbase + i; | ||
427 | |||
428 | if (!(cause & (1 << i))) | ||
429 | continue; | ||
430 | |||
431 | type = irqd_get_trigger_type(irq_get_irq_data(irq)); | ||
432 | if ((type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { | ||
433 | /* Swap polarity (race with GPIO line) */ | ||
434 | u32 polarity; | ||
435 | |||
436 | polarity = readl_relaxed(mvebu_gpioreg_in_pol(mvchip)); | ||
437 | polarity ^= 1 << i; | ||
438 | writel_relaxed(polarity, mvebu_gpioreg_in_pol(mvchip)); | ||
439 | } | ||
440 | generic_handle_irq(irq); | ||
441 | } | ||
442 | } | ||
443 | |||
444 | static struct platform_device_id mvebu_gpio_ids[] = { | ||
445 | { | ||
446 | .name = "orion-gpio", | ||
447 | }, { | ||
448 | .name = "mv78200-gpio", | ||
449 | }, { | ||
450 | .name = "armadaxp-gpio", | ||
451 | }, { | ||
452 | /* sentinel */ | ||
453 | }, | ||
454 | }; | ||
455 | MODULE_DEVICE_TABLE(platform, mvebu_gpio_ids); | ||
456 | |||
457 | static struct of_device_id mvebu_gpio_of_match[] __devinitdata = { | ||
458 | { | ||
459 | .compatible = "marvell,orion-gpio", | ||
460 | .data = (void*) MVEBU_GPIO_SOC_VARIANT_ORION, | ||
461 | }, | ||
462 | { | ||
463 | .compatible = "marvell,mv78200-gpio", | ||
464 | .data = (void*) MVEBU_GPIO_SOC_VARIANT_MV78200, | ||
465 | }, | ||
466 | { | ||
467 | .compatible = "marvell,armadaxp-gpio", | ||
468 | .data = (void*) MVEBU_GPIO_SOC_VARIANT_ARMADAXP, | ||
469 | }, | ||
470 | { | ||
471 | /* sentinel */ | ||
472 | }, | ||
473 | }; | ||
474 | MODULE_DEVICE_TABLE(of, mvebu_gpio_of_match); | ||
475 | |||
476 | static int __devinit mvebu_gpio_probe(struct platform_device *pdev) | ||
477 | { | ||
478 | struct mvebu_gpio_chip *mvchip; | ||
479 | const struct of_device_id *match; | ||
480 | struct device_node *np = pdev->dev.of_node; | ||
481 | struct resource *res; | ||
482 | struct irq_chip_generic *gc; | ||
483 | struct irq_chip_type *ct; | ||
484 | unsigned int ngpios; | ||
485 | int soc_variant; | ||
486 | int i, cpu, id; | ||
487 | |||
488 | match = of_match_device(mvebu_gpio_of_match, &pdev->dev); | ||
489 | if (match) | ||
490 | soc_variant = (int) match->data; | ||
491 | else | ||
492 | soc_variant = MVEBU_GPIO_SOC_VARIANT_ORION; | ||
493 | |||
494 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
495 | if (! res) { | ||
496 | dev_err(&pdev->dev, "Cannot get memory resource\n"); | ||
497 | return -ENODEV; | ||
498 | } | ||
499 | |||
500 | mvchip = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_gpio_chip), GFP_KERNEL); | ||
501 | if (! mvchip){ | ||
502 | dev_err(&pdev->dev, "Cannot allocate memory\n"); | ||
503 | return -ENOMEM; | ||
504 | } | ||
505 | |||
506 | if (of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios)) { | ||
507 | dev_err(&pdev->dev, "Missing ngpios OF property\n"); | ||
508 | return -ENODEV; | ||
509 | } | ||
510 | |||
511 | id = of_alias_get_id(pdev->dev.of_node, "gpio"); | ||
512 | if (id < 0) { | ||
513 | dev_err(&pdev->dev, "Couldn't get OF id\n"); | ||
514 | return id; | ||
515 | } | ||
516 | |||
517 | mvchip->soc_variant = soc_variant; | ||
518 | mvchip->chip.label = dev_name(&pdev->dev); | ||
519 | mvchip->chip.dev = &pdev->dev; | ||
520 | mvchip->chip.request = mvebu_gpio_request; | ||
521 | mvchip->chip.direction_input = mvebu_gpio_direction_input; | ||
522 | mvchip->chip.get = mvebu_gpio_get; | ||
523 | mvchip->chip.direction_output = mvebu_gpio_direction_output; | ||
524 | mvchip->chip.set = mvebu_gpio_set; | ||
525 | mvchip->chip.to_irq = mvebu_gpio_to_irq; | ||
526 | mvchip->chip.base = id * MVEBU_MAX_GPIO_PER_BANK; | ||
527 | mvchip->chip.ngpio = ngpios; | ||
528 | mvchip->chip.can_sleep = 0; | ||
529 | #ifdef CONFIG_OF | ||
530 | mvchip->chip.of_node = np; | ||
531 | #endif | ||
532 | |||
533 | spin_lock_init(&mvchip->lock); | ||
534 | mvchip->membase = devm_request_and_ioremap(&pdev->dev, res); | ||
535 | if (! mvchip->membase) { | ||
536 | dev_err(&pdev->dev, "Cannot ioremap\n"); | ||
537 | kfree(mvchip->chip.label); | ||
538 | return -ENOMEM; | ||
539 | } | ||
540 | |||
541 | /* The Armada XP has a second range of registers for the | ||
542 | * per-CPU registers */ | ||
543 | if (soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) { | ||
544 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | ||
545 | if (! res) { | ||
546 | dev_err(&pdev->dev, "Cannot get memory resource\n"); | ||
547 | kfree(mvchip->chip.label); | ||
548 | return -ENODEV; | ||
549 | } | ||
550 | |||
551 | mvchip->percpu_membase = devm_request_and_ioremap(&pdev->dev, res); | ||
552 | if (! mvchip->percpu_membase) { | ||
553 | dev_err(&pdev->dev, "Cannot ioremap\n"); | ||
554 | kfree(mvchip->chip.label); | ||
555 | return -ENOMEM; | ||
556 | } | ||
557 | } | ||
558 | |||
559 | /* | ||
560 | * Mask and clear GPIO interrupts. | ||
561 | */ | ||
562 | switch(soc_variant) { | ||
563 | case MVEBU_GPIO_SOC_VARIANT_ORION: | ||
564 | writel_relaxed(0, mvchip->membase + GPIO_EDGE_CAUSE_OFF); | ||
565 | writel_relaxed(0, mvchip->membase + GPIO_EDGE_MASK_OFF); | ||
566 | writel_relaxed(0, mvchip->membase + GPIO_LEVEL_MASK_OFF); | ||
567 | break; | ||
568 | case MVEBU_GPIO_SOC_VARIANT_MV78200: | ||
569 | writel_relaxed(0, mvchip->membase + GPIO_EDGE_CAUSE_OFF); | ||
570 | for (cpu = 0; cpu < 2; cpu++) { | ||
571 | writel_relaxed(0, mvchip->membase + | ||
572 | GPIO_EDGE_MASK_MV78200_OFF(cpu)); | ||
573 | writel_relaxed(0, mvchip->membase + | ||
574 | GPIO_LEVEL_MASK_MV78200_OFF(cpu)); | ||
575 | } | ||
576 | break; | ||
577 | case MVEBU_GPIO_SOC_VARIANT_ARMADAXP: | ||
578 | writel_relaxed(0, mvchip->membase + GPIO_EDGE_CAUSE_OFF); | ||
579 | writel_relaxed(0, mvchip->membase + GPIO_EDGE_MASK_OFF); | ||
580 | writel_relaxed(0, mvchip->membase + GPIO_LEVEL_MASK_OFF); | ||
581 | for (cpu = 0; cpu < 4; cpu++) { | ||
582 | writel_relaxed(0, mvchip->percpu_membase + | ||
583 | GPIO_EDGE_CAUSE_ARMADAXP_OFF(cpu)); | ||
584 | writel_relaxed(0, mvchip->percpu_membase + | ||
585 | GPIO_EDGE_MASK_ARMADAXP_OFF(cpu)); | ||
586 | writel_relaxed(0, mvchip->percpu_membase + | ||
587 | GPIO_LEVEL_MASK_ARMADAXP_OFF(cpu)); | ||
588 | } | ||
589 | break; | ||
590 | default: | ||
591 | BUG(); | ||
592 | } | ||
593 | |||
594 | gpiochip_add(&mvchip->chip); | ||
595 | |||
596 | /* Some gpio controllers do not provide irq support */ | ||
597 | if (!of_irq_count(np)) | ||
598 | return 0; | ||
599 | |||
600 | /* Setup the interrupt handlers. Each chip can have up to 4 | ||
601 | * interrupt handlers, with each handler dealing with 8 GPIO | ||
602 | * pins. */ | ||
603 | for (i = 0; i < 4; i++) { | ||
604 | int irq; | ||
605 | irq = platform_get_irq(pdev, i); | ||
606 | if (irq < 0) | ||
607 | continue; | ||
608 | irq_set_handler_data(irq, mvchip); | ||
609 | irq_set_chained_handler(irq, mvebu_gpio_irq_handler); | ||
610 | } | ||
611 | |||
612 | mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1); | ||
613 | if (mvchip->irqbase < 0) { | ||
614 | dev_err(&pdev->dev, "no irqs\n"); | ||
615 | kfree(mvchip->chip.label); | ||
616 | return -ENOMEM; | ||
617 | } | ||
618 | |||
619 | gc = irq_alloc_generic_chip("mvebu_gpio_irq", 2, mvchip->irqbase, | ||
620 | mvchip->membase, handle_level_irq); | ||
621 | if (! gc) { | ||
622 | dev_err(&pdev->dev, "Cannot allocate generic irq_chip\n"); | ||
623 | kfree(mvchip->chip.label); | ||
624 | return -ENOMEM; | ||
625 | } | ||
626 | |||
627 | gc->private = mvchip; | ||
628 | ct = &gc->chip_types[0]; | ||
629 | ct->type = IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW; | ||
630 | ct->chip.irq_mask = mvebu_gpio_level_irq_mask; | ||
631 | ct->chip.irq_unmask = mvebu_gpio_level_irq_unmask; | ||
632 | ct->chip.irq_set_type = mvebu_gpio_irq_set_type; | ||
633 | ct->chip.name = mvchip->chip.label; | ||
634 | |||
635 | ct = &gc->chip_types[1]; | ||
636 | ct->type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; | ||
637 | ct->chip.irq_ack = mvebu_gpio_irq_ack; | ||
638 | ct->chip.irq_mask = mvebu_gpio_edge_irq_mask; | ||
639 | ct->chip.irq_unmask = mvebu_gpio_edge_irq_unmask; | ||
640 | ct->chip.irq_set_type = mvebu_gpio_irq_set_type; | ||
641 | ct->handler = handle_edge_irq; | ||
642 | ct->chip.name = mvchip->chip.label; | ||
643 | |||
644 | irq_setup_generic_chip(gc, IRQ_MSK(ngpios), IRQ_GC_INIT_MASK_CACHE, | ||
645 | IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); | ||
646 | |||
647 | /* Setup irq domain on top of the generic chip. */ | ||
648 | mvchip->domain = irq_domain_add_legacy(np, mvchip->chip.ngpio, | ||
649 | mvchip->irqbase, 0, | ||
650 | &irq_domain_simple_ops, | ||
651 | mvchip); | ||
652 | if (!mvchip->domain) { | ||
653 | dev_err(&pdev->dev, "couldn't allocate irq domain %s (DT).\n", | ||
654 | mvchip->chip.label); | ||
655 | irq_remove_generic_chip(gc, IRQ_MSK(ngpios), IRQ_NOREQUEST, | ||
656 | IRQ_LEVEL | IRQ_NOPROBE); | ||
657 | kfree(gc); | ||
658 | kfree(mvchip->chip.label); | ||
659 | return -ENODEV; | ||
660 | } | ||
661 | |||
662 | return 0; | ||
663 | } | ||
664 | |||
665 | static struct platform_driver mvebu_gpio_driver = { | ||
666 | .driver = { | ||
667 | .name = "mvebu-gpio", | ||
668 | .owner = THIS_MODULE, | ||
669 | .of_match_table = mvebu_gpio_of_match, | ||
670 | }, | ||
671 | .probe = mvebu_gpio_probe, | ||
672 | .id_table = mvebu_gpio_ids, | ||
673 | }; | ||
674 | |||
675 | static int __init mvebu_gpio_init(void) | ||
676 | { | ||
677 | return platform_driver_register(&mvebu_gpio_driver); | ||
678 | } | ||
679 | postcore_initcall(mvebu_gpio_init); | ||
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c index 2f4b01bda87c..36509ae32083 100644 --- a/drivers/hwmon/gpio-fan.c +++ b/drivers/hwmon/gpio-fan.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/hwmon.h> | 31 | #include <linux/hwmon.h> |
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/gpio-fan.h> | 33 | #include <linux/gpio-fan.h> |
34 | #include <linux/of_platform.h> | ||
35 | #include <linux/of_gpio.h> | ||
34 | 36 | ||
35 | struct gpio_fan_data { | 37 | struct gpio_fan_data { |
36 | struct platform_device *pdev; | 38 | struct platform_device *pdev; |
@@ -400,14 +402,131 @@ static ssize_t show_name(struct device *dev, | |||
400 | 402 | ||
401 | static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); | 403 | static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); |
402 | 404 | ||
405 | |||
406 | #ifdef CONFIG_OF_GPIO | ||
407 | /* | ||
408 | * Translate OpenFirmware node properties into platform_data | ||
409 | */ | ||
410 | static int gpio_fan_get_of_pdata(struct device *dev, | ||
411 | struct gpio_fan_platform_data *pdata) | ||
412 | { | ||
413 | struct device_node *node; | ||
414 | struct gpio_fan_speed *speed; | ||
415 | unsigned *ctrl; | ||
416 | unsigned i; | ||
417 | u32 u; | ||
418 | struct property *prop; | ||
419 | const __be32 *p; | ||
420 | |||
421 | node = dev->of_node; | ||
422 | |||
423 | /* Fill GPIO pin array */ | ||
424 | pdata->num_ctrl = of_gpio_count(node); | ||
425 | if (!pdata->num_ctrl) { | ||
426 | dev_err(dev, "gpios DT property empty / missing"); | ||
427 | return -ENODEV; | ||
428 | } | ||
429 | ctrl = devm_kzalloc(dev, pdata->num_ctrl * sizeof(unsigned), | ||
430 | GFP_KERNEL); | ||
431 | if (!ctrl) | ||
432 | return -ENOMEM; | ||
433 | for (i = 0; i < pdata->num_ctrl; i++) { | ||
434 | int val; | ||
435 | |||
436 | val = of_get_gpio(node, i); | ||
437 | if (val < 0) | ||
438 | return val; | ||
439 | ctrl[i] = val; | ||
440 | } | ||
441 | pdata->ctrl = ctrl; | ||
442 | |||
443 | /* Get number of RPM/ctrl_val pairs in speed map */ | ||
444 | prop = of_find_property(node, "gpio-fan,speed-map", &i); | ||
445 | if (!prop) { | ||
446 | dev_err(dev, "gpio-fan,speed-map DT property missing"); | ||
447 | return -ENODEV; | ||
448 | } | ||
449 | i = i / sizeof(u32); | ||
450 | if (i == 0 || i & 1) { | ||
451 | dev_err(dev, "gpio-fan,speed-map contains zero/odd number of entries"); | ||
452 | return -ENODEV; | ||
453 | } | ||
454 | pdata->num_speed = i / 2; | ||
455 | |||
456 | /* | ||
457 | * Populate speed map | ||
458 | * Speed map is in the form <RPM ctrl_val RPM ctrl_val ...> | ||
459 | * this needs splitting into pairs to create gpio_fan_speed structs | ||
460 | */ | ||
461 | speed = devm_kzalloc(dev, | ||
462 | pdata->num_speed * sizeof(struct gpio_fan_speed), | ||
463 | GFP_KERNEL); | ||
464 | if (!speed) | ||
465 | return -ENOMEM; | ||
466 | p = NULL; | ||
467 | for (i = 0; i < pdata->num_speed; i++) { | ||
468 | p = of_prop_next_u32(prop, p, &u); | ||
469 | if (!p) | ||
470 | return -ENODEV; | ||
471 | speed[i].rpm = u; | ||
472 | p = of_prop_next_u32(prop, p, &u); | ||
473 | if (!p) | ||
474 | return -ENODEV; | ||
475 | speed[i].ctrl_val = u; | ||
476 | } | ||
477 | pdata->speed = speed; | ||
478 | |||
479 | /* Alarm GPIO if one exists */ | ||
480 | if (of_gpio_named_count(node, "alarm-gpios")) { | ||
481 | struct gpio_fan_alarm *alarm; | ||
482 | int val; | ||
483 | enum of_gpio_flags flags; | ||
484 | |||
485 | alarm = devm_kzalloc(dev, sizeof(struct gpio_fan_alarm), | ||
486 | GFP_KERNEL); | ||
487 | if (!alarm) | ||
488 | return -ENOMEM; | ||
489 | |||
490 | val = of_get_named_gpio_flags(node, "alarm-gpios", 0, &flags); | ||
491 | if (val < 0) | ||
492 | return val; | ||
493 | alarm->gpio = val; | ||
494 | alarm->active_low = flags & OF_GPIO_ACTIVE_LOW; | ||
495 | |||
496 | pdata->alarm = alarm; | ||
497 | } | ||
498 | |||
499 | return 0; | ||
500 | } | ||
501 | |||
502 | static struct of_device_id of_gpio_fan_match[] __devinitdata = { | ||
503 | { .compatible = "gpio-fan", }, | ||
504 | {}, | ||
505 | }; | ||
506 | #endif /* CONFIG_OF_GPIO */ | ||
507 | |||
403 | static int __devinit gpio_fan_probe(struct platform_device *pdev) | 508 | static int __devinit gpio_fan_probe(struct platform_device *pdev) |
404 | { | 509 | { |
405 | int err; | 510 | int err; |
406 | struct gpio_fan_data *fan_data; | 511 | struct gpio_fan_data *fan_data; |
407 | struct gpio_fan_platform_data *pdata = pdev->dev.platform_data; | 512 | struct gpio_fan_platform_data *pdata = pdev->dev.platform_data; |
408 | 513 | ||
514 | #ifdef CONFIG_OF_GPIO | ||
515 | if (!pdata) { | ||
516 | pdata = devm_kzalloc(&pdev->dev, | ||
517 | sizeof(struct gpio_fan_platform_data), | ||
518 | GFP_KERNEL); | ||
519 | if (!pdata) | ||
520 | return -ENOMEM; | ||
521 | |||
522 | err = gpio_fan_get_of_pdata(&pdev->dev, pdata); | ||
523 | if (err) | ||
524 | return err; | ||
525 | } | ||
526 | #else /* CONFIG_OF_GPIO */ | ||
409 | if (!pdata) | 527 | if (!pdata) |
410 | return -EINVAL; | 528 | return -EINVAL; |
529 | #endif /* CONFIG_OF_GPIO */ | ||
411 | 530 | ||
412 | fan_data = devm_kzalloc(&pdev->dev, sizeof(struct gpio_fan_data), | 531 | fan_data = devm_kzalloc(&pdev->dev, sizeof(struct gpio_fan_data), |
413 | GFP_KERNEL); | 532 | GFP_KERNEL); |
@@ -511,6 +630,7 @@ static struct platform_driver gpio_fan_driver = { | |||
511 | .driver = { | 630 | .driver = { |
512 | .name = "gpio-fan", | 631 | .name = "gpio-fan", |
513 | .pm = GPIO_FAN_PM, | 632 | .pm = GPIO_FAN_PM, |
633 | .of_match_table = of_match_ptr(of_gpio_fan_match), | ||
514 | }, | 634 | }, |
515 | }; | 635 | }; |
516 | 636 | ||
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 1ef6e1e8c6c6..33e3df9e39ca 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig | |||
@@ -175,6 +175,28 @@ config PINCTRL_EXYNOS4 | |||
175 | bool "Pinctrl driver data for Exynos4 SoC" | 175 | bool "Pinctrl driver data for Exynos4 SoC" |
176 | select PINCTRL_SAMSUNG | 176 | select PINCTRL_SAMSUNG |
177 | 177 | ||
178 | config PINCTRL_MVEBU | ||
179 | bool | ||
180 | depends on ARCH_MVEBU | ||
181 | select PINMUX | ||
182 | select PINCONF | ||
183 | |||
184 | config PINCTRL_DOVE | ||
185 | bool | ||
186 | select PINCTRL_MVEBU | ||
187 | |||
188 | config PINCTRL_KIRKWOOD | ||
189 | bool | ||
190 | select PINCTRL_MVEBU | ||
191 | |||
192 | config PINCTRL_ARMADA_370 | ||
193 | bool | ||
194 | select PINCTRL_MVEBU | ||
195 | |||
196 | config PINCTRL_ARMADA_XP | ||
197 | bool | ||
198 | select PINCTRL_MVEBU | ||
199 | |||
178 | source "drivers/pinctrl/spear/Kconfig" | 200 | source "drivers/pinctrl/spear/Kconfig" |
179 | 201 | ||
180 | endmenu | 202 | endmenu |
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index 698527dce29d..f162e0196300 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile | |||
@@ -35,5 +35,10 @@ obj-$(CONFIG_PINCTRL_U300) += pinctrl-u300.o | |||
35 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o | 35 | obj-$(CONFIG_PINCTRL_COH901) += pinctrl-coh901.o |
36 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o | 36 | obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o |
37 | obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o | 37 | obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o |
38 | obj-$(CONFIG_PINCTRL_MVEBU) += pinctrl-mvebu.o | ||
39 | obj-$(CONFIG_PINCTRL_DOVE) += pinctrl-dove.o | ||
40 | obj-$(CONFIG_PINCTRL_KIRKWOOD) += pinctrl-kirkwood.o | ||
41 | obj-$(CONFIG_PINCTRL_ARMADA_370) += pinctrl-armada-370.o | ||
42 | obj-$(CONFIG_PINCTRL_ARMADA_XP) += pinctrl-armada-xp.o | ||
38 | 43 | ||
39 | obj-$(CONFIG_PLAT_SPEAR) += spear/ | 44 | obj-$(CONFIG_PLAT_SPEAR) += spear/ |
diff --git a/drivers/pinctrl/pinctrl-armada-370.c b/drivers/pinctrl/pinctrl-armada-370.c new file mode 100644 index 000000000000..c907647de6ad --- /dev/null +++ b/drivers/pinctrl/pinctrl-armada-370.c | |||
@@ -0,0 +1,421 @@ | |||
1 | /* | ||
2 | * Marvell Armada 370 pinctrl driver based on mvebu pinctrl core | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/err.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/clk.h> | ||
20 | #include <linux/of.h> | ||
21 | #include <linux/of_device.h> | ||
22 | #include <linux/pinctrl/pinctrl.h> | ||
23 | |||
24 | #include "pinctrl-mvebu.h" | ||
25 | |||
26 | static struct mvebu_mpp_mode mv88f6710_mpp_modes[] = { | ||
27 | MPP_MODE(0, | ||
28 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
29 | MPP_FUNCTION(0x1, "uart0", "rxd")), | ||
30 | MPP_MODE(1, | ||
31 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
32 | MPP_FUNCTION(0x1, "uart0", "txd")), | ||
33 | MPP_MODE(2, | ||
34 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
35 | MPP_FUNCTION(0x1, "i2c0", "sck"), | ||
36 | MPP_FUNCTION(0x2, "uart0", "txd")), | ||
37 | MPP_MODE(3, | ||
38 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
39 | MPP_FUNCTION(0x1, "i2c0", "sda"), | ||
40 | MPP_FUNCTION(0x2, "uart0", "rxd")), | ||
41 | MPP_MODE(4, | ||
42 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
43 | MPP_FUNCTION(0x1, "cpu_pd", "vdd")), | ||
44 | MPP_MODE(5, | ||
45 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
46 | MPP_FUNCTION(0x1, "ge0", "txclko"), | ||
47 | MPP_FUNCTION(0x2, "uart1", "txd"), | ||
48 | MPP_FUNCTION(0x4, "spi1", "clk"), | ||
49 | MPP_FUNCTION(0x5, "audio", "mclk")), | ||
50 | MPP_MODE(6, | ||
51 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
52 | MPP_FUNCTION(0x1, "ge0", "txd0"), | ||
53 | MPP_FUNCTION(0x2, "sata0", "prsnt"), | ||
54 | MPP_FUNCTION(0x4, "tdm", "rst"), | ||
55 | MPP_FUNCTION(0x5, "audio", "sdo")), | ||
56 | MPP_MODE(7, | ||
57 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
58 | MPP_FUNCTION(0x1, "ge0", "txd1"), | ||
59 | MPP_FUNCTION(0x4, "tdm", "tdx"), | ||
60 | MPP_FUNCTION(0x5, "audio", "lrclk")), | ||
61 | MPP_MODE(8, | ||
62 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
63 | MPP_FUNCTION(0x1, "ge0", "txd2"), | ||
64 | MPP_FUNCTION(0x2, "uart0", "rts"), | ||
65 | MPP_FUNCTION(0x4, "tdm", "drx"), | ||
66 | MPP_FUNCTION(0x5, "audio", "bclk")), | ||
67 | MPP_MODE(9, | ||
68 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
69 | MPP_FUNCTION(0x1, "ge0", "txd3"), | ||
70 | MPP_FUNCTION(0x2, "uart1", "txd"), | ||
71 | MPP_FUNCTION(0x3, "sd0", "clk"), | ||
72 | MPP_FUNCTION(0x5, "audio", "spdifo")), | ||
73 | MPP_MODE(10, | ||
74 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
75 | MPP_FUNCTION(0x1, "ge0", "txctl"), | ||
76 | MPP_FUNCTION(0x2, "uart0", "cts"), | ||
77 | MPP_FUNCTION(0x4, "tdm", "fsync"), | ||
78 | MPP_FUNCTION(0x5, "audio", "sdi")), | ||
79 | MPP_MODE(11, | ||
80 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
81 | MPP_FUNCTION(0x1, "ge0", "rxd0"), | ||
82 | MPP_FUNCTION(0x2, "uart1", "rxd"), | ||
83 | MPP_FUNCTION(0x3, "sd0", "cmd"), | ||
84 | MPP_FUNCTION(0x4, "spi0", "cs1"), | ||
85 | MPP_FUNCTION(0x5, "sata1", "prsnt"), | ||
86 | MPP_FUNCTION(0x6, "spi1", "cs1")), | ||
87 | MPP_MODE(12, | ||
88 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
89 | MPP_FUNCTION(0x1, "ge0", "rxd1"), | ||
90 | MPP_FUNCTION(0x2, "i2c1", "sda"), | ||
91 | MPP_FUNCTION(0x3, "sd0", "d0"), | ||
92 | MPP_FUNCTION(0x4, "spi1", "cs0"), | ||
93 | MPP_FUNCTION(0x5, "audio", "spdifi")), | ||
94 | MPP_MODE(13, | ||
95 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
96 | MPP_FUNCTION(0x1, "ge0", "rxd2"), | ||
97 | MPP_FUNCTION(0x2, "i2c1", "sck"), | ||
98 | MPP_FUNCTION(0x3, "sd0", "d1"), | ||
99 | MPP_FUNCTION(0x4, "tdm", "pclk"), | ||
100 | MPP_FUNCTION(0x5, "audio", "rmclk")), | ||
101 | MPP_MODE(14, | ||
102 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
103 | MPP_FUNCTION(0x1, "ge0", "rxd3"), | ||
104 | MPP_FUNCTION(0x2, "pcie", "clkreq0"), | ||
105 | MPP_FUNCTION(0x3, "sd0", "d2"), | ||
106 | MPP_FUNCTION(0x4, "spi1", "mosi"), | ||
107 | MPP_FUNCTION(0x5, "spi0", "cs2")), | ||
108 | MPP_MODE(15, | ||
109 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
110 | MPP_FUNCTION(0x1, "ge0", "rxctl"), | ||
111 | MPP_FUNCTION(0x2, "pcie", "clkreq1"), | ||
112 | MPP_FUNCTION(0x3, "sd0", "d3"), | ||
113 | MPP_FUNCTION(0x4, "spi1", "miso"), | ||
114 | MPP_FUNCTION(0x5, "spi0", "cs3")), | ||
115 | MPP_MODE(16, | ||
116 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
117 | MPP_FUNCTION(0x1, "ge0", "rxclk"), | ||
118 | MPP_FUNCTION(0x2, "uart1", "rxd"), | ||
119 | MPP_FUNCTION(0x4, "tdm", "int"), | ||
120 | MPP_FUNCTION(0x5, "audio", "extclk")), | ||
121 | MPP_MODE(17, | ||
122 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
123 | MPP_FUNCTION(0x1, "ge", "mdc")), | ||
124 | MPP_MODE(18, | ||
125 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
126 | MPP_FUNCTION(0x1, "ge", "mdio")), | ||
127 | MPP_MODE(19, | ||
128 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
129 | MPP_FUNCTION(0x1, "ge0", "txclk"), | ||
130 | MPP_FUNCTION(0x2, "ge1", "txclkout"), | ||
131 | MPP_FUNCTION(0x4, "tdm", "pclk")), | ||
132 | MPP_MODE(20, | ||
133 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
134 | MPP_FUNCTION(0x1, "ge0", "txd4"), | ||
135 | MPP_FUNCTION(0x2, "ge1", "txd0")), | ||
136 | MPP_MODE(21, | ||
137 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
138 | MPP_FUNCTION(0x1, "ge0", "txd5"), | ||
139 | MPP_FUNCTION(0x2, "ge1", "txd1"), | ||
140 | MPP_FUNCTION(0x4, "uart1", "txd")), | ||
141 | MPP_MODE(22, | ||
142 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
143 | MPP_FUNCTION(0x1, "ge0", "txd6"), | ||
144 | MPP_FUNCTION(0x2, "ge1", "txd2"), | ||
145 | MPP_FUNCTION(0x4, "uart0", "rts")), | ||
146 | MPP_MODE(23, | ||
147 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
148 | MPP_FUNCTION(0x1, "ge0", "txd7"), | ||
149 | MPP_FUNCTION(0x2, "ge1", "txd3"), | ||
150 | MPP_FUNCTION(0x4, "spi1", "mosi")), | ||
151 | MPP_MODE(24, | ||
152 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
153 | MPP_FUNCTION(0x1, "ge0", "col"), | ||
154 | MPP_FUNCTION(0x2, "ge1", "txctl"), | ||
155 | MPP_FUNCTION(0x4, "spi1", "cs0")), | ||
156 | MPP_MODE(25, | ||
157 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
158 | MPP_FUNCTION(0x1, "ge0", "rxerr"), | ||
159 | MPP_FUNCTION(0x2, "ge1", "rxd0"), | ||
160 | MPP_FUNCTION(0x4, "uart1", "rxd")), | ||
161 | MPP_MODE(26, | ||
162 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
163 | MPP_FUNCTION(0x1, "ge0", "crs"), | ||
164 | MPP_FUNCTION(0x2, "ge1", "rxd1"), | ||
165 | MPP_FUNCTION(0x4, "spi1", "miso")), | ||
166 | MPP_MODE(27, | ||
167 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
168 | MPP_FUNCTION(0x1, "ge0", "rxd4"), | ||
169 | MPP_FUNCTION(0x2, "ge1", "rxd2"), | ||
170 | MPP_FUNCTION(0x4, "uart0", "cts")), | ||
171 | MPP_MODE(28, | ||
172 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
173 | MPP_FUNCTION(0x1, "ge0", "rxd5"), | ||
174 | MPP_FUNCTION(0x2, "ge1", "rxd3")), | ||
175 | MPP_MODE(29, | ||
176 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
177 | MPP_FUNCTION(0x1, "ge0", "rxd6"), | ||
178 | MPP_FUNCTION(0x2, "ge1", "rxctl"), | ||
179 | MPP_FUNCTION(0x4, "i2c1", "sda")), | ||
180 | MPP_MODE(30, | ||
181 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
182 | MPP_FUNCTION(0x1, "ge0", "rxd7"), | ||
183 | MPP_FUNCTION(0x2, "ge1", "rxclk"), | ||
184 | MPP_FUNCTION(0x4, "i2c1", "sck")), | ||
185 | MPP_MODE(31, | ||
186 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
187 | MPP_FUNCTION(0x3, "tclk", NULL), | ||
188 | MPP_FUNCTION(0x4, "ge0", "txerr")), | ||
189 | MPP_MODE(32, | ||
190 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
191 | MPP_FUNCTION(0x1, "spi0", "cs0")), | ||
192 | MPP_MODE(33, | ||
193 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
194 | MPP_FUNCTION(0x1, "dev", "bootcs"), | ||
195 | MPP_FUNCTION(0x2, "spi0", "cs0")), | ||
196 | MPP_MODE(34, | ||
197 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
198 | MPP_FUNCTION(0x1, "dev", "wen0"), | ||
199 | MPP_FUNCTION(0x2, "spi0", "mosi")), | ||
200 | MPP_MODE(35, | ||
201 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
202 | MPP_FUNCTION(0x1, "dev", "oen"), | ||
203 | MPP_FUNCTION(0x2, "spi0", "sck")), | ||
204 | MPP_MODE(36, | ||
205 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
206 | MPP_FUNCTION(0x1, "dev", "a1"), | ||
207 | MPP_FUNCTION(0x2, "spi0", "miso")), | ||
208 | MPP_MODE(37, | ||
209 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
210 | MPP_FUNCTION(0x1, "dev", "a0"), | ||
211 | MPP_FUNCTION(0x2, "sata0", "prsnt")), | ||
212 | MPP_MODE(38, | ||
213 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
214 | MPP_FUNCTION(0x1, "dev", "ready"), | ||
215 | MPP_FUNCTION(0x2, "uart1", "cts"), | ||
216 | MPP_FUNCTION(0x3, "uart0", "cts")), | ||
217 | MPP_MODE(39, | ||
218 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
219 | MPP_FUNCTION(0x1, "dev", "ad0"), | ||
220 | MPP_FUNCTION(0x2, "audio", "spdifo")), | ||
221 | MPP_MODE(40, | ||
222 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
223 | MPP_FUNCTION(0x1, "dev", "ad1"), | ||
224 | MPP_FUNCTION(0x2, "uart1", "rts"), | ||
225 | MPP_FUNCTION(0x3, "uart0", "rts")), | ||
226 | MPP_MODE(41, | ||
227 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
228 | MPP_FUNCTION(0x1, "dev", "ad2"), | ||
229 | MPP_FUNCTION(0x2, "uart1", "rxd")), | ||
230 | MPP_MODE(42, | ||
231 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
232 | MPP_FUNCTION(0x1, "dev", "ad3"), | ||
233 | MPP_FUNCTION(0x2, "uart1", "txd")), | ||
234 | MPP_MODE(43, | ||
235 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
236 | MPP_FUNCTION(0x1, "dev", "ad4"), | ||
237 | MPP_FUNCTION(0x2, "audio", "bclk")), | ||
238 | MPP_MODE(44, | ||
239 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
240 | MPP_FUNCTION(0x1, "dev", "ad5"), | ||
241 | MPP_FUNCTION(0x2, "audio", "mclk")), | ||
242 | MPP_MODE(45, | ||
243 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
244 | MPP_FUNCTION(0x1, "dev", "ad6"), | ||
245 | MPP_FUNCTION(0x2, "audio", "lrclk")), | ||
246 | MPP_MODE(46, | ||
247 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
248 | MPP_FUNCTION(0x1, "dev", "ad7"), | ||
249 | MPP_FUNCTION(0x2, "audio", "sdo")), | ||
250 | MPP_MODE(47, | ||
251 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
252 | MPP_FUNCTION(0x1, "dev", "ad8"), | ||
253 | MPP_FUNCTION(0x3, "sd0", "clk"), | ||
254 | MPP_FUNCTION(0x5, "audio", "spdifo")), | ||
255 | MPP_MODE(48, | ||
256 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
257 | MPP_FUNCTION(0x1, "dev", "ad9"), | ||
258 | MPP_FUNCTION(0x2, "uart0", "rts"), | ||
259 | MPP_FUNCTION(0x3, "sd0", "cmd"), | ||
260 | MPP_FUNCTION(0x4, "sata1", "prsnt"), | ||
261 | MPP_FUNCTION(0x5, "spi0", "cs1")), | ||
262 | MPP_MODE(49, | ||
263 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
264 | MPP_FUNCTION(0x1, "dev", "ad10"), | ||
265 | MPP_FUNCTION(0x2, "pcie", "clkreq1"), | ||
266 | MPP_FUNCTION(0x3, "sd0", "d0"), | ||
267 | MPP_FUNCTION(0x4, "spi1", "cs0"), | ||
268 | MPP_FUNCTION(0x5, "audio", "spdifi")), | ||
269 | MPP_MODE(50, | ||
270 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
271 | MPP_FUNCTION(0x1, "dev", "ad11"), | ||
272 | MPP_FUNCTION(0x2, "uart0", "cts"), | ||
273 | MPP_FUNCTION(0x3, "sd0", "d1"), | ||
274 | MPP_FUNCTION(0x4, "spi1", "miso"), | ||
275 | MPP_FUNCTION(0x5, "audio", "rmclk")), | ||
276 | MPP_MODE(51, | ||
277 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
278 | MPP_FUNCTION(0x1, "dev", "ad12"), | ||
279 | MPP_FUNCTION(0x2, "i2c1", "sda"), | ||
280 | MPP_FUNCTION(0x3, "sd0", "d2"), | ||
281 | MPP_FUNCTION(0x4, "spi1", "mosi")), | ||
282 | MPP_MODE(52, | ||
283 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
284 | MPP_FUNCTION(0x1, "dev", "ad13"), | ||
285 | MPP_FUNCTION(0x2, "i2c1", "sck"), | ||
286 | MPP_FUNCTION(0x3, "sd0", "d3"), | ||
287 | MPP_FUNCTION(0x4, "spi1", "sck")), | ||
288 | MPP_MODE(53, | ||
289 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
290 | MPP_FUNCTION(0x1, "dev", "ad14"), | ||
291 | MPP_FUNCTION(0x2, "sd0", "clk"), | ||
292 | MPP_FUNCTION(0x3, "tdm", "pclk"), | ||
293 | MPP_FUNCTION(0x4, "spi0", "cs2"), | ||
294 | MPP_FUNCTION(0x5, "pcie", "clkreq1")), | ||
295 | MPP_MODE(54, | ||
296 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
297 | MPP_FUNCTION(0x1, "dev", "ad15"), | ||
298 | MPP_FUNCTION(0x3, "tdm", "dtx")), | ||
299 | MPP_MODE(55, | ||
300 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
301 | MPP_FUNCTION(0x1, "dev", "cs1"), | ||
302 | MPP_FUNCTION(0x2, "uart1", "txd"), | ||
303 | MPP_FUNCTION(0x3, "tdm", "rst"), | ||
304 | MPP_FUNCTION(0x4, "sata1", "prsnt"), | ||
305 | MPP_FUNCTION(0x5, "sata0", "prsnt")), | ||
306 | MPP_MODE(56, | ||
307 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
308 | MPP_FUNCTION(0x1, "dev", "cs2"), | ||
309 | MPP_FUNCTION(0x2, "uart1", "cts"), | ||
310 | MPP_FUNCTION(0x3, "uart0", "cts"), | ||
311 | MPP_FUNCTION(0x4, "spi0", "cs3"), | ||
312 | MPP_FUNCTION(0x5, "pcie", "clkreq0"), | ||
313 | MPP_FUNCTION(0x6, "spi1", "cs1")), | ||
314 | MPP_MODE(57, | ||
315 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
316 | MPP_FUNCTION(0x1, "dev", "cs3"), | ||
317 | MPP_FUNCTION(0x2, "uart1", "rxd"), | ||
318 | MPP_FUNCTION(0x3, "tdm", "fsync"), | ||
319 | MPP_FUNCTION(0x4, "sata0", "prsnt"), | ||
320 | MPP_FUNCTION(0x5, "audio", "sdo")), | ||
321 | MPP_MODE(58, | ||
322 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
323 | MPP_FUNCTION(0x1, "dev", "cs0"), | ||
324 | MPP_FUNCTION(0x2, "uart1", "rts"), | ||
325 | MPP_FUNCTION(0x3, "tdm", "int"), | ||
326 | MPP_FUNCTION(0x5, "audio", "extclk"), | ||
327 | MPP_FUNCTION(0x6, "uart0", "rts")), | ||
328 | MPP_MODE(59, | ||
329 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
330 | MPP_FUNCTION(0x1, "dev", "ale0"), | ||
331 | MPP_FUNCTION(0x2, "uart1", "rts"), | ||
332 | MPP_FUNCTION(0x3, "uart0", "rts"), | ||
333 | MPP_FUNCTION(0x5, "audio", "bclk")), | ||
334 | MPP_MODE(60, | ||
335 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
336 | MPP_FUNCTION(0x1, "dev", "ale1"), | ||
337 | MPP_FUNCTION(0x2, "uart1", "rxd"), | ||
338 | MPP_FUNCTION(0x3, "sata0", "prsnt"), | ||
339 | MPP_FUNCTION(0x4, "pcie", "rst-out"), | ||
340 | MPP_FUNCTION(0x5, "audio", "sdi")), | ||
341 | MPP_MODE(61, | ||
342 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
343 | MPP_FUNCTION(0x1, "dev", "wen1"), | ||
344 | MPP_FUNCTION(0x2, "uart1", "txd"), | ||
345 | MPP_FUNCTION(0x5, "audio", "rclk")), | ||
346 | MPP_MODE(62, | ||
347 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
348 | MPP_FUNCTION(0x1, "dev", "a2"), | ||
349 | MPP_FUNCTION(0x2, "uart1", "cts"), | ||
350 | MPP_FUNCTION(0x3, "tdm", "drx"), | ||
351 | MPP_FUNCTION(0x4, "pcie", "clkreq0"), | ||
352 | MPP_FUNCTION(0x5, "audio", "mclk"), | ||
353 | MPP_FUNCTION(0x6, "uart0", "cts")), | ||
354 | MPP_MODE(63, | ||
355 | MPP_FUNCTION(0x0, "gpo", NULL), | ||
356 | MPP_FUNCTION(0x1, "spi0", "sck"), | ||
357 | MPP_FUNCTION(0x2, "tclk", NULL)), | ||
358 | MPP_MODE(64, | ||
359 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
360 | MPP_FUNCTION(0x1, "spi0", "miso"), | ||
361 | MPP_FUNCTION(0x2, "spi0-1", "cs1")), | ||
362 | MPP_MODE(65, | ||
363 | MPP_FUNCTION(0x0, "gpio", NULL), | ||
364 | MPP_FUNCTION(0x1, "spi0", "mosi"), | ||
365 | MPP_FUNCTION(0x2, "spi0-1", "cs2")), | ||
366 | }; | ||
367 | |||
368 | static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info; | ||
369 | |||
370 | static struct of_device_id armada_370_pinctrl_of_match[] __devinitdata = { | ||
371 | { .compatible = "marvell,mv88f6710-pinctrl" }, | ||
372 | { }, | ||
373 | }; | ||
374 | |||
375 | static struct mvebu_mpp_ctrl mv88f6710_mpp_controls[] = { | ||
376 | MPP_REG_CTRL(0, 65), | ||
377 | }; | ||
378 | |||
379 | static struct pinctrl_gpio_range mv88f6710_mpp_gpio_ranges[] = { | ||
380 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
381 | MPP_GPIO_RANGE(1, 32, 32, 32), | ||
382 | MPP_GPIO_RANGE(2, 64, 64, 2), | ||
383 | }; | ||
384 | |||
385 | static int __devinit armada_370_pinctrl_probe(struct platform_device *pdev) | ||
386 | { | ||
387 | struct mvebu_pinctrl_soc_info *soc = &armada_370_pinctrl_info; | ||
388 | |||
389 | soc->variant = 0; /* no variants for Armada 370 */ | ||
390 | soc->controls = mv88f6710_mpp_controls; | ||
391 | soc->ncontrols = ARRAY_SIZE(mv88f6710_mpp_controls); | ||
392 | soc->modes = mv88f6710_mpp_modes; | ||
393 | soc->nmodes = ARRAY_SIZE(mv88f6710_mpp_modes); | ||
394 | soc->gpioranges = mv88f6710_mpp_gpio_ranges; | ||
395 | soc->ngpioranges = ARRAY_SIZE(mv88f6710_mpp_gpio_ranges); | ||
396 | |||
397 | pdev->dev.platform_data = soc; | ||
398 | |||
399 | return mvebu_pinctrl_probe(pdev); | ||
400 | } | ||
401 | |||
402 | static int __devexit armada_370_pinctrl_remove(struct platform_device *pdev) | ||
403 | { | ||
404 | return mvebu_pinctrl_remove(pdev); | ||
405 | } | ||
406 | |||
407 | static struct platform_driver armada_370_pinctrl_driver = { | ||
408 | .driver = { | ||
409 | .name = "armada-370-pinctrl", | ||
410 | .owner = THIS_MODULE, | ||
411 | .of_match_table = of_match_ptr(armada_370_pinctrl_of_match), | ||
412 | }, | ||
413 | .probe = armada_370_pinctrl_probe, | ||
414 | .remove = __devexit_p(armada_370_pinctrl_remove), | ||
415 | }; | ||
416 | |||
417 | module_platform_driver(armada_370_pinctrl_driver); | ||
418 | |||
419 | MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>"); | ||
420 | MODULE_DESCRIPTION("Marvell Armada 370 pinctrl driver"); | ||
421 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-armada-xp.c b/drivers/pinctrl/pinctrl-armada-xp.c new file mode 100644 index 000000000000..40bd52a46b4e --- /dev/null +++ b/drivers/pinctrl/pinctrl-armada-xp.c | |||
@@ -0,0 +1,468 @@ | |||
1 | /* | ||
2 | * Marvell Armada XP pinctrl driver based on mvebu pinctrl core | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Thomas Petazzoni <thomas.petazzoni@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 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 file supports the three variants of Armada XP SoCs that are | ||
14 | * available: mv78230, mv78260 and mv78460. From a pin muxing | ||
15 | * perspective, the mv78230 has 49 MPP pins. The mv78260 and mv78460 | ||
16 | * both have 67 MPP pins (more GPIOs and address lines for the memory | ||
17 | * bus mainly). The only difference between the mv78260 and the | ||
18 | * mv78460 in terms of pin muxing is the addition of two functions on | ||
19 | * pins 43 and 56 to access the VDD of the CPU2 and 3 (mv78260 has two | ||
20 | * cores, mv78460 has four cores). | ||
21 | */ | ||
22 | |||
23 | #include <linux/err.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/module.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/clk.h> | ||
29 | #include <linux/of.h> | ||
30 | #include <linux/of_device.h> | ||
31 | #include <linux/pinctrl/pinctrl.h> | ||
32 | #include <linux/bitops.h> | ||
33 | |||
34 | #include "pinctrl-mvebu.h" | ||
35 | |||
36 | enum armada_xp_variant { | ||
37 | V_MV78230 = BIT(0), | ||
38 | V_MV78260 = BIT(1), | ||
39 | V_MV78460 = BIT(2), | ||
40 | V_MV78230_PLUS = (V_MV78230 | V_MV78260 | V_MV78460), | ||
41 | V_MV78260_PLUS = (V_MV78260 | V_MV78460), | ||
42 | }; | ||
43 | |||
44 | static struct mvebu_mpp_mode armada_xp_mpp_modes[] = { | ||
45 | MPP_MODE(0, | ||
46 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
47 | MPP_VAR_FUNCTION(0x1, "ge0", "txclko", V_MV78230_PLUS), | ||
48 | MPP_VAR_FUNCTION(0x4, "lcd", "d0", V_MV78230_PLUS)), | ||
49 | MPP_MODE(1, | ||
50 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
51 | MPP_VAR_FUNCTION(0x1, "ge0", "txd0", V_MV78230_PLUS), | ||
52 | MPP_VAR_FUNCTION(0x4, "lcd", "d1", V_MV78230_PLUS)), | ||
53 | MPP_MODE(2, | ||
54 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
55 | MPP_VAR_FUNCTION(0x1, "ge0", "txd1", V_MV78230_PLUS), | ||
56 | MPP_VAR_FUNCTION(0x4, "lcd", "d2", V_MV78230_PLUS)), | ||
57 | MPP_MODE(3, | ||
58 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
59 | MPP_VAR_FUNCTION(0x1, "ge0", "txd2", V_MV78230_PLUS), | ||
60 | MPP_VAR_FUNCTION(0x4, "lcd", "d3", V_MV78230_PLUS)), | ||
61 | MPP_MODE(4, | ||
62 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
63 | MPP_VAR_FUNCTION(0x1, "ge0", "txd3", V_MV78230_PLUS), | ||
64 | MPP_VAR_FUNCTION(0x4, "lcd", "d4", V_MV78230_PLUS)), | ||
65 | MPP_MODE(5, | ||
66 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
67 | MPP_VAR_FUNCTION(0x1, "ge0", "txctl", V_MV78230_PLUS), | ||
68 | MPP_VAR_FUNCTION(0x4, "lcd", "d5", V_MV78230_PLUS)), | ||
69 | MPP_MODE(6, | ||
70 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
71 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd0", V_MV78230_PLUS), | ||
72 | MPP_VAR_FUNCTION(0x4, "lcd", "d6", V_MV78230_PLUS)), | ||
73 | MPP_MODE(7, | ||
74 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
75 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd1", V_MV78230_PLUS), | ||
76 | MPP_VAR_FUNCTION(0x4, "lcd", "d7", V_MV78230_PLUS)), | ||
77 | MPP_MODE(8, | ||
78 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
79 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd2", V_MV78230_PLUS), | ||
80 | MPP_VAR_FUNCTION(0x4, "lcd", "d8", V_MV78230_PLUS)), | ||
81 | MPP_MODE(9, | ||
82 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
83 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd3", V_MV78230_PLUS), | ||
84 | MPP_VAR_FUNCTION(0x4, "lcd", "d9", V_MV78230_PLUS)), | ||
85 | MPP_MODE(10, | ||
86 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
87 | MPP_VAR_FUNCTION(0x1, "ge0", "rxctl", V_MV78230_PLUS), | ||
88 | MPP_VAR_FUNCTION(0x4, "lcd", "d10", V_MV78230_PLUS)), | ||
89 | MPP_MODE(11, | ||
90 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
91 | MPP_VAR_FUNCTION(0x1, "ge0", "rxclk", V_MV78230_PLUS), | ||
92 | MPP_VAR_FUNCTION(0x4, "lcd", "d11", V_MV78230_PLUS)), | ||
93 | MPP_MODE(12, | ||
94 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
95 | MPP_VAR_FUNCTION(0x1, "ge0", "txd4", V_MV78230_PLUS), | ||
96 | MPP_VAR_FUNCTION(0x2, "ge1", "clkout", V_MV78230_PLUS), | ||
97 | MPP_VAR_FUNCTION(0x4, "lcd", "d12", V_MV78230_PLUS)), | ||
98 | MPP_MODE(13, | ||
99 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
100 | MPP_VAR_FUNCTION(0x1, "ge0", "txd5", V_MV78230_PLUS), | ||
101 | MPP_VAR_FUNCTION(0x2, "ge1", "txd0", V_MV78230_PLUS), | ||
102 | MPP_VAR_FUNCTION(0x4, "lcd", "d13", V_MV78230_PLUS)), | ||
103 | MPP_MODE(14, | ||
104 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
105 | MPP_VAR_FUNCTION(0x1, "ge0", "txd6", V_MV78230_PLUS), | ||
106 | MPP_VAR_FUNCTION(0x2, "ge1", "txd1", V_MV78230_PLUS), | ||
107 | MPP_VAR_FUNCTION(0x4, "lcd", "d14", V_MV78230_PLUS)), | ||
108 | MPP_MODE(15, | ||
109 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
110 | MPP_VAR_FUNCTION(0x1, "ge0", "txd7", V_MV78230_PLUS), | ||
111 | MPP_VAR_FUNCTION(0x2, "ge1", "txd2", V_MV78230_PLUS), | ||
112 | MPP_VAR_FUNCTION(0x4, "lcd", "d15", V_MV78230_PLUS)), | ||
113 | MPP_MODE(16, | ||
114 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
115 | MPP_VAR_FUNCTION(0x1, "ge0", "txclk", V_MV78230_PLUS), | ||
116 | MPP_VAR_FUNCTION(0x2, "ge1", "txd3", V_MV78230_PLUS), | ||
117 | MPP_VAR_FUNCTION(0x4, "lcd", "d16", V_MV78230_PLUS)), | ||
118 | MPP_MODE(17, | ||
119 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
120 | MPP_VAR_FUNCTION(0x1, "ge0", "col", V_MV78230_PLUS), | ||
121 | MPP_VAR_FUNCTION(0x2, "ge1", "txctl", V_MV78230_PLUS), | ||
122 | MPP_VAR_FUNCTION(0x4, "lcd", "d17", V_MV78230_PLUS)), | ||
123 | MPP_MODE(18, | ||
124 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
125 | MPP_VAR_FUNCTION(0x1, "ge0", "rxerr", V_MV78230_PLUS), | ||
126 | MPP_VAR_FUNCTION(0x2, "ge1", "rxd0", V_MV78230_PLUS), | ||
127 | MPP_VAR_FUNCTION(0x3, "ptp", "trig", V_MV78230_PLUS), | ||
128 | MPP_VAR_FUNCTION(0x4, "lcd", "d18", V_MV78230_PLUS)), | ||
129 | MPP_MODE(19, | ||
130 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
131 | MPP_VAR_FUNCTION(0x1, "ge0", "crs", V_MV78230_PLUS), | ||
132 | MPP_VAR_FUNCTION(0x2, "ge1", "rxd1", V_MV78230_PLUS), | ||
133 | MPP_VAR_FUNCTION(0x3, "ptp", "evreq", V_MV78230_PLUS), | ||
134 | MPP_VAR_FUNCTION(0x4, "lcd", "d19", V_MV78230_PLUS)), | ||
135 | MPP_MODE(20, | ||
136 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
137 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd4", V_MV78230_PLUS), | ||
138 | MPP_VAR_FUNCTION(0x2, "ge1", "rxd2", V_MV78230_PLUS), | ||
139 | MPP_VAR_FUNCTION(0x3, "ptp", "clk", V_MV78230_PLUS), | ||
140 | MPP_VAR_FUNCTION(0x4, "lcd", "d20", V_MV78230_PLUS)), | ||
141 | MPP_MODE(21, | ||
142 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
143 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd5", V_MV78230_PLUS), | ||
144 | MPP_VAR_FUNCTION(0x2, "ge1", "rxd3", V_MV78230_PLUS), | ||
145 | MPP_VAR_FUNCTION(0x3, "mem", "bat", V_MV78230_PLUS), | ||
146 | MPP_VAR_FUNCTION(0x4, "lcd", "d21", V_MV78230_PLUS)), | ||
147 | MPP_MODE(22, | ||
148 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
149 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd6", V_MV78230_PLUS), | ||
150 | MPP_VAR_FUNCTION(0x2, "ge1", "rxctl", V_MV78230_PLUS), | ||
151 | MPP_VAR_FUNCTION(0x3, "sata0", "prsnt", V_MV78230_PLUS), | ||
152 | MPP_VAR_FUNCTION(0x4, "lcd", "d22", V_MV78230_PLUS)), | ||
153 | MPP_MODE(23, | ||
154 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
155 | MPP_VAR_FUNCTION(0x1, "ge0", "rxd7", V_MV78230_PLUS), | ||
156 | MPP_VAR_FUNCTION(0x2, "ge1", "rxclk", V_MV78230_PLUS), | ||
157 | MPP_VAR_FUNCTION(0x3, "sata1", "prsnt", V_MV78230_PLUS), | ||
158 | MPP_VAR_FUNCTION(0x4, "lcd", "d23", V_MV78230_PLUS)), | ||
159 | MPP_MODE(24, | ||
160 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
161 | MPP_VAR_FUNCTION(0x1, "sata1", "prsnt", V_MV78230_PLUS), | ||
162 | MPP_VAR_FUNCTION(0x2, "nf", "bootcs-re", V_MV78230_PLUS), | ||
163 | MPP_VAR_FUNCTION(0x3, "tdm", "rst", V_MV78230_PLUS), | ||
164 | MPP_VAR_FUNCTION(0x4, "lcd", "hsync", V_MV78230_PLUS)), | ||
165 | MPP_MODE(25, | ||
166 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
167 | MPP_VAR_FUNCTION(0x1, "sata0", "prsnt", V_MV78230_PLUS), | ||
168 | MPP_VAR_FUNCTION(0x2, "nf", "bootcs-we", V_MV78230_PLUS), | ||
169 | MPP_VAR_FUNCTION(0x3, "tdm", "pclk", V_MV78230_PLUS), | ||
170 | MPP_VAR_FUNCTION(0x4, "lcd", "vsync", V_MV78230_PLUS)), | ||
171 | MPP_MODE(26, | ||
172 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
173 | MPP_VAR_FUNCTION(0x3, "tdm", "fsync", V_MV78230_PLUS), | ||
174 | MPP_VAR_FUNCTION(0x4, "lcd", "clk", V_MV78230_PLUS), | ||
175 | MPP_VAR_FUNCTION(0x5, "vdd", "cpu1-pd", V_MV78230_PLUS)), | ||
176 | MPP_MODE(27, | ||
177 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
178 | MPP_VAR_FUNCTION(0x1, "ptp", "trig", V_MV78230_PLUS), | ||
179 | MPP_VAR_FUNCTION(0x3, "tdm", "dtx", V_MV78230_PLUS), | ||
180 | MPP_VAR_FUNCTION(0x4, "lcd", "e", V_MV78230_PLUS)), | ||
181 | MPP_MODE(28, | ||
182 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
183 | MPP_VAR_FUNCTION(0x1, "ptp", "evreq", V_MV78230_PLUS), | ||
184 | MPP_VAR_FUNCTION(0x3, "tdm", "drx", V_MV78230_PLUS), | ||
185 | MPP_VAR_FUNCTION(0x4, "lcd", "pwm", V_MV78230_PLUS)), | ||
186 | MPP_MODE(29, | ||
187 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
188 | MPP_VAR_FUNCTION(0x1, "ptp", "clk", V_MV78230_PLUS), | ||
189 | MPP_VAR_FUNCTION(0x3, "tdm", "int0", V_MV78230_PLUS), | ||
190 | MPP_VAR_FUNCTION(0x4, "lcd", "ref-clk", V_MV78230_PLUS), | ||
191 | MPP_VAR_FUNCTION(0x5, "vdd", "cpu0-pd", V_MV78230_PLUS)), | ||
192 | MPP_MODE(30, | ||
193 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
194 | MPP_VAR_FUNCTION(0x1, "sd0", "clk", V_MV78230_PLUS), | ||
195 | MPP_VAR_FUNCTION(0x3, "tdm", "int1", V_MV78230_PLUS)), | ||
196 | MPP_MODE(31, | ||
197 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
198 | MPP_VAR_FUNCTION(0x1, "sd0", "cmd", V_MV78230_PLUS), | ||
199 | MPP_VAR_FUNCTION(0x3, "tdm", "int2", V_MV78230_PLUS), | ||
200 | MPP_VAR_FUNCTION(0x5, "vdd", "cpu0-pd", V_MV78230_PLUS)), | ||
201 | MPP_MODE(32, | ||
202 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
203 | MPP_VAR_FUNCTION(0x1, "sd0", "d0", V_MV78230_PLUS), | ||
204 | MPP_VAR_FUNCTION(0x3, "tdm", "int3", V_MV78230_PLUS), | ||
205 | MPP_VAR_FUNCTION(0x5, "vdd", "cpu1-pd", V_MV78230_PLUS)), | ||
206 | MPP_MODE(33, | ||
207 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
208 | MPP_VAR_FUNCTION(0x1, "sd0", "d1", V_MV78230_PLUS), | ||
209 | MPP_VAR_FUNCTION(0x3, "tdm", "int4", V_MV78230_PLUS), | ||
210 | MPP_VAR_FUNCTION(0x4, "mem", "bat", V_MV78230_PLUS)), | ||
211 | MPP_MODE(34, | ||
212 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
213 | MPP_VAR_FUNCTION(0x1, "sd0", "d2", V_MV78230_PLUS), | ||
214 | MPP_VAR_FUNCTION(0x2, "sata0", "prsnt", V_MV78230_PLUS), | ||
215 | MPP_VAR_FUNCTION(0x3, "tdm", "int5", V_MV78230_PLUS)), | ||
216 | MPP_MODE(35, | ||
217 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
218 | MPP_VAR_FUNCTION(0x1, "sd0", "d3", V_MV78230_PLUS), | ||
219 | MPP_VAR_FUNCTION(0x2, "sata1", "prsnt", V_MV78230_PLUS), | ||
220 | MPP_VAR_FUNCTION(0x3, "tdm", "int6", V_MV78230_PLUS)), | ||
221 | MPP_MODE(36, | ||
222 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
223 | MPP_VAR_FUNCTION(0x1, "spi", "mosi", V_MV78230_PLUS)), | ||
224 | MPP_MODE(37, | ||
225 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
226 | MPP_VAR_FUNCTION(0x1, "spi", "miso", V_MV78230_PLUS)), | ||
227 | MPP_MODE(38, | ||
228 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
229 | MPP_VAR_FUNCTION(0x1, "spi", "sck", V_MV78230_PLUS)), | ||
230 | MPP_MODE(39, | ||
231 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
232 | MPP_VAR_FUNCTION(0x1, "spi", "cs0", V_MV78230_PLUS)), | ||
233 | MPP_MODE(40, | ||
234 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
235 | MPP_VAR_FUNCTION(0x1, "spi", "cs1", V_MV78230_PLUS), | ||
236 | MPP_VAR_FUNCTION(0x2, "uart2", "cts", V_MV78230_PLUS), | ||
237 | MPP_VAR_FUNCTION(0x3, "vdd", "cpu1-pd", V_MV78230_PLUS), | ||
238 | MPP_VAR_FUNCTION(0x4, "lcd", "vga-hsync", V_MV78230_PLUS), | ||
239 | MPP_VAR_FUNCTION(0x5, "pcie", "clkreq0", V_MV78230_PLUS)), | ||
240 | MPP_MODE(41, | ||
241 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
242 | MPP_VAR_FUNCTION(0x1, "spi", "cs2", V_MV78230_PLUS), | ||
243 | MPP_VAR_FUNCTION(0x2, "uart2", "rts", V_MV78230_PLUS), | ||
244 | MPP_VAR_FUNCTION(0x3, "sata1", "prsnt", V_MV78230_PLUS), | ||
245 | MPP_VAR_FUNCTION(0x4, "lcd", "vga-vsync", V_MV78230_PLUS), | ||
246 | MPP_VAR_FUNCTION(0x5, "pcie", "clkreq1", V_MV78230_PLUS)), | ||
247 | MPP_MODE(42, | ||
248 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
249 | MPP_VAR_FUNCTION(0x1, "uart2", "rxd", V_MV78230_PLUS), | ||
250 | MPP_VAR_FUNCTION(0x2, "uart0", "cts", V_MV78230_PLUS), | ||
251 | MPP_VAR_FUNCTION(0x3, "tdm", "int7", V_MV78230_PLUS), | ||
252 | MPP_VAR_FUNCTION(0x4, "tdm-1", "timer", V_MV78230_PLUS), | ||
253 | MPP_VAR_FUNCTION(0x5, "vdd", "cpu0-pd", V_MV78230_PLUS)), | ||
254 | MPP_MODE(43, | ||
255 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
256 | MPP_VAR_FUNCTION(0x1, "uart2", "txd", V_MV78230_PLUS), | ||
257 | MPP_VAR_FUNCTION(0x2, "uart0", "rts", V_MV78230_PLUS), | ||
258 | MPP_VAR_FUNCTION(0x3, "spi", "cs3", V_MV78230_PLUS), | ||
259 | MPP_VAR_FUNCTION(0x4, "pcie", "rstout", V_MV78230_PLUS), | ||
260 | MPP_VAR_FUNCTION(0x5, "vdd", "cpu2-3-pd", V_MV78460)), | ||
261 | MPP_MODE(44, | ||
262 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
263 | MPP_VAR_FUNCTION(0x1, "uart2", "cts", V_MV78230_PLUS), | ||
264 | MPP_VAR_FUNCTION(0x2, "uart3", "rxd", V_MV78230_PLUS), | ||
265 | MPP_VAR_FUNCTION(0x3, "spi", "cs4", V_MV78230_PLUS), | ||
266 | MPP_VAR_FUNCTION(0x4, "mem", "bat", V_MV78230_PLUS), | ||
267 | MPP_VAR_FUNCTION(0x5, "pcie", "clkreq2", V_MV78230_PLUS)), | ||
268 | MPP_MODE(45, | ||
269 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
270 | MPP_VAR_FUNCTION(0x1, "uart2", "rts", V_MV78230_PLUS), | ||
271 | MPP_VAR_FUNCTION(0x2, "uart3", "txd", V_MV78230_PLUS), | ||
272 | MPP_VAR_FUNCTION(0x3, "spi", "cs5", V_MV78230_PLUS), | ||
273 | MPP_VAR_FUNCTION(0x4, "sata1", "prsnt", V_MV78230_PLUS)), | ||
274 | MPP_MODE(46, | ||
275 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
276 | MPP_VAR_FUNCTION(0x1, "uart3", "rts", V_MV78230_PLUS), | ||
277 | MPP_VAR_FUNCTION(0x2, "uart1", "rts", V_MV78230_PLUS), | ||
278 | MPP_VAR_FUNCTION(0x3, "spi", "cs6", V_MV78230_PLUS), | ||
279 | MPP_VAR_FUNCTION(0x4, "sata0", "prsnt", V_MV78230_PLUS)), | ||
280 | MPP_MODE(47, | ||
281 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
282 | MPP_VAR_FUNCTION(0x1, "uart3", "cts", V_MV78230_PLUS), | ||
283 | MPP_VAR_FUNCTION(0x2, "uart1", "cts", V_MV78230_PLUS), | ||
284 | MPP_VAR_FUNCTION(0x3, "spi", "cs7", V_MV78230_PLUS), | ||
285 | MPP_VAR_FUNCTION(0x4, "ref", "clkout", V_MV78230_PLUS), | ||
286 | MPP_VAR_FUNCTION(0x5, "pcie", "clkreq3", V_MV78230_PLUS)), | ||
287 | MPP_MODE(48, | ||
288 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78230_PLUS), | ||
289 | MPP_VAR_FUNCTION(0x1, "tclk", NULL, V_MV78230_PLUS), | ||
290 | MPP_VAR_FUNCTION(0x2, "dev", "burst/last", V_MV78230_PLUS)), | ||
291 | MPP_MODE(49, | ||
292 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
293 | MPP_VAR_FUNCTION(0x1, "dev", "we3", V_MV78260_PLUS)), | ||
294 | MPP_MODE(50, | ||
295 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
296 | MPP_VAR_FUNCTION(0x1, "dev", "we2", V_MV78260_PLUS)), | ||
297 | MPP_MODE(51, | ||
298 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
299 | MPP_VAR_FUNCTION(0x1, "dev", "ad16", V_MV78260_PLUS)), | ||
300 | MPP_MODE(52, | ||
301 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
302 | MPP_VAR_FUNCTION(0x1, "dev", "ad17", V_MV78260_PLUS)), | ||
303 | MPP_MODE(53, | ||
304 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
305 | MPP_VAR_FUNCTION(0x1, "dev", "ad18", V_MV78260_PLUS)), | ||
306 | MPP_MODE(54, | ||
307 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
308 | MPP_VAR_FUNCTION(0x1, "dev", "ad19", V_MV78260_PLUS)), | ||
309 | MPP_MODE(55, | ||
310 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
311 | MPP_VAR_FUNCTION(0x1, "dev", "ad20", V_MV78260_PLUS), | ||
312 | MPP_VAR_FUNCTION(0x2, "vdd", "cpu0-pd", V_MV78260_PLUS)), | ||
313 | MPP_MODE(56, | ||
314 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
315 | MPP_VAR_FUNCTION(0x1, "dev", "ad21", V_MV78260_PLUS), | ||
316 | MPP_VAR_FUNCTION(0x2, "vdd", "cpu1-pd", V_MV78260_PLUS)), | ||
317 | MPP_MODE(57, | ||
318 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
319 | MPP_VAR_FUNCTION(0x1, "dev", "ad22", V_MV78260_PLUS), | ||
320 | MPP_VAR_FUNCTION(0x2, "vdd", "cpu2-3-pd", V_MV78460)), | ||
321 | MPP_MODE(58, | ||
322 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
323 | MPP_VAR_FUNCTION(0x1, "dev", "ad23", V_MV78260_PLUS)), | ||
324 | MPP_MODE(59, | ||
325 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
326 | MPP_VAR_FUNCTION(0x1, "dev", "ad24", V_MV78260_PLUS)), | ||
327 | MPP_MODE(60, | ||
328 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
329 | MPP_VAR_FUNCTION(0x1, "dev", "ad25", V_MV78260_PLUS)), | ||
330 | MPP_MODE(61, | ||
331 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
332 | MPP_VAR_FUNCTION(0x1, "dev", "ad26", V_MV78260_PLUS)), | ||
333 | MPP_MODE(62, | ||
334 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
335 | MPP_VAR_FUNCTION(0x1, "dev", "ad27", V_MV78260_PLUS)), | ||
336 | MPP_MODE(63, | ||
337 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
338 | MPP_VAR_FUNCTION(0x1, "dev", "ad28", V_MV78260_PLUS)), | ||
339 | MPP_MODE(64, | ||
340 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
341 | MPP_VAR_FUNCTION(0x1, "dev", "ad29", V_MV78260_PLUS)), | ||
342 | MPP_MODE(65, | ||
343 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
344 | MPP_VAR_FUNCTION(0x1, "dev", "ad30", V_MV78260_PLUS)), | ||
345 | MPP_MODE(66, | ||
346 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_MV78260_PLUS), | ||
347 | MPP_VAR_FUNCTION(0x1, "dev", "ad31", V_MV78260_PLUS)), | ||
348 | }; | ||
349 | |||
350 | static struct mvebu_pinctrl_soc_info armada_xp_pinctrl_info; | ||
351 | |||
352 | static struct of_device_id armada_xp_pinctrl_of_match[] __devinitdata = { | ||
353 | { | ||
354 | .compatible = "marvell,mv78230-pinctrl", | ||
355 | .data = (void *) V_MV78230, | ||
356 | }, | ||
357 | { | ||
358 | .compatible = "marvell,mv78260-pinctrl", | ||
359 | .data = (void *) V_MV78260, | ||
360 | }, | ||
361 | { | ||
362 | .compatible = "marvell,mv78460-pinctrl", | ||
363 | .data = (void *) V_MV78460, | ||
364 | }, | ||
365 | { }, | ||
366 | }; | ||
367 | |||
368 | static struct mvebu_mpp_ctrl mv78230_mpp_controls[] = { | ||
369 | MPP_REG_CTRL(0, 48), | ||
370 | }; | ||
371 | |||
372 | static struct pinctrl_gpio_range mv78230_mpp_gpio_ranges[] = { | ||
373 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
374 | MPP_GPIO_RANGE(1, 32, 32, 17), | ||
375 | }; | ||
376 | |||
377 | static struct mvebu_mpp_ctrl mv78260_mpp_controls[] = { | ||
378 | MPP_REG_CTRL(0, 66), | ||
379 | }; | ||
380 | |||
381 | static struct pinctrl_gpio_range mv78260_mpp_gpio_ranges[] = { | ||
382 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
383 | MPP_GPIO_RANGE(1, 32, 32, 32), | ||
384 | MPP_GPIO_RANGE(2, 64, 64, 3), | ||
385 | }; | ||
386 | |||
387 | static struct mvebu_mpp_ctrl mv78460_mpp_controls[] = { | ||
388 | MPP_REG_CTRL(0, 66), | ||
389 | }; | ||
390 | |||
391 | static struct pinctrl_gpio_range mv78460_mpp_gpio_ranges[] = { | ||
392 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
393 | MPP_GPIO_RANGE(1, 32, 32, 32), | ||
394 | MPP_GPIO_RANGE(2, 64, 64, 3), | ||
395 | }; | ||
396 | |||
397 | static int __devinit armada_xp_pinctrl_probe(struct platform_device *pdev) | ||
398 | { | ||
399 | struct mvebu_pinctrl_soc_info *soc = &armada_xp_pinctrl_info; | ||
400 | const struct of_device_id *match = | ||
401 | of_match_device(armada_xp_pinctrl_of_match, &pdev->dev); | ||
402 | |||
403 | if (!match) | ||
404 | return -ENODEV; | ||
405 | |||
406 | soc->variant = (unsigned) match->data & 0xff; | ||
407 | |||
408 | switch (soc->variant) { | ||
409 | case V_MV78230: | ||
410 | soc->controls = mv78230_mpp_controls; | ||
411 | soc->ncontrols = ARRAY_SIZE(mv78230_mpp_controls); | ||
412 | soc->modes = armada_xp_mpp_modes; | ||
413 | /* We don't necessarily want the full list of the | ||
414 | * armada_xp_mpp_modes, but only the first 'n' ones | ||
415 | * that are available on this SoC */ | ||
416 | soc->nmodes = mv78230_mpp_controls[0].npins; | ||
417 | soc->gpioranges = mv78230_mpp_gpio_ranges; | ||
418 | soc->ngpioranges = ARRAY_SIZE(mv78230_mpp_gpio_ranges); | ||
419 | break; | ||
420 | case V_MV78260: | ||
421 | soc->controls = mv78260_mpp_controls; | ||
422 | soc->ncontrols = ARRAY_SIZE(mv78260_mpp_controls); | ||
423 | soc->modes = armada_xp_mpp_modes; | ||
424 | /* We don't necessarily want the full list of the | ||
425 | * armada_xp_mpp_modes, but only the first 'n' ones | ||
426 | * that are available on this SoC */ | ||
427 | soc->nmodes = mv78260_mpp_controls[0].npins; | ||
428 | soc->gpioranges = mv78260_mpp_gpio_ranges; | ||
429 | soc->ngpioranges = ARRAY_SIZE(mv78260_mpp_gpio_ranges); | ||
430 | break; | ||
431 | case V_MV78460: | ||
432 | soc->controls = mv78460_mpp_controls; | ||
433 | soc->ncontrols = ARRAY_SIZE(mv78460_mpp_controls); | ||
434 | soc->modes = armada_xp_mpp_modes; | ||
435 | /* We don't necessarily want the full list of the | ||
436 | * armada_xp_mpp_modes, but only the first 'n' ones | ||
437 | * that are available on this SoC */ | ||
438 | soc->nmodes = mv78460_mpp_controls[0].npins; | ||
439 | soc->gpioranges = mv78460_mpp_gpio_ranges; | ||
440 | soc->ngpioranges = ARRAY_SIZE(mv78460_mpp_gpio_ranges); | ||
441 | break; | ||
442 | } | ||
443 | |||
444 | pdev->dev.platform_data = soc; | ||
445 | |||
446 | return mvebu_pinctrl_probe(pdev); | ||
447 | } | ||
448 | |||
449 | static int __devexit armada_xp_pinctrl_remove(struct platform_device *pdev) | ||
450 | { | ||
451 | return mvebu_pinctrl_remove(pdev); | ||
452 | } | ||
453 | |||
454 | static struct platform_driver armada_xp_pinctrl_driver = { | ||
455 | .driver = { | ||
456 | .name = "armada-xp-pinctrl", | ||
457 | .owner = THIS_MODULE, | ||
458 | .of_match_table = of_match_ptr(armada_xp_pinctrl_of_match), | ||
459 | }, | ||
460 | .probe = armada_xp_pinctrl_probe, | ||
461 | .remove = __devexit_p(armada_xp_pinctrl_remove), | ||
462 | }; | ||
463 | |||
464 | module_platform_driver(armada_xp_pinctrl_driver); | ||
465 | |||
466 | MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>"); | ||
467 | MODULE_DESCRIPTION("Marvell Armada XP pinctrl driver"); | ||
468 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-dove.c b/drivers/pinctrl/pinctrl-dove.c new file mode 100644 index 000000000000..ffe74b27d66d --- /dev/null +++ b/drivers/pinctrl/pinctrl-dove.c | |||
@@ -0,0 +1,620 @@ | |||
1 | /* | ||
2 | * Marvell Dove pinctrl driver based on mvebu pinctrl core | ||
3 | * | ||
4 | * Author: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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 | |||
12 | #include <linux/err.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/bitops.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/of.h> | ||
20 | #include <linux/of_device.h> | ||
21 | #include <linux/pinctrl/pinctrl.h> | ||
22 | |||
23 | #include "pinctrl-mvebu.h" | ||
24 | |||
25 | #define DOVE_SB_REGS_VIRT_BASE 0xfde00000 | ||
26 | #define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0200) | ||
27 | #define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10) | ||
28 | #define DOVE_AU0_AC97_SEL BIT(16) | ||
29 | #define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE | 0xe802C) | ||
30 | #define DOVE_TWSI_ENABLE_OPTION1 BIT(7) | ||
31 | #define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE | 0xe8030) | ||
32 | #define DOVE_TWSI_ENABLE_OPTION2 BIT(20) | ||
33 | #define DOVE_TWSI_ENABLE_OPTION3 BIT(21) | ||
34 | #define DOVE_TWSI_OPTION3_GPIO BIT(22) | ||
35 | #define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE | 0xe8034) | ||
36 | #define DOVE_SSP_ON_AU1 BIT(0) | ||
37 | #define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe803c) | ||
38 | #define DOVE_AU1_SPDIFO_GPIO_EN BIT(1) | ||
39 | #define DOVE_NAND_GPIO_EN BIT(0) | ||
40 | #define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0400) | ||
41 | #define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_LO_VIRT_BASE + 0x40) | ||
42 | #define DOVE_SPI_GPIO_SEL BIT(5) | ||
43 | #define DOVE_UART1_GPIO_SEL BIT(4) | ||
44 | #define DOVE_AU1_GPIO_SEL BIT(3) | ||
45 | #define DOVE_CAM_GPIO_SEL BIT(2) | ||
46 | #define DOVE_SD1_GPIO_SEL BIT(1) | ||
47 | #define DOVE_SD0_GPIO_SEL BIT(0) | ||
48 | |||
49 | #define MPPS_PER_REG 8 | ||
50 | #define MPP_BITS 4 | ||
51 | #define MPP_MASK 0xf | ||
52 | |||
53 | #define CONFIG_PMU BIT(4) | ||
54 | |||
55 | static int dove_pmu_mpp_ctrl_get(struct mvebu_mpp_ctrl *ctrl, | ||
56 | unsigned long *config) | ||
57 | { | ||
58 | unsigned off = (ctrl->pid / MPPS_PER_REG) * MPP_BITS; | ||
59 | unsigned shift = (ctrl->pid % MPPS_PER_REG) * MPP_BITS; | ||
60 | unsigned long pmu = readl(DOVE_PMU_MPP_GENERAL_CTRL); | ||
61 | unsigned long mpp = readl(DOVE_MPP_VIRT_BASE + off); | ||
62 | |||
63 | if (pmu & (1 << ctrl->pid)) | ||
64 | *config = CONFIG_PMU; | ||
65 | else | ||
66 | *config = (mpp >> shift) & MPP_MASK; | ||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | static int dove_pmu_mpp_ctrl_set(struct mvebu_mpp_ctrl *ctrl, | ||
71 | unsigned long config) | ||
72 | { | ||
73 | unsigned off = (ctrl->pid / MPPS_PER_REG) * MPP_BITS; | ||
74 | unsigned shift = (ctrl->pid % MPPS_PER_REG) * MPP_BITS; | ||
75 | unsigned long pmu = readl(DOVE_PMU_MPP_GENERAL_CTRL); | ||
76 | unsigned long mpp = readl(DOVE_MPP_VIRT_BASE + off); | ||
77 | |||
78 | if (config == CONFIG_PMU) | ||
79 | writel(pmu | (1 << ctrl->pid), DOVE_PMU_MPP_GENERAL_CTRL); | ||
80 | else { | ||
81 | writel(pmu & ~(1 << ctrl->pid), DOVE_PMU_MPP_GENERAL_CTRL); | ||
82 | mpp &= ~(MPP_MASK << shift); | ||
83 | mpp |= config << shift; | ||
84 | writel(mpp, DOVE_MPP_VIRT_BASE + off); | ||
85 | } | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static int dove_mpp4_ctrl_get(struct mvebu_mpp_ctrl *ctrl, | ||
90 | unsigned long *config) | ||
91 | { | ||
92 | unsigned long mpp4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); | ||
93 | unsigned long mask; | ||
94 | |||
95 | switch (ctrl->pid) { | ||
96 | case 24: /* mpp_camera */ | ||
97 | mask = DOVE_CAM_GPIO_SEL; | ||
98 | break; | ||
99 | case 40: /* mpp_sdio0 */ | ||
100 | mask = DOVE_SD0_GPIO_SEL; | ||
101 | break; | ||
102 | case 46: /* mpp_sdio1 */ | ||
103 | mask = DOVE_SD1_GPIO_SEL; | ||
104 | break; | ||
105 | case 58: /* mpp_spi0 */ | ||
106 | mask = DOVE_SPI_GPIO_SEL; | ||
107 | break; | ||
108 | case 62: /* mpp_uart1 */ | ||
109 | mask = DOVE_UART1_GPIO_SEL; | ||
110 | break; | ||
111 | default: | ||
112 | return -EINVAL; | ||
113 | } | ||
114 | |||
115 | *config = ((mpp4 & mask) != 0); | ||
116 | |||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | static int dove_mpp4_ctrl_set(struct mvebu_mpp_ctrl *ctrl, | ||
121 | unsigned long config) | ||
122 | { | ||
123 | unsigned long mpp4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); | ||
124 | unsigned long mask; | ||
125 | |||
126 | switch (ctrl->pid) { | ||
127 | case 24: /* mpp_camera */ | ||
128 | mask = DOVE_CAM_GPIO_SEL; | ||
129 | break; | ||
130 | case 40: /* mpp_sdio0 */ | ||
131 | mask = DOVE_SD0_GPIO_SEL; | ||
132 | break; | ||
133 | case 46: /* mpp_sdio1 */ | ||
134 | mask = DOVE_SD1_GPIO_SEL; | ||
135 | break; | ||
136 | case 58: /* mpp_spi0 */ | ||
137 | mask = DOVE_SPI_GPIO_SEL; | ||
138 | break; | ||
139 | case 62: /* mpp_uart1 */ | ||
140 | mask = DOVE_UART1_GPIO_SEL; | ||
141 | break; | ||
142 | default: | ||
143 | return -EINVAL; | ||
144 | } | ||
145 | |||
146 | mpp4 &= ~mask; | ||
147 | if (config) | ||
148 | mpp4 |= mask; | ||
149 | |||
150 | writel(mpp4, DOVE_MPP_CTRL4_VIRT_BASE); | ||
151 | |||
152 | return 0; | ||
153 | } | ||
154 | |||
155 | static int dove_nand_ctrl_get(struct mvebu_mpp_ctrl *ctrl, | ||
156 | unsigned long *config) | ||
157 | { | ||
158 | unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); | ||
159 | |||
160 | *config = ((gmpp & DOVE_NAND_GPIO_EN) != 0); | ||
161 | |||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | static int dove_nand_ctrl_set(struct mvebu_mpp_ctrl *ctrl, | ||
166 | unsigned long config) | ||
167 | { | ||
168 | unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); | ||
169 | |||
170 | gmpp &= ~DOVE_NAND_GPIO_EN; | ||
171 | if (config) | ||
172 | gmpp |= DOVE_NAND_GPIO_EN; | ||
173 | |||
174 | writel(gmpp, DOVE_MPP_GENERAL_VIRT_BASE); | ||
175 | |||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | static int dove_audio0_ctrl_get(struct mvebu_mpp_ctrl *ctrl, | ||
180 | unsigned long *config) | ||
181 | { | ||
182 | unsigned long pmu = readl(DOVE_PMU_MPP_GENERAL_CTRL); | ||
183 | |||
184 | *config = ((pmu & DOVE_AU0_AC97_SEL) != 0); | ||
185 | |||
186 | return 0; | ||
187 | } | ||
188 | |||
189 | static int dove_audio0_ctrl_set(struct mvebu_mpp_ctrl *ctrl, | ||
190 | unsigned long config) | ||
191 | { | ||
192 | unsigned long pmu = readl(DOVE_PMU_MPP_GENERAL_CTRL); | ||
193 | |||
194 | pmu &= ~DOVE_AU0_AC97_SEL; | ||
195 | if (config) | ||
196 | pmu |= DOVE_AU0_AC97_SEL; | ||
197 | writel(pmu, DOVE_PMU_MPP_GENERAL_CTRL); | ||
198 | |||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | static int dove_audio1_ctrl_get(struct mvebu_mpp_ctrl *ctrl, | ||
203 | unsigned long *config) | ||
204 | { | ||
205 | unsigned long mpp4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); | ||
206 | unsigned long sspc1 = readl(DOVE_SSP_CTRL_STATUS_1); | ||
207 | unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); | ||
208 | unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); | ||
209 | |||
210 | *config = 0; | ||
211 | if (mpp4 & DOVE_AU1_GPIO_SEL) | ||
212 | *config |= BIT(3); | ||
213 | if (sspc1 & DOVE_SSP_ON_AU1) | ||
214 | *config |= BIT(2); | ||
215 | if (gmpp & DOVE_AU1_SPDIFO_GPIO_EN) | ||
216 | *config |= BIT(1); | ||
217 | if (gcfg2 & DOVE_TWSI_OPTION3_GPIO) | ||
218 | *config |= BIT(0); | ||
219 | |||
220 | /* SSP/TWSI only if I2S1 not set*/ | ||
221 | if ((*config & BIT(3)) == 0) | ||
222 | *config &= ~(BIT(2) | BIT(0)); | ||
223 | /* TWSI only if SPDIFO not set*/ | ||
224 | if ((*config & BIT(1)) == 0) | ||
225 | *config &= ~BIT(0); | ||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static int dove_audio1_ctrl_set(struct mvebu_mpp_ctrl *ctrl, | ||
230 | unsigned long config) | ||
231 | { | ||
232 | unsigned long mpp4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); | ||
233 | unsigned long sspc1 = readl(DOVE_SSP_CTRL_STATUS_1); | ||
234 | unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); | ||
235 | unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); | ||
236 | |||
237 | if (config & BIT(0)) | ||
238 | gcfg2 |= DOVE_TWSI_OPTION3_GPIO; | ||
239 | if (config & BIT(1)) | ||
240 | gmpp |= DOVE_AU1_SPDIFO_GPIO_EN; | ||
241 | if (config & BIT(2)) | ||
242 | sspc1 |= DOVE_SSP_ON_AU1; | ||
243 | if (config & BIT(3)) | ||
244 | mpp4 |= DOVE_AU1_GPIO_SEL; | ||
245 | |||
246 | writel(mpp4, DOVE_MPP_CTRL4_VIRT_BASE); | ||
247 | writel(sspc1, DOVE_SSP_CTRL_STATUS_1); | ||
248 | writel(gmpp, DOVE_MPP_GENERAL_VIRT_BASE); | ||
249 | writel(gcfg2, DOVE_GLOBAL_CONFIG_2); | ||
250 | |||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | /* mpp[52:57] gpio pins depend heavily on current config; | ||
255 | * gpio_req does not try to mux in gpio capabilities to not | ||
256 | * break other functions. If you require all mpps as gpio | ||
257 | * enforce gpio setting by pinctrl mapping. | ||
258 | */ | ||
259 | static int dove_audio1_ctrl_gpio_req(struct mvebu_mpp_ctrl *ctrl, u8 pid) | ||
260 | { | ||
261 | unsigned long config; | ||
262 | |||
263 | dove_audio1_ctrl_get(ctrl, &config); | ||
264 | |||
265 | switch (config) { | ||
266 | case 0x02: /* i2s1 : gpio[56:57] */ | ||
267 | case 0x0e: /* ssp : gpio[56:57] */ | ||
268 | if (pid >= 56) | ||
269 | return 0; | ||
270 | return -ENOTSUPP; | ||
271 | case 0x08: /* spdifo : gpio[52:55] */ | ||
272 | case 0x0b: /* twsi : gpio[52:55] */ | ||
273 | if (pid <= 55) | ||
274 | return 0; | ||
275 | return -ENOTSUPP; | ||
276 | case 0x0a: /* all gpio */ | ||
277 | return 0; | ||
278 | /* 0x00 : i2s1/spdifo : no gpio */ | ||
279 | /* 0x0c : ssp/spdifo : no gpio */ | ||
280 | /* 0x0f : ssp/twsi : no gpio */ | ||
281 | } | ||
282 | return -ENOTSUPP; | ||
283 | } | ||
284 | |||
285 | /* mpp[52:57] has gpio pins capable of in and out */ | ||
286 | static int dove_audio1_ctrl_gpio_dir(struct mvebu_mpp_ctrl *ctrl, u8 pid, | ||
287 | bool input) | ||
288 | { | ||
289 | if (pid < 52 || pid > 57) | ||
290 | return -ENOTSUPP; | ||
291 | return 0; | ||
292 | } | ||
293 | |||
294 | static int dove_twsi_ctrl_get(struct mvebu_mpp_ctrl *ctrl, | ||
295 | unsigned long *config) | ||
296 | { | ||
297 | unsigned long gcfg1 = readl(DOVE_GLOBAL_CONFIG_1); | ||
298 | unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); | ||
299 | |||
300 | *config = 0; | ||
301 | if (gcfg1 & DOVE_TWSI_ENABLE_OPTION1) | ||
302 | *config = 1; | ||
303 | else if (gcfg2 & DOVE_TWSI_ENABLE_OPTION2) | ||
304 | *config = 2; | ||
305 | else if (gcfg2 & DOVE_TWSI_ENABLE_OPTION3) | ||
306 | *config = 3; | ||
307 | |||
308 | return 0; | ||
309 | } | ||
310 | |||
311 | static int dove_twsi_ctrl_set(struct mvebu_mpp_ctrl *ctrl, | ||
312 | unsigned long config) | ||
313 | { | ||
314 | unsigned long gcfg1 = readl(DOVE_GLOBAL_CONFIG_1); | ||
315 | unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); | ||
316 | |||
317 | gcfg1 &= ~DOVE_TWSI_ENABLE_OPTION1; | ||
318 | gcfg2 &= ~(DOVE_TWSI_ENABLE_OPTION2 | DOVE_TWSI_ENABLE_OPTION2); | ||
319 | |||
320 | switch (config) { | ||
321 | case 1: | ||
322 | gcfg1 |= DOVE_TWSI_ENABLE_OPTION1; | ||
323 | break; | ||
324 | case 2: | ||
325 | gcfg2 |= DOVE_TWSI_ENABLE_OPTION2; | ||
326 | break; | ||
327 | case 3: | ||
328 | gcfg2 |= DOVE_TWSI_ENABLE_OPTION3; | ||
329 | break; | ||
330 | } | ||
331 | |||
332 | writel(gcfg1, DOVE_GLOBAL_CONFIG_1); | ||
333 | writel(gcfg2, DOVE_GLOBAL_CONFIG_2); | ||
334 | |||
335 | return 0; | ||
336 | } | ||
337 | |||
338 | static struct mvebu_mpp_ctrl dove_mpp_controls[] = { | ||
339 | MPP_FUNC_CTRL(0, 0, "mpp0", dove_pmu_mpp_ctrl), | ||
340 | MPP_FUNC_CTRL(1, 1, "mpp1", dove_pmu_mpp_ctrl), | ||
341 | MPP_FUNC_CTRL(2, 2, "mpp2", dove_pmu_mpp_ctrl), | ||
342 | MPP_FUNC_CTRL(3, 3, "mpp3", dove_pmu_mpp_ctrl), | ||
343 | MPP_FUNC_CTRL(4, 4, "mpp4", dove_pmu_mpp_ctrl), | ||
344 | MPP_FUNC_CTRL(5, 5, "mpp5", dove_pmu_mpp_ctrl), | ||
345 | MPP_FUNC_CTRL(6, 6, "mpp6", dove_pmu_mpp_ctrl), | ||
346 | MPP_FUNC_CTRL(7, 7, "mpp7", dove_pmu_mpp_ctrl), | ||
347 | MPP_FUNC_CTRL(8, 8, "mpp8", dove_pmu_mpp_ctrl), | ||
348 | MPP_FUNC_CTRL(9, 9, "mpp9", dove_pmu_mpp_ctrl), | ||
349 | MPP_FUNC_CTRL(10, 10, "mpp10", dove_pmu_mpp_ctrl), | ||
350 | MPP_FUNC_CTRL(11, 11, "mpp11", dove_pmu_mpp_ctrl), | ||
351 | MPP_FUNC_CTRL(12, 12, "mpp12", dove_pmu_mpp_ctrl), | ||
352 | MPP_FUNC_CTRL(13, 13, "mpp13", dove_pmu_mpp_ctrl), | ||
353 | MPP_FUNC_CTRL(14, 14, "mpp14", dove_pmu_mpp_ctrl), | ||
354 | MPP_FUNC_CTRL(15, 15, "mpp15", dove_pmu_mpp_ctrl), | ||
355 | MPP_REG_CTRL(16, 23), | ||
356 | MPP_FUNC_CTRL(24, 39, "mpp_camera", dove_mpp4_ctrl), | ||
357 | MPP_FUNC_CTRL(40, 45, "mpp_sdio0", dove_mpp4_ctrl), | ||
358 | MPP_FUNC_CTRL(46, 51, "mpp_sdio1", dove_mpp4_ctrl), | ||
359 | MPP_FUNC_GPIO_CTRL(52, 57, "mpp_audio1", dove_audio1_ctrl), | ||
360 | MPP_FUNC_CTRL(58, 61, "mpp_spi0", dove_mpp4_ctrl), | ||
361 | MPP_FUNC_CTRL(62, 63, "mpp_uart1", dove_mpp4_ctrl), | ||
362 | MPP_FUNC_CTRL(64, 71, "mpp_nand", dove_nand_ctrl), | ||
363 | MPP_FUNC_CTRL(72, 72, "audio0", dove_audio0_ctrl), | ||
364 | MPP_FUNC_CTRL(73, 73, "twsi", dove_twsi_ctrl), | ||
365 | }; | ||
366 | |||
367 | static struct mvebu_mpp_mode dove_mpp_modes[] = { | ||
368 | MPP_MODE(0, | ||
369 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
370 | MPP_FUNCTION(0x02, "uart2", "rts"), | ||
371 | MPP_FUNCTION(0x03, "sdio0", "cd"), | ||
372 | MPP_FUNCTION(0x0f, "lcd0", "pwm"), | ||
373 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
374 | MPP_MODE(1, | ||
375 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
376 | MPP_FUNCTION(0x02, "uart2", "cts"), | ||
377 | MPP_FUNCTION(0x03, "sdio0", "wp"), | ||
378 | MPP_FUNCTION(0x0f, "lcd1", "pwm"), | ||
379 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
380 | MPP_MODE(2, | ||
381 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
382 | MPP_FUNCTION(0x01, "sata", "prsnt"), | ||
383 | MPP_FUNCTION(0x02, "uart2", "txd"), | ||
384 | MPP_FUNCTION(0x03, "sdio0", "buspwr"), | ||
385 | MPP_FUNCTION(0x04, "uart1", "rts"), | ||
386 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
387 | MPP_MODE(3, | ||
388 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
389 | MPP_FUNCTION(0x01, "sata", "act"), | ||
390 | MPP_FUNCTION(0x02, "uart2", "rxd"), | ||
391 | MPP_FUNCTION(0x03, "sdio0", "ledctrl"), | ||
392 | MPP_FUNCTION(0x04, "uart1", "cts"), | ||
393 | MPP_FUNCTION(0x0f, "lcd-spi", "cs1"), | ||
394 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
395 | MPP_MODE(4, | ||
396 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
397 | MPP_FUNCTION(0x02, "uart3", "rts"), | ||
398 | MPP_FUNCTION(0x03, "sdio1", "cd"), | ||
399 | MPP_FUNCTION(0x04, "spi1", "miso"), | ||
400 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
401 | MPP_MODE(5, | ||
402 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
403 | MPP_FUNCTION(0x02, "uart3", "cts"), | ||
404 | MPP_FUNCTION(0x03, "sdio1", "wp"), | ||
405 | MPP_FUNCTION(0x04, "spi1", "cs"), | ||
406 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
407 | MPP_MODE(6, | ||
408 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
409 | MPP_FUNCTION(0x02, "uart3", "txd"), | ||
410 | MPP_FUNCTION(0x03, "sdio1", "buspwr"), | ||
411 | MPP_FUNCTION(0x04, "spi1", "mosi"), | ||
412 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
413 | MPP_MODE(7, | ||
414 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
415 | MPP_FUNCTION(0x02, "uart3", "rxd"), | ||
416 | MPP_FUNCTION(0x03, "sdio1", "ledctrl"), | ||
417 | MPP_FUNCTION(0x04, "spi1", "sck"), | ||
418 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
419 | MPP_MODE(8, | ||
420 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
421 | MPP_FUNCTION(0x01, "watchdog", "rstout"), | ||
422 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
423 | MPP_MODE(9, | ||
424 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
425 | MPP_FUNCTION(0x05, "pex1", "clkreq"), | ||
426 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
427 | MPP_MODE(10, | ||
428 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
429 | MPP_FUNCTION(0x05, "ssp", "sclk"), | ||
430 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
431 | MPP_MODE(11, | ||
432 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
433 | MPP_FUNCTION(0x01, "sata", "prsnt"), | ||
434 | MPP_FUNCTION(0x02, "sata-1", "act"), | ||
435 | MPP_FUNCTION(0x03, "sdio0", "ledctrl"), | ||
436 | MPP_FUNCTION(0x04, "sdio1", "ledctrl"), | ||
437 | MPP_FUNCTION(0x05, "pex0", "clkreq"), | ||
438 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
439 | MPP_MODE(12, | ||
440 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
441 | MPP_FUNCTION(0x01, "sata", "act"), | ||
442 | MPP_FUNCTION(0x02, "uart2", "rts"), | ||
443 | MPP_FUNCTION(0x03, "audio0", "extclk"), | ||
444 | MPP_FUNCTION(0x04, "sdio1", "cd"), | ||
445 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
446 | MPP_MODE(13, | ||
447 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
448 | MPP_FUNCTION(0x02, "uart2", "cts"), | ||
449 | MPP_FUNCTION(0x03, "audio1", "extclk"), | ||
450 | MPP_FUNCTION(0x04, "sdio1", "wp"), | ||
451 | MPP_FUNCTION(0x05, "ssp", "extclk"), | ||
452 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
453 | MPP_MODE(14, | ||
454 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
455 | MPP_FUNCTION(0x02, "uart2", "txd"), | ||
456 | MPP_FUNCTION(0x04, "sdio1", "buspwr"), | ||
457 | MPP_FUNCTION(0x05, "ssp", "rxd"), | ||
458 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
459 | MPP_MODE(15, | ||
460 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
461 | MPP_FUNCTION(0x02, "uart2", "rxd"), | ||
462 | MPP_FUNCTION(0x04, "sdio1", "ledctrl"), | ||
463 | MPP_FUNCTION(0x05, "ssp", "sfrm"), | ||
464 | MPP_FUNCTION(0x10, "pmu", NULL)), | ||
465 | MPP_MODE(16, | ||
466 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
467 | MPP_FUNCTION(0x02, "uart3", "rts"), | ||
468 | MPP_FUNCTION(0x03, "sdio0", "cd"), | ||
469 | MPP_FUNCTION(0x04, "lcd-spi", "cs1"), | ||
470 | MPP_FUNCTION(0x05, "ac97", "sdi1")), | ||
471 | MPP_MODE(17, | ||
472 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
473 | MPP_FUNCTION(0x01, "ac97-1", "sysclko"), | ||
474 | MPP_FUNCTION(0x02, "uart3", "cts"), | ||
475 | MPP_FUNCTION(0x03, "sdio0", "wp"), | ||
476 | MPP_FUNCTION(0x04, "twsi", "sda"), | ||
477 | MPP_FUNCTION(0x05, "ac97", "sdi2")), | ||
478 | MPP_MODE(18, | ||
479 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
480 | MPP_FUNCTION(0x02, "uart3", "txd"), | ||
481 | MPP_FUNCTION(0x03, "sdio0", "buspwr"), | ||
482 | MPP_FUNCTION(0x04, "lcd0", "pwm"), | ||
483 | MPP_FUNCTION(0x05, "ac97", "sdi3")), | ||
484 | MPP_MODE(19, | ||
485 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
486 | MPP_FUNCTION(0x02, "uart3", "rxd"), | ||
487 | MPP_FUNCTION(0x03, "sdio0", "ledctrl"), | ||
488 | MPP_FUNCTION(0x04, "twsi", "sck")), | ||
489 | MPP_MODE(20, | ||
490 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
491 | MPP_FUNCTION(0x01, "ac97", "sysclko"), | ||
492 | MPP_FUNCTION(0x02, "lcd-spi", "miso"), | ||
493 | MPP_FUNCTION(0x03, "sdio1", "cd"), | ||
494 | MPP_FUNCTION(0x05, "sdio0", "cd"), | ||
495 | MPP_FUNCTION(0x06, "spi1", "miso")), | ||
496 | MPP_MODE(21, | ||
497 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
498 | MPP_FUNCTION(0x01, "uart1", "rts"), | ||
499 | MPP_FUNCTION(0x02, "lcd-spi", "cs0"), | ||
500 | MPP_FUNCTION(0x03, "sdio1", "wp"), | ||
501 | MPP_FUNCTION(0x04, "ssp", "sfrm"), | ||
502 | MPP_FUNCTION(0x05, "sdio0", "wp"), | ||
503 | MPP_FUNCTION(0x06, "spi1", "cs")), | ||
504 | MPP_MODE(22, | ||
505 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
506 | MPP_FUNCTION(0x01, "uart1", "cts"), | ||
507 | MPP_FUNCTION(0x02, "lcd-spi", "mosi"), | ||
508 | MPP_FUNCTION(0x03, "sdio1", "buspwr"), | ||
509 | MPP_FUNCTION(0x04, "ssp", "txd"), | ||
510 | MPP_FUNCTION(0x05, "sdio0", "buspwr"), | ||
511 | MPP_FUNCTION(0x06, "spi1", "mosi")), | ||
512 | MPP_MODE(23, | ||
513 | MPP_FUNCTION(0x00, "gpio", NULL), | ||
514 | MPP_FUNCTION(0x02, "lcd-spi", "sck"), | ||
515 | MPP_FUNCTION(0x03, "sdio1", "ledctrl"), | ||
516 | MPP_FUNCTION(0x04, "ssp", "sclk"), | ||
517 | MPP_FUNCTION(0x05, "sdio0", "ledctrl"), | ||
518 | MPP_FUNCTION(0x06, "spi1", "sck")), | ||
519 | MPP_MODE(24, | ||
520 | MPP_FUNCTION(0x00, "camera", NULL), | ||
521 | MPP_FUNCTION(0x01, "gpio", NULL)), | ||
522 | MPP_MODE(40, | ||
523 | MPP_FUNCTION(0x00, "sdio0", NULL), | ||
524 | MPP_FUNCTION(0x01, "gpio", NULL)), | ||
525 | MPP_MODE(46, | ||
526 | MPP_FUNCTION(0x00, "sdio1", NULL), | ||
527 | MPP_FUNCTION(0x01, "gpio", NULL)), | ||
528 | MPP_MODE(52, | ||
529 | MPP_FUNCTION(0x00, "i2s1/spdifo", NULL), | ||
530 | MPP_FUNCTION(0x02, "i2s1", NULL), | ||
531 | MPP_FUNCTION(0x08, "spdifo", NULL), | ||
532 | MPP_FUNCTION(0x0a, "gpio", NULL), | ||
533 | MPP_FUNCTION(0x0b, "twsi", NULL), | ||
534 | MPP_FUNCTION(0x0c, "ssp/spdifo", NULL), | ||
535 | MPP_FUNCTION(0x0e, "ssp", NULL), | ||
536 | MPP_FUNCTION(0x0f, "ssp/twsi", NULL)), | ||
537 | MPP_MODE(58, | ||
538 | MPP_FUNCTION(0x00, "spi0", NULL), | ||
539 | MPP_FUNCTION(0x01, "gpio", NULL)), | ||
540 | MPP_MODE(62, | ||
541 | MPP_FUNCTION(0x00, "uart1", NULL), | ||
542 | MPP_FUNCTION(0x01, "gpio", NULL)), | ||
543 | MPP_MODE(64, | ||
544 | MPP_FUNCTION(0x00, "nand", NULL), | ||
545 | MPP_FUNCTION(0x01, "gpo", NULL)), | ||
546 | MPP_MODE(72, | ||
547 | MPP_FUNCTION(0x00, "i2s", NULL), | ||
548 | MPP_FUNCTION(0x01, "ac97", NULL)), | ||
549 | MPP_MODE(73, | ||
550 | MPP_FUNCTION(0x00, "twsi-none", NULL), | ||
551 | MPP_FUNCTION(0x01, "twsi-opt1", NULL), | ||
552 | MPP_FUNCTION(0x02, "twsi-opt2", NULL), | ||
553 | MPP_FUNCTION(0x03, "twsi-opt3", NULL)), | ||
554 | }; | ||
555 | |||
556 | static struct pinctrl_gpio_range dove_mpp_gpio_ranges[] = { | ||
557 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
558 | MPP_GPIO_RANGE(1, 32, 32, 32), | ||
559 | MPP_GPIO_RANGE(2, 64, 64, 8), | ||
560 | }; | ||
561 | |||
562 | static struct mvebu_pinctrl_soc_info dove_pinctrl_info = { | ||
563 | .controls = dove_mpp_controls, | ||
564 | .ncontrols = ARRAY_SIZE(dove_mpp_controls), | ||
565 | .modes = dove_mpp_modes, | ||
566 | .nmodes = ARRAY_SIZE(dove_mpp_modes), | ||
567 | .gpioranges = dove_mpp_gpio_ranges, | ||
568 | .ngpioranges = ARRAY_SIZE(dove_mpp_gpio_ranges), | ||
569 | .variant = 0, | ||
570 | }; | ||
571 | |||
572 | static struct clk *clk; | ||
573 | |||
574 | static struct of_device_id dove_pinctrl_of_match[] __devinitdata = { | ||
575 | { .compatible = "marvell,dove-pinctrl", .data = &dove_pinctrl_info }, | ||
576 | { } | ||
577 | }; | ||
578 | |||
579 | static int __devinit dove_pinctrl_probe(struct platform_device *pdev) | ||
580 | { | ||
581 | const struct of_device_id *match = | ||
582 | of_match_device(dove_pinctrl_of_match, &pdev->dev); | ||
583 | pdev->dev.platform_data = match->data; | ||
584 | |||
585 | /* | ||
586 | * General MPP Configuration Register is part of pdma registers. | ||
587 | * grab clk to make sure it is ticking. | ||
588 | */ | ||
589 | clk = devm_clk_get(&pdev->dev, NULL); | ||
590 | if (!IS_ERR(clk)) | ||
591 | clk_prepare_enable(clk); | ||
592 | |||
593 | return mvebu_pinctrl_probe(pdev); | ||
594 | } | ||
595 | |||
596 | static int __devexit dove_pinctrl_remove(struct platform_device *pdev) | ||
597 | { | ||
598 | int ret; | ||
599 | |||
600 | ret = mvebu_pinctrl_remove(pdev); | ||
601 | if (!IS_ERR(clk)) | ||
602 | clk_disable_unprepare(clk); | ||
603 | return ret; | ||
604 | } | ||
605 | |||
606 | static struct platform_driver dove_pinctrl_driver = { | ||
607 | .driver = { | ||
608 | .name = "dove-pinctrl", | ||
609 | .owner = THIS_MODULE, | ||
610 | .of_match_table = of_match_ptr(dove_pinctrl_of_match), | ||
611 | }, | ||
612 | .probe = dove_pinctrl_probe, | ||
613 | .remove = __devexit_p(dove_pinctrl_remove), | ||
614 | }; | ||
615 | |||
616 | module_platform_driver(dove_pinctrl_driver); | ||
617 | |||
618 | MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>"); | ||
619 | MODULE_DESCRIPTION("Marvell Dove pinctrl driver"); | ||
620 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-kirkwood.c b/drivers/pinctrl/pinctrl-kirkwood.c new file mode 100644 index 000000000000..9a74ef674a0e --- /dev/null +++ b/drivers/pinctrl/pinctrl-kirkwood.c | |||
@@ -0,0 +1,472 @@ | |||
1 | /* | ||
2 | * Marvell Kirkwood pinctrl driver based on mvebu pinctrl core | ||
3 | * | ||
4 | * Author: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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 | |||
12 | #include <linux/err.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/of.h> | ||
19 | #include <linux/of_device.h> | ||
20 | #include <linux/pinctrl/pinctrl.h> | ||
21 | |||
22 | #include "pinctrl-mvebu.h" | ||
23 | |||
24 | #define V(f6180, f6190, f6192, f6281, f6282) \ | ||
25 | ((f6180 << 0) | (f6190 << 1) | (f6192 << 2) | \ | ||
26 | (f6281 << 3) | (f6282 << 4)) | ||
27 | |||
28 | enum kirkwood_variant { | ||
29 | VARIANT_MV88F6180 = V(1, 0, 0, 0, 0), | ||
30 | VARIANT_MV88F6190 = V(0, 1, 0, 0, 0), | ||
31 | VARIANT_MV88F6192 = V(0, 0, 1, 0, 0), | ||
32 | VARIANT_MV88F6281 = V(0, 0, 0, 1, 0), | ||
33 | VARIANT_MV88F6282 = V(0, 0, 0, 0, 1), | ||
34 | }; | ||
35 | |||
36 | static struct mvebu_mpp_mode mv88f6xxx_mpp_modes[] = { | ||
37 | MPP_MODE(0, | ||
38 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
39 | MPP_VAR_FUNCTION(0x1, "nand", "io2", V(1, 1, 1, 1, 1)), | ||
40 | MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1))), | ||
41 | MPP_MODE(1, | ||
42 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
43 | MPP_VAR_FUNCTION(0x1, "nand", "io3", V(1, 1, 1, 1, 1)), | ||
44 | MPP_VAR_FUNCTION(0x2, "spi", "mosi", V(1, 1, 1, 1, 1))), | ||
45 | MPP_MODE(2, | ||
46 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
47 | MPP_VAR_FUNCTION(0x1, "nand", "io4", V(1, 1, 1, 1, 1)), | ||
48 | MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1))), | ||
49 | MPP_MODE(3, | ||
50 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
51 | MPP_VAR_FUNCTION(0x1, "nand", "io5", V(1, 1, 1, 1, 1)), | ||
52 | MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1))), | ||
53 | MPP_MODE(4, | ||
54 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
55 | MPP_VAR_FUNCTION(0x1, "nand", "io6", V(1, 1, 1, 1, 1)), | ||
56 | MPP_VAR_FUNCTION(0x2, "uart0", "rxd", V(1, 1, 1, 1, 1)), | ||
57 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
58 | MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1)), | ||
59 | MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0))), | ||
60 | MPP_MODE(5, | ||
61 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
62 | MPP_VAR_FUNCTION(0x1, "nand", "io7", V(1, 1, 1, 1, 1)), | ||
63 | MPP_VAR_FUNCTION(0x2, "uart0", "txd", V(1, 1, 1, 1, 1)), | ||
64 | MPP_VAR_FUNCTION(0x4, "ptp", "trig", V(1, 1, 1, 1, 0)), | ||
65 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
66 | MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1))), | ||
67 | MPP_MODE(6, | ||
68 | MPP_VAR_FUNCTION(0x0, "sysrst", "out", V(1, 1, 1, 1, 1)), | ||
69 | MPP_VAR_FUNCTION(0x1, "spi", "mosi", V(1, 1, 1, 1, 1)), | ||
70 | MPP_VAR_FUNCTION(0x2, "ptp", "trig", V(1, 1, 1, 1, 0))), | ||
71 | MPP_MODE(7, | ||
72 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
73 | MPP_VAR_FUNCTION(0x1, "pex", "rsto", V(1, 1, 1, 1, 0)), | ||
74 | MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1)), | ||
75 | MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0)), | ||
76 | MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1))), | ||
77 | MPP_MODE(8, | ||
78 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
79 | MPP_VAR_FUNCTION(0x1, "twsi0", "sda", V(1, 1, 1, 1, 1)), | ||
80 | MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1)), | ||
81 | MPP_VAR_FUNCTION(0x3, "uart1", "rts", V(1, 1, 1, 1, 1)), | ||
82 | MPP_VAR_FUNCTION(0x4, "mii-1", "rxerr", V(0, 1, 1, 1, 1)), | ||
83 | MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1)), | ||
84 | MPP_VAR_FUNCTION(0xc, "ptp", "clk", V(1, 1, 1, 1, 0)), | ||
85 | MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1))), | ||
86 | MPP_MODE(9, | ||
87 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
88 | MPP_VAR_FUNCTION(0x1, "twsi0", "sck", V(1, 1, 1, 1, 1)), | ||
89 | MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1)), | ||
90 | MPP_VAR_FUNCTION(0x3, "uart1", "cts", V(1, 1, 1, 1, 1)), | ||
91 | MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1)), | ||
92 | MPP_VAR_FUNCTION(0xc, "ptp", "evreq", V(1, 1, 1, 1, 0)), | ||
93 | MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1))), | ||
94 | MPP_MODE(10, | ||
95 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
96 | MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1)), | ||
97 | MPP_VAR_FUNCTION(0X3, "uart0", "txd", V(1, 1, 1, 1, 1)), | ||
98 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
99 | MPP_VAR_FUNCTION(0xc, "ptp", "trig", V(1, 1, 1, 1, 0))), | ||
100 | MPP_MODE(11, | ||
101 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
102 | MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1)), | ||
103 | MPP_VAR_FUNCTION(0x3, "uart0", "rxd", V(1, 1, 1, 1, 1)), | ||
104 | MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq", V(1, 1, 1, 1, 0)), | ||
105 | MPP_VAR_FUNCTION(0xc, "ptp-2", "trig", V(1, 1, 1, 1, 0)), | ||
106 | MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0)), | ||
107 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1))), | ||
108 | MPP_MODE(12, | ||
109 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 0, 1)), | ||
110 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0)), | ||
111 | MPP_VAR_FUNCTION(0x1, "sdio", "clk", V(1, 1, 1, 1, 1)), | ||
112 | MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1)), | ||
113 | MPP_VAR_FUNCTION(0xb, "spi", "mosi", V(0, 0, 0, 0, 1)), | ||
114 | MPP_VAR_FUNCTION(0xd, "twsi1", "sda", V(0, 0, 0, 0, 1))), | ||
115 | MPP_MODE(13, | ||
116 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
117 | MPP_VAR_FUNCTION(0x1, "sdio", "cmd", V(1, 1, 1, 1, 1)), | ||
118 | MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1)), | ||
119 | MPP_VAR_FUNCTION(0xa, "audio", "rmclk", V(0, 0, 0, 0, 1)), | ||
120 | MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1))), | ||
121 | MPP_MODE(14, | ||
122 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
123 | MPP_VAR_FUNCTION(0x1, "sdio", "d0", V(1, 1, 1, 1, 1)), | ||
124 | MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1)), | ||
125 | MPP_VAR_FUNCTION(0x4, "sata1", "prsnt", V(0, 0, 1, 1, 1)), | ||
126 | MPP_VAR_FUNCTION(0xa, "audio", "spdifi", V(0, 0, 0, 0, 1)), | ||
127 | MPP_VAR_FUNCTION(0xb, "audio-1", "sdi", V(0, 0, 0, 0, 1)), | ||
128 | MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1))), | ||
129 | MPP_MODE(15, | ||
130 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
131 | MPP_VAR_FUNCTION(0x1, "sdio", "d1", V(1, 1, 1, 1, 1)), | ||
132 | MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1)), | ||
133 | MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1)), | ||
134 | MPP_VAR_FUNCTION(0x4, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
135 | MPP_VAR_FUNCTION(0xb, "spi", "cs", V(0, 0, 0, 0, 1))), | ||
136 | MPP_MODE(16, | ||
137 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
138 | MPP_VAR_FUNCTION(0x1, "sdio", "d2", V(1, 1, 1, 1, 1)), | ||
139 | MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1)), | ||
140 | MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1)), | ||
141 | MPP_VAR_FUNCTION(0x4, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
142 | MPP_VAR_FUNCTION(0xb, "lcd", "extclk", V(0, 0, 0, 0, 1)), | ||
143 | MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1))), | ||
144 | MPP_MODE(17, | ||
145 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
146 | MPP_VAR_FUNCTION(0x1, "sdio", "d3", V(1, 1, 1, 1, 1)), | ||
147 | MPP_VAR_FUNCTION(0x4, "sata0", "prsnt", V(0, 1, 1, 1, 1)), | ||
148 | MPP_VAR_FUNCTION(0xa, "sata1", "act", V(0, 0, 0, 0, 1)), | ||
149 | MPP_VAR_FUNCTION(0xd, "twsi1", "sck", V(0, 0, 0, 0, 1))), | ||
150 | MPP_MODE(18, | ||
151 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
152 | MPP_VAR_FUNCTION(0x1, "nand", "io0", V(1, 1, 1, 1, 1)), | ||
153 | MPP_VAR_FUNCTION(0x2, "pex", "clkreq", V(0, 0, 0, 0, 1))), | ||
154 | MPP_MODE(19, | ||
155 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1)), | ||
156 | MPP_VAR_FUNCTION(0x1, "nand", "io1", V(1, 1, 1, 1, 1))), | ||
157 | MPP_MODE(20, | ||
158 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
159 | MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 1, 1, 1)), | ||
160 | MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1)), | ||
161 | MPP_VAR_FUNCTION(0x3, "ge1", "txd0", V(0, 1, 1, 1, 1)), | ||
162 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 1, 1, 1)), | ||
163 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1)), | ||
164 | MPP_VAR_FUNCTION(0xb, "lcd", "d0", V(0, 0, 0, 0, 1)), | ||
165 | MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(1, 0, 0, 0, 0))), | ||
166 | MPP_MODE(21, | ||
167 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
168 | MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 1, 1, 1)), | ||
169 | MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 1, 1, 1)), | ||
170 | MPP_VAR_FUNCTION(0x3, "ge1", "txd1", V(0, 1, 1, 1, 1)), | ||
171 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(1, 0, 0, 0, 0)), | ||
172 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 1, 1, 1)), | ||
173 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
174 | MPP_VAR_FUNCTION(0xb, "lcd", "d1", V(0, 0, 0, 0, 1))), | ||
175 | MPP_MODE(22, | ||
176 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
177 | MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 1, 1, 1)), | ||
178 | MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 1, 1, 1)), | ||
179 | MPP_VAR_FUNCTION(0x3, "ge1", "txd2", V(0, 1, 1, 1, 1)), | ||
180 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(1, 0, 0, 0, 0)), | ||
181 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 1, 1, 1)), | ||
182 | MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1)), | ||
183 | MPP_VAR_FUNCTION(0xb, "lcd", "d2", V(0, 0, 0, 0, 1))), | ||
184 | MPP_MODE(23, | ||
185 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
186 | MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 1, 1, 1)), | ||
187 | MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 1, 1, 1)), | ||
188 | MPP_VAR_FUNCTION(0x3, "ge1", "txd3", V(0, 1, 1, 1, 1)), | ||
189 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(1, 0, 0, 0, 0)), | ||
190 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 1, 1, 1)), | ||
191 | MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1)), | ||
192 | MPP_VAR_FUNCTION(0xb, "lcd", "d3", V(0, 0, 0, 0, 1))), | ||
193 | MPP_MODE(24, | ||
194 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
195 | MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 1, 1, 1)), | ||
196 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 1, 1, 1)), | ||
197 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd0", V(0, 1, 1, 1, 1)), | ||
198 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(1, 0, 0, 0, 0)), | ||
199 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 1, 1, 1)), | ||
200 | MPP_VAR_FUNCTION(0xb, "lcd", "d4", V(0, 0, 0, 0, 1))), | ||
201 | MPP_MODE(25, | ||
202 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
203 | MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 1, 1, 1)), | ||
204 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 1, 1, 1)), | ||
205 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd1", V(0, 1, 1, 1, 1)), | ||
206 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(1, 0, 0, 0, 0)), | ||
207 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 1, 1, 1)), | ||
208 | MPP_VAR_FUNCTION(0xb, "lcd", "d5", V(0, 0, 0, 0, 1))), | ||
209 | MPP_MODE(26, | ||
210 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
211 | MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 1, 1, 1)), | ||
212 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 1, 1, 1)), | ||
213 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd2", V(0, 1, 1, 1, 1)), | ||
214 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(1, 0, 0, 0, 0)), | ||
215 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 1, 1, 1)), | ||
216 | MPP_VAR_FUNCTION(0xb, "lcd", "d6", V(0, 0, 0, 0, 1))), | ||
217 | MPP_MODE(27, | ||
218 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
219 | MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 1, 1, 1)), | ||
220 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 1, 1, 1)), | ||
221 | MPP_VAR_FUNCTION(0x3, "ge1", "rxd3", V(0, 1, 1, 1, 1)), | ||
222 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(1, 0, 0, 0, 0)), | ||
223 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 1, 1, 1)), | ||
224 | MPP_VAR_FUNCTION(0xb, "lcd", "d7", V(0, 0, 0, 0, 1))), | ||
225 | MPP_MODE(28, | ||
226 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
227 | MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 1, 1, 1)), | ||
228 | MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 1, 1, 1)), | ||
229 | MPP_VAR_FUNCTION(0x3, "ge1", "col", V(0, 1, 1, 1, 1)), | ||
230 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(1, 0, 0, 0, 0)), | ||
231 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 1, 1, 1)), | ||
232 | MPP_VAR_FUNCTION(0xb, "lcd", "d8", V(0, 0, 0, 0, 1))), | ||
233 | MPP_MODE(29, | ||
234 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1)), | ||
235 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 1, 1, 1)), | ||
236 | MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 1, 1, 1)), | ||
237 | MPP_VAR_FUNCTION(0x3, "ge1", "txclk", V(0, 1, 1, 1, 1)), | ||
238 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(1, 0, 0, 0, 0)), | ||
239 | MPP_VAR_FUNCTION(0xb, "lcd", "d9", V(0, 0, 0, 0, 1))), | ||
240 | MPP_MODE(30, | ||
241 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
242 | MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 1, 1, 1)), | ||
243 | MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 1, 1, 1)), | ||
244 | MPP_VAR_FUNCTION(0x3, "ge1", "rxctl", V(0, 1, 1, 1, 1)), | ||
245 | MPP_VAR_FUNCTION(0xb, "lcd", "d10", V(0, 0, 0, 0, 1))), | ||
246 | MPP_MODE(31, | ||
247 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
248 | MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 1, 1, 1)), | ||
249 | MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 1, 1, 1)), | ||
250 | MPP_VAR_FUNCTION(0x3, "ge1", "rxclk", V(0, 1, 1, 1, 1)), | ||
251 | MPP_VAR_FUNCTION(0xb, "lcd", "d11", V(0, 0, 0, 0, 1))), | ||
252 | MPP_MODE(32, | ||
253 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
254 | MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 1, 1, 1)), | ||
255 | MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 1, 1, 1)), | ||
256 | MPP_VAR_FUNCTION(0x3, "ge1", "txclko", V(0, 1, 1, 1, 1)), | ||
257 | MPP_VAR_FUNCTION(0xb, "lcd", "d12", V(0, 0, 0, 0, 1))), | ||
258 | MPP_MODE(33, | ||
259 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 1, 1, 1, 1)), | ||
260 | MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 1, 1, 1)), | ||
261 | MPP_VAR_FUNCTION(0x3, "ge1", "txctl", V(0, 1, 1, 1, 1)), | ||
262 | MPP_VAR_FUNCTION(0xb, "lcd", "d13", V(0, 0, 0, 0, 1))), | ||
263 | MPP_MODE(34, | ||
264 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
265 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 1, 1, 1)), | ||
266 | MPP_VAR_FUNCTION(0x3, "ge1", "txen", V(0, 1, 1, 1, 1)), | ||
267 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 0, 1, 1)), | ||
268 | MPP_VAR_FUNCTION(0xb, "lcd", "d14", V(0, 0, 0, 0, 1))), | ||
269 | MPP_MODE(35, | ||
270 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1)), | ||
271 | MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1)), | ||
272 | MPP_VAR_FUNCTION(0x3, "ge1", "rxerr", V(0, 1, 1, 1, 1)), | ||
273 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1)), | ||
274 | MPP_VAR_FUNCTION(0xb, "lcd", "d15", V(0, 0, 0, 0, 1)), | ||
275 | MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(0, 1, 1, 1, 1))), | ||
276 | MPP_MODE(36, | ||
277 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
278 | MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 0, 1, 1)), | ||
279 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 0, 1, 1)), | ||
280 | MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 0, 1, 1)), | ||
281 | MPP_VAR_FUNCTION(0xb, "twsi1", "sda", V(0, 0, 0, 0, 1))), | ||
282 | MPP_MODE(37, | ||
283 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
284 | MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 0, 1, 1)), | ||
285 | MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 0, 1, 1)), | ||
286 | MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 0, 1, 1)), | ||
287 | MPP_VAR_FUNCTION(0xb, "twsi1", "sck", V(0, 0, 0, 0, 1))), | ||
288 | MPP_MODE(38, | ||
289 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
290 | MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 0, 1, 1)), | ||
291 | MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 0, 1, 1)), | ||
292 | MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 0, 1, 1)), | ||
293 | MPP_VAR_FUNCTION(0xb, "lcd", "d18", V(0, 0, 0, 0, 1))), | ||
294 | MPP_MODE(39, | ||
295 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
296 | MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 0, 1, 1)), | ||
297 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 0, 1, 1)), | ||
298 | MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 0, 1, 1)), | ||
299 | MPP_VAR_FUNCTION(0xb, "lcd", "d19", V(0, 0, 0, 0, 1))), | ||
300 | MPP_MODE(40, | ||
301 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
302 | MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 0, 1, 1)), | ||
303 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 0, 1, 1)), | ||
304 | MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 0, 1, 1)), | ||
305 | MPP_VAR_FUNCTION(0xb, "lcd", "d20", V(0, 0, 0, 0, 1))), | ||
306 | MPP_MODE(41, | ||
307 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
308 | MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 0, 1, 1)), | ||
309 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 0, 1, 1)), | ||
310 | MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 0, 1, 1)), | ||
311 | MPP_VAR_FUNCTION(0xb, "lcd", "d21", V(0, 0, 0, 0, 1))), | ||
312 | MPP_MODE(42, | ||
313 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
314 | MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 0, 1, 1)), | ||
315 | MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 0, 1, 1)), | ||
316 | MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 0, 1, 1)), | ||
317 | MPP_VAR_FUNCTION(0xb, "lcd", "d22", V(0, 0, 0, 0, 1))), | ||
318 | MPP_MODE(43, | ||
319 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
320 | MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 0, 1, 1)), | ||
321 | MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 0, 1, 1)), | ||
322 | MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 0, 1, 1)), | ||
323 | MPP_VAR_FUNCTION(0xb, "lcd", "d23", V(0, 0, 0, 0, 1))), | ||
324 | MPP_MODE(44, | ||
325 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
326 | MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 0, 1, 1)), | ||
327 | MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 0, 1, 1)), | ||
328 | MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 0, 1, 1)), | ||
329 | MPP_VAR_FUNCTION(0xb, "lcd", "clk", V(0, 0, 0, 0, 1))), | ||
330 | MPP_MODE(45, | ||
331 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
332 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 1)), | ||
333 | MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 0, 1, 1)), | ||
334 | MPP_VAR_FUNCTION(0xb, "lcd", "e", V(0, 0, 0, 0, 1))), | ||
335 | MPP_MODE(46, | ||
336 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
337 | MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 0, 1, 1)), | ||
338 | MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 0, 1, 1)), | ||
339 | MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1))), | ||
340 | MPP_MODE(47, | ||
341 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
342 | MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 0, 1, 1)), | ||
343 | MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 0, 1, 1)), | ||
344 | MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1))), | ||
345 | MPP_MODE(48, | ||
346 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1)), | ||
347 | MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 0, 1, 1)), | ||
348 | MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 0, 1, 1)), | ||
349 | MPP_VAR_FUNCTION(0xb, "lcd", "d16", V(0, 0, 0, 0, 1))), | ||
350 | MPP_MODE(49, | ||
351 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0)), | ||
352 | MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 0, 0, 0, 1)), | ||
353 | MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 0)), | ||
354 | MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 0, 1, 1)), | ||
355 | MPP_VAR_FUNCTION(0x5, "ptp", "clk", V(0, 0, 0, 1, 0)), | ||
356 | MPP_VAR_FUNCTION(0xa, "pex", "clkreq", V(0, 0, 0, 0, 1)), | ||
357 | MPP_VAR_FUNCTION(0xb, "lcd", "d17", V(0, 0, 0, 0, 1))), | ||
358 | }; | ||
359 | |||
360 | static struct mvebu_mpp_ctrl mv88f6180_mpp_controls[] = { | ||
361 | MPP_REG_CTRL(0, 29), | ||
362 | }; | ||
363 | |||
364 | static struct pinctrl_gpio_range mv88f6180_gpio_ranges[] = { | ||
365 | MPP_GPIO_RANGE(0, 0, 0, 30), | ||
366 | }; | ||
367 | |||
368 | static struct mvebu_mpp_ctrl mv88f619x_mpp_controls[] = { | ||
369 | MPP_REG_CTRL(0, 35), | ||
370 | }; | ||
371 | |||
372 | static struct pinctrl_gpio_range mv88f619x_gpio_ranges[] = { | ||
373 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
374 | MPP_GPIO_RANGE(1, 32, 32, 4), | ||
375 | }; | ||
376 | |||
377 | static struct mvebu_mpp_ctrl mv88f628x_mpp_controls[] = { | ||
378 | MPP_REG_CTRL(0, 49), | ||
379 | }; | ||
380 | |||
381 | static struct pinctrl_gpio_range mv88f628x_gpio_ranges[] = { | ||
382 | MPP_GPIO_RANGE(0, 0, 0, 32), | ||
383 | MPP_GPIO_RANGE(1, 32, 32, 18), | ||
384 | }; | ||
385 | |||
386 | static struct mvebu_pinctrl_soc_info mv88f6180_info = { | ||
387 | .variant = VARIANT_MV88F6180, | ||
388 | .controls = mv88f6180_mpp_controls, | ||
389 | .ncontrols = ARRAY_SIZE(mv88f6180_mpp_controls), | ||
390 | .modes = mv88f6xxx_mpp_modes, | ||
391 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
392 | .gpioranges = mv88f6180_gpio_ranges, | ||
393 | .ngpioranges = ARRAY_SIZE(mv88f6180_gpio_ranges), | ||
394 | }; | ||
395 | |||
396 | static struct mvebu_pinctrl_soc_info mv88f6190_info = { | ||
397 | .variant = VARIANT_MV88F6190, | ||
398 | .controls = mv88f619x_mpp_controls, | ||
399 | .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), | ||
400 | .modes = mv88f6xxx_mpp_modes, | ||
401 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
402 | .gpioranges = mv88f619x_gpio_ranges, | ||
403 | .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), | ||
404 | }; | ||
405 | |||
406 | static struct mvebu_pinctrl_soc_info mv88f6192_info = { | ||
407 | .variant = VARIANT_MV88F6192, | ||
408 | .controls = mv88f619x_mpp_controls, | ||
409 | .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), | ||
410 | .modes = mv88f6xxx_mpp_modes, | ||
411 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
412 | .gpioranges = mv88f619x_gpio_ranges, | ||
413 | .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), | ||
414 | }; | ||
415 | |||
416 | static struct mvebu_pinctrl_soc_info mv88f6281_info = { | ||
417 | .variant = VARIANT_MV88F6281, | ||
418 | .controls = mv88f628x_mpp_controls, | ||
419 | .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), | ||
420 | .modes = mv88f6xxx_mpp_modes, | ||
421 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
422 | .gpioranges = mv88f628x_gpio_ranges, | ||
423 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | ||
424 | }; | ||
425 | |||
426 | static struct mvebu_pinctrl_soc_info mv88f6282_info = { | ||
427 | .variant = VARIANT_MV88F6282, | ||
428 | .controls = mv88f628x_mpp_controls, | ||
429 | .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), | ||
430 | .modes = mv88f6xxx_mpp_modes, | ||
431 | .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), | ||
432 | .gpioranges = mv88f628x_gpio_ranges, | ||
433 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | ||
434 | }; | ||
435 | |||
436 | static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = { | ||
437 | { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, | ||
438 | { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, | ||
439 | { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, | ||
440 | { .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info }, | ||
441 | { .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info }, | ||
442 | { } | ||
443 | }; | ||
444 | |||
445 | static int __devinit kirkwood_pinctrl_probe(struct platform_device *pdev) | ||
446 | { | ||
447 | const struct of_device_id *match = | ||
448 | of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); | ||
449 | pdev->dev.platform_data = match->data; | ||
450 | return mvebu_pinctrl_probe(pdev); | ||
451 | } | ||
452 | |||
453 | static int __devexit kirkwood_pinctrl_remove(struct platform_device *pdev) | ||
454 | { | ||
455 | return mvebu_pinctrl_remove(pdev); | ||
456 | } | ||
457 | |||
458 | static struct platform_driver kirkwood_pinctrl_driver = { | ||
459 | .driver = { | ||
460 | .name = "kirkwood-pinctrl", | ||
461 | .owner = THIS_MODULE, | ||
462 | .of_match_table = of_match_ptr(kirkwood_pinctrl_of_match), | ||
463 | }, | ||
464 | .probe = kirkwood_pinctrl_probe, | ||
465 | .remove = __devexit_p(kirkwood_pinctrl_remove), | ||
466 | }; | ||
467 | |||
468 | module_platform_driver(kirkwood_pinctrl_driver); | ||
469 | |||
470 | MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>"); | ||
471 | MODULE_DESCRIPTION("Marvell Kirkwood pinctrl driver"); | ||
472 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pinctrl/pinctrl-mvebu.c b/drivers/pinctrl/pinctrl-mvebu.c new file mode 100644 index 000000000000..8e6266c6249a --- /dev/null +++ b/drivers/pinctrl/pinctrl-mvebu.c | |||
@@ -0,0 +1,754 @@ | |||
1 | /* | ||
2 | * Marvell MVEBU pinctrl core driver | ||
3 | * | ||
4 | * Authors: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
5 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.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/platform_device.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/slab.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/of.h> | ||
18 | #include <linux/of_address.h> | ||
19 | #include <linux/of_platform.h> | ||
20 | #include <linux/err.h> | ||
21 | #include <linux/gpio.h> | ||
22 | #include <linux/pinctrl/machine.h> | ||
23 | #include <linux/pinctrl/pinconf.h> | ||
24 | #include <linux/pinctrl/pinctrl.h> | ||
25 | #include <linux/pinctrl/pinmux.h> | ||
26 | |||
27 | #include "core.h" | ||
28 | #include "pinctrl-mvebu.h" | ||
29 | |||
30 | #define MPPS_PER_REG 8 | ||
31 | #define MPP_BITS 4 | ||
32 | #define MPP_MASK 0xf | ||
33 | |||
34 | struct mvebu_pinctrl_function { | ||
35 | const char *name; | ||
36 | const char **groups; | ||
37 | unsigned num_groups; | ||
38 | }; | ||
39 | |||
40 | struct mvebu_pinctrl_group { | ||
41 | const char *name; | ||
42 | struct mvebu_mpp_ctrl *ctrl; | ||
43 | struct mvebu_mpp_ctrl_setting *settings; | ||
44 | unsigned num_settings; | ||
45 | unsigned gid; | ||
46 | unsigned *pins; | ||
47 | unsigned npins; | ||
48 | }; | ||
49 | |||
50 | struct mvebu_pinctrl { | ||
51 | struct device *dev; | ||
52 | struct pinctrl_dev *pctldev; | ||
53 | struct pinctrl_desc desc; | ||
54 | void __iomem *base; | ||
55 | struct mvebu_pinctrl_group *groups; | ||
56 | unsigned num_groups; | ||
57 | struct mvebu_pinctrl_function *functions; | ||
58 | unsigned num_functions; | ||
59 | u8 variant; | ||
60 | }; | ||
61 | |||
62 | static struct mvebu_pinctrl_group *mvebu_pinctrl_find_group_by_pid( | ||
63 | struct mvebu_pinctrl *pctl, unsigned pid) | ||
64 | { | ||
65 | unsigned n; | ||
66 | for (n = 0; n < pctl->num_groups; n++) { | ||
67 | if (pid >= pctl->groups[n].pins[0] && | ||
68 | pid < pctl->groups[n].pins[0] + | ||
69 | pctl->groups[n].npins) | ||
70 | return &pctl->groups[n]; | ||
71 | } | ||
72 | return NULL; | ||
73 | } | ||
74 | |||
75 | static struct mvebu_pinctrl_group *mvebu_pinctrl_find_group_by_name( | ||
76 | struct mvebu_pinctrl *pctl, const char *name) | ||
77 | { | ||
78 | unsigned n; | ||
79 | for (n = 0; n < pctl->num_groups; n++) { | ||
80 | if (strcmp(name, pctl->groups[n].name) == 0) | ||
81 | return &pctl->groups[n]; | ||
82 | } | ||
83 | return NULL; | ||
84 | } | ||
85 | |||
86 | static struct mvebu_mpp_ctrl_setting *mvebu_pinctrl_find_setting_by_val( | ||
87 | struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp, | ||
88 | unsigned long config) | ||
89 | { | ||
90 | unsigned n; | ||
91 | for (n = 0; n < grp->num_settings; n++) { | ||
92 | if (config == grp->settings[n].val) { | ||
93 | if (!pctl->variant || (pctl->variant & | ||
94 | grp->settings[n].variant)) | ||
95 | return &grp->settings[n]; | ||
96 | } | ||
97 | } | ||
98 | return NULL; | ||
99 | } | ||
100 | |||
101 | static struct mvebu_mpp_ctrl_setting *mvebu_pinctrl_find_setting_by_name( | ||
102 | struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp, | ||
103 | const char *name) | ||
104 | { | ||
105 | unsigned n; | ||
106 | for (n = 0; n < grp->num_settings; n++) { | ||
107 | if (strcmp(name, grp->settings[n].name) == 0) { | ||
108 | if (!pctl->variant || (pctl->variant & | ||
109 | grp->settings[n].variant)) | ||
110 | return &grp->settings[n]; | ||
111 | } | ||
112 | } | ||
113 | return NULL; | ||
114 | } | ||
115 | |||
116 | static struct mvebu_mpp_ctrl_setting *mvebu_pinctrl_find_gpio_setting( | ||
117 | struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp) | ||
118 | { | ||
119 | unsigned n; | ||
120 | for (n = 0; n < grp->num_settings; n++) { | ||
121 | if (grp->settings[n].flags & | ||
122 | (MVEBU_SETTING_GPO | MVEBU_SETTING_GPI)) { | ||
123 | if (!pctl->variant || (pctl->variant & | ||
124 | grp->settings[n].variant)) | ||
125 | return &grp->settings[n]; | ||
126 | } | ||
127 | } | ||
128 | return NULL; | ||
129 | } | ||
130 | |||
131 | static struct mvebu_pinctrl_function *mvebu_pinctrl_find_function_by_name( | ||
132 | struct mvebu_pinctrl *pctl, const char *name) | ||
133 | { | ||
134 | unsigned n; | ||
135 | for (n = 0; n < pctl->num_functions; n++) { | ||
136 | if (strcmp(name, pctl->functions[n].name) == 0) | ||
137 | return &pctl->functions[n]; | ||
138 | } | ||
139 | return NULL; | ||
140 | } | ||
141 | |||
142 | /* | ||
143 | * Common mpp pin configuration registers on MVEBU are | ||
144 | * registers of eight 4-bit values for each mpp setting. | ||
145 | * Register offset and bit mask are calculated accordingly below. | ||
146 | */ | ||
147 | static int mvebu_common_mpp_get(struct mvebu_pinctrl *pctl, | ||
148 | struct mvebu_pinctrl_group *grp, | ||
149 | unsigned long *config) | ||
150 | { | ||
151 | unsigned pin = grp->gid; | ||
152 | unsigned off = (pin / MPPS_PER_REG) * MPP_BITS; | ||
153 | unsigned shift = (pin % MPPS_PER_REG) * MPP_BITS; | ||
154 | |||
155 | *config = readl(pctl->base + off); | ||
156 | *config >>= shift; | ||
157 | *config &= MPP_MASK; | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | |||
162 | static int mvebu_common_mpp_set(struct mvebu_pinctrl *pctl, | ||
163 | struct mvebu_pinctrl_group *grp, | ||
164 | unsigned long config) | ||
165 | { | ||
166 | unsigned pin = grp->gid; | ||
167 | unsigned off = (pin / MPPS_PER_REG) * MPP_BITS; | ||
168 | unsigned shift = (pin % MPPS_PER_REG) * MPP_BITS; | ||
169 | unsigned long reg; | ||
170 | |||
171 | reg = readl(pctl->base + off); | ||
172 | reg &= ~(MPP_MASK << shift); | ||
173 | reg |= (config << shift); | ||
174 | writel(reg, pctl->base + off); | ||
175 | |||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | static int mvebu_pinconf_group_get(struct pinctrl_dev *pctldev, | ||
180 | unsigned gid, unsigned long *config) | ||
181 | { | ||
182 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
183 | struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; | ||
184 | |||
185 | if (!grp->ctrl) | ||
186 | return -EINVAL; | ||
187 | |||
188 | if (grp->ctrl->mpp_get) | ||
189 | return grp->ctrl->mpp_get(grp->ctrl, config); | ||
190 | |||
191 | return mvebu_common_mpp_get(pctl, grp, config); | ||
192 | } | ||
193 | |||
194 | static int mvebu_pinconf_group_set(struct pinctrl_dev *pctldev, | ||
195 | unsigned gid, unsigned long config) | ||
196 | { | ||
197 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
198 | struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; | ||
199 | |||
200 | if (!grp->ctrl) | ||
201 | return -EINVAL; | ||
202 | |||
203 | if (grp->ctrl->mpp_set) | ||
204 | return grp->ctrl->mpp_set(grp->ctrl, config); | ||
205 | |||
206 | return mvebu_common_mpp_set(pctl, grp, config); | ||
207 | } | ||
208 | |||
209 | static void mvebu_pinconf_group_dbg_show(struct pinctrl_dev *pctldev, | ||
210 | struct seq_file *s, unsigned gid) | ||
211 | { | ||
212 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
213 | struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; | ||
214 | struct mvebu_mpp_ctrl_setting *curr; | ||
215 | unsigned long config; | ||
216 | unsigned n; | ||
217 | |||
218 | if (mvebu_pinconf_group_get(pctldev, gid, &config)) | ||
219 | return; | ||
220 | |||
221 | curr = mvebu_pinctrl_find_setting_by_val(pctl, grp, config); | ||
222 | |||
223 | if (curr) { | ||
224 | seq_printf(s, "current: %s", curr->name); | ||
225 | if (curr->subname) | ||
226 | seq_printf(s, "(%s)", curr->subname); | ||
227 | if (curr->flags & (MVEBU_SETTING_GPO | MVEBU_SETTING_GPI)) { | ||
228 | seq_printf(s, "("); | ||
229 | if (curr->flags & MVEBU_SETTING_GPI) | ||
230 | seq_printf(s, "i"); | ||
231 | if (curr->flags & MVEBU_SETTING_GPO) | ||
232 | seq_printf(s, "o"); | ||
233 | seq_printf(s, ")"); | ||
234 | } | ||
235 | } else | ||
236 | seq_printf(s, "current: UNKNOWN"); | ||
237 | |||
238 | if (grp->num_settings > 1) { | ||
239 | seq_printf(s, ", available = ["); | ||
240 | for (n = 0; n < grp->num_settings; n++) { | ||
241 | if (curr == &grp->settings[n]) | ||
242 | continue; | ||
243 | |||
244 | /* skip unsupported settings for this variant */ | ||
245 | if (pctl->variant && | ||
246 | !(pctl->variant & grp->settings[n].variant)) | ||
247 | continue; | ||
248 | |||
249 | seq_printf(s, " %s", grp->settings[n].name); | ||
250 | if (grp->settings[n].subname) | ||
251 | seq_printf(s, "(%s)", grp->settings[n].subname); | ||
252 | if (grp->settings[n].flags & | ||
253 | (MVEBU_SETTING_GPO | MVEBU_SETTING_GPI)) { | ||
254 | seq_printf(s, "("); | ||
255 | if (grp->settings[n].flags & MVEBU_SETTING_GPI) | ||
256 | seq_printf(s, "i"); | ||
257 | if (grp->settings[n].flags & MVEBU_SETTING_GPO) | ||
258 | seq_printf(s, "o"); | ||
259 | seq_printf(s, ")"); | ||
260 | } | ||
261 | } | ||
262 | seq_printf(s, " ]"); | ||
263 | } | ||
264 | return; | ||
265 | } | ||
266 | |||
267 | static struct pinconf_ops mvebu_pinconf_ops = { | ||
268 | .pin_config_group_get = mvebu_pinconf_group_get, | ||
269 | .pin_config_group_set = mvebu_pinconf_group_set, | ||
270 | .pin_config_group_dbg_show = mvebu_pinconf_group_dbg_show, | ||
271 | }; | ||
272 | |||
273 | static int mvebu_pinmux_get_funcs_count(struct pinctrl_dev *pctldev) | ||
274 | { | ||
275 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
276 | |||
277 | return pctl->num_functions; | ||
278 | } | ||
279 | |||
280 | static const char *mvebu_pinmux_get_func_name(struct pinctrl_dev *pctldev, | ||
281 | unsigned fid) | ||
282 | { | ||
283 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
284 | |||
285 | return pctl->functions[fid].name; | ||
286 | } | ||
287 | |||
288 | static int mvebu_pinmux_get_groups(struct pinctrl_dev *pctldev, unsigned fid, | ||
289 | const char * const **groups, | ||
290 | unsigned * const num_groups) | ||
291 | { | ||
292 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
293 | |||
294 | *groups = pctl->functions[fid].groups; | ||
295 | *num_groups = pctl->functions[fid].num_groups; | ||
296 | return 0; | ||
297 | } | ||
298 | |||
299 | static int mvebu_pinmux_enable(struct pinctrl_dev *pctldev, unsigned fid, | ||
300 | unsigned gid) | ||
301 | { | ||
302 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
303 | struct mvebu_pinctrl_function *func = &pctl->functions[fid]; | ||
304 | struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; | ||
305 | struct mvebu_mpp_ctrl_setting *setting; | ||
306 | int ret; | ||
307 | |||
308 | setting = mvebu_pinctrl_find_setting_by_name(pctl, grp, | ||
309 | func->name); | ||
310 | if (!setting) { | ||
311 | dev_err(pctl->dev, | ||
312 | "unable to find setting %s in group %s\n", | ||
313 | func->name, func->groups[gid]); | ||
314 | return -EINVAL; | ||
315 | } | ||
316 | |||
317 | ret = mvebu_pinconf_group_set(pctldev, grp->gid, setting->val); | ||
318 | if (ret) { | ||
319 | dev_err(pctl->dev, "cannot set group %s to %s\n", | ||
320 | func->groups[gid], func->name); | ||
321 | return ret; | ||
322 | } | ||
323 | |||
324 | return 0; | ||
325 | } | ||
326 | |||
327 | static int mvebu_pinmux_gpio_request_enable(struct pinctrl_dev *pctldev, | ||
328 | struct pinctrl_gpio_range *range, unsigned offset) | ||
329 | { | ||
330 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
331 | struct mvebu_pinctrl_group *grp; | ||
332 | struct mvebu_mpp_ctrl_setting *setting; | ||
333 | |||
334 | grp = mvebu_pinctrl_find_group_by_pid(pctl, offset); | ||
335 | if (!grp) | ||
336 | return -EINVAL; | ||
337 | |||
338 | if (grp->ctrl->mpp_gpio_req) | ||
339 | return grp->ctrl->mpp_gpio_req(grp->ctrl, offset); | ||
340 | |||
341 | setting = mvebu_pinctrl_find_gpio_setting(pctl, grp); | ||
342 | if (!setting) | ||
343 | return -ENOTSUPP; | ||
344 | |||
345 | return mvebu_pinconf_group_set(pctldev, grp->gid, setting->val); | ||
346 | } | ||
347 | |||
348 | static int mvebu_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev, | ||
349 | struct pinctrl_gpio_range *range, unsigned offset, bool input) | ||
350 | { | ||
351 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
352 | struct mvebu_pinctrl_group *grp; | ||
353 | struct mvebu_mpp_ctrl_setting *setting; | ||
354 | |||
355 | grp = mvebu_pinctrl_find_group_by_pid(pctl, offset); | ||
356 | if (!grp) | ||
357 | return -EINVAL; | ||
358 | |||
359 | if (grp->ctrl->mpp_gpio_dir) | ||
360 | return grp->ctrl->mpp_gpio_dir(grp->ctrl, offset, input); | ||
361 | |||
362 | setting = mvebu_pinctrl_find_gpio_setting(pctl, grp); | ||
363 | if (!setting) | ||
364 | return -ENOTSUPP; | ||
365 | |||
366 | if ((input && (setting->flags & MVEBU_SETTING_GPI)) || | ||
367 | (!input && (setting->flags & MVEBU_SETTING_GPO))) | ||
368 | return 0; | ||
369 | |||
370 | return -ENOTSUPP; | ||
371 | } | ||
372 | |||
373 | static struct pinmux_ops mvebu_pinmux_ops = { | ||
374 | .get_functions_count = mvebu_pinmux_get_funcs_count, | ||
375 | .get_function_name = mvebu_pinmux_get_func_name, | ||
376 | .get_function_groups = mvebu_pinmux_get_groups, | ||
377 | .gpio_request_enable = mvebu_pinmux_gpio_request_enable, | ||
378 | .gpio_set_direction = mvebu_pinmux_gpio_set_direction, | ||
379 | .enable = mvebu_pinmux_enable, | ||
380 | }; | ||
381 | |||
382 | static int mvebu_pinctrl_get_groups_count(struct pinctrl_dev *pctldev) | ||
383 | { | ||
384 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
385 | return pctl->num_groups; | ||
386 | } | ||
387 | |||
388 | static const char *mvebu_pinctrl_get_group_name(struct pinctrl_dev *pctldev, | ||
389 | unsigned gid) | ||
390 | { | ||
391 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
392 | return pctl->groups[gid].name; | ||
393 | } | ||
394 | |||
395 | static int mvebu_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, | ||
396 | unsigned gid, const unsigned **pins, | ||
397 | unsigned *num_pins) | ||
398 | { | ||
399 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
400 | *pins = pctl->groups[gid].pins; | ||
401 | *num_pins = pctl->groups[gid].npins; | ||
402 | return 0; | ||
403 | } | ||
404 | |||
405 | static int mvebu_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, | ||
406 | struct device_node *np, | ||
407 | struct pinctrl_map **map, | ||
408 | unsigned *num_maps) | ||
409 | { | ||
410 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | ||
411 | struct property *prop; | ||
412 | const char *function; | ||
413 | const char *group; | ||
414 | int ret, nmaps, n; | ||
415 | |||
416 | *map = NULL; | ||
417 | *num_maps = 0; | ||
418 | |||
419 | ret = of_property_read_string(np, "marvell,function", &function); | ||
420 | if (ret) { | ||
421 | dev_err(pctl->dev, | ||
422 | "missing marvell,function in node %s\n", np->name); | ||
423 | return 0; | ||
424 | } | ||
425 | |||
426 | nmaps = of_property_count_strings(np, "marvell,pins"); | ||
427 | if (nmaps < 0) { | ||
428 | dev_err(pctl->dev, | ||
429 | "missing marvell,pins in node %s\n", np->name); | ||
430 | return 0; | ||
431 | } | ||
432 | |||
433 | *map = kmalloc(nmaps * sizeof(struct pinctrl_map), GFP_KERNEL); | ||
434 | if (map == NULL) { | ||
435 | dev_err(pctl->dev, | ||
436 | "cannot allocate pinctrl_map memory for %s\n", | ||
437 | np->name); | ||
438 | return -ENOMEM; | ||
439 | } | ||
440 | |||
441 | n = 0; | ||
442 | of_property_for_each_string(np, "marvell,pins", prop, group) { | ||
443 | struct mvebu_pinctrl_group *grp = | ||
444 | mvebu_pinctrl_find_group_by_name(pctl, group); | ||
445 | |||
446 | if (!grp) { | ||
447 | dev_err(pctl->dev, "unknown pin %s", group); | ||
448 | continue; | ||
449 | } | ||
450 | |||
451 | if (!mvebu_pinctrl_find_setting_by_name(pctl, grp, function)) { | ||
452 | dev_err(pctl->dev, "unsupported function %s on pin %s", | ||
453 | function, group); | ||
454 | continue; | ||
455 | } | ||
456 | |||
457 | (*map)[n].type = PIN_MAP_TYPE_MUX_GROUP; | ||
458 | (*map)[n].data.mux.group = group; | ||
459 | (*map)[n].data.mux.function = function; | ||
460 | n++; | ||
461 | } | ||
462 | |||
463 | *num_maps = nmaps; | ||
464 | |||
465 | return 0; | ||
466 | } | ||
467 | |||
468 | static void mvebu_pinctrl_dt_free_map(struct pinctrl_dev *pctldev, | ||
469 | struct pinctrl_map *map, unsigned num_maps) | ||
470 | { | ||
471 | kfree(map); | ||
472 | } | ||
473 | |||
474 | static struct pinctrl_ops mvebu_pinctrl_ops = { | ||
475 | .get_groups_count = mvebu_pinctrl_get_groups_count, | ||
476 | .get_group_name = mvebu_pinctrl_get_group_name, | ||
477 | .get_group_pins = mvebu_pinctrl_get_group_pins, | ||
478 | .dt_node_to_map = mvebu_pinctrl_dt_node_to_map, | ||
479 | .dt_free_map = mvebu_pinctrl_dt_free_map, | ||
480 | }; | ||
481 | |||
482 | static int __devinit _add_function(struct mvebu_pinctrl_function *funcs, | ||
483 | const char *name) | ||
484 | { | ||
485 | while (funcs->num_groups) { | ||
486 | /* function already there */ | ||
487 | if (strcmp(funcs->name, name) == 0) { | ||
488 | funcs->num_groups++; | ||
489 | return -EEXIST; | ||
490 | } | ||
491 | funcs++; | ||
492 | } | ||
493 | funcs->name = name; | ||
494 | funcs->num_groups = 1; | ||
495 | return 0; | ||
496 | } | ||
497 | |||
498 | static int __devinit mvebu_pinctrl_build_functions(struct platform_device *pdev, | ||
499 | struct mvebu_pinctrl *pctl) | ||
500 | { | ||
501 | struct mvebu_pinctrl_function *funcs; | ||
502 | int num = 0; | ||
503 | int n, s; | ||
504 | |||
505 | /* we allocate functions for number of pins and hope | ||
506 | * there are less unique functions than pins available */ | ||
507 | funcs = devm_kzalloc(&pdev->dev, pctl->desc.npins * | ||
508 | sizeof(struct mvebu_pinctrl_function), GFP_KERNEL); | ||
509 | if (!funcs) | ||
510 | return -ENOMEM; | ||
511 | |||
512 | for (n = 0; n < pctl->num_groups; n++) { | ||
513 | struct mvebu_pinctrl_group *grp = &pctl->groups[n]; | ||
514 | for (s = 0; s < grp->num_settings; s++) { | ||
515 | /* skip unsupported settings on this variant */ | ||
516 | if (pctl->variant && | ||
517 | !(pctl->variant & grp->settings[s].variant)) | ||
518 | continue; | ||
519 | |||
520 | /* check for unique functions and count groups */ | ||
521 | if (_add_function(funcs, grp->settings[s].name)) | ||
522 | continue; | ||
523 | |||
524 | num++; | ||
525 | } | ||
526 | } | ||
527 | |||
528 | /* with the number of unique functions and it's groups known, | ||
529 | reallocate functions and assign group names */ | ||
530 | funcs = krealloc(funcs, num * sizeof(struct mvebu_pinctrl_function), | ||
531 | GFP_KERNEL); | ||
532 | if (!funcs) | ||
533 | return -ENOMEM; | ||
534 | |||
535 | pctl->num_functions = num; | ||
536 | pctl->functions = funcs; | ||
537 | |||
538 | for (n = 0; n < pctl->num_groups; n++) { | ||
539 | struct mvebu_pinctrl_group *grp = &pctl->groups[n]; | ||
540 | for (s = 0; s < grp->num_settings; s++) { | ||
541 | struct mvebu_pinctrl_function *f; | ||
542 | const char **groups; | ||
543 | |||
544 | /* skip unsupported settings on this variant */ | ||
545 | if (pctl->variant && | ||
546 | !(pctl->variant & grp->settings[s].variant)) | ||
547 | continue; | ||
548 | |||
549 | f = mvebu_pinctrl_find_function_by_name(pctl, | ||
550 | grp->settings[s].name); | ||
551 | |||
552 | /* allocate group name array if not done already */ | ||
553 | if (!f->groups) { | ||
554 | f->groups = devm_kzalloc(&pdev->dev, | ||
555 | f->num_groups * sizeof(char *), | ||
556 | GFP_KERNEL); | ||
557 | if (!f->groups) | ||
558 | return -ENOMEM; | ||
559 | } | ||
560 | |||
561 | /* find next free group name and assign current name */ | ||
562 | groups = f->groups; | ||
563 | while (*groups) | ||
564 | groups++; | ||
565 | *groups = grp->name; | ||
566 | } | ||
567 | } | ||
568 | |||
569 | return 0; | ||
570 | } | ||
571 | |||
572 | int __devinit mvebu_pinctrl_probe(struct platform_device *pdev) | ||
573 | { | ||
574 | struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev); | ||
575 | struct device_node *np = pdev->dev.of_node; | ||
576 | struct mvebu_pinctrl *pctl; | ||
577 | void __iomem *base; | ||
578 | struct pinctrl_pin_desc *pdesc; | ||
579 | unsigned gid, n, k; | ||
580 | int ret; | ||
581 | |||
582 | if (!soc || !soc->controls || !soc->modes) { | ||
583 | dev_err(&pdev->dev, "wrong pinctrl soc info\n"); | ||
584 | return -EINVAL; | ||
585 | } | ||
586 | |||
587 | base = of_iomap(np, 0); | ||
588 | if (!base) { | ||
589 | dev_err(&pdev->dev, "unable to get base address\n"); | ||
590 | return -ENODEV; | ||
591 | } | ||
592 | |||
593 | pctl = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_pinctrl), | ||
594 | GFP_KERNEL); | ||
595 | if (!pctl) { | ||
596 | dev_err(&pdev->dev, "unable to alloc driver\n"); | ||
597 | return -ENOMEM; | ||
598 | } | ||
599 | |||
600 | pctl->desc.name = dev_name(&pdev->dev); | ||
601 | pctl->desc.owner = THIS_MODULE; | ||
602 | pctl->desc.pctlops = &mvebu_pinctrl_ops; | ||
603 | pctl->desc.pmxops = &mvebu_pinmux_ops; | ||
604 | pctl->desc.confops = &mvebu_pinconf_ops; | ||
605 | pctl->variant = soc->variant; | ||
606 | pctl->base = base; | ||
607 | pctl->dev = &pdev->dev; | ||
608 | platform_set_drvdata(pdev, pctl); | ||
609 | |||
610 | /* count controls and create names for mvebu generic | ||
611 | register controls; also does sanity checks */ | ||
612 | pctl->num_groups = 0; | ||
613 | pctl->desc.npins = 0; | ||
614 | for (n = 0; n < soc->ncontrols; n++) { | ||
615 | struct mvebu_mpp_ctrl *ctrl = &soc->controls[n]; | ||
616 | char *names; | ||
617 | |||
618 | pctl->desc.npins += ctrl->npins; | ||
619 | /* initial control pins */ | ||
620 | for (k = 0; k < ctrl->npins; k++) | ||
621 | ctrl->pins[k] = ctrl->pid + k; | ||
622 | |||
623 | /* special soc specific control */ | ||
624 | if (ctrl->mpp_get || ctrl->mpp_set) { | ||
625 | if (!ctrl->name || !ctrl->mpp_set || !ctrl->mpp_set) { | ||
626 | dev_err(&pdev->dev, "wrong soc control info\n"); | ||
627 | return -EINVAL; | ||
628 | } | ||
629 | pctl->num_groups += 1; | ||
630 | continue; | ||
631 | } | ||
632 | |||
633 | /* generic mvebu register control */ | ||
634 | names = devm_kzalloc(&pdev->dev, ctrl->npins * 8, GFP_KERNEL); | ||
635 | if (!names) { | ||
636 | dev_err(&pdev->dev, "failed to alloc mpp names\n"); | ||
637 | return -ENOMEM; | ||
638 | } | ||
639 | for (k = 0; k < ctrl->npins; k++) | ||
640 | sprintf(names + 8*k, "mpp%d", ctrl->pid+k); | ||
641 | ctrl->name = names; | ||
642 | pctl->num_groups += ctrl->npins; | ||
643 | } | ||
644 | |||
645 | pdesc = devm_kzalloc(&pdev->dev, pctl->desc.npins * | ||
646 | sizeof(struct pinctrl_pin_desc), GFP_KERNEL); | ||
647 | if (!pdesc) { | ||
648 | dev_err(&pdev->dev, "failed to alloc pinctrl pins\n"); | ||
649 | return -ENOMEM; | ||
650 | } | ||
651 | |||
652 | for (n = 0; n < pctl->desc.npins; n++) | ||
653 | pdesc[n].number = n; | ||
654 | pctl->desc.pins = pdesc; | ||
655 | |||
656 | pctl->groups = devm_kzalloc(&pdev->dev, pctl->num_groups * | ||
657 | sizeof(struct mvebu_pinctrl_group), GFP_KERNEL); | ||
658 | if (!pctl->groups) { | ||
659 | dev_err(&pdev->dev, "failed to alloc pinctrl groups\n"); | ||
660 | return -ENOMEM; | ||
661 | } | ||
662 | |||
663 | /* assign mpp controls to groups */ | ||
664 | gid = 0; | ||
665 | for (n = 0; n < soc->ncontrols; n++) { | ||
666 | struct mvebu_mpp_ctrl *ctrl = &soc->controls[n]; | ||
667 | pctl->groups[gid].gid = gid; | ||
668 | pctl->groups[gid].ctrl = ctrl; | ||
669 | pctl->groups[gid].name = ctrl->name; | ||
670 | pctl->groups[gid].pins = ctrl->pins; | ||
671 | pctl->groups[gid].npins = ctrl->npins; | ||
672 | |||
673 | /* generic mvebu register control maps to a number of groups */ | ||
674 | if (!ctrl->mpp_get && !ctrl->mpp_set) { | ||
675 | pctl->groups[gid].npins = 1; | ||
676 | |||
677 | for (k = 1; k < ctrl->npins; k++) { | ||
678 | gid++; | ||
679 | pctl->groups[gid].gid = gid; | ||
680 | pctl->groups[gid].ctrl = ctrl; | ||
681 | pctl->groups[gid].name = &ctrl->name[8*k]; | ||
682 | pctl->groups[gid].pins = &ctrl->pins[k]; | ||
683 | pctl->groups[gid].npins = 1; | ||
684 | } | ||
685 | } | ||
686 | gid++; | ||
687 | } | ||
688 | |||
689 | /* assign mpp modes to groups */ | ||
690 | for (n = 0; n < soc->nmodes; n++) { | ||
691 | struct mvebu_mpp_mode *mode = &soc->modes[n]; | ||
692 | struct mvebu_pinctrl_group *grp = | ||
693 | mvebu_pinctrl_find_group_by_pid(pctl, mode->pid); | ||
694 | unsigned num_settings; | ||
695 | |||
696 | if (!grp) { | ||
697 | dev_warn(&pdev->dev, "unknown pinctrl group %d\n", | ||
698 | mode->pid); | ||
699 | continue; | ||
700 | } | ||
701 | |||
702 | for (num_settings = 0; ;) { | ||
703 | struct mvebu_mpp_ctrl_setting *set = | ||
704 | &mode->settings[num_settings]; | ||
705 | |||
706 | if (!set->name) | ||
707 | break; | ||
708 | num_settings++; | ||
709 | |||
710 | /* skip unsupported settings for this variant */ | ||
711 | if (pctl->variant && !(pctl->variant & set->variant)) | ||
712 | continue; | ||
713 | |||
714 | /* find gpio/gpo/gpi settings */ | ||
715 | if (strcmp(set->name, "gpio") == 0) | ||
716 | set->flags = MVEBU_SETTING_GPI | | ||
717 | MVEBU_SETTING_GPO; | ||
718 | else if (strcmp(set->name, "gpo") == 0) | ||
719 | set->flags = MVEBU_SETTING_GPO; | ||
720 | else if (strcmp(set->name, "gpi") == 0) | ||
721 | set->flags = MVEBU_SETTING_GPI; | ||
722 | } | ||
723 | |||
724 | grp->settings = mode->settings; | ||
725 | grp->num_settings = num_settings; | ||
726 | } | ||
727 | |||
728 | ret = mvebu_pinctrl_build_functions(pdev, pctl); | ||
729 | if (ret) { | ||
730 | dev_err(&pdev->dev, "unable to build functions\n"); | ||
731 | return ret; | ||
732 | } | ||
733 | |||
734 | pctl->pctldev = pinctrl_register(&pctl->desc, &pdev->dev, pctl); | ||
735 | if (!pctl->pctldev) { | ||
736 | dev_err(&pdev->dev, "unable to register pinctrl driver\n"); | ||
737 | return -EINVAL; | ||
738 | } | ||
739 | |||
740 | dev_info(&pdev->dev, "registered pinctrl driver\n"); | ||
741 | |||
742 | /* register gpio ranges */ | ||
743 | for (n = 0; n < soc->ngpioranges; n++) | ||
744 | pinctrl_add_gpio_range(pctl->pctldev, &soc->gpioranges[n]); | ||
745 | |||
746 | return 0; | ||
747 | } | ||
748 | |||
749 | int __devexit mvebu_pinctrl_remove(struct platform_device *pdev) | ||
750 | { | ||
751 | struct mvebu_pinctrl *pctl = platform_get_drvdata(pdev); | ||
752 | pinctrl_unregister(pctl->pctldev); | ||
753 | return 0; | ||
754 | } | ||
diff --git a/drivers/pinctrl/pinctrl-mvebu.h b/drivers/pinctrl/pinctrl-mvebu.h new file mode 100644 index 000000000000..90bd3beee860 --- /dev/null +++ b/drivers/pinctrl/pinctrl-mvebu.h | |||
@@ -0,0 +1,192 @@ | |||
1 | /* | ||
2 | * Marvell MVEBU pinctrl driver | ||
3 | * | ||
4 | * Authors: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
5 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.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 | #ifndef __PINCTRL_MVEBU_H__ | ||
14 | #define __PINCTRL_MVEBU_H__ | ||
15 | |||
16 | /** | ||
17 | * struct mvebu_mpp_ctrl - describe a mpp control | ||
18 | * @name: name of the control group | ||
19 | * @pid: first pin id handled by this control | ||
20 | * @npins: number of pins controlled by this control | ||
21 | * @mpp_get: (optional) special function to get mpp setting | ||
22 | * @mpp_set: (optional) special function to set mpp setting | ||
23 | * @mpp_gpio_req: (optional) special function to request gpio | ||
24 | * @mpp_gpio_dir: (optional) special function to set gpio direction | ||
25 | * | ||
26 | * A mpp_ctrl describes a muxable unit, e.g. pin, group of pins, or | ||
27 | * internal function, inside the SoC. Each muxable unit can be switched | ||
28 | * between two or more different settings, e.g. assign mpp pin 13 to | ||
29 | * uart1 or sata. | ||
30 | * | ||
31 | * If optional mpp_get/_set functions are set these are used to get/set | ||
32 | * a specific mode. Otherwise it is assumed that the mpp control is based | ||
33 | * on 4-bit groups in subsequent registers. The optional mpp_gpio_req/_dir | ||
34 | * functions can be used to allow pin settings with varying gpio pins. | ||
35 | */ | ||
36 | struct mvebu_mpp_ctrl { | ||
37 | const char *name; | ||
38 | u8 pid; | ||
39 | u8 npins; | ||
40 | unsigned *pins; | ||
41 | int (*mpp_get)(struct mvebu_mpp_ctrl *ctrl, unsigned long *config); | ||
42 | int (*mpp_set)(struct mvebu_mpp_ctrl *ctrl, unsigned long config); | ||
43 | int (*mpp_gpio_req)(struct mvebu_mpp_ctrl *ctrl, u8 pid); | ||
44 | int (*mpp_gpio_dir)(struct mvebu_mpp_ctrl *ctrl, u8 pid, bool input); | ||
45 | }; | ||
46 | |||
47 | /** | ||
48 | * struct mvebu_mpp_ctrl_setting - describe a mpp ctrl setting | ||
49 | * @val: ctrl setting value | ||
50 | * @name: ctrl setting name, e.g. uart2, spi0 - unique per mpp_mode | ||
51 | * @subname: (optional) additional ctrl setting name, e.g. rts, cts | ||
52 | * @variant: (optional) variant identifier mask | ||
53 | * @flags: (private) flags to store gpi/gpo/gpio capabilities | ||
54 | * | ||
55 | * A ctrl_setting describes a specific internal mux function that a mpp pin | ||
56 | * can be switched to. The value (val) will be written in the corresponding | ||
57 | * register for common mpp pin configuration registers on MVEBU. SoC specific | ||
58 | * mpp_get/_set function may use val to distinguish between different settings. | ||
59 | * | ||
60 | * The name will be used to switch to this setting in DT description, e.g. | ||
61 | * marvell,function = "uart2". subname is only for debugging purposes. | ||
62 | * | ||
63 | * If name is one of "gpi", "gpo", "gpio" gpio capabilities are | ||
64 | * parsed during initialization and stored in flags. | ||
65 | * | ||
66 | * The variant can be used to combine different revisions of one SoC to a | ||
67 | * common pinctrl driver. It is matched (AND) with variant of soc_info to | ||
68 | * determine if a setting is available on the current SoC revision. | ||
69 | */ | ||
70 | struct mvebu_mpp_ctrl_setting { | ||
71 | u8 val; | ||
72 | const char *name; | ||
73 | const char *subname; | ||
74 | u8 variant; | ||
75 | u8 flags; | ||
76 | #define MVEBU_SETTING_GPO (1 << 0) | ||
77 | #define MVEBU_SETTING_GPI (1 << 1) | ||
78 | }; | ||
79 | |||
80 | /** | ||
81 | * struct mvebu_mpp_mode - link ctrl and settings | ||
82 | * @pid: first pin id handled by this mode | ||
83 | * @settings: list of settings available for this mode | ||
84 | * | ||
85 | * A mode connects all available settings with the corresponding mpp_ctrl | ||
86 | * given by pid. | ||
87 | */ | ||
88 | struct mvebu_mpp_mode { | ||
89 | u8 pid; | ||
90 | struct mvebu_mpp_ctrl_setting *settings; | ||
91 | }; | ||
92 | |||
93 | /** | ||
94 | * struct mvebu_pinctrl_soc_info - SoC specific info passed to pinctrl-mvebu | ||
95 | * @variant: variant mask of soc_info | ||
96 | * @controls: list of available mvebu_mpp_ctrls | ||
97 | * @ncontrols: number of available mvebu_mpp_ctrls | ||
98 | * @modes: list of available mvebu_mpp_modes | ||
99 | * @nmodes: number of available mvebu_mpp_modes | ||
100 | * @gpioranges: list of pinctrl_gpio_ranges | ||
101 | * @ngpioranges: number of available pinctrl_gpio_ranges | ||
102 | * | ||
103 | * This struct describes all pinctrl related information for a specific SoC. | ||
104 | * If variant is unequal 0 it will be matched (AND) with variant of each | ||
105 | * setting and allows to distinguish between different revisions of one SoC. | ||
106 | */ | ||
107 | struct mvebu_pinctrl_soc_info { | ||
108 | u8 variant; | ||
109 | struct mvebu_mpp_ctrl *controls; | ||
110 | int ncontrols; | ||
111 | struct mvebu_mpp_mode *modes; | ||
112 | int nmodes; | ||
113 | struct pinctrl_gpio_range *gpioranges; | ||
114 | int ngpioranges; | ||
115 | }; | ||
116 | |||
117 | #define MPP_REG_CTRL(_idl, _idh) \ | ||
118 | { \ | ||
119 | .name = NULL, \ | ||
120 | .pid = _idl, \ | ||
121 | .npins = _idh - _idl + 1, \ | ||
122 | .pins = (unsigned[_idh - _idl + 1]) { }, \ | ||
123 | .mpp_get = NULL, \ | ||
124 | .mpp_set = NULL, \ | ||
125 | .mpp_gpio_req = NULL, \ | ||
126 | .mpp_gpio_dir = NULL, \ | ||
127 | } | ||
128 | |||
129 | #define MPP_FUNC_CTRL(_idl, _idh, _name, _func) \ | ||
130 | { \ | ||
131 | .name = _name, \ | ||
132 | .pid = _idl, \ | ||
133 | .npins = _idh - _idl + 1, \ | ||
134 | .pins = (unsigned[_idh - _idl + 1]) { }, \ | ||
135 | .mpp_get = _func ## _get, \ | ||
136 | .mpp_set = _func ## _set, \ | ||
137 | .mpp_gpio_req = NULL, \ | ||
138 | .mpp_gpio_dir = NULL, \ | ||
139 | } | ||
140 | |||
141 | #define MPP_FUNC_GPIO_CTRL(_idl, _idh, _name, _func) \ | ||
142 | { \ | ||
143 | .name = _name, \ | ||
144 | .pid = _idl, \ | ||
145 | .npins = _idh - _idl + 1, \ | ||
146 | .pins = (unsigned[_idh - _idl + 1]) { }, \ | ||
147 | .mpp_get = _func ## _get, \ | ||
148 | .mpp_set = _func ## _set, \ | ||
149 | .mpp_gpio_req = _func ## _gpio_req, \ | ||
150 | .mpp_gpio_dir = _func ## _gpio_dir, \ | ||
151 | } | ||
152 | |||
153 | #define _MPP_VAR_FUNCTION(_val, _name, _subname, _mask) \ | ||
154 | { \ | ||
155 | .val = _val, \ | ||
156 | .name = _name, \ | ||
157 | .subname = _subname, \ | ||
158 | .variant = _mask, \ | ||
159 | .flags = 0, \ | ||
160 | } | ||
161 | |||
162 | #if defined(CONFIG_DEBUG_FS) | ||
163 | #define MPP_VAR_FUNCTION(_val, _name, _subname, _mask) \ | ||
164 | _MPP_VAR_FUNCTION(_val, _name, _subname, _mask) | ||
165 | #else | ||
166 | #define MPP_VAR_FUNCTION(_val, _name, _subname, _mask) \ | ||
167 | _MPP_VAR_FUNCTION(_val, _name, NULL, _mask) | ||
168 | #endif | ||
169 | |||
170 | #define MPP_FUNCTION(_val, _name, _subname) \ | ||
171 | MPP_VAR_FUNCTION(_val, _name, _subname, (u8)-1) | ||
172 | |||
173 | #define MPP_MODE(_id, ...) \ | ||
174 | { \ | ||
175 | .pid = _id, \ | ||
176 | .settings = (struct mvebu_mpp_ctrl_setting[]){ \ | ||
177 | __VA_ARGS__, { } }, \ | ||
178 | } | ||
179 | |||
180 | #define MPP_GPIO_RANGE(_id, _pinbase, _gpiobase, _npins) \ | ||
181 | { \ | ||
182 | .name = "mvebu-gpio", \ | ||
183 | .id = _id, \ | ||
184 | .pin_base = _pinbase, \ | ||
185 | .base = _gpiobase, \ | ||
186 | .npins = _npins, \ | ||
187 | } | ||
188 | |||
189 | int mvebu_pinctrl_probe(struct platform_device *pdev); | ||
190 | int mvebu_pinctrl_remove(struct platform_device *pdev); | ||
191 | |||
192 | #endif | ||
diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 9bd1c92ad96e..dfb4b7f448c5 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c | |||
@@ -37,8 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/spi/spi.h> | 38 | #include <linux/spi/spi.h> |
39 | 39 | ||
40 | #include <plat/clock.h> | ||
41 | |||
42 | #define OMAP1_SPI100K_MAX_FREQ 48000000 | 40 | #define OMAP1_SPI100K_MAX_FREQ 48000000 |
43 | 41 | ||
44 | #define ICR_SPITAS (OMAP7XX_ICR_BASE + 0x12) | 42 | #define ICR_SPITAS (OMAP7XX_ICR_BASE + 0x12) |
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 474e2174e08a..3542fdc664b1 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #include <linux/spi/spi.h> | 44 | #include <linux/spi/spi.h> |
45 | 45 | ||
46 | #include <plat/clock.h> | ||
47 | #include <linux/platform_data/spi-omap2-mcspi.h> | 46 | #include <linux/platform_data/spi-omap2-mcspi.h> |
48 | 47 | ||
49 | #define OMAP2_MCSPI_MAX_FREQ 48000000 | 48 | #define OMAP2_MCSPI_MAX_FREQ 48000000 |