]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
8 years agofastboot: add "fastboot oem" command support
Michael Scott [Mon, 26 Jan 2015 21:49:00 +0000 (15:49 -0600)]
fastboot: add "fastboot oem" command support

Add code stub to handle "fastboot oem __" command. As unlock is a common
fastboot command, distinguish that it is not implemented.

Signed-off-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Steve Rae <srae@broadcom.com>
8 years agoedminiv2: drop CONFIG_CFI_LEGACY
Albert ARIBAUD [Sun, 1 Feb 2015 11:04:43 +0000 (12:04 +0100)]
edminiv2: drop CONFIG_CFI_LEGACY

Nowadays generic CFI code properly detects the ED Mini V2's
Macronix MC29LV400CB flash chip, therefore we can drop the
CONFIG_FLASH_CFI_LEGACY option and associated settings and code.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoedminiv2: switch to SPL
Albert ARIBAUD [Sat, 31 Jan 2015 21:55:38 +0000 (22:55 +0100)]
edminiv2: switch to SPL

ED Mini V2 is based on Orion 5x which boots at fixed
address 0xFFFF0000 in NOR Flash. Place SPL there, and
switch U-Boot from .bin to .img format, stored in
NOR Flash at 0xFFF90000.

Note: this patch was tested on HW and works, i.e.
it boots U-Boot properly, but SPL console output
currently does not appear, due to GD being trashed
by arch/arm/lib/spl.c. This trashing is soon to be
removed, and then ED Mini V2 SPL console output will
become visible.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoedminiv2: fix PCIE IO base address typo
Albert ARIBAUD [Sat, 31 Jan 2015 21:49:39 +0000 (22:49 +0100)]
edminiv2: fix PCIE IO base address typo

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoedminiv2: switch to generic board support
Albert ARIBAUD [Sat, 31 Jan 2015 10:52:38 +0000 (11:52 +0100)]
edminiv2: switch to generic board support

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoarm: rmobile: silk: Add support SDHI
Vladimir Barinov [Tue, 24 Feb 2015 16:55:46 +0000 (18:55 +0200)]
arm: rmobile: silk: Add support SDHI

This adds GPIO configuration and initialization function of SDHI on Silk board

Signed-off-by: Vladimir Barinov <vladimir.barinov+renesas@cogentembedded.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: silk: fix typo in device declaration
Vladimir Barinov [Tue, 24 Feb 2015 16:54:48 +0000 (18:54 +0200)]
arm: rmobile: silk: fix typo in device declaration

Fix typo in device declaration

Signed-off-by: Vladimir Barinov <vladimir.barinov+renesas@cogentembedded.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: silk: Disable ethernet pins pull-up
Vladimir Barinov [Tue, 24 Feb 2015 16:54:31 +0000 (18:54 +0200)]
arm: rmobile: silk: Disable ethernet pins pull-up

Disable pull-ups on ethrenet lines

Signed-off-by: Vladimir Barinov <vladimir.barinov+renesas@cogentembedded.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: silk: Fix GPIO4_31 initialization
Vladimir Barinov [Tue, 24 Feb 2015 16:54:18 +0000 (18:54 +0200)]
arm: rmobile: silk: Fix GPIO4_31 initialization

Use gpio_direction_output instead of gpio_set_value
since the latter does not set output GPIO direction.

Signed-off-by: Valentine Barshak <valentine.barshak+renesas@cogentembedded.com>
Signed-off-by: Vladimir Barinov <vladimir.barinov+renesas@cogentembedded.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: Add Porter board support
Vladimir Barinov [Fri, 13 Feb 2015 22:06:13 +0000 (01:06 +0300)]
arm: rmobile: Add Porter board support

Porter is an entry level development board based on R-Car M2 SoC (R8A7791)

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

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agosh: enable CONFIG_USE_PRIVATE_LIBGCC by default
Masahiro Yamada [Tue, 10 Feb 2015 12:37:02 +0000 (21:37 +0900)]
sh: enable CONFIG_USE_PRIVATE_LIBGCC by default

Now this feature works.  Let's turn it on by default so we do not
depend on specific tool-chains.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agosh: import missing private libraries from Linux 3.19
Masahiro Yamada [Tue, 10 Feb 2015 12:37:01 +0000 (21:37 +0900)]
sh: import missing private libraries from Linux 3.19

SuperH is supposed to support the Private Library feature, but it is
actually not working.

If CONFIG_USE_PRIVATE_LIBGCC is enabled, the build fails for the
undefined references to '__sdivsi3_i4i' and '__udivsi3_i4i'.

To fix this error, import missing libraries from Linux 3.19
and adjust them for U-Boot:
  - Remove "#include <linux/module.h>" and "EXPORT_SYMBOL(...)"
  - Use SPDX-License-Identifier
  - Remove white space

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agosh: rename some private libraries
Masahiro Yamada [Tue, 10 Feb 2015 12:37:00 +0000 (21:37 +0900)]
sh: rename some private libraries

Rename two files to the corresponding file names in Linux.
This helps us find missing libraries in the next commit.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoserial: sh: fix internal clock source on SCIF
Vladimir Barinov [Fri, 13 Feb 2015 22:05:18 +0000 (01:05 +0300)]
serial: sh: fix internal clock source on SCIF

The formula to calculate SCIF BRR for R-Car H2/M2/E2 SoCs is as follows:

BRR = pclk / (64 * 2^(2n-1) * baudrate) - 1,
the prescaler is 0 due to SCSMR settings, hence n=0

