summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2017-06-12ARM: fixed relocation using proper alignmentManfred Schlaegl
Using u-boot-2017.05 on i.MX6UL we ran into following problem: Initially U-Boot could be started normally. If we added one random command in configuration, the newly generated image hung at startup (last output was DRAM: 256 MiB). We tracked this down to a data abort within relocation (relocated_code). relocated_code in arch/arm/lib/relocate.S copies 8 bytes per loop iteration until the source pointer is equal to __image_copy_end. In a good case __image_copy_end was aligned to 8 bytes, so the loop stopped as suggested, but in an errornous case __image_copy_end was not aligned to 8 bytes, so the loop ran out of bounds and caused a data abort exception. This patches solves the issue by aligning __image_copy_end to 8 byte using the linker script related to arm. I don't know if it's the correct way to solve this, so some review would be very appreciated.
2017-06-10Merge git://git.denx.de/u-boot-dmTom Rini
2017-06-10Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini
2017-06-10Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini
2017-06-10armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kerneltnishinaga.dev@gmail.com
Disable D-Cache is required when booting nommu Linux kernel. (please see Linux kernel source "arch/arm/kernel/head-nommu.S") U-Boot is enabled D-cache and I-Cache at startup. However, it does not disable D-Cache before booting nommu Linux kernel. Therefore, I call dcache_disable() when the CPU is ARMv7M to fix this problem. Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
2017-06-10arm: omap: Unify get_device_type() functionSemen Protsenko
Refactor OMAP3/4/5 code so that we have only one get_device_type() function for all platforms. Details: - Add ctrl variable for AM33xx and OMAP3 platforms (like it's done for OMAP4/5), so we can obtain status register in common way - For now ctrl structure for AM33xx/OMAP3 contains only status register address - Run hw_data_init() in order to assign ctrl to proper structure - Remove DEVICE_MASK and DEVICE_GP definitions as they are not used (DEVICE_TYPE_MASK and GP_DEVICE are used instead) - Guard structs in omap_common.h with #ifdefs, because otherwise including omap_common.h on non-omap4/5 board files breaks compilation Buildman script was run for all OMAP boards. Result output: arm: (for 38/616 boards) all +352.5 bss -1.4 data +3.5 rodata +300.0 spl/u-boot-spl:all +284.7 spl/u-boot-spl:data +2.2 spl/u-boot-spl:rodata +252.0 spl/u-boot-spl:text +30.5 text +50.4 (no errors to report) Tested on AM57x EVM and BeagleBoard xM. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> [trini: Rework the guards as to not break TI81xx] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-10am33xx: Finish migration of CONFIG_AM33XX/AM43XXTom Rini
Almost all users of CONFIG_AM33XX/AM43XX have been migrated. Finish moving the last few over to Kconfig, and put all of the boards under the appropriate Kconfig chocie now. This board choice is non-optional, so remove that keyword on am33xx. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-09rockchip: rk3288: Allow setting up clocks in U-Boot properSimon Glass
If U-Boot is chain-loaded from a previous boot loader we must set up the clocks the way U-Boot wants them. Add code for this. It will do nothing if SPL has already done the job. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09rockchip: rk3288: Convert clock driver to use shifted masksSimon Glass
Shifted masks are the standard approach with rockchip since it allows use of the mask without shifting it each time. Update the definitions and the driver to match. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09rockchip: rk3288: Add error debugging to veyron_init()Simon Glass
Add a debug() statement so we can see when something goes wrong with the regulator. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09rockchip: Fix regualtor typo in veyronSimon Glass
This typo doesn't actually cause any problems, but is wrong. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09tegra: clock: Avoid a divide-by-zero errorSimon Glass
The clock fix-up for tegra is still present in the code. It causes a divide-by-zero bug after relocation when chain-loading U-Boot from coreboot. Fix this by adding a check. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 7468676 (ARM: tegra: fix clock_get_periph_rate() for UART clocks)
2017-06-09tegra: dts: Add cros-ec SPI settingsSimon Glass
At present the interrupt does not work and the SPI bus runs much less quickly than it should. Add settings to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09tegra: Init clocks even when SPL did not runSimon Glass
At present early clock init happens in SPL. If SPL did not run (because for example U-Boot is chain-loaded from another boot loader) then the clocks are not set as U-Boot expects. Add a function to detect this and call the early clock init in U-Boot proper. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09arm: Disable LPAE if not enabledSimon Glass
If CONFIG_ARMV7_LPAE is not defined we should make sure that the feature is disabled. This can happen if U-Boot is chain-loaded from another boot loader which does enable LPAE. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4TSimon Glass
At present if CONFIG_ARMV7_LPAE is defined then mmu_setup() will use instructions which are invalid on ARMv4T. This happens on Tegra since it has an ARMv4T boot CPU. Add a check for the architecture version to allow the code to be built. It will not actually be executed by the boot CPU, but needs to compile. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09arm: Rename HCTR to HTCRSimon Glass
This appears to be a typo. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09arm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLYSimon Glass
This option allows skipping the call to lowlevel() while still performing CP15 init. Support this on ARM720T so it can be used with Tegra. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-09spl: stm32f7: configure for xip bootingVikas Manocha
With xip booting configuration, we don't need to copy the next image (U-Boot or linux xipimage) from flash to sdram area. Flash memory organization is like this: spl-U-Boot: u-boot-spl.bin : 0x0800_0000 U-Boot : u-boot-dtb.bin : 0x0800_8000 linux : xipImage : 0x0800_8000 It is also possible to have U-Boot binary & linux binaries configured at different addresses of flash memory like U-Boot at 0x0800_8000 & linux xipImage at 0x0800_4000. But in any case, spl-U-Boot needs to be compiled for U-Boot as next binary with SPL_OS_BOOT option disabled. By default, spl is configured to boot linux xipImage. Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-06-09spl: stm32f7: add kernel boot supportVikas Manocha
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-06-09SPL: Add XIP booting supportVikas Manocha
Enable support for XIP (execute in place) of U-Boot or kernel image. There is no need to copy image from flash to ram if flash supports execute in place. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Alexandru Gagniuc <alex.g@adaptrum.com>
2017-06-09stm32: stm32f7: add spl build supportVikas Manocha
This commit supports booting from stm32 internal nor flash. spl U-Boot initializes the sdram memory, copies next image (e.g. standard U-Boot) to sdram & then jumps to entry point. Here are the flash memory addresses for U-Boot-spl & standard U-Boot: - spl U-Boot : 0x0800_0000 - standard U-Boot : 0x0800_8000 To compile u-boot without spl: Remove SUPPORT_SPL configuration (arch/arm/mach-stm32/Kconfig) Signed-off-by: Vikas Manocha <vikas.manocha@st.com> [trini: Rework Kconfig logic a bit] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-09sunxi: video: Add support for CSC and TVE to DE2 driverJernej Skrabec
Extend DE2 driver with support for TVE driver, which will be added in next commit. TVE unit expects data to be in YUV format, so CSC support is also added here. Note that HDMI driver has higher priority, so TV out is not probed if HDMI monitor is detected. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-09sunxi: Add base address for TV encoderJernej Skrabec
This commit adds TVE base address for Allwinner H3 and H5 SoCs. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-06-09mmc: sh_sdhi: Add MMC version 5.0 supportKouei Abe
Renesas SDHI SD/MMC driver did not support MMC version 5.0 devices. This adds MMC version 5.0 device support. Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-06-09mmc: sh_sdhi: Add 64-bit access to sd_buf supportKouei Abe
Renesas SDHI SD/MMC driver has 16-bit width bus access to SD_BUF. This adds 64-bit width bus access to SD_BUF. Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-06-09sandbox: Fix comparison of unsigned enum expression warningTom Rini
In os_dirent_get_typename() we are checking that type falls within the known values of the enum os_dirent_t. With clang-3.8 testing this value as being >= 0 results in a warning as it will always be true. This assumes of course that we are only given valid data. Given that we want to sanity check the input, we change this to check that it falls within the range of the first to the last entry in the given enum. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: video: rk3399: add HDMI TX support on the RK3399Philipp Tomsich
This commit enables the RK3399 HDMI TX, which is very similar to the one found on the RK3288. As requested by Simon, this splits the HDMI driver into a SOC-specific portion (rk3399_hdmi.c, rk3288_hdmi.c) and a common portion (rk_hdmi.c). Note that the I2C communication for reading the EDID works well with the default settings, but does not with the alternate settings used on the RK3288... this configuration aspect is reflected by the driverdata for the RK3399 driver. Having some sort of DTS-based configuration for the regulator dependencies would be nice for the future, but for now we simply use lists of regulator names (also via driverdata) that we probe. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: video: rk3399: enable HDMI output (from the rk_vop) for the RK3399Philipp Tomsich
This commit adds a driver for the RK3399 VOPs capable and all the necessary plumbing to feed the HDMI encoder. For the VOP-big, this correctly tracks the ability to feed 10bit RGB data to the encoder. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: video: refactor rk_vop and split RK3288-specific code offPhilipp Tomsich
To prepare for adding the RK3399 VOP driver (which shares most of its registers and config logic with the RK3228 VOP), this change refactors the driver and splits the RK3288-specific driver off. The changes in detail are: - introduces a data-structure for chip-specific drivers to register features/callbacks with the common driver: at this time, this is limited to a callback for setting the pin polarities (between the VOP and the encoder modules) and a flag to signal 10bit RGB capability - refactors the probing of regulators into a helper function that can take a list of regulator names to probe and autoset - moves the priv data-structure into a (common) header file to be used by the chip-specific drivers to provide base addresses to the common driver - uses a callback into the chip-specific driver to set pin polarities (replacing the direct register accesses previously used) - splits enabling the output (towards an encoder) into a separate help function withint the common driver Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: rk3288: grf: Fix shift for RK3288_TXCLK_DLY_ENA_GMAC_ENABLERomain Perier
RK3288_TXCLK_DLY_ENA_GMAC_ENABLE, in GRF_SOC_CON3, is supposed to be bit 0xe and not 0xf. Otherwise, it is RGMII RX clock delayline enable and introduces random delays and data lose. This commit fixes the issue by replacing RK3288_TXCLK_DLY_ENA_GMAC_ENABLE with the right shift. Signed-off-by: Romain Perier <romain.perier@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: dts: rk3399-puma: add DTS for the DDR3-1866 timingPhilipp Tomsich
This adds the DDR3-1866 timing via its own DTS and wires it up. This (currently) is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: dts: rk3399-puma: add DTS for the DDR3-1333 timingPhilipp Tomsich
This adds the DDR3-1333 timing via its own DTS and wires it up. This is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: dts: rk3399-puma: refactor and rename (default) DDR3-1600 DTSPhilipp Tomsich
To better support different RAM timings (DDR3-1333 and DDR3-1866 are assembly options for the RK3399-Q7), this refactors the DTS support and renames the default DTS variant from rk3399-puma to rk3399-puma-ddr1600: - changes the rk3399-puma DTS into a board-specific DTSI by removing the inclusion of the DRAM timings - adds a new rk3399-puma-ddr1600.dts, which includes the (new) common board DTSI and the DDR3-1600 timing DTSI - wires this up from arch/arm/dts/Makefile and configs/puma-rk3399_defconfig Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: dts: rk3399-puma: sync DTS with Linux treePhilipp Tomsich
The Linux DTS for the RK3399-Q7 has moved with the times... resync against it to ensure a consistent configuration. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-08rockchip: dts: rk3399: enable HDMI output in the DTSPhilipp Tomsich
This commit enables HDMI output in the DTS by adding the necessary nodes to vopl/vopb and by adding the HDMI node. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: Add basic support for evb-rv1108 boardAndy Yan
Add basic support for rv1108 evb, whith this patch we can boot into u-boot console. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: Add core Soc start-up code for rv1108Andy Yan
RV1108 is embedded with an ARM Cortex-A7 single core and a DSP core from Rockchip. It is designed for varies application scenario such as car DVR, sports DV, secure camera and UAV camera. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: clk: Add rv1108 clock driverAndy Yan
Add clock driver support for Rockchip rv1108 soc Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: pinctrl: Add rv1108 pinctrl driverAndy Yan
Add pinctrl support for Rockchip rv1108 soc Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: dts: rk3399-puma: set spl-payload-offsetKlaus Goger
defines the spl-payload to 256k (0x40000) Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: dts: rk3399-puma: release reset of on-module USB3 hub via vbus-gpioPhilipp Tomsich
On the RK3399-Q7, the on-module USB3 hub is held in reset at boot-up to save power and needs to be woken up using GPIO4A3. Note that this is not a negated reset-signal (due to a level shifter being needed for this signal anyway), but a negated enable-signal: to enable, we need to output LOW (i.e. 0)... so we mark this as an ACTIVE_LOW signal. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: dts: rk3399-puma: make the debug serial dm-pre-relocPhilipp Tomsich
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: dts: rk3399-puma: Add DDR3-1866 timingsPhilipp Tomsich
With the validation done for DDR3-1866 (i.e. 933 MHz bus clock), we can now add the timings (rk3399-sdram-ddr3-1866.dtsi) for boards built with the DDR3-1866 option. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: arm64: rk3399: support DDR3-1866 (i.e. 933MHz clock)Philipp Tomsich
The RK3399 is capable of driving DDR3 at 933MHz (i.e. DDR3-1866), if the PCB layout permits and appropriate memory timings are used. This changes the sanity checks to allow a DTS to request DDR3-1866 operation. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2017-06-07rockchip: arm64: rk3399: revise timeout-handling for DRAM PHY lockPhilipp Tomsich
Revise the loop watching for a timeout on obtaining a DRAM PHY lock to clearly state a timeout in milliseconds and use get_timer (based on the ARMv8 architected timer) to detect a timeout. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: dts: rk3328: support and enable xhciMeng Dongyang
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: dts: rk3328: add ehci and ohci node and enable host0 portMeng Dongyang
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: pinctrl: rk3328: do not set io routingKever Yang
In rk3328, some function pin may have more than one choice, and muxed with more than one IO, for example, the UART2 controller IO, TX and RX, have 3 choice(setting in com_iomux): - M0 which mux with GPIO1A0/GPIO1A1 - M1 which mux with GPIO2A0/GPIO2A1 - usb2phy which mux with USB2.0 DP/DM pin. We should not decide which group to use in pinctrl driver, for it may be different in different board, it should goes to board file, and the pinctrl file should setting correct iomux depends on the com_iomux value. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-06-07rockchip: pinctrl: move rk3328 grf reg definition in header fileKever Yang
Move GRF register bit definition into GRF header file, remove 'GRF_' prefix and add 'GPIOmXn_' as prefix for bit meaning. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>