summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2017-10-11Merge branch 'rmobile' of git://git.denx.de/u-boot-shTom Rini
2017-10-10Merge git://git.denx.de/u-boot-dmTom Rini
2017-10-09ARM: rmobile: dts: Add SDR104/HS200 to Salvator-XMarek Vasut
Add DT nodes to enable SDR104/HS200 modes on Salvator-X boards. 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-10-09Merge git://git.denx.de/u-boot-videoTom Rini
2017-10-09sandbox: avoid memory leak in os_dirent_lsHeinrich Schuchardt
Realloc does not free the old memory area if it fails. Identified by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08ARM: DTS: stm32: add SDMMC support fo stm32h743-evalPatrice Chotard
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 evaluation board. Evaluation board needs a second pinctrl node "pinctrl_sdmmc1_level_shifter" to drive a level shifter on MMC bus. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08ARM: DTS: stm32: add SDMMC support for stm32h743 discoPatrice Chotard
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 discovery board. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08ARM: stm32f7: fix prescaler calculation of timerBo Shen
As the timer 2 is on APB1 bus, the maximum of clock frequency of APB1 timer clock is half of SYSCLK. Then to calculate the timer prescaler for timer 2 which need to be divided by 2. Signed-off-by: Bo Shen <voice.shen@gmail.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-08serial: stm32x7: remove stm32f7-usart and stm32h7-usart compatiblePatrice Chotard
This patch remove the extra compatibility string "st,stm32h7-usart" and "st,stm32f7-usart" to avoid confusion, save some time & space. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-08ARMv8: make master CPU checking logic more clearzijun_hu
macro branch_if_master checks master CPU via (Aff3 & (Aff2:Aff1:Aff0)) it is simple but a little obscure. fix by checking Affx fields within MPIDR_EL1 directly. Signed-off-by: zijun_hu <zijun_hu@htc.com>
2017-10-08ARMv8: fix error in freeing stack framezijun_hu
relocate_code() allocates 32 bytes stack frame but only 16 bytes are freed before return. it will cause errors to possible previous frames and doesn't make relocate_code() look like a function. fix by freeing 32 bytes stack space Signed-off-by: zijun_hu <zijun_hu@htc.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08ARMv8: get new GD address from gd->new_gd directlyzijun_hu
the new GD address is calculated via board data BD currently it require the new GD area locates below BD tightly, so a strict constraint is imposed on memory layout which maybe make special platform unpleasant. fix it by getting new GD address from gd->new_gd directly. Signed-off-by: zijun_hu <zijun_hu@htc.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-07Merge git://git.denx.de/u-boot-x86Tom Rini
2017-10-07x86: tangier: Enable ACPI support for Intel TangierAndy Shevchenko
Intel Tangier SoC is a part of Intel Merrifield platform which doesn't utilize ACPI by default. Here is an attempt to unleash ACPI flexibility power on Intel Merrifield based platforms. The change brings minimum support of the devices that found on Intel Merrifield based end user device. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-06omap: Fix warning when looking for userdata partSam Protsenko
When eMMC was formattaed for Linux partition table, "userdata" partition is missing. In this case, part_get_info_by_name() iterates over all registered drivers (which are PART_TYPE_EFI, PART_TYPE_DOS and PART_TYPE_ISO). And when it comes to PART_TYPE_ISO (which has empty partition table), we can see next warning in U-Boot output: ** First descriptor is NOT a primary desc on 1:1 ** This patch switches to part_get_info_by_name_type() API in order to check only EFI partitions for "userdata" partitions. This eliminates mentioned warning. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-06omap: Omit fastboot.userdata_size related errorsSam Protsenko
When using regular $partitions variable (for Linux boot), we can see some unwanted messages: > ERROR: cannot find partition: 'userdata' > at arch/arm/mach-omap2/utils.c:96/omap_mmc_get_part_size() > Warning: fastboot.userdata_size: unable to calc Let's remove those, as missing 'userdata' partition is correct behavior for Linux partition, and we don't want to see some Android-related messages in this case. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-10-06ARM: Add a new arch + board for QEMU's 'virt' machineTuomas Tynkkynen
This board builds an U-Boot binary that is bootable with QEMU's 'virt' machine on ARM. The minimal QEMU command line is: qemu-system-arm -machine virt,highmem=off -bios u-boot.bin (Note that the 'highmem=off' parameter to the 'virt' machine is required for PCI to work in U-Boot.) This command line enables the following: - u-boot.bin loaded and executing in the emulated flash at address 0x0 - A generated device tree blob placed at the start of RAM - A freely configurable amount of RAM, described by the DTB - A PL011 serial port, discoverable via the DTB - An ARMv7 architected timer - PSCI for rebooting the system - A generic ECAM-based PCI host controller, discoverable via the DTB Additionally, QEMU allows plugging a bunch of useful peripherals to the PCI bus. The following ones are supported by both U-Boot and Linux: - To add a Serial ATA disk via an Intel ICH9 AHCI controller, pass e.g.: -drive if=none,file=disk.img,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0 - To add an Intel E1000 network adapter, pass e.g.: -net nic,model=e1000 -net user - To add an EHCI-compliant USB host controller, pass e.g.: -device usb-ehci,id=ehci - To add a NVMe disk, pass e.g.: -drive if=none,file=disk.img,id=mydisk -device nvme,drive=mydisk,serial=foo Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-06omap: detect board before spl_early_init()Jean-Jacques Hiblot
In order to be able to select the right DTB, we need to have identified the board before spl_early_init() is called. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-05Merge git://git.denx.de/u-boot-sunxiTom Rini
2017-10-04treewide: replace with error() with pr_err()Masahiro Yamada
U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-04printk: collect printk stuff into <linux/printk.h> with loglevel supportMasahiro Yamada
When we import code from Linux, with regular re-sync planned, we want to use printk() and pr_*(). U-Boot does not support them in a clean way. So, people end up with local macros, or compat headers here and there, then we occasionally see build errors of definition conflicts. We have include/linux/compat.h, but putting all sorts of unrelated things into a single header is just a temporal workaround. Hence this patch, to find the best home for all printk variants. If you want to use printk() and friends, please include <linux/printk.h>. This header is self-contained, and pulls in only a few headers. When I was testing this clean-up, I noticed the image size exceeded its platform limit on some boards. This is because all pr_*() that were previously defined as no-op in include/linux/mtd/mtd.h (unless CONFIG_MTD_DEBUG is set), are now enabled. To make such boards happy, this commit also implements CONFIG_LOGLEVEL. The concept is similar to the kernel parameter "loglevel". (Actually, the Kconfig help message was taken from kernel-paremeter.txt of Linux) Messages with a loglevel smaller than console loglevel will be printed. The difference is the loglevel is build-time determined. To save the image size, lower priority pr_*() are compiled out. I set the default of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages are compiled in. I adjusted CONFIG_LOGLEVEL to avoid build error for some boards. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-03sunxi: usb_phy: invert the USB phy_ctl conditionMaxime Ripard
All the new SoCs from Allwinner since the A33 have had the phy_ctl offset at 0x410 instead of 0x404 that was used on the previous SoCs. Instead of adding more and more special cases as the number of SoCs grow, let's invert the test to have 0x410 by default, and the (hopefully) fixed number of old SoCs being the exception. Suggested-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Suggested-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-10-03sun7i: a20: Add Bananapi M1 Plus supportJagan Teki
Banana Pi M1 Plus is an open-source single-board computer that adds more connectivity to the classic board using Allwinner A20 SOC. Bananapi M1-Plus features: - A20 Dual-core 1.0GHz - 1 GB DDR3 SDRAM - MicroSD - 10/100/1000 Ethernet RJ45 - WiFi b/g/n - 5V DC Micro USB power-supply For dts file, Sync with Linux commit f92ca09("Merge branch 'akpm/master'"). Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-10-03sunxi: rename Bananapi M3 dts file nameChen-Yu Tsai
The upstream (Linux) device tree file for the Bananapi M3 follows the convention of using the well known brand name, instead of the vendor name, for naming. The file was recently added to upstream in commit 359b5a1e1c2d ("ARM: sun8i: a83t: Add device tree for Sinovoip Bananapi BPI-M3") Rename the device tree file in U-boot to match. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sunxi: Fix USB_GADGET implicationMaxime Ripard
USB_GADGET will fail to compile if USB_MUSB_GADGET is not defined. Make sure we have that condition right. Fixes: e0ea88042d51 ("sunxi: Imply USB_ETHER") Suggested-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03arm: sunxi: Move spl_boot_device in a separate functionMaxime Ripard
U-Boot itself might need to identify the boot device, for example to be able to tell where to load the kernel from when several options are possible. Move the logic of spl_boot_device to a function that is compiled both for the SPL and the main binary. Tested-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sunxi: Add support for A20-OLinuXino-MICRO-eMMCStefan Mavrodiev
From rev.J A20-OLinuXino-MICRO has eMMC option. For now this is only 4GB, but in the future size may increase. The dts file is the same from mainline kernel. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sunxi: Enable CMD_GPT by defaultMaxime Ripard
GPT is pretty common these days and can be useful for things like fastboot. Add a platform imply, so that users can still opt out if they wish so. Reviewed-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sunxi: sina33: Sync the device tree with the kernelMaxime Ripard
The kernel DT of the SinA33 has evolved quite a bit. Make sure we sync it and its upstream DTSI to be able to use the OTG. The DTs were taken from the 4.13 kernel release. Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sunxi: Imply USB_ETHERMaxime Ripard
Now that we can enable the usb_ether gadget, do it. This will be especially useful for boards that don't have any ethernet controller, such as the ones based on the A13 or A33. Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03musb: sunxi: switch to the device modelMaxime Ripard
The device model was implemented so far using a hook that needed to be called from the board support, without DT support and only for the host. Switch to probing both in peripheral and host mode through the DT. Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03cmd: fastboot: Rework fastboot dependencyMaxime Ripard
Fastboot need a bunch of options to be operating properly, such as the g_dnl gadget, the fastboot command, and some options that make sense. Since fastboot is now part of Kconfig, make sure we have them right. That will also reduce the boilerplate in the defconfigs. Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sunxi: imply USB_GADGETMaxime Ripard
A good number of our boards have USB_GADGET enabled. Imply it so that all the boards can benefit from it, and remove some boilerplate from our defconfigs. Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03usb: gadget: Make g_dnl USB settings commonMaxime Ripard
The g_dnl USB settings for the vendor ID, product ID and manufacturer are actually common settings that can and should be shared by all the gadgets. Make them common by renaming them, and convert all the users. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sandbox: Expand list of IO accessorsMaxime Ripard
The setbits/clrbits/clrsetbits macros are used widely across the tree, let's provide implementation for them in the sandbox. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03sandbox: Use asm-generic/io.hPaul Burton
Convert the sandbox architecture to make use of the new asm-generic/io.h to provide address mapping functions. As sandbox actually performs non-identity mapping between physical & virtual addresses we can't simply make use of the generic mapping functions, but are able to implement phys_to_virt() & make use of it from map_physmem(). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2017-10-03powerpc: Use asm-generic/io.hPaul Burton
Convert the powerpc architecture to make use of the new asm-generic/io.h to provide address mapping functions. As powerpc can actually perform non-identity mapping between physical & virtual addresses we can't simply make use of the generic phys_to_virt() & virt_to_phys() functions. However since map_physmem() already effectively implemented the same thing as virt_to_phys() we can simply implement virt_to_phys() instead of map_physmem() & use the generic map_physmem(). We also drop the no-op unmap_physmem(). This has only been build-tested, feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Wolfgang Denk <wd@denx.de>
2017-10-03nios2: Use asm-generic/io.hPaul Burton
Convert the nios2 architecture to make use of the new asm-generic/io.h to provide address mapping functions. As nios2 actually performs non-identity mapping between physical & virtual addresses we can't simply make use of the generic functions, with the exception of being able to drop our no-op unmap_physmem() and definitions of unused map flags. Feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Thomas Chou <thomas@wytron.com.tw>
2017-10-03mips: Use asm-generic/io.hPaul Burton
Convert the mips architecture to make use of the new asm-generic/io.h to provide address mapping functions. As mips actually performs non-identity mapping between physical & virtual addresses we can't simply make use of the generic functions, with the exception of being able to drop our no-op unmap_physmem() and definitions of unused map flags. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2017-10-03xtensa: Use asm-generic/io.hPaul Burton
Convert the xtensa architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for xtensa this is primarily a matter of moving code. This has only been build-tested, feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
2017-10-03x86: Use asm-generic/io.hPaul Burton
Convert the x86 architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for x86 this is primarily a matter of moving code. This has only been build-tested, feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-03sh: Use asm-generic/io.hPaul Burton
Convert the sh architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for sh this is primarily a matter of moving code. Feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-10-03nds32: Use asm-generic/io.hPaul Burton
Convert the nds32 architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for nds32 this is primarily a matter of removing code. Feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Macpaul Lin <macpaul@andestech.com>
2017-10-03microblaze: Use asm-generic/io.hPaul Burton
Convert the microblaze architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for microblaze this is primarily a matter of removing code. Feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Michal Simek <monstr@monstr.eu>
2017-10-03m68k: Use asm-generic/io.hPaul Burton
Convert the m68k architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for m68k this is primarily a matter of emoving code. Feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Huan Wang <alison.wang@freescale.com> Cc: Angelo Dureghello <angelo@sysam.it> Acked-by: Angelo Dureghello <angelo@sysam.it> Tested-by: Angelo Dureghello <angelo@sysam.it>
2017-10-03arm: Use asm-generic/io.hPaul Burton
Convert the arm architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for arm this is primarily a matter of removing code. This has only been build-tested, feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-03arc: Use asm-generic/io.hPaul Burton
Convert the arc architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for arc this is primarily a matter of removing code. Feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
2017-09-30rockchip: enable TPL_SYSRESET for all rockchip SoCsKever Yang
With Makefiles testing for $(SPL_TPL_)SYSRESET, we need TPL_SYSRESET for do_reset() in TPL for Rockchip SoCs. References: 87c16d4 "drivers: spl: consistently use the $(SPL_TPL_) macro" Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-09-30rk3288: spl: Add dram_init_banksizeJagan Teki
Falcon mode, is updating DDR dt node configuration through spl_fixup_fdt() so add appropriate DDR base and size through dram_init_banksize. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-09-30rockchip: rk3399-puma: add boot-on regulator to override BIOS_DISABLEPhilipp Tomsich
The (Qseven) BIOS_DISABLE signal on the RK3399-Q7 (Puma) keeps the eMMC and SPI in reset initially and we need to write a GPIO to turn them on before continuing the boot-up. This adds the DTS entries for the additional regulator and makes pinctrl and gpio3 available during SPL. It also adds a hook to the spl_board_init() to ensure that the regulator gets probed and enabled. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>