Also SCSCR must be set to use internal or external clock source.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoserial: sh: Remove invalid UTF-8 character
Nobuhiro Iwamatsu [Wed, 10 Dec 2014 05:42:05 +0000 (14:42 +0900)]
serial: sh: Remove invalid UTF-8 character

serial_sh.c contains invalid UTF-8 character.
This deletes the character.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: lager: Add support SDHI
Nobuhiro Iwamatsu [Fri, 21 Nov 2014 01:19:32 +0000 (10:19 +0900)]
arm: rmobile: lager: Add support SDHI

Lager board has two SDHI port as SDHI0 and SDHI2.
This adds GPIO configuration and initialization function of SDHI, and
enables MMC command.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: gose: Add support SDHI
Nobuhiro Iwamatsu [Wed, 12 Nov 2014 02:29:39 +0000 (11:29 +0900)]
arm: rmobile: gose: Add support SDHI

Gose board has three SDHI port.
This adds GPIO configuration and initialization function of SDHI, and
enables MMC command.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: koelsch: Add support SDHI
Nobuhiro Iwamatsu [Wed, 12 Nov 2014 04:03:54 +0000 (13:03 +0900)]
arm: rmobile: koelsch: Add support SDHI

Koelsch board has three SDHI port.
This adds GPIO configuration and initialization function of SDHI, and
enables MMC command.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: alt: Add support SDHI
Nobuhiro Iwamatsu [Wed, 19 Nov 2014 05:26:33 +0000 (14:26 +0900)]
arm: rmobile: alt: Add support SDHI

Alt board has two SDHI port.
This adds GPIO configuration and initialization function of SDHI, and
enables MMC command.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: silk: Migrate serial driver to drivers model
Nobuhiro Iwamatsu [Tue, 9 Dec 2014 07:20:04 +0000 (16:20 +0900)]
arm: rmobile: silk: Migrate serial driver to drivers model

This adds drivers model support of serial port to Silk board,
and migrate serial port to drivers model.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: alt: Migrate serial driver to drivers model
Nobuhiro Iwamatsu [Tue, 9 Dec 2014 07:20:04 +0000 (16:20 +0900)]
arm: rmobile: alt: Migrate serial driver to drivers model

This adds drivers model support of serial port to Alt board,
and migrate serial port to drivers model.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: lager: Migrate serial driver to drivers model
Nobuhiro Iwamatsu [Tue, 9 Dec 2014 07:20:04 +0000 (16:20 +0900)]
arm: rmobile: lager: Migrate serial driver to drivers model

This adds drivers model support of serial port to Lager board,
and migrate serial port to drivers model.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: gose: Migrate serial driver to drivers model
Nobuhiro Iwamatsu [Tue, 9 Dec 2014 02:24:01 +0000 (11:24 +0900)]
arm: rmobile: gose: Migrate serial driver to drivers model

This adds drivers model support of serial port to Gose board,
and migrate serial port to drivers model.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: koelsch: Migrate serial driver to drivers model
Nobuhiro Iwamatsu [Tue, 9 Dec 2014 02:24:01 +0000 (11:24 +0900)]
arm: rmobile: koelsch: Migrate serial driver to drivers model

This adds drivers model support of serial port to Koelsch board,
and migrate serial port to drivers model.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agozmx25: Convert to generic board
Fabio Estevam [Mon, 23 Feb 2015 11:51:38 +0000 (08:51 -0300)]
zmx25: Convert to generic board

Boards need to select CONFIG_SYS_GENERIC_BOARD in order to prevent removal
from the project.

Cc: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
8 years agoimx31_phycore: Convert to generic board
Fabio Estevam [Mon, 23 Feb 2015 11:51:37 +0000 (08:51 -0300)]
imx31_phycore: Convert to generic board

Boards need to select CONFIG_SYS_GENERIC_BOARD in order to prevent removal
from the project.

Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
8 years agomx31ads: Convert to generic board
Fabio Estevam [Mon, 23 Feb 2015 11:51:36 +0000 (08:51 -0300)]
mx31ads: Convert to generic board

Boards need to select CONFIG_SYS_GENERIC_BOARD in order to prevent removal
from the project.

Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
8 years agoARM: davinci: remove hawkboard support
Masahiro Yamada [Tue, 24 Feb 2015 02:45:10 +0000 (11:45 +0900)]
ARM: davinci: remove hawkboard support

This is still a non-generic board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Sughosh Ganu <urwithsughosh@gmail.com>
Cc: Syed Mohammed Khasim <sm.khasim@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agoARM: remove tnetv107x board support
Masahiro Yamada [Tue, 24 Feb 2015 02:45:09 +0000 (11:45 +0900)]
ARM: remove tnetv107x board support

This is still a non-generic board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Chan-Taek Park <c-park@ti.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agoARM: remove a320evb board support
Masahiro Yamada [Tue, 24 Feb 2015 02:45:08 +0000 (11:45 +0900)]
ARM: remove a320evb board support

This is still a non-generic board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Po-Yu Chuang <ratbert@faraday-tech.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agoARM: remove cm4008 and cm41xx board support
Masahiro Yamada [Tue, 24 Feb 2015 02:45:07 +0000 (11:45 +0900)]
ARM: remove cm4008 and cm41xx board support

These are still non-generic boards.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Greg Ungerer <greg.ungerer@opengear.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agoARM: remove dkb board support
Masahiro Yamada [Tue, 24 Feb 2015 02:45:06 +0000 (11:45 +0900)]
ARM: remove dkb board support

This is still a non-generic board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Lei Wen <leiwen@marvell.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agoARM: remove jadecpu board support
Masahiro Yamada [Tue, 24 Feb 2015 02:45:05 +0000 (11:45 +0900)]
ARM: remove jadecpu board support

