]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
9 years agoMerge branch 'master' of http://git.denx.de/u-boot-sparc
Tom Rini [Fri, 4 Dec 2015 22:50:34 +0000 (17:50 -0500)]
Merge branch 'master' of http://git.denx.de/u-boot-sparc

9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Fri, 4 Dec 2015 13:21:28 +0000 (08:21 -0500)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

9 years agosparc: Remove non-generic board init files: board.c, time.c
Francois Retief [Sat, 21 Nov 2015 21:15:07 +0000 (23:15 +0200)]
sparc: Remove non-generic board init files: board.c, time.c

Remove the board.c and time.c files and all associated non-generic board
initialization code.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: leon3: Added busy wait function, made wait_ms() work when IRQ is disabled
Daniel Hellstrom [Fri, 22 Jan 2010 11:02:40 +0000 (12:02 +0100)]
sparc: leon3: Added busy wait function, made wait_ms() work when IRQ is disabled

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
9 years agosparc: leon3: Added CPU count and frequency detection.
Daniel Hellstrom [Fri, 22 Jan 2010 12:25:03 +0000 (13:25 +0100)]
sparc: leon3: Added CPU count and frequency detection.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
9 years agosparc: Removed USB stop from linux bootm, arch-independent bootm stop USB
Daniel Hellstrom [Fri, 22 Jan 2010 12:50:22 +0000 (13:50 +0100)]
sparc: Removed USB stop from linux bootm, arch-independent bootm stop USB

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
9 years agosparc: Use microseconds instead of ticks for timeout
Francois Retief [Mon, 27 Oct 2014 13:56:01 +0000 (15:56 +0200)]
sparc: Use microseconds instead of ticks for timeout

We now use the generic delay method which specifies the timeout as
microseconds instead of ticks.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON boards
Francois Retief [Wed, 28 Oct 2015 14:49:02 +0000 (16:49 +0200)]
sparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON boards

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Update PROM initialization code for generic board
Francois Retief [Mon, 23 Nov 2015 11:05:44 +0000 (13:05 +0200)]
sparc: Update PROM initialization code for generic board

Fixed the prom_relocate() function in start.S file by reserving memory in
the board_init_f sequence and saving the offset to the __prom_start_reloc
variable. This value is used as the destination when relocating the PROM.

Add the prom_init() function to the end of the board_init_r sequence.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Update cpu_init.c to use generic timer infrastructure
Francois Retief [Wed, 28 Oct 2015 13:18:22 +0000 (15:18 +0200)]
sparc: Update cpu_init.c to use generic timer infrastructure

Introduce the CONFIG_SYS_TIMER_* macros in include/asm/config.h to make use
of the generic timer infrastructure in lib/time.c.

Created a timer_init() function to initialize the timer hardware and update
the #ifdef in board_init_f to allow this function to be called during the
start-up sequence.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: leon2: Updates for generic board initialization
Francois Retief [Sat, 21 Nov 2015 11:25:41 +0000 (13:25 +0200)]
sparc: leon2: Updates for generic board initialization

Reworked the LEON2 start.S code to call board_init_f function at startup.
Also implemented the relocate_code function in assembly to relocate the
monitor and setup the stack pointer before calling relocated board_init_r.

Add the CONFIG_SYS_GENERIC_BOARD variable to all the LEON2 boards.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: leon3: Updates for generic board initialization
Francois Retief [Wed, 28 Oct 2015 22:02:48 +0000 (00:02 +0200)]
sparc: leon3: Updates for generic board initialization

Reworked the LEON3 start.S code to call board_init_f function at startup.
Also implemented the relocate_code function in assembly to relocate the
monitor and setup the stack pointer before calling relocated board_init_r.

Add the CONFIG_SYS_GENERIC_BOARD variable to all the LEON3 boards.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: leon3: Clear all unused GPTIMER registers.
Daniel Hellstrom [Wed, 22 Sep 2010 15:42:29 +0000 (17:42 +0200)]
sparc: leon3: Clear all unused GPTIMER registers.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
9 years agosparc: leon3: Move ambapp_bus_init() call to arch_cpu_init() function
Francois Retief [Thu, 29 Oct 2015 10:58:52 +0000 (12:58 +0200)]
sparc: leon3: Move ambapp_bus_init() call to arch_cpu_init() function

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: leon3: Move snoop detection from startup.S to arch_cpu_init()
Francois Retief [Wed, 28 Oct 2015 13:48:41 +0000 (15:48 +0200)]
sparc: leon3: Move snoop detection from startup.S to arch_cpu_init()

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Initial ground work for generic board initialization
Francois Retief [Wed, 28 Oct 2015 12:29:32 +0000 (14:29 +0200)]
sparc: Initial ground work for generic board initialization

