]> git.sur5r.net Git - u-boot/log
u-boot
9 years agodm: stv0991: Move driver model CONFIGs to Kconfig
Simon Glass [Mon, 9 Feb 2015 20:41:30 +0000 (13:41 -0700)]
dm: stv0991: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoExynos: Clock: Cleanup soc_get_periph_rate
Akshay Saraswat [Wed, 4 Feb 2015 10:30:05 +0000 (16:00 +0530)]
Exynos: Clock: Cleanup soc_get_periph_rate

Since we have src, div and pre-div mask bits defined corresponding
to peripherals, calculation of clock specific to I2C appears
redundant and confusing. Using clk_bit_info struct we can write
calculations generic to all peripherals which makes code easy to
understand and free from peripheral specific exceptions.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos: clock: change mask bits as per peripheral
Akshay Saraswat [Wed, 4 Feb 2015 10:30:04 +0000 (16:00 +0530)]
Exynos: clock: change mask bits as per peripheral

We have assumed and kept mask bits for divider and pre-divider
as 0xf and 0xff, respectively. But these mask bits change from
one peripheral to another, and hence, need to be specified in
accordance with the peripherals.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos5: Use clock_get_periph_rate generic API
Akshay Saraswat [Wed, 4 Feb 2015 10:30:03 +0000 (16:00 +0530)]
Exynos5: Use clock_get_periph_rate generic API

Replacing SoC and peripheral specific function calls with generic
clock_get_periph_rate calls to get the peripheral clocks.
Also, removing dead code of peripheral and SoC specific function
implementations which was used earlier for fetching peripheral clocks.
This code is not being used anymore because of the introduction
of generic clock_get_periph_rate function.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos5: Fix exynos5_get_periph_rate calculations
Akshay Saraswat [Wed, 4 Feb 2015 10:30:02 +0000 (16:00 +0530)]
Exynos5: Fix exynos5_get_periph_rate calculations

exynos5_get_periph_rate function reads incorrect div for
SDMMC2 & 3. It also reads prediv and does division only for
SDMMC0 & 2 when actually various other peripherals need that.
Adding changes to fix these mistakes in periph rate calculation.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos542x: Add and enable get_periph_rate support
Akshay Saraswat [Wed, 4 Feb 2015 10:30:01 +0000 (16:00 +0530)]
Exynos542x: Add and enable get_periph_rate support

We planned to fetch peripheral rate through one generic API per
peripheral. These generic peripheral functions are in turn
expected to fetch apt values from a function refactored as
per SoC versions. This patch adds support for fetching peripheral
rates for Exynos5420 and Exynos5800.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos542x: Move exynos5420_get_pll_clk up and rename
Akshay Saraswat [Wed, 4 Feb 2015 10:30:00 +0000 (16:00 +0530)]
Exynos542x: Move exynos5420_get_pll_clk up and rename

Moving exynos5420_get_pll_clk function definition up in the
code to keep it together with rest of SoC_get_pll_clk functions.
This makes code more legible and also removes the need of
declaration when called before the position of definition in
code. Also, renaming exynos5420_get_pll_clk to
exynos542x_get_pll_clk because it is being used for both Exynos
5420 and 5800.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos5: Fix compiler warnings due to clock_get_periph_rate
Akshay Saraswat [Wed, 4 Feb 2015 10:29:59 +0000 (15:59 +0530)]
Exynos5: Fix compiler warnings due to clock_get_periph_rate

Apparently, members of clk_bit_info array do not map correctly
to the members of enum periph_id. This mapping got broken after
we changed periph_id(s) to reflect interrupt number instead of
their position in a sequence. This patch intends to fix above
mentioned issue.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoEXYNOS5: Add function to enable exynos5420 usbdev phy ctrl
Joonyoung Shim [Wed, 21 Jan 2015 04:51:32 +0000 (13:51 +0900)]
EXYNOS5: Add function to enable exynos5420 usbdev phy ctrl

Exynos5420 has different registers with other exynos5 SoCs to control
usb device phy, so need separated function to enable exynos5420 usb
device phy.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoodroid: fix g2d sclk rate
Joonyoung Shim [Fri, 23 Jan 2015 08:30:07 +0000 (17:30 +0900)]
odroid: fix g2d sclk rate

G2D core should be provided 200MHz clock rate.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoOdroid-XU3: Add eMMC-reset node on DT
Joonyoung Shim [Thu, 15 Jan 2015 02:45:58 +0000 (11:45 +0900)]
Odroid-XU3: Add eMMC-reset node on DT

This needs for special handling of nRESET_OUT line(GPD1-0 gpio) for eMMC
memory to perform complete reboot on Odroid XU3 board.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoOdroid: Add eMMC-reset node on DT
Joonyoung Shim [Thu, 15 Jan 2015 02:45:57 +0000 (11:45 +0900)]
Odroid: Add eMMC-reset node on DT

