mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
This commit is contained in:
parent
27460be60d
commit
a33fada1c0
2 changed files with 36 additions and 0 deletions
|
@ -22,9 +22,16 @@
|
||||||
#include <asm/arch/pxa.h>
|
#include <asm/arch/pxa.h>
|
||||||
#include <asm/arch/pxa-regs.h>
|
#include <asm/arch/pxa-regs.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
#include <usb.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
int board_eth_init(bd_t *bis)
|
||||||
|
{
|
||||||
|
usb_eth_initialize(bis);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int board_init(void)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
/* We have RAM, disable cache */
|
/* We have RAM, disable cache */
|
||||||
|
@ -36,6 +43,10 @@ int board_init(void)
|
||||||
/* adress of boot parameters */
|
/* adress of boot parameters */
|
||||||
gd->bd->bi_boot_params = 0xa0000100;
|
gd->bd->bi_boot_params = 0xa0000100;
|
||||||
|
|
||||||
|
/* Let host see that device is disconnected */
|
||||||
|
udc_disconnect();
|
||||||
|
mdelay(500);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,4 +154,29 @@
|
||||||
|
|
||||||
#define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8"
|
#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 */
|
#endif /* __CONFIG_H */
|
||||||
|
|
Loading…
Reference in a new issue