diff options
author | Denys Dmytriyenko <denys@ti.com> | 2013-03-18 17:39:10 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2013-03-18 19:27:28 -0400 |
commit | 22a2fa4b97c7ce6dfcd1420d1cadb034c309047e (patch) | |
tree | cc27459ab7b893605bd8ddc342177e522e380a5c /recipes-bsp | |
parent | 90955082eeac7f5fceccf2402abb9a924be535ed (diff) | |
download | meta-ti-22a2fa4b97c7ce6dfcd1420d1cadb034c309047e.tar.gz |
u-boot 2011.06: remove an older no longer used version
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-bsp')
38 files changed, 0 insertions, 3851 deletions
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch b/recipes-bsp/u-boot/u-boot/2011.06/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch deleted file mode 100644 index 6463a80e..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From 8892464287ca16f90397f159370f0d42ff6dc879 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bob Feretich <bob.feretich@rafresearch.com> | ||
3 | Date: Thu, 24 Feb 2011 13:16:44 +0000 | ||
4 | Subject: [PATCH 01/30] OMAP3 Beagle Pin Mux initialization glitch fix | ||
5 | |||
6 | The below patch reverses the order of two segments in the board file. | ||
7 | Output pins need to have their values initialized, before they are | ||
8 | exposed to the logic outside the chip. | ||
9 | |||
10 | Signed-off-by: Bob Feretich <bob.feretich@rafresearch.com> | ||
11 | Cc: Wolfgang Denk <wd@denx.de> | ||
12 | --- | ||
13 | board/ti/beagle/beagle.c | 12 ++++++------ | ||
14 | 1 files changed, 6 insertions(+), 6 deletions(-) | ||
15 | |||
16 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
17 | index ab50514..15d061a 100644 | ||
18 | --- a/board/ti/beagle/beagle.c | ||
19 | +++ b/board/ti/beagle/beagle.c | ||
20 | @@ -301,17 +301,17 @@ int misc_init_r(void) | ||
21 | twl4030_power_init(); | ||
22 | twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); | ||
23 | |||
24 | - /* Configure GPIOs to output */ | ||
25 | - writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); | ||
26 | - writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
27 | - GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); | ||
28 | - | ||
29 | - /* Set GPIOs */ | ||
30 | + /* Set GPIO states before they are made outputs */ | ||
31 | writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, | ||
32 | &gpio6_base->setdataout); | ||
33 | writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
34 | GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); | ||
35 | |||
36 | + /* Configure GPIOs to output */ | ||
37 | + writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); | ||
38 | + writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
39 | + GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); | ||
40 | + | ||
41 | dieid_num_r(); | ||
42 | |||
43 | return 0; | ||
44 | -- | ||
45 | 1.6.6.1 | ||
46 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch b/recipes-bsp/u-boot/u-boot/2011.06/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch deleted file mode 100644 index b4906ef9..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 88ee784eddb634074895d68572b896aebd10bb5d Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <steve@sakoman.com> | ||
3 | Date: Thu, 30 Dec 2010 07:19:44 +0000 | ||
4 | Subject: [PATCH 02/30] OMAP: Remove omapfb.debug=y from Beagle and Overo env settings | ||
5 | |||
6 | The kernel DSS2 code is mature now, and keeping this setting hurts performance | ||
7 | |||
8 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
9 | --- | ||
10 | include/configs/omap3_beagle.h | 2 -- | ||
11 | include/configs/omap3_overo.h | 2 -- | ||
12 | 2 files changed, 0 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
15 | index 9fd80ed..42575f1 100644 | ||
16 | --- a/include/configs/omap3_beagle.h | ||
17 | +++ b/include/configs/omap3_beagle.h | ||
18 | @@ -214,7 +214,6 @@ | ||
19 | "mpurate=${mpurate} " \ | ||
20 | "vram=${vram} " \ | ||
21 | "omapfb.mode=dvi:${dvimode} " \ | ||
22 | - "omapfb.debug=y " \ | ||
23 | "omapdss.def_disp=${defaultdisplay} " \ | ||
24 | "root=${mmcroot} " \ | ||
25 | "rootfstype=${mmcrootfstype}\0" \ | ||
26 | @@ -222,7 +221,6 @@ | ||
27 | "mpurate=${mpurate} " \ | ||
28 | "vram=${vram} " \ | ||
29 | "omapfb.mode=dvi:${dvimode} " \ | ||
30 | - "omapfb.debug=y " \ | ||
31 | "omapdss.def_disp=${defaultdisplay} " \ | ||
32 | "root=${nandroot} " \ | ||
33 | "rootfstype=${nandrootfstype}\0" \ | ||
34 | diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h | ||
35 | index 242b317..0f64054 100644 | ||
36 | --- a/include/configs/omap3_overo.h | ||
37 | +++ b/include/configs/omap3_overo.h | ||
38 | @@ -170,7 +170,6 @@ | ||
39 | "mpurate=${mpurate} " \ | ||
40 | "vram=${vram} " \ | ||
41 | "omapfb.mode=dvi:${dvimode} " \ | ||
42 | - "omapfb.debug=y " \ | ||
43 | "omapdss.def_disp=${defaultdisplay} " \ | ||
44 | "root=${mmcroot} " \ | ||
45 | "rootfstype=${mmcrootfstype}\0" \ | ||
46 | @@ -178,7 +177,6 @@ | ||
47 | "mpurate=${mpurate} " \ | ||
48 | "vram=${vram} " \ | ||
49 | "omapfb.mode=dvi:${dvimode} " \ | ||
50 | - "omapfb.debug=y " \ | ||
51 | "omapdss.def_disp=${defaultdisplay} " \ | ||
52 | "root=${nandroot} " \ | ||
53 | "rootfstype=${nandrootfstype}\0" \ | ||
54 | -- | ||
55 | 1.6.6.1 | ||
56 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0003-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch b/recipes-bsp/u-boot/u-boot/2011.06/0003-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch deleted file mode 100644 index b2e3df62..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0003-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From 89231bb3ed75ea6801a10d3ea618c8dc83d7e483 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 22 Nov 2010 11:51:32 +0100 | ||
4 | Subject: [PATCH 03/30] OMAP3: beagle: pass expansionboard name in bootargs | ||
5 | |||
6 | --- | ||
7 | include/configs/omap3_beagle.h | 13 +++++++++++++ | ||
8 | 1 files changed, 13 insertions(+), 0 deletions(-) | ||
9 | |||
10 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
11 | index 42575f1..d5f98da 100644 | ||
12 | --- a/include/configs/omap3_beagle.h | ||
13 | +++ b/include/configs/omap3_beagle.h | ||
14 | @@ -202,6 +202,7 @@ | ||
15 | "usbtty=cdc_acm\0" \ | ||
16 | "console=ttyS2,115200n8\0" \ | ||
17 | "mpurate=auto\0" \ | ||
18 | + "buddy=none "\ | ||
19 | "vram=12M\0" \ | ||
20 | "dvimode=1024x768MR-16@60\0" \ | ||
21 | "defaultdisplay=dvi\0" \ | ||
22 | @@ -212,6 +213,7 @@ | ||
23 | "nandrootfstype=jffs2\0" \ | ||
24 | "mmcargs=setenv bootargs console=${console} " \ | ||
25 | "mpurate=${mpurate} " \ | ||
26 | + "buddy=${buddy} "\ | ||
27 | "vram=${vram} " \ | ||
28 | "omapfb.mode=dvi:${dvimode} " \ | ||
29 | "omapdss.def_disp=${defaultdisplay} " \ | ||
30 | @@ -219,6 +221,7 @@ | ||
31 | "rootfstype=${mmcrootfstype}\0" \ | ||
32 | "nandargs=setenv bootargs console=${console} " \ | ||
33 | "mpurate=${mpurate} " \ | ||
34 | + "buddy=${buddy} "\ | ||
35 | "vram=${vram} " \ | ||
36 | "omapfb.mode=dvi:${dvimode} " \ | ||
37 | "omapdss.def_disp=${defaultdisplay} " \ | ||
38 | @@ -227,6 +230,16 @@ | ||
39 | "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ | ||
40 | "importbootenv=echo Importing environment from mmc ...; " \ | ||
41 | "env import -t $loadaddr $filesize\0" \ | ||
42 | + "ramargs=setenv bootargs console=${console} " \ | ||
43 | + "${optargs} " \ | ||
44 | + "mpurate=${mpurate} " \ | ||
45 | + "buddy=${buddy} "\ | ||
46 | + "vram=${vram} " \ | ||
47 | + "omapfb.mode=dvi:${dvimode} " \ | ||
48 | + "omapdss.def_disp=${defaultdisplay} " \ | ||
49 | + "root=${ramroot} " \ | ||
50 | + "rootfstype=${ramrootfstype}\0" \ | ||
51 | + "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ | ||
52 | "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
53 | "mmcboot=echo Booting from mmc ...; " \ | ||
54 | "run mmcargs; " \ | ||
55 | -- | ||
56 | 1.6.6.1 | ||
57 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0004-beagleboard-add-support-for-xM-revision-C.patch b/recipes-bsp/u-boot/u-boot/2011.06/0004-beagleboard-add-support-for-xM-revision-C.patch deleted file mode 100644 index dec2839b..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0004-beagleboard-add-support-for-xM-revision-C.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 9890bd3e5a28645214aff9d8d311d6a5bdec6cf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 09:37:37 +0200 | ||
4 | Subject: [PATCH 04/30] beagleboard: add support for xM revision C | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | board/ti/beagle/beagle.c | 10 ++++++++++ | ||
9 | board/ti/beagle/beagle.h | 1 + | ||
10 | 2 files changed, 11 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
13 | index 15d061a..7768901 100644 | ||
14 | --- a/board/ti/beagle/beagle.c | ||
15 | +++ b/board/ti/beagle/beagle.c | ||
16 | @@ -216,6 +216,16 @@ int misc_init_r(void) | ||
17 | TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, | ||
18 | TWL4030_PM_RECEIVER_DEV_GRP_P1); | ||
19 | break; | ||
20 | + case REVISION_XM_C: | ||
21 | + printf("Beagle xM Rev C\n"); | ||
22 | + setenv("beaglerev", "xMC"); | ||
23 | + MUX_BEAGLE_XM(); | ||
24 | + /* Set VAUX2 to 1.8V for EHCI PHY */ | ||
25 | + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, | ||
26 | + TWL4030_PM_RECEIVER_VAUX2_VSEL_18, | ||
27 | + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, | ||
28 | + TWL4030_PM_RECEIVER_DEV_GRP_P1); | ||
29 | + break; | ||
30 | default: | ||
31 | printf("Beagle unknown 0x%02x\n", get_board_revision()); | ||
32 | MUX_BEAGLE_XM(); | ||
33 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
34 | index a7401b1..04247cd 100644 | ||
35 | --- a/board/ti/beagle/beagle.h | ||
36 | +++ b/board/ti/beagle/beagle.h | ||
37 | @@ -39,6 +39,7 @@ const omap3_sysinfo sysinfo = { | ||
38 | #define REVISION_C4 0x5 | ||
39 | #define REVISION_XM_A 0x0 | ||
40 | #define REVISION_XM_B 0x1 | ||
41 | +#define REVISION_XM_C 0x2 | ||
42 | |||
43 | /* | ||
44 | * IEN - Input Enable | ||
45 | -- | ||
46 | 1.6.6.1 | ||
47 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0005-Add-support-for-SMSC95XX-USB-2.0-10-100MBit-Ethernet.patch b/recipes-bsp/u-boot/u-boot/2011.06/0005-Add-support-for-SMSC95XX-USB-2.0-10-100MBit-Ethernet.patch deleted file mode 100644 index 2c400d83..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0005-Add-support-for-SMSC95XX-USB-2.0-10-100MBit-Ethernet.patch +++ /dev/null | |||
@@ -1,989 +0,0 @@ | |||
1 | From 00b6a679e3c739567f1383030cd61483a15555f8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon Glass <sjg@chromium.org> | ||
3 | Date: Mon, 13 Jun 2011 13:13:09 +0000 | ||
4 | Subject: [PATCH 05/30] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | The SMSC95XX is a USB hub with a built-in Ethernet adapter. This adds support | ||
10 | for this, using the USB host network framework. | ||
11 | |||
12 | Changes for v2: | ||
13 | - Coding style cleanup | ||
14 | - Changed some comments as suggested | ||
15 | |||
16 | Changes for v3: | ||
17 | - Change turbo_mode to #define | ||
18 | |||
19 | Changes for v4: | ||
20 | - Dropped Tegra2 specific bit | ||
21 | - Fixed a few broken bits in SMSC from my testing | ||
22 | |||
23 | Changes for v5: | ||
24 | - Code style clean-ups in SMSC | ||
25 | - Cleaned up debugging of errors in SMSC driver | ||
26 | |||
27 | Changes for v6: | ||
28 | - Set NET_IP_ALIGN to 0 always | ||
29 | |||
30 | Changes for v8: | ||
31 | - Add setup of SMSC write_hwaddr function | ||
32 | |||
33 | Signed-off-by: Simon Glass <sjg@chromium.org> | ||
34 | Tested-by: Eric Bénard <eric@eukrea.com> | ||
35 | --- | ||
36 | drivers/usb/eth/Makefile | 1 + | ||
37 | drivers/usb/eth/smsc95xx.c | 879 +++++++++++++++++++++++++++++++++++++++++++ | ||
38 | drivers/usb/eth/usb_ether.c | 7 + | ||
39 | include/usb_ether.h | 13 + | ||
40 | 4 files changed, 900 insertions(+), 0 deletions(-) | ||
41 | create mode 100644 drivers/usb/eth/smsc95xx.c | ||
42 | |||
43 | diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile | ||
44 | index 6a5f25a..e28793d 100644 | ||
45 | --- a/drivers/usb/eth/Makefile | ||
46 | +++ b/drivers/usb/eth/Makefile | ||
47 | @@ -28,6 +28,7 @@ COBJS-$(CONFIG_USB_HOST_ETHER) += usb_ether.o | ||
48 | ifdef CONFIG_USB_ETHER_ASIX | ||
49 | COBJS-y += asix.o | ||
50 | endif | ||
51 | +COBJS-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o | ||
52 | |||
53 | COBJS := $(COBJS-y) | ||
54 | SRCS := $(COBJS:.o=.c) | ||
55 | diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c | ||
56 | new file mode 100644 | ||
57 | index 0000000..97f2729 | ||
58 | --- /dev/null | ||
59 | +++ b/drivers/usb/eth/smsc95xx.c | ||
60 | @@ -0,0 +1,879 @@ | ||
61 | +/* | ||
62 | + * Copyright (c) 2011 The Chromium OS Authors. | ||
63 | + * Copyright (C) 2009 NVIDIA, Corporation | ||
64 | + * See file CREDITS for list of people who contributed to this | ||
65 | + * project. | ||
66 | + * | ||
67 | + * This program is free software; you can redistribute it and/or | ||
68 | + * modify it under the terms of the GNU General Public License as | ||
69 | + * published by the Free Software Foundation; either version 2 of | ||
70 | + * the License, or (at your option) any later version. | ||
71 | + * | ||
72 | + * This program is distributed in the hope that it will be useful, | ||
73 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
74 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
75 | + * GNU General Public License for more details. | ||
76 | + * | ||
77 | + * You should have received a copy of the GNU General Public License | ||
78 | + * along with this program; if not, write to the Free Software | ||
79 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
80 | + * MA 02111-1307 USA | ||
81 | + */ | ||
82 | + | ||
83 | +#include <common.h> | ||
84 | +#include <usb.h> | ||
85 | +#include <linux/mii.h> | ||
86 | +#include "usb_ether.h" | ||
87 | + | ||
88 | +/* SMSC LAN95xx based USB 2.0 Ethernet Devices */ | ||
89 | + | ||
90 | +/* Tx command words */ | ||
91 | +#define TX_CMD_A_FIRST_SEG_ 0x00002000 | ||
92 | +#define TX_CMD_A_LAST_SEG_ 0x00001000 | ||
93 | + | ||
94 | +/* Rx status word */ | ||
95 | +#define RX_STS_FL_ 0x3FFF0000 /* Frame Length */ | ||
96 | +#define RX_STS_ES_ 0x00008000 /* Error Summary */ | ||
97 | + | ||
98 | +/* SCSRs */ | ||
99 | +#define ID_REV 0x00 | ||
100 | + | ||
101 | +#define INT_STS 0x08 | ||
102 | + | ||
103 | +#define TX_CFG 0x10 | ||
104 | +#define TX_CFG_ON_ 0x00000004 | ||
105 | + | ||
106 | +#define HW_CFG 0x14 | ||
107 | +#define HW_CFG_BIR_ 0x00001000 | ||
108 | +#define HW_CFG_RXDOFF_ 0x00000600 | ||
109 | +#define HW_CFG_MEF_ 0x00000020 | ||
110 | +#define HW_CFG_BCE_ 0x00000002 | ||
111 | +#define HW_CFG_LRST_ 0x00000008 | ||
112 | + | ||
113 | +#define PM_CTRL 0x20 | ||
114 | +#define PM_CTL_PHY_RST_ 0x00000010 | ||
115 | + | ||
116 | +#define AFC_CFG 0x2C | ||
117 | + | ||
118 | +/* | ||
119 | + * Hi watermark = 15.5Kb (~10 mtu pkts) | ||
120 | + * low watermark = 3k (~2 mtu pkts) | ||
121 | + * backpressure duration = ~ 350us | ||
122 | + * Apply FC on any frame. | ||
123 | + */ | ||
124 | +#define AFC_CFG_DEFAULT 0x00F830A1 | ||
125 | + | ||
126 | +#define E2P_CMD 0x30 | ||
127 | +#define E2P_CMD_BUSY_ 0x80000000 | ||
128 | +#define E2P_CMD_READ_ 0x00000000 | ||
129 | +#define E2P_CMD_TIMEOUT_ 0x00000400 | ||
130 | +#define E2P_CMD_LOADED_ 0x00000200 | ||
131 | +#define E2P_CMD_ADDR_ 0x000001FF | ||
132 | + | ||
133 | +#define E2P_DATA 0x34 | ||
134 | + | ||
135 | +#define BURST_CAP 0x38 | ||
136 | + | ||
137 | +#define INT_EP_CTL 0x68 | ||
138 | +#define INT_EP_CTL_PHY_INT_ 0x00008000 | ||
139 | + | ||
140 | +#define BULK_IN_DLY 0x6C | ||
141 | + | ||
142 | +/* MAC CSRs */ | ||
143 | +#define MAC_CR 0x100 | ||
144 | +#define MAC_CR_MCPAS_ 0x00080000 | ||
145 | +#define MAC_CR_PRMS_ 0x00040000 | ||
146 | +#define MAC_CR_HPFILT_ 0x00002000 | ||
147 | +#define MAC_CR_TXEN_ 0x00000008 | ||
148 | +#define MAC_CR_RXEN_ 0x00000004 | ||
149 | + | ||
150 | +#define ADDRH 0x104 | ||
151 | + | ||
152 | +#define ADDRL 0x108 | ||
153 | + | ||
154 | +#define MII_ADDR 0x114 | ||
155 | +#define MII_WRITE_ 0x02 | ||
156 | +#define MII_BUSY_ 0x01 | ||
157 | +#define MII_READ_ 0x00 /* ~of MII Write bit */ | ||
158 | + | ||
159 | +#define MII_DATA 0x118 | ||
160 | + | ||
161 | +#define FLOW 0x11C | ||
162 | + | ||
163 | +#define VLAN1 0x120 | ||
164 | + | ||
165 | +#define COE_CR 0x130 | ||
166 | +#define Tx_COE_EN_ 0x00010000 | ||
167 | +#define Rx_COE_EN_ 0x00000001 | ||
168 | + | ||
169 | +/* Vendor-specific PHY Definitions */ | ||
170 | +#define PHY_INT_SRC 29 | ||
171 | + | ||
172 | +#define PHY_INT_MASK 30 | ||
173 | +#define PHY_INT_MASK_ANEG_COMP_ ((u16)0x0040) | ||
174 | +#define PHY_INT_MASK_LINK_DOWN_ ((u16)0x0010) | ||
175 | +#define PHY_INT_MASK_DEFAULT_ (PHY_INT_MASK_ANEG_COMP_ | \ | ||
176 | + PHY_INT_MASK_LINK_DOWN_) | ||
177 | + | ||
178 | +/* USB Vendor Requests */ | ||
179 | +#define USB_VENDOR_REQUEST_WRITE_REGISTER 0xA0 | ||
180 | +#define USB_VENDOR_REQUEST_READ_REGISTER 0xA1 | ||
181 | + | ||
182 | +/* Some extra defines */ | ||
183 | +#define HS_USB_PKT_SIZE 512 | ||
184 | +#define FS_USB_PKT_SIZE 64 | ||
185 | +#define DEFAULT_HS_BURST_CAP_SIZE (16 * 1024 + 5 * HS_USB_PKT_SIZE) | ||
186 | +#define DEFAULT_FS_BURST_CAP_SIZE (6 * 1024 + 33 * FS_USB_PKT_SIZE) | ||
187 | +#define DEFAULT_BULK_IN_DELAY 0x00002000 | ||
188 | +#define MAX_SINGLE_PACKET_SIZE 2048 | ||
189 | +#define EEPROM_MAC_OFFSET 0x01 | ||
190 | +#define SMSC95XX_INTERNAL_PHY_ID 1 | ||
191 | +#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ | ||
192 | + | ||
193 | +/* local defines */ | ||
194 | +#define SMSC95XX_BASE_NAME "sms" | ||
195 | +#define USB_CTRL_SET_TIMEOUT 5000 | ||
196 | +#define USB_CTRL_GET_TIMEOUT 5000 | ||
197 | +#define USB_BULK_SEND_TIMEOUT 5000 | ||
198 | +#define USB_BULK_RECV_TIMEOUT 5000 | ||
199 | + | ||
200 | +#define AX_RX_URB_SIZE 2048 | ||
201 | +#define PHY_CONNECT_TIMEOUT 5000 | ||
202 | + | ||
203 | +#define TURBO_MODE | ||
204 | + | ||
205 | +/* local vars */ | ||
206 | +static int curr_eth_dev; /* index for name of next device detected */ | ||
207 | + | ||
208 | + | ||
209 | +/* | ||
210 | + * Smsc95xx infrastructure commands | ||
211 | + */ | ||
212 | +static int smsc95xx_write_reg(struct ueth_data *dev, u32 index, u32 data) | ||
213 | +{ | ||
214 | + int len; | ||
215 | + | ||
216 | + cpu_to_le32s(&data); | ||
217 | + | ||
218 | + len = usb_control_msg(dev->pusb_dev, usb_sndctrlpipe(dev->pusb_dev, 0), | ||
219 | + USB_VENDOR_REQUEST_WRITE_REGISTER, | ||
220 | + USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | ||
221 | + 00, index, &data, sizeof(data), USB_CTRL_SET_TIMEOUT); | ||
222 | + if (len != sizeof(data)) { | ||
223 | + debug("smsc95xx_write_reg failed: index=%d, data=%d, len=%d", | ||
224 | + index, data, len); | ||
225 | + return -1; | ||
226 | + } | ||
227 | + return 0; | ||
228 | +} | ||
229 | + | ||
230 | +static int smsc95xx_read_reg(struct ueth_data *dev, u32 index, u32 *data) | ||
231 | +{ | ||
232 | + int len; | ||
233 | + | ||
234 | + len = usb_control_msg(dev->pusb_dev, usb_rcvctrlpipe(dev->pusb_dev, 0), | ||
235 | + USB_VENDOR_REQUEST_READ_REGISTER, | ||
236 | + USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | ||
237 | + 00, index, data, sizeof(data), USB_CTRL_GET_TIMEOUT); | ||
238 | + if (len != sizeof(data)) { | ||
239 | + debug("smsc95xx_read_reg failed: index=%d, len=%d", | ||
240 | + index, len); | ||
241 | + return -1; | ||
242 | + } | ||
243 | + | ||
244 | + le32_to_cpus(data); | ||
245 | + return 0; | ||
246 | +} | ||
247 | + | ||
248 | +/* Loop until the read is completed with timeout */ | ||
249 | +static int smsc95xx_phy_wait_not_busy(struct ueth_data *dev) | ||
250 | +{ | ||
251 | + unsigned long start_time = get_timer(0); | ||
252 | + u32 val; | ||
253 | + | ||
254 | + do { | ||
255 | + smsc95xx_read_reg(dev, MII_ADDR, &val); | ||
256 | + if (!(val & MII_BUSY_)) | ||
257 | + return 0; | ||
258 | + } while (get_timer(start_time) < 1 * 1000 * 1000); | ||
259 | + | ||
260 | + return -1; | ||
261 | +} | ||
262 | + | ||
263 | +static int smsc95xx_mdio_read(struct ueth_data *dev, int phy_id, int idx) | ||
264 | +{ | ||
265 | + u32 val, addr; | ||
266 | + | ||
267 | + /* confirm MII not busy */ | ||
268 | + if (smsc95xx_phy_wait_not_busy(dev)) { | ||
269 | + debug("MII is busy in smsc95xx_mdio_read\n"); | ||
270 | + return -1; | ||
271 | + } | ||
272 | + | ||
273 | + /* set the address, index & direction (read from PHY) */ | ||
274 | + addr = (phy_id << 11) | (idx << 6) | MII_READ_; | ||
275 | + smsc95xx_write_reg(dev, MII_ADDR, addr); | ||
276 | + | ||
277 | + if (smsc95xx_phy_wait_not_busy(dev)) { | ||
278 | + debug("Timed out reading MII reg %02X\n", idx); | ||
279 | + return -1; | ||
280 | + } | ||
281 | + | ||
282 | + smsc95xx_read_reg(dev, MII_DATA, &val); | ||
283 | + | ||
284 | + return (u16)(val & 0xFFFF); | ||
285 | +} | ||
286 | + | ||
287 | +static void smsc95xx_mdio_write(struct ueth_data *dev, int phy_id, int idx, | ||
288 | + int regval) | ||
289 | +{ | ||
290 | + u32 val, addr; | ||
291 | + | ||
292 | + /* confirm MII not busy */ | ||
293 | + if (smsc95xx_phy_wait_not_busy(dev)) { | ||
294 | + debug("MII is busy in smsc95xx_mdio_write\n"); | ||
295 | + return; | ||
296 | + } | ||
297 | + | ||
298 | + val = regval; | ||
299 | + smsc95xx_write_reg(dev, MII_DATA, val); | ||
300 | + | ||
301 | + /* set the address, index & direction (write to PHY) */ | ||
302 | + addr = (phy_id << 11) | (idx << 6) | MII_WRITE_; | ||
303 | + smsc95xx_write_reg(dev, MII_ADDR, addr); | ||
304 | + | ||
305 | + if (smsc95xx_phy_wait_not_busy(dev)) | ||
306 | + debug("Timed out writing MII reg %02X\n", idx); | ||
307 | +} | ||
308 | + | ||
309 | +static int smsc95xx_eeprom_confirm_not_busy(struct ueth_data *dev) | ||
310 | +{ | ||
311 | + unsigned long start_time = get_timer(0); | ||
312 | + u32 val; | ||
313 | + | ||
314 | + do { | ||
315 | + smsc95xx_read_reg(dev, E2P_CMD, &val); | ||
316 | + if (!(val & E2P_CMD_LOADED_)) { | ||
317 | + debug("No EEPROM present\n"); | ||
318 | + return -1; | ||
319 | + } | ||
320 | + if (!(val & E2P_CMD_BUSY_)) | ||
321 | + return 0; | ||
322 | + udelay(40); | ||
323 | + } while (get_timer(start_time) < 1 * 1000 * 1000); | ||
324 | + | ||
325 | + debug("EEPROM is busy\n"); | ||
326 | + return -1; | ||
327 | +} | ||
328 | + | ||
329 | +static int smsc95xx_wait_eeprom(struct ueth_data *dev) | ||
330 | +{ | ||
331 | + unsigned long start_time = get_timer(0); | ||
332 | + u32 val; | ||
333 | + | ||
334 | + do { | ||
335 | + smsc95xx_read_reg(dev, E2P_CMD, &val); | ||
336 | + if (!(val & E2P_CMD_BUSY_) || (val & E2P_CMD_TIMEOUT_)) | ||
337 | + break; | ||
338 | + udelay(40); | ||
339 | + } while (get_timer(start_time) < 1 * 1000 * 1000); | ||
340 | + | ||
341 | + if (val & (E2P_CMD_TIMEOUT_ | E2P_CMD_BUSY_)) { | ||
342 | + debug("EEPROM read operation timeout\n"); | ||
343 | + return -1; | ||
344 | + } | ||
345 | + return 0; | ||
346 | +} | ||
347 | + | ||
348 | +static int smsc95xx_read_eeprom(struct ueth_data *dev, u32 offset, u32 length, | ||
349 | + u8 *data) | ||
350 | +{ | ||
351 | + u32 val; | ||
352 | + int i, ret; | ||
353 | + | ||
354 | + ret = smsc95xx_eeprom_confirm_not_busy(dev); | ||
355 | + if (ret) | ||
356 | + return ret; | ||
357 | + | ||
358 | + for (i = 0; i < length; i++) { | ||
359 | + val = E2P_CMD_BUSY_ | E2P_CMD_READ_ | (offset & E2P_CMD_ADDR_); | ||
360 | + smsc95xx_write_reg(dev, E2P_CMD, val); | ||
361 | + | ||
362 | + ret = smsc95xx_wait_eeprom(dev); | ||
363 | + if (ret < 0) | ||
364 | + return ret; | ||
365 | + | ||
366 | + smsc95xx_read_reg(dev, E2P_DATA, &val); | ||
367 | + data[i] = val & 0xFF; | ||
368 | + offset++; | ||
369 | + } | ||
370 | + return 0; | ||
371 | +} | ||
372 | + | ||
373 | +/* | ||
374 | + * mii_nway_restart - restart NWay (autonegotiation) for this interface | ||
375 | + * | ||
376 | + * Returns 0 on success, negative on error. | ||
377 | + */ | ||
378 | +static int mii_nway_restart(struct ueth_data *dev) | ||
379 | +{ | ||
380 | + int bmcr; | ||
381 | + int r = -1; | ||
382 | + | ||
383 | + /* if autoneg is off, it's an error */ | ||
384 | + bmcr = smsc95xx_mdio_read(dev, dev->phy_id, MII_BMCR); | ||
385 | + | ||
386 | + if (bmcr & BMCR_ANENABLE) { | ||
387 | + bmcr |= BMCR_ANRESTART; | ||
388 | + smsc95xx_mdio_write(dev, dev->phy_id, MII_BMCR, bmcr); | ||
389 | + r = 0; | ||
390 | + } | ||
391 | + return r; | ||
392 | +} | ||
393 | + | ||
394 | +static int smsc95xx_phy_initialize(struct ueth_data *dev) | ||
395 | +{ | ||
396 | + smsc95xx_mdio_write(dev, dev->phy_id, MII_BMCR, BMCR_RESET); | ||
397 | + smsc95xx_mdio_write(dev, dev->phy_id, MII_ADVERTISE, | ||
398 | + ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP | | ||
399 | + ADVERTISE_PAUSE_ASYM); | ||
400 | + | ||
401 | + /* read to clear */ | ||
402 | + smsc95xx_mdio_read(dev, dev->phy_id, PHY_INT_SRC); | ||
403 | + | ||
404 | + smsc95xx_mdio_write(dev, dev->phy_id, PHY_INT_MASK, | ||
405 | + PHY_INT_MASK_DEFAULT_); | ||
406 | + mii_nway_restart(dev); | ||
407 | + | ||
408 | + debug("phy initialised succesfully\n"); | ||
409 | + return 0; | ||
410 | +} | ||
411 | + | ||
412 | +static int smsc95xx_init_mac_address(struct eth_device *eth, | ||
413 | + struct ueth_data *dev) | ||
414 | +{ | ||
415 | + /* try reading mac address from EEPROM */ | ||
416 | + if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, | ||
417 | + eth->enetaddr) == 0) { | ||
418 | + if (is_valid_ether_addr(eth->enetaddr)) { | ||
419 | + /* eeprom values are valid so use them */ | ||
420 | + debug("MAC address read from EEPROM\n"); | ||
421 | + return 0; | ||
422 | + } | ||
423 | + } | ||
424 | + | ||
425 | + /* | ||
426 | + * No eeprom, or eeprom values are invalid. Generating a random MAC | ||
427 | + * address is not safe. Just return an error. | ||
428 | + */ | ||
429 | + return -1; | ||
430 | +} | ||
431 | + | ||
432 | +static int smsc95xx_write_hwaddr(struct eth_device *eth) | ||
433 | +{ | ||
434 | + struct ueth_data *dev = (struct ueth_data *)eth->priv; | ||
435 | + u32 addr_lo, addr_hi; | ||
436 | + int ret; | ||
437 | + | ||
438 | + /* set hardware address */ | ||
439 | + debug("** %s()\n", __func__); | ||
440 | + addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr)); | ||
441 | + addr_hi = cpu_to_le16(*((u16 *)(eth->enetaddr + 4))); | ||
442 | + ret = smsc95xx_write_reg(dev, ADDRL, addr_lo); | ||
443 | + if (ret < 0) { | ||
444 | + debug("Failed to write ADDRL: %d\n", ret); | ||
445 | + return ret; | ||
446 | + } | ||
447 | + | ||
448 | + ret = smsc95xx_write_reg(dev, ADDRH, addr_hi); | ||
449 | + if (ret < 0) | ||
450 | + return ret; | ||
451 | + debug("MAC %02x:%02x:%02x:%02x:%02x:%02x\n", | ||
452 | + eth->enetaddr[0], eth->enetaddr[1], | ||
453 | + eth->enetaddr[2], eth->enetaddr[3], | ||
454 | + eth->enetaddr[4], eth->enetaddr[5]); | ||
455 | + dev->have_hwaddr = 1; | ||
456 | + return 0; | ||
457 | +} | ||
458 | + | ||
459 | +/* Enable or disable Tx & Rx checksum offload engines */ | ||
460 | +static int smsc95xx_set_csums(struct ueth_data *dev, | ||
461 | + int use_tx_csum, int use_rx_csum) | ||
462 | +{ | ||
463 | + u32 read_buf; | ||
464 | + int ret = smsc95xx_read_reg(dev, COE_CR, &read_buf); | ||
465 | + if (ret < 0) | ||
466 | + return ret; | ||
467 | + | ||
468 | + if (use_tx_csum) | ||
469 | + read_buf |= Tx_COE_EN_; | ||
470 | + else | ||
471 | + read_buf &= ~Tx_COE_EN_; | ||
472 | + | ||
473 | + if (use_rx_csum) | ||
474 | + read_buf |= Rx_COE_EN_; | ||
475 | + else | ||
476 | + read_buf &= ~Rx_COE_EN_; | ||
477 | + | ||
478 | + ret = smsc95xx_write_reg(dev, COE_CR, read_buf); | ||
479 | + if (ret < 0) | ||
480 | + return ret; | ||
481 | + | ||
482 | + debug("COE_CR = 0x%08x\n", read_buf); | ||
483 | + return 0; | ||
484 | +} | ||
485 | + | ||
486 | +static void smsc95xx_set_multicast(struct ueth_data *dev) | ||
487 | +{ | ||
488 | + /* No multicast in u-boot */ | ||
489 | + dev->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_MCPAS_ | MAC_CR_HPFILT_); | ||
490 | +} | ||
491 | + | ||
492 | +/* starts the TX path */ | ||
493 | +static void smsc95xx_start_tx_path(struct ueth_data *dev) | ||
494 | +{ | ||
495 | + u32 reg_val; | ||
496 | + | ||
497 | + /* Enable Tx at MAC */ | ||
498 | + dev->mac_cr |= MAC_CR_TXEN_; | ||
499 | + | ||
500 | + smsc95xx_write_reg(dev, MAC_CR, dev->mac_cr); | ||
501 | + | ||
502 | + /* Enable Tx at SCSRs */ | ||
503 | + reg_val = TX_CFG_ON_; | ||
504 | + smsc95xx_write_reg(dev, TX_CFG, reg_val); | ||
505 | +} | ||
506 | + | ||
507 | +/* Starts the Receive path */ | ||
508 | +static void smsc95xx_start_rx_path(struct ueth_data *dev) | ||
509 | +{ | ||
510 | + dev->mac_cr |= MAC_CR_RXEN_; | ||
511 | + smsc95xx_write_reg(dev, MAC_CR, dev->mac_cr); | ||
512 | +} | ||
513 | + | ||
514 | +/* | ||
515 | + * Smsc95xx callbacks | ||
516 | + */ | ||
517 | +static int smsc95xx_init(struct eth_device *eth, bd_t *bd) | ||
518 | +{ | ||
519 | + int ret; | ||
520 | + u32 write_buf; | ||
521 | + u32 read_buf; | ||
522 | + u32 burst_cap; | ||
523 | + int timeout; | ||
524 | + struct ueth_data *dev = (struct ueth_data *)eth->priv; | ||
525 | +#define TIMEOUT_RESOLUTION 50 /* ms */ | ||
526 | + int link_detected; | ||
527 | + | ||
528 | + debug("** %s()\n", __func__); | ||
529 | + dev->phy_id = SMSC95XX_INTERNAL_PHY_ID; /* fixed phy id */ | ||
530 | + | ||
531 | + write_buf = HW_CFG_LRST_; | ||
532 | + ret = smsc95xx_write_reg(dev, HW_CFG, write_buf); | ||
533 | + if (ret < 0) | ||
534 | + return ret; | ||
535 | + | ||
536 | + timeout = 0; | ||
537 | + do { | ||
538 | + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); | ||
539 | + if (ret < 0) | ||
540 | + return ret; | ||
541 | + udelay(10 * 1000); | ||
542 | + timeout++; | ||
543 | + } while ((read_buf & HW_CFG_LRST_) && (timeout < 100)); | ||
544 | + | ||
545 | + if (timeout >= 100) { | ||
546 | + debug("timeout waiting for completion of Lite Reset\n"); | ||
547 | + return -1; | ||
548 | + } | ||
549 | + | ||
550 | + write_buf = PM_CTL_PHY_RST_; | ||
551 | + ret = smsc95xx_write_reg(dev, PM_CTRL, write_buf); | ||
552 | + if (ret < 0) | ||
553 | + return ret; | ||
554 | + | ||
555 | + timeout = 0; | ||
556 | + do { | ||
557 | + ret = smsc95xx_read_reg(dev, PM_CTRL, &read_buf); | ||
558 | + if (ret < 0) | ||
559 | + return ret; | ||
560 | + udelay(10 * 1000); | ||
561 | + timeout++; | ||
562 | + } while ((read_buf & PM_CTL_PHY_RST_) && (timeout < 100)); | ||
563 | + if (timeout >= 100) { | ||
564 | + debug("timeout waiting for PHY Reset\n"); | ||
565 | + return -1; | ||
566 | + } | ||
567 | + if (!dev->have_hwaddr && smsc95xx_init_mac_address(eth, dev) == 0) | ||
568 | + dev->have_hwaddr = 1; | ||
569 | + if (!dev->have_hwaddr) { | ||
570 | + puts("Error: SMSC95xx: No MAC address set - set usbethaddr\n"); | ||
571 | + return -1; | ||
572 | + } | ||
573 | + if (smsc95xx_write_hwaddr(eth) < 0) | ||
574 | + return -1; | ||
575 | + | ||
576 | + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); | ||
577 | + if (ret < 0) | ||
578 | + return ret; | ||
579 | + debug("Read Value from HW_CFG : 0x%08x\n", read_buf); | ||
580 | + | ||
581 | + read_buf |= HW_CFG_BIR_; | ||
582 | + ret = smsc95xx_write_reg(dev, HW_CFG, read_buf); | ||
583 | + if (ret < 0) | ||
584 | + return ret; | ||
585 | + | ||
586 | + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); | ||
587 | + if (ret < 0) | ||
588 | + return ret; | ||
589 | + debug("Read Value from HW_CFG after writing " | ||
590 | + "HW_CFG_BIR_: 0x%08x\n", read_buf); | ||
591 | + | ||
592 | +#ifdef TURBO_MODE | ||
593 | + if (dev->pusb_dev->speed == USB_SPEED_HIGH) { | ||
594 | + burst_cap = DEFAULT_HS_BURST_CAP_SIZE / HS_USB_PKT_SIZE; | ||
595 | + dev->rx_urb_size = DEFAULT_HS_BURST_CAP_SIZE; | ||
596 | + } else { | ||
597 | + burst_cap = DEFAULT_FS_BURST_CAP_SIZE / FS_USB_PKT_SIZE; | ||
598 | + dev->rx_urb_size = DEFAULT_FS_BURST_CAP_SIZE; | ||
599 | + } | ||
600 | +#else | ||
601 | + burst_cap = 0; | ||
602 | + dev->rx_urb_size = MAX_SINGLE_PACKET_SIZE; | ||
603 | +#endif | ||
604 | + debug("rx_urb_size=%ld\n", (ulong)dev->rx_urb_size); | ||
605 | + | ||
606 | + ret = smsc95xx_write_reg(dev, BURST_CAP, burst_cap); | ||
607 | + if (ret < 0) | ||
608 | + return ret; | ||
609 | + | ||
610 | + ret = smsc95xx_read_reg(dev, BURST_CAP, &read_buf); | ||
611 | + if (ret < 0) | ||
612 | + return ret; | ||
613 | + debug("Read Value from BURST_CAP after writing: 0x%08x\n", read_buf); | ||
614 | + | ||
615 | + read_buf = DEFAULT_BULK_IN_DELAY; | ||
616 | + ret = smsc95xx_write_reg(dev, BULK_IN_DLY, read_buf); | ||
617 | + if (ret < 0) | ||
618 | + return ret; | ||
619 | + | ||
620 | + ret = smsc95xx_read_reg(dev, BULK_IN_DLY, &read_buf); | ||
621 | + if (ret < 0) | ||
622 | + return ret; | ||
623 | + debug("Read Value from BULK_IN_DLY after writing: " | ||
624 | + "0x%08x\n", read_buf); | ||
625 | + | ||
626 | + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); | ||
627 | + if (ret < 0) | ||
628 | + return ret; | ||
629 | + debug("Read Value from HW_CFG: 0x%08x\n", read_buf); | ||
630 | + | ||
631 | +#ifdef TURBO_MODE | ||
632 | + read_buf |= (HW_CFG_MEF_ | HW_CFG_BCE_); | ||
633 | +#endif | ||
634 | + read_buf &= ~HW_CFG_RXDOFF_; | ||
635 | + | ||
636 | +#define NET_IP_ALIGN 0 | ||
637 | + read_buf |= NET_IP_ALIGN << 9; | ||
638 | + | ||
639 | + ret = smsc95xx_write_reg(dev, HW_CFG, read_buf); | ||
640 | + if (ret < 0) | ||
641 | + return ret; | ||
642 | + | ||
643 | + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); | ||
644 | + if (ret < 0) | ||
645 | + return ret; | ||
646 | + debug("Read Value from HW_CFG after writing: 0x%08x\n", read_buf); | ||
647 | + | ||
648 | + write_buf = 0xFFFFFFFF; | ||
649 | + ret = smsc95xx_write_reg(dev, INT_STS, write_buf); | ||
650 | + if (ret < 0) | ||
651 | + return ret; | ||
652 | + | ||
653 | + ret = smsc95xx_read_reg(dev, ID_REV, &read_buf); | ||
654 | + if (ret < 0) | ||
655 | + return ret; | ||
656 | + debug("ID_REV = 0x%08x\n", read_buf); | ||
657 | + | ||
658 | + /* Init Tx */ | ||
659 | + write_buf = 0; | ||
660 | + ret = smsc95xx_write_reg(dev, FLOW, write_buf); | ||
661 | + if (ret < 0) | ||
662 | + return ret; | ||
663 | + | ||
664 | + read_buf = AFC_CFG_DEFAULT; | ||
665 | + ret = smsc95xx_write_reg(dev, AFC_CFG, read_buf); | ||
666 | + if (ret < 0) | ||
667 | + return ret; | ||
668 | + | ||
669 | + ret = smsc95xx_read_reg(dev, MAC_CR, &dev->mac_cr); | ||
670 | + if (ret < 0) | ||
671 | + return ret; | ||
672 | + | ||
673 | + /* Init Rx. Set Vlan */ | ||
674 | + write_buf = (u32)ETH_P_8021Q; | ||
675 | + ret = smsc95xx_write_reg(dev, VLAN1, write_buf); | ||
676 | + if (ret < 0) | ||
677 | + return ret; | ||
678 | + | ||
679 | + /* Disable checksum offload engines */ | ||
680 | + ret = smsc95xx_set_csums(dev, 0, 0); | ||
681 | + if (ret < 0) { | ||
682 | + debug("Failed to set csum offload: %d\n", ret); | ||
683 | + return ret; | ||
684 | + } | ||
685 | + smsc95xx_set_multicast(dev); | ||
686 | + | ||
687 | + if (smsc95xx_phy_initialize(dev) < 0) | ||
688 | + return -1; | ||
689 | + ret = smsc95xx_read_reg(dev, INT_EP_CTL, &read_buf); | ||
690 | + if (ret < 0) | ||
691 | + return ret; | ||
692 | + | ||
693 | + /* enable PHY interrupts */ | ||
694 | + read_buf |= INT_EP_CTL_PHY_INT_; | ||
695 | + | ||
696 | + ret = smsc95xx_write_reg(dev, INT_EP_CTL, read_buf); | ||
697 | + if (ret < 0) | ||
698 | + return ret; | ||
699 | + | ||
700 | + smsc95xx_start_tx_path(dev); | ||
701 | + smsc95xx_start_rx_path(dev); | ||
702 | + | ||
703 | + timeout = 0; | ||
704 | + do { | ||
705 | + link_detected = smsc95xx_mdio_read(dev, dev->phy_id, MII_BMSR) | ||
706 | + & BMSR_LSTATUS; | ||
707 | + if (!link_detected) { | ||
708 | + if (timeout == 0) | ||
709 | + printf("Waiting for Ethernet connection... "); | ||
710 | + udelay(TIMEOUT_RESOLUTION * 1000); | ||
711 | + timeout += TIMEOUT_RESOLUTION; | ||
712 | + } | ||
713 | + } while (!link_detected && timeout < PHY_CONNECT_TIMEOUT); | ||
714 | + if (link_detected) { | ||
715 | + if (timeout != 0) | ||
716 | + printf("done.\n"); | ||
717 | + } else { | ||
718 | + printf("unable to connect.\n"); | ||
719 | + return -1; | ||
720 | + } | ||
721 | + return 0; | ||
722 | +} | ||
723 | + | ||
724 | +static int smsc95xx_send(struct eth_device *eth, volatile void* packet, | ||
725 | + int length) | ||
726 | +{ | ||
727 | + struct ueth_data *dev = (struct ueth_data *)eth->priv; | ||
728 | + int err; | ||
729 | + int actual_len; | ||
730 | + u32 tx_cmd_a; | ||
731 | + u32 tx_cmd_b; | ||
732 | + unsigned char msg[PKTSIZE + sizeof(tx_cmd_a) + sizeof(tx_cmd_b)]; | ||
733 | + | ||
734 | + debug("** %s(), len %d, buf %#x\n", __func__, length, (int)msg); | ||
735 | + if (length > PKTSIZE) | ||
736 | + return -1; | ||
737 | + | ||
738 | + tx_cmd_a = (u32)length | TX_CMD_A_FIRST_SEG_ | TX_CMD_A_LAST_SEG_; | ||
739 | + tx_cmd_b = (u32)length; | ||
740 | + cpu_to_le32s(&tx_cmd_a); | ||
741 | + cpu_to_le32s(&tx_cmd_b); | ||
742 | + | ||
743 | + /* prepend cmd_a and cmd_b */ | ||
744 | + memcpy(msg, &tx_cmd_a, sizeof(tx_cmd_a)); | ||
745 | + memcpy(msg + sizeof(tx_cmd_a), &tx_cmd_b, sizeof(tx_cmd_b)); | ||
746 | + memcpy(msg + sizeof(tx_cmd_a) + sizeof(tx_cmd_b), (void *)packet, | ||
747 | + length); | ||
748 | + err = usb_bulk_msg(dev->pusb_dev, | ||
749 | + usb_sndbulkpipe(dev->pusb_dev, dev->ep_out), | ||
750 | + (void *)msg, | ||
751 | + length + sizeof(tx_cmd_a) + sizeof(tx_cmd_b), | ||
752 | + &actual_len, | ||
753 | + USB_BULK_SEND_TIMEOUT); | ||
754 | + debug("Tx: len = %u, actual = %u, err = %d\n", | ||
755 | + length + sizeof(tx_cmd_a) + sizeof(tx_cmd_b), | ||
756 | + actual_len, err); | ||
757 | + return err; | ||
758 | +} | ||
759 | + | ||
760 | +static int smsc95xx_recv(struct eth_device *eth) | ||
761 | +{ | ||
762 | + struct ueth_data *dev = (struct ueth_data *)eth->priv; | ||
763 | + static unsigned char recv_buf[AX_RX_URB_SIZE]; | ||
764 | + unsigned char *buf_ptr; | ||
765 | + int err; | ||
766 | + int actual_len; | ||
767 | + u32 packet_len; | ||
768 | + int cur_buf_align; | ||
769 | + | ||
770 | + debug("** %s()\n", __func__); | ||
771 | + err = usb_bulk_msg(dev->pusb_dev, | ||
772 | + usb_rcvbulkpipe(dev->pusb_dev, dev->ep_in), | ||
773 | + (void *)recv_buf, | ||
774 | + AX_RX_URB_SIZE, | ||
775 | + &actual_len, | ||
776 | + USB_BULK_RECV_TIMEOUT); | ||
777 | + debug("Rx: len = %u, actual = %u, err = %d\n", AX_RX_URB_SIZE, | ||
778 | + actual_len, err); | ||
779 | + if (err != 0) { | ||
780 | + debug("Rx: failed to receive\n"); | ||
781 | + return -1; | ||
782 | + } | ||
783 | + if (actual_len > AX_RX_URB_SIZE) { | ||
784 | + debug("Rx: received too many bytes %d\n", actual_len); | ||
785 | + return -1; | ||
786 | + } | ||
787 | + | ||
788 | + buf_ptr = recv_buf; | ||
789 | + while (actual_len > 0) { | ||
790 | + /* | ||
791 | + * 1st 4 bytes contain the length of the actual data plus error | ||
792 | + * info. Extract data length. | ||
793 | + */ | ||
794 | + if (actual_len < sizeof(packet_len)) { | ||
795 | + debug("Rx: incomplete packet length\n"); | ||
796 | + return -1; | ||
797 | + } | ||
798 | + memcpy(&packet_len, buf_ptr, sizeof(packet_len)); | ||
799 | + le32_to_cpus(&packet_len); | ||
800 | + if (packet_len & RX_STS_ES_) { | ||
801 | + debug("Rx: Error header=%#x", packet_len); | ||
802 | + return -1; | ||
803 | + } | ||
804 | + packet_len = ((packet_len & RX_STS_FL_) >> 16); | ||
805 | + | ||
806 | + if (packet_len > actual_len - sizeof(packet_len)) { | ||
807 | + debug("Rx: too large packet: %d\n", packet_len); | ||
808 | + return -1; | ||
809 | + } | ||
810 | + | ||
811 | + /* Notify net stack */ | ||
812 | + NetReceive(buf_ptr + sizeof(packet_len), packet_len - 4); | ||
813 | + | ||
814 | + /* Adjust for next iteration */ | ||
815 | + actual_len -= sizeof(packet_len) + packet_len; | ||
816 | + buf_ptr += sizeof(packet_len) + packet_len; | ||
817 | + cur_buf_align = (int)buf_ptr - (int)recv_buf; | ||
818 | + | ||
819 | + if (cur_buf_align & 0x03) { | ||
820 | + int align = 4 - (cur_buf_align & 0x03); | ||
821 | + | ||
822 | + actual_len -= align; | ||
823 | + buf_ptr += align; | ||
824 | + } | ||
825 | + } | ||
826 | + return err; | ||
827 | +} | ||
828 | + | ||
829 | +static void smsc95xx_halt(struct eth_device *eth) | ||
830 | +{ | ||
831 | + debug("** %s()\n", __func__); | ||
832 | +} | ||
833 | + | ||
834 | +/* | ||
835 | + * SMSC probing functions | ||
836 | + */ | ||
837 | +void smsc95xx_eth_before_probe(void) | ||
838 | +{ | ||
839 | + curr_eth_dev = 0; | ||
840 | +} | ||
841 | + | ||
842 | +struct smsc95xx_dongle { | ||
843 | + unsigned short vendor; | ||
844 | + unsigned short product; | ||
845 | +}; | ||
846 | + | ||
847 | +static const struct smsc95xx_dongle smsc95xx_dongles[] = { | ||
848 | + { 0x0424, 0xec00 }, /* LAN9512/LAN9514 Ethernet */ | ||
849 | + { 0x0424, 0x9500 }, /* LAN9500 Ethernet */ | ||
850 | + { 0x0000, 0x0000 } /* END - Do not remove */ | ||
851 | +}; | ||
852 | + | ||
853 | +/* Probe to see if a new device is actually an SMSC device */ | ||
854 | +int smsc95xx_eth_probe(struct usb_device *dev, unsigned int ifnum, | ||
855 | + struct ueth_data *ss) | ||
856 | +{ | ||
857 | + struct usb_interface *iface; | ||
858 | + struct usb_interface_descriptor *iface_desc; | ||
859 | + int i; | ||
860 | + | ||
861 | + /* let's examine the device now */ | ||
862 | + iface = &dev->config.if_desc[ifnum]; | ||
863 | + iface_desc = &dev->config.if_desc[ifnum].desc; | ||
864 | + | ||
865 | + for (i = 0; smsc95xx_dongles[i].vendor != 0; i++) { | ||
866 | + if (dev->descriptor.idVendor == smsc95xx_dongles[i].vendor && | ||
867 | + dev->descriptor.idProduct == smsc95xx_dongles[i].product) | ||
868 | + /* Found a supported dongle */ | ||
869 | + break; | ||
870 | + } | ||
871 | + if (smsc95xx_dongles[i].vendor == 0) | ||
872 | + return 0; | ||
873 | + | ||
874 | + /* At this point, we know we've got a live one */ | ||
875 | + debug("\n\nUSB Ethernet device detected\n"); | ||
876 | + memset(ss, '\0', sizeof(struct ueth_data)); | ||
877 | + | ||
878 | + /* Initialize the ueth_data structure with some useful info */ | ||
879 | + ss->ifnum = ifnum; | ||
880 | + ss->pusb_dev = dev; | ||
881 | + ss->subclass = iface_desc->bInterfaceSubClass; | ||
882 | + ss->protocol = iface_desc->bInterfaceProtocol; | ||
883 | + | ||
884 | + /* | ||
885 | + * We are expecting a minimum of 3 endpoints - in, out (bulk), and int. | ||
886 | + * We will ignore any others. | ||
887 | + */ | ||
888 | + for (i = 0; i < iface_desc->bNumEndpoints; i++) { | ||
889 | + /* is it an BULK endpoint? */ | ||
890 | + if ((iface->ep_desc[i].bmAttributes & | ||
891 | + USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) { | ||
892 | + if (iface->ep_desc[i].bEndpointAddress & USB_DIR_IN) | ||
893 | + ss->ep_in = | ||
894 | + iface->ep_desc[i].bEndpointAddress & | ||
895 | + USB_ENDPOINT_NUMBER_MASK; | ||
896 | + else | ||
897 | + ss->ep_out = | ||
898 | + iface->ep_desc[i].bEndpointAddress & | ||
899 | + USB_ENDPOINT_NUMBER_MASK; | ||
900 | + } | ||
901 | + | ||
902 | + /* is it an interrupt endpoint? */ | ||
903 | + if ((iface->ep_desc[i].bmAttributes & | ||
904 | + USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) { | ||
905 | + ss->ep_int = iface->ep_desc[i].bEndpointAddress & | ||
906 | + USB_ENDPOINT_NUMBER_MASK; | ||
907 | + ss->irqinterval = iface->ep_desc[i].bInterval; | ||
908 | + } | ||
909 | + } | ||
910 | + debug("Endpoints In %d Out %d Int %d\n", | ||
911 | + ss->ep_in, ss->ep_out, ss->ep_int); | ||
912 | + | ||
913 | + /* Do some basic sanity checks, and bail if we find a problem */ | ||
914 | + if (usb_set_interface(dev, iface_desc->bInterfaceNumber, 0) || | ||
915 | + !ss->ep_in || !ss->ep_out || !ss->ep_int) { | ||
916 | + debug("Problems with device\n"); | ||
917 | + return 0; | ||
918 | + } | ||
919 | + dev->privptr = (void *)ss; | ||
920 | + return 1; | ||
921 | +} | ||
922 | + | ||
923 | +int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss, | ||
924 | + struct eth_device *eth) | ||
925 | +{ | ||
926 | + debug("** %s()\n", __func__); | ||
927 | + if (!eth) { | ||
928 | + debug("%s: missing parameter.\n", __func__); | ||
929 | + return 0; | ||
930 | + } | ||
931 | + sprintf(eth->name, "%s%d", SMSC95XX_BASE_NAME, curr_eth_dev++); | ||
932 | + eth->init = smsc95xx_init; | ||
933 | + eth->send = smsc95xx_send; | ||
934 | + eth->recv = smsc95xx_recv; | ||
935 | + eth->halt = smsc95xx_halt; | ||
936 | + eth->write_hwaddr = smsc95xx_write_hwaddr; | ||
937 | + eth->priv = ss; | ||
938 | + return 1; | ||
939 | +} | ||
940 | diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c | ||
941 | index 68a0883..7b55da3 100644 | ||
942 | --- a/drivers/usb/eth/usb_ether.c | ||
943 | +++ b/drivers/usb/eth/usb_ether.c | ||
944 | @@ -45,6 +45,13 @@ static const struct usb_eth_prob_dev prob_dev[] = { | ||
945 | .get_info = asix_eth_get_info, | ||
946 | }, | ||
947 | #endif | ||
948 | +#ifdef CONFIG_USB_ETHER_SMSC95XX | ||
949 | + { | ||
950 | + .before_probe = smsc95xx_eth_before_probe, | ||
951 | + .probe = smsc95xx_eth_probe, | ||
952 | + .get_info = smsc95xx_eth_get_info, | ||
953 | + }, | ||
954 | +#endif | ||
955 | { }, /* END */ | ||
956 | }; | ||
957 | |||
958 | diff --git a/include/usb_ether.h b/include/usb_ether.h | ||
959 | index 825c275..a7fb26b 100644 | ||
960 | --- a/include/usb_ether.h | ||
961 | +++ b/include/usb_ether.h | ||
962 | @@ -51,6 +51,11 @@ struct ueth_data { | ||
963 | unsigned char irqinterval; /* Intervall for IRQ Pipe */ | ||
964 | |||
965 | /* private fields for each driver can go here if needed */ | ||
966 | +#ifdef CONFIG_USB_ETHER_SMSC95XX | ||
967 | + size_t rx_urb_size; /* maximum USB URB size */ | ||
968 | + u32 mac_cr; /* MAC control register value */ | ||
969 | + int have_hwaddr; /* 1 if we have a hardware MAC address */ | ||
970 | +#endif | ||
971 | }; | ||
972 | |||
973 | /* | ||
974 | @@ -65,4 +70,12 @@ int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss, | ||
975 | struct eth_device *eth); | ||
976 | #endif | ||
977 | |||
978 | +#ifdef CONFIG_USB_ETHER_SMSC95XX | ||
979 | +void smsc95xx_eth_before_probe(void); | ||
980 | +int smsc95xx_eth_probe(struct usb_device *dev, unsigned int ifnum, | ||
981 | + struct ueth_data *ss); | ||
982 | +int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss, | ||
983 | + struct eth_device *eth); | ||
984 | +#endif | ||
985 | + | ||
986 | #endif /* __USB_ETHER_H__ */ | ||
987 | -- | ||
988 | 1.6.6.1 | ||
989 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0006-Add-Ethernet-hardware-MAC-address-framework-to-usbne.patch b/recipes-bsp/u-boot/u-boot/2011.06/0006-Add-Ethernet-hardware-MAC-address-framework-to-usbne.patch deleted file mode 100644 index f38966ef..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0006-Add-Ethernet-hardware-MAC-address-framework-to-usbne.patch +++ /dev/null | |||
@@ -1,245 +0,0 @@ | |||
1 | From f8ff7b1760739c33b1b0aa5a88d903e6e8945f1c Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon Glass <sjg@chromium.org> | ||
3 | Date: Mon, 13 Jun 2011 13:13:10 +0000 | ||
4 | Subject: [PATCH 06/30] Add Ethernet hardware MAC address framework to usbnet | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Built-in Ethernet adapters support setting the mac address by means of a | ||
10 | ethaddr environment variable for each interface (ethaddr, eth1addr, eth2addr). | ||
11 | |||
12 | This adds similar support to the USB network side, using the names | ||
13 | usbethaddr, usbeth1addr, etc. They are kept separate since we don't want | ||
14 | a USB device taking the MAC address of a built-in device or vice versa. | ||
15 | |||
16 | Changes for v2: | ||
17 | - eth_set_hwaddr -> eth_write_hwaddr | ||
18 | - tided up other users of eth_getenv_enetaddr_by_index() | ||
19 | |||
20 | Changes for v5: | ||
21 | - Changed NULL to "eth" in eth_getenv_enetaddr_by_index() API | ||
22 | |||
23 | Signed-off-by: Simon Glass <sjg@chromium.org> | ||
24 | Tested-by: Eric Bénard <eric@eukrea.com> | ||
25 | --- | ||
26 | board/davinci/common/misc.c | 2 +- | ||
27 | drivers/net/designware.c | 2 +- | ||
28 | drivers/usb/eth/usb_ether.c | 9 +++++- | ||
29 | include/net.h | 25 ++++++++++++++++- | ||
30 | net/eth.c | 64 ++++++++++++++++++++++++++----------------- | ||
31 | 5 files changed, 72 insertions(+), 30 deletions(-) | ||
32 | |||
33 | diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c | ||
34 | index 2bfdf23..53d6aa1 100644 | ||
35 | --- a/board/davinci/common/misc.c | ||
36 | +++ b/board/davinci/common/misc.c | ||
37 | @@ -101,7 +101,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) | ||
38 | { | ||
39 | uint8_t env_enetaddr[6]; | ||
40 | |||
41 | - eth_getenv_enetaddr_by_index(0, env_enetaddr); | ||
42 | + eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr); | ||
43 | if (!memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) { | ||
44 | /* There is no MAC address in the environment, so we initialize | ||
45 | * it from the value in the EEPROM. */ | ||
46 | diff --git a/drivers/net/designware.c b/drivers/net/designware.c | ||
47 | index 3f5eeb7..02ba393 100644 | ||
48 | --- a/drivers/net/designware.c | ||
49 | +++ b/drivers/net/designware.c | ||
50 | @@ -500,7 +500,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 phy_addr) | ||
51 | dev->iobase = (int)base_addr; | ||
52 | dev->priv = priv; | ||
53 | |||
54 | - eth_getenv_enetaddr_by_index(id, &dev->enetaddr[0]); | ||
55 | + eth_getenv_enetaddr_by_index("eth", id, &dev->enetaddr[0]); | ||
56 | |||
57 | priv->dev = dev; | ||
58 | priv->mac_regs_p = (struct eth_mac_regs *)base_addr; | ||
59 | diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c | ||
60 | index 7b55da3..6565ea5 100644 | ||
61 | --- a/drivers/usb/eth/usb_ether.c | ||
62 | +++ b/drivers/usb/eth/usb_ether.c | ||
63 | @@ -80,6 +80,7 @@ int is_eth_dev_on_usb_host(void) | ||
64 | */ | ||
65 | static void probe_valid_drivers(struct usb_device *dev) | ||
66 | { | ||
67 | + struct eth_device *eth; | ||
68 | int j; | ||
69 | |||
70 | for (j = 0; prob_dev[j].probe && prob_dev[j].get_info; j++) { | ||
71 | @@ -88,9 +89,10 @@ static void probe_valid_drivers(struct usb_device *dev) | ||
72 | /* | ||
73 | * ok, it is a supported eth device. Get info and fill it in | ||
74 | */ | ||
75 | + eth = &usb_eth[usb_max_eth_dev].eth_dev; | ||
76 | if (prob_dev[j].get_info(dev, | ||
77 | &usb_eth[usb_max_eth_dev], | ||
78 | - &usb_eth[usb_max_eth_dev].eth_dev)) { | ||
79 | + eth)) { | ||
80 | /* found proper driver */ | ||
81 | /* register with networking stack */ | ||
82 | usb_max_eth_dev++; | ||
83 | @@ -100,7 +102,10 @@ static void probe_valid_drivers(struct usb_device *dev) | ||
84 | * call since eth_current_changed (internally called) | ||
85 | * relies on it | ||
86 | */ | ||
87 | - eth_register(&usb_eth[usb_max_eth_dev - 1].eth_dev); | ||
88 | + eth_register(eth); | ||
89 | + if (eth_write_hwaddr(eth, "usbeth", | ||
90 | + usb_max_eth_dev - 1)) | ||
91 | + puts("Warning: failed to set MAC address\n"); | ||
92 | break; | ||
93 | } | ||
94 | } | ||
95 | diff --git a/include/net.h b/include/net.h | ||
96 | index 018a744..ce54825 100644 | ||
97 | --- a/include/net.h | ||
98 | +++ b/include/net.h | ||
99 | @@ -128,7 +128,18 @@ extern int eth_get_dev_index (void); /* get the device index */ | ||
100 | extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr); | ||
101 | extern int eth_getenv_enetaddr(char *name, uchar *enetaddr); | ||
102 | extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr); | ||
103 | -extern int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr); | ||
104 | + | ||
105 | +/* | ||
106 | + * Get the hardware address for an ethernet interface . | ||
107 | + * Args: | ||
108 | + * base_name - base name for device (normally "eth") | ||
109 | + * index - device index number (0 for first) | ||
110 | + * enetaddr - returns 6 byte hardware address | ||
111 | + * Returns: | ||
112 | + * Return true if the address is valid. | ||
113 | + */ | ||
114 | +extern int eth_getenv_enetaddr_by_index(const char *base_name, int index, | ||
115 | + uchar *enetaddr); | ||
116 | |||
117 | extern int usb_eth_initialize(bd_t *bi); | ||
118 | extern int eth_init(bd_t *bis); /* Initialize the device */ | ||
119 | @@ -141,6 +152,18 @@ extern int eth_rx(void); /* Check for received packets */ | ||
120 | extern void eth_halt(void); /* stop SCC */ | ||
121 | extern char *eth_get_name(void); /* get name of current device */ | ||
122 | |||
123 | +/* | ||
124 | + * Set the hardware address for an ethernet interface based on 'eth%daddr' | ||
125 | + * environment variable (or just 'ethaddr' if eth_number is 0). | ||
126 | + * Args: | ||
127 | + * base_name - base name for device (normally "eth") | ||
128 | + * eth_number - value of %d (0 for first device of this type) | ||
129 | + * Returns: | ||
130 | + * 0 is success, non-zero is error status from driver. | ||
131 | + */ | ||
132 | +int eth_write_hwaddr(struct eth_device *dev, const char *base_name, | ||
133 | + int eth_number); | ||
134 | + | ||
135 | #ifdef CONFIG_MCAST_TFTP | ||
136 | int eth_mcast_join( IPaddr_t mcast_addr, u8 join); | ||
137 | u32 ether_crc (size_t len, unsigned char const *p); | ||
138 | diff --git a/net/eth.c b/net/eth.c | ||
139 | index 6523834..b3ea565 100644 | ||
140 | --- a/net/eth.c | ||
141 | +++ b/net/eth.c | ||
142 | @@ -54,10 +54,11 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr) | ||
143 | return setenv(name, buf); | ||
144 | } | ||
145 | |||
146 | -int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr) | ||
147 | +int eth_getenv_enetaddr_by_index(const char *base_name, int index, | ||
148 | + uchar *enetaddr) | ||
149 | { | ||
150 | char enetvar[32]; | ||
151 | - sprintf(enetvar, index ? "eth%daddr" : "ethaddr", index); | ||
152 | + sprintf(enetvar, index ? "%s%daddr" : "%saddr", base_name, index); | ||
153 | return eth_getenv_enetaddr(enetvar, enetaddr); | ||
154 | } | ||
155 | |||
156 | @@ -188,6 +189,38 @@ static void eth_current_changed(void) | ||
157 | #endif | ||
158 | } | ||
159 | |||
160 | +int eth_write_hwaddr(struct eth_device *dev, const char *base_name, | ||
161 | + int eth_number) | ||
162 | +{ | ||
163 | + unsigned char env_enetaddr[6]; | ||
164 | + int ret = 0; | ||
165 | + | ||
166 | + if (!eth_getenv_enetaddr_by_index(base_name, eth_number, env_enetaddr)) | ||
167 | + return -1; | ||
168 | + | ||
169 | + if (memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) { | ||
170 | + if (memcmp(dev->enetaddr, "\0\0\0\0\0\0", 6) && | ||
171 | + memcmp(dev->enetaddr, env_enetaddr, 6)) { | ||
172 | + printf("\nWarning: %s MAC addresses don't match:\n", | ||
173 | + dev->name); | ||
174 | + printf("Address in SROM is %pM\n", | ||
175 | + dev->enetaddr); | ||
176 | + printf("Address in environment is %pM\n", | ||
177 | + env_enetaddr); | ||
178 | + } | ||
179 | + | ||
180 | + memcpy(dev->enetaddr, env_enetaddr, 6); | ||
181 | + } | ||
182 | + | ||
183 | + if (dev->write_hwaddr && | ||
184 | + !eth_mac_skip(eth_number) && | ||
185 | + is_valid_ether_addr(dev->enetaddr)) { | ||
186 | + ret = dev->write_hwaddr(dev); | ||
187 | + } | ||
188 | + | ||
189 | + return ret; | ||
190 | +} | ||
191 | + | ||
192 | int eth_register(struct eth_device *dev) | ||
193 | { | ||
194 | struct eth_device *d; | ||
195 | @@ -208,7 +241,6 @@ int eth_register(struct eth_device *dev) | ||
196 | |||
197 | int eth_initialize(bd_t *bis) | ||
198 | { | ||
199 | - unsigned char env_enetaddr[6]; | ||
200 | int eth_number = 0; | ||
201 | |||
202 | eth_devices = NULL; | ||
203 | @@ -264,27 +296,8 @@ int eth_initialize(bd_t *bis) | ||
204 | if (strchr(dev->name, ' ')) | ||
205 | puts("\nWarning: eth device name has a space!\n"); | ||
206 | |||
207 | - eth_getenv_enetaddr_by_index(eth_number, env_enetaddr); | ||
208 | - | ||
209 | - if (memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) { | ||
210 | - if (memcmp(dev->enetaddr, "\0\0\0\0\0\0", 6) && | ||
211 | - memcmp(dev->enetaddr, env_enetaddr, 6)) | ||
212 | - { | ||
213 | - printf ("\nWarning: %s MAC addresses don't match:\n", | ||
214 | - dev->name); | ||
215 | - printf ("Address in SROM is %pM\n", | ||
216 | - dev->enetaddr); | ||
217 | - printf ("Address in environment is %pM\n", | ||
218 | - env_enetaddr); | ||
219 | - } | ||
220 | - | ||
221 | - memcpy(dev->enetaddr, env_enetaddr, 6); | ||
222 | - } | ||
223 | - if (dev->write_hwaddr && | ||
224 | - !eth_mac_skip(eth_number) && | ||
225 | - is_valid_ether_addr(dev->enetaddr)) { | ||
226 | - dev->write_hwaddr(dev); | ||
227 | - } | ||
228 | + if (eth_write_hwaddr(dev, NULL, eth_number)) | ||
229 | + puts("Warning: failed to set MAC address\n"); | ||
230 | |||
231 | eth_number++; | ||
232 | dev = dev->next; | ||
233 | @@ -359,7 +372,8 @@ int eth_init(bd_t *bis) | ||
234 | do { | ||
235 | uchar env_enetaddr[6]; | ||
236 | |||
237 | - if (eth_getenv_enetaddr_by_index(eth_number, env_enetaddr)) | ||
238 | + if (eth_getenv_enetaddr_by_index("eth", eth_number, | ||
239 | + env_enetaddr)) | ||
240 | memcpy(dev->enetaddr, env_enetaddr, 6); | ||
241 | |||
242 | ++eth_number; | ||
243 | -- | ||
244 | 1.6.6.1 | ||
245 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0007-Add-documentation-for-USB-Host-Networking.patch b/recipes-bsp/u-boot/u-boot/2011.06/0007-Add-documentation-for-USB-Host-Networking.patch deleted file mode 100644 index f2f1cecb..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0007-Add-documentation-for-USB-Host-Networking.patch +++ /dev/null | |||
@@ -1,188 +0,0 @@ | |||
1 | From 48938b9136e85d7399b8cc831731acd26dfb2e08 Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon Glass <sjg@chromium.org> | ||
3 | Date: Mon, 13 Jun 2011 13:13:11 +0000 | ||
4 | Subject: [PATCH 07/30] Add documentation for USB Host Networking | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | This describes what it is for, devices supported, how to enable for your | ||
10 | board in U-Boot, setting up the server, and notes about MAC addresses. | ||
11 | |||
12 | Changes for v6: | ||
13 | - Adjust documentation file according to Wolfgang's comments | ||
14 | |||
15 | Signed-off-by: Simon Glass <sjg@chromium.org> | ||
16 | Tested-by: Eric Bénard <eric@eukrea.com> | ||
17 | --- | ||
18 | doc/README.usb | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- | ||
19 | 1 files changed, 156 insertions(+), 1 deletions(-) | ||
20 | |||
21 | diff --git a/doc/README.usb b/doc/README.usb | ||
22 | index 9aa4f62..a8a4058 100644 | ||
23 | --- a/doc/README.usb | ||
24 | +++ b/doc/README.usb | ||
25 | @@ -79,4 +79,159 @@ CONFIG_USB_UHCI defines the lowlevel part.A lowlevel part must be defined | ||
26 | if using CONFIG_CMD_USB | ||
27 | CONFIG_USB_KEYBOARD enables the USB Keyboard | ||
28 | CONFIG_USB_STORAGE enables the USB storage devices | ||
29 | -CONFIG_USB_HOST_ETHER enables USB ethernet dongle support | ||
30 | +CONFIG_USB_HOST_ETHER enables USB ethernet adapter support | ||
31 | + | ||
32 | + | ||
33 | +USB Host Networking | ||
34 | +=================== | ||
35 | + | ||
36 | +If you have a supported USB Ethernet adapter you can use it in U-Boot | ||
37 | +to obtain an IP address and load a kernel from a network server. | ||
38 | + | ||
39 | +Note: USB Host Networking is not the same as making your board act as a USB | ||
40 | +client. In that case your board is pretending to be an Ethernet adapter | ||
41 | +and will appear as a network interface to an attached computer. In that | ||
42 | +case the connection is via a USB cable with the computer acting as the host. | ||
43 | + | ||
44 | +With USB Host Networking, your board is the USB host. It controls the | ||
45 | +Ethernet adapter to which it is directly connected and the connection to | ||
46 | +the outside world is your adapter's Ethernet cable. Your board becomes an | ||
47 | +independent network device, able to connect and perform network operations | ||
48 | +independently of your computer. | ||
49 | + | ||
50 | + | ||
51 | +Device support | ||
52 | +-------------- | ||
53 | + | ||
54 | +Currently supported devices are listed in the drivers according to | ||
55 | +their vendor and product IDs. You can check your device by connecting it | ||
56 | +to a Linux machine and typing 'lsusb'. The drivers are in | ||
57 | +drivers/usb/eth. | ||
58 | + | ||
59 | +For example this lsusb output line shows a device with Vendor ID 0x0x95 | ||
60 | +and product ID 0x7720: | ||
61 | + | ||
62 | +Bus 002 Device 010: ID 0b95:7720 ASIX Electronics Corp. AX88772 | ||
63 | + | ||
64 | +If you look at drivers/usb/eth/asix.c you will see this line within the | ||
65 | +supported device list, so we know this adapter is supported. | ||
66 | + | ||
67 | + { 0x0b95, 0x7720 }, /* Trendnet TU2-ET100 V3.0R */ | ||
68 | + | ||
69 | +If your adapter is not listed there is a still a chance that it will | ||
70 | +work. Try looking up the manufacturer of the chip inside your adapter. | ||
71 | +or take the adapter apart and look for chip markings. Then add a line | ||
72 | +for your vendor/product ID into the table of the appropriate driver, | ||
73 | +build U-Boot and see if it works. If not then there might be differences | ||
74 | +between the chip in your adapter and the driver. You could try to get a | ||
75 | +datasheet for your device and add support for it to U-Boot. This is not | ||
76 | +particularly difficult - you only need to provide support for four basic | ||
77 | +functions: init, halt, send and recv. | ||
78 | + | ||
79 | + | ||
80 | +Enabling USB Host Networking | ||
81 | +---------------------------- | ||
82 | + | ||
83 | +The normal U-Boot commands are used with USB networking, but you must | ||
84 | +start USB first. For example: | ||
85 | + | ||
86 | +usb start | ||
87 | +setenv bootfile /tftpboot/uImage | ||
88 | +bootp | ||
89 | + | ||
90 | + | ||
91 | +To enable USB Host Ethernet in U-Boot, your platform must of course | ||
92 | +support USB with CONFIG_CMD_USB enabled and working. You will need to | ||
93 | +add some config settings to your board header file: | ||
94 | + | ||
95 | +#define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters */ | ||
96 | +#define CONFIG_USB_ETHER_ASIX /* Asix, or whatever driver(s) you want */ | ||
97 | + | ||
98 | +As with built-in networking, you will also want to enable some network | ||
99 | +commands, for example: | ||
100 | + | ||
101 | +#define CONFIG_CMD_NET | ||
102 | +#define CONFIG_NET_MULTI | ||
103 | +#define CONFIG_CMD_PING | ||
104 | +#define CONFIG_CMD_DHCP | ||
105 | + | ||
106 | +and some bootp options, which tell your board to obtain its subnet, | ||
107 | +gateway IP, host name and boot path from the bootp/dhcp server. These | ||
108 | +settings should start you off: | ||
109 | + | ||
110 | +#define CONFIG_BOOTP_SUBNETMASK | ||
111 | +#define CONFIG_BOOTP_GATEWAY | ||
112 | +#define CONFIG_BOOTP_HOSTNAME | ||
113 | +#define CONFIG_BOOTP_BOOTPATH | ||
114 | + | ||
115 | +You can also set the default IP address of your board and the server | ||
116 | +as well as the default file to load when a 'bootp' command is issued. | ||
117 | +All of these can be obtained from the bootp server if not set. | ||
118 | + | ||
119 | +#define CONFIG_IPADDR 10.0.0.2 (replace with your value) | ||
120 | +#define CONFIG_SERVERIP 10.0.0.1 (replace with your value) | ||
121 | +#define CONFIG_BOOTFILE uImage | ||
122 | + | ||
123 | + | ||
124 | +The 'usb start' command should identify the adapter something like this: | ||
125 | + | ||
126 | +CrOS> usb start | ||
127 | +(Re)start USB... | ||
128 | +USB EHCI 1.00 | ||
129 | +scanning bus for devices... 3 USB Device(s) found | ||
130 | + scanning bus for storage devices... 0 Storage Device(s) found | ||
131 | + scanning bus for ethernet devices... 1 Ethernet Device(s) found | ||
132 | +CrOS> print ethact | ||
133 | +ethact=asx0 | ||
134 | + | ||
135 | +You can see that it found an ethernet device and we can print out the | ||
136 | +device name (asx0 in this case). | ||
137 | + | ||
138 | +Then 'bootp' or 'dhcp' should use it to obtain an IP address from DHCP, | ||
139 | +perhaps something like this: | ||
140 | + | ||
141 | +CrOS> bootp | ||
142 | +Waiting for Ethernet connection... done. | ||
143 | +BOOTP broadcast 1 | ||
144 | +BOOTP broadcast 2 | ||
145 | +DHCP client bound to address 172.22.73.81 | ||
146 | +Using asx0 device | ||
147 | +TFTP from server 172.22.72.144; our IP address is 172.22.73.81 | ||
148 | +Filename '/tftpboot/uImage-sjg-seaboard-261347'. | ||
149 | +Load address: 0x40c000 | ||
150 | +Loading: ################################################################# | ||
151 | + ################################################################# | ||
152 | + ################################################################# | ||
153 | + ################################################ | ||
154 | +done | ||
155 | +Bytes transferred = 3557464 (364858 hex) | ||
156 | +CrOS> | ||
157 | + | ||
158 | + | ||
159 | +Another way of doing this is to issue a tftp command, which will cause the | ||
160 | +bootp to happen automatically. | ||
161 | + | ||
162 | + | ||
163 | +MAC Addresses | ||
164 | +------------- | ||
165 | + | ||
166 | +Most Ethernet dongles have a built-in MAC address which is unique in the | ||
167 | +world. This is important so that devices on the network can be | ||
168 | +distinguised from each other. MAC address conflicts are evil and | ||
169 | +generally result in strange and eratic behaviour. | ||
170 | + | ||
171 | +Some boards have USB Ethernet chips on-board, and these sometimes do not | ||
172 | +have an assigned MAC address. In this case it is up to you to assign | ||
173 | +one which is unique. You should obtain a valid MAC address from a range | ||
174 | +assigned to you before you ship the product. | ||
175 | + | ||
176 | +Built-in Ethernet adapters support setting the MAC address by means of | ||
177 | +an ethaddr environment variable for each interface (ethaddr, eth1addr, | ||
178 | +eth2addr). There is similar support on the USB network side, using the | ||
179 | +names usbethaddr, usbeth1addr, etc. They are kept separate since we | ||
180 | +don't want a USB device taking the MAC address of a built-in device or | ||
181 | +vice versa. | ||
182 | + | ||
183 | +So if your USB Ethernet chip doesn't have a MAC address available then | ||
184 | +you must set usbethaddr to a suitable MAC address. At the time of | ||
185 | +writing this functionality is only supported by the SMSC driver. | ||
186 | -- | ||
187 | 1.6.6.1 | ||
188 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0008-dm3730-enable-dpll5.patch b/recipes-bsp/u-boot/u-boot/2011.06/0008-dm3730-enable-dpll5.patch deleted file mode 100644 index 5553c58d..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0008-dm3730-enable-dpll5.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From a13358a747c33ecda28a976ed9450b9351827c2a Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Benard <eric@eukrea.com> | ||
3 | Date: Fri, 10 Jun 2011 12:21:52 +0000 | ||
4 | Subject: [PATCH 08/30] dm3730: enable dpll5 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | which is used to provide 120MHz to USB EHCI | ||
10 | This allows EHCI to work on BeagleBoard XM | ||
11 | |||
12 | Signed-off-by: Eric Bénard <eric@eukrea.com> | ||
13 | --- | ||
14 | arch/arm/cpu/armv7/omap3/clock.c | 1 + | ||
15 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
16 | |||
17 | diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/cpu/armv7/omap3/clock.c | ||
18 | index 3d38d08..6a9edcf 100644 | ||
19 | --- a/arch/arm/cpu/armv7/omap3/clock.c | ||
20 | +++ b/arch/arm/cpu/armv7/omap3/clock.c | ||
21 | @@ -579,6 +579,7 @@ void prcm_init(void) | ||
22 | |||
23 | dpll3_init_36xx(0, clk_index); | ||
24 | dpll4_init_36xx(0, clk_index); | ||
25 | + dpll5_init_34xx(0, clk_index); | ||
26 | iva_init_36xx(0, clk_index); | ||
27 | mpu_init_36xx(0, clk_index); | ||
28 | |||
29 | -- | ||
30 | 1.6.6.1 | ||
31 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0009-beagleboard-enable-HUB-power-on-XM-boards.patch b/recipes-bsp/u-boot/u-boot/2011.06/0009-beagleboard-enable-HUB-power-on-XM-boards.patch deleted file mode 100644 index 9dfb34bc..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0009-beagleboard-enable-HUB-power-on-XM-boards.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 48f6f945c028a83725ab962cbff5120ac5280cd0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Benard <eric@eukrea.com> | ||
3 | Date: Fri, 17 Jun 2011 09:24:24 +0200 | ||
4 | Subject: [PATCH 09/30] beagleboard: enable HUB power on XM boards | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | LEDA needs to be at level 0 to enable HUB_3V3 | ||
10 | |||
11 | Signed-off-by: Eric Bénard <eric@eukrea.com> | ||
12 | --- | ||
13 | board/ti/beagle/beagle.c | 11 +++++++++-- | ||
14 | 1 files changed, 9 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
17 | index 7768901..a6ce5a8 100644 | ||
18 | --- a/board/ti/beagle/beagle.c | ||
19 | +++ b/board/ti/beagle/beagle.c | ||
20 | @@ -309,8 +309,15 @@ int misc_init_r(void) | ||
21 | setenv(expansion_config.env_var, expansion_config.env_setting); | ||
22 | |||
23 | twl4030_power_init(); | ||
24 | - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); | ||
25 | - | ||
26 | + switch (get_board_revision()) { | ||
27 | + case REVISION_C4: | ||
28 | + case REVISION_XM_C: | ||
29 | + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); | ||
30 | + break; | ||
31 | + default: | ||
32 | + twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); | ||
33 | + break; | ||
34 | + } | ||
35 | /* Set GPIO states before they are made outputs */ | ||
36 | writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, | ||
37 | &gpio6_base->setdataout); | ||
38 | -- | ||
39 | 1.6.6.1 | ||
40 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0010-beagleboard-turn-off-clocks-in-ehci_stop.patch b/recipes-bsp/u-boot/u-boot/2011.06/0010-beagleboard-turn-off-clocks-in-ehci_stop.patch deleted file mode 100644 index a6898aa3..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0010-beagleboard-turn-off-clocks-in-ehci_stop.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 9ae080a8b4f2a580c2bf3fb790fb141e1e618ef7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 09:26:17 +0200 | ||
4 | Subject: [PATCH 10/30] beagleboard: turn off clocks in ehci_stop | ||
5 | |||
6 | This fixes display problems in linux | ||
7 | |||
8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
9 | --- | ||
10 | board/ti/beagle/beagle.c | 6 ++++++ | ||
11 | 1 files changed, 6 insertions(+), 0 deletions(-) | ||
12 | |||
13 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
14 | index a6ce5a8..a290f89 100644 | ||
15 | --- a/board/ti/beagle/beagle.c | ||
16 | +++ b/board/ti/beagle/beagle.c | ||
17 | @@ -363,6 +363,12 @@ int ehci_hcd_stop(void) | ||
18 | pr_debug("Resetting OMAP3 EHCI\n"); | ||
19 | omap_set_gpio_dataout(GPIO_PHY_RESET, 0); | ||
20 | writel(OMAP_UHH_SYSCONFIG_SOFTRESET, OMAP3_UHH_BASE + OMAP_UHH_SYSCONFIG); | ||
21 | + /* disable USB clocks */ | ||
22 | + struct prcm *prcm_base = (struct prcm *)PRCM_BASE; | ||
23 | + sr32(&prcm_base->iclken_usbhost, 0, 1, 0); | ||
24 | + sr32(&prcm_base->fclken_usbhost, 0, 2, 0); | ||
25 | + sr32(&prcm_base->iclken3_core, 2, 1, 0); | ||
26 | + sr32(&prcm_base->fclken3_core, 2, 1, 0); | ||
27 | return 0; | ||
28 | } | ||
29 | |||
30 | -- | ||
31 | 1.6.6.1 | ||
32 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0011-beagleboard-enable-networking.patch b/recipes-bsp/u-boot/u-boot/2011.06/0011-beagleboard-enable-networking.patch deleted file mode 100644 index 1935475d..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0011-beagleboard-enable-networking.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From c3d4be5f60700c3e30f00818211775a2c8398e2f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 09:31:09 +0200 | ||
4 | Subject: [PATCH 11/30] beagleboard: enable networking | ||
5 | |||
6 | --- | ||
7 | include/configs/omap3_beagle.h | 10 ++++++++-- | ||
8 | 1 files changed, 8 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
11 | index d5f98da..2daf06d 100644 | ||
12 | --- a/include/configs/omap3_beagle.h | ||
13 | +++ b/include/configs/omap3_beagle.h | ||
14 | @@ -129,6 +129,10 @@ | ||
15 | #define CONFIG_CMD_USB | ||
16 | #define CONFIG_USB_EHCI | ||
17 | #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 | ||
18 | +#define CONFIG_USB_HOST_ETHER | ||
19 | +#define CONFIG_USB_ETHER_SMSC95XX | ||
20 | + | ||
21 | +#define CONFIG_NET_MULTI | ||
22 | |||
23 | /* commands to include */ | ||
24 | #include <config_cmd_default.h> | ||
25 | @@ -149,13 +153,15 @@ | ||
26 | #define CONFIG_USB_STORAGE /* USB storage support */ | ||
27 | #define CONFIG_CMD_NAND /* NAND support */ | ||
28 | #define CONFIG_CMD_LED /* LED support */ | ||
29 | +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ | ||
30 | +#define CONFIG_CMD_NFS /* NFS support */ | ||
31 | +#define CONFIG_CMD_PING | ||
32 | + | ||
33 | |||
34 | #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ | ||
35 | #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ | ||
36 | #undef CONFIG_CMD_IMI /* iminfo */ | ||
37 | #undef CONFIG_CMD_IMLS /* List all found images */ | ||
38 | -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ | ||
39 | -#undef CONFIG_CMD_NFS /* NFS support */ | ||
40 | |||
41 | #define CONFIG_SYS_NO_FLASH | ||
42 | #define CONFIG_HARD_I2C 1 | ||
43 | -- | ||
44 | 1.6.6.1 | ||
45 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0012-beagleboard-switch-to-ttyO2-as-console.patch b/recipes-bsp/u-boot/u-boot/2011.06/0012-beagleboard-switch-to-ttyO2-as-console.patch deleted file mode 100644 index c25c2ad8..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0012-beagleboard-switch-to-ttyO2-as-console.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 04a20a72599d016785d751381fb1ea5112fb0de8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 09:32:17 +0200 | ||
4 | Subject: [PATCH 12/30] beagleboard: switch to ttyO2 as console | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 2daf06d..9a161cf 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -206,7 +206,7 @@ | ||
16 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
17 | "loadaddr=0x82000000\0" \ | ||
18 | "usbtty=cdc_acm\0" \ | ||
19 | - "console=ttyS2,115200n8\0" \ | ||
20 | + "console=ttyO2,115200n8\0" \ | ||
21 | "mpurate=auto\0" \ | ||
22 | "buddy=none "\ | ||
23 | "vram=12M\0" \ | ||
24 | -- | ||
25 | 1.6.6.1 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0013-beagleboard-load-kernel-from-MMC-ext-not-FAT.patch b/recipes-bsp/u-boot/u-boot/2011.06/0013-beagleboard-load-kernel-from-MMC-ext-not-FAT.patch deleted file mode 100644 index 28005be2..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0013-beagleboard-load-kernel-from-MMC-ext-not-FAT.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From 91da655eb768b52d085fac42648e6bcf342a1f7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 09:33:03 +0200 | ||
4 | Subject: [PATCH 13/30] beagleboard: load kernel from MMC ext, not FAT | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 3 ++- | ||
9 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 9a161cf..dbb77fb 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -246,7 +246,8 @@ | ||
16 | "root=${ramroot} " \ | ||
17 | "rootfstype=${ramrootfstype}\0" \ | ||
18 | "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ | ||
19 | - "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
20 | + "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
21 | + "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ | ||
22 | "mmcboot=echo Booting from mmc ...; " \ | ||
23 | "run mmcargs; " \ | ||
24 | "bootm ${loadaddr}\0" \ | ||
25 | -- | ||
26 | 1.6.6.1 | ||
27 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0014-beagleboard-enable-asix-driver-and-dhcp.patch b/recipes-bsp/u-boot/u-boot/2011.06/0014-beagleboard-enable-asix-driver-and-dhcp.patch deleted file mode 100644 index b14d227c..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0014-beagleboard-enable-asix-driver-and-dhcp.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From b8f56a9f7ab18641dd0f4529333b00918d34c95d Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 09:47:08 +0200 | ||
4 | Subject: [PATCH 14/30] beagleboard: enable asix driver and dhcp | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 3 ++- | ||
9 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index dbb77fb..49e9dd3 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -131,6 +131,7 @@ | ||
16 | #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 | ||
17 | #define CONFIG_USB_HOST_ETHER | ||
18 | #define CONFIG_USB_ETHER_SMSC95XX | ||
19 | +#define CONFIG_USB_ETHER_ASIX | ||
20 | |||
21 | #define CONFIG_NET_MULTI | ||
22 | |||
23 | @@ -156,7 +157,7 @@ | ||
24 | #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ | ||
25 | #define CONFIG_CMD_NFS /* NFS support */ | ||
26 | #define CONFIG_CMD_PING | ||
27 | - | ||
28 | +#define CONFIG_CMD_DHCP | ||
29 | |||
30 | #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ | ||
31 | #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ | ||
32 | -- | ||
33 | 1.6.6.1 | ||
34 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0015-beagleboard-hardcode-MAC-for-onboard-SMSC-and-use-uI.patch b/recipes-bsp/u-boot/u-boot/2011.06/0015-beagleboard-hardcode-MAC-for-onboard-SMSC-and-use-uI.patch deleted file mode 100644 index 56053db6..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0015-beagleboard-hardcode-MAC-for-onboard-SMSC-and-use-uI.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 2a713d6b62248a18ee798d08bbc7850accfc2e83 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 10:02:21 +0200 | ||
4 | Subject: [PATCH 15/30] beagleboard: hardcode MAC for onboard SMSC and use uImage.beagle fot tftp | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 2 ++ | ||
9 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 49e9dd3..894a071 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -207,6 +207,8 @@ | ||
16 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
17 | "loadaddr=0x82000000\0" \ | ||
18 | "usbtty=cdc_acm\0" \ | ||
19 | + "usbethaddr=de:ad:be:ef\0" \ | ||
20 | + "bootfile=uImage.beagle\0" \ | ||
21 | "console=ttyO2,115200n8\0" \ | ||
22 | "mpurate=auto\0" \ | ||
23 | "buddy=none "\ | ||
24 | -- | ||
25 | 1.6.6.1 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0016-beagleboard-decrease-bootdelay-to-2-seconds.patch b/recipes-bsp/u-boot/u-boot/2011.06/0016-beagleboard-decrease-bootdelay-to-2-seconds.patch deleted file mode 100644 index 0e56fc41..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0016-beagleboard-decrease-bootdelay-to-2-seconds.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From ea8ed1da87f4612bdcbc611e6d4ccb9b7ea4d2ff Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 17 Jun 2011 10:03:06 +0200 | ||
4 | Subject: [PATCH 16/30] beagleboard: decrease bootdelay to 2 seconds | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 894a071..5c32265 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -202,7 +202,7 @@ | ||
16 | /* partition */ | ||
17 | |||
18 | /* Environment information */ | ||
19 | -#define CONFIG_BOOTDELAY 10 | ||
20 | +#define CONFIG_BOOTDELAY 2 | ||
21 | |||
22 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
23 | "loadaddr=0x82000000\0" \ | ||
24 | -- | ||
25 | 1.6.6.1 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0017-USB-Remove-__attribute__-packed-for-struct-ehci_hccr.patch b/recipes-bsp/u-boot/u-boot/2011.06/0017-USB-Remove-__attribute__-packed-for-struct-ehci_hccr.patch deleted file mode 100644 index 43312c96..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0017-USB-Remove-__attribute__-packed-for-struct-ehci_hccr.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 4099bd50da694cc35c489547ad0d8a30bd99006a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Wed, 20 Apr 2011 08:54:16 -0500 | ||
4 | Subject: [PATCH 17/30] USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor | ||
5 | |||
6 | Remove __attribute__ ((packed)) to prevent byte access to soc | ||
7 | registers in some gcc versions. | ||
8 | |||
9 | Having patches to enable ehci for the BeagleBoard lying around for | ||
10 | several month, this one was the show-stopper. | ||
11 | |||
12 | Credits have to go to Laine Walker-Avina <lwalkera@ieee.org> for | ||
13 | finding the problem. | ||
14 | |||
15 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
16 | Cc: Alexander Holler <holler@ahsoftware.de> | ||
17 | Cc: Sandeep Paulraj <s-paulraj@ti.com> | ||
18 | --- | ||
19 | Changes for v2: | ||
20 | * Original and v2 were provided by Alexander Holler. | ||
21 | * v1 was http://patchwork.ozlabs.org/patch/89358/ | ||
22 | * v2 was http://patchwork.ozlabs.org/patch/89362/ | ||
23 | |||
24 | Changes for v3: | ||
25 | * Switched to align(4), rather than remove the attribute, per suggestion | ||
26 | from Alexander. | ||
27 | |||
28 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
29 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
30 | --- | ||
31 | drivers/usb/host/ehci.h | 4 ++-- | ||
32 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
33 | |||
34 | diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h | ||
35 | index 945ab64..3d0ad0c 100644 | ||
36 | --- a/drivers/usb/host/ehci.h | ||
37 | +++ b/drivers/usb/host/ehci.h | ||
38 | @@ -55,7 +55,7 @@ struct ehci_hccr { | ||
39 | #define HCS_N_PORTS(p) (((p) >> 0) & 0xf) | ||
40 | uint32_t cr_hccparams; | ||
41 | uint8_t cr_hcsp_portrt[8]; | ||
42 | -} __attribute__ ((packed)); | ||
43 | +} __attribute__ ((packed, aligned(4))); | ||
44 | |||
45 | struct ehci_hcor { | ||
46 | uint32_t or_usbcmd; | ||
47 | @@ -85,7 +85,7 @@ struct ehci_hcor { | ||
48 | #define FLAG_CF (1 << 0) /* true: we'll support "high speed" */ | ||
49 | uint32_t or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS]; | ||
50 | uint32_t or_systune; | ||
51 | -} __attribute__ ((packed)); | ||
52 | +} __attribute__ ((packed, aligned(4))); | ||
53 | |||
54 | #define USBMODE 0x68 /* USB Device mode */ | ||
55 | #define USBMODE_SDIS (1 << 3) /* Stream disable */ | ||
56 | -- | ||
57 | 1.6.6.1 | ||
58 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0018-usb-Some-EHCI-chipsets-are-slow-to-respond.patch b/recipes-bsp/u-boot/u-boot/2011.06/0018-usb-Some-EHCI-chipsets-are-slow-to-respond.patch deleted file mode 100644 index 21a1db7a..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0018-usb-Some-EHCI-chipsets-are-slow-to-respond.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 7378bf55a895a957a5ea31c5fac5b53a844778d2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Cooper <u-boot@lakedaemon.net> | ||
3 | Date: Tue, 14 Jun 2011 05:58:12 +0000 | ||
4 | Subject: [PATCH 18/30] usb: Some EHCI chipsets are slow to respond. | ||
5 | |||
6 | This fixes 'EHCI timed out on TD...' on the dreamplug board. | ||
7 | |||
8 | Signed-off-by: Jason Cooper <u-boot@lakedaemon.net> | ||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | --- | ||
11 | include/usb.h | 2 +- | ||
12 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/include/usb.h b/include/usb.h | ||
15 | index 53603a5..168e2b2 100644 | ||
16 | --- a/include/usb.h | ||
17 | +++ b/include/usb.h | ||
18 | @@ -46,7 +46,7 @@ | ||
19 | * This is the timeout to allow for submitting an urb in ms. We allow more | ||
20 | * time for a BULK device to react - some are slow. | ||
21 | */ | ||
22 | -#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 100) | ||
23 | +#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 500) | ||
24 | |||
25 | /* device request (setup) */ | ||
26 | struct devrequest { | ||
27 | -- | ||
28 | 1.6.6.1 | ||
29 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0019-OMAP3-Add-DSS-driver-for-OMAP3.patch b/recipes-bsp/u-boot/u-boot/2011.06/0019-OMAP3-Add-DSS-driver-for-OMAP3.patch deleted file mode 100644 index b8df7d72..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0019-OMAP3-Add-DSS-driver-for-OMAP3.patch +++ /dev/null | |||
@@ -1,349 +0,0 @@ | |||
1 | From e6e189b6062f7af6b993420b9de9656e36739e66 Mon Sep 17 00:00:00 2001 | ||
2 | From: Syed Mohammed Khasim <khasim@ti.com> | ||
3 | Date: Tue, 12 Jan 2010 23:57:28 +0530 | ||
4 | Subject: [PATCH 19/30] OMAP3: Add DSS driver for OMAP3 | ||
5 | |||
6 | Supports dynamic panel configuration | ||
7 | Supports dynamic tv standard selection | ||
8 | Adds support for DSS register access through generic APIs | ||
9 | |||
10 | Incorporated DSS register access using structures. | ||
11 | |||
12 | Previous discussions are here | ||
13 | http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html | ||
14 | --- | ||
15 | v2 updates: | ||
16 | * Enable panel output for BeagleBoard | ||
17 | * BeagleBoard: Update DVI-D orange screen frequencies for xM | ||
18 | |||
19 | v3 updates: | ||
20 | * Remove non-platform (OMAP3) updates | ||
21 | |||
22 | Signed-off-by: Syed Mohammed Khasim <khasim@ti.com> | ||
23 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
24 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
25 | --- | ||
26 | arch/arm/include/asm/arch-omap3/dss.h | 173 +++++++++++++++++++++++++++++++++ | ||
27 | drivers/video/omap3_dss.c | 130 +++++++++++++++++++++++++ | ||
28 | 2 files changed, 303 insertions(+), 0 deletions(-) | ||
29 | create mode 100644 arch/arm/include/asm/arch-omap3/dss.h | ||
30 | create mode 100644 drivers/video/omap3_dss.c | ||
31 | |||
32 | diff --git a/arch/arm/include/asm/arch-omap3/dss.h b/arch/arm/include/asm/arch-omap3/dss.h | ||
33 | new file mode 100644 | ||
34 | index 0000000..e5e3b0d | ||
35 | --- /dev/null | ||
36 | +++ b/arch/arm/include/asm/arch-omap3/dss.h | ||
37 | @@ -0,0 +1,173 @@ | ||
38 | +/* | ||
39 | + * (C) Copyright 2010 | ||
40 | + * Texas Instruments, <www.ti.com> | ||
41 | + * Syed Mohammed Khasim <khasim@ti.com> | ||
42 | + * | ||
43 | + * Referred to Linux DSS driver files for OMAP3 | ||
44 | + * | ||
45 | + * See file CREDITS for list of people who contributed to this | ||
46 | + * project. | ||
47 | + * | ||
48 | + * This program is free software; you can redistribute it and/or | ||
49 | + * modify it under the terms of the GNU General Public License as | ||
50 | + * published by the Free Software Foundation's version 2 of | ||
51 | + * the License. | ||
52 | + * | ||
53 | + * This program is distributed in the hope that it will be useful, | ||
54 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
55 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
56 | + * GNU General Public License for more details. | ||
57 | + * | ||
58 | + * You should have received a copy of the GNU General Public License | ||
59 | + * along with this program; if not, write to the Free Software | ||
60 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
61 | + * MA 02111-1307 USA | ||
62 | + */ | ||
63 | + | ||
64 | +#ifndef DSS_H | ||
65 | +#define DSS_H | ||
66 | + | ||
67 | +/* | ||
68 | + * DSS Base Registers | ||
69 | + */ | ||
70 | +#define OMAP3_DSS_BASE 0x48050040 | ||
71 | +#define OMAP3_DISPC_BASE 0x48050440 | ||
72 | +#define OMAP3_VENC_BASE 0x48050C00 | ||
73 | + | ||
74 | +/* DSS Registers */ | ||
75 | +struct dss_regs { | ||
76 | + u32 control; /* 0x40 */ | ||
77 | + u32 sdi_control; /* 0x44 */ | ||
78 | + u32 pll_control; /* 0x48 */ | ||
79 | +}; | ||
80 | + | ||
81 | +/* DISPC Registers */ | ||
82 | +struct dispc_regs { | ||
83 | + u32 control; /* 0x40 */ | ||
84 | + u32 config; /* 0x44 */ | ||
85 | + u32 reserve_2; /* 0x48 */ | ||
86 | + u32 default_color0; /* 0x4C */ | ||
87 | + u32 default_color1; /* 0x50 */ | ||
88 | + u32 trans_color0; /* 0x54 */ | ||
89 | + u32 trans_color1; /* 0x58 */ | ||
90 | + u32 line_status; /* 0x5C */ | ||
91 | + u32 line_number; /* 0x60 */ | ||
92 | + u32 timing_h; /* 0x64 */ | ||
93 | + u32 timing_v; /* 0x68 */ | ||
94 | + u32 pol_freq; /* 0x6C */ | ||
95 | + u32 divisor; /* 0x70 */ | ||
96 | + u32 global_alpha; /* 0x74 */ | ||
97 | + u32 size_dig; /* 0x78 */ | ||
98 | + u32 size_lcd; /* 0x7C */ | ||
99 | +}; | ||
100 | + | ||
101 | +/* VENC Registers */ | ||
102 | +struct venc_regs { | ||
103 | + u32 rev_id; /* 0x00 */ | ||
104 | + u32 status; /* 0x04 */ | ||
105 | + u32 f_control; /* 0x08 */ | ||
106 | + u32 reserve_1; /* 0x0C */ | ||
107 | + u32 vidout_ctrl; /* 0x10 */ | ||
108 | + u32 sync_ctrl; /* 0x14 */ | ||
109 | + u32 reserve_2; /* 0x18 */ | ||
110 | + u32 llen; /* 0x1C */ | ||
111 | + u32 flens; /* 0x20 */ | ||
112 | + u32 hfltr_ctrl; /* 0x24 */ | ||
113 | + u32 cc_carr_wss_carr; /* 0x28 */ | ||
114 | + u32 c_phase; /* 0x2C */ | ||
115 | + u32 gain_u; /* 0x30 */ | ||
116 | + u32 gain_v; /* 0x34 */ | ||
117 | + u32 gain_y; /* 0x38 */ | ||
118 | + u32 black_level; /* 0x3C */ | ||
119 | + u32 blank_level; /* 0x40 */ | ||
120 | + u32 x_color; /* 0x44 */ | ||
121 | + u32 m_control; /* 0x48 */ | ||
122 | + u32 bstamp_wss_data; /* 0x4C */ | ||
123 | + u32 s_carr; /* 0x50 */ | ||
124 | + u32 line21; /* 0x54 */ | ||
125 | + u32 ln_sel; /* 0x58 */ | ||
126 | + u32 l21__wc_ctl; /* 0x5C */ | ||
127 | + u32 htrigger_vtrigger; /* 0x60 */ | ||
128 | + u32 savid__eavid; /* 0x64 */ | ||
129 | + u32 flen__fal; /* 0x68 */ | ||
130 | + u32 lal__phase_reset; /* 0x6C */ | ||
131 | + u32 hs_int_start_stop_x; /* 0x70 */ | ||
132 | + u32 hs_ext_start_stop_x; /* 0x74 */ | ||
133 | + u32 vs_int_start_x; /* 0x78 */ | ||
134 | + u32 vs_int_stop_x__vs_int_start_y; /* 0x7C */ | ||
135 | + u32 vs_int_stop_y__vs_ext_start_x; /* 0x80 */ | ||
136 | + u32 vs_ext_stop_x__vs_ext_start_y; /* 0x84 */ | ||
137 | + u32 vs_ext_stop_y; /* 0x88 */ | ||
138 | + u32 reserve_3; /* 0x8C */ | ||
139 | + u32 avid_start_stop_x; /* 0x90 */ | ||
140 | + u32 avid_start_stop_y; /* 0x94 */ | ||
141 | + u32 reserve_4; /* 0x98 */ | ||
142 | + u32 reserve_5; /* 0x9C */ | ||
143 | + u32 fid_int_start_x__fid_int_start_y; /* 0xA0 */ | ||
144 | + u32 fid_int_offset_y__fid_ext_start_x; /* 0xA4 */ | ||
145 | + u32 fid_ext_start_y__fid_ext_offset_y; /* 0xA8 */ | ||
146 | + u32 reserve_6; /* 0xAC */ | ||
147 | + u32 tvdetgp_int_start_stop_x; /* 0xB0 */ | ||
148 | + u32 tvdetgp_int_start_stop_y; /* 0xB4 */ | ||
149 | + u32 gen_ctrl; /* 0xB8 */ | ||
150 | + u32 reserve_7; /* 0xBC */ | ||
151 | + u32 reserve_8; /* 0xC0 */ | ||
152 | + u32 output_control; /* 0xC4 */ | ||
153 | + u32 dac_b__dac_c; /* 0xC8 */ | ||
154 | + u32 height_width; /* 0xCC */ | ||
155 | +}; | ||
156 | + | ||
157 | +/* Few Register Offsets */ | ||
158 | +#define FRAME_MODE_SHIFT 1 | ||
159 | +#define TFTSTN_SHIFT 3 | ||
160 | +#define DATALINES_SHIFT 8 | ||
161 | + | ||
162 | +/* Enabling Display controller */ | ||
163 | +#define LCD_ENABLE 1 | ||
164 | +#define DIG_ENABLE (1 << 1) | ||
165 | +#define GO_LCD (1 << 5) | ||
166 | +#define GO_DIG (1 << 6) | ||
167 | +#define GP_OUT0 (1 << 15) | ||
168 | +#define GP_OUT1 (1 << 16) | ||
169 | + | ||
170 | +#define DISPC_ENABLE (LCD_ENABLE | \ | ||
171 | + DIG_ENABLE | \ | ||
172 | + GO_LCD | \ | ||
173 | + GO_DIG | \ | ||
174 | + GP_OUT0| \ | ||
175 | + GP_OUT1) | ||
176 | + | ||
177 | +/* Configure VENC DSS Params */ | ||
178 | +#define VENC_CLK_ENABLE (1 << 3) | ||
179 | +#define DAC_DEMEN (1 << 4) | ||
180 | +#define DAC_POWERDN (1 << 5) | ||
181 | +#define VENC_OUT_SEL (1 << 6) | ||
182 | +#define DIG_LPP_SHIFT 16 | ||
183 | +#define VENC_DSS_CONFIG (VENC_CLK_ENABLE | \ | ||
184 | + DAC_DEMEN | \ | ||
185 | + DAC_POWERDN | \ | ||
186 | + VENC_OUT_SEL) | ||
187 | +/* | ||
188 | + * Panel Configuration | ||
189 | + */ | ||
190 | +struct panel_config { | ||
191 | + u32 timing_h; | ||
192 | + u32 timing_v; | ||
193 | + u32 pol_freq; | ||
194 | + u32 divisor; | ||
195 | + u32 lcd_size; | ||
196 | + u32 panel_type; | ||
197 | + u32 data_lines; | ||
198 | + u32 load_mode; | ||
199 | + u32 panel_color; | ||
200 | +}; | ||
201 | + | ||
202 | +/* | ||
203 | + * Generic DSS Functions | ||
204 | + */ | ||
205 | +void omap3_dss_venc_config(const struct venc_regs *venc_cfg, | ||
206 | + u32 height, u32 width); | ||
207 | +void omap3_dss_panel_config(const struct panel_config *panel_cfg); | ||
208 | +void omap3_dss_enable(void); | ||
209 | + | ||
210 | +#endif /* DSS_H */ | ||
211 | diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c | ||
212 | new file mode 100644 | ||
213 | index 0000000..69c705a | ||
214 | --- /dev/null | ||
215 | +++ b/drivers/video/omap3_dss.c | ||
216 | @@ -0,0 +1,130 @@ | ||
217 | +/* | ||
218 | + * (C) Copyright 2010 | ||
219 | + * Texas Instruments, <www.ti.com> | ||
220 | + * Syed Mohammed Khasim <khasim@ti.com> | ||
221 | + * | ||
222 | + * Referred to Linux DSS driver files for OMAP3 | ||
223 | + * | ||
224 | + * See file CREDITS for list of people who contributed to this | ||
225 | + * project. | ||
226 | + * | ||
227 | + * This program is free software; you can redistribute it and/or | ||
228 | + * modify it under the terms of the GNU General Public License as | ||
229 | + * published by the Free Software Foundation's version 2 of | ||
230 | + * the License. | ||
231 | + * | ||
232 | + * This program is distributed in the hope that it will be useful, | ||
233 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
234 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
235 | + * GNU General Public License for more details. | ||
236 | + * | ||
237 | + * You should have received a copy of the GNU General Public License | ||
238 | + * along with this program; if not, write to the Free Software | ||
239 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
240 | + * MA 02111-1307 USA | ||
241 | + */ | ||
242 | + | ||
243 | +#include <common.h> | ||
244 | +#include <asm/io.h> | ||
245 | +#include <asm/arch/dss.h> | ||
246 | + | ||
247 | +/* | ||
248 | + * Configure VENC for a given Mode (NTSC / PAL) | ||
249 | + */ | ||
250 | +void omap3_dss_venc_config(const struct venc_regs *venc_cfg, | ||
251 | + u32 height, u32 width) | ||
252 | +{ | ||
253 | + struct venc_regs *venc = (struct venc_regs *) OMAP3_VENC_BASE; | ||
254 | + struct dss_regs *dss = (struct dss_regs *) OMAP3_DSS_BASE; | ||
255 | + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; | ||
256 | + | ||
257 | + writel(venc_cfg->status, &venc->status); | ||
258 | + writel(venc_cfg->f_control, &venc->f_control); | ||
259 | + writel(venc_cfg->vidout_ctrl, &venc->vidout_ctrl); | ||
260 | + writel(venc_cfg->sync_ctrl, &venc->sync_ctrl); | ||
261 | + writel(venc_cfg->llen, &venc->llen); | ||
262 | + writel(venc_cfg->flens, &venc->flens); | ||
263 | + writel(venc_cfg->hfltr_ctrl, &venc->hfltr_ctrl); | ||
264 | + writel(venc_cfg->cc_carr_wss_carr, &venc->cc_carr_wss_carr); | ||
265 | + writel(venc_cfg->c_phase, &venc->c_phase); | ||
266 | + writel(venc_cfg->gain_u, &venc->gain_u); | ||
267 | + writel(venc_cfg->gain_v, &venc->gain_v); | ||
268 | + writel(venc_cfg->gain_y, &venc->gain_y); | ||
269 | + writel(venc_cfg->black_level, &venc->black_level); | ||
270 | + writel(venc_cfg->blank_level, &venc->blank_level); | ||
271 | + writel(venc_cfg->x_color, &venc->x_color); | ||
272 | + writel(venc_cfg->m_control, &venc->m_control); | ||
273 | + writel(venc_cfg->bstamp_wss_data, &venc->bstamp_wss_data); | ||
274 | + writel(venc_cfg->s_carr, &venc->s_carr); | ||
275 | + writel(venc_cfg->line21, &venc->line21); | ||
276 | + writel(venc_cfg->ln_sel, &venc->ln_sel); | ||
277 | + writel(venc_cfg->l21__wc_ctl, &venc->l21__wc_ctl); | ||
278 | + writel(venc_cfg->htrigger_vtrigger, &venc->htrigger_vtrigger); | ||
279 | + writel(venc_cfg->savid__eavid, &venc->savid__eavid); | ||
280 | + writel(venc_cfg->flen__fal, &venc->flen__fal); | ||
281 | + writel(venc_cfg->lal__phase_reset, &venc->lal__phase_reset); | ||
282 | + writel(venc_cfg->hs_int_start_stop_x, | ||
283 | + &venc->hs_int_start_stop_x); | ||
284 | + writel(venc_cfg->hs_ext_start_stop_x, | ||
285 | + &venc->hs_ext_start_stop_x); | ||
286 | + writel(venc_cfg->vs_int_start_x, &venc->vs_int_start_x); | ||
287 | + writel(venc_cfg->vs_int_stop_x__vs_int_start_y, | ||
288 | + &venc->vs_int_stop_x__vs_int_start_y); | ||
289 | + writel(venc_cfg->vs_int_stop_y__vs_ext_start_x, | ||
290 | + &venc->vs_int_stop_y__vs_ext_start_x); | ||
291 | + writel(venc_cfg->vs_ext_stop_x__vs_ext_start_y, | ||
292 | + &venc->vs_ext_stop_x__vs_ext_start_y); | ||
293 | + writel(venc_cfg->vs_ext_stop_y, &venc->vs_ext_stop_y); | ||
294 | + writel(venc_cfg->avid_start_stop_x, &venc->avid_start_stop_x); | ||
295 | + writel(venc_cfg->avid_start_stop_y, &venc->avid_start_stop_y); | ||
296 | + writel(venc_cfg->fid_int_start_x__fid_int_start_y, | ||
297 | + &venc->fid_int_start_x__fid_int_start_y); | ||
298 | + writel(venc_cfg->fid_int_offset_y__fid_ext_start_x, | ||
299 | + &venc->fid_int_offset_y__fid_ext_start_x); | ||
300 | + writel(venc_cfg->fid_ext_start_y__fid_ext_offset_y, | ||
301 | + &venc->fid_ext_start_y__fid_ext_offset_y); | ||
302 | + writel(venc_cfg->tvdetgp_int_start_stop_x, | ||
303 | + &venc->tvdetgp_int_start_stop_x); | ||
304 | + writel(venc_cfg->tvdetgp_int_start_stop_y, | ||
305 | + &venc->tvdetgp_int_start_stop_y); | ||
306 | + writel(venc_cfg->gen_ctrl, &venc->gen_ctrl); | ||
307 | + writel(venc_cfg->output_control, &venc->output_control); | ||
308 | + writel(venc_cfg->dac_b__dac_c, &venc->dac_b__dac_c); | ||
309 | + | ||
310 | + /* Configure DSS for VENC Settings */ | ||
311 | + writel(VENC_DSS_CONFIG, &dss->control); | ||
312 | + | ||
313 | + /* Configure height and width for Digital out */ | ||
314 | + writel(((height << DIG_LPP_SHIFT) | width), &dispc->size_dig); | ||
315 | +} | ||
316 | + | ||
317 | +/* | ||
318 | + * Configure Panel Specific Parameters | ||
319 | + */ | ||
320 | +void omap3_dss_panel_config(const struct panel_config *panel_cfg) | ||
321 | +{ | ||
322 | + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; | ||
323 | + | ||
324 | + writel(panel_cfg->timing_h, &dispc->timing_h); | ||
325 | + writel(panel_cfg->timing_v, &dispc->timing_v); | ||
326 | + writel(panel_cfg->pol_freq, &dispc->pol_freq); | ||
327 | + writel(panel_cfg->divisor, &dispc->divisor); | ||
328 | + writel(panel_cfg->lcd_size, &dispc->size_lcd); | ||
329 | + writel((panel_cfg->load_mode << FRAME_MODE_SHIFT), &dispc->config); | ||
330 | + writel(((panel_cfg->panel_type << TFTSTN_SHIFT) | | ||
331 | + (panel_cfg->data_lines << DATALINES_SHIFT)), &dispc->control); | ||
332 | + writel(panel_cfg->panel_color, &dispc->default_color0); | ||
333 | +} | ||
334 | + | ||
335 | +/* | ||
336 | + * Enable LCD and DIGITAL OUT in DSS | ||
337 | + */ | ||
338 | +void omap3_dss_enable(void) | ||
339 | +{ | ||
340 | + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; | ||
341 | + u32 l = 0; | ||
342 | + | ||
343 | + l = readl(&dispc->control); | ||
344 | + l |= DISPC_ENABLE; | ||
345 | + writel(l, &dispc->control); | ||
346 | +} | ||
347 | -- | ||
348 | 1.6.6.1 | ||
349 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0020-video-DSS-makefile-update.patch b/recipes-bsp/u-boot/u-boot/2011.06/0020-video-DSS-makefile-update.patch deleted file mode 100644 index 045ebf6f..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0020-video-DSS-makefile-update.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From ce6813c7f4006331dd661cd25178bb258d1e9469 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 19 Apr 2011 14:00:34 -0500 | ||
4 | Subject: [PATCH 20/30] video: DSS makefile update | ||
5 | |||
6 | Adding the OMAP3 DSS video driver to the Makefile. The patch applied to | ||
7 | u-boot-ti didn't include this for some reason. | ||
8 | |||
9 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
10 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
11 | --- | ||
12 | drivers/video/Makefile | 2 ++ | ||
13 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
14 | |||
15 | diff --git a/drivers/video/Makefile b/drivers/video/Makefile | ||
16 | index 086dc05..226684a 100644 | ||
17 | --- a/drivers/video/Makefile | ||
18 | +++ b/drivers/video/Makefile | ||
19 | @@ -41,6 +41,8 @@ COBJS-$(CONFIG_SED156X) += sed156x.o | ||
20 | COBJS-$(CONFIG_VIDEO_SM501) += sm501.o | ||
21 | COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o | ||
22 | COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o | ||
23 | +COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o | ||
24 | +COBJS-y += videomodes.o | ||
25 | |||
26 | COBJS := $(COBJS-y) | ||
27 | SRCS := $(COBJS:.o=.c) | ||
28 | -- | ||
29 | 1.6.6.1 | ||
30 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0021-BeagleBoard-Configure-DVI-S-video.patch b/recipes-bsp/u-boot/u-boot/2011.06/0021-BeagleBoard-Configure-DVI-S-video.patch deleted file mode 100644 index f8ab5a18..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0021-BeagleBoard-Configure-DVI-S-video.patch +++ /dev/null | |||
@@ -1,170 +0,0 @@ | |||
1 | From ebabfd9f1e6f712aafc2bba5ddfae530be4119ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 19 Apr 2011 14:01:13 -0500 | ||
4 | Subject: [PATCH 21/30] BeagleBoard: Configure DVI/S-video | ||
5 | |||
6 | Based on patches from Syed Mohammed Khasim (khasim@ti.com). | ||
7 | |||
8 | Configures the output of the BeagleBoard DVI to be orange. | ||
9 | Configures the output of the BeagleBoard S-Video to be a colorbar. | ||
10 | --- | ||
11 | Updates for this version | ||
12 | * Rebased on u-boot-ti. | ||
13 | |||
14 | v3 | ||
15 | * Rebased again. | ||
16 | |||
17 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
18 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
19 | --- | ||
20 | board/ti/beagle/beagle.c | 24 +++++++++++++ | ||
21 | board/ti/beagle/beagle.h | 86 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
22 | 2 files changed, 110 insertions(+), 0 deletions(-) | ||
23 | |||
24 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
25 | index a290f89..39d9038 100644 | ||
26 | --- a/board/ti/beagle/beagle.c | ||
27 | +++ b/board/ti/beagle/beagle.c | ||
28 | @@ -164,6 +164,28 @@ unsigned int get_expansion_id(void) | ||
29 | } | ||
30 | |||
31 | /* | ||
32 | + * Configure DSS to display background color on DVID | ||
33 | + * Configure VENC to display color bar on S-Video | ||
34 | + */ | ||
35 | +void display_init(void) | ||
36 | +{ | ||
37 | + omap3_dss_venc_config(&venc_config_std_tv, VENC_HEIGHT, VENC_WIDTH); | ||
38 | + switch (get_board_revision()) { | ||
39 | + case REVISION_AXBX: | ||
40 | + case REVISION_CX: | ||
41 | + case REVISION_C4: | ||
42 | + omap3_dss_panel_config(&dvid_cfg); | ||
43 | + break; | ||
44 | + case REVISION_XM_A: | ||
45 | + case REVISION_XM_B: | ||
46 | + case REVISION_XM_C: | ||
47 | + default: | ||
48 | + omap3_dss_panel_config(&dvid_cfg_xm); | ||
49 | + break; | ||
50 | + } | ||
51 | +} | ||
52 | + | ||
53 | +/* | ||
54 | * Routine: misc_init_r | ||
55 | * Description: Configure board specific parts | ||
56 | */ | ||
57 | @@ -330,6 +352,8 @@ int misc_init_r(void) | ||
58 | GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); | ||
59 | |||
60 | dieid_num_r(); | ||
61 | + display_init(); | ||
62 | + omap3_dss_enable(); | ||
63 | |||
64 | return 0; | ||
65 | } | ||
66 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
67 | index 04247cd..18bfaa8 100644 | ||
68 | --- a/board/ti/beagle/beagle.h | ||
69 | +++ b/board/ti/beagle/beagle.h | ||
70 | @@ -23,6 +23,8 @@ | ||
71 | #ifndef _BEAGLE_H_ | ||
72 | #define _BEAGLE_H_ | ||
73 | |||
74 | +#include <asm/arch/dss.h> | ||
75 | + | ||
76 | const omap3_sysinfo sysinfo = { | ||
77 | DDR_STACKED, | ||
78 | "OMAP3 Beagle board", | ||
79 | @@ -472,4 +474,88 @@ const omap3_sysinfo sysinfo = { | ||
80 | MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 BT_EN*/\ | ||
81 | MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/ | ||
82 | |||
83 | +/* | ||
84 | + * Display Configuration | ||
85 | + */ | ||
86 | + | ||
87 | +#define DVI_BEAGLE_ORANGE_COL 0x00FF8000 | ||
88 | +#define VENC_HEIGHT 0x00ef | ||
89 | +#define VENC_WIDTH 0x027f | ||
90 | + | ||
91 | +/* | ||
92 | + * Configure VENC in DSS for Beagle to generate Color Bar | ||
93 | + * | ||
94 | + * Kindly refer to OMAP TRM for definition of these values. | ||
95 | + */ | ||
96 | +static const struct venc_regs venc_config_std_tv = { | ||
97 | + .status = 0x0000001B, | ||
98 | + .f_control = 0x00000040, | ||
99 | + .vidout_ctrl = 0x00000000, | ||
100 | + .sync_ctrl = 0x00008000, | ||
101 | + .llen = 0x00008359, | ||
102 | + .flens = 0x0000020C, | ||
103 | + .hfltr_ctrl = 0x00000000, | ||
104 | + .cc_carr_wss_carr = 0x043F2631, | ||
105 | + .c_phase = 0x00000024, | ||
106 | + .gain_u = 0x00000130, | ||
107 | + .gain_v = 0x00000198, | ||
108 | + .gain_y = 0x000001C0, | ||
109 | + .black_level = 0x0000006A, | ||
110 | + .blank_level = 0x0000005C, | ||
111 | + .x_color = 0x00000000, | ||
112 | + .m_control = 0x00000001, | ||
113 | + .bstamp_wss_data = 0x0000003F, | ||
114 | + .s_carr = 0x21F07C1F, | ||
115 | + .line21 = 0x00000000, | ||
116 | + .ln_sel = 0x00000015, | ||
117 | + .l21__wc_ctl = 0x00001400, | ||
118 | + .htrigger_vtrigger = 0x00000000, | ||
119 | + .savid__eavid = 0x069300F4, | ||
120 | + .flen__fal = 0x0016020C, | ||
121 | + .lal__phase_reset = 0x00060107, | ||
122 | + .hs_int_start_stop_x = 0x008D034E, | ||
123 | + .hs_ext_start_stop_x = 0x000F0359, | ||
124 | + .vs_int_start_x = 0x01A00000, | ||
125 | + .vs_int_stop_x__vs_int_start_y = 0x020501A0, | ||
126 | + .vs_int_stop_y__vs_ext_start_x = 0x01AC0024, | ||
127 | + .vs_ext_stop_x__vs_ext_start_y = 0x020D01AC, | ||
128 | + .vs_ext_stop_y = 0x00000006, | ||
129 | + .avid_start_stop_x = 0x03480079, | ||
130 | + .avid_start_stop_y = 0x02040024, | ||
131 | + .fid_int_start_x__fid_int_start_y = 0x0001008A, | ||
132 | + .fid_int_offset_y__fid_ext_start_x = 0x01AC0106, | ||
133 | + .fid_ext_start_y__fid_ext_offset_y = 0x01060006, | ||
134 | + .tvdetgp_int_start_stop_x = 0x00140001, | ||
135 | + .tvdetgp_int_start_stop_y = 0x00010001, | ||
136 | + .gen_ctrl = 0x00FF0000, | ||
137 | + .output_control = 0x0000000D, | ||
138 | + .dac_b__dac_c = 0x00000000 | ||
139 | +}; | ||
140 | + | ||
141 | +/* | ||
142 | + * Configure Timings for DVI D | ||
143 | + */ | ||
144 | +static const struct panel_config dvid_cfg = { | ||
145 | + .timing_h = 0x0ff03f31, /* Horizantal timing */ | ||
146 | + .timing_v = 0x01400504, /* Vertical timing */ | ||
147 | + .pol_freq = 0x00007028, /* Pol Freq */ | ||
148 | + .divisor = 0x00010006, /* 72Mhz Pixel Clock */ | ||
149 | + .lcd_size = 0x02ff03ff, /* 1024x768 */ | ||
150 | + .panel_type = 0x01, /* TFT */ | ||
151 | + .data_lines = 0x03, /* 24 Bit RGB */ | ||
152 | + .load_mode = 0x02, /* Frame Mode */ | ||
153 | + .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ | ||
154 | +}; | ||
155 | + | ||
156 | +static const struct panel_config dvid_cfg_xm = { | ||
157 | + .timing_h = 0x1a4024c9, /* Horizantal timing */ | ||
158 | + .timing_v = 0x02c00509, /* Vertical timing */ | ||
159 | + .pol_freq = 0x00007028, /* Pol Freq */ | ||
160 | + .divisor = 0x00010001, /* 96MHz Pixel Clock */ | ||
161 | + .lcd_size = 0x02ff03ff, /* 1024x768 */ | ||
162 | + .panel_type = 0x01, /* TFT */ | ||
163 | + .data_lines = 0x03, /* 24 Bit RGB */ | ||
164 | + .load_mode = 0x02, /* Frame Mode */ | ||
165 | + .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ | ||
166 | +}; | ||
167 | #endif | ||
168 | -- | ||
169 | 1.6.6.1 | ||
170 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0022-BeagleBoard-config-enable-DSS.patch b/recipes-bsp/u-boot/u-boot/2011.06/0022-BeagleBoard-config-enable-DSS.patch deleted file mode 100644 index 295d401e..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0022-BeagleBoard-config-enable-DSS.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From 79b347db36d583b0fde360baa780877b3a7ae754 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 21 Jun 2011 22:18:01 +0200 | ||
4 | Subject: [PATCH 22/30] BeagleBoard: config: enable DSS | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 1 + | ||
9 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 5c32265..6c842ad 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -172,6 +172,7 @@ | ||
16 | #define CONFIG_SYS_I2C_BUS_SELECT 1 | ||
17 | #define CONFIG_I2C_MULTI_BUS 1 | ||
18 | #define CONFIG_DRIVER_OMAP34XX_I2C 1 | ||
19 | +#define CONFIG_VIDEO_OMAP3 /* DSS Support */ | ||
20 | |||
21 | /* | ||
22 | * TWL4030 | ||
23 | -- | ||
24 | 1.6.6.1 | ||
25 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0023-BeagleBoard-Added-userbutton-command.patch b/recipes-bsp/u-boot/u-boot/2011.06/0023-BeagleBoard-Added-userbutton-command.patch deleted file mode 100644 index 4f91cebf..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0023-BeagleBoard-Added-userbutton-command.patch +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | From b6082310a74ef48b8c2c4c67092896563141a4ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Wed, 21 Jul 2010 07:41:25 -0500 | ||
4 | Subject: [PATCH 23/30] BeagleBoard: Added userbutton command | ||
5 | |||
6 | Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072 | ||
7 | Author: Greg Turner <gregturner@ti.com> | ||
8 | Date: Tue May 25 09:19:06 2010 -0500 | ||
9 | |||
10 | New u-boot command for status of USER button on BeagleBoard-xM | ||
11 | |||
12 | Modified bootcmd to check the staus at boot time and set | ||
13 | filename of the boot script. | ||
14 | |||
15 | * Moved to a BeagleBoard specific file. | ||
16 | * Removed changes to default boot command from adding userbutton | ||
17 | command. | ||
18 | * Made to handle pre-xM boards. | ||
19 | * Flipped polarity of the return value to avoid confusion. Success (0) | ||
20 | is when the button is pressed. Failure (1) is when the button is NOT | ||
21 | pressed. | ||
22 | * Used latest revision getting function. | ||
23 | * Used latest macros for board revision. | ||
24 | -- | ||
25 | v2 update: | ||
26 | * Added xM-C revision definition (optional, since it was default) | ||
27 | |||
28 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
29 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
30 | --- | ||
31 | board/ti/beagle/beagle.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
32 | 1 files changed, 56 insertions(+), 0 deletions(-) | ||
33 | |||
34 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
35 | index 39d9038..4798194 100644 | ||
36 | --- a/board/ti/beagle/beagle.c | ||
37 | +++ b/board/ti/beagle/beagle.c | ||
38 | @@ -50,6 +50,7 @@ extern struct ehci_hccr *hccr; | ||
39 | extern volatile struct ehci_hcor *hcor; | ||
40 | #endif | ||
41 | #include "beagle.h" | ||
42 | +#include <command.h> | ||
43 | |||
44 | #define pr_debug(fmt, args...) debug(fmt, ##args) | ||
45 | |||
46 | @@ -477,3 +478,58 @@ int ehci_hcd_init(void) | ||
47 | } | ||
48 | |||
49 | #endif /* CONFIG_USB_EHCI */ | ||
50 | + | ||
51 | +/* | ||
52 | + * This command returns the status of the user button on beagle xM | ||
53 | + * Input - none | ||
54 | + * Returns - 1 if button is held down | ||
55 | + * 0 if button is not held down | ||
56 | + */ | ||
57 | +int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | ||
58 | +{ | ||
59 | + int button = 0; | ||
60 | + int gpio; | ||
61 | + | ||
62 | + /* | ||
63 | + * pass address parameter as argv[0] (aka command name), | ||
64 | + * and all remaining args | ||
65 | + */ | ||
66 | + switch (get_board_revision()) { | ||
67 | + case REVISION_AXBX: | ||
68 | + case REVISION_CX: | ||
69 | + case REVISION_C4: | ||
70 | + gpio = 7; | ||
71 | + break; | ||
72 | + case REVISION_XM_A: | ||
73 | + case REVISION_XM_B: | ||
74 | + case REVISION_XM_C: | ||
75 | + default: | ||
76 | + gpio = 4; | ||
77 | + break; | ||
78 | + } | ||
79 | + omap_request_gpio(gpio); | ||
80 | + omap_set_gpio_direction(gpio, 1); | ||
81 | + printf("The user button is currently "); | ||
82 | + if(omap_get_gpio_datain(gpio)) | ||
83 | + { | ||
84 | + button = 1; | ||
85 | + printf("PRESSED.\n"); | ||
86 | + } | ||
87 | + else | ||
88 | + { | ||
89 | + button = 0; | ||
90 | + printf("NOT pressed.\n"); | ||
91 | + } | ||
92 | + | ||
93 | + omap_free_gpio(gpio); | ||
94 | + | ||
95 | + return !button; | ||
96 | +} | ||
97 | + | ||
98 | +/* -------------------------------------------------------------------- */ | ||
99 | + | ||
100 | +U_BOOT_CMD( | ||
101 | + userbutton, CONFIG_SYS_MAXARGS, 1, do_userbutton, | ||
102 | + "Return the status of the BeagleBoard USER button", | ||
103 | + "" | ||
104 | +); | ||
105 | -- | ||
106 | 1.6.6.1 | ||
107 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0024-Corrected-LED-name-match-finding-avoiding-extraneous.patch b/recipes-bsp/u-boot/u-boot/2011.06/0024-Corrected-LED-name-match-finding-avoiding-extraneous.patch deleted file mode 100644 index 6bc3f6d7..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0024-Corrected-LED-name-match-finding-avoiding-extraneous.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 657f4308df123f3d2bd82c87bf667dd529d0f7c6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 8 Mar 2011 20:42:01 -0600 | ||
4 | Subject: [PATCH 24/30] Corrected LED name match finding avoiding extraneous Usage printouts | ||
5 | |||
6 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | common/cmd_led.c | 5 +++-- | ||
10 | 1 files changed, 3 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/common/cmd_led.c b/common/cmd_led.c | ||
13 | index c53195f..8b46848 100644 | ||
14 | --- a/common/cmd_led.c | ||
15 | +++ b/common/cmd_led.c | ||
16 | @@ -83,7 +83,7 @@ int str_onoff (char *var) | ||
17 | |||
18 | int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||
19 | { | ||
20 | - int state, i; | ||
21 | + int state, i, match = 0; | ||
22 | |||
23 | /* Validate arguments */ | ||
24 | if ((argc != 3)) { | ||
25 | @@ -98,6 +98,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||
26 | for (i = 0; led_commands[i].string; i++) { | ||
27 | if ((strcmp("all", argv[1]) == 0) || | ||
28 | (strcmp(led_commands[i].string, argv[1]) == 0)) { | ||
29 | + match = 1; | ||
30 | if (led_commands[i].on) { | ||
31 | if (state) { | ||
32 | led_commands[i].on(); | ||
33 | @@ -112,7 +113,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||
34 | } | ||
35 | |||
36 | /* If we ran out of matches, print Usage */ | ||
37 | - if (!led_commands[i].string && !(strcmp("all", argv[1]) == 0)) { | ||
38 | + if (!match) { | ||
39 | return cmd_usage(cmdtp); | ||
40 | } | ||
41 | |||
42 | -- | ||
43 | 1.6.6.1 | ||
44 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0025-BeagleBoard-fix-LED-0-1-in-driver.patch b/recipes-bsp/u-boot/u-boot/2011.06/0025-BeagleBoard-fix-LED-0-1-in-driver.patch deleted file mode 100644 index 92f9cddc..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0025-BeagleBoard-fix-LED-0-1-in-driver.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From c510bdc2684b5a755c4526071f1f3ca726ac1d1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 19 Apr 2011 10:55:26 -0500 | ||
4 | Subject: [PATCH 25/30] BeagleBoard: fix LED 0/1 in driver | ||
5 | |||
6 | Fixed USR0/USR1 to be LED 0/1 respectively | ||
7 | |||
8 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | --- | ||
11 | board/ti/beagle/led.c | 4 ++-- | ||
12 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c | ||
15 | index 08f95a0..d3de51f 100644 | ||
16 | --- a/board/ti/beagle/led.c | ||
17 | +++ b/board/ti/beagle/led.c | ||
18 | @@ -27,8 +27,8 @@ | ||
19 | static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF}; | ||
20 | |||
21 | /* GPIO pins for the LEDs */ | ||
22 | -#define BEAGLE_LED_USR0 149 | ||
23 | -#define BEAGLE_LED_USR1 150 | ||
24 | +#define BEAGLE_LED_USR0 150 | ||
25 | +#define BEAGLE_LED_USR1 149 | ||
26 | |||
27 | #ifdef STATUS_LED_GREEN | ||
28 | void green_LED_off (void) | ||
29 | -- | ||
30 | 1.6.6.1 | ||
31 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0026-led-added-cmd_led-to-Makefile.patch b/recipes-bsp/u-boot/u-boot/2011.06/0026-led-added-cmd_led-to-Makefile.patch deleted file mode 100644 index 365ae69c..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0026-led-added-cmd_led-to-Makefile.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 6aac1cb7f47d7126be80df2e06042d37f1affce2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Wed, 20 Apr 2011 18:11:38 -0500 | ||
4 | Subject: [PATCH 26/30] led: added cmd_led to Makefile | ||
5 | |||
6 | Addition of cmd_led into the Makefile wasn't included in the patch | ||
7 | applied to u-boot-ti. | ||
8 | |||
9 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
10 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
11 | --- | ||
12 | common/Makefile | 1 + | ||
13 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
14 | |||
15 | diff --git a/common/Makefile b/common/Makefile | ||
16 | index 224b7cc..7445ccc 100644 | ||
17 | --- a/common/Makefile | ||
18 | +++ b/common/Makefile | ||
19 | @@ -107,6 +107,7 @@ COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o | ||
20 | COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o | ||
21 | COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o | ||
22 | COBJS-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o | ||
23 | +COBJS-$(CONFIG_CMD_LED) += cmd_led.o | ||
24 | COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o | ||
25 | COBJS-y += cmd_load.o | ||
26 | COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o | ||
27 | -- | ||
28 | 1.6.6.1 | ||
29 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0027-led-correct-off-on-locations-in-structure.patch b/recipes-bsp/u-boot/u-boot/2011.06/0027-led-correct-off-on-locations-in-structure.patch deleted file mode 100644 index d0febf8e..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0027-led-correct-off-on-locations-in-structure.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 48393aa0119882009df057c974f0dec6051eff79 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Wed, 20 Apr 2011 18:13:49 -0500 | ||
4 | Subject: [PATCH 27/30] led: correct off/on locations in structure | ||
5 | |||
6 | Although the initialization should probably be done with names, the | ||
7 | existing implementation has these structures filled in the opposite | ||
8 | order. | ||
9 | |||
10 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
11 | -- | ||
12 | v2 changes: | ||
13 | * Corrected comment as well. | ||
14 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
15 | --- | ||
16 | common/cmd_led.c | 4 ++-- | ||
17 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/common/cmd_led.c b/common/cmd_led.c | ||
20 | index 8b46848..d14dd5a 100644 | ||
21 | --- a/common/cmd_led.c | ||
22 | +++ b/common/cmd_led.c | ||
23 | @@ -34,8 +34,8 @@ | ||
24 | struct led_tbl_s { | ||
25 | char *string; /* String for use in the command */ | ||
26 | led_id_t mask; /* Mask used for calling __led_set() */ | ||
27 | - void (*on)(void); /* Optional fucntion for turning LED on */ | ||
28 | - void (*off)(void); /* Optional fucntion for turning LED on */ | ||
29 | + void (*off)(void); /* Optional function for turning LED off */ | ||
30 | + void (*on)(void); /* Optional function for turning LED on */ | ||
31 | }; | ||
32 | |||
33 | typedef struct led_tbl_s led_tbl_t; | ||
34 | -- | ||
35 | 1.6.6.1 | ||
36 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0028-BeagleBoard-config-make-mtest-run.patch b/recipes-bsp/u-boot/u-boot/2011.06/0028-BeagleBoard-config-make-mtest-run.patch deleted file mode 100644 index 23cdc47b..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0028-BeagleBoard-config-make-mtest-run.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 747f8f93a4e1d461340ddc04d3843d58565bab30 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 19 Apr 2011 11:58:54 -0500 | ||
4 | Subject: [PATCH 28/30] BeagleBoard: config: make mtest run | ||
5 | |||
6 | Utilize the alternate mtest and define a valid region. | ||
7 | |||
8 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | --- | ||
11 | include/configs/omap3_beagle.h | 9 +++++---- | ||
12 | 1 files changed, 5 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
15 | index 6c842ad..3bbc235 100644 | ||
16 | --- a/include/configs/omap3_beagle.h | ||
17 | +++ b/include/configs/omap3_beagle.h | ||
18 | @@ -292,10 +292,11 @@ | ||
19 | /* Boot Argument Buffer Size */ | ||
20 | #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE) | ||
21 | |||
22 | -#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */ | ||
23 | - /* works on */ | ||
24 | -#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ | ||
25 | - 0x01F00000) /* 31MB */ | ||
26 | +#define CONFIG_SYS_ALT_MEMTEST 1 | ||
27 | +#define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest */ | ||
28 | + /* defaults */ | ||
29 | +#define CONFIG_SYS_MEMTEST_END (0x87FFFFFF) /* 128MB */ | ||
30 | +#define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */ | ||
31 | |||
32 | #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */ | ||
33 | /* load address */ | ||
34 | -- | ||
35 | 1.6.6.1 | ||
36 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0029-BeagleBoard-config-increase-command-line-functionali.patch b/recipes-bsp/u-boot/u-boot/2011.06/0029-BeagleBoard-config-increase-command-line-functionali.patch deleted file mode 100644 index d7e2b3ad..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0029-BeagleBoard-config-increase-command-line-functionali.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From c75471405166cba2327680cc4e4d204f05007c54 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 19 Apr 2011 11:50:55 -0500 | ||
4 | Subject: [PATCH 29/30] BeagleBoard: config: increase command-line functionality | ||
5 | |||
6 | Enable the expression evaluator. | ||
7 | |||
8 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | --- | ||
11 | include/configs/omap3_beagle.h | 5 +++-- | ||
12 | 1 files changed, 3 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
15 | index 3bbc235..55973fb 100644 | ||
16 | --- a/include/configs/omap3_beagle.h | ||
17 | +++ b/include/configs/omap3_beagle.h | ||
18 | @@ -158,6 +158,7 @@ | ||
19 | #define CONFIG_CMD_NFS /* NFS support */ | ||
20 | #define CONFIG_CMD_PING | ||
21 | #define CONFIG_CMD_DHCP | ||
22 | +#define CONFIG_CMD_SETEXPR /* Evaluate expressions */ | ||
23 | |||
24 | #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ | ||
25 | #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ | ||
26 | @@ -284,11 +285,11 @@ | ||
27 | #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ | ||
28 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | ||
29 | #define CONFIG_SYS_PROMPT "OMAP3 beagleboard.org # " | ||
30 | -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | ||
31 | +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ | ||
32 | /* Print Buffer Size */ | ||
33 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ | ||
34 | sizeof(CONFIG_SYS_PROMPT) + 16) | ||
35 | -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | ||
36 | +#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ | ||
37 | /* Boot Argument Buffer Size */ | ||
38 | #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE) | ||
39 | |||
40 | -- | ||
41 | 1.6.6.1 | ||
42 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.06/0030-BeagleBoard-config-add-optargs-buddy-camera.patch b/recipes-bsp/u-boot/u-boot/2011.06/0030-BeagleBoard-config-add-optargs-buddy-camera.patch deleted file mode 100644 index d8def033..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0030-BeagleBoard-config-add-optargs-buddy-camera.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 0e384ea7bc94d8626c0280f7c0151f99fbc83008 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 19 Apr 2011 12:09:18 -0500 | ||
4 | Subject: [PATCH 30/30] BeagleBoard: config: add optargs/buddy/camera | ||
5 | |||
6 | buddy and camera are used to configure peripherals in the kernel at boot | ||
7 | time that cannot easily be detected by the kernel. | ||
8 | |||
9 | Signed-off-by: Jason Kridner <jkridner@beagleboard.org> | ||
10 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
11 | --- | ||
12 | include/configs/omap3_beagle.h | 6 ++++++ | ||
13 | 1 files changed, 6 insertions(+), 0 deletions(-) | ||
14 | |||
15 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
16 | index 55973fb..024cb9a 100644 | ||
17 | --- a/include/configs/omap3_beagle.h | ||
18 | +++ b/include/configs/omap3_beagle.h | ||
19 | @@ -214,6 +214,8 @@ | ||
20 | "console=ttyO2,115200n8\0" \ | ||
21 | "mpurate=auto\0" \ | ||
22 | "buddy=none "\ | ||
23 | + "optargs=\0" \ | ||
24 | + "camera=none\0" \ | ||
25 | "vram=12M\0" \ | ||
26 | "dvimode=1024x768MR-16@60\0" \ | ||
27 | "defaultdisplay=dvi\0" \ | ||
28 | @@ -223,16 +225,20 @@ | ||
29 | "nandroot=/dev/mtdblock4 rw\0" \ | ||
30 | "nandrootfstype=jffs2\0" \ | ||
31 | "mmcargs=setenv bootargs console=${console} " \ | ||
32 | + "${optargs} " \ | ||
33 | "mpurate=${mpurate} " \ | ||
34 | "buddy=${buddy} "\ | ||
35 | + "camera=${camera} "\ | ||
36 | "vram=${vram} " \ | ||
37 | "omapfb.mode=dvi:${dvimode} " \ | ||
38 | "omapdss.def_disp=${defaultdisplay} " \ | ||
39 | "root=${mmcroot} " \ | ||
40 | "rootfstype=${mmcrootfstype}\0" \ | ||
41 | "nandargs=setenv bootargs console=${console} " \ | ||
42 | + "${optargs} " \ | ||
43 | "mpurate=${mpurate} " \ | ||
44 | "buddy=${buddy} "\ | ||
45 | + "camera=${camera} "\ | ||
46 | "vram=${vram} " \ | ||
47 | "omapfb.mode=dvi:${dvimode} " \ | ||
48 | "omapdss.def_disp=${defaultdisplay} " \ | ||
49 | -- | ||
50 | 1.6.6.1 | ||
51 | |||
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 deleted file mode 100644 index 26b40caf..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0031-omap4-add-support-for-gpios.patch +++ /dev/null | |||
@@ -1,306 +0,0 @@ | |||
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 deleted file mode 100644 index 9491431e..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0032-omap4-add-support-for-EHCI.patch +++ /dev/null | |||
@@ -1,322 +0,0 @@ | |||
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 deleted file mode 100644 index c1c1f0f3..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0033-omap4_panda-add-support-for-EHCI.patch +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
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 deleted file mode 100644 index f1ab7fec..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0034-omap4_panda-adding-support-for-smsc-and-tftp-boot.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
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 deleted file mode 100644 index c4d20589..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.06/0035-omap4_panda-use-uImage.panda-for-tftp.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
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/omap3-touchbook/fw_env.config b/recipes-bsp/u-boot/u-boot/omap3-touchbook/fw_env.config deleted file mode 100644 index a7bfec1e..00000000 --- a/recipes-bsp/u-boot/u-boot/omap3-touchbook/fw_env.config +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # Configuration file for fw_(printenv/saveenv) utility. | ||
2 | # Up to two entries are valid, in this case the redundand | ||
3 | # environment sector is assumed present. | ||
4 | |||
5 | # MTD device name Device offset Env. size Flash sector size | ||
6 | /dev/mtd2 0x0000 0x20000 0x20000 | ||
diff --git a/recipes-bsp/u-boot/u-boot/touchbook-config.patch b/recipes-bsp/u-boot/u-boot/touchbook-config.patch deleted file mode 100644 index 9af49bff..00000000 --- a/recipes-bsp/u-boot/u-boot/touchbook-config.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From eb13d25ad907314a5dd712ad7de59ca260968e61 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:17:24 +0100 | ||
4 | Subject: [PATCH 10/10] touchbook-config.patch | ||
5 | |||
6 | --- | ||
7 | board/omap3/beagle/beagle.c | 2 +- | ||
8 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
9 | |||
10 | diff --git a/board/omap3/beagle/beagle.c b/board/omap3/beagle/beagle.c | ||
11 | index d5ec63e..cc6e20d 100644 | ||
12 | --- a/board/omap3/beagle/beagle.c | ||
13 | +++ b/board/omap3/beagle/beagle.c | ||
14 | @@ -186,7 +186,7 @@ int board_init(void) | ||
15 | |||
16 | gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ | ||
17 | /* board id for Linux */ | ||
18 | - gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE; | ||
19 | + gd->bd->bi_arch_number = 2393; | ||
20 | /* boot param addr */ | ||
21 | gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); | ||
22 | |||
23 | -- | ||
24 | 1.6.6.1 | ||
25 | |||
diff --git a/recipes-bsp/u-boot/u-boot_2011.06.bb b/recipes-bsp/u-boot/u-boot_2011.06.bb deleted file mode 100644 index 4fa8f071..00000000 --- a/recipes-bsp/u-boot/u-boot_2011.06.bb +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | require u-boot.inc | ||
2 | |||
3 | # No patches for other machines yet | ||
4 | COMPATIBLE_MACHINE = "(beagleboard)" | ||
5 | |||
6 | SRC_URI = "git://git.denx.de/u-boot.git;protocol=git \ | ||
7 | file://2011.06/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch \ | ||
8 | file://2011.06/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch \ | ||
9 | file://2011.06/0003-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch \ | ||
10 | file://2011.06/0004-beagleboard-add-support-for-xM-revision-C.patch \ | ||
11 | file://2011.06/0005-Add-support-for-SMSC95XX-USB-2.0-10-100MBit-Ethernet.patch \ | ||
12 | file://2011.06/0006-Add-Ethernet-hardware-MAC-address-framework-to-usbne.patch \ | ||
13 | file://2011.06/0007-Add-documentation-for-USB-Host-Networking.patch \ | ||
14 | file://2011.06/0008-dm3730-enable-dpll5.patch \ | ||
15 | file://2011.06/0009-beagleboard-enable-HUB-power-on-XM-boards.patch \ | ||
16 | file://2011.06/0010-beagleboard-turn-off-clocks-in-ehci_stop.patch \ | ||
17 | file://2011.06/0011-beagleboard-enable-networking.patch \ | ||
18 | file://2011.06/0012-beagleboard-switch-to-ttyO2-as-console.patch \ | ||
19 | file://2011.06/0013-beagleboard-load-kernel-from-MMC-ext-not-FAT.patch \ | ||
20 | file://2011.06/0014-beagleboard-enable-asix-driver-and-dhcp.patch \ | ||
21 | file://2011.06/0015-beagleboard-hardcode-MAC-for-onboard-SMSC-and-use-uI.patch \ | ||
22 | file://2011.06/0016-beagleboard-decrease-bootdelay-to-2-seconds.patch \ | ||
23 | file://2011.06/0017-USB-Remove-__attribute__-packed-for-struct-ehci_hccr.patch \ | ||
24 | file://2011.06/0018-usb-Some-EHCI-chipsets-are-slow-to-respond.patch \ | ||
25 | file://2011.06/0019-OMAP3-Add-DSS-driver-for-OMAP3.patch \ | ||
26 | file://2011.06/0020-video-DSS-makefile-update.patch \ | ||
27 | file://2011.06/0021-BeagleBoard-Configure-DVI-S-video.patch \ | ||
28 | file://2011.06/0022-BeagleBoard-config-enable-DSS.patch \ | ||
29 | file://2011.06/0023-BeagleBoard-Added-userbutton-command.patch \ | ||
30 | file://2011.06/0024-Corrected-LED-name-match-finding-avoiding-extraneous.patch \ | ||
31 | file://2011.06/0025-BeagleBoard-fix-LED-0-1-in-driver.patch \ | ||
32 | file://2011.06/0026-led-added-cmd_led-to-Makefile.patch \ | ||
33 | file://2011.06/0027-led-correct-off-on-locations-in-structure.patch \ | ||
34 | file://2011.06/0028-BeagleBoard-config-make-mtest-run.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 \ | ||
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 \ | ||
42 | file://fw_env.config \ | ||
43 | " | ||
44 | # v2011.06 tag -> b1af6f532e0d348b153d5c148369229d24af361a | ||
45 | SRCREV = "b1af6f532e0d348b153d5c148369229d24af361a" | ||
46 | PV = "2011.06" | ||
47 | PR = "r1" | ||
48 | |||
49 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" | ||
50 | |||
51 | S = "${WORKDIR}/git" | ||