This needs for special handling of nRESET_OUT line(GPK1-2 gpio) for eMMC
memory to perform complete reboot on Odroid X2/U3 boards.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agosamsung: board: support eMMC reset using DT
Joonyoung Shim [Thu, 15 Jan 2015 02:45:56 +0000 (11:45 +0900)]
samsung: board: support eMMC reset using DT

Some exynos boards require special handling of nRESET_OUT line for eMMC
memory to perform complete reboot e.g. Odroid X2/U3/XU3 boards.

This will support eMMC reset using DT from reset_misc of samsung common
board file.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoarm: exynos: fix the div value for set_mmc_clk
Jaehoon Chung [Thu, 8 Jan 2015 07:50:21 +0000 (16:50 +0900)]
arm: exynos: fix the div value for set_mmc_clk

The most exynos used the  "Ratio + 1" as div value.
And value at register is "Ratio".
So if want to set exact value, it needs to subtract one.

Value at register ("Ratio") = div - 1

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoarc: introduce U-Boot port for ARCv2 ISA
Alexey Brodkin [Tue, 13 Jan 2015 15:35:46 +0000 (18:35 +0300)]
arc: introduce U-Boot port for ARCv2 ISA

ARC HS and ARC EM are new cores based on ARCv2 ISA which is binary
incompatible with ISAv1 (AKA ARCompact).

Significant difference between ISAv2 and v1 is implementation of
interrupt vector table.

In v1 it is implemented in the same way as on many other architectures -
as a special location where user may put whether code executed in place
(if machine word of space is enough) or jump to a full-scale interrupt
handler.

In v2 interrupt table is just an array of adresses of real interrupt
handlers. That requires a separate section for IVT that is not encoded
as code by assembler.

This change adds support for following cores:
 * ARC EM6 (simple 32-bit microcontroller without MMU)
 * ARC HS36 (advanced 32-bit microcontroller without MMU)
 * ARC HS38 (advanced 32-bit microcontroller with MMU)

As a part of ARC HS38 new version of MMU (v4) was introduced.

Also this change adds AXS131 board which is the same DW ARC SDP base board but
with ARC HS38 CPU tile.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoARM: rmobile: silk: Remove initialization of ACTLR.SMP
Nobuhiro Iwamatsu [Tue, 10 Feb 2015 06:26:10 +0000 (15:26 +0900)]
ARM: rmobile: silk: Remove initialization of ACTLR.SMP

Initialization of ACTLR.SMP is in lowlevel_init.
This remove duplicate function.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: r8a7794: Enable SMP mode of Auxiliary Control Register
Nobuhiro Iwamatsu [Fri, 23 Jan 2015 00:31:57 +0000 (09:31 +0900)]
arm: rmobile: r8a7794: Enable SMP mode of Auxiliary Control Register

r8a7794 uses ARM SoC of CA7 base. If we want to use dcache on CA7, we
need to enable SMP bit of Auxiliary Control Register.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: Add missed header file for Silk board
Vladimir Barinov [Mon, 9 Feb 2015 00:27:47 +0000 (03:27 +0300)]
arm: rmobile: Add missed header file for Silk board

This file was missed in the commit
https://patchwork.ozlabs.org/patch/427801/

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: Add SILK board support
Vladimir Barinov [Mon, 12 Jan 2015 16:17:07 +0000 (19:17 +0300)]
arm: rmobile: Add SILK board support

SILK is an entry level development board based on R-Car E2 SoC (R8A7794)

This commit supports the following peripherals:
- SCIF, I2C, Ethernet, QSPI, MMC, USB Host

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Tom Rini <trini@ti.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agodm: Add support for all targets which requires MANUAL_RELOC
Michal Simek [Mon, 2 Feb 2015 15:31:59 +0000 (16:31 +0100)]
dm: Add support for all targets which requires MANUAL_RELOC

Targets with CONFIG_NEEDS_MANUAL_RELOC do not use REL/RELA
relocation (mostly only GOT) where functions aray are not
updated. This patch is fixing function pointers for DM core
and serial-uclass to ensure that relocated functions are called.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm:gpio:mxc add DT support
Peng Fan [Tue, 10 Feb 2015 06:46:34 +0000 (14:46 +0800)]
dm:gpio:mxc add DT support

This patch add DT support for mxc gpio driver.

There are one place using CONFIG_OF_CONTROL macro.
1. The U_BOOT_DEVICES and mxc_plat array are complied out. To DT,
   platdata is alloced using calloc, so there is no need to use mxc_plat.

The following situations are tested, and all work fine:
1. with DM, without DT
2. with DM and DT
3. without DM
Since device tree has not been upstreamed, if want to test this patch.
The followings need to be done.
 + pieces of code does not gpio_request when using gpio_direction_xxx and
   etc, need to request gpio.
 + move the gpio settings from board_early_init_f to board_init
 + define CONFIG_DM ,CONFIG_DM_GPIO and CONFIG_OF_CONTROL
 + Add device tree file and do related configuration in
   `make ARCH=arm menuconfig`