This is still a non-generic board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Matthias Weisser <weisserm@arcor.de>
Acked-by: Marek Vasut <marex@denx.de>
8 years agokconfig: remove unneeded dependency on !SPL_BUILD
Masahiro Yamada [Tue, 24 Feb 2015 13:26:21 +0000 (22:26 +0900)]
kconfig: remove unneeded dependency on !SPL_BUILD

Now CONFIG_SPL_BUILD is not defined in Kconfig, so
"!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
8 years agokconfig: switch to single .config configuration
Masahiro Yamada [Tue, 24 Feb 2015 13:26:20 +0000 (22:26 +0900)]
kconfig: switch to single .config configuration

When Kconfig for U-boot was examined, one of the biggest issues was
how to support multiple images (Normal, SPL, TPL).  There were
actually two options, "single .config" and "multiple .config".
After some discussions and thought experiments, I chose the latter,
i.e. to create ".config", "spl/.config", "tpl/.config" for Normal,
SPL, TPL, respectively.

It is true that the "multiple .config" strategy provided us the
maximum flexibility and helped to avoid duplicating CONFIGs among
Normal, SPL, TPL, but I have noticed some fatal problems:

[1] It is impossible to share CONFIG options across the images.
  If you change the configuration of Main image, you often have to
  adjust some SPL configurations correspondingly.  Currently, we
  cannot handle the dependencies between them.  It means one of the
  biggest advantages of Kconfig is lost.

[2] It is too painful to change both ".config" and "spl/.config".
  Sunxi guys started to work around this problem by creating a new
  configuration target.  Commit cbdd9a9737cc (sunxi: kconfig: Add
  %_felconfig rule to enable FEL build of sunxi platforms.) added
  "make *_felconfig" to enable CONFIG_SPL_FEL on both images.
  Changing the configuration of multiple images in one command is a
  generic demand.  The current implementation cannot propose any
  good solution about this.

[3] Kconfig files are getting ugly and difficult to understand.
  Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to
  Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.

[4] The build system got more complicated than it should be.
  To adjust Linux-originated Kconfig to U-Boot, the helper script
  "scripts/multiconfig.sh" was introduced.  Writing a complicated
  text processor is a shell script sometimes caused problems.

Now I believe the "single .config" will serve us better.  With it,
all the problems above would go away.  Instead, we will have to add
some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM,
but we will not have much.  Anyway, this is what we do now in
scripts/Makefile.spl.

I admit my mistake with my apology and this commit switches to the
single .config configuration.

It is not so difficult to do that:

 - Remove unnecessary processings from scripts/multiconfig.sh
  This file will remain for a while to support the current defconfig
  format.  It will be removed after more cleanups are done.

 - Adjust some makefiles and Kconfigs

 - Add some entries to include/config_uncmd_spl.h and the new file
   scripts/Makefile.uncmd_spl.  Some CONFIG options that are not
   supported on SPL must be disabled because one .config is shared
   between SPL and U-Boot proper going forward.  I know this is not
   a beautiful solution and I think we can do better, but let's see
   how much we will have to describe them.

 - update doc/README.kconfig

More cleaning up patches will follow this.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agokconfig: Adjust ordering so that defaults work as expected
Simon Glass [Tue, 24 Feb 2015 13:26:19 +0000 (22:26 +0900)]
kconfig: Adjust ordering so that defaults work as expected

At present defaults in arch-specific Kconfig files are ignored if the
top-level item comes ahead of it in include order. This means that it is
not possible to have a U-Boot default that architectures and boards can
override. This does not seem very useful.

Move the include earlier to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
8 years agoARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value
Masahiro Yamada [Tue, 24 Feb 2015 13:26:18 +0000 (22:26 +0900)]
ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value

It is true that malloc is necessary for Driver Model before
relocation, but there is no good reason to reserve the malloc
space more than enough.  The default value 0x400 works well.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoOMAP3: igep0032: Fix regression due commit f3b4bc45.
Enric Balletbo i Serra [Tue, 24 Feb 2015 18:27:15 +0000 (19:27 +0100)]
OMAP3: igep0032: Fix regression due commit f3b4bc45.

Commit referenced in subject breaks IGEP0032 build with the following
error:

  drivers/misc/status_led.c:30:7: error: 'RED_LED_GPIO' undeclared here (not in a function)
  scripts/Makefile.build:275: recipe for target 'drivers/misc/status_led.o' failed
  make[2]: *** [drivers/misc/status_led.o] Error 1
  scripts/Makefile.build:420: recipe for target 'drivers/misc' failed
  make[1]: *** [drivers/misc] Error 2
  Makefile:1093: recipe for target 'drivers' failed
  make: *** [drivers] Error 2

Fix this by skipping the status led on IGEP0032 machine as is not available
and throw an error for future machines if the status led is not configured
to avoid build breakage.

Reported-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
8 years agommc: fsl_esdhc: Add support for DDR mode
Volodymyr Riazantsev [Tue, 20 Jan 2015 15:16:44 +0000 (10:16 -0500)]
mmc: fsl_esdhc: Add support for DDR mode

Add support of the DDR mode for eSDHC driver.
Enable it for i.MX6 SoC family only.

Signed-off-by: Volodymyr Riazantsev <volodymyr.riazantsev@globallogic.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarm: ls1021x: Add support for initializing CAAM's stream id
Alison Wang [Fri, 16 Jan 2015 09:21:34 +0000 (17:21 +0800)]
arm: ls1021x: Add support for initializing CAAM's stream id