Initial ground work in preperation for generic board initialization
code for the SPARC architecture.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Fix whitespace in cpu/leon2/cpu_init.c
Francois Retief [Sat, 21 Nov 2015 15:07:48 +0000 (17:07 +0200)]
sparc: Fix whitespace in cpu/leon2/cpu_init.c

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: leon3: Updated serial driver to use CONFIG_CONS_INDEX
Francois Retief [Fri, 30 Oct 2015 11:23:41 +0000 (13:23 +0200)]
sparc: leon3: Updated serial driver to use CONFIG_CONS_INDEX

Updated the LEON3 serial driver to make use of the CONFIG_CONS_INDEX
option to select which serial port the console will use.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Serial baud rate register support multiple buses with different frequency
Daniel Hellstrom [Fri, 22 Jan 2010 10:49:04 +0000 (11:49 +0100)]
sparc: Serial baud rate register support multiple buses with different frequency

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
9 years agosparc: leon3: Clear GD_FLAG_SERIAL_READY flag on AMBA failure
Francois Retief [Mon, 23 Nov 2015 07:49:57 +0000 (09:49 +0200)]
sparc: leon3: Clear GD_FLAG_SERIAL_READY flag on AMBA failure

Clear the GD_FLG_SERIAL_READY flag on AMBA P&P lookup failure so that the
panic function can use DEBUG_UART driver. drivers/serial/serial.c set this
flag before calling this function, preventing DEBUG_UART code from running.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Added function that checks if IRQ is on or off
Daniel Hellstrom [Fri, 22 Jan 2010 10:57:49 +0000 (11:57 +0100)]
sparc: Added function that checks if IRQ is on or off

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
9 years agosparc: Remove version_string variable from start.S file
Francois Retief [Wed, 28 Oct 2015 13:56:45 +0000 (15:56 +0200)]
sparc: Remove version_string variable from start.S file

Remove the version_string variable from start.S file. A weak variable
is also set in the cmd_version.c file. No need for architecture override.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agosparc: Move SYS_SPARC_NWINDOWS to Kconfig
Francois Retief [Sun, 1 Nov 2015 13:40:00 +0000 (15:40 +0200)]
sparc: Move SYS_SPARC_NWINDOWS to Kconfig

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
9 years agoRevert "LCD: Add an option to skip registration as an stdio output"
Anatolij Gustschin [Wed, 2 Dec 2015 14:38:00 +0000 (15:38 +0100)]
Revert "LCD: Add an option to skip registration as an stdio output"

This reverts commit 05bfe1321024e2ae0039dc16f17d2165610fb4fd.

As discussed on the list, we already have the needed functionality by
defining CONFIG_SYS_CONSOLE_IS_IN_ENV, CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
and adding custom overwrite_console() in the board code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
9 years agoiocon: Disable FIT_VERBOSE
Tom Rini [Tue, 1 Dec 2015 20:49:42 +0000 (15:49 -0500)]
iocon: Disable FIT_VERBOSE

In order to fit into image constraints again, remove this feature.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoarm: imx6: novena: Enable extfs support in SPL
Marek Vasut [Wed, 25 Nov 2015 23:18:45 +0000 (00:18 +0100)]
arm: imx6: novena: Enable extfs support in SPL

Simple patch to enable support for extfs filesystem in SPL,
this is useful to those who want to avoid vfat like plague.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
9 years agoarm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions
Marek Vasut [Thu, 26 Nov 2015 13:08:50 +0000 (14:08 +0100)]
arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

The following patch changed the PFUZE100 swbst register bit definitions
and broke PMIC configuration on multiple boards, at least on the novena
and gw_ventana. This patch fixes it.

commit 8fa46350a4c7dca7710362f6c871098557b934ad
Author: Peng Fan <Peng.Fan@freescale.com>
Date:   Fri Aug 7 16:43:45 2015 +0800

    power: regulator: add pfuze100 support

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Peng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
9 years agorockchip: Explicitly set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN
Sjoerd Simons [Sun, 22 Nov 2015 07:21:04 +0000 (08:21 +0100)]
rockchip: Explicitly set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN

