summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | arm: mvebu: Don't use 0 as board ID as its used for the custom boardsStefan Roese2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using board ID 0 is reserved for the non-Marvell "custom" boards. So move the board ID's to reflect this. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Phil Sutter <phil@nwl.cc>
| * | arm: mvebu: Simplify code in setup_usb_phys() a bitStefan Roese2016-01-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Use the clrbits() / setbits() functions instead of clrsetbits() when bit are only cleared or set. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Don't disable cache at startup on Armada XP at allStefan Roese2016-01-141-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch leaces the cache configuration untouched for the AXP in the setup done by the BootROM. Resulting in the cache still being enabled at the startup of U-Boot. This leads to a slightly faster boot to the U-Boot prompt (or Linux of course). Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Remove SYS_MALLOC_CLEAR_ON_INIT from DB-MV784MP-GP AXP boardStefan Roese2016-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | By removing CONFIG_SYS_MALLOC_CLEAR_ON_INIT, the bootup time is a bit faster. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Don't call arch_cpu_init() from SPL at allStefan Roese2016-01-143-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the call to arch_cpu_init() in the SPL U-Boot version. As SPL does not need all the configuration done in this function. And also does not need the reconfiguration of the internal register address to 0xf1000000. This will be done by the main U-Boot later on. This also fixes a problem with the timer not beeing initialized on AXP, as needed for the mdelay in the setup_usb_phys(). This will now only be called once in main U-Boot. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Add v7_outer_cache_disable function for AXP & A38xStefan Roese2016-01-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functionality to correctly disable the L2 cache on the Armada XP and 38x platforms. Without this, booting into Linux on ClearFog (A38x) results in a hangup without any output on the serial console at all. Even with earlyprintk enabled. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Enable L2 cache on Armada XPStefan Roese2016-01-141-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the L2 cache was never enabled again in U-Boot. To get even better performance (bootup time), lets enable the L2 cache in U-Boot. This code was taken from the Linux kernel. A performance gain was measured on the DB-MV784MP-GP board by testing with tftpboot and sata commands. This patch also cleans up the L2 cache related code. And makes sure that the L2 cache is only disabled once. Please note that A38x still runs with L2 cache disabled. And needs to be enabled for this SoC in a separate patch if needed or desired. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: db-mv784mp-gp: Enable cache commandStefan Roese2016-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Th cache command can be useful sometimes. So lets enable it on the AXP eval board. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: db-mv784mp-gp: Enable common file-system supportStefan Roese2016-01-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the common FS options to the Marvell AXP eval board. This includes EXT2, EXT4, FAT and VFAT. And of course the generic FS commands. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: db-mv784mp-gp: Switch from IDE to SATA supportStefan Roese2016-01-141-27/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the newly introduced SATA driver for the Marvell AXP with DMA support instead of the PIO-only IDE driver. This increases the transfer speed. And is also more in-line with the Armada 38x ports, which also use a SATA driver (AHCI) and the "sata" U-Boot commands. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | sata: Add SATA driver with DMA support for Marvell Kirkwood and Armada XPTor Krill2016-01-142-0/+1046
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new SATA driver for the Marvell Kirkwood and Armada 370 / XP SoC's. This driver supports the SATA controller of some Mavell SoC's. Here a (most likely incomplete) list of the supported SoC's: - Kirkwood - Armada 370 - Armada XP This driver implementation is an alternative to the already available driver via the "ide" commands interface (drivers/block/mvsata_ide.c). But this driver only supports PIO mode and as this new driver also supports transfer via DMA, its much faster. Please note, that the newer SoC's (e.g. Armada 38x) are not supported by this driver. As they have an AHCI compatible SATA controller integrated. The original version of this driver was sent by Tor Krill to the U-Boot list a few years ago. Here the link: http://lists.denx.de/pipermail/u-boot/2010-June/073147.html Changes by Stefan: - Coding-style cleanup - Support for Armada XP added - MBUS window setup added - D-cache flush and invalidation added - works with dcache enabled on Armada XP - Removed mdelay() from ata_wait_register() and add timer based timeout detection to speed up the transfer Signed-off-by: Tor Krill <tor@excito.com> Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Tom Rini <trini@konsulko.com>
| * | arm: mvebu: Add SolidRun ClearFog Armada 38x initial supportStefan Roese2016-01-1412-0/+929
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic support for the SolidRun ClearFog Armada 38x based board to mainline U-Boot. Supported interfaces / devices are: - DDR3 - UART - MMC - Ethernet port 0 (connected to dedicated PHY) - I2C The included DT source was taken from Russell King's ftp server: http://www.home.arm.linux.org.uk/~rmk/clearfog/ With only minor modifications, like the addition of some aliases and the "u-boot,dm-pre-reloc" property. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Rabeeh Khoury <rabeeh@solid-run.com> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Move some defines to common include fileStefan Roese2016-01-144-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves some config options to the mvebu common include file. Making it easier to not forget these defines for new boards. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
| * | net: mvneta: Convert to driver modelStefan Roese2016-01-149-167/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update this driver to support driver model. As all MVEBU boards using this driver are converted with this patch, the non-driver-model code can be removed completely. This is also the reason why this patch is quite big and includes a) the driver change and b) the platform change. As its not git-bisect save otherwise. With this conversion, some parameters are now extracted from the DT instread of using the config header defines. The supported properties right now are: PHY-mode ("phy-mode") and PHY-address ("reg"). The base addresses for the ethernet controllers can be removed from the header files as well. Please note that this patch also removes the E1000 network driver from some MVEBU config headers. This is necessary, as with DM_ETH configured and the e1000 driver enabled, the PCI driver also needs to support DM. But the MVEBU PCI(e) driver still needs to get ported to DM. When this is done, the E1000 driver can be enabled again. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Simon Glass <sjg@chromium.org>
| * | arm: mvebu: armada-388-gp.dts: Add ethernet aliasesStefan Roese2016-01-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Adding these aliases enables the update of the MAC addresses from within U-Boot. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Add armada-xp-maxbcm.dts for maxbcm boardStefan Roese2016-01-143-2/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for the upcoming ethernet DM conversion of the maxbcm board. The configuration of the PHY is then extracted from the DT instead of using the defines from the config header. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu: Add SPI driver model supportStefan Roese2016-01-148-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the DM support for the SPI driver and the SPI NOR flash chips. Some MVEBU boards boot from SPI NOR, so adding the aliases and enabling CONFIG_DM_SEQ_ALIAS is needed here. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Simon Glass <sjg@chromium.org>
| * | spi: kirkwood_spi.c: Add driver model supportStefan Roese2016-01-141-63/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds driver model support to the kirkwood SPI driver. Which is also used on the MVEBU SoC's, now being converted to DM. Non-DM support is still available for the "older" platforms using this driver, like kirkwood. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Valentin Longchamp <valentin.longchamp@keymile.com> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Jagan Teki <jteki@openedev.com> Cc: Simon Glass <sjg@chromium.org>
| * | spi: kirkwood_spi.c: Prepare for driver model supportStefan Roese2016-01-141-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch prepares the Kirkwood SPI driver, also used on the MVEBU board (Armada XP / 38x), for the conversion to driver model. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Valentin Longchamp <valentin.longchamp@keymile.com> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Jagan Teki <jteki@openedev.com> Cc: Simon Glass <sjg@chromium.org>
| * | arm: mvebu: Add DM and OF_CONTROL support to SPLStefan Roese2016-01-1417-77/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds full DM support to the SPL on MVEBU. Currently only serial is supported. Other drivers will follow. This patch also adds the necessary config values for the DEBUG UART to the MVEBU defconfig files. This came in handy while implementing this DM support. Additionally, the mvebu specific SPL linker script is removed and this common one is used instead: arch/arm/cpu/u-boot-spl.lds This common linker script already handles all special cases. No need to reinvent the wheel for MVEBU here. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Simon Glass <sjg@chromium.org>
| * | arm: mvebu: ddr: Fix compilation warningStefan Roese2016-01-142-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 5.1 generates this new warning (for Armada 38x platforms): drivers/ddr/marvell/a38x/ddr3_debug.c: In function 'hws_ddr3_tip_read_training_result': drivers/ddr/marvell/a38x/ddr3_debug.c:177:40: warning: 'sizeof' on array function parameter 'result' will return size of 'enum hws_result (*)[1]' [-Wsizeof-array-argument] memcpy(result, training_result, sizeof(result)); ^ drivers/ddr/marvell/a38x/ddr3_debug.c:171:31: note: declared here u32 dev_num, enum hws_result result[MAX_STAGE_LIMIT][MAX_INTERFACE_NUM]) ^ Since this functions is not referenced anywhere, lets just remove it. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
| * | arm: mvebu/kirkwood: Use common timer functionsStefan Roese2016-01-143-124/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using the common timer functions for mvebu/kirkwood we can get rid of quite a lot of code. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
* | | common: env_flags: fix loop condition when using env_flags_varaccess_maskPeng Fan2016-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should use ARRAY_SIZE, but not sizeof. The size of env_flags_varaccess_mask is 16bytes, but we only need 4 loops. If using 16 as the end condition, we may access memory that not belong to array env_flags_varaccess_mask. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: York Sun <yorksun@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | common: cli_simple: use strlcpy instead of strcpyPeng Fan2016-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report Coverity log: Destination buffer too small (STRING_OVERFLOW) string_overflow: You might overrun the 1024 byte destination string lastcommand by writing 1025 bytes from console_buffer Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Re-enable setexpr on Raspberry PiMarco Schuster2016-01-132-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch re-enables the setexpr command, I don't really understand why it got excluded in the first place. setexpr can be used e.g. to implement failed-boot-counters and failovers to rescue firmware. Signed-off-by: Marco Schuster <m.schuster91@googlemail.com>
* | | cmd_boot: Add a poweroff commandMichael van Slingerland2016-01-133-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* | | net: lpc32xx: fix ignored MDIO busy wait status on readVladimir Zapolskiy2016-01-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change fixes PHY write operation, which incorrectly waits for released busy state before issuing a write operation, this breaks sequential write/read operation logic, because read operation starts immediately on request and it completes, when busy state is gone. Instead of adding the second preceding busy state check to read function, do busy state release check after issuing a write operation, this method of operation is also recommended by the LPC32xx User's Manual, see MII Mgmt Indicators Register notes: For PHY Write if scan is not used: 1. Write 0 to MCMD 2. Write PHY address and register address to MADR 3. Write data to MWTD 4. Wait for busy bit to be cleared in MIND Reported-by: Alexandre Messier <amessier@tycoint.com> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Tested-by: Alexandre Messier <amessier@tycoint.com>
* | | sniper: Mux configuration cleanupPaul Kocialkowski2016-01-131-37/+37
| | | | | | | | | | | | | | | | | | | | | This cleans up the mux configuration a bit, setting mmc clock signals to input enabled and specifying pull-down (0) when pull is not used. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* | | sniper: Various boot-related env settings, devicetree supportPaul Kocialkowski2016-01-131-15/+11
| | | | | | | | | | | | | | | | | | | | | This adds various env settings for more flexible boot possibilities, including devicetree support and distro defaults config. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* | | lpc32xx: devkit3250: update board configuration fileVladimir Zapolskiy2016-01-131-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change updates DevKit3250 board powerd by NXP LPC3250 SoC: * due to increased resulting U-boot image size give more space to store loaded and relocated versions, * add DMA support, which is used by NAND SLC driver, * add NXP OHCI and PHY drivers to the image, * add USB, JFFS and FAT commands. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
* | | arm: lpc32xx: switch SPL builds to driver modelVladimir Zapolskiy2016-01-134-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For NXP LPC32xx boards the change enables SPL_DM option, this allows to use any driver model UART driver in SPL images, hence a restriction on HSUART in SPL image is removed and well as definitions for non-DM NS16550 driver, its DM version is used instead. Because SPL_DM requires malloc(), enable CONFIG_SPL_SYS_MALLOC_SIMPLE for LPC32xx boards. The change adds about 5KB to the resulting SPL image (for devkit3250 board SPL image is increased from 10672 to 15608 bytes). Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | arm: lpc32xx: switch serial console to driver modelVladimir Zapolskiy2016-01-134-17/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On NXP LPC32xx platform for non-SPL builds the change adds standard (NS16550) and high-speed UARTs to driver model. Due to specific of DM NS16550 device description UART clock can not be got in runtime and by default it is set to 13MHz, if board PERIPH_CLK is different, this should be specified in board configuration file. For SPL builds HSUARTs are disabled and non-DM NS16550 driver is compiled, if needed. The change also updates default configs of devkit3250 and work_92105 boards to reflect updates in platform files. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | serial: lpc32xx hsuart: port driver to driver modelVladimir Zapolskiy2016-01-132-39/+82
| | | | | | | | | | | | | | | | | | | | | | | | The change ports NXP LPC32xx 14-clock UART device driver to driver model. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | test/fs: error case fixes/enhancementsStephen Warren2016-01-131-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use "mkdir -p" to avoid errors when intermediate directories are missing. - Fall back to "dd" when "fallocate" fails. For example, fallocate isn't supported on ext4. - Add error checking for test image generation. Without this, the test simply plows on spewing all kinds of errors which are hard to immediately root-cause. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | | omap4_panda: Convert to config_distro_bootcmd.hTom Rini2016-01-131-24/+27
| | | | | | | | | | | | | | | | | | | | | Based on the am335x_evm conversion, switch to config_distro_bootcmd for mmc and pxe. Tested with Fedora 23. Signed-off-by: Tom Rini <trini@konsulko.com>
* | | ti_armv7_common.h: Add CONFIG_CMD_EXT4_WRITETom Rini2016-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | Given that with config_distro_defaults.h we always have ext4 read support, add in write support. Signed-off-by: Tom Rini <trini@konsulko.com>
* | | am335x_evm.h: unsed CONFIG_BOOTDELAYTom Rini2016-01-131-4/+0
| | | | | | | | | | | | | | | | | | | | | Now that ti_armv7_common.h uses config_distro_defaults.h we don't need to include it again and then undef CONFIG_BOOTDELAY Signed-off-by: Tom Rini <trini@konsulko.com>
* | | ext4_common.c: Clean up failure cases in alloc_triple_indirect_blockTom Rini2016-01-131-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted by Coverity, when we have an error in alloc_triple_indirect_block we will leak ti_pbuff_start_addr as it's not being freed. Further inspection here shows that we could also leak ti_cbuff_start_addr in one corner case so free that as well. Reported-by: Coverity (CID 131205, 131206) Signed-off-by: Tom Rini <trini@konsulko.com>
* | | ums: support multiple LUNs at onceStephen Warren2016-01-134-49/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the ums command to accept a list of block devices. Each of these will be exported as a separate LUN. An example use-case would be: ums 0 mmc 0,0.1,0.2 ... which would export LUNs for eMMC 0's user data, boot0, and boot1 HW partitions. This is useful since it allows the host access to everything on the eMMC without having to somehow stop the ums command from executing and restart it with different parameters. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | | mmc: store hwpart in the block deviceStephen Warren2016-01-137-47/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow us to have multiple block device structs each referring to the same eMMC device, yet different HW partitions. For now, there is still a single block device per eMMC device. As before, this block device always accesses whichever HW partition was most recently selected. Clients wishing to make use of multiple block devices referring to different HW partitions can simply take a copy of this block device once it points at the correct HW partition, and use each one as they wish. This feature will be used by the next patch. In the future, perhaps get_device() could be enhanced to return a dynamically allocated block device struct, to avoid the client needing to copy it in order to maintain multiple block devices. However, this would require all users to be updated to free those block device structs at some point, which is rather a large change. Most callers of mmc_switch_part() wish to permanently switch the default MMC block device's HW partition. Enhance mmc_switch_part() so that it does this. This removes the need for callers to do this. However, common/env_mmc.c needs to save and restore the current HW partition. Make it do this more explicitly. Replace use of mmc_switch_part() with mmc_select_hwpart() in order to remove duplicate code that skips the call if that HW partition is already selected. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | | block: pass block dev not num to read/write/erase()Stephen Warren2016-01-1341-194/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | | arm: move gd handling outside of C codeAlbert ARIBAUD2016-01-133-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of gcc 5.2.1 for Thumb-1, it is not possible any more to assign gd from C code, as gd is mapped to r9, and r9 may now be saved in the prolog sequence, and restored in the epilog sequence, of any C functions. Therefore arch_setup_gd(), which is supposed to set r9, may actually have no effect, causing U-Boot to use a bad address to access GD. Fix this by never calling arch_setup_gd() for ARM, and instead setting r9 in arch/arm/lib/crt0.S, to the value returned by board_init_f_alloc_reserve(). Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Fix board init code to respect the C runtime environmentAlbert ARIBAUD2016-01-1310-49/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | board_init_f_mem() alters the C runtime environment's stack it is actually already using. This is not a valid behaviour within a C runtime environment. Split board_init_f_mem into C functions which do not alter their own stack and always behave properly with respect to their C runtime environment. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Thomas Chou <thomas@wytron.com.tw>
* | | Merge branch 'master' of git://www.denx.de/git/u-boot-microblazeTom Rini2016-01-1320-3/+26
|\ \ \
| * | | arm: socfpga: Enable SPL_DM_SEQ_ALIAS for all SOCFPGA configsNathan Rossi2016-01-136-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is required in SPL to enable support for loading from SPI flash. Also clean up the #define in socfpga_common.h. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked: Marek Vasut <marex@denx.de> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Chin-Liang See <clsee@altera.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | arm: mvebu: Select SPL_DM_SEQ_ALIASNathan Rossi2016-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select SPL_DM_SEQ_ALIAS which is required for certain uclasses, specifically SPI Flash. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | arm: zynq: Enable SPL_DM_SEQ_ALIAS for all Zynq configsNathan Rossi2016-01-1310-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is required in SPL to enable support for loading from SPI flash when the device is booted from QSPI. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | spl: dm: Add SPL_DM_SEQ_ALIAS config optionNathan Rossi2016-01-133-2/+10
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Device Model sequence alias feature is required by some Uclasses. Instead of disabling the feature for all SPL targets allow it to be configured. The config option is disabled by default to reduce code size for targets that are not interested or do not require this feature. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Michal Simek <michal.simek@xilinx.com> Cc: Simon Glass <sjg@chromium.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Marek Vasut <marex@denx.de> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | Merge git://git.denx.de/u-boot-netTom Rini2016-01-135-148/+42
|\ \ \
| * | | net: e1000: Mark _disable_wr() and _write_status() as __maybe_unusedBin Meng2015-12-211-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the comments, e1000_spi_eeprom_disable_wr() and e1000_spi_eeprom_write_status() have been tested. Remove the #if 0, #endif and mark them as __maybe_unused. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
OpenPOWER on IntegriCloud