There 4 JRs, 4 RTICs and 8 DECOs, and set them the same stream id
for using the same SMMU3 on LS1021A.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarm: ls102xa: workaround for cache coherency problem
chenhui zhao [Fri, 23 Jan 2015 07:53:53 +0000 (15:53 +0800)]
arm: ls102xa: workaround for cache coherency problem

The RCPM FSM may not be reset after power-on, for example,
in the cases of cold boot and wakeup from deep sleep.
It causes cache coherency problem and may block deep sleep.
Therefore, reset them if they are not be reset.

Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodriver/pci: add Layerscape PCIe driver
Minghuan Lian [Wed, 21 Jan 2015 09:29:20 +0000 (17:29 +0800)]
driver/pci: add Layerscape PCIe driver

The patch adds Freescale Layerscape PCIe driver and provides
up to 4 controllers support.

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarm/ls1021a: add PCIe settings
Minghuan Lian [Wed, 21 Jan 2015 09:29:19 +0000 (17:29 +0800)]
arm/ls1021a: add PCIe settings

The patch enables and adds PCIe settings for boards LS1021AQDS
and LS1021ATWR.

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarm/ls102xa: use a array to define pexmscportsr
Minghuan Lian [Wed, 21 Jan 2015 09:29:18 +0000 (17:29 +0800)]
arm/ls102xa: use a array to define pexmscportsr

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarm/ls102xa: create TLB to map PCIe region
Minghuan Lian [Wed, 21 Jan 2015 09:29:17 +0000 (17:29 +0800)]
arm/ls102xa: create TLB to map PCIe region

LS1021A's PCIe1 region begins 0x40_00000000; PCIe2 begins
0x48_00000000. In order to access PCIe device, we must create
TLB to map the 40bit physical address to 32bit virtual address.
This patch will enable MMU after DDR is available and creates MMU
table in DRAM to map all 4G space; then, re-use the reserved space
to map PCIe region. The following the mapping layout.

VA mapping:
    -------  <---- 0GB
   |       |
   |       |
   |-------| <---- 0x24000000
   |///////|  ===> 192MB VA map for PCIe1 with offset 0x40_0000_0000
   |-------| <---- 0x300000000
   |       |
   |-------| <---- 0x34000000
   |///////|  ===> 192MB VA map for PCIe2 with offset 0x48_0000_0000
   |-------| <---- 0x40000000
   |       |
   |-------| <---- 0x80000000 DDR0 space start
   |\\\\\\\|
   |\\\\\\\|  ===> 2GB VA map for 2GB DDR0 Memory space
   |\\\\\\\|
   -------  <---- 4GB DDR0 space end

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarm: ls102xa: Define default values for some CCSR macros
Alison Wang [Fri, 16 Jan 2015 09:23:04 +0000 (17:23 +0800)]
arm: ls102xa: Define default values for some CCSR macros

This patch is to define default values for some CCSR macros
to make header files cleaner.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/mc: Migrated MC Flibs to 0.5.2
J. German Rivera [Tue, 6 Jan 2015 21:19:02 +0000 (13:19 -0800)]
drivers/mc: Migrated MC Flibs to 0.5.2

Upgrade Manage Complex (MC) flib API to 0.5.2. Rename directory
fsl_mc to fsl-mc. Change the fsl-mc node in Linux device tree
from "fsl,dprcr" to "fsl-mc". Print MC version info when
appropriate.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/ls2085a_emu: Enable sync of refresh
York Sun [Tue, 6 Jan 2015 21:19:01 +0000 (13:19 -0800)]
armv8/ls2085a_emu: Enable sync of refresh

Enable sync of DDR refresh for LS2085a platform. GPP DDR controllers
stay in sync. DP-DDR has only one controller so it does no harm.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/fsl-lsch3: Enable erratum workround for A008514
York Sun [Tue, 6 Jan 2015 21:19:00 +0000 (13:19 -0800)]
armv8/fsl-lsch3: Enable erratum workround for A008514

Erratum A008514 appleis to ls2085a.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/fsl-lsch3: Enable workaround for A008336
York Sun [Tue, 6 Jan 2015 21:18:59 +0000 (13:18 -0800)]
armv8/fsl-lsch3: Enable workaround for A008336

Erratum A008336 applied to LS2085A.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agols2085/configs: Ensure right banners are printed for EMU and SIMU
Bhupesh Sharma [Tue, 6 Jan 2015 21:18:58 +0000 (13:18 -0800)]
ls2085/configs: Ensure right banners are printed for EMU and SIMU

This patch enusres that right banners are printed for LS2085A
emulator and simulator platforms.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoARMv8/ls2085a: Move kernel image load address
Stuart Yoder [Tue, 6 Jan 2015 21:18:57 +0000 (13:18 -0800)]
ARMv8/ls2085a: Move kernel image load address

Move the load address of the kernel image to get it away from the
region of the uncompressed kernel.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoARMv8/ls2085a: Switch to passing earlycon to kernel
Arnab Basu [Tue, 6 Jan 2015 21:18:56 +0000 (13:18 -0800)]
ARMv8/ls2085a: Switch to passing earlycon to kernel

Since Linux v3.16-rc1 earlyprintk has been removed for arm64.
Switch to using earlycon.

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
8 years agodriver/ddr/fsl: Add sync of refresh
York Sun [Tue, 6 Jan 2015 21:18:55 +0000 (13:18 -0800)]
driver/ddr/fsl: Add sync of refresh