Now that u-boot relocates the malloc area in SPL to SDRAM, with the
malloc area sitting below the SPL_STACK_R_ADDR the
SPL_STACK_R_MALLOC_SIMPLE_LEN needs to be set explicitly for
rockchip as its SPL_STACK_R_ADDR (512kb) is smaller then
STACK_R_MALLOC_SIMPLE_LEN (1Mb).

Using the same value as SYS_MALLOC_F_LEN (8kb) is enough to load u-boot
from SD card.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoRevert "rockchip: Reconfigure the malloc based to point to system memory"
Sjoerd Simons [Sun, 22 Nov 2015 07:21:03 +0000 (08:21 +0100)]
Revert "rockchip: Reconfigure the malloc based to point to system memory"

This patch was merged shortly before the v2015.10 as a minimal fix for
booting on rockchip. Now that the patch series from Hans to do the
relocation in generic code has been merged it can be dropped.

This reverts commit b1f492ca9e0c090209824ff36456d4f131843190.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: move SYS_MALLOC_SIMPLE to mach-rockchip Kconfig
Ariel D'Alessandro [Mon, 16 Nov 2015 11:15:51 +0000 (08:15 -0300)]
rockchip: move SYS_MALLOC_SIMPLE to mach-rockchip Kconfig

Commit 1eb0c03c2198a7ec9de456b83dacdc4831b96cbf added
SPL_SYS_MALLOC_SIMPLE Kconfig option and changed the way it is
evaluated.

Thus, the definitions of CONFIG_SYS_MALLOC_SIMPLE in rk3***_common.h
board configs are now incorrect because CONFIG_SPL_BUILD is enabled so
CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) will look for SPL_SYS_MALLOC_SIMPLE
instead of SYS_MALLOC_SIMPLE.

This commit fix this enabling SPL_SYS_MALLOC_SIMPLE with the new Kconfig
option by default in rockchip-mach.

Signed-off-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: doc: show packet rk3036 uboot image
huang lin [Tue, 17 Nov 2015 06:20:31 +0000 (14:20 +0800)]
rockchip: doc: show packet rk3036 uboot image

show how to packet rk3036 uboot image and boot from SD

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Series-to: u-boot
Series-version: 8
Series-cc: Lin Huang <hl@rock-chips.com>

9 years agorockchip: Add support for rk's second level loader
Jeffy Chen [Tue, 17 Nov 2015 06:20:30 +0000 (14:20 +0800)]
rockchip: Add support for rk's second level loader

The Rockchip boot ROM could load & run an initial spl loader,
and continue to load a second level boot-loader(which stored
right after the initial loader) when it returns.
Modify idblock generation code to support it.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: Add max spl size & spl header configs
Jeffy Chen [Tue, 17 Nov 2015 06:20:29 +0000 (14:20 +0800)]
rockchip: Add max spl size & spl header configs

Our chips may have different max spl size and spl header, so
we need to add configs for that.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Dropped CONFIG_ROCKCHIP_MAX_SPL_SIZE from rk3288_common.h,
Added $(if...) to tools/Makefile to fix widespread build breakage
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-changes: 8
- Drop CONFIG_ROCKCHIP_MAX_SPL_SIZE from rk3288_common.h,
- Add $(if...) to tools/Makefile to fix widespread build breakage

9 years agorockchip: Add basic support for evb-rk3036 board
huang lin [Tue, 17 Nov 2015 06:20:28 +0000 (14:20 +0800)]
rockchip: Add basic support for evb-rk3036 board

This add some basic files required to allow the board to dispaly
serial message and can run command(mmc info etc)

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Moved board Kconfig fragment from previous patch into this one to fix
build error:
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-changes: 8
- moved board Kconfig fragment from previous patch into this one

9 years agorockchip: rk3036: Add core Soc start-up code
huang lin [Tue, 17 Nov 2015 06:20:27 +0000 (14:20 +0800)]
rockchip: rk3036: Add core Soc start-up code

