h2200: Add support for iPAQ h2200 palmtop
PATCH v5 1/3 h2200: Add support for iPAQ h2200 palmtop
Add basic support for HP iPAQ h2200 palmtop. h2200 palmtop was targeted to general consumers. It has 64 MB of RAM, 32 MB flash. No intergrated Wi-Fi nor Ethernet. Based on Intel PXA255 processor. It was shipped with Windows CE 4.2 operating system.
---
Changes for v5:
- Fixed Makefile to use $(obj)
board/h2200/Makefile | 49 ++++++++++++++ board/h2200/h2200-header.S | 27 ++++++++ board/h2200/h2200.c | 53 +++++++++++++++ boards.cfg | 1 + include/configs/h2200.h | 156 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 286 insertions(+), 0 deletions(-) create mode 100644 board/h2200/Makefile create mode 100644 board/h2200/h2200-header.S create mode 100644 board/h2200/h2200.c create mode 100644 include/configs/h2200.h
board/h2200/Makefile new file +49 -0
@@ -0,0 +1,49 @@ +# +# h2200 Support +# +# Copyright (C) 2012 Lukasz Dalek <[email protected]> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := h2200.o + +SRCS := $(COBJS:.o=.c) h2200-header.S +OBJS := $(addprefix $(obj),$(COBJS)) + +all: $(LIB) $(obj)h2200-header.bin + +$(obj)h2200-header.o: h2200-header.S + $(CC) $(CFLAGS) -c -o $@ $< + +$(obj)h2200-header.bin: $(obj)h2200-header.o + $(OBJCOPY) -O binary $< $@ + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/h2200/h2200-header.S new file +27 -0
@@ -0,0 +1,27 @@ +/* + * iPAQ h2200 header + * + * Copyright (C) 2012 Lukasz Dalek <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + .word 0xea0003fe /* b 0x1000 */ + + .org 0x40 + .ascii "ECEC" + + .org 0x1000 - 1 + .byte 0x0
board/h2200/h2200.c new file +53 -0
53 lines not on this page · raw message
boards.cfg +1 -0
@@ -282,6 +282,7 @@ dvlhost arm ixp pdnb3 arm ixp pdnb3 prodrive scpu arm ixp pdnb3 prodrive - pdnb3:SCPU balloon3 arm pxa +h2200 arm pxa lubbock arm pxa palmld arm pxa palmtc arm pxa
include/configs/h2200.h new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
1.7.8.6
PATCH v5 2/3 pxa: Add code to examine cpu model and revision
Add function which return CPU model and revision which can be used for cpu detection.
---
Changes for v5:
- Changed commit message
arch/arm/cpu/pxa/cpuinfo.c | 11 +++++++++-- arch/arm/include/asm/arch-pxa/pxa.h | 13 +++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-)
arch/arm/cpu/pxa/cpuinfo.c +9 -2
@@ -24,9 +24,11 @@#include <errno.h> #include <linux/compiler.h> -#define CPU_MASK_PXA_REVID 0x00f +#define CPU_MASK_PXA_PRODID 0x000003f0 +#define CPU_MASK_PXA_REVID 0x0000000f + +#define CPU_MASK_PRODREV (CPU_MASK_PXA_PRODID | CPU_MASK_PXA_REVID) -#define CPU_MASK_PXA_PRODID 0x3f0#define CPU_VALUE_PXA25X 0x100#define CPU_VALUE_PXA27X 0x110
@@ -51,6 +53,11 @@ int cpu_is_pxa27x(void)return id ==CPU_VALUE_PXA27X ; } +uint32_t pxa_get_cpu_revision (void ) +{ +return pxa_get_cpuid () &CPU_MASK_PRODREV ; +} +#ifdef CONFIG_DISPLAY_CPUINFO static const char *pxa25x_get_revision (void ) {
arch/arm/include/asm/arch-pxa/pxa.h +13 -0
@@ -22,8 +22,21 @@#ifndef __PXA_H__#define __PXA_H__ +#define PXA255_A0 0x00000106 +#define PXA250_C0 0x00000105 +#define PXA250_B2 0x00000104 +#define PXA250_B1 0x00000103 +#define PXA250_B0 0x00000102 +#define PXA250_A1 0x00000101 +#define PXA250_A0 0x00000100 +#define PXA210_C0 0x00000125 +#define PXA210_B2 0x00000124 +#define PXA210_B1 0x00000123 +#define PXA210_B0 0x00000122 +int cpu_is_pxa25x (void );int cpu_is_pxa27x (void ); +uint32_t pxa_get_cpu_revision (void );void pxa2xx_dram_init (void );#endif /* __PXA_H__ */
Signature · 1 line
1.7.8.6
PATCH v5 3/3 h2200: Add USB CDC ethernet support
In reply to Lukasz DalekAdd support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
---
Changes for v5:
- Surrendered #include <usb.h> with CONFIGs
board/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 1 + include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 0 deletions(-)
board/h2200/h2200.c +17 -0
@@ -22,9 +22,20 @@#include <asm/arch/pxa.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#ifdef CONFIG_H2200_USBETH +# include <usb.h> +#endif DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_H2200_USBETH +int board_eth_init (bd_t *bis) +{ +usb_eth_initialize (bis); +return 0 ; +} +#endif +int board_init (void ) {/* We have RAM, disable cache */
@@ -36,6 +47,12 @@ int board_init(void)/* adress of boot parameters */ gd->bd->bi_boot_params =0xa0000100 ; +/* Let host see that device is disconnected */ +#if defined(CONFIG_H2200_USBETH ) +udc_disconnect (); +mdelay (500 ); +#endif +return 0 ; }
boards.cfg +1 -0
@@ -283,6 +283,7 @@ pdnb3 arm ixp pdnb3 prodriv scpu arm ixp pdnb3 prodrive - pdnb3:SCPU balloon3 arm pxa h2200 arm pxa +h2200_usbeth arm pxa h2200 - - h2200:H2200_USBETH lubbock arm pxa palmld arm pxa palmtc arm pxa
include/configs/h2200.h +27 -0
@@ -153,4 +153,31 @@#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#ifdef CONFIG_H2200_USBETH +# define CONFIG_SYS_CONSOLE_IS_IN_ENV +# define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +# define CONFIG_CMD_NET +# define CONFIG_CMD_PING + +# define CONFIG_BOOTDELAY 2 +# define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +# define CONFIG_USB_GADGET_PXA2XX +# define CONFIG_USB_ETHER +# define CONFIG_USB_ETH_SUBSET + +# define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" +# define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +# define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif +#endif /* __CONFIG_H */
Signature · 1 line
1.7.8.6
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek <[email protected]>---
Changes for v5:
- Surrendered #include <usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 1 + include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 0 deletions(-)
[...]
Quoted 11 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm ixp
pdnb3 prodrive - pdnb3:SCPU balloon3
arm pxah2200 arm pxa +h2200_usbeth arm pxa h2200 -
I told you to enable the USB ethernet by default, so why do you add this board?
[...]
btw. http://www.denx.de/wiki/U-Boot/Patches esp. the In-reply-to part.
Best regards,
Marek Vasut
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Quoted 16 lines · Marek Vasut
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v5:
- Surrendered #include<usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 1 + include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 0 deletions(-)[...]
Quoted 11 lines
Quoted 10 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm ixp
pdnb3 prodrive - pdnb3:SCPU balloon3
arm pxa
h2200 arm pxa
+h2200_usbeth arm pxa h2200 -I told you to enable the USB ethernet by default, so why do you add this board?
I don't understand.
We agreed to split h2200 support into two parts. First one adding basic support for device, second one adding support for usb ethernet for h2200.
?ukasz Da?ek
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Dear ?ukasz Da?ek,
Quoted 39 lines · Marek Vasut
Quoted 30 lines
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v5:
- Surrendered #include<usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 1 + include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 0 deletions(-)[...]
Quoted 12 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm ixp
pdnb3 prodrive - pdnb3:SCPU
balloon3arm pxa
Quoted 7 lines
Quoted 4 lines
h2200 arm pxa
+h2200_usbeth arm pxa h2200
-I told you to enable the USB ethernet by default, so why do you add this board?
Quoted 4 lines
I don't understand.
We agreed to split h2200 support into two parts. First one adding basic support for device, second one adding support for usb ethernet for h2200.
Yes, but I fail to understand why you need TWO board entries for that. Adding the USB ethernet support is just a feature, you don't need additional board entry for that ... so what is the idea behind adding it?
Best regards,
Marek Vasut
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Quoted 38 lines · Marek Vasut
Dear ?ukasz Da?ek,
Quoted 36 lines · Marek Vasut
Quoted 35 lines
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v5:
- Surrendered #include<usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 1 + include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 0 deletions(-)[...]
Quoted 10 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm ixp
pdnb3 prodrive - pdnb3:SCPU
balloon3Quoted 6 lines
arm pxa
h2200 arm pxa
+h2200_usbeth arm pxa h2200
-I told you to enable the USB ethernet by default, so why do you add this board?
Quoted 7 lines
Quoted 4 lines
I don't understand.
We agreed to split h2200 support into two parts. First one adding basic support for device, second one adding support for usb ethernet for h2200.Yes, but I fail to understand why you need TWO board entries for that. Adding the USB ethernet support is just a feature, you don't need additional board entry for that ... so what is the idea behind adding it?
Because easier is to type make h2200_usbeth_config than modifiy config.
?ukasz Da?ek
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Dear ?ukasz Da?ek,
Quoted 49 lines · Marek Vasut
Quoted 48 lines
Dear ?ukasz Da?ek,
Quoted 45 lines · Marek Vasut
Quoted 31 lines
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v5:
- Surrendered #include<usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 1 + include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 0 deletions(-)[...]
Quoted 13 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm
ixppdnb3 prodrive - pdnb3:SCPU
balloon3arm pxa
Quoted 8 lines
Quoted 5 lines
h2200 arm pxa
+h2200_usbeth arm pxa h2200
-
I told you to enable the USB ethernet by default, so why do you add this board?
I don't understand.
We agreed to split h2200 support into two parts. First one adding basic support for device, second one adding support for usb ethernet for h2200.
Quoted 6 lines
Quoted 4 lines
Yes, but I fail to understand why you need TWO board entries for that. Adding the USB ethernet support is just a feature, you don't need additional board entry for that ... so what is the idea behind adding it?
Because easier is to type make
h2200_usbeth_configthan modifiy config.
Why don't you enable the USB ethernet by default for "h2200" target then?
Best regards,
Marek Vasut
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Quoted 51 lines · Marek Vasut
Dear ?ukasz Da?ek,
Quoted 49 lines · Marek Vasut
Quoted 48 lines
Dear ?ukasz Da?ek,
Quoted 35 lines · Marek Vasut
Quoted 34 lines
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v5:
- Surrendered #include<usb.h> with CONFIGs
board/h2200/h2200.c| 17 +++++++++++++++++
boards.cfg | 1 +
include/configs/h2200.h| 27 +++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 0 deletions(-)[...]
Quoted 17 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm
ixppdnb3 prodrive - pdnb3:SCPU
balloon3arm pxa
h2200 arm pxa
+h2200_usbeth arm pxa h2200
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
-I told you to enable the USB ethernet by default, so why do you add this board?
I don't understand.
We agreed to split h2200 support into two parts. First one adding basic support for device, second one adding support for usb ethernet for h2200.Yes, but I fail to understand why you need TWO board entries for that. Adding the USB ethernet support is just a feature, you don't need additional board entry for that ... so what is the idea behind adding it?
Quoted 5 lines
Quoted 1 line
Because easier is to type make
h2200_usbeth_configthan modifiy config.Why don't you enable the USB ethernet by default for "h2200" target then?
Best regards,
Marek Vasut
I will enable. This two entries really look weird.
?ukasz Da?ek
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Dear ?ukasz Da?ek,
Quoted 57 lines · Marek Vasut
Quoted 56 lines
Dear ?ukasz Da?ek,
Quoted 54 lines · Marek Vasut
Quoted 52 lines
Dear ?ukasz Da?ek,
Quoted 41 lines · Marek Vasut
Quoted 31 lines
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v5:
- Surrendered #include<usb.h> with CONFIGs
board/h2200/h2200.c| 17 +++++++++++++++++
boards.cfg | 1 +
include/configs/h2200.h| 27 +++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 0 deletions(-)[...]
Quoted 13 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm
ixppdnb3 prodrive - pdnb3:SCPU
balloon3arm pxa
Quoted 8 lines
Quoted 5 lines
h2200 arm pxa
+h2200_usbeth arm pxa h2200
-I told you to enable the USB ethernet by default, so why do you add this board?
Quoted 4 lines
I don't understand.
We agreed to split h2200 support into two parts. First one adding basic support for device, second one adding support for usb ethernet for h2200.Yes, but I fail to understand why you need TWO board entries for that. Adding the USB ethernet support is just a feature, you don't need additional board entry for that ... so what is the idea behind adding it?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Because easier is to type make
h2200_usbeth_configthan modifiy config.Why don't you enable the USB ethernet by default for "h2200" target then?
Best regards,
Marek VasutI will enable. This two entries really look weird.
Ok, so we're clear there'll be one entry with ethernet enabled called "h2200", yes?
Best regards,
Marek Vasut
PATCH v5 3/3 h2200: Add USB CDC ethernet support
Quoted 57 lines · Marek Vasut
Dear ?ukasz Da?ek,
Quoted 55 lines · Marek Vasut
Quoted 54 lines
Dear ?ukasz Da?ek,
Quoted 45 lines · Marek Vasut
Quoted 44 lines
Dear ?ukasz Da?ek,
Quoted 42 lines · Marek Vasut
Quoted 30 lines
Dear Lukasz Dalek,
Quoted 13 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v5:
- Surrendered #include<usb.h> with CONFIGs
board/h2200/h2200.c| 17 +++++++++++++++++
boards.cfg | 1 +
include/configs/h2200.h| 27 +++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 0 deletions(-)[...]
Quoted 13 lines
boards.cfg +0
-0@@ -283,6 +283,7 @@ pdnb3 arm ixppdnb3 prodriv scpu arm
ixppdnb3 prodrive - pdnb3:SCPU
balloon3arm pxa
Quoted 7 lines
Quoted 5 lines
h2200 arm pxa
+h2200_usbeth arm pxa h2200
-I told you to enable the USB ethernet by default, so why do you add this board?
I don't understand.
We agreed to split h2200 support into two parts. First one adding basic support for device, second one adding support for usb ethernet for h2200.Quoted 5 lines
Quoted 4 lines
Yes, but I fail to understand why you need TWO board entries for that. Adding the USB ethernet support is just a feature, you don't need additional board entry for that ... so what is the idea behind adding it?
Because easier is to type make
h2200_usbeth_configthan modifiy config.Why don't you enable the USB ethernet by default for "h2200" target then?
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Best regards,
Marek VasutI will enable. This two entries really look weird.
Ok, so we're clear there'll be one entry with ethernet enabled called "h2200", yes?
Best regards,
Marek Vasut
Yes
?ukasz Da?ek
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
---
Changes for v6:
- Defined only one entire for board
Changes for v5:
- Surrendered #include <usb.h> with CONFIGs
board/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 2 +- include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletions(-)
board/h2200/h2200.c +17 -0
@@ -22,9 +22,20 @@#include <asm/arch/pxa.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#ifdef CONFIG_H2200_USBETH +# include <usb.h> +#endif DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_H2200_USBETH +int board_eth_init (bd_t *bis) +{ +usb_eth_initialize (bis); +return 0 ; +} +#endif +int board_init (void ) {/* We have RAM, disable cache */
@@ -36,6 +47,12 @@ int board_init(void)/* adress of boot parameters */ gd->bd->bi_boot_params =0xa0000100 ; +/* Let host see that device is disconnected */ +#if defined(CONFIG_H2200_USBETH ) +udc_disconnect (); +mdelay (500 ); +#endif +return 0 ; }
boards.cfg +1 -1
@@ -282,7 +282,7 @@ dvlhost arm ixp pdnb3 arm ixp pdnb3 prodrive scpu arm ixp pdnb3 prodrive - pdnb3:SCPU balloon3 arm pxa -h2200 arm pxa +h2200 arm pxa h2200 - - h2200:H2200_USBETH lubbock arm pxa palmld arm pxa palmtc arm pxa
include/configs/h2200.h +27 -0
@@ -153,4 +153,31 @@#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#ifdef CONFIG_H2200_USBETH +# define CONFIG_SYS_CONSOLE_IS_IN_ENV +# define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +# define CONFIG_CMD_NET +# define CONFIG_CMD_PING + +# define CONFIG_BOOTDELAY 2 +# define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +# define CONFIG_USB_GADGET_PXA2XX +# define CONFIG_USB_ETHER +# define CONFIG_USB_ETH_SUBSET + +# define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" +# define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +# define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif +#endif /* __CONFIG_H */
Signature · 1 line
1.7.8.6
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Dear Lukasz Dalek,
Quoted 20 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek <[email protected]>---
Changes for v6:
- Defined only one entire for board
Changes for v5:
- Surrendered #include <usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 2 +- include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletions(-)board/h2200/h2200.c +0
-0
board/h2200/h2200.c line 25
Quoted 4 lines
board/h2200/h2200.c +1
-0@@ -22,9 +22,20 @@#include <asm/arch/pxa.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#ifdef CONFIG_H2200_USBETH
It's always defined, remove it.
Quoted 38 lines
board/h2200/h2200.c +16
-0+# include <usb.h> +#endif DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_H2200_USBETH +int board_eth_init (bd_t *bis) +{ +usb_eth_initialize (bis); +return 0 ; +} +#endif +int board_init (void ) {/* We have RAM, disable cache */ @@ -36,6 +47,12 @@ int board_init(void)/* adress of boot parameters */ gd->bd->bi_boot_params =0xa0000100 ; +/* Let host see that device is disconnected */ +#if defined(CONFIG_H2200_USBETH ) +udc_disconnect (); +mdelay (500 ); +#endif +return 0 ; }boards.cfg +0
-0@@ -282,7 +282,7 @@ dvlhost arm ixp pdnb3 arm ixp pdnb3prodrive scpu arm ixp pdnb3
prodrive - pdnb3:SCPU balloon3
arm pxa
boards.cfg
Quoted 3 lines
boards.cfg +1
-1-h2200 arm pxa +h2200 arm pxa h2200 - - h2200:H2200_USBETH lubbock
[...]
This change isn't needed if you remove CONFIG_H2200_USBETH
include/configs/h2200.h line 156
Quoted 9 lines
include/configs/h2200.h +1
-0@@ -153,4 +153,31 @@#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#ifdef CONFIG_H2200_USBETH
ifdef - endif not needed, otherwise good.
Quoted 27 lines
include/configs/h2200.h +26
-0+# define CONFIG_SYS_CONSOLE_IS_IN_ENV +# define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +# define CONFIG_CMD_NET +# define CONFIG_CMD_PING + +# define CONFIG_BOOTDELAY 2 +# define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +# define CONFIG_USB_GADGET_PXA2XX +# define CONFIG_USB_ETHER +# define CONFIG_USB_ETH_SUBSET + +# define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" +# define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +# define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif +#endif /* __CONFIG_H */
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Quoted 103 lines · Marek Vasut
Dear Lukasz Dalek,
Quoted 20 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v6:
- Defined only one entire for board
Changes for v5:
- Surrendered #include<usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 2 +- include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletions(-)board/h2200/h2200.c +0
-0board/h2200/h2200.c line 25
Quoted 4 lines
board/h2200/h2200.c +1
-0@@ -22,9 +22,20 @@#include <asm/arch/pxa.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#ifdef CONFIG_H2200_USBETH It's always defined, remove it.
Quoted 38 lines
board/h2200/h2200.c +16
-0+# include <usb.h> +#endif DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_H2200_USBETH +int board_eth_init (bd_t *bis) +{ +usb_eth_initialize (bis); +return 0 ; +} +#endif +int board_init (void ) {/* We have RAM, disable cache */ @@ -36,6 +47,12 @@ int board_init(void)/* adress of boot parameters */ gd->bd->bi_boot_params =0xa0000100 ; +/* Let host see that device is disconnected */ +#if defined(CONFIG_H2200_USBETH ) +udc_disconnect (); +mdelay (500 ); +#endif +return 0 ; }boards.cfg +0
-0@@ -282,7 +282,7 @@ dvlhost arm ixp pdnb3 arm ixp pdnb3prodrive scpu arm ixp pdnb3
prodrive - pdnb3:SCPU balloon3
arm pxaboards.cfg
Quoted 3 lines
boards.cfg +1
-1-h2200 arm pxa +h2200 arm pxa h2200 - - h2200:H2200_USBETH lubbock[...]
This change isn't needed if you remove
CONFIG_H2200_USBETHinclude/configs/h2200.h line 156
Quoted 9 lines
include/configs/h2200.h +1
-0@@ -153,4 +153,31 @@#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#ifdef CONFIG_H2200_USBETH ifdef - endif not needed, otherwise good.
Quoted 19 lines
include/configs/h2200.h +19
-0+# define CONFIG_SYS_CONSOLE_IS_IN_ENV +# define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +# define CONFIG_CMD_NET +# define CONFIG_CMD_PING + +# define CONFIG_BOOTDELAY 2 +# define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +# define CONFIG_USB_GADGET_PXA2XX +# define CONFIG_USB_ETHER +# define CONFIG_USB_ETH_SUBSET + +# define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01"
Quoted 8 lines
include/configs/h2200.h line 183
Quoted 8 lines
include/configs/h2200.h +7
-0+# define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +# define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif +#endif /* __CONFIG_H */
Why do I have to remove CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.
?ukasz Da?ek
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Dear ?ukasz Da?ek,
Quoted 131 lines · Marek Vasut
Quoted 130 lines
Dear Lukasz Dalek,
Quoted 22 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v6:
- Defined only one entire for boardChanges for v5:
- Surrendered #include<usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 2 +- include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletions(-)board/h2200/h2200.c +0
-0board/h2200/h2200.c line 27
Quoted 6 lines
board/h2200/h2200.c +1
-0@@ -22,9 +22,20 @@#include <asm/arch/pxa.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#ifdef CONFIG_H2200_USBETH It's always defined, remove it.
Quoted 48 lines
board/h2200/h2200.c +10
-0+# include <usb.h> +#endif DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_H2200_USBETH +int board_eth_init (bd_t *bis) +{ +usb_eth_initialize (bis); +return 0 ; +} +#endif +int board_init(void) {/* We have RAM, disable cache */
board/h2200/h2200.c +6
-0@@ -36,6 +47,12 @@ int board_init(void)/* adress of boot parameters */ gd->bd->bi_boot_params =0xa0000100 ; +/* Let host see that device is disconnected */ +#if defined(CONFIG_H2200_USBETH ) +udc_disconnect (); +mdelay (500 ); +#endif +return 0 ;}boards.cfg +0
-0@@ -282,7 +282,7 @@ dvlhost arm ixp pdnb3 arm ixp pdnb3prodrive scpu arm ixp pdnb3
prodrive - pdnb3:SCPU balloon3
arm pxa
boards.cfg
Quoted 5 lines
boards.cfg +1
-1-h2200 arm pxa +h2200 arm pxa h2200 - - h2200:H2200_USBETH lubbock[...]
This change isn't needed if you remove
CONFIG_H2200_USBETHinclude/configs/h2200.h line 156
Quoted 9 lines
include/configs/h2200.h +1
-0@@ -153,4 +153,31 @@#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#ifdef CONFIG_H2200_USBETH ifdef - endif not needed, otherwise good.
Quoted 27 lines
include/configs/h2200.h +26
-0+# define CONFIG_SYS_CONSOLE_IS_IN_ENV +# define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +# define CONFIG_CMD_NET +# define CONFIG_CMD_PING + +# define CONFIG_BOOTDELAY 2 +# define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +# define CONFIG_USB_GADGET_PXA2XX +# define CONFIG_USB_ETHER +# define CONFIG_USB_ETH_SUBSET + +# define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" +# define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +# define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif +
Quoted 4 lines
Quoted 1 line
Quoted 1 line
#endif /* __CONFIG_H */Why do I have to remove
CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.
Why would you disable it?
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Quoted 130 lines · Marek Vasut
Dear ?ukasz Da?ek,
Quoted 128 lines · Marek Vasut
Quoted 127 lines
Dear Lukasz Dalek,
Quoted 22 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek<[email protected]>---
Changes for v6:
- Defined only one entire for boardChanges for v5:
- Surrendered #include<usb.h> with CONFIGsboard/h2200/h2200.c | 17 +++++++++++++++++ boards.cfg | 2 +- include/configs/h2200.h | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletions(-)board/h2200/h2200.c +0
-0board/h2200/h2200.c line 27
Quoted 6 lines
board/h2200/h2200.c +1
-0@@ -22,9 +22,20 @@#include <asm/arch/pxa.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#ifdef CONFIG_H2200_USBETH It's always defined, remove it.
Quoted 48 lines
board/h2200/h2200.c +10
-0+# include <usb.h> +#endif DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_H2200_USBETH +int board_eth_init (bd_t *bis) +{ +usb_eth_initialize (bis); +return 0 ; +} +#endif +int board_init(void) {/* We have RAM, disable cache */board/h2200/h2200.c +6
-0@@ -36,6 +47,12 @@ int board_init(void)/* adress of boot parameters */ gd->bd->bi_boot_params =0xa0000100 ; +/* Let host see that device is disconnected */ +#if defined(CONFIG_H2200_USBETH ) +udc_disconnect (); +mdelay (500 ); +#endif +return 0 ;}boards.cfg +0
-0@@ -282,7 +282,7 @@ dvlhost arm ixp pdnb3 arm ixp pdnb3prodrive scpu arm ixp pdnb3
prodrive - pdnb3:SCPU balloon3
arm pxa
boards.cfg
Quoted 5 lines
boards.cfg +1
-1-h2200 arm pxa +h2200 arm pxa h2200 - - h2200:H2200_USBETH lubbock[...]
This change isn't needed if you remove
CONFIG_H2200_USBETHinclude/configs/h2200.h line 156
Quoted 9 lines
include/configs/h2200.h +1
-0@@ -153,4 +153,31 @@#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#ifdef CONFIG_H2200_USBETH ifdef - endif not needed, otherwise good.
Quoted 27 lines
include/configs/h2200.h +26
-0+# define CONFIG_SYS_CONSOLE_IS_IN_ENV +# define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +# define CONFIG_CMD_NET +# define CONFIG_CMD_PING + +# define CONFIG_BOOTDELAY 2 +# define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +# define CONFIG_USB_GADGET_PXA2XX +# define CONFIG_USB_ETHER +# define CONFIG_USB_ETH_SUBSET + +# define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" +# define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +# define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif +
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
#endif /* __CONFIG_H */Why do I have to remove
CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.Why would you disable it?
Because of other gadgets, e.g. ttyACM
?ukasz Da?ek
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Dear ?ukasz Da?ek,
[...]
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Why do I have to remove
CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.Why would you disable it?
Because of other gadgets, e.g. ttyACM
Can't these co-exist?
Best regards,
Marek Vasut
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Quoted 11 lines · Marek Vasut
Dear ?ukasz Da?ek,
[...]
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Why do I have to remove
CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.Why would you disable it?
Because of other gadgets, e.g. ttyACM
Can't these co-exist?
Best regards,
Marek Vasut
No they can't.
?ukasz Da?ek
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Dear ?ukasz Da?ek,
Quoted 10 lines · Marek Vasut
Quoted 9 lines
Dear ?ukasz Da?ek,
[...]
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
Why do I have to remove
CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.Why would you disable it?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Because of other gadgets, e.g. ttyACM
Can't these co-exist?
Best regards,
Marek VasutNo they can't.
Not even with the composite driver ? What's ttyacm and where is it in u-boot btw ?
Best regards,
Marek Vasut
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Quoted 13 lines · Marek Vasut
Dear ?ukasz Da?ek,
Quoted 11 lines · Marek Vasut
Quoted 10 lines
Dear ?ukasz Da?ek,
[...]
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Why do I have to remove
CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.Why would you disable it?
Because of other gadgets, e.g. ttyACM
Can't these co-exist?
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Best regards,
Marek VasutNo they can't.
Not even with the composite driver ? What's ttyacm and where is it in u-boot btw ?
Best regards,
Marek Vasut
As far as I know they can't exists on pxa25x. I don't know how about pxa27x.
ttyacm is a serial over usb.
Driver exists in u-boot for pxa27x (gadget/usb/pxa27x_udc.c) but I have my own
for pxa25x not published.
?ukasz Da?ek
PATCH v6 1/1 h2200: Add USB CDC ethernet support
Dear ?ukasz Da?ek,
Quoted 28 lines · Marek Vasut
Quoted 19 lines
Dear ?ukasz Da?ek,
Quoted 17 lines · Marek Vasut
Quoted 15 lines
Dear ?ukasz Da?ek,
[...]
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Why do I have to remove
CONFIG_H2200_USBETH? If I do so, I'm not be able to disable USB ethernet support.Why would you disable it?
Because of other gadgets, e.g. ttyACM
Can't these co-exist?
Best regards,
Marek VasutQuoted 7 lines
Quoted 1 line
No they can't.
Not even with the composite driver ? What's ttyacm and where is it in u-boot btw ?
Best regards,
Marek Vasut
Quoted 8 lines
As far as I know they can't exists on pxa25x. I don't know how about pxa27x.
ttyacm is a serial over usb.
Driver exists in u-boot for pxa27x (
gadget/usb/pxa27x_udc.c) but I have my own
for pxa25x not published.
Your own... what? Check the composite driver, add the ifdefs when you need them, not prematurely.
Best regards,
Marek Vasut
PATCH v7 1/1 h2200: Add USB CDC ethernet support
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
---
Changes for v7:
- Removed CONFIG_H2200_USBETH
Changes for v6:
- Defined only one entire for board
Changes for v5:
- Surrendered #include <usb.h> with CONFIGs
board/h2200/h2200.c | 11 +++++++++++ include/configs/h2200.h | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-)
board/h2200/h2200.c +11 -0
@@ -22,9 +22,16 @@#include <asm/arch/pxa.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> +#include <usb.h> DECLARE_GLOBAL_DATA_PTR ; +int board_eth_init (bd_t *bis) +{ +usb_eth_initialize (bis); +return 0 ; +} +int board_init (void ) {/* We have RAM, disable cache */
@@ -36,6 +43,10 @@ int board_init(void)/* adress of boot parameters */ gd->bd->bi_boot_params =0xa0000100 ; +/* Let host see that device is disconnected */ +udc_disconnect (); +mdelay (500 ); +return 0 ; }
include/configs/h2200.h +25 -0
@@ -153,4 +153,29 @@#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +#define CONFIG_CMD_NET +#define CONFIG_CMD_PING + +#define CONFIG_BOOTDELAY 2 +#define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +#define CONFIG_USB_GADGET_PXA2XX +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETH_SUBSET + +#define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" +#define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +#define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif /* __CONFIG_H */
Signature · 1 line
1.7.8.6
PATCH v7 1/1 h2200: Add USB CDC ethernet support
Dear Lukasz Dalek,
Quoted 4 lines
Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code.
Signed-off-by Lukasz Dalek <[email protected]>
I'll apply once -pxa is pulled into -next. Thanks
[...]
Best regards,
Marek Vasut