These will be done in future patches by step.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm:gpio:mxc add a bank_index entry in platdata
Peng Fan [Tue, 10 Feb 2015 06:46:33 +0000 (14:46 +0800)]
dm:gpio:mxc add a bank_index entry in platdata

Add a new entry in platdata structure and intialize
bank_index in mxc_plat array.
This new entry can avoid using `plat - mxc_plat` by using
`plat->bank_index`.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: introduce dev_get_addr interface
Peng Fan [Tue, 10 Feb 2015 06:46:32 +0000 (14:46 +0800)]
dm: introduce dev_get_addr interface

Abstracting dev_get_addr can improve drivers that want to
get device's address.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: Drop unused driver model config_defaults
Simon Glass [Wed, 11 Feb 2015 23:33:00 +0000 (16:33 -0700)]
dm: Drop unused driver model config_defaults

These are now in Kconfig so we can drop them from the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig
Simon Glass [Wed, 11 Feb 2015 23:32:59 +0000 (16:32 -0700)]
dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig

Move this option to Kconfig and update all boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: at91: snapper: Move driver model CONFIGs to Kconfig
Simon Glass [Wed, 11 Feb 2015 23:32:58 +0000 (16:32 -0700)]
dm: at91: snapper: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: at91: Drop use of ATMEL_PIO_PORTS in the header file
Simon Glass [Wed, 11 Feb 2015 23:32:57 +0000 (16:32 -0700)]
dm: at91: Drop use of ATMEL_PIO_PORTS in the header file

With driver model the number of PIO ports is defined by platform data, so
remove it from the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agodm: sh: serial: Add support driver model
Nobuhiro Iwamatsu [Thu, 12 Feb 2015 04:48:04 +0000 (13:48 +0900)]
dm: sh: serial: Add support driver model

This adds driver model support with this driver. This was tested by Koelsch
board and Gose board.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: socfpga: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:49 +0000 (21:41 -0700)]
dm: socfpga: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: mx6: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:47 +0000 (21:41 -0700)]
dm: mx6: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: sunxi: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:46 +0000 (21:41 -0700)]
dm: sunxi: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agodm: sandbox: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:45 +0000 (21:41 -0700)]
dm: sandbox: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: omap3: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:44 +0000 (21:41 -0700)]
dm: omap3: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: tegra: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:42 +0000 (21:41 -0700)]
dm: tegra: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: x86: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:41 +0000 (21:41 -0700)]
dm: x86: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: exynos: Move driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:40 +0000 (21:41 -0700)]
dm: exynos: Move driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Move Raspberry Pi driver model CONFIGs to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:39 +0000 (21:41 -0700)]
dm: Move Raspberry Pi driver model CONFIGs to Kconfig

Remove driver model CONFIGs from the board config header and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Add CMD_DM and CMD_DEMO to Kconfig
Simon Glass [Fri, 6 Feb 2015 04:41:38 +0000 (21:41 -0700)]
dm: Add CMD_DM and CMD_DEMO to Kconfig

Add Kconfig settings for these two options.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agodm: test: Add a Kconfig file
Simon Glass [Fri, 6 Feb 2015 04:41:37 +0000 (21:41 -0700)]
dm: test: Add a Kconfig file

Add a file to control driver model test features.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agodm: Add Kconfig options for driver model SPL support
Simon Glass [Fri, 6 Feb 2015 04:41:36 +0000 (21:41 -0700)]
dm: Add Kconfig options for driver model SPL support

The SPL support cannot be enabled yet, but we can add the Kconfig
options in preparation for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Expand and complete Kconfig in drivers/
Simon Glass [Fri, 6 Feb 2015 04:41:35 +0000 (21:41 -0700)]
dm: Expand and complete Kconfig in drivers/

Expand the help messages for each driver. Add missing Kconfig for I2C,
SPI flash and thermal.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agodm: Add Kconfig for driver/demo
Simon Glass [Fri, 6 Feb 2015 04:41:34 +0000 (21:41 -0700)]
dm: Add Kconfig for driver/demo

Add a suitable Kconfig for this directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agodm: i2c: Make API accessible even without CONFIG_DM
Simon Glass [Fri, 6 Feb 2015 04:41:33 +0000 (21:41 -0700)]
dm: i2c: Make API accessible even without CONFIG_DM

Make the driver model I2C API available always, even if driver model
is not enabled. This allows for a 'soft' switch-over, where drivers can
use the new structures in code which is compiled but not yet used. This
makes migration easier in some cases.