rk3036 only 4K size SRAM for SPL, so only support
timer, uart, sdram driver in SPL stage, when finish
initial sdram, back to bootrom.And in rk3036 sdmmc and
debug uart use same iomux, so if you want to boot from
sdmmc, you must disable debug uart.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Fixed build error for chromebook_jerry, firefly-rk3288:
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-changes: 8
- Fix build error for chromebook_jerry, firefly-rk3288

9 years agorockchip: add rk3036 sdram driver
huang lin [Tue, 17 Nov 2015 06:20:26 +0000 (14:20 +0800)]
rockchip: add rk3036 sdram driver

add rk3036 sdram driver so we can set up sdram in SPL

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: add early uart driver
huang lin [Tue, 17 Nov 2015 06:20:25 +0000 (14:20 +0800)]
rockchip: add early uart driver

add early uart driver so we can print debug message in
SPL stage

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: mmc: get the fifo mode and fifo depth property from dts
huang lin [Tue, 17 Nov 2015 06:20:24 +0000 (14:20 +0800)]
rockchip: mmc: get the fifo mode and fifo depth property from dts

rk3036 mmc do not have internal dma, so we use fifo mode when read
and write data, we get the fifo mode and fifo depth property from
dts, pass to dw_mmc driver.

Signed-off-by: Lin Huang <hl@rock-chips.com>
9 years agorockchip: mmc: use non-removable property to distinguish emmc and sdcard register
huang lin [Wed, 18 Nov 2015 01:37:25 +0000 (09:37 +0800)]
rockchip: mmc: use non-removable property to distinguish emmc and sdcard register

emmc and sdcard have different register address, use non-removeable property
to distinguish them.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agommc: dw_mmc: support fifo mode in dwc mmc driver
huang lin [Tue, 17 Nov 2015 06:20:22 +0000 (14:20 +0800)]
mmc: dw_mmc: support fifo mode in dwc mmc driver

some soc(rk3036 etc) use dw_mmc but do not have internal dma,
so we implement fifo mode to read and write data.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agommc: dw_mmc: move data transfer as a separate function
huang lin [Tue, 17 Nov 2015 06:20:21 +0000 (14:20 +0800)]
mmc: dw_mmc: move data transfer as a separate function

the data transfer seem to long in the dwmci_send_cmd function,
so move this block as a separate funciton.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: rk3036: Add pinctrl driver
huang lin [Tue, 17 Nov 2015 06:20:20 +0000 (14:20 +0800)]
rockchip: rk3036: Add pinctrl driver

Add a driver which support pin multiplexing setup for rk3036

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: rk3036: Add a simple syscon driver
huang lin [Tue, 17 Nov 2015 06:20:19 +0000 (14:20 +0800)]
rockchip: rk3036: Add a simple syscon driver

Add a driver that provides access to system controllers

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: rk3036: Add Soc reset driver
huang lin [Tue, 17 Nov 2015 06:20:18 +0000 (14:20 +0800)]
rockchip: rk3036: Add Soc reset driver

We can reset the Soc using some CRU (clock/reset unit) register.
Add support for this.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: rk3036: Add header files for GRF
huang lin [Tue, 17 Nov 2015 06:20:17 +0000 (14:20 +0800)]
rockchip: rk3036: Add header files for GRF

GRF is the gereral register file. Add header files with register definitions.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: rk3036: Add clock driver
huang lin [Tue, 17 Nov 2015 06:20:16 +0000 (14:20 +0800)]
rockchip: rk3036: Add clock driver

Add a driver for setting up and modifying the various PLLs, peripheral
clocks and mmc clocks on RK3036

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: Bring in RK3036 device tree file includes and bindings
huang lin [Tue, 17 Nov 2015 06:20:15 +0000 (14:20 +0800)]
rockchip: Bring in RK3036 device tree file includes and bindings

Since rk3036 device tree file still in reviewing, bring it from
https://patchwork.kernel.org/patch/7203371/ and add some aliases
we need in uboot

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: serial driver support rk3036
huang lin [Tue, 17 Nov 2015 06:20:14 +0000 (14:20 +0800)]
rockchip: serial driver support rk3036

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Add SPL Kconfig for REGMAP and SYSCON
huang lin [Tue, 17 Nov 2015 06:20:13 +0000 (14:20 +0800)]
dm: core: Add SPL Kconfig for REGMAP and SYSCON

Add SPL Kconfig for REGMAP and SYSCON, so REGMAP and SYSCON can
remove from SPL stage.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: add config decide whether to build common.c
huang lin [Tue, 17 Nov 2015 06:20:12 +0000 (14:20 +0800)]
rockchip: add config decide whether to build common.c

