summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-07Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini
trini: Disable CONFIG_SPL_USE_ARCH_MEMSET on orangepi_2 Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05dm: serial: Allow driver-model serial to be disabled for TPLSimon Glass
Add separate enable/disable controls for driver-model serial. While this is generally enabled in SPL it may not be in TPL, since serial output can be obtained with the debug UART with minimal code size. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05dm: core: Allow driver model to be disabled for TPLSimon Glass
Since TPL often needs to be very very small it may not make sense to enable driver model. Add an option for this. This changes brings the 'rock' board under the TPL limit with gcc 4.9. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05Makefile: Provide an option to select SPL or TPLSimon Glass
At present we have SPL_ which can be used in Makefiles to select between normal and SPL CONFIGs like this: obj-$(CONFIG_$(SPL_)DM) += core/ When TPL is being built, SPL_ has the value 'SPL' which is generally a good idea since they tend to follow each other. But in extreme situations we may want to distinugish between SPL and TPL. For example we may not want to enable CONFIG_DM with TPL. Add a new SPL_TPL_ variable which is set to either empty (for U-Boot proper), 'SPL' or 'TPL'. This may prove useful with TPL-specific options. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05board_f: powerpc: Drop unused headersSimon Glass
These includes don't seem to be needed now. Drop them. Reserve the mp.h header for PowerPC for now. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: York Sun <york.sun@nxp.com>
2017-04-05board_f: Make relocation functions genericSimon Glass
This header file is used by three archs. It could be used by all of them since relocation is a common function. Move it into a generic file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05board_f: Make init_helpers genericSimon Glass
This header file is used by two archs. It could be used by all of them since it allows the cache to be on during relocation. Move it into a generic file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05powerpc: Move setup_board_extra() into a PPC fileSimon Glass
We don't need this PPC-specific function in generic code. Move it to the powerpc directory. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: Move errno.h down to the bottomSimon Glass
This is to keep the header file order consistent. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2017-04-05board_f: Drop unused headersSimon Glass
Drop headers which are not used or needed in this file. The compiler.h header is included by common.h. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2017-04-05Move dram_init_banksize() to a common headerSimon Glass
This is an weak function present on all archs so we should have it in the common header file. Remove it from arch-specific headers and add a function comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05board_f: Drop setup_dram_config() wrapperSimon Glass
By making dram_init_banksize() return an error code we can drop the wrapper. Adjust this and clean up all implementations. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: Drop CONFIG_SPL_BUILD checkSimon Glass
This is never defined when building this file, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2017-04-05board_f: Put video memory reservation in one functionSimon Glass
Move the ugly #ifdefs inside the reserve_video() function so we can collect all this init into one place. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05board_f: Move the extra #ifdef condition into reserve_mmu()Simon Glass
The arch-specific details of the cache being off are best handled inside the reserve_mmu(). This cleans up the init sequence a little. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2017-04-05board_f: Use a single condition for reserve_logbuffer()Simon Glass
CONFIG_ALT_LB_ADDR is really a detail of how this logbuffer is allocated rather than whether to do it at all. So move the #ifdef into the function. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05xtensa: Place relocated U-Boot in the normal placeSimon Glass
All archs put U-Boot at the bottom of the relocated region. Xtensa does not, but perhaps not for any good reason. Adjust it to see if things still work OK. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05board_f: Drop return value from initdram()Simon Glass
At present we cannot use this function as an init sequence call without a wrapper, since it returns the RAM size. Adjust it to set the RAM size in global_data instead, and return 0 on success. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: Drop board_type parameter from initdram()Simon Glass
It looks like only cm5200 and tqm8xx use this feature, so we don't really need it in generic code. Drop it and have the users access gd->board_type directly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05i2c: Drop CONFIG_SOFT_I2C_MULTI_BUSSimon Glass
This is not used by any board. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Clean up board_f sequence a little This series tries to remove #ifdefs from the board_f init sequence. It gets as far as I2C and then we need to discuss whether we can start to remove the old I2C framework. I think that ideally each entry in the init sequence should be enabled by at most one CONFIG, which is in Kconfig and is not arch-specific. END Acked-by: Lukasz Majewski <lukma@denx.de> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-04-05i2c: Drop unused i2c_soft...() functionsSimon Glass
These are not used in U-Boot. Manual relocation fixup is used by blackfin but that is being removed. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05board_f: x86: Use checkcpu() for CPU initSimon Glass
At present we misuse print_cpuinfo() do so CPU init on x86. This is done because it is the next available call after the console is enabled. But several arches use checkcpu() instead. Despite the horrible name (which we can fix), it seems a better choice. Adjust the various x86 CPU implementations to move their init code into checkcpu() and use print_cpuinfo() only for printing CPU info. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() privateSimon Glass
Move these two function calls into checkcpu(), which is called on this arch immediately after these two. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()Simon Glass
We don't need a special hook for sandbox as one of the later ones will do just as well. We can print error messages about bad options after we print the banner. In fact, it seems better. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: powerpc: Move prt_83xx_rsr() to private codeSimon Glass
This function is called just before checkcpu() on MPX83xx. Move it to the code for that arch. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05powerpc: freescale: Unify the two get_clocks() callsSimon Glass
Combine the conditions so this appears in the init list only once. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: Use timer_init() on all archsSimon Glass
More than half of the architectures use this function so let's make them all use it. For those which don't actually define it, we can rely on the weak function in lib/time.c Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: powerpc: Use timer_init() instead of init_timebase()Simon Glass
There is no good reason to use a different name on PowerPC. Change it to timer_init() like the others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: powerpc: Unified get_clocks() portion of init sequenceSimon Glass
Now that both branches of the #if do the same thing, we can unify them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: Remove adjust_sdram_tbs_8xx() from the init sequenceSimon Glass
We can just call this from the only place that needs it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: Remove sdram_adjust_866() from the init sequenceSimon Glass
We can just call this from the only function that needs it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: powerpc: Rename get_clocks_866() to get_clocks()Simon Glass
We really don't need to have a name like this in the generic init sequence. Use the generic get_clocks() name so that we can merge these two at some point. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sectionsSimon Glass
We have two chunks of code which depend on this CONFIG options. There is likely no need to keep them apart, so join them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: x86: Rename x86_fsp_init() to arch_fsp_init()Simon Glass
While x86 is the only user and this could in principle be moved to arch_cpu_init() there is some justification for this being a separate call. It provides a way to handle init which is not CPU-specific, but must happen before the CPU can be set up. Rename the function to be more generic. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: initcall: Add a header guardSimon Glass
This file is missing the usual header guard. Add it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-05board_f: sandbox: Move setup_ram_buf() to private codeSimon Glass
There is no need to have this call in the generic init sequence and no other architecture has needed it in the time it has been there. Move it into sandbox's private code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05OpenRISC: RemoveTom Rini
The OpenRISC architecture is currently unmaintained, remove. Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-05SPARC: RemoveTom Rini
The SPARC architecture is currently unmaintained, remove. Cc: Francois Retief <fgretief@spaceteq.co.za> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05Blackfin: RemoveTom Rini
The architecture is currently unmaintained, remove. Cc: Benjamin Matthews <mben12@gmail.com> Cc: Chong Huang <chuang@ucrobotics.com> Cc: Dimitar Penev <dpn@switchfin.org> Cc: Haitao Zhang <hzhang@ucrobotics.com> Cc: I-SYST Micromodule <support@i-syst.com> Cc: M.Hasewinkel (MHA) <info@ssv-embedded.de> Cc: Marek Vasut <marex@denx.de> Cc: Martin Strubel <strubel@section5.ch> Cc: Peter Meerwald <devel@bct-electronic.com> Cc: Sonic Zhang <sonic.adi@gmail.com> Cc: Valentin Yakovenkov <yakovenkov@niistt.ru> Cc: Wojtek Skulski <info@skutek.com> Cc: Wojtek Skulski <skulski@pas.rochester.edu> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05mx6sxsabreauto: Remove legacy CONFIG_PCA953XTom Rini
When this board was switched to using more DM drivers we didn't disable the legacy PCA953X driver. This in turn learn to a build time warning about implicit functions as i2c.h would not say anything about 'i2c_read' nor 'i2c_write'. But this was not a fatal error as none of the legacy driver would be linked in either. Fixes: e389033f72b5 ("imx: mx6sxsabreauto: enable more dm drivers") Reviewed-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05Merge git://git.denx.de/u-boot-dmTom Rini
2017-04-05sunxi: Add OrangePi PC 2 initial supportAndre Przywara
The OrangePi PC 2 is a typical SBC with the 64-bit Allwinner H5 SoC. Add a (64-bit only) defconfig defining the required options to build the U-Boot proper. Create a new .dts file for it by including the (32-bit) H3 SoC .dtsi and changing the differing components accordingly. This is a preliminary device tree mostly for U-Boot's own sake, it is expected to be updated once the official DT gets accepted upstream. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [squash the commits, update the commit message] Signed-off-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05sunxi: introduce Allwinner H5 config optionAndre Przywara
The Allwinner H5 Soc is bascially an H3 with high SRAM and ARMv8 cores. As the peripherals and the pinmuxing are almost identical, we piggy back on the shared MACH_SUN8I_H3_H5 config symbol. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05sunxi: prepare for sharing MACH_SUN8I_H3 config symbolAndre Przywara
The Allwinner H5 is very close to the H3 SoC, but has ARMv8 cores. To allow sharing the clocks, GPIO and driver code easily, create an architecture agnostic MACH_SUNXI_H3_H5 Kconfig symbol. Rename the existing symbol to MACH_SUNXI_H3_H5 where code is shared and let it be selected by a new shared Kconfig option. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-05sunxi: DRAM: add Allwinner H5 supportAndre Przywara
The DRAM controller in the Allwinner H5 SoC is again very similar to the one in the H3 and A64. Based on the existing socid parameter, add support for this controller by reusing the bulk of the code and only deviating where needed. These new bits set or cleared here and there have been mostly found by looking at DRAM register dumps after using the H5 boot0 and comparing them to what we set in the code. So for now it's mostly unclear what those bits actually mean - hence the missing names and comments. Also add the delay line parameters taken from the boot0 and libdram disassembly. Register setup differences between H5 and H3 are courtesy of Jens Kuske. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-05SPI: SPL: sunxi: fix 64-bit buildAndre Przywara
Addresses passed on to readl and writel are expected to be of the same size as a pointer. Change the parameter types of sunxi_spi0_read_data() to make the compiler happy and allow a warning-free aarch64 compile. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05sunxi: provide ARMv8 mem_map for every ARM64 boardAndre Przywara
Every armv8 board needs the memory map, so change the #ifdef to ARM64 to avoid enumerating every single board or SoC. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05sunxi: Kconfig: introduce CONFIG_SUNXI_HIGH_SRAMAndre Przywara
Traditionally Allwinner SoCs have their boot ROM mapped just below 4GB, while the first SRAM region is mapped at address 0. With the extended physical memory support of the A80 this was changed, so the BROM is now at address 0 and the SRAM region starts right behind this at 64KB. This configuration seems to be called "high SRAM". Instead of enumerating the SoCs which have copied this configuration, let's call a spade a spade and introduce a Kconfig option for this setup. SoCs implementing this (A80, A64 and H5, so far), can then select this configuration. Simplify the config header definition on the way. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05sunxi: configs: merge sun9i and sun50i SPL memory definitionsAndre Przywara
For some reason we were pretty conservative when defining the maximum SPL size for the Allwinner A80(sun9i) SoC. According to the manual the SRAM A1 is even 40KB, but the BROM probably still has the 32 KiB load limit. For the sake of simplicity, merge the SPL memory definitions for the A64 and A80 SoCs, since both SoC share the BROM/SRAM A1 memory layout. This helps to further simplify this is in the next patch. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05sunxi: simplify ACTLR.SMP bit set #ifdefAndre Przywara
Instead of enumerating all SoC families that need that bit set, let's just express this more clearly: The SMP bits needs to be set on SMP capable ARMv7 CPUs. It's much easier in Kconfig to express it the other way round, so we use ! CPU_IS_UP and ! ARM64. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>