Fix up the existing drivers which define their own 'struct i2c_msg'.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agodm: i2c: Add a dm_ prefix to driver model bus speed functions
Simon Glass [Fri, 6 Feb 2015 04:41:32 +0000 (21:41 -0700)]
dm: i2c: Add a dm_ prefix to driver model bus speed functions

As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model
versions of these functions to avoid conflicts.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agonet: Use new checksum functions
Simon Glass [Tue, 20 Jan 2015 05:16:08 +0000 (22:16 -0700)]
net: Use new checksum functions

Drop the old checksum functions in favour of the new ones.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agopowerpc: ppc4xx: Enable CONFIG_DISPLAY_BOARDINFO
Stefan Roese [Sat, 7 Feb 2015 18:51:52 +0000 (11:51 -0700)]
powerpc: ppc4xx: Enable CONFIG_DISPLAY_BOARDINFO

This also displays the "Board:" line in the bootup text with the
generic board support code.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Add defaults for DT based booting to really work
Stefan Roese [Sat, 7 Feb 2015 18:51:51 +0000 (11:51 -0700)]
powerpc: ppc4xx: Add defaults for DT based booting to really work

These additional nodes need to be provided to get U-Boot to boot correctly
on the Canyonlands / Glacier board:

- chosen path to the console-uart
- reg-shift set to 0 in the uart device nodes

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Change from OF_SEPARATE to OF_EMBED
Stefan Roese [Sat, 7 Feb 2015 18:51:50 +0000 (11:51 -0700)]
powerpc: ppc4xx: Change from OF_SEPARATE to OF_EMBED

This is necessary, as ppc4xx has the reset vector located at the end
of the U-Boot image. This needs to be flashed to the end of the NOR
flash. Adding the dtb to the main U-Boot image will break booting
on ppc4xx. This patch now embeds the dtb in the U-Boot image instead.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: Add linkage.h file
Simon Glass [Sat, 7 Feb 2015 18:51:49 +0000 (11:51 -0700)]
powerpc: Add linkage.h file

This permits us to use linux/linkage.h on PowerPC machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: powerpc: ppc4xx: Move glacier to use driver model for serial
Simon Glass [Sat, 7 Feb 2015 18:51:48 +0000 (11:51 -0700)]
dm: powerpc: ppc4xx: Move glacier to use driver model for serial

Adjust Kconfig to default to driver model for glacier, canyonlands and
arches.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: Add serial driver for driver model
Simon Glass [Sat, 7 Feb 2015 18:51:47 +0000 (11:51 -0700)]
powerpc: Add serial driver for driver model

This uses the ns16550 driver but sets up the clock at run-time. It does
not seem to be available in the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoppc: amcc: Omit unneeded ns16550 CONFIG if using driver model
Simon Glass [Sat, 7 Feb 2015 18:51:46 +0000 (11:51 -0700)]
ppc: amcc: Omit unneeded ns16550 CONFIG if using driver model

This comes from the device tree or a call to get_uart_clock().

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Use CONFIG_OF_CONTROL for canyonlands boards
Simon Glass [Sat, 7 Feb 2015 18:51:45 +0000 (11:51 -0700)]
powerpc: ppc4xx: Use CONFIG_OF_CONTROL for canyonlands boards

Enable CONFIG_OF_CONTROL so that U-Boot on these three boards uses a device
tree for its configuration.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Allow the end of u-boot.bin to be found
Simon Glass [Sat, 7 Feb 2015 18:51:44 +0000 (11:51 -0700)]
powerpc: ppc4xx: Allow the end of u-boot.bin to be found

Define an _end symbol indicating the end of u-boot.bin. Also add some dummy
words into the link script to ensure that u-boot.bin will always extend
that far. There may be a better way of doing this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Add a gpio.h header file
Simon Glass [Sat, 7 Feb 2015 18:51:43 +0000 (11:51 -0700)]
powerpc: ppc4xx: Add a gpio.h header file

This is required at present for device tree control. The ppc4xx does support
GPIOs but does not seem to have a proper driver. So this file is empty.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Call board_init_f_mem() for generic board
Simon Glass [Sat, 7 Feb 2015 18:51:42 +0000 (11:51 -0700)]
powerpc: ppc4xx: Call board_init_f_mem() for generic board

Call this function to set up our early memory.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: dts: Bring in canyonlands device tree files
Simon Glass [Sat, 7 Feb 2015 18:51:41 +0000 (11:51 -0700)]
powerpc: ppc4xx: dts: Bring in canyonlands device tree files

The canyonlands.h config file works with canyonlands, glacier and arches
boards. Bring in the device tree files for these from Linux 3.17.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: canyonlands: Move to generic board
Simon Glass [Sat, 7 Feb 2015 18:51:39 +0000 (11:51 -0700)]
powerpc: ppc4xx: canyonlands: Move to generic board

