]> git.karo-electronics.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agospi: ti_qspi: Use DMA to read from qspi flash
Vignesh R [Mon, 17 Aug 2015 09:50:13 +0000 (15:20 +0530)]
spi: ti_qspi: Use DMA to read from qspi flash

ti_qspi uses memory map mode for faster read. Enabling DMA will increase
read speed by 3x @48MHz on DRA74 EVM.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agodma: ti-edma3: Add helper function to support edma3 transfer
Vignesh R [Mon, 17 Aug 2015 07:59:55 +0000 (13:29 +0530)]
dma: ti-edma3: Add helper function to support edma3 transfer

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agosf: ops: Add spi_flash_copy_mmap function
Tom Rini [Mon, 17 Aug 2015 07:59:54 +0000 (13:29 +0530)]
sf: ops: Add spi_flash_copy_mmap function

When doing a memory mapped copy we may have DMA available and thus need
to have this copy abstracted so that the driver can do it, rather than a
simple memcpy.

Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoARM: AM43XX: Add functions to enable and disable EDMA3 clocks
Vignesh R [Mon, 17 Aug 2015 07:59:53 +0000 (13:29 +0530)]
ARM: AM43XX: Add functions to enable and disable EDMA3 clocks

Adds functions to enable and disable edma3 clocks which can be invoked
by drivers using edma3 to control the clocks.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoARM: OMAP5: Add functions to enable and disable EDMA3 clocks
Vignesh R [Mon, 17 Aug 2015 07:59:52 +0000 (13:29 +0530)]
ARM: OMAP5: Add functions to enable and disable EDMA3 clocks

Adds functions to enable and disable edma3 clocks which can be invoked
by drivers using edma3 to control the clocks.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoARM: OMAP5: Add support for disabling clocks in uboot
Kishon Vijay Abraham I [Mon, 17 Aug 2015 07:59:51 +0000 (13:29 +0530)]
ARM: OMAP5: Add support for disabling clocks in uboot

Add do_disable_clocks() to disable clock domains and module clocks.
These clocks are enabled using do_enable_clocks().

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoARM: AM43xx: Add support for disabling clocks in uboot
Kishon Vijay Abraham I [Mon, 17 Aug 2015 07:59:50 +0000 (13:29 +0530)]
ARM: AM43xx: Add support for disabling clocks in uboot

Add do_disable_clocks() to disable clock domains and module clocks.
These clocks are enabled using do_enable_clocks().

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoenv: use cache line aligned memory for flash read
Ravi Babu [Mon, 17 Aug 2015 07:59:49 +0000 (13:29 +0530)]
env: use cache line aligned memory for flash read

Use memalign() with ARCH_DMA_MINALIGN to allocate read buffers.
This is required because, flash drivers may use DMA for read operations
and may have to invalidate the buffer before read.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
9 years agosf: allocate cache aligned buffers to copy from flash
Ravi Babu [Mon, 17 Aug 2015 07:59:48 +0000 (13:29 +0530)]
sf: allocate cache aligned buffers to copy from flash

Use memalign() with ARCH_DMA_MINALIGN to allocate read buffers.
This is required because, flash drivers may use DMA for read operations
and may have to invalidate the buffer before read.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
9 years agoti: qspi: set flash quad bit based on quad support flag
vishalm@ti.com [Mon, 17 Aug 2015 15:47:51 +0000 (10:47 -0500)]
ti: qspi: set flash quad bit based on quad support flag

Update op_mode_rx flag based on CONFIG_QSPI_QUAD_SUPPORT flag,
instead of platform.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoarm: mvebu: db-88f6820-gp: Enable PCI support
Stefan Roese [Tue, 11 Aug 2015 10:50:58 +0000 (12:50 +0200)]
arm: mvebu: db-88f6820-gp: Enable PCI support

This patch enabled the MVEBU PCIe support on the db-88f6820-gp A38x
eval board. It also enabled the Intel E1000 driver support and
adds the initialization of PCIe network controllers to the
board code.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anton Schubert <anton.schubert@gmx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agoarm: mvebu: db-mv784mp-gp: Enable PCI support
Stefan Roese [Tue, 11 Aug 2015 07:36:15 +0000 (09:36 +0200)]
arm: mvebu: db-mv784mp-gp: Enable PCI support

This patch enabled the MVEBU PCIe support on the db-mv784mp-gp AXP
eval board. It also enabled the Intel E1000 driver support and
adds the initialization of PCIe network controllers to the
board code.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anton Schubert <anton.schubert@gmx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agopci: mvebu: Add PCIe driver
Anton Schubert [Tue, 11 Aug 2015 09:54:01 +0000 (11:54 +0200)]
pci: mvebu: Add PCIe driver

This adds a PCI driver for the controllers found on Marvell MVEBU SoCs.

Besides the driver, this patch also removes the statically defined
PCI MBUS windows. As they are not needed anymore, since this PCIe
driver now creates the windows dynamically.

Tested on Armada XP db-mv784mp-gp eval board using an Intel E1000
PCIe card in all 3 PCIe slots. And on the Armada 38x db-88f6820-gp
eval board using this Intel E1000 PCIe card in the PCIe 0 slot.

