diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-07-11 09:58:59 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-07-11 09:58:59 +0200 |
commit | dd427bc17f20f35342d6db932c372e221d52d648 (patch) | |
tree | d94d5b5712a07bb84151efd0eea65b5a1b72b39e /recipes-bsp | |
parent | 929521c119079b32b5d3b821c4342110cf386c32 (diff) | |
download | meta-ti-dd427bc17f20f35342d6db932c372e221d52d648.tar.gz |
u-boot 2011.06: add tftpboot support for pandaboard
comment out fw-utils, they don't get crosscompiled
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-bsp')
7 files changed, 825 insertions, 4 deletions
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc index 0eac4a1e..f9dab47e 100644 --- a/recipes-bsp/u-boot/u-boot.inc +++ b/recipes-bsp/u-boot/u-boot.inc | |||
@@ -41,8 +41,8 @@ do_install () { | |||
41 | install -d ${D}${base_sbindir} | 41 | install -d ${D}${base_sbindir} |
42 | install -d ${D}${sysconfdir} | 42 | install -d ${D}${sysconfdir} |
43 | install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config | 43 | install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config |
44 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv | 44 | # install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv |
45 | install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv | 45 | # install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv |
46 | fi | 46 | fi |
47 | 47 | ||
48 | } | 48 | } |
@@ -53,8 +53,6 @@ INSANE_SKIP_${PN} = True | |||
53 | 53 | ||
54 | PACKAGES += "${PN}-fw-utils" | 54 | PACKAGES += "${PN}-fw-utils" |
55 | FILES_${PN}-fw-utils = "${sysconfdir} ${base_sbindir}" | 55 | FILES_${PN}-fw-utils = "${sysconfdir} ${base_sbindir}" |
56 | # u-boot doesn't use LDFLAGS for fw files, needs to get fixed, but until then: | ||
57 | INSANE_SKIP_${PN}-fw-utils = True | ||
58 | 56 | ||
59 | inherit deploy | 57 | inherit deploy |
60 | 58 | ||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0031-omap4-add-support-for-gpios.patch b/recipes-bsp/u-boot/u-boot/2011.06/0031-omap4-add-support-for-gpios.patch new file mode 100644 index 00000000..26b40caf --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.06/0031-omap4-add-support-for-gpios.patch | |||
@@ -0,0 +1,306 @@ | |||
1 | From b2395bf32d0475dd4a729155e94e5d1605c54362 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> | ||
3 | Date: Mon, 9 May 2011 18:04:49 -0300 | ||
4 | Subject: [PATCH 31/35] omap4: add support for gpios | ||
5 | |||
6 | Copied from omap3. | ||
7 | |||
8 | Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> | ||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | --- | ||
11 | arch/arm/cpu/armv7/omap4/Makefile | 1 + | ||
12 | arch/arm/cpu/armv7/omap4/gpio.c | 169 ++++++++++++++++++++++++++++++++ | ||
13 | arch/arm/include/asm/arch-omap4/gpio.h | 93 +++++++++++++++++ | ||
14 | 3 files changed, 263 insertions(+), 0 deletions(-) | ||
15 | create mode 100644 arch/arm/cpu/armv7/omap4/gpio.c | ||
16 | create mode 100644 arch/arm/include/asm/arch-omap4/gpio.h | ||
17 | |||
18 | diff --git a/arch/arm/cpu/armv7/omap4/Makefile b/arch/arm/cpu/armv7/omap4/Makefile | ||
19 | index 987dc9d..c39693a 100644 | ||
20 | --- a/arch/arm/cpu/armv7/omap4/Makefile | ||
21 | +++ b/arch/arm/cpu/armv7/omap4/Makefile | ||
22 | @@ -29,6 +29,7 @@ SOBJS += lowlevel_init.o | ||
23 | |||
24 | COBJS += board.o | ||
25 | COBJS += mem.o | ||
26 | +COBJS += gpio.o | ||
27 | COBJS += sys_info.o | ||
28 | |||
29 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||
30 | diff --git a/arch/arm/cpu/armv7/omap4/gpio.c b/arch/arm/cpu/armv7/omap4/gpio.c | ||
31 | new file mode 100644 | ||
32 | index 0000000..40f1d5e | ||
33 | --- /dev/null | ||
34 | +++ b/arch/arm/cpu/armv7/omap4/gpio.c | ||
35 | @@ -0,0 +1,169 @@ | ||
36 | +/* | ||
37 | + * Lifted from arch/arm/cpu/armv7/omap3/gpio.c | ||
38 | + * | ||
39 | + * Original Copyright (c) 2009 Wind River Systems, Inc. | ||
40 | + * Tom Rix <Tom.Rix@windriver.com> | ||
41 | + * | ||
42 | + * This program is free software; you can redistribute it and/or | ||
43 | + * modify it under the terms of the GNU General Public License as | ||
44 | + * published by the Free Software Foundation; either version 2 of | ||
45 | + * the License, or (at your option) any later version. | ||
46 | + * | ||
47 | + * This program is distributed in the hope that it will be useful, | ||
48 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
49 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
50 | + * GNU General Public License for more details. | ||
51 | + * | ||
52 | + * You should have received a copy of the GNU General Public License | ||
53 | + * along with this program; if not, write to the Free Software | ||
54 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
55 | + * MA 02111-1307 USA | ||
56 | + * | ||
57 | + * This work is derived from the linux 2.6.27 kernel source | ||
58 | + * To fetch, use the kernel repository | ||
59 | + * git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git | ||
60 | + * Use the v2.6.27 tag. | ||
61 | + * | ||
62 | + * Below is the original's header including its copyright | ||
63 | + * | ||
64 | + * linux/arch/arm/plat-omap/gpio.c | ||
65 | + * | ||
66 | + * Support functions for OMAP GPIO | ||
67 | + * | ||
68 | + * Copyright (C) 2003-2005 Nokia Corporation | ||
69 | + * Written by Juha Yrjölä <juha.yrjola@nokia.com> | ||
70 | + * | ||
71 | + * This program is free software; you can redistribute it and/or modify | ||
72 | + * it under the terms of the GNU General Public License version 2 as | ||
73 | + * published by the Free Software Foundation. | ||
74 | + */ | ||
75 | +#include <common.h> | ||
76 | +#include <asm/arch/gpio.h> | ||
77 | +#include <asm/io.h> | ||
78 | +#include <asm/errno.h> | ||
79 | + | ||
80 | +/* | ||
81 | + * OMAP44XX specific GPIO registers | ||
82 | + */ | ||
83 | +#define OMAP44XX_GPIO1_BASE 0x4a310000 | ||
84 | +#define OMAP44XX_GPIO2_BASE 0x48055000 | ||
85 | +#define OMAP44XX_GPIO3_BASE 0x48057000 | ||
86 | +#define OMAP44XX_GPIO4_BASE 0x48059000 | ||
87 | +#define OMAP44XX_GPIO5_BASE 0x4805B000 | ||
88 | +#define OMAP44XX_GPIO6_BASE 0x4805D000 | ||
89 | + | ||
90 | +static const struct gpio_bank gpio_bank_44xx[6] = { | ||
91 | + { (void *)OMAP44XX_GPIO1_BASE }, | ||
92 | + { (void *)OMAP44XX_GPIO2_BASE }, | ||
93 | + { (void *)OMAP44XX_GPIO3_BASE }, | ||
94 | + { (void *)OMAP44XX_GPIO4_BASE }, | ||
95 | + { (void *)OMAP44XX_GPIO5_BASE }, | ||
96 | + { (void *)OMAP44XX_GPIO6_BASE }, | ||
97 | +}; | ||
98 | + | ||
99 | +static struct gpio_bank *gpio_bank = &gpio_bank_44xx[0]; | ||
100 | + | ||
101 | +static inline struct gpio_bank *get_gpio_bank(int gpio) | ||
102 | +{ | ||
103 | + return &gpio_bank[gpio >> 5]; | ||
104 | +} | ||
105 | + | ||
106 | +static inline int get_gpio_index(int gpio) | ||
107 | +{ | ||
108 | + return gpio & 0x1f; | ||
109 | +} | ||
110 | + | ||
111 | +static inline int gpio_valid(int gpio) | ||
112 | +{ | ||
113 | + if (gpio < 0) | ||
114 | + return -1; | ||
115 | + if (gpio < 192) | ||
116 | + return 0; | ||
117 | + return -1; | ||
118 | +} | ||
119 | + | ||
120 | +static int check_gpio(int gpio) | ||
121 | +{ | ||
122 | + if (gpio_valid(gpio) < 0) { | ||
123 | + printf("ERROR : check_gpio: invalid GPIO %d\n", gpio); | ||
124 | + return -1; | ||
125 | + } | ||
126 | + return 0; | ||
127 | +} | ||
128 | + | ||
129 | +static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input) | ||
130 | +{ | ||
131 | + void *reg; | ||
132 | + u32 l; | ||
133 | + | ||
134 | + reg = bank->base + OMAP4_GPIO_OE; | ||
135 | + l = __raw_readl(reg); | ||
136 | + if (is_input) | ||
137 | + l |= 1 << gpio; | ||
138 | + else | ||
139 | + l &= ~(1 << gpio); | ||
140 | + __raw_writel(l, reg); | ||
141 | +} | ||
142 | + | ||
143 | +void omap_set_gpio_direction(int gpio, int is_input) | ||
144 | +{ | ||
145 | + struct gpio_bank *bank; | ||
146 | + | ||
147 | + if (check_gpio(gpio) < 0) | ||
148 | + return; | ||
149 | + bank = get_gpio_bank(gpio); | ||
150 | + _set_gpio_direction(bank, get_gpio_index(gpio), is_input); | ||
151 | +} | ||
152 | + | ||
153 | +static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) | ||
154 | +{ | ||
155 | + if (enable) | ||
156 | + __raw_writel(1 << gpio, bank->base + OMAP4_GPIO_SETDATAOUT); | ||
157 | + else | ||
158 | + __raw_writel(1 << gpio, bank->base + OMAP4_GPIO_CLEARDATAOUT); | ||
159 | +} | ||
160 | + | ||
161 | +void omap_set_gpio_dataout(int gpio, int enable) | ||
162 | +{ | ||
163 | + struct gpio_bank *bank; | ||
164 | + | ||
165 | + if (check_gpio(gpio) < 0) | ||
166 | + return; | ||
167 | + bank = get_gpio_bank(gpio); | ||
168 | + _set_gpio_dataout(bank, get_gpio_index(gpio), enable); | ||
169 | +} | ||
170 | + | ||
171 | +int omap_get_gpio_datain(int gpio) | ||
172 | +{ | ||
173 | + struct gpio_bank *bank; | ||
174 | + | ||
175 | + if (check_gpio(gpio) < 0) | ||
176 | + return -EINVAL; | ||
177 | + bank = get_gpio_bank(gpio); | ||
178 | + return (__raw_readl(bank->base + OMAP4_GPIO_DATAIN) | ||
179 | + & (1 << get_gpio_index(gpio))) != 0; | ||
180 | +} | ||
181 | + | ||
182 | +static void _reset_gpio(struct gpio_bank *bank, int gpio) | ||
183 | +{ | ||
184 | + _set_gpio_direction(bank, get_gpio_index(gpio), 1); | ||
185 | +} | ||
186 | + | ||
187 | +int omap_request_gpio(int gpio) | ||
188 | +{ | ||
189 | + if (check_gpio(gpio) < 0) | ||
190 | + return -EINVAL; | ||
191 | + | ||
192 | + return 0; | ||
193 | +} | ||
194 | + | ||
195 | +void omap_free_gpio(int gpio) | ||
196 | +{ | ||
197 | + struct gpio_bank *bank; | ||
198 | + | ||
199 | + if (check_gpio(gpio) < 0) | ||
200 | + return; | ||
201 | + bank = get_gpio_bank(gpio); | ||
202 | + | ||
203 | + _reset_gpio(bank, gpio); | ||
204 | +} | ||
205 | diff --git a/arch/arm/include/asm/arch-omap4/gpio.h b/arch/arm/include/asm/arch-omap4/gpio.h | ||
206 | new file mode 100644 | ||
207 | index 0000000..d4dbea4 | ||
208 | --- /dev/null | ||
209 | +++ b/arch/arm/include/asm/arch-omap4/gpio.h | ||
210 | @@ -0,0 +1,93 @@ | ||
211 | +/* | ||
212 | + * Copyright (c) 2009 Wind River Systems, Inc. | ||
213 | + * Tom Rix <Tom.Rix@windriver.com> | ||
214 | + * | ||
215 | + * This program is free software; you can redistribute it and/or | ||
216 | + * modify it under the terms of the GNU General Public License as | ||
217 | + * published by the Free Software Foundation; either version 2 of | ||
218 | + * the License, or (at your option) any later version. | ||
219 | + * | ||
220 | + * This program is distributed in the hope that it will be useful, | ||
221 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
222 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
223 | + * GNU General Public License for more details. | ||
224 | + * | ||
225 | + * You should have received a copy of the GNU General Public License | ||
226 | + * along with this program; if not, write to the Free Software | ||
227 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
228 | + * MA 02111-1307 USA | ||
229 | + * | ||
230 | + * This work is derived from the linux 2.6.27 kernel source | ||
231 | + * To fetch, use the kernel repository | ||
232 | + * git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git | ||
233 | + * Use the v2.6.27 tag. | ||
234 | + * | ||
235 | + * Below is the original's header including its copyright | ||
236 | + * | ||
237 | + * linux/arch/arm/plat-omap/gpio.c | ||
238 | + * | ||
239 | + * Support functions for OMAP GPIO | ||
240 | + * | ||
241 | + * Copyright (C) 2003-2005 Nokia Corporation | ||
242 | + * Written by Juha Yrjölä <juha.yrjola@nokia.com> | ||
243 | + * | ||
244 | + * This program is free software; you can redistribute it and/or modify | ||
245 | + * it under the terms of the GNU General Public License version 2 as | ||
246 | + * published by the Free Software Foundation. | ||
247 | + */ | ||
248 | +#ifndef _GPIO_H | ||
249 | +#define _GPIO_H | ||
250 | + | ||
251 | +#define OMAP4_GPIO_REVISION 0x0000 | ||
252 | +#define OMAP4_GPIO_SYSCONFIG 0x0010 | ||
253 | +#define OMAP4_GPIO_EOI 0x0020 | ||
254 | +#define OMAP4_GPIO_IRQSTATUSRAW0 0x0024 | ||
255 | +#define OMAP4_GPIO_IRQSTATUSRAW1 0x0028 | ||
256 | +#define OMAP4_GPIO_IRQSTATUS0 0x002c | ||
257 | +#define OMAP4_GPIO_IRQSTATUS1 0x0030 | ||
258 | +#define OMAP4_GPIO_IRQSTATUSSET0 0x0034 | ||
259 | +#define OMAP4_GPIO_IRQSTATUSSET1 0x0038 | ||
260 | +#define OMAP4_GPIO_IRQSTATUSCLR0 0x003c | ||
261 | +#define OMAP4_GPIO_IRQSTATUSCLR1 0x0040 | ||
262 | +#define OMAP4_GPIO_IRQWAKEN0 0x0044 | ||
263 | +#define OMAP4_GPIO_IRQWAKEN1 0x0048 | ||
264 | +#define OMAP4_GPIO_SYSSTATUS 0x0114 | ||
265 | +#define OMAP4_GPIO_IRQENABLE1 0x011c | ||
266 | +#define OMAP4_GPIO_WAKE_EN 0x0120 | ||
267 | +#define OMAP4_GPIO_IRQSTATUS2 0x0128 | ||
268 | +#define OMAP4_GPIO_IRQENABLE2 0x012c | ||
269 | +#define OMAP4_GPIO_CTRL 0x0130 | ||
270 | +#define OMAP4_GPIO_OE 0x0134 | ||
271 | +#define OMAP4_GPIO_DATAIN 0x0138 | ||
272 | +#define OMAP4_GPIO_DATAOUT 0x013c | ||
273 | +#define OMAP4_GPIO_LEVELDETECT0 0x0140 | ||
274 | +#define OMAP4_GPIO_LEVELDETECT1 0x0144 | ||
275 | +#define OMAP4_GPIO_RISINGDETECT 0x0148 | ||
276 | +#define OMAP4_GPIO_FALLINGDETECT 0x014c | ||
277 | +#define OMAP4_GPIO_DEBOUNCENABLE 0x0150 | ||
278 | +#define OMAP4_GPIO_DEBOUNCINGTIME 0x0154 | ||
279 | +#define OMAP4_GPIO_CLEARIRQENABLE1 0x0160 | ||
280 | +#define OMAP4_GPIO_SETIRQENABLE1 0x0164 | ||
281 | +#define OMAP4_GPIO_CLEARWKUENA 0x0180 | ||
282 | +#define OMAP4_GPIO_SETWKUENA 0x0184 | ||
283 | +#define OMAP4_GPIO_CLEARDATAOUT 0x0190 | ||
284 | +#define OMAP4_GPIO_SETDATAOUT 0x0194 | ||
285 | + | ||
286 | +struct gpio_bank { | ||
287 | + void *base; | ||
288 | +}; | ||
289 | + | ||
290 | +/* This is the interface */ | ||
291 | + | ||
292 | +/* Request a gpio before using it */ | ||
293 | +int omap_request_gpio(int gpio); | ||
294 | +/* Reset and free a gpio after using it */ | ||
295 | +void omap_free_gpio(int gpio); | ||
296 | +/* Sets the gpio as input or output */ | ||
297 | +void omap_set_gpio_direction(int gpio, int is_input); | ||
298 | +/* Set or clear a gpio output */ | ||
299 | +void omap_set_gpio_dataout(int gpio, int enable); | ||
300 | +/* Get the value of a gpio input */ | ||
301 | +int omap_get_gpio_datain(int gpio); | ||
302 | + | ||
303 | +#endif /* _GPIO_H_ */ | ||
304 | -- | ||
305 | 1.6.6.1 | ||
306 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0032-omap4-add-support-for-EHCI.patch b/recipes-bsp/u-boot/u-boot/2011.06/0032-omap4-add-support-for-EHCI.patch new file mode 100644 index 00000000..9491431e --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.06/0032-omap4-add-support-for-EHCI.patch | |||
@@ -0,0 +1,322 @@ | |||
1 | From a2536d64065297279726a71e0af04a5f677f675c Mon Sep 17 00:00:00 2001 | ||
2 | From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> | ||
3 | Date: Mon, 9 May 2011 23:04:50 +0200 | ||
4 | Subject: [PATCH 32/35] omap4: add support for EHCI | ||
5 | |||
6 | As board may need some specific support, implement inner functions | ||
7 | to be called by the boards implementaions of ehci_hcd_start, | ||
8 | ehci_hcd_stop. | ||
9 | |||
10 | Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> | ||
11 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
12 | --- | ||
13 | arch/arm/include/asm/arch-omap4/ehci.h | 8 + | ||
14 | drivers/usb/host/Makefile | 1 + | ||
15 | drivers/usb/host/ehci-omap4.c | 268 ++++++++++++++++++++++++++++++++ | ||
16 | 3 files changed, 277 insertions(+), 0 deletions(-) | ||
17 | create mode 100644 arch/arm/include/asm/arch-omap4/ehci.h | ||
18 | create mode 100644 drivers/usb/host/ehci-omap4.c | ||
19 | |||
20 | diff --git a/arch/arm/include/asm/arch-omap4/ehci.h b/arch/arm/include/asm/arch-omap4/ehci.h | ||
21 | new file mode 100644 | ||
22 | index 0000000..fc84f6a | ||
23 | --- /dev/null | ||
24 | +++ b/arch/arm/include/asm/arch-omap4/ehci.h | ||
25 | @@ -0,0 +1,8 @@ | ||
26 | +#ifndef EHCI_H | ||
27 | +#define EHCI_H | ||
28 | + | ||
29 | +int omap4_ehci_hcd_init(void); | ||
30 | + | ||
31 | +int omap4_ehci_hcd_stop(void); | ||
32 | + | ||
33 | +#endif /* EHCI_H */ | ||
34 | diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile | ||
35 | index 51b2494..5a5b971 100644 | ||
36 | --- a/drivers/usb/host/Makefile | ||
37 | +++ b/drivers/usb/host/Makefile | ||
38 | @@ -46,6 +46,7 @@ COBJS-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o | ||
39 | COBJS-$(CONFIG_USB_EHCI_KIRKWOOD) += ehci-kirkwood.o | ||
40 | COBJS-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o | ||
41 | COBJS-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o | ||
42 | +COBJS-$(CONFIG_USB_EHCI_OMAP4) += ehci-omap4.o | ||
43 | |||
44 | COBJS := $(COBJS-y) | ||
45 | SRCS := $(COBJS:.o=.c) | ||
46 | diff --git a/drivers/usb/host/ehci-omap4.c b/drivers/usb/host/ehci-omap4.c | ||
47 | new file mode 100644 | ||
48 | index 0000000..19cd286 | ||
49 | --- /dev/null | ||
50 | +++ b/drivers/usb/host/ehci-omap4.c | ||
51 | @@ -0,0 +1,268 @@ | ||
52 | +/* | ||
53 | + * OMAP4 EHCI port, copied from linux/drivers/usb/host/ehci-omap.c | ||
54 | + * | ||
55 | + * Copyright (C) 2007-2010 Texas Instruments, Inc. | ||
56 | + * Author: Vikram Pandita <vikram.pandita@ti.com> | ||
57 | + * Author: Anand Gadiyar <gadiyar@ti.com> | ||
58 | + */ | ||
59 | + | ||
60 | +#include <common.h> | ||
61 | +#include <usb.h> | ||
62 | +#include <errno.h> | ||
63 | +#include <asm/io.h> | ||
64 | +#include <asm/arch/gpio.h> | ||
65 | +#include <asm/arch/omap4.h> | ||
66 | +#include <asm/arch/sys_proto.h> | ||
67 | + | ||
68 | +#include "ehci.h" | ||
69 | +#include "ehci-core.h" | ||
70 | + | ||
71 | +#define EHCI_BASE (OMAP44XX_L4_CORE_BASE + 0x64C00) | ||
72 | +#define UHH_BASE (OMAP44XX_L4_CORE_BASE + 0x64000) | ||
73 | +#define TLL_BASE (OMAP44XX_L4_CORE_BASE + 0x62000) | ||
74 | + | ||
75 | +/* ULPI */ | ||
76 | +#define ULPI_SET(a) (a + 1) | ||
77 | +#define ULPI_CLR(a) (a + 2) | ||
78 | + | ||
79 | +#define ULPI_FUNC_CTRL 0x04 | ||
80 | + | ||
81 | +#define ULPI_FUNC_CTRL_RESET (1 << 5) | ||
82 | + | ||
83 | +/* TLL Register Set */ | ||
84 | +#define OMAP_USBTLL_REVISION (0x00) | ||
85 | +#define OMAP_USBTLL_SYSCONFIG (0x10) | ||
86 | +#define OMAP_USBTLL_SYSCONFIG_CACTIVITY (1 << 8) | ||
87 | +#define OMAP_USBTLL_SYSCONFIG_SIDLEMODE (1 << 3) | ||
88 | +#define OMAP_USBTLL_SYSCONFIG_ENAWAKEUP (1 << 2) | ||
89 | +#define OMAP_USBTLL_SYSCONFIG_SOFTRESET (1 << 1) | ||
90 | +#define OMAP_USBTLL_SYSCONFIG_AUTOIDLE (1 << 0) | ||
91 | + | ||
92 | +#define OMAP_USBTLL_SYSSTATUS (0x14) | ||
93 | +#define OMAP_USBTLL_SYSSTATUS_RESETDONE (1 << 0) | ||
94 | + | ||
95 | +#define OMAP_USBTLL_IRQSTATUS (0x18) | ||
96 | +#define OMAP_USBTLL_IRQENABLE (0x1C) | ||
97 | + | ||
98 | +#define OMAP_TLL_SHARED_CONF (0x30) | ||
99 | +#define OMAP_TLL_SHARED_CONF_USB_90D_DDR_EN (1 << 6) | ||
100 | +#define OMAP_TLL_SHARED_CONF_USB_180D_SDR_EN (1 << 5) | ||
101 | +#define OMAP_TLL_SHARED_CONF_USB_DIVRATION (1 << 2) | ||
102 | +#define OMAP_TLL_SHARED_CONF_FCLK_REQ (1 << 1) | ||
103 | +#define OMAP_TLL_SHARED_CONF_FCLK_IS_ON (1 << 0) | ||
104 | + | ||
105 | +#define OMAP_TLL_CHANNEL_CONF(num) (0x040 + 0x004 * num) | ||
106 | +#define OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF (1 << 11) | ||
107 | +#define OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE (1 << 10) | ||
108 | +#define OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE (1 << 9) | ||
109 | +#define OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE (1 << 8) | ||
110 | +#define OMAP_TLL_CHANNEL_CONF_CHANEN (1 << 0) | ||
111 | + | ||
112 | +#define OMAP_TLL_ULPI_FUNCTION_CTRL(num) (0x804 + 0x100 * num) | ||
113 | +#define OMAP_TLL_ULPI_INTERFACE_CTRL(num) (0x807 + 0x100 * num) | ||
114 | +#define OMAP_TLL_ULPI_OTG_CTRL(num) (0x80A + 0x100 * num) | ||
115 | +#define OMAP_TLL_ULPI_INT_EN_RISE(num) (0x80D + 0x100 * num) | ||
116 | +#define OMAP_TLL_ULPI_INT_EN_FALL(num) (0x810 + 0x100 * num) | ||
117 | +#define OMAP_TLL_ULPI_INT_STATUS(num) (0x813 + 0x100 * num) | ||
118 | +#define OMAP_TLL_ULPI_INT_LATCH(num) (0x814 + 0x100 * num) | ||
119 | +#define OMAP_TLL_ULPI_DEBUG(num) (0x815 + 0x100 * num) | ||
120 | +#define OMAP_TLL_ULPI_SCRATCH_REGISTER(num) (0x816 + 0x100 * num) | ||
121 | + | ||
122 | +#define OMAP_TLL_CHANNEL_COUNT 3 | ||
123 | +#define OMAP_TLL_CHANNEL_1_EN_MASK (1 << 1) | ||
124 | +#define OMAP_TLL_CHANNEL_2_EN_MASK (1 << 2) | ||
125 | +#define OMAP_TLL_CHANNEL_3_EN_MASK (1 << 4) | ||
126 | + | ||
127 | +/* UHH Register Set */ | ||
128 | +#define OMAP_UHH_REVISION (0x00) | ||
129 | +#define OMAP_UHH_SYSCONFIG (0x10) | ||
130 | +#define OMAP_UHH_SYSCONFIG_MIDLEMODE (1 << 12) | ||
131 | +#define OMAP_UHH_SYSCONFIG_CACTIVITY (1 << 8) | ||
132 | +#define OMAP_UHH_SYSCONFIG_SIDLEMODE (1 << 3) | ||
133 | +#define OMAP_UHH_SYSCONFIG_ENAWAKEUP (1 << 2) | ||
134 | +#define OMAP_UHH_SYSCONFIG_SOFTRESET (1 << 1) | ||
135 | +#define OMAP_UHH_SYSCONFIG_AUTOIDLE (1 << 0) | ||
136 | + | ||
137 | +#define OMAP_UHH_SYSSTATUS (0x14) | ||
138 | +#define OMAP_UHH_HOSTCONFIG (0x40) | ||
139 | +#define OMAP_UHH_HOSTCONFIG_ULPI_BYPASS (1 << 0) | ||
140 | +#define OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS (1 << 0) | ||
141 | +#define OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS (1 << 11) | ||
142 | +#define OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS (1 << 12) | ||
143 | +#define OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN (1 << 2) | ||
144 | +#define OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN (1 << 3) | ||
145 | +#define OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN (1 << 4) | ||
146 | +#define OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN (1 << 5) | ||
147 | +#define OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS (1 << 8) | ||
148 | +#define OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS (1 << 9) | ||
149 | +#define OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS (1 << 10) | ||
150 | + | ||
151 | +/* OMAP4-specific defines */ | ||
152 | +#define OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR (3 << 2) | ||
153 | +#define OMAP4_UHH_SYSCONFIG_NOIDLE (1 << 2) | ||
154 | + | ||
155 | +#define OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR (3 << 4) | ||
156 | +#define OMAP4_UHH_SYSCONFIG_NOSTDBY (1 << 4) | ||
157 | +#define OMAP4_UHH_SYSCONFIG_SOFTRESET (1 << 0) | ||
158 | + | ||
159 | +#define OMAP4_P1_MODE_CLEAR (3 << 16) | ||
160 | +#define OMAP4_P1_MODE_TLL (1 << 16) | ||
161 | +#define OMAP4_P1_MODE_HSIC (3 << 16) | ||
162 | +#define OMAP4_P2_MODE_CLEAR (3 << 18) | ||
163 | +#define OMAP4_P2_MODE_TLL (1 << 18) | ||
164 | +#define OMAP4_P2_MODE_HSIC (3 << 18) | ||
165 | + | ||
166 | +#define OMAP_REV2_TLL_CHANNEL_COUNT 2 | ||
167 | + | ||
168 | +#define OMAP_UHH_DEBUG_CSR (0x44) | ||
169 | + | ||
170 | +/* EHCI Register Set */ | ||
171 | +#define EHCI_INSNREG04 (0xA0) | ||
172 | +#define EHCI_INSNREG04_DISABLE_UNSUSPEND (1 << 5) | ||
173 | +#define EHCI_INSNREG05_ULPI (0xA4) | ||
174 | +#define EHCI_INSNREG05_ULPI_CONTROL_SHIFT 31 | ||
175 | +#define EHCI_INSNREG05_ULPI_PORTSEL_SHIFT 24 | ||
176 | +#define EHCI_INSNREG05_ULPI_OPSEL_SHIFT 22 | ||
177 | +#define EHCI_INSNREG05_ULPI_REGADD_SHIFT 16 | ||
178 | +#define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8 | ||
179 | +#define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0 | ||
180 | + | ||
181 | +int omap4_ehci_hcd_init(void) | ||
182 | +{ | ||
183 | + unsigned long base = get_timer(0); | ||
184 | + unsigned reg = 0, port = 0; | ||
185 | + int rc; | ||
186 | + | ||
187 | + /* USB host, with clock from external phy as port 1 UTMI clock */ | ||
188 | + sr32((void *)0x4A009358, 0, 32, 0x01000002); | ||
189 | + | ||
190 | + /* FSUSB clk */ | ||
191 | + sr32((void *)0x4a0093d0, 0, 32, 0x2); | ||
192 | + | ||
193 | + /* USB TLL clock */ | ||
194 | + sr32((void *)0x4a009368, 0, 32, 0x1); | ||
195 | + | ||
196 | + /* enable the 32K, 48M optional clocks and enable the module */ | ||
197 | + sr32((void *)0x4a0093e0, 0, 32, 0x301); | ||
198 | + | ||
199 | + /* perform TLL soft reset, and wait until reset is complete */ | ||
200 | + writel(OMAP_USBTLL_SYSCONFIG_SOFTRESET, | ||
201 | + TLL_BASE + OMAP_USBTLL_SYSCONFIG); | ||
202 | + | ||
203 | + /* Wait for TLL reset to complete */ | ||
204 | + while (!(readl(TLL_BASE + OMAP_USBTLL_SYSSTATUS) | ||
205 | + & OMAP_USBTLL_SYSSTATUS_RESETDONE)) | ||
206 | + if (get_timer(base) > CONFIG_SYS_HZ) { | ||
207 | + printf("OMAP4 EHCI error: timeout resetting TLL\n"); | ||
208 | + return -1; | ||
209 | + } | ||
210 | + | ||
211 | + writel(OMAP_USBTLL_SYSCONFIG_ENAWAKEUP | | ||
212 | + OMAP_USBTLL_SYSCONFIG_SIDLEMODE | | ||
213 | + OMAP_USBTLL_SYSCONFIG_CACTIVITY, | ||
214 | + TLL_BASE + OMAP_USBTLL_SYSCONFIG); | ||
215 | + | ||
216 | + /* Put UHH in NoIdle/NoStandby mode */ | ||
217 | + reg = readl(UHH_BASE + OMAP_UHH_SYSCONFIG); | ||
218 | + reg &= ~OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR; | ||
219 | + reg |= OMAP4_UHH_SYSCONFIG_NOIDLE; | ||
220 | + reg &= ~OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR; | ||
221 | + reg |= OMAP4_UHH_SYSCONFIG_NOSTDBY; | ||
222 | + writel(reg, UHH_BASE + OMAP_UHH_SYSCONFIG); | ||
223 | + | ||
224 | + reg = readl(UHH_BASE + OMAP_UHH_HOSTCONFIG); | ||
225 | + | ||
226 | + /* setup ULPI bypass and burst configurations */ | ||
227 | + reg |= (OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN | ||
228 | + | OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN | ||
229 | + | OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN); | ||
230 | + reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN; | ||
231 | + | ||
232 | + /* Clear port mode fields for PHY mode*/ | ||
233 | + reg &= ~OMAP4_P1_MODE_CLEAR; | ||
234 | + reg &= ~OMAP4_P2_MODE_CLEAR; | ||
235 | + writel(reg, UHH_BASE + OMAP_UHH_HOSTCONFIG); | ||
236 | + | ||
237 | + /* | ||
238 | + * An undocumented "feature" in the OMAP3 EHCI controller, | ||
239 | + * causes suspended ports to be taken out of suspend when | ||
240 | + * the USBCMD.Run/Stop bit is cleared (for example when | ||
241 | + * we do ehci_bus_suspend). | ||
242 | + * This breaks suspend-resume if the root-hub is allowed | ||
243 | + * to suspend. Writing 1 to this undocumented register bit | ||
244 | + * disables this feature and restores normal behavior. | ||
245 | + */ | ||
246 | + writel(EHCI_INSNREG04_DISABLE_UNSUSPEND, EHCI_BASE + EHCI_INSNREG04); | ||
247 | + | ||
248 | + reg = ULPI_FUNC_CTRL_RESET | ||
249 | + /* FUNCTION_CTRL_SET register */ | ||
250 | + | (ULPI_SET(ULPI_FUNC_CTRL) << EHCI_INSNREG05_ULPI_REGADD_SHIFT) | ||
251 | + /* Write */ | ||
252 | + | (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) | ||
253 | + /* PORTn */ | ||
254 | + | ((port + 1) << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) | ||
255 | + /* start ULPI access*/ | ||
256 | + | (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT); | ||
257 | + | ||
258 | + base = get_timer(0); | ||
259 | + | ||
260 | + writel(reg, EHCI_BASE + EHCI_INSNREG05_ULPI); | ||
261 | + | ||
262 | + /* Wait for ULPI access completion */ | ||
263 | + while ((readl(EHCI_BASE + EHCI_INSNREG05_ULPI) | ||
264 | + & (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT))) | ||
265 | + if (get_timer(base) > CONFIG_SYS_HZ) { | ||
266 | + printf("OMAP4 EHCI error: timeout resetting phy\n"); | ||
267 | + return -1; | ||
268 | + } | ||
269 | + | ||
270 | + hccr = (struct ehci_hccr *)(EHCI_BASE); | ||
271 | + hcor = (struct ehci_hcor *)((uint32_t) hccr | ||
272 | + + HC_LENGTH(ehci_readl(&hccr->cr_capbase))); | ||
273 | + return 0; | ||
274 | +} | ||
275 | + | ||
276 | +int omap4_ehci_hcd_stop(void) | ||
277 | +{ | ||
278 | + unsigned base = get_timer(0); | ||
279 | + | ||
280 | + writel(OMAP4_UHH_SYSCONFIG_SOFTRESET, UHH_BASE + OMAP_UHH_SYSCONFIG); | ||
281 | + | ||
282 | +#if 0 | ||
283 | + /* We get timeout here */ | ||
284 | + while (!(readl(UHH_BASE + OMAP_UHH_SYSSTATUS) & (1 << 0))) | ||
285 | + if (get_timer(base) > CONFIG_SYS_HZ) { | ||
286 | + printf("OMAP4 EHCI error: reset UHH 0 timeout\n"); | ||
287 | + return -ETIMEDOUT; | ||
288 | + } | ||
289 | + | ||
290 | + while (!(readl(UHH_BASE + OMAP_UHH_SYSSTATUS) & (1 << 1))) | ||
291 | + if (get_timer(base) > CONFIG_SYS_HZ) { | ||
292 | + printf("OMAP4 EHCI error: reset UHH 1 timeout\n"); | ||
293 | + return -ETIMEDOUT; | ||
294 | + } | ||
295 | + | ||
296 | + while (!(readl(UHH_BASE + OMAP_UHH_SYSSTATUS) & (1 << 2))) | ||
297 | + if (get_timer(base) > CONFIG_SYS_HZ) { | ||
298 | + printf("OMAP4 EHCI error: reset UHH 2 timeout\n"); | ||
299 | + return -ETIMEDOUT; | ||
300 | + } | ||
301 | +#endif | ||
302 | + | ||
303 | + | ||
304 | + writel((1 << 1), TLL_BASE + OMAP_USBTLL_SYSCONFIG); | ||
305 | + | ||
306 | + while (!(readl(TLL_BASE + OMAP_USBTLL_SYSSTATUS) & (1 << 0))) | ||
307 | + if (get_timer(base) > CONFIG_SYS_HZ) { | ||
308 | + printf("OMAP4 EHCI error: reset TLL timeout\n"); | ||
309 | + return -ETIMEDOUT; | ||
310 | + } | ||
311 | + | ||
312 | + /* Disable clocks */ | ||
313 | + sr32((void *)0x4a0093e0, 0, 32, 0); | ||
314 | + sr32((void *)0x4a009368, 0, 32, 0); | ||
315 | + sr32((void *)0x4a0093d0, 0, 32, 0); | ||
316 | + sr32((void *)0x4A009358, 0, 32, 0); | ||
317 | + | ||
318 | + return 0; | ||
319 | +} | ||
320 | -- | ||
321 | 1.6.6.1 | ||
322 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0033-omap4_panda-add-support-for-EHCI.patch b/recipes-bsp/u-boot/u-boot/2011.06/0033-omap4_panda-add-support-for-EHCI.patch new file mode 100644 index 00000000..c1c1f0f3 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.06/0033-omap4_panda-add-support-for-EHCI.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | From 0d730b18792cdbd31ec47bd7b5793b26f884c796 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> | ||
3 | Date: Mon, 9 May 2011 23:04:51 +0200 | ||
4 | Subject: [PATCH 33/35] omap4_panda: add support for EHCI | ||
5 | |||
6 | Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> | ||
7 | Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> | ||
8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
9 | --- | ||
10 | board/ti/panda/Makefile | 4 ++- | ||
11 | board/ti/panda/ehci-panda.c | 59 +++++++++++++++++++++++++++++++++++++++++++ | ||
12 | 2 files changed, 62 insertions(+), 1 deletions(-) | ||
13 | create mode 100644 board/ti/panda/ehci-panda.c | ||
14 | |||
15 | diff --git a/board/ti/panda/Makefile b/board/ti/panda/Makefile | ||
16 | index 2186403..253567c 100644 | ||
17 | --- a/board/ti/panda/Makefile | ||
18 | +++ b/board/ti/panda/Makefile | ||
19 | @@ -25,7 +25,9 @@ include $(TOPDIR)/config.mk | ||
20 | |||
21 | LIB = $(obj)lib$(BOARD).o | ||
22 | |||
23 | -COBJS := panda.o | ||
24 | +COBJS-$(CONFIG_USB_EHCI) += ehci-panda.o | ||
25 | + | ||
26 | +COBJS := $(COBJS-y) panda.o | ||
27 | |||
28 | SRCS := $(COBJS:.o=.c) | ||
29 | OBJS := $(addprefix $(obj),$(COBJS)) | ||
30 | diff --git a/board/ti/panda/ehci-panda.c b/board/ti/panda/ehci-panda.c | ||
31 | new file mode 100644 | ||
32 | index 0000000..b1e247c | ||
33 | --- /dev/null | ||
34 | +++ b/board/ti/panda/ehci-panda.c | ||
35 | @@ -0,0 +1,59 @@ | ||
36 | +/* | ||
37 | + * OMAP4 EHCI port, copied from linux/drivers/usb/host/ehci-omap.c | ||
38 | + * | ||
39 | + * Copyright (C) 2007-2010 Texas Instruments, Inc. | ||
40 | + * Author: Vikram Pandita <vikram.pandita@ti.com> | ||
41 | + * Author: Anand Gadiyar <gadiyar@ti.com> | ||
42 | + */ | ||
43 | + | ||
44 | +#include <asm/arch/gpio.h> | ||
45 | +#include <asm/arch/ehci.h> | ||
46 | + | ||
47 | +#define GPIO_HUB_POWER 1 | ||
48 | +#define GPIO_HUB_NRESET 62 | ||
49 | + | ||
50 | +int ehci_hcd_init(void) | ||
51 | +{ | ||
52 | + unsigned long base = get_timer(0); | ||
53 | + unsigned reg = 0, port = 0; | ||
54 | + int rc; | ||
55 | + | ||
56 | + /* disable the power to the usb hub prior to init */ | ||
57 | + rc = omap_request_gpio(GPIO_HUB_POWER); | ||
58 | + if (rc < 0) { | ||
59 | + printf("Could not request gpio %d\n", GPIO_HUB_POWER); | ||
60 | + return rc; | ||
61 | + } | ||
62 | + | ||
63 | + rc = omap_request_gpio(GPIO_HUB_NRESET); | ||
64 | + if (rc < 0) { | ||
65 | + printf("Could not request gpio %d\n", GPIO_HUB_NRESET); | ||
66 | + omap_free_gpio(GPIO_HUB_POWER); | ||
67 | + return rc; | ||
68 | + } | ||
69 | + | ||
70 | + omap_set_gpio_direction(GPIO_HUB_POWER, 0); | ||
71 | + omap_set_gpio_dataout(GPIO_HUB_POWER, 0); | ||
72 | + omap_set_gpio_direction(GPIO_HUB_NRESET, 0); | ||
73 | + omap_set_gpio_dataout(GPIO_HUB_NRESET, 0); | ||
74 | + omap_set_gpio_dataout(GPIO_HUB_NRESET, 1); | ||
75 | + | ||
76 | + rc = omap4_ehci_hcd_init(); | ||
77 | + | ||
78 | + if (rc < 0) | ||
79 | + return rc; | ||
80 | + | ||
81 | + omap_set_gpio_dataout(GPIO_HUB_POWER, 1); | ||
82 | + | ||
83 | + return 0; | ||
84 | +} | ||
85 | + | ||
86 | +int ehci_hcd_stop(void) | ||
87 | +{ | ||
88 | + omap4_ehci_hcd_stop(); | ||
89 | + | ||
90 | + omap_set_gpio_dataout(GPIO_HUB_POWER, 0); | ||
91 | + omap_set_gpio_dataout(GPIO_HUB_NRESET, 0); | ||
92 | + omap_free_gpio(GPIO_HUB_POWER); | ||
93 | + omap_free_gpio(GPIO_HUB_NRESET); | ||
94 | +} | ||
95 | -- | ||
96 | 1.6.6.1 | ||
97 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0034-omap4_panda-adding-support-for-smsc-and-tftp-boot.patch b/recipes-bsp/u-boot/u-boot/2011.06/0034-omap4_panda-adding-support-for-smsc-and-tftp-boot.patch new file mode 100644 index 00000000..f1ab7fec --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.06/0034-omap4_panda-adding-support-for-smsc-and-tftp-boot.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 1005120d214c98fde62dba9365e24519de001f50 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> | ||
3 | Date: Thu, 19 May 2011 10:17:15 -0300 | ||
4 | Subject: [PATCH 34/35] omap4_panda: adding support for smsc and tftp boot | ||
5 | |||
6 | Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> | ||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | include/configs/omap4_panda.h | 20 +++++++++++++++++++- | ||
10 | 1 files changed, 19 insertions(+), 1 deletions(-) | ||
11 | |||
12 | diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h | ||
13 | index b4e7f41..0fcdf46 100644 | ||
14 | --- a/include/configs/omap4_panda.h | ||
15 | +++ b/include/configs/omap4_panda.h | ||
16 | @@ -120,6 +120,19 @@ | ||
17 | #define CONFIG_USB_DEVICE 1 | ||
18 | #define CONFIG_USB_TTY 1 | ||
19 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 | ||
20 | +#define CONFIG_CMD_USB 1 | ||
21 | +#define CONFIG_USB_STORAGE 1 | ||
22 | +#define CONFIG_USB_HOST_ETHER 1 | ||
23 | +#define CONFIG_USB_EHCI 1 | ||
24 | +#define CONFIG_USB_EHCI_OMAP4 1 | ||
25 | +#define CONFIG_USB_HOST 1 | ||
26 | +#define CONFIG_USB_ETHER_SMSC95XX 1 | ||
27 | + | ||
28 | +/* Ethernet */ | ||
29 | +#define CONFIG_NET_MULTI 1 | ||
30 | +#define CONFIG_CMD_PING 1 | ||
31 | +#define CONFIG_CMD_DHCP 1 | ||
32 | +#define CONFIG_BOOTFILE "uImage" | ||
33 | |||
34 | /* Flash */ | ||
35 | #define CONFIG_SYS_NO_FLASH 1 | ||
36 | @@ -134,7 +147,6 @@ | ||
37 | #define CONFIG_CMD_MMC /* MMC support */ | ||
38 | |||
39 | /* Disabled commands */ | ||
40 | -#undef CONFIG_CMD_NET | ||
41 | #undef CONFIG_CMD_NFS | ||
42 | #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ | ||
43 | #undef CONFIG_CMD_IMLS /* List all found images */ | ||
44 | @@ -152,6 +164,8 @@ | ||
45 | "console=ttyS2,115200n8\0" \ | ||
46 | "usbtty=cdc_acm\0" \ | ||
47 | "vram=16M\0" \ | ||
48 | + "usbethaddr=00:02:03:04:05:06\0" \ | ||
49 | + "hostname=panda\0" \ | ||
50 | "mmcdev=0\0" \ | ||
51 | "mmcroot=/dev/mmcblk0p2 rw\0" \ | ||
52 | "mmcrootfstype=ext3 rootwait\0" \ | ||
53 | @@ -176,6 +190,10 @@ | ||
54 | "run mmcboot; " \ | ||
55 | "fi; " \ | ||
56 | "fi; " \ | ||
57 | + "fi; " \ | ||
58 | + "if usb start; then " \ | ||
59 | + "bootp; "\ | ||
60 | + "source ${loadaddr};" \ | ||
61 | "fi" | ||
62 | |||
63 | #define CONFIG_AUTO_COMPLETE 1 | ||
64 | -- | ||
65 | 1.6.6.1 | ||
66 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0035-omap4_panda-use-uImage.panda-for-tftp.patch b/recipes-bsp/u-boot/u-boot/2011.06/0035-omap4_panda-use-uImage.panda-for-tftp.patch new file mode 100644 index 00000000..c4d20589 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.06/0035-omap4_panda-use-uImage.panda-for-tftp.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From b2ed58548de12a9bd9b23f51ade86793ae44b74f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 11 Jul 2011 09:47:17 +0200 | ||
4 | Subject: [PATCH 35/35] omap4_panda: use uImage.panda for tftp | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap4_panda.h | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h | ||
12 | index 0fcdf46..454a6b0 100644 | ||
13 | --- a/include/configs/omap4_panda.h | ||
14 | +++ b/include/configs/omap4_panda.h | ||
15 | @@ -132,7 +132,7 @@ | ||
16 | #define CONFIG_NET_MULTI 1 | ||
17 | #define CONFIG_CMD_PING 1 | ||
18 | #define CONFIG_CMD_DHCP 1 | ||
19 | -#define CONFIG_BOOTFILE "uImage" | ||
20 | +#define CONFIG_BOOTFILE "uImage.panda" | ||
21 | |||
22 | /* Flash */ | ||
23 | #define CONFIG_SYS_NO_FLASH 1 | ||
24 | -- | ||
25 | 1.6.6.1 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot_2011.06.bb b/recipes-bsp/u-boot/u-boot_2011.06.bb index 9c227d8f..b5724bfa 100644 --- a/recipes-bsp/u-boot/u-boot_2011.06.bb +++ b/recipes-bsp/u-boot/u-boot_2011.06.bb | |||
@@ -34,11 +34,17 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \ | |||
34 | file://2011.06/0028-BeagleBoard-config-make-mtest-run.patch \ | 34 | file://2011.06/0028-BeagleBoard-config-make-mtest-run.patch \ |
35 | file://2011.06/0029-BeagleBoard-config-increase-command-line-functionali.patch \ | 35 | file://2011.06/0029-BeagleBoard-config-increase-command-line-functionali.patch \ |
36 | file://2011.06/0030-BeagleBoard-config-add-optargs-buddy-camera.patch \ | 36 | file://2011.06/0030-BeagleBoard-config-add-optargs-buddy-camera.patch \ |
37 | file://2011.06/0031-omap4-add-support-for-gpios.patch \ | ||
38 | file://2011.06/0032-omap4-add-support-for-EHCI.patch \ | ||
39 | file://2011.06/0033-omap4_panda-add-support-for-EHCI.patch \ | ||
40 | file://2011.06/0034-omap4_panda-adding-support-for-smsc-and-tftp-boot.patch \ | ||
41 | file://2011.06/0035-omap4_panda-use-uImage.panda-for-tftp.patch \ | ||
37 | file://fw_env.config \ | 42 | file://fw_env.config \ |
38 | " | 43 | " |
39 | # v2011.06 tag -> b1af6f532e0d348b153d5c148369229d24af361a | 44 | # v2011.06 tag -> b1af6f532e0d348b153d5c148369229d24af361a |
40 | SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a" | 45 | SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a" |
41 | PV = "2011.06" | 46 | PV = "2011.06" |
47 | PR = "r1" | ||
42 | 48 | ||
43 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" | 49 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" |
44 | 50 | ||