Switch to generic board so that this board will not be broken/removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Add ramboot config for glacier
Simon Glass [Sat, 7 Feb 2015 18:51:38 +0000 (11:51 -0700)]
powerpc: ppc4xx: Add ramboot config for glacier

Add a new ramboot config for glacier so that it is possible to test U-Boot
loaded over Ethernet instead of using JTAG.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: Move CANYONLANDS/GLACIER/ARCHES to Kconfig
Simon Glass [Sat, 7 Feb 2015 18:51:37 +0000 (11:51 -0700)]
powerpc: ppc4xx: Move CANYONLANDS/GLACIER/ARCHES to Kconfig

Move these options to Kconfig and remove them from the CONFIG files.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: ppc4xx: canyonlands: config: Tidy up CONFIGs and config.mk
Simon Glass [Sat, 7 Feb 2015 18:51:36 +0000 (11:51 -0700)]
powerpc: ppc4xx: canyonlands: config: Tidy up CONFIGs and config.mk

Many CONFIG options have an unnecessary value of 1. CONFIG_440 is set in
the various board config files. Also simplify the CONFIG_440 check in
config.mk

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: Permit device tree control of U-Boot (CONFIG_OF_CONTROL)
Simon Glass [Sat, 7 Feb 2015 18:51:35 +0000 (11:51 -0700)]
powerpc: Permit device tree control of U-Boot (CONFIG_OF_CONTROL)

Enable this in the Kconfig so that PowerPC boards can use device tree to
configure U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoIntroduce board_init_f_mem() to handle early memory layout
Simon Glass [Sat, 7 Feb 2015 18:51:34 +0000 (11:51 -0700)]
Introduce board_init_f_mem() to handle early memory layout

At present on some architectures we set up the following before calling
board_init_f():

   - global_data
   - stack
   - early malloc memory

Adding the code to support early malloc and global data setup to every
arch's assembler start-up is a pain. Also this code is not actually
architecture-specific. We can use common code for all architectures and
with a bit of care we can write this code in C.

Add a new function to deal with this. It should be called after memory
is available, with a pointer to the top of the area that should be used
before relocation. The function will set things up and return the lowest
memory address that it allocated/used. That can then be set as the top
of the stack.

Note that on some archs this function will use the stack, so the stack
pointer should be set to same value as is pased to board_init_f_mem().
A margin of 128 bytes will be left for this stack, so that it is not
overwritten. This means that 64 bytes is wasted by this early call.
This is not strictly necessary on several more modern archs, so we could
remove this at the cost of some arch-dependent code.

With this function there is no-longer any need for the assembler code to
zero global_data or set up the early malloc pointers.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomalloc_simple: Return NULL on malloc failure rather then calling panic()
Hans de Goede [Wed, 4 Feb 2015 12:05:50 +0000 (13:05 +0100)]
malloc_simple: Return NULL on malloc failure rather then calling panic()

All callers of malloc should already do error checking, and may even be able
to continue without the alloc succeeding.

Moreover, common/malloc_simple.c is the only user of .rodata.str1.1 in
common/built-in.o when building the SPL, triggering this gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

Causing .rodata to grow with e.g. 0xc21 bytes, nullifying all benefits of
using malloc_simple in the first place.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoi2c: s3c24x0: reduce transmission status timeout
Przemyslaw Marczak [Tue, 27 Jan 2015 12:36:35 +0000 (13:36 +0100)]
i2c: s3c24x0: reduce transmission status timeout

If no device is connected to I2C bus, the i2c probe command
can take a lot of time for probe each address. This commit
reduces the busy timeout to 10ms for standard and high speed
modes. This doesn't break the transmission an also allow for
properly probe the devices.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Changes v3:
- new commit, after split the next one
Tested-by: Simon Glass <sjg@chromium.org>
9 years agogpio: omap: Pass correct argument to _get_gpio_direction()
Axel Lin [Sat, 31 Jan 2015 14:23:38 +0000 (22:23 +0800)]
gpio: omap: Pass correct argument to _get_gpio_direction()

Pass bank rather than bank->base to _get_gpio_direction().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agogpio: at91: Fix getting address of private data
Axel Lin [Sat, 31 Jan 2015 06:47:34 +0000 (14:47 +0800)]
gpio: at91: Fix getting address of private data

Use dev_get_priv() rather than dev_get_platdata() to get correct address of
private data.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: Prevent "demo hello" and "demo status" segfaults
Peter Tyser [Tue, 3 Feb 2015 19:18:49 +0000 (13:18 -0600)]
dm: Prevent "demo hello" and "demo status" segfaults

Segfaults can occur when a mandatory argument is not provided to
"demo hello" and "demo status".  Eg:

   => demo hello
   Segmentation fault (core dumped)

Add a check to ensure all required arguments are provided.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoRSA depends on DM
Chris Kuethe [Thu, 5 Feb 2015 03:16:14 +0000 (19:16 -0800)]
RSA depends on DM