This port was done in cooperation with Anton Schubert.

Signed-off-by: Anton Schubert <anton.schubert@gmx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agoarm: mvebu: Add complete SDRAM ECC scrubbing
Stefan Roese [Thu, 6 Aug 2015 12:43:13 +0000 (14:43 +0200)]
arm: mvebu: Add complete SDRAM ECC scrubbing

This patch introduces the SDRAM scrubbing for ECC enabled board
to fill/initialize the ECC bytes. This is done via the XOR engine
to speed up the process. The scrubbing is a 2-stage process:

1) SPL scrubs the area 0 - 0x100.0000 (16MiB) for the main U-Boot
2) U-Boot scrubs the remaining SDRAM area(s)

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: dram.c: Rework dram_init() and dram_init_banksize()
Stefan Roese [Mon, 10 Aug 2015 13:11:27 +0000 (15:11 +0200)]
arm: mvebu: dram.c: Rework dram_init() and dram_init_banksize()

Rework these functions so that dram_init_banksize() does not call
dram_init() again. It only needs to set the banksize values in the
bdinfo struct.

Make sure to also clip the size of the last bank if it exceeds the
maximum allowed value of 3 GiB (0xc000.0000). Otherwise other
address windows (e.g. PCIe) will overlap with this memory window.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Move CONFIG_SYS_TEXT_BASE to an address < 16 MiB
Stefan Roese [Thu, 6 Aug 2015 12:27:36 +0000 (14:27 +0200)]
arm: mvebu: Move CONFIG_SYS_TEXT_BASE to an address < 16 MiB

This patch moves CONFIG_SYS_TEXT_BASE to 0x00800000 for all Armada
XP / 38x boards in mainline U-Boot. This is done in preparation for
the ECC SDRAM scrubbing that needs to be done in the main U-Boot.
The SPL (previously bin_hdr) has already scrubbed the area:
  0x0000.0000 - 0x0100.0000

In this area this main U-Boot needs to get loaded. The main U-Boot
then can scrub the remaining SDRAM area while running from this
location.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Display ECC enabled / disabled upon bootup
Stefan Roese [Mon, 3 Aug 2015 11:15:31 +0000 (13:15 +0200)]
arm: mvebu: Display ECC enabled / disabled upon bootup

This patch adds "(ECC enabled)" or "(ECC disabled)" to the DRAM
bootup text. Making it easier for board with SPD DIMM's to see,
if ECC is enabled or not.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: add multiple usb-hostcontroller support for AXP
Anton Schubert [Thu, 23 Jul 2015 13:02:09 +0000 (15:02 +0200)]
arm: mvebu: add multiple usb-hostcontroller support for AXP

This patch adds support for multiple hostcontrollers to the ehci-marvell driver
and enables all 3 usb-hcs on the db-mv784mp-gp board.

It depends on the initial Armada XP usb support patch from Stefan.

Signed-off-by: Anton Schubert <anton.schubert@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: db-mv785mp-gp: Add USB/EHCI support
Stefan Roese [Wed, 22 Jul 2015 16:05:43 +0000 (18:05 +0200)]
arm: mvebu: db-mv785mp-gp: Add USB/EHCI support

This patch enabled the USB/EHCI support for the Marvell
DB-MV784MP-GP Armada XP eval board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anton Schubert <anton.schubert@gmx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Enable USB EHCI support on Armada XP
Stefan Roese [Wed, 22 Jul 2015 16:26:13 +0000 (18:26 +0200)]
arm: mvebu: Enable USB EHCI support on Armada XP

This patch enables the USB EHCI support for the Marvell Armada XP (AXP)
SoCs. In compatism to the Armada 38x (A38x), the AXP needs to configure
the USB PLL and the USB PHY's specifically in U-Boot. The A38x has done
this already in the bin_hdr (SPL U-Boot). Without this, accessing the
controller registers in U-Boot or Linux will hang the CPU.

Additionally, the AXP uses a different USB EHCI base address. This
patch also takes care of this by runtime SoC detection in the Marvell
EHCI driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Anton Schubert <anton.schubert@gmx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Enable NAND controller on MVEBU SoC's
Stefan Roese [Thu, 16 Jul 2015 08:40:05 +0000 (10:40 +0200)]
arm: mvebu: Enable NAND controller on MVEBU SoC's

This patch enables the NAND controller on the Armada XP/38x and provides
a new function that returns the NAND controller input clock. This
function will be used by the MVEBU NAND driver.

As part of this patch, the multiple BIT macro definitions are moved
to a common place in soc.h.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Peter Morrow <peter@senient.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Disable MBUS error propagation
Stefan Roese [Wed, 1 Jul 2015 11:28:39 +0000 (13:28 +0200)]
arm: mvebu: Disable MBUS error propagation