some rockchips soc will not use uclass in SPL stage,
so define config to decide whether to build common.c

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: rename board-spl.c to rk3288-board-spl.c
huang lin [Tue, 17 Nov 2015 06:20:11 +0000 (14:20 +0800)]
rockchip: rename board-spl.c to rk3288-board-spl.c

since different rockchip soc need different spl file,
so rename board-spl.c.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: move SYS_MALLOC_F_LEN to rk3288 own Kconfig
huang lin [Tue, 17 Nov 2015 06:20:10 +0000 (14:20 +0800)]
rockchip: move SYS_MALLOC_F_LEN to rk3288 own Kconfig

since different rockchip SOC have different size of SRAM,
So the size SYS_MALLOC_F_LEN may different, so move this
config to rk3288 own Kconfig

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: add timer driver
huang lin [Tue, 17 Nov 2015 06:20:09 +0000 (14:20 +0800)]
rockchip: add timer driver

some rockchip soc will not include lib/timer.c in SPL stage,
so implement timer driver for some soc can use us delay function in SPL.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: firefly: Save the environment on SD card
Sjoerd Simons [Fri, 18 Sep 2015 21:49:12 +0000 (23:49 +0200)]
rockchip: firefly: Save the environment on SD card

Save the environment on the SD card for Firefly in the empty space
between the SPL and the u-boot image.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: Also load the initrd below 512M
Sjoerd Simons [Fri, 18 Sep 2015 21:49:11 +0000 (23:49 +0200)]
rockchip: Also load the initrd below 512M

Similar to load an fdt, when loading an initrd about the 512Mb mark
things seem to break. For now force loading below 512Mb until the reason
why this fails has been determined/solved.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoARM: mxs: fix VDDD brownout setting
Michael Heimpold [Sun, 15 Nov 2015 21:47:12 +0000 (22:47 +0100)]
ARM: mxs: fix VDDD brownout setting

At the moment, the desired brownout is at 1.0V. However,
this setting cannot be realized by hardware since we have
only 3 bits to represent the voltage difference from the
target value.

Target value is 1500 mV, brownout target is 1000 mV,
voltage steps are 25 mV.

Register content calculation:
  (1500 [mV] - 1000 [mV]) / 25 [mV] = 20 (decimal) = 0x14

  Register takes only 3 bits, that is 0x4.

But 0x4 * 25 [mV] = 100 [mV], that means that actual
brownout level is 1500 [mV] - 100 [mV] = 1.4 V.

Minimum possible BO level is
  1500 [mV] - 0x7 * 25 [mV] = 1315 [mV].

So lets use this value as desired BO value (which is
also the same as FSL bootlets use).

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agodm: pci: Disable PCI compatibility functions by default
Simon Glass [Fri, 27 Nov 2015 02:51:30 +0000 (19:51 -0700)]
dm: pci: Disable PCI compatibility functions by default

We eventually need to drop the compatibility functions for driver model. As
a first step, create a configuration option to enable them and hide them
when the option is disabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Convert 'pci' command to driver model
Simon Glass [Fri, 27 Nov 2015 02:51:29 +0000 (19:51 -0700)]
dm: pci: Convert 'pci' command to driver model

Adjust this command to use the correct PCI functions, instead of the
compatibility layer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Move PCI header output code into its own function
Simon Glass [Fri, 27 Nov 2015 02:51:28 +0000 (19:51 -0700)]
pci: Move PCI header output code into its own function

We want to share this code with the driver model version, so put it in a
separate function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Use a separate 'dev' variable for the PCI device
Simon Glass [Fri, 27 Nov 2015 02:51:27 +0000 (19:51 -0700)]
pci: Use a separate 'dev' variable for the PCI device

In the 'pci' command, add a separate variable to hold the PCI device. When
this code is converted to driver model, this variable will be used to hold a
struct udevice instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Use common functions to read/write config
Simon Glass [Fri, 27 Nov 2015 02:51:26 +0000 (19:51 -0700)]
pci: Use common functions to read/write config

Currently we use switch() and access PCI configuration via several
functions, one for each data size. Adjust the code to use generic functions,
where the data size is a parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Tidy up function comments in cmd_pci.c
Simon Glass [Fri, 27 Nov 2015 02:51:25 +0000 (19:51 -0700)]
pci: Tidy up function comments in cmd_pci.c