Discovered while experimenting with signature checking on vexpress
which doesn't typically use DM.
Acked-by: Simon Glass <sjg@chromium.org>
9 years agolsxl: switch from bootm to bootz for boot commands
Michael Walle [Sun, 8 Feb 2015 19:06:07 +0000 (20:06 +0100)]
lsxl: switch from bootm to bootz for boot commands

Use the bootz command to load zImages in case of any new boot scripts. Only
the legacy one will still use bootm. Apart form the fact, that this will
simplify the image generation process, it saves one copy of the kernel
image: Common practice is to generate an uImage with a loading address of
0x8000. This uImage contains a compressed zImage, which will unpack the
kernel image to the beginning of the RAM. But because there is already the
compressed image the uncompressor first relocates the compressed image to a
higher location. The load address is encoded into the uImage which is
generated by the distributions and thus cannot be easily changed. By using
the bootz command we can load the compressed image to a higher memory
address and the decompressor doesn't have to reloacte the image.

Signed-off-by: Michael Walle <michael@walle.cc>
9 years agolsxl: place the dtb below the inital ramdisk
Michael Walle [Sun, 8 Feb 2015 19:06:06 +0000 (20:06 +0100)]
lsxl: place the dtb below the inital ramdisk

The dtb was loaded at a memory address after the initial ramdisk. Thus a
large ramdisk would overwrite the dtb. Move it to "ramdisk_start - 64k".
64k should be enough for the device tree blob. Also the kernel
documentation arm/Booting suggests to put the dtb before the initial
ramdisk.

Signed-off-by: Michael Walle <michael@walle.cc>
9 years agolsxl: use default load addresses for legacy boot
Michael Walle [Sun, 8 Feb 2015 19:06:05 +0000 (20:06 +0100)]
lsxl: use default load addresses for legacy boot

The load addresses for the bootcmd_legacy script were taken from the
original bootloader from Buffalo. But newer kernels are too big and the
uncompressing will overwrite parts of the initial ramdisk. Therefore,
we switch to the load addresses which are also used by the other boot
script.

Signed-off-by: Michael Walle <michael@walle.cc>
9 years agosunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART
Hans de Goede [Tue, 3 Feb 2015 23:43:36 +0000 (00:43 +0100)]
sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART

The recent changes to config_distro_bootcmd.h require CONFIG_CMD_PART to be
defined, as the default bootcmd not uses the "part" command.

This fixes sunxi boards not booting with v2015.04-rc1.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoAdd linux/compiler-gcc5.h to fix builds with gcc5
Hans de Goede [Sat, 7 Feb 2015 21:52:40 +0000 (22:52 +0100)]
Add linux/compiler-gcc5.h to fix builds with gcc5

Add linux/compiler-gcc5/h from the kernel sources at:

commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b
Author: Steven Noonan <steven@uplinklabs.net>
Date:   Sat Oct 25 15:09:42 2014 -0700

    compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Tue, 10 Feb 2015 15:42:56 +0000 (10:42 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-atmel
Tom Rini [Tue, 10 Feb 2015 15:42:22 +0000 (10:42 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-atmel

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Tue, 10 Feb 2015 15:41:54 +0000 (10:41 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video

Conflicts:
include/splash.h

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Tue, 10 Feb 2015 15:40:43 +0000 (10:40 -0500)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

9 years agolcd: split splash code into its own function
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:32 +0000 (13:32 +0200)]
lcd: split splash code into its own function

lcd_logo() currently performs tasks well beyond just displaying the logo.
It has code which displays splash image, it has logic which determines
when the different display features are displayed, and it is coupled with
the lcd console because it holds the responsibility of returning the
lcd console base address.

Make lcd_logo() just about the logo by:
* Moving splash image display code into a dedicated function
* Moving the logic regarding when various features are displayed to
  lcd_clear() (which is arguably not the correct name for housing such
  code either, but it is currently the most fitting location code wise)
* Move the responsibility of setting the console base address to
  lcd_clear() too.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: dt: extract simplefb support
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:31 +0000 (13:32 +0200)]
lcd: dt: extract simplefb support

We now have api functions that can support compiling simplefb code as its own
module. Since this code is not part of the display functionality, extract it
to its own file.

Raspberry Pi is updated to accommodate the changes.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
9 years agolcd: rename bitmap_plot to better represent its functionality
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:30 +0000 (13:32 +0200)]
lcd: rename bitmap_plot to better represent its functionality

The name "bitmap_plot" is misleading because it implies that this is a generic
function capable of dealing with any bitmap, but its implementation only works
with the logo data.

Rename the function to better reflect this.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: various cleanups
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:29 +0000 (13:32 +0200)]
lcd: various cleanups

