From 0eb9dc76e2987a07de9101e026ff26b28fa7496b Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 4 Mar 2015 15:08:26 +0800 Subject: fdtdec: Improve fdtdec_get_pci_bdf() documentation Add the description that how the compatible property is involved in the fdtdec_get_pci_bdf() documentation. Signed-off-by: Bin Meng Acked-by: Simon Glass --- include/fdtdec.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index 5ac515d87d..11a7b86007 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -347,7 +347,10 @@ int fdtdec_get_pci_vendev(const void *blob, int node, /** * Look at the pci address of a device node that represents a PCI device - * and parse the bus, device and function number from it. + * and parse the bus, device and function number from it. For some cases + * like the bus number encoded in reg property is not correct after pci + * enumeration, this function looks through the node's compatible strings + * to get these numbers extracted instead. * * @param blob FDT blob * @param node node to examine -- cgit From e4ad6031a79fb3182613f95423ebcd771309679d Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 11 Mar 2015 11:25:56 +0800 Subject: x86: quark: Enable on-chip ethernet controllers Intel Quark SoC integrates two 10/100 ethernet controllers which can be connected to an external RMII PHY. The MAC IP is from Designware. Enable this support with the existing U-Boot Designware MAC driver so that the ethernet port on Intel Galileo board can be used. Signed-off-by: Bin Meng Acked-by: Simon Glass --- include/configs/galileo.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/configs/galileo.h b/include/configs/galileo.h index d745f4eb89..65a2c3e016 100644 --- a/include/configs/galileo.h +++ b/include/configs/galileo.h @@ -57,4 +57,9 @@ #define CONFIG_MMC_SDMA #define CONFIG_CMD_MMC +/* 10/100M Ethernet support */ +#define CONFIG_DESIGNWARE_ETH +#define CONFIG_DW_ALTDESCRIPTOR +#define CONFIG_PHYLIB + #endif /* __CONFIG_H */ -- cgit From a7c3d5e2a9f4d0feb1e21733434e6d29f5ac566b Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Fri, 20 Mar 2015 17:12:18 +0800 Subject: net: Add ethernet FCS length macro in net.h Some ethernet drivers use their own version of ethernet FCS length macro which is really common. We define ETH_FCS_LEN in net.h and replace those custom versions in various places. Signed-off-by: Bin Meng Acked-by: Joe Hershberger --- include/net.h | 2 ++ include/usb_ether.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/net.h b/include/net.h index 43e3d28729..237c932be3 100644 --- a/include/net.h +++ b/include/net.h @@ -191,6 +191,8 @@ struct ethernet_hdr { /* Ethernet header size */ #define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr)) +#define ETH_FCS_LEN 4 /* Octets in the FCS */ + struct e802_hdr { uchar et_dest[6]; /* Destination node */ uchar et_src[6]; /* Source node */ diff --git a/include/usb_ether.h b/include/usb_ether.h index b38d037fbe..23507e19e6 100644 --- a/include/usb_ether.h +++ b/include/usb_ether.h @@ -18,7 +18,6 @@ #define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ #define ETH_DATA_LEN 1500 /* Max. octets in payload */ #define ETH_FRAME_LEN PKTSIZE_ALIGN /* Max. octets in frame sans FCS */ -#define ETH_FCS_LEN 4 /* Octets in the FCS */ struct ueth_data { /* eth info */ -- cgit From 8ee443b8ebb6f533e5f42d8da05600a1996a4dfd Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Fri, 20 Mar 2015 17:12:20 +0800 Subject: net: Add Intel Topcliff GMAC driver Add a new driver for the Gigabit Ethernet MAC found on Intel Topcliff Platform Controller Hub. Tested under 10/100 half/full duplex and 1000 full duplex modes using ping and tftpboot commands. Signed-off-by: Bin Meng Acked-by: Joe Hershberger --- include/netdev.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/netdev.h b/include/netdev.h index 90140bd9bb..c69533e9aa 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -69,6 +69,7 @@ int natsemi_initialize(bd_t *bis); int ne2k_register(void); int npe_initialize(bd_t *bis); int ns8382x_initialize(bd_t *bis); +int pch_gbe_register(bd_t *bis); int pcnet_initialize(bd_t *bis); int ppc_4xx_eth_initialize (bd_t *bis); int rtl8139_initialize(bd_t *bis); @@ -123,6 +124,9 @@ static inline int pci_eth_init(bd_t *bis) #ifdef CONFIG_E1000 num += e1000_initialize(bis); #endif +#ifdef CONFIG_PCH_GBE + num += pch_gbe_register(bis); +#endif #ifdef CONFIG_PCNET num += pcnet_initialize(bis); #endif -- cgit From a84134f72147bc31babba8006f8a9bdc55bc5a03 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Fri, 20 Mar 2015 17:12:21 +0800 Subject: x86: crownbay: Enable Intel Topcliff GMAC support Intel Crown Bay board has one ethernet port connected from Intel Topcliff PCH. Enable it in the board configuration. Signed-off-by: Bin Meng Reviewed-by: Joe Hershberger --- include/configs/crownbay.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/crownbay.h b/include/configs/crownbay.h index b927b1c9f5..b1cfc8b065 100644 --- a/include/configs/crownbay.h +++ b/include/configs/crownbay.h @@ -52,6 +52,10 @@ #define CONFIG_MMC_SDMA #define CONFIG_CMD_MMC +/* Topcliff Gigabit Ethernet */ +#define CONFIG_PCH_GBE +#define CONFIG_PHYLIB + /* Video is not supported */ #undef CONFIG_VIDEO #undef CONFIG_CFB_CONSOLE -- cgit From fba02d69c6fc7f7861ada6181ab6097d20495027 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 11 Mar 2015 17:22:28 +0800 Subject: x86: crownbay: Enable saving environment in SPI flash Saving U-Boot's environment in SPI flash on Intel CrownBay board. Signed-off-by: Bin Meng Acked-by: Simon Glass --- include/configs/crownbay.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/configs/crownbay.h b/include/configs/crownbay.h index b1cfc8b065..df32f2ac52 100644 --- a/include/configs/crownbay.h +++ b/include/configs/crownbay.h @@ -60,4 +60,12 @@ #undef CONFIG_VIDEO #undef CONFIG_CFB_CONSOLE +/* Environment configuration */ +#undef CONFIG_ENV_IS_NOWHERE +#undef CONFIG_ENV_SIZE +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SIZE 0x1000 +#define CONFIG_ENV_SECT_SIZE 0x1000 +#define CONFIG_ENV_OFFSET 0 + #endif /* __CONFIG_H */ -- cgit From bea59393c88ba86f6433f8c277478f312ff0acf3 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 11 Mar 2015 17:22:29 +0800 Subject: x86: galileo: Enable saving environment in SPI flash Saving U-Boot's environment in SPI flash on Intel Galileo board. Signed-off-by: Bin Meng Acked-by: Simon Glass --- include/configs/galileo.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/configs/galileo.h b/include/configs/galileo.h index 65a2c3e016..288acf30f1 100644 --- a/include/configs/galileo.h +++ b/include/configs/galileo.h @@ -62,4 +62,12 @@ #define CONFIG_DW_ALTDESCRIPTOR #define CONFIG_PHYLIB +/* Environment configuration */ +#undef CONFIG_ENV_IS_NOWHERE +#undef CONFIG_ENV_SIZE +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SIZE 0x1000 +#define CONFIG_ENV_SECT_SIZE 0x1000 +#define CONFIG_ENV_OFFSET 0 + #endif /* __CONFIG_H */ -- cgit From 6f1eba49a558421e3fcb06ab0addc12b9a3804c6 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 12 Mar 2015 13:08:46 +0800 Subject: x86: Add ramboot and nfsboot commands in x86-common.h It is very common in the debug stage to test U-Boot loading a linux kernel. The commands to boot linux kernel with ramdisk and nfs as the root are common to all x86 targets, so it makes sense to add them as the U-Boot default environment in x86-common.h. Signed-off-by: Bin Meng Acked-by: Simon Glass --- include/configs/x86-common.h | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 994874ca60..b7dd63e060 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -243,7 +243,34 @@ #define CONFIG_CMD_USB -#define CONFIG_EXTRA_ENV_SETTINGS \ - CONFIG_STD_DEVICES_SETTINGS +/* Default environment */ +#define CONFIG_ROOTPATH "/opt/nfsroot" +#define CONFIG_HOSTNAME "x86" +#define CONFIG_BOOTFILE "bzImage" +#define CONFIG_LOADADDR 0x1000000 + +#define CONFIG_EXTRA_ENV_SETTINGS \ + CONFIG_STD_DEVICES_SETTINGS \ + "netdev=eth0\0" \ + "consoledev=ttyS0\0" \ + "othbootargs=acpi=off\0" \ + "ramdiskaddr=0x2000000\0" \ + "ramdiskfile=initramfs.gz\0" + +#define CONFIG_RAMBOOTCOMMAND \ + "setenv bootargs root=/dev/ram rw " \ + "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ + "console=$consoledev,$baudrate $othbootargs;" \ + "tftpboot $loadaddr $bootfile;" \ + "tftpboot $ramdiskaddr $ramdiskfile;" \ + "zboot $loadaddr 0 $ramdiskaddr $filesize" + +#define CONFIG_NFSBOOTCOMMAND \ + "setenv bootargs root=/dev/nfs rw " \ + "nfsroot=$serverip:$rootpath " \ + "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ + "console=$consoledev,$baudrate $othbootargs;" \ + "tftpboot $loadaddr $bootfile;" \ + "zboot $loadaddr" #endif /* __CONFIG_H */ -- cgit