summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | dm: sunxi: Use driver model for Ethernet on Linksprite pcDuino3Simon Glass2015-04-181-0/+1
| | | | | | | | | | | | Switch this board over to use driver model for Ethernet. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: sunxi: Support driver model for EthernetSimon Glass2015-04-181-3/+7
| | | | | | | | | | | | | | | | | | Adjust the Ethernet initialisation code to support driver model. It is no-longer necessary to call designware_initialize(). The device will be probed when it is used. The PHY type and GMAC base will come from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: net: Adjust designware driver to support driver modelSimon Glass2015-04-182-17/+153
| | | | | | | | | | | | | | | | Add driver model support to the designware driver. This reuses most of the existing code except for some duplication in the probe() method. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | dm: net: Tidy up designware driver ready for driver modelSimon Glass2015-04-181-34/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the error handling to use errno.h instead of returning -1. Change leaf functions to pass in the arguments they require rather than struct eth_device. Apart from simplifying the code it makes is easier to reuse these functions for driver model, since mostly they actually only use struct dw_eth_priv (which we can keep). Create a stub for each Ethernet operation function. This will allow use to share code with the driver model versions. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | dm: net: Adjust PHY interface to work with CONFIG_DM_ETHSimon Glass2015-04-184-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | When driver model is used for Ethernet a few functions are passed a udevice instead of an eth_device. Also add a function to find a PHY type given its name. This will be used to decode the device tree node. Finally, put a phy_interface field in struct eth_pdata since this is an important part of the platform data for Ethernet. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | Avoid calling print_eths() with driver modelSimon Glass2015-04-181-1/+1
| | | | | | | | | | | | | | This function is not supported with driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | dm: net: Use existing Ethernet init for driver modelSimon Glass2015-04-181-37/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | At present even with driver model is used there is still much manual init of related devices: PHY, environment and board init. Until these requirements are dealt with in another way we need to keep them around. Break out the init portion of the legacy eth_initialize() into a separate function and call it from both the legacy and driver model eth_initialize() functions. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | dts: sunxi: Bring in Ethernet device tree bindingsSimon Glass2015-04-185-0/+161
| | | | | | | | | | | | | | | | Since we will use these bindings on sunxi, bring them in from Linux 4.0-rc1. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | Kconfig: Move CONFIG_DESIGNWARE_ETH to KconfigSimon Glass2015-04-1868-17/+166
| | | | | | | | | | | | | | | | | | | | Move this to Kconfig and clean up board config files that use it. Also rename it to CONFIG_ETH_DESIGNWARE to fit with the naming that exists in drivers/net/Kconfig. Signed-off-by: Simon Glass <sjg@chromium.org> Version 1: Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | sunxi: Replace the pcDuino3 config with FDT versionSimon Glass2015-04-182-15/+7
| | | | | | | | | | | | | | | | | | We currently have Linksprite_pcDuino3 and Linksprite_pcDuino3_fdt. Drop the former in favour of the latter. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sandbox: Enable more network features for sandboxJoe Hershberger2015-04-181-0/+9
| | | | | | | | | | | | | | More net features enabled and supported on sandbox to allow more testing Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: Fix compile errors when SNTP enabled and not DATEJoe Hershberger2015-04-181-1/+5
| | | | | | | | | | | | | | | | When SNTP is enabled and DATE is not, to_tm() is not built in. It could be defined when TIMESTAMP is defined, so check for that. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: Convert protocol structures to use explicit sizesSergey Temerkhanov2015-04-182-63/+63
| | | | | | | | | | | | | | | | | | Convert uchar/ushort to u8/u16 respectively. Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: Fix incorrect DHCP/BOOTP packets on 64-bit systemsSergey Temerkhanov2015-04-183-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | This commit fixes incorrect DHCP/BOOTP packet layout caused by 'ulong' type size difference on 64 and 32-bit architectures. It also renames NetReadLong()/NetCopyLong() to net_read_u32/net_copy_u32() accordingly. Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Fix checkpatch.pl failures in net.cJoe Hershberger2015-04-1821-184/+181
| | | | | | | | | | | | | | Finish eliminating CamelCase from net.c and other failures Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Fix checkpatch.pl failures in net.hJoe Hershberger2015-04-181-6/+6
| | | | | | | | | | | | | | | | There were still a few remaining complains in the legacy eth_device definition that hadn't been addressed. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Fix checkpatch.pl failures in eth.cJoe Hershberger2015-04-181-10/+16
| | | | | | | | | | | | | | | | There were still a few failures in net/eth.c, especially in the legacy part of the code. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Fix checkpatch.pl failures in linklocalJoe Hershberger2015-04-181-19/+17
| | | | | | | | | | | | | | A few new rules in checkpatch.pl since linklocal.c was added. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up cmd_net variables and functionsJoe Hershberger2015-04-183-33/+32
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within common/cmd_net.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up netconsole variables and functionsJoe Hershberger2015-04-183-17/+19
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within netconsole.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up DNS variables and functionsJoe Hershberger2015-04-185-35/+32
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within dns.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up CDP variables and functionsJoe Hershberger2015-04-185-49/+46
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within cdp.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up ping variables and functionsJoe Hershberger2015-04-181-6/+7
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within ping.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up SNTP variables and functionsJoe Hershberger2015-04-183-16/+13
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within sntp.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up RARP variables and functionsJoe Hershberger2015-04-183-17/+16
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within rarp.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up NFS variables and functionsJoe Hershberger2015-04-183-100/+79
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within nfs.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up DHCP variables and functionsJoe Hershberger2015-04-183-72/+69
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within bootp.c and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up ARP variables and functionsJoe Hershberger2015-04-184-55/+54
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within arp and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Clean up TFTP variables and functionsJoe Hershberger2015-04-184-254/+259
| | | | | | | | | | | | | | | | Make a thorough pass through all variables and function names contained within tftp and remove CamelCase and improve naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Fix var naming net <-> eth driversJoe Hershberger2015-04-1872-209/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the naming convention used in the network stack functions and variables that Ethernet drivers use to interact with it. This cleans up the temporary hacks that were added to this interface along with the DM support. This patch has a few remaining checkpatch.pl failures that would be out of the scope of this patch to fix (drivers that are in gross violation of checkpatch.pl). Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Cleanup internal packet buffer namesJoe Hershberger2015-04-1813-80/+82
| | | | | | | | | | | | | | This patch cleans up the names of internal packet buffer names that are used within the network stack and the functions that use them. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | net: cosmetic: Name ethaddr variables consistentlyJoe Hershberger2015-04-1865-173/+171
| | | | | | | | | | | | | | | | Use "_ethaddr" at the end of variables and drop CamelCase. Make constant values actually 'const'. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Fixup var names for DHCP stringsJoe Hershberger2015-04-184-39/+36
| | | | | | | | | | | | | | | | Remove CamelCase variable naming. Move the definition to the same compilation unit as the primary use. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Fixup var names related to boot fileJoe Hershberger2015-04-1810-62/+70
| | | | | | | | | | | | | | | | The variables around the bootfile were inconsistent and used CamelCase. Update them to make the code more readable. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | net: cosmetic: Change IPaddr_t to struct in_addrJoe Hershberger2015-04-1822-337/+363
| | | | | | | | | | | | | | | | | | This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* | powerpc: ids8313: use "select" instead of default value in defconfigMasahiro Yamada2015-04-182-1/+1
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: cm_fx6: use "select" instead of default value in defconfigMasahiro Yamada2015-04-182-3/+3
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: stv0991: use "select" instead of default value in defconfigMasahiro Yamada2015-04-182-2/+2
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: bav335x: use "select" instead of default value in defconfigMasahiro Yamada2015-04-183-6/+2
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: socfpga: use "select" instead of default value in defconfigMasahiro Yamada2015-04-184-9/+6
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: mx6: use "select" instead of default value in defconfigMasahiro Yamada2015-04-188-14/+6
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: snapper9260: use "select" instead of default value in defconfigMasahiro Yamada2015-04-183-6/+3
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: rmobile: use "select" instead of default value in defconfigMasahiro Yamada2015-04-187-12/+12
| | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: zynq: use "select" instead of default value in defconfigMasahiro Yamada2015-04-188-7/+1
| | | | | | | | | | | | | | | | All the Zynq boards have switch to Driver Model. "select DM" is better than default value in each defconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ARM: UniPhier: use "select" instead of default value in defconfigMasahiro Yamada2015-04-184-9/+3
| | | | | | | | | | | | | | | | All the UniPhier boards have switch to Driver Model. "select DM" is better than default value in each defconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | dm: select CONFIG_DM* optionsMasahiro Yamada2015-04-1843-230/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in the previous commit, adding default values in each Kconfig causes problems because it does not co-exist with the "depends on" syntax. (Please note this is not a bug of Kconfig.) We should not do so unless we have a special reason. Actually, for CONFIG_DM*, we have no good reason to do so. Generally, CONFIG_DM is not a user-configurable option. Once we convert a driver into Driver Model, the board only works with Driver Model, i.e. CONFIG_DM must be always enabled for that board. So, using "select DM" is more suitable rather than allowing users to modify it. Another good thing is, Kconfig warns unmet dependencies for "select" syntax, so we easily notice bugs. Actually, CONFIG_DM and other related options have been added without consistency: some into arch/*/Kconfig, some into board/*/Kconfig, and some into configs/*_defconfig. This commit prefers "select" and cleans up the following issues. [1] Never use "CONFIG_DM=n" in defconfig files It is really rare to add "CONFIG_FOO=n" to disable CONFIG options. It is more common to use "# CONFIG_FOO is not set". But here, we do not even have to do it. Less than half of OMAP3 boards have been converted to Driver Model. Adding the default values to arch/arm/cpu/armv7/omap3/Kconfig is weird. Instead, add "select DM" only to appropriate boards, which eventually eliminates "CONFIG_DM=n", etc. [2] Delete redundant CONFIGs Sandbox sets CONFIG_DM in arch/sandbox/Kconfig and defines it again in configs/sandbox_defconfig. Likewise, OMAP3 sets CONFIG_DM arch/arm/cpu/armv7/omap3/Kconfig and defines it also in omap3_beagle_defconfig and devkit8000_defconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | dm: spi_flash: fix wrong dependencyMasahiro Yamada2015-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_SPI does not exist in Kconfig in the first place, so the dependency "depends on DM && SPI" is never met, i.e., DM_SPI_FLASH can never be enabled (unless you ignore the dependency in an illegal way. See below.) Actually, some defconfigs such as socfpga_*_defconfig define CONFIG_DM_SPI_FLASH=y, but it never appears in the .config file because of this wrong dependency. On the other hand, all the Tegra boards enable DM_SPI_FLASH because config DM_SPI_FLASH default y silently ignores the dependency. Unfortunately, this style of CONFIG definition is abused everywhere in U-Boot, so we easily miss such a wrong dependency. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* | dm: usb: Add a README for driver modelSimon Glass2015-04-181-0/+415
| | | | | | | | | | | | | | Add some documentation describing how USB is implemented with USB. This might make things easier for people to understand. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: usb: Add tests for the USB uclassSimon Glass2015-04-184-0/+95
| | | | | | | | | | | | | | | | This adds a simple test for probing and a functional test using the flash stick emulator, which tests a large chunk of the USB stack. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* | dm: test: Allow 'dm test' to select a particular test to runSimon Glass2015-04-183-8/+17
| | | | | | | | | | | | | | As well as running all tests, it is useful to be able to run a selected test. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
OpenPOWER on IntegriCloud