summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* dm: block: Adjust device calls to go through helpers functionSimon Glass2016-03-141-0/+29
| | | | | | | | | | | | To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: block: Rename device number member dev to devnumSimon Glass2016-03-141-1/+1
| | | | | | | | | This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: sandbox: Enable cbfs and cramfsSimon Glass2016-03-141-0/+3
| | | | | | | | Enable these two filesystems to provide better build coverage in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: part: Rename some partition functionsSimon Glass2016-03-141-11/+10
| | | | | | | | Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: part: Convert partition API use to linker listsSimon Glass2016-03-141-31/+48
| | | | | | | | | | | | | | | | | | | We can use linker lists instead of explicitly declaring each function. This makes the code shorter by avoiding switch() statements and lots of header file declarations. While this does clean up the code it introduces a few code issues with SPL. SPL never needs to print partition information since this all happens from commands. SPL mostly doesn't need to obtain information about a partition either, except in a few cases. Add these cases so that the code will be dropped from each partition driver when not needed. This avoids code bloat. I think this is still a win, since it is not a bad thing to be explicit about which features are used in SPL. But others may like to weigh in. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: sandbox: Enable all partition typesSimon Glass2016-03-141-1/+4
| | | | | | | | | | | | | It is useful to have sandbox build as much code as possible to avoid having to build every board to detect build errors. Also we may add tests for some more partition types at some point. Enable all partition types in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: blk: Rename get_device_and_partition()Simon Glass2016-03-141-4/+38
| | | | | | | | | | Rename this function to blk_get_device_part_str(). This is a better name because it makes it clear that the function returns a block device and parses a string. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: blk: Rename get_device() to blk_get_device_by_str()Simon Glass2016-03-141-4/+30
| | | | | | | | | | The current name is too generic. The function returns a block device based on a provided string. Rename it to aid searching and make its purpose clearer. Also add a few comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: blk: Rename get_dev() to blk_get_dev()Simon Glass2016-03-141-3/+3
| | | | | | | | | The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: blk: Add comments to a few functionsSimon Glass2016-03-141-0/+30
| | | | | | | | | The block interface is not well documented in the code. Pick two important functions and add comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: blk: Convert interface type to an enumSimon Glass2016-03-141-12/+15
| | | | | | | | | | | | Since these are sequentially numbered it makes sense to use an enum. It avoids having to maintain the maximum value, and provides a type we can use if it is useful. In fact the maximum value is not used. Rename it to COUNT, since MAX suggests it is the maximum valid value, but it is not. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: Add a new header for block devicesSimon Glass2016-03-143-58/+74
| | | | | | | | | | | At present block devices are tied up with partitions. But not all block devices have partitions within them. They are in fact separate concepts. Create a separate blk.h header file for block devices. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: part: Drop the common.h headerSimon Glass2016-03-141-1/+0
| | | | | | | | | We should not include <common.h> in header files. Each C file should include it if needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: Drop the block_dev_desc_t typedefSimon Glass2016-03-1416-86/+94
| | | | | | | | | Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* debug_uart: output CR along with LFMasahiro Yamada2016-03-141-1/+3
| | | | | | | | | The serial output from the debug UART carries on going far to the right in the console. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: core: Add uclass_first_device_err() to return a valid deviceSimon Glass2016-03-141-2/+13
| | | | | | | | A common pattern is to call uclass_first_device() and then check if it actually returns a device. Add a new function which does this, returning an error if there are no devices in that uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
* exynos5: common: Enable CONFIG_USB_ETHER_RTL8152 ethernet supportAnand Moon2016-03-111-0/+1
| | | | | | | | | | | | Enable CONFIG_USB_ETHER_RTL8152 support for Odroid XU4 which has support for RTL8153-CG gigabit Ethernet adapter, connected over USB 3.0. commit 9dc8ba19c50fc0b1623c654bcfe6caa903a4c36c added support for Realtek 8152/8153 driver. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* malloc: use hidden visibilityStephen Warren2016-03-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running sandbox, the following phases occur, each with different malloc implementations or behaviors: 1) Dynamic linker execution, using the dynamic linker's own malloc() implementation. This is fully functional. 2) After U-Boot's malloc symbol has been hooked into the GOT, but before any U-Boot code has run. This phase is entirely non-functional, since U-Boot's gd symbol is NULL and U-Boot's initf_malloc() and mem_malloc_init() have not been called. At least on Ubuntu Xenial, the dynamic linker does make both malloc() and free() calls during this phase. Currently these free() calls crash since they dereference gd, which is NULL. U-Boot itself makes no use of malloc() during this phase. 3) U-Boot execution after gd is set and initf_malloc() has been called. This is fully functional, albeit via a very simple malloc() implementation. 4) U-Boot execution after mem_malloc_init() has been called. This is fully functional with a complete malloc() implementation. Furthermore, if code that called malloc() during phase 1 calls free() in phase 3 or later, it is likely that heap corruption will occur, since U-Boot's malloc implementation will assume the pointer is part of its own heap, although it isn't. I have not actively observed this happening. To prevent phase 2 from happening, this patch makes all of U-Boot's malloc library public symbols have hidden visibility. This prevents them from being hooked into the GOT, so only code in the U-Boot binary itself actually calls them; any other code will call into the standard C library malloc(). This also avoids the "furthermore" issue mentioned above. I have seen references to this GCC pragma in blog posts from 2008, and RHEL5's ancient gcc appears to accept it fine, so I believe it's quite safe to use it without checking gcc version. Cc: Rabin Vincent <rabin@rab.in> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* OMAP3: am3517_evm: Add NAND MTD partitions with UBI/UBIFS supportDerald D. Woods2016-03-081-158/+151
| | | | | | | | | | | | - Add required UBI/UBIFS config definitions - Add reasonable MTD partition layout - Remove JFFS2 config definitions - Drop some CFI verbage and definitions - Make comment 'one-liners' truly one line - Improve readability and content arrangement Signed-off-by: Derald D. Woods <woods.technical@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* OMAP3: am3517_evm: Use BCH8 ECC for NANDDerald D. Woods2016-03-081-7/+16
| | | | | | | | Select 8-bit BCH ecc-scheme with s/w based error correction - OMAP_ECC_BCH8_CODE_HW_DETECTION_SW Signed-off-by: Derald D. Woods <woods.technical@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* mx53ard: Move to booting zImageFabio Estevam2016-03-021-8/+10
| | | | | | | | | | Move to booting a zImage kernel by default to align with the other i.MX boards. While at it, adjust the fdt_addr so that we can boot a standard mainline kernel. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* arm: dra7xx: Define Android partition tableSam Protsenko2016-02-291-1/+19
| | | | | | | | | | | | | | | | | | | | | | "fastboot oem format" command reuses "gpt write" command, which in turn requires correct partitions defined in $partitions variable. This patch adds such definition of Android partitions for DRA7XX EVM board. By default $partitions variable contains Linux partition table. In order to prepare Android environment one can run next commands from U-Boot shell: => env set partitions $partitions_android => env save After those operations one can go to fastboot mode and perform "fastboot oem format" to create Android partition table. While at it, enable CONFIG_RANDOM_UUID to spare user from providing UUIDs for each partition manually. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* sniper: Various minor cleanups, missing Kconfig configs and reorganisationPaul Kocialkowski2016-02-291-8/+3
| | | | | | | | This introduces some minor cleanups, regarding aspects such as board name, code and headers organization as well as deprecated and missing config options. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@konsulko.com>
* amcc-common.h: Disable CONFIG_SYS_LONGHELPTom Rini2016-02-291-1/+0
| | | | | | | | There are a number of AMCC platforms which are close to, or with some toolchains exceeding, the size constraints. Disable CONFIG_SYS_LONGHELP to get us room to build with again. Signed-off-by: Tom Rini <trini@konsulko.com>
* compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6Tom Rini2016-02-296-235/+383
| | | | | | | | | | Copy these from Linux v4.5-rc6 tag. This is needed so that we can keep up with newer gcc versions. Note that we don't have the uapi/ hierarchy from the kernel so continue to use <linux/types.h> Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini2016-02-291-6/+20
|\
| * ARM: uniphier: default to environment in eMMCMasahiro Yamada2016-02-291-6/+6
| | | | | | | | | | | | | | Of the several boot devices supported, it looks like the eMMC is the most commonly used. Enable CONFIG_ENV_IS_IN_MMC by default. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: add emmcupdate commandMasahiro Yamada2016-02-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The Boot ROM expects the boot image (SPL) in the Boot Partition 1. So, updating images involves the hardware partition switch. It might be a bit advanced for some users. To be user-friendly, this commit adds a useful command to update the images; just put SPL and U-Boot proper into the public directory of the TFTP server and execute "run emmcupdate" from the command line. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: add eMMC boot supportMasahiro Yamada2016-02-291-0/+3
| | | | | | | | | | | | | | | | Export device nodes needed for eMMC boot (eMMC node, pinctrl, and clock) to the SPL DTB. CONFIG_SUPPORT_EMMC_BOOT is also necessary to use "mmc partconf" command. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: enable UniPhier SD/MMC host driverMasahiro Yamada2016-02-291-0/+4
| | | | | | | | | | | | | | Enable the driver in all UniPhier defconfig files and add some needed defines to the common files. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | Revert "dm: ns16550: Add support for reg-offset property"Tom Rini2016-02-291-1/+0
|/ | | | | | | | | | | This reverts commit d9a3bec682f9756621615f4306718a356a3230e3. While this is a correct change to do long term it unfortunately breaks a number of platforms that are using pdata and not named struct members so they are getting all of their data after 'base' incorrect. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-02-262-4/+22
|\
| * timer: Provide an early timerSimon Glass2016-02-261-0/+21
| | | | | | | | | | | | | | | | | | | | In some cases the timer must be accessible before driver model is active. Examples include when using CONFIG_TRACE to trace U-Boot's execution before driver model is set up. Enable this option to use an early timer. These functions must be supported by your timer driver: timer_early_get_count() and timer_early_get_rate(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * image: Correct the OS location code to work on sandboxSimon Glass2016-02-261-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent change broke the 'bootm' command on sandbox. The root cause is using a pointer as an address. Conversion from pointer to address needs to use map_to_sysmem() so that sandbox can do the right thing. The problem was pre-existing but uncovered by a recent commit. Fix this. Also move fit_get_end() to the C file to avoid needing to include mapmem.h (and thus asm/io.h) everywhere. Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images) Signed-off-by: Simon Glass <sjg@chromium.org>
* | powerpc/t208xqds: fix esdhc peripheral clock supportYangbo Lu2016-02-261-1/+1
|/ | | | | | | | | | | The patch that enabled eSDHC peripheral clock support had an obvious error as below. This patch is used to fix it. +#define define CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK Fixes: 3285e6cbcc1b ("powerpc/t2080qds: enable eSDHC peripheral clock support") Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* ARM: rpi: increase CONFIG_SYS_MAXARGSStephen Warren2016-02-261-1/+1
| | | | | | | | This allows all the hush tests implemented in test/py to pass, under qemu at least. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: zynq: zynqmp: Enable DCC serial driver by defaultMichal Simek2016-02-252-12/+5
| | | | | | Compile DCC serial driver by default. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini2016-02-241-0/+3
|\
| * arm: socfpga: Add missing CONFIG_BUILD_TARGETMarek Vasut2016-02-241-0/+3
| | | | | | | | | | | | | | | | | | | | Add the missing CONFIG_BUILD_TARGET to get u-boot-with-spl.sfp built automatically upon running make in the source tree. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Chin Liang See <clsee@altera.com> Cc: Denis Bakhvalov <denis.bakhvalov@nokia.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-02-243-20/+26
|\ \
| * | implement Fastboot via USB OTG on bcm28155_ap boardsSteve Rae2016-02-241-20/+0
| | | | | | | | | | | | | | | | | | | | | Don't understand how it happened, but this change got applied twice! Therefore, removing the duplicated items. Signed-off-by: Steve Rae <srae@broadcom.com>
| * | dfu: odroid xu3: Define DFU_MANIFEST_POLL_TIMEOUT to handle large files ↵Lukasz Majewski2016-02-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transmission and storage As tested on the Odroid XU3, large files to be stored on the file system require considerable time to be physically written to the medium. The default 300 ms is not enough to store large file (e.g. 26 MiB). To fix this situation the DFU_MANIFEST_POLL_TIMEOUT has been defined. It is used to cease the communication with dfu-util and allow the target board to store the data on file system. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
| * | dfu: usb: f_dfu: Set deferred call for dfu_flush() functionLukasz Majewski2016-02-241-0/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes situation when one would like to write large file into medium with the file system (fat, ext4, etc). This change sets file size limitation to the DFU internal buffer size. Since u-boot is not supporting interrupts and seek on file systems, it becomes challenging to store large file appropriately. To reproduce this error - create large file (around 26 MiB) and sent it to the target board. Lets examine the flow of USB transactions: 0. DFU uses EP0 with 64B MPS [Max Packet Size] 1. Send file - OUT (PC->target) - dat_26MiB.img is sent with 4096 B transactions 2. Get status - OUT (PC->target) - wait for DFU_STATE_dfuDNLOAD_IDLE (0x05) sent from target board - IN transaction (target->PC) 3. The whole file content is sent to target - OUT (PC->target) with ZLP [Zero Length Packet] Now the interesting part starts: 4. OUT (PC->target) Setup transaction (request to share DFU state) 5. IN (target->PC) - reply the current DFU state - In the UDC driver the req->completion (with dfu_flush) is called after successful IN transfer. - The dfu_flush() (called from req->completion callback) saves the whole file at once (u-boot doesn't support seek on fs). Such operation takes considerable time. When the file is large - e.g. 26MiB - this time may be more than 5 seconds. 6. OUT (PC->target) - ZLP, is send in the same time when dfu_flush() writes data to eMMC memory. The dfu-util application has hard coded timeout on USB transaction completion set to 5 seconds (it uses libusb calls). When the file to store is large (e.g. 26 MiB) the time needed to write it may excess the dfu-util timeout and following error message will be displayed: "unable to read DFU status" on the HOST PC console. This change is supposed to leverage DFU's part responsible for storing files on file systems. Other DFU operations - i.e. raw/partition write to NAND and eMMC should work as before. The only functional change is the error reporting. When dfu_flush() fails the u-boot prompt will exit with error information and dfu-util application exits afterwards as well. Test HW: - Odroid XU3 (Exynos5433) - test with large file - Trats (Exynos4210) - test for regression - eMMC, raw, Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Reported-by: Alex Gdalevich <agdalevich@axion-biosystems.com> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Heiko Schocher <hs@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2016-02-248-11/+353
|\ \
| * | board: ls1043ardb: Add micro QE support for ls1043ardbZhao Qiang2016-02-241-0/+7
| | | | | | | | | | | | | | | Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | armv8/ls1043aqds: Add USB support for ls1043aqdsQianyu Gong2016-02-241-0/+13
| | | | | | | | | | | | | | | | | | | | | Add USB XHCI support for ls1043qds board. Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | fm: fdt: Move fman ucode fixup to driver codeQianyu Gong2016-02-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Not only powerpc/mpc85xx but also Freescale Layerscape platforms will use fdt_fixup_fman_firmware() to insert Fman ucode blob into the device tree. So move the function to Fman driver code. Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | qe: move drivers/qe/qe.h to include/fsl_qe.hQianyu Gong2016-02-241-0/+299
| | | | | | | | | | | | | | | | | | | | | | | | As the QE firmware struct is shared with Fman, move the header file out of drivers/qe/. Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | armv8: ls2080: Update bootcmd env variablePrabhakar Kushwaha2016-02-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before Linux boot DPL must be deployed to DPAA2 interface. So update bootcmd env variable to make sure DPL deployment before Linux boot. Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * | armv8: ls2080: Add mcinitcmd env variable in default envPrabhakar Kushwaha2016-02-243-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Define mcinitcmd env variable to load Management complex during u-boot boot sequence. Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
OpenPOWER on IntegriCloud