Accessing MBUS windows not backed-up by e.g. PCIe devices will
hang the SoC. Disable MBUS error propagation back to CPU allows
to read 0xffffffff instead of hanging the SoC.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Flush caches and disable MMU only on A38x
Stefan Roese [Wed, 1 Jul 2015 11:23:52 +0000 (13:23 +0200)]
arm: mvebu: Flush caches and disable MMU only on A38x

Only with disabled MMU its possible to switch the base register address
on Armada 38x. Without this the SDRAM located at >= 0x4000.0000 is also
not accessible, as its still locked to cache.

So to fully release / unlock this area from cache, we need to first
flush all caches, then disable the MMU and disable the L2 cache.

On Armada XP this does not seem to be needed. Even worse, with this
code added, I sometimes see strange input charactes loss from the
console.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Setup the MBUS bridge registers
Stefan Roese [Wed, 1 Jul 2015 10:44:51 +0000 (12:44 +0200)]
arm: mvebu: Setup the MBUS bridge registers

With this patch, the MBUS bridge registers (base and size) are
configured upon each call to mbus_dt_setup_win(). This is needed, since
the board code can also call this function in later boot stages. As
done in the maxbcm board.

This is needed to fix a problem with the secondary CPU's not booting
in Linux on AXP.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Peter Morrow <peter@senient.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Change MBUS base addresses and sizes
Stefan Roese [Wed, 1 Jul 2015 10:55:07 +0000 (12:55 +0200)]
arm: mvebu: Change MBUS base addresses and sizes

This patch changes the MBUS base addresses and sizes to use more
generic names and also adds defines for the sizes. It also moves
the base address to higher addresses.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: db-mv784mp-gp.h: Fix image creation - use correct offset
Stefan Roese [Mon, 3 Aug 2015 10:13:09 +0000 (12:13 +0200)]
arm: mvebu: db-mv784mp-gp.h: Fix image creation - use correct offset

Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: sdram: Enable ECC support on Armada XP
Stefan Roese [Tue, 11 Aug 2015 15:08:01 +0000 (17:08 +0200)]
arm: mvebu: sdram: Enable ECC support on Armada XP

This is tested on the DB-MV784MP-GP eval board. To really enable ECC
support on this board the I2C EEPROM needs to get changed. As it
saves the enabling of ECC support internally. For this the following
commands can be used to enable ECC support on this board:

Its recommended for first save (print) the value(s) in this EEPROM
address:

=> i2c md 4e 0.1 2
0000: 05 00    ..

To enable ECC support you need to set bit 1 in the 2nd byte:

Marvell>> i2c mw 4e 1.1 02
Marvell>> i2c md 4e 0.1 2
0000: 05 02    ..

To disable ECC support again, please use this command:

Marvell>> i2c mw 4e 1.1 00
Marvell>> i2c md 4e 0.1 2
0000: 05 00    ..

On other AXP boards, simply plugging an ECC DIMM should be enough to
enable ECC support.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu/armada100: dram.c: Remove CONFIG_SYS_BOARD_DRAM_INIT
Stefan Roese [Thu, 6 Aug 2015 08:23:52 +0000 (10:23 +0200)]
arm: mvebu/armada100: dram.c: Remove CONFIG_SYS_BOARD_DRAM_INIT

CONFIG_SYS_BOARD_DRAM_INIT is not defined anywhere. So lets get rid
of all references here.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoi2c: lpc32xx: fix write timeout
Sylvain Lemieux [Mon, 27 Jul 2015 17:37:39 +0000 (13:37 -0400)]
i2c: lpc32xx: fix write timeout

Fix a condition that generate watchdog timeout inside "lpc32xx_i2c_write" when parameters alen = 0 and len = 0.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
9 years agoi2c: lpc32xx: fix read timeout
Sylvain Lemieux [Mon, 27 Jul 2015 17:37:38 +0000 (13:37 -0400)]
i2c: lpc32xx: fix read timeout

Fix a condition that generate watchdog timeout inside "lpc32xx_i2c_read" when parameters alen != 0 and len = 0.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
9 years agoi2c: lpc32xx: use api to get hclk instead of fix value
Sylvain Lemieux [Mon, 27 Jul 2015 17:37:37 +0000 (13:37 -0400)]
i2c: lpc32xx: use api to get hclk instead of fix value

The HCLK is not constant and can take different value; use the api function to get the value of the HCLK for the I2C clock high and low computation.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
9 years agoarm: lpc32xx: gpio macro for pin mapping
Sylvain Lemieux [Mon, 27 Jul 2015 17:37:36 +0000 (13:37 -0400)]
arm: lpc32xx: gpio macro for pin mapping

Add LPC32xx GPIO interface macro for pin mapping.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
9 years agolpc32xx: cpu: add support for soft reset
Sylvain Lemieux [Mon, 27 Jul 2015 17:37:35 +0000 (13:37 -0400)]
lpc32xx: cpu: add support for soft reset

Add support for optional soft reset (i.e. "RESOUT_N" not asserted during reset).

To be compatible with the original U-Boot code, when the "addr" parameter is 0, a hard is performed; for any other values, a soft reset is done.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
9 years agoarm: lpc32xx: mux: add missing registers
Sylvain Lemieux [Mon, 27 Jul 2015 17:37:34 +0000 (13:37 -0400)]
arm: lpc32xx: mux: add missing registers