The function comments use an old style and some are incorrect. Update them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Reorder functions in cmd_pci.c
Simon Glass [Fri, 27 Nov 2015 02:51:24 +0000 (19:51 -0700)]
dm: pci: Reorder functions in cmd_pci.c

Before converting this to driver model, reorder the code to avoid forward
function declarations.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Move common auto-config functions to a common file
Simon Glass [Fri, 27 Nov 2015 02:51:23 +0000 (19:51 -0700)]
dm: pci: Move common auto-config functions to a common file

Some functions will be used by driver model and legacy PCI code. To avoid
duplication, put these in a separate, shared file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Rename pci_auto.c to pci_auto_old.c
Simon Glass [Fri, 27 Nov 2015 02:51:22 +0000 (19:51 -0700)]
dm: pci: Rename pci_auto.c to pci_auto_old.c

This file should not be used with driver model as it has lots of legacy/
compatibility functions. Rename it to make this clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Add a comment about how to find struct pci_controller
Simon Glass [Fri, 27 Nov 2015 02:51:21 +0000 (19:51 -0700)]
dm: pci: Add a comment about how to find struct pci_controller

With driver mode, struct pci_controller is stored as uclass-private data.
Add a comment to that effect.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Refactor the pciinfo() function
Simon Glass [Fri, 27 Nov 2015 02:51:20 +0000 (19:51 -0700)]
pci: Refactor the pciinfo() function

This function uses macros to output data. It seems better to use a table of
registers rather than macro-based code generation. It also reduces the
code/data size by 2KB on ARM.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Use a separate variable for the bus number
Simon Glass [Fri, 27 Nov 2015 02:51:19 +0000 (19:51 -0700)]
pci: Use a separate variable for the bus number

At present in do_pci(), bdf can either mean a bus number or a PCI bus number.
Use separate variables instead to reduce confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Use a common return in command processing
Simon Glass [Fri, 27 Nov 2015 02:51:18 +0000 (19:51 -0700)]
pci: Use a common return in command processing

Adjust the commands to return from the same place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: tegra: pci: Convert tegra boards to driver model for PCI
Simon Glass [Fri, 20 Nov 2015 03:27:02 +0000 (20:27 -0700)]
dm: tegra: pci: Convert tegra boards to driver model for PCI

Adjust the Tegra PCI driver to support driver model and move all boards over
at the same time. This can make use of some generic driver model code, such
as the range-decoding logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agodm: pci: Add a function to find the regions for a PCI bus
Simon Glass [Fri, 20 Nov 2015 03:27:01 +0000 (20:27 -0700)]
dm: pci: Add a function to find the regions for a PCI bus

This function looks up the controller and returns a pointer to each region
type.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agodm: pci: Add a function to get the controller for a bus
Simon Glass [Fri, 20 Nov 2015 03:27:00 +0000 (20:27 -0700)]
dm: pci: Add a function to get the controller for a bus

A PCI bus may be a bridge device where the controller is the bridge's
parent. Add a function to return the controller device, given a PCI device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agodm: pci: Add functions to emulate 8- and 16-bit access
Simon Glass [Fri, 20 Nov 2015 03:26:59 +0000 (20:26 -0700)]
dm: pci: Add functions to emulate 8- and 16-bit access

Provide a few functions to support using 32-bit access to emulate 8- and
16-bit access.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agodm: pci: Support decoding ranges with duplicate entries
Simon Glass [Fri, 20 Nov 2015 03:26:58 +0000 (20:26 -0700)]
dm: pci: Support decoding ranges with duplicate entries

At present we add a new resource entry for every range entry. But some range
entries refer to configuration regions. To make this work, avoid adding two
regions of the same type. The later ranges will overwrite the earlier
(configuration) ones.

There does not seem to be a way to distinguish the configuration ranges
other than by ordering (as per the device tree binding).

We could perhaps instead just store one region of each type in a simple
array. Once we are sure that we don't need to support multiple regions, we
could change this. It would be easier to do it when all drivers are
converted to use driver model for PCI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agodm: pci: Set up the SDRAM mapping correctly
Simon Glass [Fri, 20 Nov 2015 03:26:57 +0000 (20:26 -0700)]
dm: pci: Set up the SDRAM mapping correctly

