summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove various unused interrupt related codeTom Rini2017-04-0674-345/+5
| | | | | | | | | | | | | With d53ecad92f06 some unused interrupt related code was removed. However all of these options are currently unused. Rather than migrate some of these options to Kconfig we just remove the code in question. The only related code changes here are that in some cases we use CONFIG_STACKSIZE in non-IRQ related context. In these cases we rename and move the value local to the code in question. Fixes: d53ecad92f06 ("Merge branch 'master' of git://git.denx.de/u-boot-sunxi") Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini2017-04-0638-152/+343
|\ | | | | | | | | | | trini: Disable CONFIG_SPL_USE_ARCH_MEMSET on orangepi_2 Signed-off-by: Tom Rini <trini@konsulko.com>
| * sunxi: Add OrangePi PC 2 initial supportAndre Przywara2017-04-054-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * sunxi: introduce Allwinner H5 config optionAndre Przywara2017-04-052-0/+8
| | | | | | | | | | | | | | | | | | | | 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>
| * sunxi: prepare for sharing MACH_SUN8I_H3 config symbolAndre Przywara2017-04-0512-22/+26
| | | | | | | | | | | | | | | | | | | | | | 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>
| * sunxi: DRAM: add Allwinner H5 supportAndre Przywara2017-04-052-16/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * SPI: SPL: sunxi: fix 64-bit buildAndre Przywara2017-04-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
| * sunxi: provide ARMv8 mem_map for every ARM64 boardAndre Przywara2017-04-051-1/+1
| | | | | | | | | | | | | | | | | | 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>
| * sunxi: Kconfig: introduce CONFIG_SUNXI_HIGH_SRAMAndre Przywara2017-04-053-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * sunxi: configs: merge sun9i and sun50i SPL memory definitionsAndre Przywara2017-04-051-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * sunxi: simplify ACTLR.SMP bit set #ifdefAndre Przywara2017-04-053-4/+7
| | | | | | | | | | | | | | | | | | | | 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>
| * fsl: ls102x: remove redundant GENERIC_TIMER_CLKAndre Przywara2017-04-055-17/+2
| | | | | | | | | | | | | | | | | | | | | | Some Freescale boards used an extra version of the constant to hold the Generic Timer frequency. This can easily be covered by the now unified COUNTER_FREQUENCY constant, so remove this extra variable from those boards. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
| * ARM: rename CONFIG_TIMER_CLK_FREQ to COUNTER_FREQUENCYAndre Przywara2017-04-0511-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | Many ARMv8 boards define a constant COUNTER_FREQUENCY to specify the frequency of the ARM Generic Timer (aka. arch timer). ARMv7 boards traditionally used CONFIG_TIMER_CLK_FREQ for the same purpose. It seems useful to unify them. Since there are less occurences of the latter version, lets convert all users over to COUNTER_FREQUENCY. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
| * sunxi: fix ACTLR.SMP assembly routineAndre Przywara2017-04-051-1/+2
| | | | | | | | | | | | | | | | | | | | If we take the liberty to use register r0 to perform our bit set, we should be nice enough to tell the compiler about it. Add r0 to the clobber list to avoid potential mayhem. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jagan Teki <jagan@openedev.com>
* | dm: serial: Allow driver-model serial to be disabled for TPLSimon Glass2017-04-052-1/+21
| | | | | | | | | | | | | | | | 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>
* | dm: core: Allow driver model to be disabled for TPLSimon Glass2017-04-052-1/+15
| | | | | | | | | | | | | | | | | | 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>
* | Makefile: Provide an option to select SPL or TPLSimon Glass2017-04-052-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | board_f: powerpc: Drop unused headersSimon Glass2017-04-051-15/+3
| | | | | | | | | | | | | | | | | | 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>
* | board_f: Make relocation functions genericSimon Glass2017-04-057-52/+42
| | | | | | | | | | | | | | 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>
* | board_f: Make init_helpers genericSimon Glass2017-04-055-20/+9
| | | | | | | | | | | | | | | | 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>
* | powerpc: Move setup_board_extra() into a PPC fileSimon Glass2017-04-054-25/+40
| | | | | | | | | | | | | | | | 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>
* | board_f: Move errno.h down to the bottomSimon Glass2017-04-051-1/+1
| | | | | | | | | | | | | | 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>
* | board_f: Drop unused headersSimon Glass2017-04-051-5/+0
| | | | | | | | | | | | | | | | 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>
* | Move dram_init_banksize() to a common headerSimon Glass2017-04-053-2/+17
| | | | | | | | | | | | | | | | 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>
* | board_f: Drop setup_dram_config() wrapperSimon Glass2017-04-0564-76/+192
| | | | | | | | | | | | | | | | 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>
* | board_f: Drop CONFIG_SPL_BUILD checkSimon Glass2017-04-051-8/+0
| | | | | | | | | | | | | | 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>
* | board_f: Put video memory reservation in one functionSimon Glass2017-04-051-31/+5
| | | | | | | | | | | | | | 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>
* | board_f: Move the extra #ifdef condition into reserve_mmu()Simon Glass2017-04-051-4/+4
| | | | | | | | | | | | | | | | 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>
* | board_f: Use a single condition for reserve_logbuffer()Simon Glass2017-04-051-2/+5
| | | | | | | | | | | | | | 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>
* | xtensa: Place relocated U-Boot in the normal placeSimon Glass2017-04-051-6/+0
| | | | | | | | | | | | | | | | 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>
* | board_f: Drop return value from initdram()Simon Glass2017-04-05136-304/+631
| | | | | | | | | | | | | | | | | | 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>
* | board_f: Drop board_type parameter from initdram()Simon Glass2017-04-05140-155/+156
| | | | | | | | | | | | | | | | | | 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>
* | i2c: Drop CONFIG_SOFT_I2C_MULTI_BUSSimon Glass2017-04-054-68/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | i2c: Drop unused i2c_soft...() functionsSimon Glass2017-04-052-59/+0
| | | | | | | | | | | | | | 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>
* | board_f: x86: Use checkcpu() for CPU initSimon Glass2017-04-0510-8/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() privateSimon Glass2017-04-054-11/+11
| | | | | | | | | | | | | | | | 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>
* | board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()Simon Glass2017-04-053-3/+7
| | | | | | | | | | | | | | | | | | 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>
* | board_f: powerpc: Move prt_83xx_rsr() to private codeSimon Glass2017-04-055-5/+8
| | | | | | | | | | | | | | 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>
* | powerpc: freescale: Unify the two get_clocks() callsSimon Glass2017-04-051-4/+1
| | | | | | | | | | | | | | | | 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>
* | board_f: Use timer_init() on all archsSimon Glass2017-04-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | board_f: powerpc: Use timer_init() instead of init_timebase()Simon Glass2017-04-056-8/+5
| | | | | | | | | | | | | | | | | | 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>
* | board_f: powerpc: Unified get_clocks() portion of init sequenceSimon Glass2017-04-051-6/+2
| | | | | | | | | | | | | | | | 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>
* | board_f: Remove adjust_sdram_tbs_8xx() from the init sequenceSimon Glass2017-04-053-35/+33
| | | | | | | | | | | | | | 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>
* | board_f: Remove sdram_adjust_866() from the init sequenceSimon Glass2017-04-053-19/+16
| | | | | | | | | | | | | | 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>
* | board_f: powerpc: Rename get_clocks_866() to get_clocks()Simon Glass2017-04-053-3/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sectionsSimon Glass2017-04-051-9/+8
| | | | | | | | | | | | | | | | 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>
* | board_f: x86: Rename x86_fsp_init() to arch_fsp_init()Simon Glass2017-04-054-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | board_f: initcall: Add a header guardSimon Glass2017-04-051-0/+5
| | | | | | | | | | | | This file is missing the usual header guard. Add it. Signed-off-by: Simon Glass <sjg@chromium.org>
* | board_f: sandbox: Move setup_ram_buf() to private codeSimon Glass2017-04-052-18/+7
| | | | | | | | | | | | | | | | | | | | 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>
* | OpenRISC: RemoveTom Rini2017-04-0546-3484/+1
| | | | | | | | | | | | | | | | 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>