Add sync of refresh for multiple DDR controllers. DDRC initialization
needs to complete first. Code is re-ordered to keep refresh close.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoARMv8/LS2085A: Adjust system clock and DDR clock
York Sun [Tue, 6 Jan 2015 21:18:54 +0000 (13:18 -0800)]
ARMv8/LS2085A: Adjust system clock and DDR clock

Set system clock to 100MHz and DDR clock to 133MHz.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoARMv8/LS2085A: HugeTLB support is required by default in LS NADK
Kuldip Giroh [Tue, 6 Jan 2015 21:18:53 +0000 (13:18 -0800)]
ARMv8/LS2085A: HugeTLB support is required by default in LS NADK

LS NADK memory manager by default works on HugeTLB. Hence bootargs
must include parameters default_hugepagesz (default hugepagesize,
hugepagesz (hugepage size) and hugepages (number of hugepages to be
reserved in kernel for the given size).

Signed-off-by: Kuldip Giroh <kuldip.giroh@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodriver/ddr/fsl: Fix a typo in timing_cfg_8 calculation
York Sun [Tue, 6 Jan 2015 21:18:52 +0000 (13:18 -0800)]
driver/ddr/fsl: Fix a typo in timing_cfg_8 calculation

wwt_bg should match rrt_bg. It was a typo in driver.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoARMv8/LS2085A: Enable auto precharge for DP-DDR
York Sun [Tue, 6 Jan 2015 21:18:51 +0000 (13:18 -0800)]
ARMv8/LS2085A: Enable auto precharge for DP-DDR

DP-DDR benefits from auto precharge because of its specific
application.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agodriver/ddr/fsl: Add support for multiple DDR clocks
York Sun [Tue, 6 Jan 2015 21:18:50 +0000 (13:18 -0800)]
driver/ddr/fsl: Add support for multiple DDR clocks

Controller number is passed for function calls to support individual
DDR clock, depending on SoC implementation. It is backward compatible
with exising platforms. Multiple clocks have been verifyed on LS2085A
emulator.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/fsl-lsch3: Add support for second DDR clock
York Sun [Tue, 6 Jan 2015 21:18:49 +0000 (13:18 -0800)]
armv8/fsl-lsch3: Add support for second DDR clock

FSL-LSCH3 platforms can have multiple DDR clocks. LS2085A has one clock for
general DDR controlers, and another clock for DP-DDR. DDR driver needs to
change to support multiple clocks.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agodriver/ddr/fsl: Add workround for erratumn A008514
York Sun [Tue, 6 Jan 2015 21:18:48 +0000 (13:18 -0800)]
driver/ddr/fsl: Add workround for erratumn A008514

Erratum A008514 workround requires writing register eddrtqcr1 with
value 0x63b20002.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agodriver/ddr/fsl: Add workaround for A008336
York Sun [Tue, 6 Jan 2015 21:18:47 +0000 (13:18 -0800)]
driver/ddr/fsl: Add workaround for A008336

Erratum A008336 requires setting EDDRTQCR1[2] in DDRC DCSR space
for 64-bit DDR controllers.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agodriver/ddr/fsl: Adjust CAS to preamble override for emulator
York Sun [Tue, 6 Jan 2015 21:18:45 +0000 (13:18 -0800)]
driver/ddr/fsl: Adjust CAS to preamble override for emulator

On ZeBu emulator, CAS to preamble overrides need to be set to
satisfy the timing. This only impact platforms with CONFIG_EMU.

These should be set before MEM_EN is set.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/fsl-lsch3: Add fdt-fixup for clock frequency of the DUART nodes
Bhupesh Sharma [Tue, 6 Jan 2015 21:18:44 +0000 (13:18 -0800)]
armv8/fsl-lsch3: Add fdt-fixup for clock frequency of the DUART nodes

This patch adds the fdt-fixup logic for the clock frequency of the
NS16550A related device tree nodes.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/ls2085a: Enable cluster timebase for all clusters
York Sun [Tue, 6 Jan 2015 21:18:43 +0000 (13:18 -0800)]
armv8/ls2085a: Enable cluster timebase for all clusters

LS2085A and its variants can have up to four clusters. It is safe
to enable timebase for all even some may be disabled.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/fsl-lsch3: Convert flushing L3 to assembly to avoid using stack
York Sun [Tue, 6 Jan 2015 21:18:42 +0000 (13:18 -0800)]
armv8/fsl-lsch3: Convert flushing L3 to assembly to avoid using stack

Flushing L3 cache in CCN-504 requries d-cache to be disabled. Using
assembly function to guarantee stack is not used before flushing is
completed. Timeout is needed for simualtor on which CCN-504 is not
implemented. Return value can be checked for timeout situation.

Change bootm.c to disable dcache instead of simply flushing, required
by flushing L3.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoARMv8/fsl-lsch3: Patch cpu node properties in DT for online cores
Arnab Basu [Tue, 6 Jan 2015 21:18:41 +0000 (13:18 -0800)]
ARMv8/fsl-lsch3: Patch cpu node properties in DT for online cores

U-Boot should only add "enable-method" and "cpu-release-address"
properties to the "cpu" node of the online cores.

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/fsl-lsch3: Change normal memory shareability
York Sun [Tue, 6 Jan 2015 21:11:22 +0000 (13:11 -0800)]
armv8/fsl-lsch3: Change normal memory shareability

According to hardware implementation, a single outer shareable global
coherence group is defined. Inner shareable has not bee enabled.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agofsl-ch3/lowlevel: TZPC and TZASC programming to configure non-secure accesses
Bhupesh Sharma [Tue, 6 Jan 2015 21:11:21 +0000 (13:11 -0800)]
fsl-ch3/lowlevel: TZPC and TZASC programming to configure non-secure accesses

This patch ensures that the TZPC (BP147) and TZASC-400 programming
happens for LS2085A SoC only when the desired config flags are
enabled and ensures that the TZPC programming is done to allow Non-secure
(NS) + secure (S) transactions only for DCGF registers.

The TZASC component is not present on LS2085A-Rev1, so the TZASC-400
config flag is turned OFF for now.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agousb: musb-new: omap2430: Reset the MUSB controller early
Paul Kocialkowski [Mon, 19 Jan 2015 17:33:43 +0000 (18:33 +0100)]
usb: musb-new: omap2430: Reset the MUSB controller early

When booting from USB peripheral boot, the bootrom will not properly deinit the
MUSB controller, which doesn't clearly indicate an USB disconnection to the host
and leaves U-Boot to deal with the state of the previous USB session.

On some host controller drivers (e.g. xhci_hcd), this ends up in a failure
during set address, caused by the lack of proper disconnection notification.

Resetting the controller early in U-Boot notifies the host of the disconnection
and doesn't hurt other use cases.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
8 years agoexynos: usb: make dwc3_set_mode to static
Joonyoung Shim [Wed, 21 Jan 2015 05:16:25 +0000 (14:16 +0900)]
exynos: usb: make dwc3_set_mode to static

The dwc3_set_mode function is used only in
drivers/usb/host/xhci-exynos5.c so make it to static.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
8 years agommc: sdhci: fix bus width switching on Samsung SoCs
Matt Reimer [Thu, 19 Feb 2015 18:22:53 +0000 (11:22 -0700)]
mmc: sdhci: fix bus width switching on Samsung SoCs

Fix bus width switching from 8-bit mode down to 4-bit or 1-bit modes on
Samsung SoCs using SDHCI_QUIRK_USE_WIDE8.  These SoCs report controller
version 2.0 yet they support 8-bit bus widths.  If 8-bit mode was
previously enabled and then an operation like "mmc dev" caused a switch
back down to 4-bit or 1-bit mode, WIDE8 was left set, causing failures.

This problem was manifested by "mmc dev" timing out.

Signed-off-by: Matt Reimer <mreimer@sdgsystems.com>
8 years agommc: print SD/eMMC type for inited mmc devices
Przemyslaw Marczak [Fri, 20 Feb 2015 11:29:27 +0000 (12:29 +0100)]
mmc: print SD/eMMC type for inited mmc devices

Depending on the boot priority, the eMMC/SD cards,
can be initialized with the same numbers for each boot.

To be sure which mmc device is SD and which is eMMC,
this info is printed by 'mmc list' command, when
the init is done.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
8 years agommc: exynos dwmmc: check boot mode before init dwmmc
Przemyslaw Marczak [Fri, 20 Feb 2015 11:29:26 +0000 (12:29 +0100)]
mmc: exynos dwmmc: check boot mode before init dwmmc

Before this commit, the mmc devices were always registered
in the same order. So dwmmc channel 0 was registered as mmc 0,
channel 1 as mmc 1, etc.
In case of possibility to boot from more then one device,
the CONFIG_SYS_MMC_ENV_DEV should always point to right mmc device.

This can be achieved by init boot device as first, so it will be
always registered as mmc 0. Thanks to this, the 'saveenv' command
will work fine for all mmc boot devices.

Exynos based boards usually uses mmc host channels configuration:
- 0, or 0+1 for 8 bit  - as a default boot device (usually eMMC)
- 2 for 4bit - as an optional boot device (usually SD card slot)

And usually the boot order is defined by OM pin configuration,
which can be changed in a few ways, eg.
- Odroid U3     - eMMC card insertion -> first boot from eMMC
- Odroid X2/XU3 - boot priority jumper

By this commit, Exynos dwmmc driver will check the OM pin configuration,
and then try to init the boot device and register it as mmc 0.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Akshay Saraswat <akshay.s@samsung.com>
8 years agommc: exynos_dw_mmc: use the exynos specific data structure
Jaehoon Chung [Wed, 4 Feb 2015 06:48:40 +0000 (15:48 +0900)]
mmc: exynos_dw_mmc: use the exynos specific data structure

Clksel value is exynos specific value.
It removed "clksel_val" into dwmci_host and created the
"dwmci_exynos_priv_data" structure for exynos specific data.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agommc: exynos_dw_mmc: set to clksel_val into board-init function
Jaehoon Chung [Wed, 4 Feb 2015 06:48:39 +0000 (15:48 +0900)]
mmc: exynos_dw_mmc: set to clksel_val into board-init function

"clksel_val" is assigned to property of mmc or defined value.
But it doesn't write at initial sequence.
There is a reason that get the wrong source-clock value.
This patch fixed it.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agommc: dw_mmc: fixed the wrong bit control
Jaehoon Chung [Wed, 14 Jan 2015 08:37:53 +0000 (17:37 +0900)]
mmc: dw_mmc: fixed the wrong bit control

If mode is not DDR-mode, then it needs to clear it.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agommc: Implement SD/MMC versioning properly
Pantelis Antoniou [Fri, 23 Jan 2015 10:12:01 +0000 (12:12 +0200)]
mmc: Implement SD/MMC versioning properly

The SD/MMC version scheme was buggy when dealing with standard
major.minor.change cases. Fix it by using something similar to
the linux's kernel versioning method.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Reported-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
8 years agowarp: Add initial WaRP Board support
Otavio Salvador [Tue, 17 Feb 2015 12:42:46 +0000 (10:42 -0200)]
warp: Add initial WaRP Board support

The WaRP Board is a Wearable Reference Plaform. The board features:

 - Freescale i.MX6 SoloLite processor with 512MB of RAM
 - Freescale FXOS8700CQ 6-axis Xtrinsic sensor
 - Freescale Kinetis KL16 MCU
 - Freescale Xtrinsic MMA955xL intelligent motion sensing platform

The board implements a hybrid architecture to address the evolving
needs of the wearables market. The platform consists of a main board
and an example daughtercard with the ability to add additional
daughtercards for different usage models.

For more information about the project, visit:

 http://www.warpboard.org/

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6sl: Extend USDHC SD2 pins to support 8-wire use
Otavio Salvador [Tue, 17 Feb 2015 12:42:45 +0000 (10:42 -0200)]
imx: mx6sl: Extend USDHC SD2 pins to support 8-wire use

This adds the DATA[4-7] and RST pin definitions.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
8 years agommc: fsl_esdhc: Add support to force VSELECT set
Otavio Salvador [Tue, 17 Feb 2015 12:42:44 +0000 (10:42 -0200)]
mmc: fsl_esdhc: Add support to force VSELECT set

Some boards cannot do voltage negotiation but need to set the VSELECT
bit forcely to ensure it to work at 1.8V.

This commit adds CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT flag for this use.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
8 years agommc: fsl_esdhc: Add CMD11 support to switch to 1.8V
Otavio Salvador [Tue, 17 Feb 2015 12:42:43 +0000 (10:42 -0200)]
mmc: fsl_esdhc: Add CMD11 support to switch to 1.8V

This adds support to switch to 1.8V in case CMD11 succeeds.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agoimx:mx6slevk implement power init board
Peng Fan [Thu, 12 Feb 2015 01:36:29 +0000 (09:36 +0800)]
imx:mx6slevk implement power init board

Implement power_init_board and related I2C interface configuration.

After adding this, uboot can successfully detect and configure pmic.

"
U-Boot 2015.01-00281-ge29eddf (Feb 12 2015 - 09:24:01)

CPU:   Freescale i.MX6SL rev1.0 at 396 MHz
Reset cause: POR
Board: MX6SLEVK
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
"

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
8 years agoimx:mx6slevk add pmic and i2c configuration
Peng Fan [Thu, 12 Feb 2015 01:36:28 +0000 (09:36 +0800)]
imx:mx6slevk add pmic and i2c configuration

Add pmic and i2c configuration in board header file.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
8 years agoimx:mx6sl add I2c pad settings
Peng Fan [Thu, 12 Feb 2015 01:36:27 +0000 (09:36 +0800)]
imx:mx6sl add I2c pad settings

A few pad settings are I2C1

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
8 years agoboard: tbs2910: Gate clock when switching async clock muxes
Soeren Moch [Fri, 23 Jan 2015 18:03:37 +0000 (19:03 +0100)]
board: tbs2910: Gate clock when switching async clock muxes

According to the i.MX6Q Reference Manual, clocks must be gated when
switching input clocks of async clock muxes. So use clock gates. Avoid
ldb_di0_ipu clock, because there is no clock gate for this signal.

There have never been any complaints about problems with the old code,
but the new approach is in line with the recommendations in the manual.

Signed-off-by: Soeren Moch <smoch@web.de>
8 years agosunxi: Machine id hack to prevent loading buggy sunxi-3.4 kernels
Siarhei Siamashka [Sat, 21 Feb 2015 05:34:09 +0000 (07:34 +0200)]
sunxi: Machine id hack to prevent loading buggy sunxi-3.4 kernels

Right now U-Boot supports the CONFIG_OLD_SUNXI_KERNEL_COMPAT option,
which makes it go out of its way in limiting the selection of PLL clock
frequencies and PMIC voltages in order not to upset outdated buggy
sunxi-3.4 kernel releases. And if the CONFIG_OLD_SUNXI_KERNEL_COMPAT
option is not set, then booting such old kernels exhibits various
failures at runtime. This is very user unfriendly, and there were
already several incidents when people wasted their time being hit
by these runtime failures and trying to debug them.

The right solution is not to add hacks and workarounds to the mainline
U-Boot, but to fix these bugs in the sunxi-3.4 kernel. And in fact,
the updated sunxi-3.4 kernels already exist. Still we need to follow
the 'Principle of Least Surprise' and U-Boot needs to ensure that
the old buggy kernels are not getting happily booted when the
CONFIG_OLD_SUNXI_KERNEL_COMPAT option is not set. And this patch
addresses this particular issue.

This patch makes U-Boot store the 'compatibility revision' number in
the top 4 bits of the machine id and pass it to the kernel. The old
buggy kernels will fail to load with a very much googlable error
message on the serial console (the "r1 = 0x100010bb" part of it):

  "Error: unrecognized/unsupported machine ID (r1 = 0x100010bb)"

This error message can be documented in the linux-sunxi wiki with
proper explanations about how to resolve this situation and where
to get the necessary bugfixes for the sunxi-3.4 kernel.

The fixed sunxi-3.4 kernels implement a revision compatibility check
and clear the top 4 bits of the machine id if everything is alright.
By accepting the machine id with the bits 31:28 set to 1, the sunxi-3.4
kernel effectively certifies that it has the PLL5 clock speed and
AXP209 DCDC3 voltage fixes applied.

It is still possible to set the CONFIG_OLD_SUNXI_KERNEL_COMPAT option
in U-Boot if the user desires to use an outdated unpatched sunxi-3.4
kernel.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Set the /chosen/stdout-path fdt property for sunxi boards
Hans de Goede [Fri, 20 Feb 2015 15:55:12 +0000 (16:55 +0100)]
sunxi: Set the /chosen/stdout-path fdt property for sunxi boards

While discussing with some people how to get the Linux kernel to do the
right thing wrt sending output to both the serial console and the
hdmi out / lcd screen when booting on ARM devices, Grant Likely pointed out
that there already is a solution for this.

All we need to do is set the /chosen/stdout-path fdt property, and if no
console= arguments were specified on the kernel commandline the kernel
will honor this and add this device as a console (next to the primary
video output on hdmi).

And u-boot already has support for setting this, all we need to do is
define OF_STDOUT_PATH and then everything will just work ootb, without
people needing to meddle with adding console= arguments in extlinux.conf .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Tom Rini <trini@ti.com>
8 years agosunxi: Fix sun5i mbus speed when booting old kernels
Hans de Goede [Thu, 19 Feb 2015 13:46:44 +0000 (14:46 +0100)]
sunxi: Fix sun5i mbus speed when booting old kernels

Older linux-sunxi-3.4 kernels override our PLL6 setting with 300 MHz,
halving the mbus frequency, so set it to 300 MHz ourselves and base the
mbus divider on that.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: musb: Check Vbus-det before enabling otg port power
Hans de Goede [Mon, 16 Feb 2015 21:13:43 +0000 (22:13 +0100)]
sunxi: musb: Check Vbus-det before enabling otg port power

Sending out 5V when there is a charger connected to the otg port is not a
good idea, so check for this and error out.

Note this commit currently breaks otg support on the q8h tablets, as we need
to do some magic with the pmic there to get vbus info, this is deliberate
(better safe then sorry), fixing this is on my TODO list.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: Add support for the UTOO P66 tablet
Hans de Goede [Mon, 16 Feb 2015 18:47:43 +0000 (19:47 +0100)]
sunxi: Add support for the UTOO P66 tablet

The UTOO P66 is a 6" A13 tablet / lcd ereader. It features a 6" 480x800 ips
lcd screen, 512MB RAM & 4GB emmc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: mmc: Always declare High Capacity capability
Hans de Goede [Thu, 19 Feb 2015 19:34:32 +0000 (20:34 +0100)]
sunxi: mmc: Always declare High Capacity capability

High Capacity (e)MMC cards work fine on sun4i / sun5i, and not having this
capability set causes u-boot to not recognize the eMMC on an Utoo P66 A13
tablet, so always set it thereby fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agorpi: add support for Raspberry Pi 2 model B
Stephen Warren [Mon, 16 Feb 2015 19:16:15 +0000 (12:16 -0700)]
rpi: add support for Raspberry Pi 2 model B

USB doesn't seem to work yet; the controller detects the on-board Hub/
Ethernet device but can't read the descriptors from it. I haven't
investigated yet.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agobcm2836 SoC support (used in Raspberry Pi 2 model B)
Stephen Warren [Mon, 16 Feb 2015 19:16:14 +0000 (12:16 -0700)]
bcm2836 SoC support (used in Raspberry Pi 2 model B)

The bcm2835 and bcm2836 are essentially identical, except:
- The CPU is an ARM1176 v.s. a quad-core Cortex-A7.
- The physical address of many IO controllers has moved.

Rather than introducing a whole new bcm2836 value for $(SOC) or $(ARCH),
update the existing bcm2835 code to handle the minor differences, and
plumb it into the ARMv7 CPU architecture.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agobcm2835/rpi: add SPDX license tags for some files
Stephen Warren [Mon, 16 Feb 2015 19:16:13 +0000 (12:16 -0700)]
bcm2835/rpi: add SPDX license tags for some files

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agoARM: prepare for including <mach/*.h>
Masahiro Yamada [Fri, 20 Feb 2015 08:04:19 +0000 (17:04 +0900)]
ARM: prepare for including <mach/*.h>

This commit adds $(srctree)/arch/arm/$(machdirs)/include/mach to
the headers search path.

It allows us to replace "#include <asm/arch/foo.h>" with
"#include <mach/foo.h>".  As "#include <asm/arch/foo.h>" is still
supported, we can modify each file one by one.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
8 years agoARM: keystone: move SoC headers to mach-keystone/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:18 +0000 (17:04 +0900)]
ARM: keystone: move SoC headers to mach-keystone/include/mach

Move arch/arm/include/asm/arch-keystone/*
  -> arch/arm/mach-keystone/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
8 years agoARM: orion5x: move SoC headers to mach-orion5x/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:17 +0000 (17:04 +0900)]
ARM: orion5x: move SoC headers to mach-orion5x/include/mach

Move arch/arm/include/asm/arch-orion5x/*
  -> arch/arm/mach-orion5x/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoARM: nomadik: move SoC headers to mach-nomadik/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:16 +0000 (17:04 +0900)]
ARM: nomadik: move SoC headers to mach-nomadik/include/mach

Move arch/arm/include/asm/arch-nomadik/*
  -> arch/arm/mach-nomadik/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nomadik Linux Team <STN_WMM_nomadik_linux@list.st.com>
Cc: Alessandro Rubini <rubini@unipv.it>
8 years agoARM: kirkwood: move SoC headers to mach-kirkwood/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:15 +0000 (17:04 +0900)]
ARM: kirkwood: move SoC headers to mach-kirkwood/include/mach

Move arch/arm/include/asm/arch-kirkwood/*
  -> arch/arm/mach-kirkwood/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>