SDRAM doesn't always start at 0. Adjust the region mapping so that it works
on platforms where SDRAM is somewhere else.

This needs testing on other platforms.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agodm: pci: Avoid a driver model build error with CONFIG_CMD_PCI_ENUM
Simon Glass [Fri, 20 Nov 2015 03:26:56 +0000 (20:26 -0700)]
dm: pci: Avoid a driver model build error with CONFIG_CMD_PCI_ENUM

This is not supported with driver model, so print a message instead of
generating a build error. Rescanning PCI is not yet implemented.

This function will be implemented later once some additional PCI driver
model improvements are merged. It was confirmed on the mailing list
that no one on the tegra side will miss this feature, so it is disabled
for tegra.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agodm: tegra: pci: Move CONFIG_PCI_TEGRA to Kconfig
Simon Glass [Fri, 20 Nov 2015 03:26:55 +0000 (20:26 -0700)]
dm: tegra: pci: Move CONFIG_PCI_TEGRA to Kconfig

Move this option to Kconfig and fix up all users.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agoARM: tegra: refactor common Kconfig options
Stephen Warren [Mon, 23 Nov 2015 17:32:01 +0000 (10:32 -0700)]
ARM: tegra: refactor common Kconfig options

This makes it easier to select common options in a single place, rather
than having to add them separately for different SoCs or architectures.

The lists of select statements are now also sorted for easy searching.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: tsc: Move tsc_timer.c to drivers/timer
Bin Meng [Fri, 13 Nov 2015 08:11:24 +0000 (00:11 -0800)]
x86: tsc: Move tsc_timer.c to drivers/timer

To group all dm timer drivers together, move tsc timer to
drivers/timer directory.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: tsc: Remove legacy timer codes
Bin Meng [Fri, 13 Nov 2015 08:11:23 +0000 (00:11 -0800)]
x86: tsc: Remove legacy timer codes

Now that we have converted all x86 boards to use driver model timer,
remove these legacy timer codes in the tsc driver.

Note this also removes the TSC_CALIBRATION_BYPASS Kconfig option,
as it is not needed with driver model.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Convert to use driver model timer
Bin Meng [Fri, 13 Nov 2015 08:11:22 +0000 (00:11 -0800)]
x86: Convert to use driver model timer

Convert all x86 boards to use driver model tsc timer.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: timer: Avoid using timer before it is ready
Simon Glass [Sun, 29 Nov 2015 05:16:35 +0000 (22:16 -0700)]
dm: timer: Avoid using timer before it is ready

At present bootstage will try to read the timer very early after relocation.
When driver model is used to provide the timer, we cannot read it until
driver model is ready. Correct this by adding a separate stage for the
post-relocation bootstage init.

This fixes booting on chromebook_link.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
9 years agox86: tsc: Add driver model timer support
Bin Meng [Fri, 13 Nov 2015 08:11:21 +0000 (00:11 -0800)]
x86: tsc: Add driver model timer support

This adds driver model timer support to x86 tsc timer driver.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: tsc: Use notrace from <linux/compiler.h>
Bin Meng [Fri, 13 Nov 2015 08:11:20 +0000 (00:11 -0800)]
x86: tsc: Use notrace from <linux/compiler.h>

Replace __attribute__((no_instrument_function)) with notrace from
<linux/compiler.h>.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Remove MIN_PORT80_KCLOCKS_DELAY
Bin Meng [Fri, 13 Nov 2015 08:11:19 +0000 (00:11 -0800)]
x86: Remove MIN_PORT80_KCLOCKS_DELAY

This is not referenced anywhere. Remove it, as well as
tsc_base_kclocks and tsc_prev in the global data.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Fix 'Reomve' typo:
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: timer: Support 64-bit counter
Bin Meng [Tue, 24 Nov 2015 20:31:17 +0000 (13:31 -0700)]
dm: timer: Support 64-bit counter

There are timers with a 64-bit counter value but current timer
uclass driver assumes a 32-bit one. Modify timer_get_count()
to ask timer driver to always return a 64-bit counter value,
and provide an inline helper function timer_conv_64() to handle
the 32-bit/64-bit conversion automatically.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotimer: sandbox: Use device tree to pass the clock frequency
Bin Meng [Fri, 13 Nov 2015 08:11:17 +0000 (00:11 -0800)]
timer: sandbox: Use device tree to pass the clock frequency