Add missing registers in struct definition.
Update GPIO MUX base register to match GPIO base (refer to "LPC32x0 User manual" Rev. 3 - 22 July 2011).

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
9 years agosf: Make 4K sector support configurable
Marek Vasut [Sun, 2 Aug 2015 23:28:56 +0000 (01:28 +0200)]
sf: Make 4K sector support configurable

Make the support for 4K subpage I/O on a SPI NOR flash configurable.
A board which requires the SPI NOR to be accessed in larger 32KiB
or 64KiB pages can disable the 4K subpage support, but by default,
the support for 4K subpage I/O is enabled. The functionality of this
option is the same as CONFIG_MTD_SPI_NOR_USE_4K_SECTORS in Linux.

This is extremely useful in case one uses UBI on a SPI NOR flash.
UBI needs at least 15k EBs and can not work on a flash which uses
4k ones, so disabling the support for 4k subpages lets UBI work on
such flash.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoARM: exynos: fix regression for Origen4210
Thomas Abraham [Mon, 3 Aug 2015 12:28:01 +0000 (17:58 +0530)]
ARM: exynos: fix regression for Origen4210

The do_lowlevel_init() function includes certian CA15 specific L2 cache
configuration which is only applicable on Exynos5420 and members of its
family. Fix the regression on Origen4210 by skipping the Exynos5420
specific portions of the code.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoARM: exynos: move SoC sources to mach-exynos
Thomas Abraham [Mon, 3 Aug 2015 12:28:00 +0000 (17:58 +0530)]
ARM: exynos: move SoC sources to mach-exynos

