summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-28sandbox: Add a dummy invalidate_dcache_range() functionBin Meng
This adds invalidate_dcache_range() so that some drivers can build without error on sandbox. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Adjust the 'nvme' command to use blk_common_cmd()Bin Meng
Instead of having separate code in the 'nvme' command, adjust it to use the common function. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Get rid of the global variable nvme_infoBin Meng
At present the NVMe uclass driver uses a global variable nvme_info to store global information like namespace id, and NVMe controller driver's priv struct has a blk_dev_start that is used to calculate the namespace id based on the global information from nvme_info. This is not a good design in the DM world and can be replaced with the following changes: - Encode the namespace id in the NVMe block device name during the NVMe uclass post probe - Extract the namespace id from the device name during the NVMe block device probe - Let BLK uclass calculate the devnum for us by passing -1 to blk_create_devicef() as the devnum Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Use blk_create_devicef() APIBin Meng
The codes in nvme_uclass_post_probe() can be replaced to call the blk_create_devicef() API directly. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Apply cache operations on the DMA buffersBin Meng
So far cache operations are only applied on the submission queue and completion queue, but they are missing in other places like identify and block read/write routines. In order to correctly operate on the caches, the DMA buffer passed to identify routine must be allocated properly on the stack with the existing macro ALLOC_CACHE_ALIGN_BUFFER(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Consolidate block read and write routinesBin Meng
The NVMe block read and write routines are almost the same except the command opcode. Let's consolidate them to avoid duplication. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Use macros to access NVMe queuesBin Meng
NVMe driver only uses two queues. The first one is allocated to do admin stuff, while the second one is for IO stuff. So far the driver uses magic number (0/1) to access them. Change to use macros. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Respect timeout when en/disabling the controllerBin Meng
So far the driver unconditionally delays 10ms when en/disabling the controller and still return 0 if 10ms times out. In fact, spec defines a timeout value in the CAP register that is the worst case time that host software shall wait for the controller to become ready. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Cache controller's capabilitiesBin Meng
Capabilities register is RO and accessed at various places in the driver. Let's cache it in the controller driver's priv struct. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Fix endianness assignment to prp2 in nvme_identify()Bin Meng
So far this is not causing any issue due to NVMe and x86 are using the same endianness, but for correctness, it should be fixed. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Fix ndev->queues allocationBin Meng
ndev->queues is a pointer to pointer, but the allocation wrongly requests sizeof(struct nvme_queue). Fix it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Fix getting PCI vendor id of the NVMe block deviceBin Meng
The codes currently try to read PCI vendor id of the NVMe block device by dm_pci_read_config16() with its parameter set as its root complex controller (ndev->pdev) instead of itself. This is seriously wrong. We can read the vendor id by passing the correct udevice parameter to the dm_pci_read_config16() API, however there is a shortcut by reading the cached vendor id from the PCI device's struct pci_child_platdata. While we are here fixing this bug, apparently the quirk stuff handle codes in nvme_get_info_from_identify() never takes effect since its logic has never been true at all. Remove these codes completely. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28nvme: Remove useless definesBin Meng
These are leftover when the driver was ported from Linux and are not used by the U-Boot driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-27sh: Fix linking of ms7722seTom Rini
While it is true that we no longer have 'ppcenv' and similar sections, including env/embedded.o at all results in the text/etc sections being available for the rest of the link. This in turn is required for the setup used on ms7722se. This also, likely, needs further fine-tuning. Fixes: f40ad66fa066 ("arch/sh: don't bring common/env_embedded.o into the link") Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-27cmd/spl.c: Include <libfdt.h> for fdt_totalsizeTom Rini
In order to be able to reliably use fdt_totalsize, we must have <libfdt.h> included. Fixes: 767cb74a0028 ("cmd: spl: provide address and size of prepared FDT ...") Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26mtdparts: Fix uninitialized scalar usageTom Rini
When reworking this code to fix other issues found by Coverity, I forgot to ensure tmp_ep was always cleared before use. Reported-by: Coverity (CID: 166612) Fixes: bc028345acc4 ("mtdparts: Fix final outstanding issue reported by Coverity") Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26Merge git://git.denx.de/u-boot-shTom Rini
2017-08-26Merge branch 'rmobile' of git://git.denx.de/u-boot-shTom Rini
2017-08-26Merge git://git.denx.de/u-boot-x86Tom Rini
2017-08-26Merge git://git.denx.de/u-boot-i2cTom Rini
2017-08-26Merge git://www.denx.de/git/u-boot-cfi-flashTom Rini
2017-08-26disk: part: align buffer so it can be used with DMA enabled driversStefan Agner
When using ISO partitions with a DMA enabled block device driver reading the ISO partition leads to unaligned DMA operations: CACHE: Misaligned operation at range [bffb7da8, bffb85a8] Align the buffer to make sure we pass a buffer which works for DMA operations. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-26scripts: objdiff: Ignore debug info when comparingStephen Boyd
If the kernel is configured to be built with debug symbols, or has bug tables, comparing files may not work if line numbers change. This makes comparing object files with these options harder to do. Let's strip out the debug info and drop the __bug_table here so that we don't see false positives. There may be other things to drop later, and it may be architecture specific, but this works for me with my ARM64 build. [ Import Linux commit: 65ba6fa439e7c3cbf97de9dce9e7a3390ae2638c ] Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Reviewed-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-08-26doc: verified-boot: fix typosMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-08-26fs: ext4: Fix journal overrun issue reported by CoverityTom Rini
While &p_jdb[fs->blksz] is a valid expression (it points *one* char sized element past the end of the array, e.g. &p_jdb[fs->blksz + 1] is invalid (according to the C standard (C99/C11)). Changing this to tag = (struct ext3_journal_block_tag *)(p_jdb + ofs); Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de> Suggested-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reported-by: Coverity (CID: 165117, 165110) Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-08-26mtdparts: Fix final outstanding issue reported by CoverityTom Rini
As part of fixing the previously reported issues, it was missed that in the case of mtdparts_init() we need to make sure that tmp_ep is long enough to contain PARTITION_MAXLEN and a NULL termination. Then, to be sure the buffer is NULL terminated, zero the entire buffer rather than just ensuring the first character is NULL. Cc: Lothar Waßmann <LW@KARO-electronics.de> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Reported-by: Coverity (CID: 166329) Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26spl: stm32: make falcon mode activation configurableVikas Manocha
With this change, it will be possible to de-select falcon mode & spl will only boot U-Boot. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Suggested-by: Bo Shen <voice.shen@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-26cmd: spl: provide address and size of prepared FDT in environmentAnatolij Gustschin
Writing prepared FDT to persistent storage should be possible in scripts. Create environment variables containing address and size of the updated FDT. Scripts can use these variables after running 'spl export fdt ...' command to write the new blob to persistent storage. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-08-26igep00x0: merge igep0020 and igep0030 defconfigs to igep00x0_defconfigPau Pajuelo
Update igep00x0 code with the following features: - Add board and revision detection for the boards: - IGEP0020-RF - IGEP0020-RC - IGEP0030-RG - IGEP0030-RE - Merge IGEP0020 and IGEP0030 mux tables - Add suport to use GPIO_126, GPIO_127 and GPIO_129 - board_name and board_rev environment variables display board and revision informations - Move dtb name selection from code to boot script Signed-off-by: Pau Pajuelo <ppajuel@gmail.com> Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Tested-by: Pau Pajuelo <ppajuel@gmail.com>
2017-08-26igep00x0: move SPL routines into separate fileLadislav Michl
Avoid cluttering board file with CONFIG_SPL_BUILD ifdefs by moving SPL related functions into separate file. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Tested-by: Pau Pajuelo <ppajuel@gmail.com> Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2017-08-26arm: dra7xx: Define Android boot argumentsSemen Protsenko
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-08-26arm: am57xx: Define Android boot argumentsSemen Protsenko
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-08-26arm: omap: Define command for booting Android from eMMCSemen Protsenko
If SD card is present -- try to boot from it first. If no -- try to boot Android from eMMC. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-08-26ARMv8/sec_firmware : Update chosen/kaslr-seed with random numberRuchika Gupta
kASLR support in kernel requires a random number to be passed via chosen/kaslr-seed propert. sec_firmware generates this random seed which can then be passed in the device tree node. sec_firmware reserves JR3 for it's own usage. Node for JR3 is removed from device-tree. Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
2017-08-26arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMCThomas Petazzoni
do_switch_ecc() calls fsmc_nand_switch_ecc(), which is a direct function call into drivers/mtd/nand/fsmc_nand.c. However, this function is not guarded by CONFIG_NAND_FSMC, which results to a build failure if CONFIG_NAND_FSMC is disabled. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-08-26board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/Thomas Petazzoni
The code in board/spear/common/ is not board-specific but SoC-specific. Therefore, boards from other vendors than "spear" may want to re-use this code, which is currently difficult with the code being placed in board/spear/common/. Since this code really is SoC-specific, this commit moves it to arch/arm/cpu/arm926ejs/spear/, with the rest of the SPEAr related code. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-08-26board: atmel: Use the new PIT timer driverWenyou.Yang@microchip.com
Use the Atmel PIT timer driver which supports the driver model and device tree. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-08-26driver: timer: Add the Atmel PIT timer driverWenyou.Yang@microchip.com
Add the new Atmel PIT timer driver, which supports the driver model and device tree. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-08-26powerpc: Rework interrupt_init_cpu()Tom Rini
The function interrupt_init_cpu() is given an int return type but does not return anything but 0. Rework this to be a void function. Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Mario Six <mario.six@gdsys.cc>
2017-08-26fs: fat: fix fatwrite overflow calculationReno Farnesi
The overflow calculation was incorrect. Adding the start block of the partition is not needed because the sectors are already relative to the beginning of the partition. If you attempted to write a file smaller than cur_part_info.start blocks on a full partition the old calculation fails to catch the overflow. This would cause an infinite loop in the determine_fatent function. Old, incorrect calculation: ending sector of new file = start sector + file size (in sectors) last sector = partition start + total sectors on the partition Adding the partition start block number is not needed because sectors are already relative to the start of the partition. New calculation: ending sector of new file = start sector + file size (in sectors) last sector = total sectors on the partition Signed-off-by: Reno Farnesi <nfarnesi4@gmail.com>
2017-08-26arm: dts: am33xx: sync DTS with Linux 4.13-rc4Suniel Mahesh
This re-syncs AM33xx DTS file with current file from Linux v4.13-rc4 to ensure a consistent configuration. Upstream Linux removed the redundant Interrupt-parent property from mmc, mac, lcdc and tscadc sub nodes. Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-26ram: kconfig: s/SPL/TPL/ in TPL_RAM help textJagan Teki
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-08-26rpi: Enable USB keyboard supportSimon Glass
This is currently disabled, so USB keyboards are not detected in U-Boot. Enable this option to fix that. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Paul Barker <pbarker@toganlabs.com>
2017-08-25arch/sh: don't bring common/env_embedded.o into the linkThomas Petazzoni
The linker script for SuperH brings the .ppcenv and .ppcenvr section of common/env_embedded.o into the .text section. However, the .ppcenv section is only ever filled in by env_embedded.o when CONFIG_SYS_USE_PPCENV is defined, but no platforms in mainline U-Boot use this. In addition, common/env_embedded.o is not always built (when you use CONFIG_ENV_IS_NOWHERE for example), which causes the following build failure: Fixes: LD u-boot /home/thomas/sh4aeb-linux-musl/bin/sh4aeb-linux-ld.bfd: cannot find common/env_embedded.o We fix this by no longer adding the .ppcenv and .ppcenvr sections from common/env_embedded.o into the .text section. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-08-25arch/sh: allow building in big-endian modeThomas Petazzoni
The SuperH architecture allows to be run in either little or big endian mode. Some SuperH SoCs get the little vs. big endian decision through mode pins sampled at reset, so if big endian has been choosen by HW designers, it cannot be easily changed. Therefore, it makes sense to allow building U-Boot for SuperH in big endian mode. To allow this, the only change needed is to adjust the OUTPUT_FORMAT() in the linker script. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-08-25ARM: rmobile: Enable MMC and USB DM on ULCBMarek Vasut
Enable the MMC and USB DM on the board since it's the modern method and now supported by the drivers. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-08-25ARM: rmobile: Enable MMC and USB DM on Salvator-XMarek Vasut
Enable the MMC and USB DM on the board since it's the modern method and now supported by the drivers. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-08-25ARM: rmobile: Remove SH SDHI probing from ULCB boardMarek Vasut
Drop the SH SDHI bit from the board since SD now probes from DT instead. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-08-25ARM: rmobile: Remove SH SDHI probing from Salvator-X boardMarek Vasut
Drop the SH SDHI bit from the board since SD now probes from DT instead. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>