We should use device tree to pass the clock frequency of the timer
instead of hardcoded in the driver codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotimer: altera: Remove the codes to get clock frequency
Bin Meng [Fri, 13 Nov 2015 08:11:16 +0000 (00:11 -0800)]
timer: altera: Remove the codes to get clock frequency

Since we have timer uclass to get clock frequency for us, remove
the custom version in the altera timer driver.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: timer: Implement pre_probe()
Bin Meng [Fri, 13 Nov 2015 08:11:15 +0000 (00:11 -0800)]
dm: timer: Implement pre_probe()

Every timer device needs to have a valid clock frequency and it
can be specified in the device tree. Use pre_probe() to get this
in the timer uclass driver.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: timer: Fix several nits
Bin Meng [Fri, 13 Nov 2015 08:11:14 +0000 (00:11 -0800)]
dm: timer: Fix several nits

This changes 'Timer' to 'timer' at several places.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-atmel
Tom Rini [Mon, 30 Nov 2015 23:13:10 +0000 (18:13 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-atmel

9 years agoarm: at91/spl: atmel_sfr: move saic redirect to separate file
Wenyou Yang [Thu, 5 Nov 2015 08:37:53 +0000 (16:37 +0800)]
arm: at91/spl: atmel_sfr: move saic redirect to separate file

To make saic redirect code sharing with other SoCs, move the
saic redirect code from SAMA5D4 particular file,
mach-at91/armv7/sama5d4_devices.c to a separate file,
mach-at91/atmel_sfr.c

Move ATMEL_SFR_AICREDIR_KEY definition to sama5d4.h, because each
SoC has its own value.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: use matrix slave id macros
Wenyou Yang [Thu, 5 Nov 2015 08:37:52 +0000 (16:37 +0800)]
arm: at91/spl: matrix: use matrix slave id macros

To make matrix initialization code sharing with others,
use the matrix slave id macros, instead of hard-coding.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: remove security peripheral select code
Wenyou Yang [Thu, 5 Nov 2015 08:37:51 +0000 (16:37 +0800)]
arm: at91/spl: matrix: remove security peripheral select code

Remove the security peripheral select code, keep the default value
in these registers, that is, the peripheral address space is
configured as "Secured" access, it is suitable for SPL.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: remove matrix write protection code
Wenyou Yang [Thu, 5 Nov 2015 08:37:50 +0000 (16:37 +0800)]
arm: at91/spl: matrix: remove matrix write protection code

On processor reset, the matrix write protection is disabled,
so no need to disable/enable write protection when writing
the matrix registers.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: move matrix init to separate file
Wenyou Yang [Thu, 5 Nov 2015 08:37:49 +0000 (16:37 +0800)]
arm: at91/spl: matrix: move matrix init to separate file

To make the matrix initialization code sharing with other SoCs,
move it from SAMA5D4 particular file,
mach-at91/armv7/sama5d4_devices.c to a separate file,
mach-at91/matrix.c

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: atmel: Add SAMA5D2 Xplained board
Wenyou Yang [Fri, 30 Oct 2015 01:55:52 +0000 (09:55 +0800)]
arm: atmel: Add SAMA5D2 Xplained board

The board supports following features:
 - Boot media support: SD card/e.MMC/SPI flash,
 - Support LCD display (optional, disabled by default),
 - Support ethernet,
 - Support USB mass storage.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
[fix checkpatch warnings]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agogpio: atmel: Add the PIO4 driver support
Wenyou Yang [Wed, 4 Nov 2015 06:25:13 +0000 (14:25 +0800)]
gpio: atmel: Add the PIO4 driver support

The PIO4 is introduced from SAMA5D2, as a new version
for Atmel PIO controller.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Mon, 30 Nov 2015 20:18:30 +0000 (15:18 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

9 years agoarmv8: fsl-layerscape: Fix early MMU table for nand boot
York Sun [Wed, 25 Nov 2015 22:56:40 +0000 (14:56 -0800)]
armv8: fsl-layerscape: Fix early MMU table for nand boot

The early MMU table doesn't enable all addresses. Unused addresses
are marked as invalid, as introduced by commit 9979922. An entry
was missing for NAND flash space, causing nand boot failure.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
CC: Prabhakar Kushwaha <prabhakar@freescale.com>