This cleanup mostly focuses on removing unnecessary whitespace and comments
which are superfluous and/or do not conform to the coding style.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: remove unused includes
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:28 +0000 (13:32 +0200)]
lcd: remove unused includes

Remove unused includes.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: introduce lcd_set_cmap
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:27 +0000 (13:32 +0200)]
lcd: introduce lcd_set_cmap

Reduce the lcd_display_bitmap #ifdef complexity by extracting Atmel-specific
code for setting cmap for bitmap images into a new function lcd_set_cmap().
A default version is implemented with the remainder of the code.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: logo: move generic cmap setting to lcd_logo_set_cmap()
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:26 +0000 (13:32 +0200)]
lcd: logo: move generic cmap setting to lcd_logo_set_cmap()

Get rid of platform-specific #ifdefs in bitmap_plot() by moving the generic
case of setting cmap into the weak lcd_logo_set_cmap().

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: mpc823: move mpc823-specific lcd_logo_set_cmap code to mpc8xx_lcd.c
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:25 +0000 (13:32 +0200)]
lcd: mpc823: move mpc823-specific lcd_logo_set_cmap code to mpc8xx_lcd.c

Reduce the bitmap_plot #ifdef complexity by extracting MPC823-specific code for
setting cmap into its own implementation of lcd_logo_set_cmap(), implemented in
mpc8xx_lcd.c. In the MPC823 implementation, ARRAY_SIZE(bmp_logo_palette) is
switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which
would cause a compilation error because the logo data and palette arrays would
be defined twice.

This is a step towards cleaning bitmap_plot() of platform-specific code.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: atmel: introduce lcd_logo_set_cmap
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:24 +0000 (13:32 +0200)]
lcd: atmel: introduce lcd_logo_set_cmap

Reduce the bitmap_plot #ifdef complexity by extracting Atmel-specific code for
setting cmap into a new function lcd_logo_set_cmap(), which is implemented in
atmel_lcdfb driver and defined as part of common/lcd.c api with a weak dummy
version. In the Atmel implementation, ARRAY_SIZE(bmp_logo_palette) is
switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which
would cause a compilation error because the logo data and palette arrays would
be defined twice.

This is a step towards cleaning bitmap_plot() of platform-specific code.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: mpc8xx: move mpc823-specific fb_put_byte to mpc8xx_lcd.c
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:23 +0000 (13:32 +0200)]
lcd: mpc8xx: move mpc823-specific fb_put_byte to mpc8xx_lcd.c

Reduce the amount of platform-specific code in common/lcd.c by moving MPC823
implementation of fb_put_byte() to mpc8xx_lcd.c. Since we must also have a
default implementation for everybody else, make the remainder of the code
into a weak function.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: atmel: move atmel-specific fb_put_word to atmel_lcdfb
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:22 +0000 (13:32 +0200)]
lcd: atmel: move atmel-specific fb_put_word to atmel_lcdfb

Reduce the amount of platform-specific code in common/lcd.c by moving Atmel
implementation of fb_put_word() to atmel_lcdfb.c. Since we must also have a
default implementation for everybody else, make the remainder of the code
into a weak function.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: split configuration_get_cmap
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:21 +0000 (13:32 +0200)]
lcd: split configuration_get_cmap

configuration_get_cmap() is multiple platform-specific functions stuffed into
one function. Split it into multiple versions, and move each version to the
appropriate driver to reduce the #ifdef complexity.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agolcd: move platform-specific structs to their own headers
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:20 +0000 (13:32 +0200)]
lcd: move platform-specific structs to their own headers

common/lcd code is full of platform-specific code and definitions, which
ideally should reside with the respective driver code. Take a step towards that
goal by moving platform-specific structs from lcd.h to their own header files.

The structs for the generic case (the #else for all the platform-specific
cases) is retained in lcd.h as the default case.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agomx53loco: Fix boot hang during reboot stress test
Fabio Estevam [Mon, 9 Feb 2015 09:29:33 +0000 (07:29 -0200)]
mx53loco: Fix boot hang during reboot stress test

Currently by running the following test:

=> setenv bootcmd reset
=> save
=> reset

, we observe a hang after approximately 20-30 minutes of stress reboot test.

Investigation of this issue revealed that when a single DDR chip select is used,
the hang does not happen. It only happens when the two chip selects are active.

MX53 reference manual states at "28.6.2 Memory ZQ calibration sequence":

"The controller must keep the memory lines quiet (except for CK) for the ZQ
calibration time as defined in the Jedec (512 cycles for ZQCL after reset, 256
for other ZQCL and 64 for ZQCS)."

According to the SDE_0 and SDE_1 bit descriptions from register ESDCTL_ESDCTL:

"Writing 1 to SDE0 or SDE1 will initiate power up delays as JEDEC defines.
Power up delays are a function of the configured memory type (DDR2/DDR3/LPDDR2)"

