aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-10-03riscv: Add QEMU virt board supportBin Meng12-0/+193
This adds QEMU RISC-V 'virt' board target support, with the hope of helping people easily test U-Boot on RISC-V. The QEMU virt machine models a generic RISC-V virtual machine with support for the VirtIO standard networking and block storage devices. It has CLINT, PLIC, 16550A UART devices in addition to VirtIO and it also uses device-tree to pass configuration information to guest software. It implements RISC-V privileged architecture spec v1.10. Both 32-bit and 64-bit builds are supported. Support is pretty much preliminary, only booting to U-Boot shell with the UART driver on a single core. Booting Linux is not supported yet. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: kconfig: Imply DM support for some common driversBin Meng2-8/+9
This implies DM support for some common drivers that are used on RISC-V. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: kconfig: Select DM and OF_CONTROLBin Meng2-2/+3
RISC-V is a pretty new architecture and should support DM and OF_CONTROL by default. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: ae350: Clean up mixed tabs and spaces in the dtsBin Meng1-87/+90
There are quite a lot of mixed tabs and spaces in the ae350.dts. Clean them up. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: Make start.S available for all targetsBin Meng5-4/+4
Currently start.S is inside arch/riscv/cpu/ax25/, but it can be common for all RISC-V targets. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: bootm: Pass mhartid CSR value to kernelBin Meng1-2/+3
So far this is hardcoded to zero, and we should read the value from mhartid CSR and pass it to Linux kernel. Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com>
2018-10-03riscv: Remove CSR read/write defines in encoding.hBin Meng1-46/+4
There is no reason to keep two versions of CSR read/write defines in encoding.h. We already have one set of defines in csr.h, which is from Linux kernel, and let's drop the one in encoding.h. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com>
2018-10-03riscv: Add a helper routine to print CPU informationBin Meng4-0/+179
This adds a helper routine to print CPU information. Currently it prints all the instruction set extensions that the processor core supports. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: Explicitly pass -march and -mabi to the compilerBin Meng1-2/+6
At present the compiler flag against which architecture and abi variant the riscv image is built for is not explicitly indicated which means the default compiler configuration is used. But this does not work if we want to build a different target (eg: 32-bit riscv images using a toolchain configured for 64-bit riscv). Fix this by explicitly passing -march and -mabi to the compiler. Since generically we don't use floating point in U-Boot, specify the RV[32|64]IMA ISA and software floating ABI. This also fix some alignment coding style issues. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: Fix coding style issues in the linker scriptBin Meng1-30/+28
There are several coding style issues in the linker script. Fix them. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: Move the linker script to the CPU root directoryBin Meng1-0/+0
The linker script can be shared by all RISC-V targets. Move it to a common place. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: cmd: bdinfo: Print the relocation addressBin Meng1-0/+2
Add printing of U-Boot relocation address. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: Remove mach typeBin Meng4-33/+0
Since the mach_id is not used by RISC-V, remove it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: bootm: Correct the 1st kernel argument to hart idBin Meng1-13/+5
The first argument of Linux kernel is the risc-v core hart id, from which the kernel is booted from. It is not the mach_id, which seems to be copied from arm. While we are here, this also changes the Linux kernel entry parameters' type to support both 32-bit and 64-bit. Note the hart id is hardcoded to zero for now, and we should change to fill in it with the value read from mhartid CSR of the hart which this routine is currently running on. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com>
2018-10-03riscv: Remove setup.hBin Meng3-208/+0
This was copied from ARM, and does not apply to RISC-V. While we are here, bootm.h is eventually removed as its content is only the inclusion of setup.h. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03riscv: kconfig: Normalize architecture name spellingBin Meng2-4/+4
It's RISC-V that is the official name, not RISCV. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com>
2018-10-02Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini104-1045/+6003
This is the PR for SPI-NAND changes along with few spi changes. [trini: Re-sync changes for ls1012afrwy_qspi*_defconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-10-02spi: sh_qspi: Add DM support to SH QSPI driverMarek Vasut1-65/+150
Add DM support to the SH QSPI driver while retaining non-DM support. The later is required as this driver is used in SPL which has a size limitation of 16 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> [jagan: use proper commit head] Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-02driver/spi: fsl_qspi: Remove non-DM stuffAshish Kumar1-138/+0
Convert fsl_qspi.c to complete DM mode. Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> Tested-by: Rajat Srivastava <rajat.srivastava@nxp.com> Tested-by: Ye Li <ye.li@nxp.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-02spi: designware_spi: Add reset ctrl to driverLey Foon Tan1-0/+43
Add code to reset all reset signals as in SPI DT node. A reset property is an optional feature, so only print out a warning and do not fail if a reset property is not present. If a reset property is discovered, then use it to deassert, thus bringing the IP out of reset. Release reset when _remove(). Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-02cmd: mtdparts: describe as legacyMiquel Raynal1-1/+5
The 'mtdparts' command is not needed anymore. While the environment variable is still valid (and useful, along with the 'mtdids' one), the command has been replaced by 'mtd' which is much more close to the MTD stack and do not add its own specific glue. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02cmd: ubi: clean the partition handlingMiquel Raynal2-71/+27
UBI should not mess with MTD partitions, now that the partitions are handled in a clean way, clean the ubi command and avoid using this uneeded extra-glue to reference the devices. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02cmd: mtd: add 'mtd' commandMiquel Raynal6-4/+644
There should not be a 'nand' command, a 'sf' command and certainly not a new 'spi-nand' command. Write a 'mtd' command instead to manage all MTD devices/partitions at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02mtd: mtdpart: implement proper partition handlingMiquel Raynal4-239/+209
Instead of collecting partitions in a flat list, create a hierarchy within the mtd_info structure: use a partitions list to keep track of the partitions of an MTD device (which might be itself a partition of another MTD device), a pointer to the parent device (NULL when the MTD device is the root one, not a partition). By also saving directly in mtd_info the offset of the partition, we can get rid of the mtd_part structure. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02mtd: uboot: search for an equivalent MTD name with the mtdidsMiquel Raynal2-1/+69
Using an MTD device (resp. partition) name in mtdparts is simple and straightforward. However, for a long time already, another name was given in mtdparts to indicate a device (resp. partition) so the "mtdids" environment variable was created to do the match. Let's create a function that, from an MTD device (resp. partition) name, search for the equivalent name in the "mtdparts" environment variable thanks to the "mtdids" string. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02mtd: mtdpart: add a generic mtdparts-like parserMiquel Raynal2-0/+231
The current parser is very specific to U-Boot mtdparts implementation. It does not use MTD structures like mtd_info and mtd_partition. Copy and adapt the current parser in drivers/mtd/mtd-uclass.c (to not break the current use of mtdparts.c itself) and write some kind of a wrapper around the current implementation to allow other commands to benefit from this parsing in a user-friendly way. This new function will allocate an mtd_partition array for each successful call. This array must be freed after use by the caller. The given 'mtdparts' buffer pointer will be moved forward to the next MTD device (if any, it will point towards a '\0' character otherwise). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02mtd: uclass: add probe functionMiquel Raynal2-0/+18
The user might want to trigger the probe of any MTD device, export these functions so they can be called from a command source file. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02dm: drop unused helper in MTD headerMiquel Raynal1-11/+0
include/mtd.h might be included by files even if CONFIG_DM is not enabled. In this case, the call to dev_get_uclass_priv() would trigger a build error. Because this helper has no user, let's drop it off. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-01Prepare v2018.11-rc1v2018.11-rc1Tom Rini1-2/+2
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-10-01MAINTAINERS: at91: update entry for at91 boardsEugen Hristev10-10/+10
Updated the maintainership for the at91 boards. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2018-09-30Merge git://git.denx.de/u-boot-dmTom Rini97-199/+3211
2018-09-30MAINTAINERS: Update some entries for missed boardsTom Rini3-1/+3
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-09-30fs: btrfs: Fix cache alignment bugsMarek Vasut3-13/+17
The btrfs implementation passes cache-unaligned buffers into the block layer, which triggers cache alignment problems down in the block device drivers. Align the buffers to prevent this. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Behun <marek.behun@nic.cz>
2018-09-30usb:ci_udc: don't overwrite configuration on pullupRamon Fried1-1/+2
change writel to writebits32 in ci_pullup() in order to keep phy configuration in tact. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30db410c: automatically launch fastbootRamon Fried1-1/+2
If during boot the key-vol-down press is detected we'll fall back to fastboot. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30DB410c: Enable fastboot supportRamon Fried1-0/+10
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30usb: ehci-msm: Add init_after_reset for CI_UDCRamon Fried1-0/+12
MSM uses the chipidea controller IP, however it requires to reinit the phy after controller reset. in EHCI mode there's a dedicated callback for it. In device mode however there's no such callback. Add implementaion of ci_init_after_reset() to implement the above requirement in case CI_UDC driver is used. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30usb:ci_udc: Introduce init_after_reset phy functionRamon Fried1-0/+6
MSM variant of Chipidea must reinitalize the phy after controller reset. Introduce ci_init_after_reset() weak function that can be used to achieve the above init. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30ehci: msm: use init_type in probeRamon Fried1-2/+4
Change ehci_usb_probe() function to initialize the USB according to the init_type provided. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30ehci: msm: switch to generic PHY uclassRamon Fried2-45/+10
All the underlying USB PHY was handled in the ehci driver. Use the generic phy API instead. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30configs: db410c: Enable USB PHYRamon Fried1-0/+1
Enable USB PHY driver. Also fixed the alphabetically ordering of the config. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30dts: db410c: Add bindings for MSM USB phyRamon Fried1-0/+7
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30phy: db410c: Add MSM USB PHY driverRamon Fried4-0/+119
Add a PHY driver for the Qualcomm dragonboard 410c which allows switching on/off and resetting the phy connected to the EHCI controllers and USBHS controller. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30db410c: serial# env using msm board serialRamon Fried2-0/+11
The serial# environment variable needs to be defined so it will be used by fastboot as serial for the endpoint descriptor. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30dts: db410c: add alias for USBRamon Fried1-0/+4
Alias is required so req-seq will be filled. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30ehci: msm: Add missing platdataRamon Fried1-0/+1
platdata_auto_alloc_size was not initialized in structure. Caused null pointer dereference when configuring device as gadget. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30ehci: Replace board_prepare_usb with board_usb_initRamon Fried2-9/+4
Use standard board_usb_init() instead of the specific board_prepare_usb. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30serial: serial_stm32: Enable uart FIFO for STM32F7xx SoCsPatrice Chotard1-1/+1
Since commit 7b3b74d32127 ("serial: serial_stm32: Enable overrun") on STM32F7xx based boards, the first lines of serial output are missing during boot (we no more see the U-Boot release version, board model and DRAM size). By enabling the uart FIFO on STM32F7, the complete U-boot log can be sent correctly. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-09-30u-boot: align cache flushes in load_elf_image_shdr to line boundariesNeil Stainton1-1/+4
Prevent cache warning messages when using the 'bootelf' command on an Arm target. Round down each section start address and round up the respective section end to the nearest cache line. Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk> [trini: Manually apply, rework whitespace] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-09-30kbuild: fix # escaping in appending U-Boot own DTMasahiro Yamada1-1/+1
The escape sequence '\#' does not work for the latest GNU Make from the git tree. Replace it with $(pound) as Linux did. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>