diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-davinci/omapl138/0002-uio_pruss2-Platform-changes.patch')
-rwxr-xr-x | extras/recipes-kernel/linux/linux-davinci/omapl138/0002-uio_pruss2-Platform-changes.patch | 243 |
1 files changed, 243 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-davinci/omapl138/0002-uio_pruss2-Platform-changes.patch b/extras/recipes-kernel/linux/linux-davinci/omapl138/0002-uio_pruss2-Platform-changes.patch new file mode 100755 index 00000000..d9132091 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-davinci/omapl138/0002-uio_pruss2-Platform-changes.patch | |||
@@ -0,0 +1,243 @@ | |||
1 | From: Melissa Watkins <m-watkins@ti.com> | ||
2 | Date: Wed, 24 Nov 2010 04:18:07 -0600 | ||
3 | Subject: [PATCH 2/3] uio_pruss2: Platform changes | ||
4 | |||
5 | Adding resources supporting the uio_pru driver within the | ||
6 | da850 (omapl138) device. | ||
7 | |||
8 | Signed-off-by: Amit Chatterjee <amit.chatterjee@ti.com> | ||
9 | Signed-off-by: Melissa Watkins <m-watkins@ti.com> | ||
10 | --- | ||
11 | arch/arm/configs/da850_omapl138_defconfig | 8 +++- | ||
12 | arch/arm/mach-davinci/board-da850-evm.c | 3 + | ||
13 | arch/arm/mach-davinci/da850.c | 38 +++++++++++++- | ||
14 | arch/arm/mach-davinci/devices-da8xx.c | 75 ++++++++++++++++++++++++++++ | ||
15 | arch/arm/mach-davinci/include/mach/da8xx.h | 3 + | ||
16 | 5 files changed, 124 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/arch/arm/configs/da850_omapl138_defconfig b/arch/arm/configs/da850_omapl138_defconfig | ||
19 | index b312050..baebec8 100644 | ||
20 | --- a/arch/arm/configs/da850_omapl138_defconfig | ||
21 | +++ b/arch/arm/configs/da850_omapl138_defconfig | ||
22 | @@ -1361,6 +1361,7 @@ CONFIG_USB_MUSB_HDRC=y | ||
23 | CONFIG_USB_MUSB_SOC=y | ||
24 | CONFIG_USB_MUSB_HOST=y | ||
25 | # CONFIG_USB_MUSB_PERIPHERAL is not set | ||
26 | +# CONFIG_USB_MUSB_DUAL_ROLE is not set | ||
27 | # CONFIG_USB_MUSB_OTG is not set | ||
28 | CONFIG_USB_MUSB_HDRC_HCD=y | ||
29 | # CONFIG_MUSB_PIO_ONLY is not set | ||
30 | @@ -1535,7 +1536,12 @@ CONFIG_RTC_INTF_DEV=y | ||
31 | CONFIG_RTC_DRV_OMAP=y | ||
32 | # CONFIG_DMADEVICES is not set | ||
33 | # CONFIG_AUXDISPLAY is not set | ||
34 | -# CONFIG_UIO is not set | ||
35 | +CONFIG_UIO=y | ||
36 | +# CONFIG_UIO_PDRV is not set | ||
37 | +# CONFIG_UIO_PDRV_GENIRQ is not set | ||
38 | +# CONFIG_UIO_SMX is not set | ||
39 | +# CONFIG_UIO_SERCOS3 is not set | ||
40 | +CONFIG_UIO_PRUSS=m | ||
41 | |||
42 | # | ||
43 | # TI VLYNQ | ||
44 | diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c | ||
45 | index 009e9b5..1687c7c 100755 | ||
46 | --- a/arch/arm/mach-davinci/board-da850-evm.c | ||
47 | +++ b/arch/arm/mach-davinci/board-da850-evm.c | ||
48 | @@ -1070,6 +1070,9 @@ static __init void da850_evm_init(void) | ||
49 | |||
50 | platform_device_register(&da850_gpio_i2c); | ||
51 | |||
52 | + /* Register PRUSS device */ | ||
53 | + da8xx_register_pruss(); | ||
54 | + | ||
55 | ret = da8xx_register_watchdog(); | ||
56 | if (ret) | ||
57 | pr_warning("da830_evm_init: watchdog registration failed: %d\n", | ||
58 | diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c | ||
59 | index 513ae85..8bd1919 100755 | ||
60 | --- a/arch/arm/mach-davinci/da850.c | ||
61 | +++ b/arch/arm/mach-davinci/da850.c | ||
62 | @@ -237,6 +237,13 @@ static struct clk tptc2_clk = { | ||
63 | .flags = ALWAYS_ENABLED, | ||
64 | }; | ||
65 | |||
66 | +static struct clk pruss_clk = { | ||
67 | + .name = "pruss", | ||
68 | + .parent = &pll0_sysclk2, | ||
69 | + .lpsc = DA8XX_LPSC0_DMAX, | ||
70 | + .flags = ALWAYS_ENABLED, | ||
71 | +}; | ||
72 | + | ||
73 | static struct clk uart0_clk = { | ||
74 | .name = "uart0", | ||
75 | .parent = &pll0_sysclk2, | ||
76 | @@ -385,13 +392,37 @@ static struct clk usb20_clk = { | ||
77 | .gpsc = 1, | ||
78 | }; | ||
79 | |||
80 | - | ||
81 | static struct clk sata_clk = { | ||
82 | .name = "ahci", | ||
83 | .parent = &pll0_sysclk2, | ||
84 | .lpsc = DA850_LPSC1_SATA, | ||
85 | .gpsc = 1, | ||
86 | }; | ||
87 | + | ||
88 | +static struct clk ecap0_clk = { | ||
89 | + .name = "ecap0", | ||
90 | + .parent = &pll0_sysclk2, | ||
91 | + .lpsc = DA8XX_LPSC1_ECAP, | ||
92 | + .flags = DA850_CLK_ASYNC3, | ||
93 | + .gpsc = 1, | ||
94 | +}; | ||
95 | + | ||
96 | +static struct clk ecap1_clk = { | ||
97 | + .name = "ecap1", | ||
98 | + .parent = &pll0_sysclk2, | ||
99 | + .lpsc = DA8XX_LPSC1_ECAP, | ||
100 | + .flags = DA850_CLK_ASYNC3, | ||
101 | + .gpsc = 1, | ||
102 | +}; | ||
103 | + | ||
104 | +static struct clk ecap2_clk = { | ||
105 | + .name = "ecap2", | ||
106 | + .parent = &pll0_sysclk2, | ||
107 | + .lpsc = DA8XX_LPSC1_ECAP, | ||
108 | + .flags = DA850_CLK_ASYNC3, | ||
109 | + .gpsc = 1, | ||
110 | +}; | ||
111 | + | ||
112 | static struct clk_lookup da850_clks[] = { | ||
113 | CLK(NULL, "ref", &ref_clk), | ||
114 | CLK(NULL, "pll0", &pll0_clk), | ||
115 | @@ -419,6 +450,7 @@ static struct clk_lookup da850_clks[] = { | ||
116 | CLK(NULL, "tptc1", &tptc1_clk), | ||
117 | CLK(NULL, "tpcc1", &tpcc1_clk), | ||
118 | CLK(NULL, "tptc2", &tptc2_clk), | ||
119 | + CLK(NULL, "pruss", &pruss_clk), | ||
120 | CLK(NULL, "uart0", &uart0_clk), | ||
121 | CLK(NULL, "uart1", &uart1_clk), | ||
122 | CLK(NULL, "uart2", &uart2_clk), | ||
123 | @@ -441,7 +473,9 @@ static struct clk_lookup da850_clks[] = { | ||
124 | CLK(NULL, "usb11", &usb11_clk), | ||
125 | CLK(NULL, "usb20", &usb20_clk), | ||
126 | CLK(NULL, "ahci", &sata_clk), | ||
127 | - | ||
128 | + CLK(NULL, "ecap0", &ecap0_clk), | ||
129 | + CLK(NULL, "ecap1", &ecap1_clk), | ||
130 | + CLK(NULL, "ecap2", &ecap2_clk), | ||
131 | CLK(NULL, NULL, NULL), | ||
132 | }; | ||
133 | |||
134 | diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c | ||
135 | index 0842590..94979b3 100755 | ||
136 | --- a/arch/arm/mach-davinci/devices-da8xx.c | ||
137 | +++ b/arch/arm/mach-davinci/devices-da8xx.c | ||
138 | @@ -972,6 +972,81 @@ int __init da8xx_register_sata(void) | ||
139 | return platform_device_register(&da850_ahci_device); | ||
140 | } | ||
141 | |||
142 | +static struct resource pruss_resources[] = { | ||
143 | + [0] = { | ||
144 | + .start = DA8XX_PRUSS_BASE, | ||
145 | + .end = DA8XX_PRUSS_BASE + SZ_64K - 1, | ||
146 | + .flags = IORESOURCE_MEM, | ||
147 | + }, | ||
148 | + [1] = { | ||
149 | + .start = DA8XX_L3RAM_BASE, | ||
150 | + .end = DA8XX_L3RAM_BASE + SZ_128K - 1, | ||
151 | + .flags = IORESOURCE_MEM, | ||
152 | + }, | ||
153 | + [2] = { | ||
154 | + .start = 0, | ||
155 | + .end = SZ_256K - 1, | ||
156 | + .flags = IORESOURCE_MEM, | ||
157 | + }, | ||
158 | + | ||
159 | + [3] = { | ||
160 | + .start = IRQ_DA8XX_EVTOUT0, | ||
161 | + .end = IRQ_DA8XX_EVTOUT0, | ||
162 | + .flags = IORESOURCE_IRQ, | ||
163 | + }, | ||
164 | + [4] = { | ||
165 | + .start = IRQ_DA8XX_EVTOUT1, | ||
166 | + .end = IRQ_DA8XX_EVTOUT1, | ||
167 | + .flags = IORESOURCE_IRQ, | ||
168 | + }, | ||
169 | + [5] = { | ||
170 | + .start = IRQ_DA8XX_EVTOUT2, | ||
171 | + .end = IRQ_DA8XX_EVTOUT2, | ||
172 | + .flags = IORESOURCE_IRQ, | ||
173 | + }, | ||
174 | + [6] = { | ||
175 | + .start = IRQ_DA8XX_EVTOUT3, | ||
176 | + .end = IRQ_DA8XX_EVTOUT3, | ||
177 | + .flags = IORESOURCE_IRQ, | ||
178 | + }, | ||
179 | + [7] = { | ||
180 | + .start = IRQ_DA8XX_EVTOUT4, | ||
181 | + .end = IRQ_DA8XX_EVTOUT4, | ||
182 | + .flags = IORESOURCE_IRQ, | ||
183 | + }, | ||
184 | + [8] = { | ||
185 | + .start = IRQ_DA8XX_EVTOUT5, | ||
186 | + .end = IRQ_DA8XX_EVTOUT5, | ||
187 | + .flags = IORESOURCE_IRQ, | ||
188 | + }, | ||
189 | + [9] = { | ||
190 | + .start = IRQ_DA8XX_EVTOUT6, | ||
191 | + .end = IRQ_DA8XX_EVTOUT6, | ||
192 | + .flags = IORESOURCE_IRQ, | ||
193 | + }, | ||
194 | + [10] = { | ||
195 | + .start = IRQ_DA8XX_EVTOUT7, | ||
196 | + .end = IRQ_DA8XX_EVTOUT7, | ||
197 | + .flags = IORESOURCE_IRQ, | ||
198 | + }, | ||
199 | +}; | ||
200 | + | ||
201 | +static struct platform_device pruss_device = { | ||
202 | + .name = "pruss", | ||
203 | + .id = 0, | ||
204 | + .num_resources = ARRAY_SIZE(pruss_resources), | ||
205 | + .resource = pruss_resources, | ||
206 | + .dev = { | ||
207 | + .coherent_dma_mask = 0xffffffff, | ||
208 | + } | ||
209 | + | ||
210 | +}; | ||
211 | + | ||
212 | +int __init da8xx_register_pruss() | ||
213 | +{ | ||
214 | + return platform_device_register(&pruss_device); | ||
215 | +} | ||
216 | + | ||
217 | #define CFGCHIP2 DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG) | ||
218 | /* | ||
219 | * Configure the USB PHY for DA8xx platforms. | ||
220 | diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h | ||
221 | index f76433f..632d7e2 100755 | ||
222 | --- a/arch/arm/mach-davinci/include/mach/da8xx.h | ||
223 | +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | ||
224 | @@ -75,6 +75,8 @@ extern void __iomem *da8xx_syscfg1_base; | ||
225 | #define DA8XX_USB0_BASE 0x01e00000 | ||
226 | #define DA850_SATA_BASE 0x01E18000 | ||
227 | #define DA850_SATA_CLK_PWRDN 0x01E2C018 | ||
228 | +#define DA8XX_PRUSS_BASE 0x01C30000 | ||
229 | +#define DA8XX_L3RAM_BASE 0x80000000 | ||
230 | |||
231 | #define PINMUX0 0x00 | ||
232 | #define PINMUX1 0x04 | ||
233 | @@ -162,6 +164,7 @@ int __init da850_register_vpif_capture(struct vpif_capture_config | ||
234 | |||
235 | int cppi41_init(void); | ||
236 | int da8xx_register_sata(void); | ||
237 | +int da8xx_register_pruss(void); | ||
238 | |||
239 | |||
240 | extern struct platform_device da8xx_serial_device; | ||
241 | -- | ||
242 | 1.7.0.4 | ||
243 | |||