So make sure to activate one chip select at time (CS0 first and then CS1 later),
so that the required JEDEC delay is respected for each chip select.

With this change applied the board has gone through three days of reboot stress
test without any hang.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agoarm: mxs: Add 'Wait for JTAG user' if booted in JTAG mode
Graeme Russ [Sun, 25 Jan 2015 01:07:53 +0000 (12:07 +1100)]
arm: mxs: Add 'Wait for JTAG user' if booted in JTAG mode

When booting in JTAG mode, there is no way to use soft break-points, and
no way of knowing when SPL has finished executing (so the user can issue
a 'halt' command to load u-boot.bin for example)

Add a debug output and simple loop to stop execution at the completion of
the SPL initialisation as a pseudo break-point when booting in JTAG mode

Signed-off-by: Graeme Russ <gruss@tss-engineering.com>
9 years agoarm: mxs: Enable booting of mx28 without battery
Graeme Russ [Sun, 25 Jan 2015 01:07:52 +0000 (12:07 +1100)]
arm: mxs: Enable booting of mx28 without battery

Section 4.1.2 of Freescale Application Note AN4199 describes the
configuration required to operate the mx28 from a 5V source without a
battery.

This patch changes the behaviour of the dropout control of the DC-DC
converter (refer to section 11.12.9 of the mx28 Application Processor
Reference Manual - Document Number: MCIMX28RM, Rev 2, 08/2013) to the
following:
 - Always use 4P2 Linear Regulator if CONFIG_SYS_MXS_VDD5V_ONLY is defined
 - Switch between 4P2 Linear Regulator and Battery, using whichever has
   the highest voltage if CONFIG_SYS_MXS_VDD5V_ONLY isnot set (this is
   the same as the pre-patch behaviour)

Signed-off-by: Graeme Russ <gruss@tss-engineering.com>
Signed-off-by: Damien Gotfroi <dgotfroi@greenwatch.be>
9 years agoarm: mxs: Add debug outputs and comments to mxs SPL source files
Graeme Russ [Sun, 25 Jan 2015 01:07:51 +0000 (12:07 +1100)]
arm: mxs: Add debug outputs and comments to mxs SPL source files

It is difficult to track down fail to boot issues in the mxs SPL.
Implement the following to make it easier:
 - Add debug outputs to allow tracing of SPL progress in order to track
where failure to boot occurs. DEUBUG and CONFIG_SPL_SERIAL_SUPPORT must
be defined to enable debug output in SPL
 - Add TODO comments where it is not clear if the code is doing what it
is meant to be doing, even tough the board boots properly (these comments
refer to existing code, not to any code added by this patch)

Signed-off-by: Graeme Russ <gruss@tss-engineering.com>
9 years agoimx: mx6: Fixed AIPS3 base address issue
Ye.Li [Wed, 14 Jan 2015 09:18:12 +0000 (17:18 +0800)]
imx: mx6: Fixed AIPS3 base address issue

Should use AIPS3 configuration address 0x0227C000 to set AIPS3,
not the AIPS3 base address.
Additional, replace AIPS1_BASE_ADDR to AIPS3_ARB_BASE_ADDR to align with
AIPS1 and AIPS2, and resolve the AIPS3_ARB_BASE_ADDR undefine problem.

Signed-off-by: Ye.Li <B37916@freescale.com>
9 years agoimx: imximage: Add QuadSPI boot support
Ye.Li [Tue, 13 Jan 2015 07:53:06 +0000 (15:53 +0800)]
imx: imximage: Add QuadSPI boot support

Add QuadSPI boot support to imximage tool.

Note: The QuadSPI configuration parameters at offset 0x400 are not
included in this patch. Need other tools to generate the parameters
part.

Signed-off-by: Ye.Li <B37916@freescale.com>
9 years agoimx: mx6qsabreauto: Change to use common GPMI IO clock function
Ye.Li [Mon, 12 Jan 2015 09:37:13 +0000 (17:37 +0800)]
imx: mx6qsabreauto: Change to use common GPMI IO clock function

Since a clock function setup_gpmi_io_clk is implemented for GPMI
IO clock settings, change to use this common function in GPMI setup.

Signed-off-by: Ye.Li <B37916@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agopmic:pfuz100 add switch mode and more registers
Peng Fan [Thu, 8 Jan 2015 13:00:36 +0000 (21:00 +0800)]
pmic:pfuz100 add switch mode and more registers

Add more pfuze register offset.
And switch mode definition.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
9 years agopmic:pfuze add macro for setting voltage
Peng Fan [Fri, 9 Jan 2015 08:59:41 +0000 (16:59 +0800)]
pmic:pfuze add macro for setting voltage

"#define PFUZE100_SW1ABC_SETP(x) ((x - 3000) / 250)"
This macro is for configuring SW1A/B/C Output Voltage easily.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>