Move arch/arm/cpu/armv7/exynos/* to arch/arm/mach-exynos/* to allow
reuse of existing code for ARMv8 based Exynos platforms.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoDelete an accidentally added .rej file
Tom Rini [Fri, 14 Aug 2015 22:39:44 +0000 (18:39 -0400)]
Delete an accidentally added .rej file

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agopowerpc: ipek01: convert to generic board
Anatolij Gustschin [Fri, 14 Aug 2015 05:04:19 +0000 (07:04 +0200)]
powerpc: ipek01: convert to generic board

Also update maintainer info.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: inka4x0: convert to generic board
Anatolij Gustschin [Fri, 14 Aug 2015 05:01:15 +0000 (07:01 +0200)]
powerpc: inka4x0: convert to generic board

Also update maintainer info.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: socrates: convert to generic board
Anatolij Gustschin [Thu, 13 Aug 2015 21:58:01 +0000 (23:58 +0200)]
powerpc: socrates: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: York Sun <yorksun@freescale.com>
9 years agopowerpc: v38b: convert to generic board
Anatolij Gustschin [Thu, 13 Aug 2015 21:58:00 +0000 (23:58 +0200)]
powerpc: v38b: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: pcm030: convert to generic board
Anatolij Gustschin [Thu, 13 Aug 2015 21:57:59 +0000 (23:57 +0200)]
powerpc: pcm030: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: munices: convert to generic board
Anatolij Gustschin [Thu, 13 Aug 2015 21:57:58 +0000 (23:57 +0200)]
powerpc: munices: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: motionpro: convert to generic board
Anatolij Gustschin [Thu, 13 Aug 2015 21:57:57 +0000 (23:57 +0200)]
powerpc: motionpro: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: jupiter: convert to generic board
Anatolij Gustschin [Thu, 13 Aug 2015 21:57:56 +0000 (23:57 +0200)]
powerpc: jupiter: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: canmb: convert to generic board
Anatolij Gustschin [Thu, 13 Aug 2015 21:57:53 +0000 (23:57 +0200)]
powerpc: canmb: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agoARM: OMAP5+: configs: Fix default boot command
Lokesh Vutla [Thu, 13 Aug 2015 14:56:38 +0000 (20:26 +0530)]
ARM: OMAP5+: configs: Fix default boot command

The default boot command searches for dofastboot varaiable
and does a fastboot if it is set to 1.
But the condition "if test ${dofastboot} -eq 1" always
returns true if dofastboot is not defined and breaking mmc boot.
So make dofastboot as 0 by default and let the runtime
environment set it if fastboot is required.

Reported-by: Yan Liu <yan-liu@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoRevert "fdt: Fix fdtdec_get_addr_size() for 64-bit"
Simon Glass [Mon, 3 Aug 2015 00:13:50 +0000 (18:13 -0600)]
Revert "fdt: Fix fdtdec_get_addr_size() for 64-bit"

This reverts commit 5b34436035fc862b5e8d0d2c3eab74ba36f1a7f4.

This function has a few problems. It calls fdt_parent_offset() which as
mentioned in code review is very slow.

https://patchwork.ozlabs.org/patch/499482/
https://patchwork.ozlabs.org/patch/452604/

It also happens to break SPI flash on Minnowboard max which is how I noticed
that this was applied. I can send a patch to tidy that up, but in any case
I think we should consider a revert until the function is better implemented.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add a simple interrupt script to the README
Simon Glass [Thu, 13 Aug 2015 16:36:17 +0000 (10:36 -0600)]
x86: Add a simple interrupt script to the README

It is a bit tedious to figure out the interrupt configuration for a new
x86 platform. Add a script which can do this, based on the output of
'pci long'. This may be helpful in some cases.

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 agox86: minnowmax: Define and enable interrupt setup
Simon Glass [Thu, 13 Aug 2015 16:36:16 +0000 (10:36 -0600)]
x86: minnowmax: Define and enable interrupt setup

Set up interrupts correctly so that Linux can use all devices. Use
savedefconfig to regenerate the defconfig file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Add clarifications to the x86 README
Stoppa, Igor [Thu, 13 Aug 2015 13:43:35 +0000 (16:43 +0300)]
x86: Add clarifications to the x86 README

* Explicitly list the targets supported in each section of the
instructions from the x86 README.

* Drop references to 'raw mode', in favor of 'bare mode'.

Signed-off-by: Igor Stoppa <igor.stoppa@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Return -1 when reading a PCI config register fails
Simon Glass [Thu, 13 Aug 2015 02:09:30 +0000 (20:09 -0600)]
x86: Return -1 when reading a PCI config register fails

This can fail for internal reasons, so return a sensible value rather than
a random one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Drop FSP error defines and use EFI instead
Simon Glass [Thu, 13 Aug 2015 01:33:07 +0000 (19:33 -0600)]
x86: Drop FSP error defines and use EFI instead

Now that we have an efi.h header we can use that for FSP error defines.
Drop the FSP ones.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Set APs' req_seq to the reg number from device tree
Bin Meng [Mon, 10 Aug 2015 06:58:39 +0000 (23:58 -0700)]
x86: Set APs' req_seq to the reg number from device tree

Multiple APs are brought up simultaneously and they may get the same
seq num in the uclass_resolve_seq() during device_probe(). To avoid
this, set req_seq to the reg number in the device tree in advance.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agovideo: vesa: Correct a typo in the Kconfig VESA mode string
Bin Meng [Mon, 10 Aug 2015 06:26:59 +0000 (23:26 -0700)]
video: vesa: Correct a typo in the Kconfig VESA mode string

There is one typo in the VESA mode 105h string. Correct it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Show the un-relocated IP address in exceptions
Simon Glass [Tue, 11 Aug 2015 04:02:54 +0000 (22:02 -0600)]
x86: Show the un-relocated IP address in exceptions

When trying to figure out where an exception has occured, the relocated
address is not a lot of help. Its value depends on various factors. Show
the un-relocated IP as well. This can be looked up in System.map directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Convert minnowmax to use CONFIG_DM_NET
Simon Glass [Tue, 11 Aug 2015 04:02:53 +0000 (22:02 -0600)]
x86: Convert minnowmax to use CONFIG_DM_NET

Move to driver model for networking on minnowmax.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Convert minnowmax to use CONFIG_DM_USB
Simon Glass [Tue, 11 Aug 2015 04:02:52 +0000 (22:02 -0600)]
x86: Convert minnowmax to use CONFIG_DM_USB

Move to driver model for USB on minnowmax.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoRevert "dm: pci: Allow scan bridge child devices before relocation"
Simon Glass [Tue, 11 Aug 2015 02:54:52 +0000 (20:54 -0600)]
Revert "dm: pci: Allow scan bridge child devices before relocation"

This reverts commit df189d9ba3f8fd1bc67e3c0c3c4ace16cd065ee1.

Unfortunately this commit breaks chromebook_link because it adds lots of PCI devices
before relocation and there is not enough pre-reloc malloc() memory.

Rathar then increase this memory, revert for now until we figure this out.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Switch to using generic global_data setup
Simon Glass [Tue, 11 Aug 2015 02:44:32 +0000 (20:44 -0600)]
x86: Switch to using generic global_data setup

There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Move the GDT into global_data
Simon Glass [Tue, 11 Aug 2015 02:44:31 +0000 (20:44 -0600)]
x86: Move the GDT into global_data

Rather than keeping track of the Global Descriptor Table in its own memory
we may as well put it in global_data with everything else. As a first step,
stop using the separately allocated GDT.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoAllow arch-specific setting of global_data in board_init_f_mem()
Simon Glass [Tue, 11 Aug 2015 02:44:30 +0000 (20:44 -0600)]
Allow arch-specific setting of global_data in board_init_f_mem()

At present we have a simple assignment to gd. With some archs this is
implemented as a register or through some other means; a simple assignment
does not suit in all cases.

Change this to a function and add documentation to describe how this all
works.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <yorksun@freescale.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoAlign global_data to a 16-byte boundary
Simon Glass [Tue, 11 Aug 2015 02:44:29 +0000 (20:44 -0600)]
Align global_data to a 16-byte boundary

Some archs like to have larger alignment for their global data. Use 16 bytes
which suits all current archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agocm5200: fix FAT function prototypes
Stephen Warren [Sun, 9 Aug 2015 17:25:00 +0000 (11:25 -0600)]
cm5200: fix FAT function prototypes

Remove FAT function prototypes from the cm5200 firmware update code, and
include the relevant headers instead.

This exposes the fact that the custom prototyoe for do_fat_read() in
this file was incorrect. Rather than simply fixing the call-site, replace
do_fat_read() with fat_exists(). This removes the only use of
do_fat_read() outside of the FAT code.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agoAdd missing part of: "power: pmic: pfuze100 support driver model"
Peng Fan [Fri, 14 Aug 2015 09:36:16 +0000 (11:36 +0200)]
Add missing part of: "power: pmic: pfuze100 support driver model"

This part of mentioned commit, was missed by my mistake during the rebase.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Original commit message:
power: pmic: pfuze100 support driver model

1. Support driver model for pfuze100.
2. Introduce a new Kconfig entry DM_PMIC_PFUZE100 for pfuze100
3. This driver intends to support PF100, PF200 and PF3000, so add
   the device id into the udevice_id array.
4. Rename PMIC_NUM_OF_REGS macro to PFUZE100_NUM_OF_REGS.

Change-Id: I4fc88414f3c0285f9648e47ec7aed60addeccc4d
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agox86: Remove init_gd() function
Simon Glass [Tue, 11 Aug 2015 02:44:28 +0000 (20:44 -0600)]
x86: Remove init_gd() function

This is declared but no-longer exists. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: baytrail: Support running as an EFI payload
Simon Glass [Mon, 10 Aug 2015 13:05:12 +0000 (07:05 -0600)]
x86: baytrail: Support running as an EFI payload

We should not fiddle with interrupts or the FSP when running as an EFI
payload. Detect this and skip this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: baytrail: Tidy up interrupt and FSP init
Simon Glass [Mon, 10 Aug 2015 13:05:10 +0000 (07:05 -0600)]
x86: baytrail: Tidy up interrupt and FSP init

We should signal to the FSP that PCI enumeration is complete. Perform this
task in a suitable place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Allow pirq_init() to return an error
Simon Glass [Mon, 10 Aug 2015 13:05:08 +0000 (07:05 -0600)]
x86: Allow pirq_init() to return an error

This function can fail. In this case we should return the error rather than
swallowing it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Split out fsp_init_phase_pci() code into a new function
Simon Glass [Mon, 10 Aug 2015 13:05:07 +0000 (07:05 -0600)]
x86: Split out fsp_init_phase_pci() code into a new function

This code may be useful for boards that use driver model for PCI.

Note: It would be better to have driver model automatically call this
function somehow. However for now it is probably safer to have it under
board control.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Tidy up the PIRQ routing code a little
Simon Glass [Mon, 10 Aug 2015 13:05:06 +0000 (07:05 -0600)]
x86: Tidy up the PIRQ routing code a little

This code could use a little tightening up. There is some repetition and
an odd use of fdtdec_get_int_array().

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 agox86: Re-order efi-x86_defconfig
Simon Glass [Mon, 10 Aug 2015 13:05:05 +0000 (07:05 -0600)]
x86: Re-order efi-x86_defconfig

Use savedefconfig to get this file into the correct order.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Add a way to iterate through all PCI devices
Simon Glass [Mon, 10 Aug 2015 13:05:04 +0000 (07:05 -0600)]
dm: pci: Add a way to iterate through all PCI devices

These functions allow iteration through all PCI devices including bridges.
The children of each PCI bus are returned in turn. This can be useful for
configuring, checking or enumerating all the devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Provide friendly config access functions
Simon Glass [Mon, 10 Aug 2015 13:05:03 +0000 (07:05 -0600)]
dm: pci: Provide friendly config access functions

At present there are no PCI functions which allow access to PCI
configuration using a struct udevice. This is a sad situation for driver
model as it makes use of PCI harder. Add these functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: fsp: Do not assert VPD_IMAGE_REV when DEBUG
Bin Meng [Sat, 8 Aug 2015 14:01:23 +0000 (22:01 +0800)]
x86: fsp: Do not assert VPD_IMAGE_REV when DEBUG

When using different release version of Intel FSP, the VPD_IMAGE_REV
is different (ie: BayTrail Gold 3 is 0x0303 while Gold 4 is 0x0304).
Remove the asserting of this so that U-Boot does not hang in a debug
build.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: baytrail: Configure FSP UPD from device tree
Andrew Bradford [Fri, 7 Aug 2015 12:36:35 +0000 (08:36 -0400)]
x86: baytrail: Configure FSP UPD from device tree

Allow for configuration of FSP UPD from the device tree which will
override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD
settings from the Intel FSPv4 Gold release to the respective dts files,
with the condition that the memory-down parameters for MinnowMax are
also used.

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Removed fsp,mrc-debug-msg and fsp,enable-xhci for minnowmax, bayleybay
Fixed lines >80col
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: baytrail: Add all IDE/SATA PCI device IDs
Bin Meng [Thu, 6 Aug 2015 09:36:01 +0000 (02:36 -0700)]
x86: baytrail: Add all IDE/SATA PCI device IDs

The BayTrail SoC has 4 different PCI devices IDs regarding to IDE
and AHCI. Add these IDs in pci_ids.h and also add the other SATA
ID in the Bayley Bay and MinnowMax board configuration header.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agocommon: Display >=4GiB memory bank size
Bin Meng [Thu, 6 Aug 2015 08:31:20 +0000 (01:31 -0700)]
common: Display >=4GiB memory bank size

bd->bi_dram[] has both start address and size defined as 32-bit,
which is not the case on some platforms where >=4GiB memory bank
is used. Change them to support such memory banks.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agosunxi: Display: Add support for eDP panels connected via an anx9804 bridge
Hans de Goede [Sat, 8 Aug 2015 14:13:53 +0000 (16:13 +0200)]
sunxi: Display: Add support for eDP panels connected via an anx9804 bridge

Add support for 4 1.62G lane eDP panels connected via an anx9804 bridge,
such as found on the Colombus devkit.

While at it also fix the wrong indentation of the SSD2828 Kconfig help text
in board/sunxi/Kconfig.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agovideo: Add support for the ANX9804 parallel lcd to dp bridge chip
Hans de Goede [Sat, 8 Aug 2015 14:03:29 +0000 (16:03 +0200)]
video: Add support for the ANX9804 parallel lcd to dp bridge chip

Add support for the ANX9804 bridge chip, which can take pixel data coming
from a parallel LCD interface and translate it on the fly into a DP
interface for driving eDP TFT displays. It uses I2C for configuration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agosun6i: display: Add support for using the mipi pll as lcd clock source
Hans de Goede [Sat, 8 Aug 2015 12:08:21 +0000 (14:08 +0200)]
sun6i: display: Add support for using the mipi pll as lcd clock source

Add support for using the mipi pll as lcd clock source, this is
necessary for getting higher dotclocks with lcd panels.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agosun6i: clock: Add support for the mipi pll
Hans de Goede [Sat, 8 Aug 2015 12:05:35 +0000 (14:05 +0200)]
sun6i: clock: Add support for the mipi pll

Add support for the mipi pll, this is necessary for getting higher dotclocks
with lcd panels.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: clock: Add clock_get_pll3() helper function
Hans de Goede [Sat, 8 Aug 2015 10:36:44 +0000 (12:36 +0200)]
sunxi: clock: Add clock_get_pll3() helper function

Add a helper function to get the pll3 clock rate.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: gpio: Add support for the gpio banks which are part of the R-io cluster
Hans de Goede [Thu, 6 Aug 2015 18:10:20 +0000 (20:10 +0200)]
sunxi: gpio: Add support for the gpio banks which are part of the R-io cluster

sun6i and later have a couple of io-blocks which are shared between the
main CPU core and the "R" cpu which is small embedded cpu which can be
active while the main system is suspended.

These gpio banks sit at a different mmio address then the normal banks,
and have a separate devicetree node and compatible, this adds support for
these banks to the sunxi-gpio code when built with device-model support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Fix gmac not working on the Colombus board
Hans de Goede [Thu, 6 Aug 2015 13:39:05 +0000 (15:39 +0200)]
sunxi: Fix gmac not working on the Colombus board

The phy is using a RGMII interface, which we need to specify in our
board-config, and the dts needs a gmac section (the dts changes have
also been submitted to the kernel).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: display: Disable HDMI support on A13 based tablets
Hans de Goede [Thu, 6 Aug 2015 11:06:50 +0000 (13:06 +0200)]
sunxi: display: Disable HDMI support on A13 based tablets

The sun5i die has a hdmi encoder onboard, but the A13 package does not
route this to the outside, disable hdmi support on A13 based boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: display: Enable composite video support on more boards
Hans de Goede [Wed, 5 Aug 2015 15:05:29 +0000 (17:05 +0200)]
sunxi: display: Enable composite video support on more boards

Enable composite video support on all boards which have a composite video
out connector (either cinch or jack).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add support for the Auxtek-T003 HDMI stick
Hans de Goede [Wed, 5 Aug 2015 15:50:03 +0000 (17:50 +0200)]
sunxi: Add support for the Auxtek-T003 HDMI stick

The Auxtek-T003 HDMI stick is an A10s based HDMI stick with USB wifi,
and composite video out support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: dts: Sync with kernel
Hans de Goede [Wed, 5 Aug 2015 15:39:14 +0000 (17:39 +0200)]
sunxi: dts: Sync with kernel

Sync the sunxi dts files with the changes queued up for kernel-4.3 in
mripard's sunxi/dt-for-4.3 branch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: display: Fix composite video out on sun5i
Hans de Goede [Thu, 6 Aug 2015 10:08:33 +0000 (12:08 +0200)]
sunxi: display: Fix composite video out on sun5i

The tv-encoder on sun5i is slightly different compared to the one on
sun4i/sun7i.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: display: Add overscan correction
Hans de Goede [Tue, 4 Aug 2015 22:06:47 +0000 (00:06 +0200)]
sunxi: display: Add overscan correction

Add support for making the visual area of the framebuffer smaller and
drawing a black border around it. This is intended for use with
overscanning monitors (esp. with composite video out), to avoid part
of the picture being invisible.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agocfbconsole: Add support for stride != width
Hans de Goede [Tue, 4 Aug 2015 10:15:39 +0000 (12:15 +0200)]
cfbconsole: Add support for stride != width

cfbconsole currently assumes that the width and stride of the framebuffer
are the same, in most places where stride matters it uses a VIDEO_LINE_LEN
helper macro.

This commit changes the few places not using VIDEO_LINE_LEN to also use
VIDEO_LINE_LEN, and protects the default VIDEO_LINE_LEN with a #ifndef
guard, allowing the boards config.h to override and, and thus support
cases where stride != width.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agocfbconsole: Remove width argument from the logo functions
Hans de Goede [Tue, 4 Aug 2015 10:21:40 +0000 (12:21 +0200)]
cfbconsole: Remove width argument from the logo functions

The passed in width is always VIDEO_COLS. This is a preparation patch
for adding stride != width support to the cfbconsole code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agoARM: tegra: represent RAM in 1 or 2 banks
Stephen Warren [Fri, 7 Aug 2015 22:12:45 +0000 (16:12 -0600)]
ARM: tegra: represent RAM in 1 or 2 banks

Represent all available RAM in either one or two banks. The first bank
describes any RAM below 4GB. The second bank describes any RAM above 4GB.

This split is driven by the following requirements:
- The NVIDIA L4T kernel requires separate entries in the DT /memory/reg
  property for memory below and above the 4GB boundary. The layout of that
  DT property is directly driven by the entries in the U-Boot bank array.
- On systems with RAM beyond a physical address of 4GB, the potential
  existence of a carve-out at the end of RAM below 4GB can only be
  represented using multiple banks, since usable RAM is not contiguous.

While making this change, add a lot more comments re: how and why RAM is
represented in banks, and implement a few more "semantic" functions that
define (and perhaps later detect at run-time) the size of any carve-out.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agoARM: tegra: query_sdram_size() cleanup
Stephen Warren [Fri, 7 Aug 2015 22:12:44 +0000 (16:12 -0600)]
ARM: tegra: query_sdram_size() cleanup

The return value of query_sdram_size() is assigned directly to
gd->ram_size in dram_init(). Adjust the return type to match the field
it's assigned to. This has the beneficial effect that on 64-bit systems,
the return value can correctly represent large RAM sizes over 4GB.

For similar reasons, change the type of variable size_bytes in the same
way.

query_sdram_size() would previously clip the detected RAM size to at most
just under 4GB in all cases, since on 32-bit systems, larger values could
not be represented. Disable this feature on 64-bit systems since the
representation restriction does not exist.

On 64-bit systems, never call get_ram_size() to validate the detected/
calculated RAM size. On any system with a secure OS/... carve-out, RAM
may not have a single contiguous usable area, and this can confuse
get_ram_size(). Ideally, we'd make this call conditional upon some other
flag that indicates specifically that a carve-out is actually in use. At
present, building for a 64-bit system is the best indication we have of
this fact. In fact, the call to get_ram_size() is not useful by the time
U-Boot runs on any system, since U-Boot (and potentially much other early
boot software) always runs from RAM on Tegra, so any mistakes in memory
controller register programming will already have manifested themselves
and prevented U-Boot from running to this point. In the future, we may
simply delete the call to get_ram_size() in all cases.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agoARM: tegra: move kernel_addr_r on T210
Stephen Warren [Fri, 7 Aug 2015 22:12:43 +0000 (16:12 -0600)]
ARM: tegra: move kernel_addr_r on T210

The new value is the most likely value where the kernel wants to end up
at run-time. Selecting this value as the load address likely avoids the
need to copy the kernel image from the actual load address to the desired
load address. Note that this isn't guaranteed since the kernel may wish
to run at an arbitrary location. In that case, U-Boot will still relocate
the image according to its wishes; this change is a performance
optimization, not a hard-coding of the final image location.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agotegra: Correct logic for reading pll_misc in clock_start_pll()
Simon Glass [Mon, 10 Aug 2015 13:14:36 +0000 (07:14 -0600)]
tegra: Correct logic for reading pll_misc in clock_start_pll()

The logic for simple PLLs on T124 was broken by this commit:

  722e000c Tegra: PLL: use per-SoC pllinfo table instead of PLL_DIVM/N/P, etc.

Correct it by reading from the same pll_misc register that it writes to and
adding an entry for the DP PLL in the pllinfo table.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agoARM: tegra: Make pinmux.h standalone includible
Thierry Reding [Fri, 20 Mar 2015 12:24:22 +0000 (13:24 +0100)]
ARM: tegra: Make pinmux.h standalone includible

This header file uses type definitions (u8, u32) from linux/types.h but
doesn't include it. If includes aren't carefully ordered this can cause
build failures.

Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agotegra: nand: disable subpage writes
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:13 +0000 (00:47 +0200)]
tegra: nand: disable subpage writes

Disable subpage writes as we do not provide ecc->hwctl.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>