]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
6 years agoMerge git://www.denx.de/git/u-boot-imx
Tom Rini [Wed, 16 Aug 2017 22:07:20 +0000 (18:07 -0400)] 
Merge git://www.denx.de/git/u-boot-imx

Update pfla02 for setenv changes and PHYLIB/etc migration to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-spi
Tom Rini [Wed, 16 Aug 2017 22:07:15 +0000 (18:07 -0400)] 
Merge git://git.denx.de/u-boot-spi

6 years agosf: Preserve QE bit when clearing BP# bits for Macronix flash
Bin Meng [Sun, 23 Jul 2017 14:44:37 +0000 (07:44 -0700)] 
sf: Preserve QE bit when clearing BP# bits for Macronix flash

On some flash (like Macronix), QE (quad enable) bit is in the same
status register as BP# bits, and we need preserve its original value
during a reboot cycle as this is required by some platforms (like
Intel ICH SPI controller working under descriptor mode).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
[Refined code for readability]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoenv: Adjust the load() method to return an error
Simon Glass [Thu, 3 Aug 2017 18:22:17 +0000 (12:22 -0600)] 
env: Adjust the load() method to return an error

The load() methods have inconsistent behaviour on error. Some of them load
an empty default environment. Some load an environment containing an error
message. Others do nothing.

As a step in the right direction, have the method return an error code.
Then the caller could handle this itself in a consistent way.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Adjust the get_char() method to return an int
Simon Glass [Thu, 3 Aug 2017 18:22:16 +0000 (12:22 -0600)] 
env: Adjust the get_char() method to return an int

In principle this can fail, e.g. if the index is out of range. Adjust the
driver signature to allow returning an error code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Rename some other getenv()-related functions
Simon Glass [Thu, 3 Aug 2017 18:22:15 +0000 (12:22 -0600)] 
env: Rename some other getenv()-related functions

We are now using an env_ prefix for environment functions. Rename these
other functions as well, for consistency:

   getenv_vlan()
   getenv_bootm_size()
   getenv_bootm_low()
   getenv_bootm_mapsize()
   env_get_default()

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()
Simon Glass [Thu, 3 Aug 2017 18:22:14 +0000 (12:22 -0600)] 
env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()

Rename this function for consistency with env_get().

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
Simon Glass [Thu, 3 Aug 2017 18:22:13 +0000 (12:22 -0600)] 
env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()

We are now using an env_ prefix for environment functions. Rename these
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Rename getenv/_f() to env_get()
Simon Glass [Thu, 3 Aug 2017 18:22:12 +0000 (12:22 -0600)] 
env: Rename getenv/_f() to env_get()

We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()
Simon Glass [Thu, 3 Aug 2017 18:22:11 +0000 (12:22 -0600)] 
env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Rename common functions related to setenv()
Simon Glass [Thu, 3 Aug 2017 18:22:10 +0000 (12:22 -0600)] 
env: Rename common functions related to setenv()

We are now using an env_ prefix for environment functions. Rename these
commonly used functions, for consistency. Also add function comments in
common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Rename setenv() to env_set()
Simon Glass [Thu, 3 Aug 2017 18:22:09 +0000 (12:22 -0600)] 
env: Rename setenv() to env_set()

We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoimx: mx7: fix build warning when CONFIG_IMX_RDC not enabled
Peng Fan [Sat, 12 Aug 2017 14:10:57 +0000 (22:10 +0800)] 
imx: mx7: fix build warning when CONFIG_IMX_RDC not enabled

Fix build warning when CONFIG_IMX_RDC not defined in defconfig.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: mx6sl: simplify code using setbits_le32
Peng Fan [Tue, 8 Aug 2017 08:21:39 +0000 (16:21 +0800)] 
imx: mx6sl: simplify code using setbits_le32

Simplify code by removing set_preclk_from_osc with directly setbits_le32.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: mx6sx: select OSC as uart's clk parent
Peng Fan [Tue, 8 Aug 2017 08:21:38 +0000 (16:21 +0800)] 
imx: mx6sx: select OSC as uart's clk parent

As M4 is sourcing UART clk from OSC, to make UART work
when M4 is enabled, need to select OSC as clk parent,
24M OSC is enough for debug UART in uboot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: mx6: soc: fix mx6sll settings
Peng Fan [Tue, 8 Aug 2017 08:21:35 +0000 (16:21 +0800)] 
imx: mx6: soc: fix mx6sll settings

There is not LDO_SOC/PU/ARM/MMDC1 on i.MX6SLL, also no need to gate/ungate
all PFDs to make PFD working.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: mx6: select ARM_ERRATA_845369
Peng Fan [Tue, 8 Aug 2017 05:34:53 +0000 (13:34 +0800)] 
imx: mx6: select ARM_ERRATA_845369

Select ARM_ERRATA_845369 for i.MX6DQ/DL/QP.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoarm: Implement workaround for Cortex-A9 errata 845369
Peng Fan [Tue, 8 Aug 2017 05:34:52 +0000 (13:34 +0800)] 
arm: Implement workaround for Cortex-A9 errata 845369

Under very rare timing circumstances, transitioning into streaming
mode might create a data corruption. Present on Two or more processors
or 1 core with ACP, all revisions. This erratum can be worked round
by setting bit[22] of the undocumented Diagnostic Control Register to 1.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@konsulko.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoARM: i.MX6: exclude the ARM errata from i.MX6 UP system
Peng Fan [Tue, 8 Aug 2017 05:34:51 +0000 (13:34 +0800)] 
ARM: i.MX6: exclude the ARM errata from i.MX6 UP system

The ARM errata 751472, 794072, 761320 only applied
to the following configuration:

This erratum affects configurations with either:
- One processor if the ACP is present
- Two or more processors

i.MX6 family does not have the ACP and thus only the MPCore system
will be impacted, which are the i.MX6DQ, i.MX6DL, and i.MX6QP.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: imx6ull: correct get_cpu_speed_grade_hz
Sébastien Szymanski [Wed, 2 Aug 2017 15:05:27 +0000 (17:05 +0200)] 
imx: imx6ull: correct get_cpu_speed_grade_hz

i.MX6ULL has different speed grades than i.MX6UL.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
6 years agoimx: imx6ul: correct get_cpu_speed_grade_hz on 696MHz SoCs
Sébastien Szymanski [Wed, 2 Aug 2017 15:05:26 +0000 (17:05 +0200)] 
imx: imx6ul: correct get_cpu_speed_grade_hz on 696MHz SoCs

Return the correct value when the speed grade is 696MHz.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
6 years agomx6sabreauto: Fix IOMUXC_GPR6 and IOMUXC_GPR7 values
Breno Lima [Wed, 2 Aug 2017 17:08:41 +0000 (14:08 -0300)] 
mx6sabreauto: Fix IOMUXC_GPR6 and IOMUXC_GPR7 values

The IPU AXI QoS for the i.MX6QP and i.MX6DP processors have to be set as
commented in the code:
/* set IPU AXI-id1 Qos=0x1 AXI-id0/2/3 Qos=0x7 */

Set IOMUXC_GPR6 and IOMUXC_GPR7 to 0x77177717 instead of 0x007F007F.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
6 years agomx6sabresd: Fix IOMUXC_GPR6 and IOMUXC_GPR7 values
Breno Lima [Wed, 2 Aug 2017 17:03:49 +0000 (14:03 -0300)] 
mx6sabresd: Fix IOMUXC_GPR6 and IOMUXC_GPR7 values

The IPU AXI QoS for the i.MX6QP and i.MX6DP processors have to be set as
commented in the code:
/* set IPU AXI-id1 Qos=0x1 AXI-id0/2/3 Qos=0x7 */

Set IOMUXC_GPR6 and IOMUXC_GPR7 to 0x77177717 instead of 0x007F007F.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
6 years agoimx6: clock: correct comment for PLL_VIDEO
Anatolij Gustschin [Wed, 2 Aug 2017 14:05:12 +0000 (16:05 +0200)] 
imx6: clock: correct comment for PLL_VIDEO

This appear to be a copy-paste error, clean it up.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoimx6: use SION macro in SDn_CMD mux mode bitfield arguments
Anatolij Gustschin [Wed, 2 Aug 2017 13:56:11 +0000 (15:56 +0200)] 
imx6: use SION macro in SDn_CMD mux mode bitfield arguments

Select SION by appropriate macro instead of constant.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoenv: Drop saveenv() in favour of env_save()
Simon Glass [Thu, 3 Aug 2017 18:22:08 +0000 (12:22 -0600)] 
env: Drop saveenv() in favour of env_save()

Use the env_save() function directly now that there is only one
implementation of saveenv().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Drop env_relocate_spec() in favour of env_load()
Simon Glass [Thu, 3 Aug 2017 18:22:07 +0000 (12:22 -0600)] 
env: Drop env_relocate_spec() in favour of env_load()

This is a strange name for a function that loads the environment. There is
now only one implementation of this function, so use the new env_load()
function directly instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Drop env_get_char_spec()
Simon Glass [Thu, 3 Aug 2017 18:22:06 +0000 (12:22 -0600)] 
env: Drop env_get_char_spec()

We only have a single implementation of this function now and it is called
env_get_char(). Drop the old function and the weak version.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Drop env_init_new()
Simon Glass [Thu, 3 Aug 2017 18:22:05 +0000 (12:22 -0600)] 
env: Drop env_init_new()

Now that env_init() is only defined once we can drop the env_init_new()
name and just use env_init().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Drop unused env_ptr variables
Simon Glass [Thu, 3 Aug 2017 18:22:04 +0000 (12:22 -0600)] 
env: Drop unused env_ptr variables

This variable is declared as a global in most environment location
drivers. But it is not used outside the drivers and most of the
declarations are unnecessary.

Also some drivers call free() on env_ptr which seems wrong since it is
not in the heap.

Drop the variable where possible, and all calls to free().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Drop the env_name_spec global
Simon Glass [Thu, 3 Aug 2017 18:22:03 +0000 (12:22 -0600)] 
env: Drop the env_name_spec global

Add a name to the driver and use that instead of the global variable
declared by each driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Drop common init() functions
Simon Glass [Thu, 3 Aug 2017 18:22:02 +0000 (12:22 -0600)] 
env: Drop common init() functions

Most of the init() implementations just use the default environment.
Adjust env_init_new() to do this automatically, and drop the redundant
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Switch over to use environment location drivers
Simon Glass [Thu, 3 Aug 2017 18:22:01 +0000 (12:22 -0600)] 
env: Switch over to use environment location drivers

Move over to use a the master implementation of the location drivers, with
each method calling out to the appropriate driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Add a new implementation of environment access
Simon Glass [Thu, 3 Aug 2017 18:22:00 +0000 (12:22 -0600)] 
env: Add a new implementation of environment access

We plan to move to a environment access via drivers for each location
where the environment can be stored. Add an implementation for this. So
far it is not used, but will be pressed into service in a future patch.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Convert CONFIG_ENV_IS_IN... to a choice
Simon Glass [Thu, 3 Aug 2017 18:21:59 +0000 (12:21 -0600)] 
env: Convert CONFIG_ENV_IS_IN... to a choice

At present we support multiple environment drivers but there is not way to
select between them at run time. Also settings related to the position and
size of the environment area are global (i.e. apply to all locations).

Until these limitations are removed we cannot really support more than one
environment location. Adjust the location to be a choice so that only one
can be selected. By default the environment is 'nowhere', meaning that the
environment exists only in memory and cannot be saved.

Also expand the help for the 'nowhere' option and move it to the top since
it is the default.

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Move all of the imply logic to default X if Y so it works again]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Create a location driver for each location
Simon Glass [Thu, 3 Aug 2017 18:21:58 +0000 (12:21 -0600)] 
env: Create a location driver for each location

Set up a location driver for each supported environment location. At
present this just points to the global functions and is not used. A
later patch will switch this over to use private functions in each driver.

There are several special cases here in various drivers to handle
peculiarities of certain boards:

1. Some boards define CONFIG_ENV_IS_IN_FAT and CONFIG_SPL_ENV_SUPPORT but
do not actually load the environment in SPL. The env load code was
optimised out before but with the driver, it is not. Therefore a special
case is added to env/fat.c. The correct fix (depending on board testing
might be to disable CONFIG_SPL_ENV_SUPPORT.

2. A similar situations happens with CONFIG_ENV_IS_IN_FLASH. Some boards
do not actually load the environment in SPL, so to reduce code size we
need to drop that code. A similar fix may be possible with these boards,
or it may be possible to adjust the environment CONFIG settings.

Added to the above is that the CONFIG_SPL_ENV_SUPPORT option does not
apply when the environment is in flash.

Obviously the above has been discovered through painful and time-consuming
trial and error. Hopefully board maintainers can take a look and figure
out what is actually needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: Rename nand env_location to nand_env_location
Simon Glass [Thu, 3 Aug 2017 18:21:57 +0000 (12:21 -0600)] 
env: Rename nand env_location to nand_env_location

We want to use this name for all environment drivers. Update the nand
driver to use a more specific name.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Add an enum for environment state
Simon Glass [Thu, 3 Aug 2017 18:21:56 +0000 (12:21 -0600)] 
env: Add an enum for environment state

At present we have three states for the environment, numbered 0, 1 and 2.
Add an enum to record this to avoid open-coded values.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: common: Drop env_get_char_memory()
Simon Glass [Thu, 3 Aug 2017 18:21:55 +0000 (12:21 -0600)] 
env: common: Drop env_get_char_memory()

This function is the same as env_get_char_spec() apart from dropping the
brackets. Drop the brackets from env_get_char_spec() and use that instead
of env_get_char_memory().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: common: Drop env_get_char_init()
Simon Glass [Thu, 3 Aug 2017 18:21:54 +0000 (12:21 -0600)] 
env: common: Drop env_get_char_init()

This function does nothing but call env_get_char_spec(). Drop it and
adjust its only caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: common: Factor out the common env_valid check
Simon Glass [Thu, 3 Aug 2017 18:21:53 +0000 (12:21 -0600)] 
env: common: Factor out the common env_valid check

The check for gd->env_valid is used in both the 'if' and 'else' part of
env_get_char(). Move it into that function instead for simplicity. Drop
that code from the two leaf functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: common: Drop env_get_addr()
Simon Glass [Thu, 3 Aug 2017 18:21:52 +0000 (12:21 -0600)] 
env: common: Drop env_get_addr()

This function is not used anywhere other than env_get_char(). Move the
code into that function.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoenv: common: Make env_get_addr/get_char_memory() static
Simon Glass [Thu, 3 Aug 2017 18:21:51 +0000 (12:21 -0600)] 
env: common: Make env_get_addr/get_char_memory() static

These functions are not used outside this file. Make them static and order
them to avoid forward declarations.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoenv: Use tabs in ENV_IS_IN_FAT
Simon Glass [Thu, 3 Aug 2017 18:21:50 +0000 (12:21 -0600)] 
env: Use tabs in ENV_IS_IN_FAT

Tidy up the formatting of this option.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoMove environment files from common/ to env/
Simon Glass [Thu, 3 Aug 2017 18:21:49 +0000 (12:21 -0600)] 
Move environment files from common/ to env/

About a quarter of the files in common/ relate to the environment. It
seems better to put these into their own subdirectory and remove the
prefix.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoMakefile: Rename 'env' target to 'environ'
Simon Glass [Thu, 3 Aug 2017 18:21:48 +0000 (12:21 -0600)] 
Makefile: Rename 'env' target to 'environ'

This target stops us using 'env' as a subdirectory. It is not mentioned in
the help so seems to be an internal target. Rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoPrepare v2017.09-rc2
Tom Rini [Tue, 15 Aug 2017 00:02:11 +0000 (20:02 -0400)] 
Prepare v2017.09-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 14 Aug 2017 23:58:53 +0000 (19:58 -0400)] 
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-net
Tom Rini [Mon, 14 Aug 2017 21:06:58 +0000 (17:06 -0400)] 
Merge git://git.denx.de/u-boot-net

6 years agocommon: Move CONFIG_BOOTARGS to Kconfig
Sam Protsenko [Mon, 14 Aug 2017 17:22:17 +0000 (20:22 +0300)] 
common: Move CONFIG_BOOTARGS to Kconfig

Also introduce CONFIG_USE_BOOTARGS option so we can control if
CONFIG_BOOTARGS defined at all.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
[trini: Resync r8a779[56]_ulcb, various ls10xx targets]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agodriver: net: ldpaa: Update priv->phydev after free()
Prabhakar Kushwaha [Wed, 15 Feb 2017 15:26:03 +0000 (20:56 +0530)] 
driver: net: ldpaa: Update priv->phydev after free()

Even after memory free of phydev, priv is still pointing to the
obsolete address.
So update priv->phydev as NULL after memory free.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agousb: net: Add support for Microchip LAN75xx and LAN78xx
Yuiko Oshino [Fri, 11 Aug 2017 16:44:58 +0000 (12:44 -0400)] 
usb: net: Add support for Microchip LAN75xx and LAN78xx

Add support for Microchip LAN7500, LAN7800 and LAN7850,
USB to 10/100/1000 Ethernet Controllers.

Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: Add mii_resolve_flowctrl_fdx()
Yuiko Oshino [Fri, 11 Aug 2017 16:44:57 +0000 (12:44 -0400)] 
net: Add mii_resolve_flowctrl_fdx()

Add an mii helper function to resolve flow control status per
IEEE 802.3-2005 table 28B-3.
This function was taken from the Linux source tree.

Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: fman: add support RGMII_TXID to memac
Madalin Bucur [Fri, 4 Aug 2017 06:14:53 +0000 (09:14 +0300)] 
net: fman: add support RGMII_TXID to memac

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoARM: rockchip: rock: Correct test to use CONFIG_IS_ENABLED not defined
Tom Rini [Mon, 14 Aug 2017 17:21:44 +0000 (13:21 -0400)] 
ARM: rockchip: rock: Correct test to use CONFIG_IS_ENABLED not defined

While it is likely that this entire case is superfluous and can be
removed, correct the test now to match what is in rockchip-common.h and
makes sense based on context of the code.  Otherwise we get a large
number of warnings.

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-rockchip
Tom Rini [Mon, 14 Aug 2017 14:40:01 +0000 (10:40 -0400)] 
Merge branch 'master' of git://git.denx.de/u-boot-rockchip

6 years agostm32f1: remove stm32f1 support
Patrice Chotard [Wed, 9 Aug 2017 13:13:02 +0000 (15:13 +0200)] 
stm32f1: remove stm32f1 support

A few years ago STM32F1 SoCs support has been added :
0144caf22ce6acd5c  gpio: stm32: add stm32f1 support
2d18ef2364fd3561a  ARMv7M: add STM32F1 support

But neither STM32F1 dedicated defconfig nor board was
associated to these commits.

Got confirmation from Tom Rini and Matt Porter to remove
all this code [1]

[1] http://u-boot.10912.n7.nabble.com/Remove-STM32F1-support-td301603.html

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agocmd/bdinfo: correct comment in board_detail
Chris Packham [Mon, 7 Aug 2017 04:04:14 +0000 (16:04 +1200)] 
cmd/bdinfo: correct comment in board_detail

This appears to be a simple typo that dates back to the original
implementation of board_detail in commit e79394643b26 ("common: Update
cmd_bdinfo for PPC").

Signed-off-by: Chris Packham <judge.packham@gmail.com>
6 years agotest: Move the FIT test into the correct place
Simon Glass [Sat, 5 Aug 2017 16:28:41 +0000 (10:28 -0600)] 
test: Move the FIT test into the correct place

Move this test so that it will run when 'make tests' is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agotest: Convert the FIT test to test/py
Simon Glass [Sat, 5 Aug 2017 16:28:40 +0000 (10:28 -0600)] 
test: Convert the FIT test to test/py

Convert this test to use the pytest framework.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agotest: Indent test-fit.py to match the next patch
Simon Glass [Sat, 5 Aug 2017 16:28:39 +0000 (10:28 -0600)] 
test: Indent test-fit.py to match the next patch

We plan to rewrite this script to use the pytest framework. To make it
easier to review the changes, indent the code to match the next patch.
This gets all of the whitespace changes out of the way.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoARM: OMAP5: Enable support for AVS0 for OMAP5 production devices
Nishanth Menon [Sat, 5 Aug 2017 02:42:09 +0000 (21:42 -0500)] 
ARM: OMAP5: Enable support for AVS0 for OMAP5 production devices

OMAP5432 did go into production with AVS class0 registers which were
mutually exclusive from AVS Class 1.5 registers.

Most OMAP5-uEVM boards use the pre-production Class1.5 which has
production efuse registers set to 0. However on production devices,
these are set to valid data.

scale_vcore logic is already smart enough to detect this and use the
"Nominal voltage" on devices that do not have efuse registers populated.

On a test production device populated as follows:
MPU OPP_NOM:
=> md.l 0x04A0021C4 1
4a0021c403a003e9                               ....
(0x3e9 = 1.01v) vs nom voltage of 1.06v
MPU OPP_HIGH:
=> md.l 0x04A0021C8 1
4a0021c803400485                               ..@.

MM OPP_NOM:
=> md.l 0x04A0021A4 1
4a0021a4038003d4                               ....
(0x3d4 = 980mV) vs nom voltage of 1.025v
MM OPP_OD:
=> md.l 0x04A0021A8 1
4a0021a803600403                               ..`.

CORE OPP_NOM:
=> md.l 0x04A0021D8 1
4a0021d8000003cf                               ....
(0x3cf = 975mV) vs nom voltage of 1.040v

Since the efuse values are'nt currently used, we do not regress on
existing pre-production samples (they continue to use nominal voltage).

But on boards that do have production samples populated, we can leverage
the optimal voltages necessary for proper operation.

Tested on:
a) 720-2644-001 OMAP5UEVM with production sample.
b) 750-2628-222(A) UEVM5432G-02 with pre-production sample.

Data based on OMAP5432 Technical reference Manual SWPU282AF (May
2012-Revised Aug 2016)

NOTE: All collaterals on OMAP5432 silicon itself seems to have been
removed from ti.com, though EVM details are still available:
http://www.ti.com/tool/OMAP5432-EVM

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoARM: OMAP5: Remove OPP_LOW Definitions for ES2.0
Nishanth Menon [Sat, 5 Aug 2017 02:42:08 +0000 (21:42 -0500)] 
ARM: OMAP5: Remove OPP_LOW Definitions for ES2.0

ES2.0 descopes OPP_LOW definition. So remove it from macros defined.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agotest: Fix FIT test to pass again
Simon Glass [Fri, 4 Aug 2017 22:20:16 +0000 (16:20 -0600)] 
test: Fix FIT test to pass again

A recent change adjusted a test string so that the test no-longer passes.
Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Heiko Schocher <hs@denx.de>
Fixes: b28c5fcc (test-fit.py: Minor grammar/spelling/clarification tweaks)
6 years agowdt: Update uclass to make clear that the timeout is in ms
Andy Shevchenko [Fri, 4 Aug 2017 21:48:28 +0000 (15:48 -0600)] 
wdt: Update uclass to make clear that the timeout is in ms

Convert name to show explicitly that we are using milliseconds. For a
watchdog timer this is precise enough.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agoboot_fit: Change return value from FDT_ERROR to -EINVAL in fdt_offset()
Nobuhiro Iwamatsu [Fri, 4 Aug 2017 20:47:02 +0000 (05:47 +0900)] 
boot_fit: Change return value from FDT_ERROR to -EINVAL in fdt_offset()

FDT_ERROR is defined as unsigned long. However, since the return value of
fdt_offset() is int, a warning will occur when compiling. Also, it is better
to use -EINVAL than FDT_ERROR.
This fixes this problem by change return value from FDT_ERROR to -EINVAL.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Franklin S Cooper Jr <fcooper@ti.com>
6 years agox86: qemu: Enable NVMe driver
Bin Meng [Thu, 3 Aug 2017 09:31:03 +0000 (02:31 -0700)] 
x86: qemu: Enable NVMe driver

QEMU supports NVMe emulation. Enable the NVMe driver on QEMU x86.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agonvme: Handle zero Maximum Data Transfer Size (MDTS)
Bin Meng [Thu, 3 Aug 2017 09:31:02 +0000 (02:31 -0700)] 
nvme: Handle zero Maximum Data Transfer Size (MDTS)

Maximum Data Transfer Size (MDTS) field indicates the maximum
data transfer size between the host and the controller. The
host should not submit a command that exceeds this transfer
size. The value is in units of the minimum memory page size
and is reported as a power of two (2^n).

The spec also says: a value of 0h indicates no restrictions
on transfer size. On the real NVMe card this is normally not
0 due to hardware restrictions, but with QEMU emulated NVMe
device it reports as 0. In nvme_blk_read/write() below we
have the following algorithm for maximum number of logic
blocks per transfer:

u16 lbas = 1 << (dev->max_transfer_shift - ns->lba_shift);

dev->max_transfer_shift being 0 will for sure cause lbas to
overflow. Let's use 20. With this fix, the NVMe driver works
on QEMU emulated NVMe device.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agonvme: Fix number of blocks detection
Jon Nettleton [Thu, 3 Aug 2017 09:31:01 +0000 (02:31 -0700)] 
nvme: Fix number of blocks detection

NVMe should use the nsze value from the queried device. This will
reflect the total number of blocks of the device and fix detecting
my Samsung 960 EVO 256GB.

Original:
Capacity: 40386.6 MB = 39.4 GB (82711872 x 512)

Fixed:
Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)

Signed-off-by: Jon Nettleton <jon@solid-run.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agonvme: Detect devices that are class Storage Express
Jon Nettleton [Thu, 3 Aug 2017 09:31:00 +0000 (02:31 -0700)] 
nvme: Detect devices that are class Storage Express

This adds support to detect the catchall PCI class for NVMe devices.
It allows the drivers to work with most NVMe devices that don't need
specific detection due to quirks etc.

Tested against a Samsung 960 EVO drive.

Signed-off-by: Jon Nettleton <jon@solid-run.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agonvme: Add nvme commands
Zhikang Zhang [Thu, 3 Aug 2017 09:30:59 +0000 (02:30 -0700)] 
nvme: Add nvme commands

Add nvme commands in U-Boot command line.

1. "nvme scan" - scan NVMe blk devices
2. "nvme list" - show all available NVMe blk devices
3. "nvme info" - show current or a specific NVMe blk device
4. "nvme device" - show or set current device
5. "nvme part" - print partition table
6. "nvme read" - read data from NVMe blk device
7. "nvme write" - write data to NVMe blk device

Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agonvme: Add show routine to print detailed information
Zhikang Zhang [Thu, 3 Aug 2017 09:30:58 +0000 (02:30 -0700)] 
nvme: Add show routine to print detailed information

This adds nvme_print_info() to show detailed NVMe controller and
namespace information.

Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agonvme: Add NVM Express driver support
Zhikang Zhang [Thu, 3 Aug 2017 09:30:57 +0000 (02:30 -0700)] 
nvme: Add NVM Express driver support

NVM Express (NVMe) is a register level interface that allows host
software to communicate with a non-volatile memory subsystem. This
interface is optimized for enterprise and client solid state drives,
typically attached to the PCI express interface.

This adds a U-Boot driver support of devices that follow the NVMe
standard [1] and supports basic read/write operations.

Tested with a 400GB Intel SSD 750 series NVMe card with controller
id 8086:0953.

[1] http://www.nvmexpress.org/resources/specifications/

Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agodm: blk: part: Add UCLASS_NVME and IF_TYPE_NVME
Zhikang Zhang [Thu, 3 Aug 2017 09:30:56 +0000 (02:30 -0700)] 
dm: blk: part: Add UCLASS_NVME and IF_TYPE_NVME

This adds a new uclass id and block interface type for NVMe.

Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jon Nettleton <jon@solid-run.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoarm: mvebu: ddr3_debug: remove self assignments
xypron.glpk@gmx.de [Sun, 30 Jul 2017 19:54:56 +0000 (21:54 +0200)] 
arm: mvebu: ddr3_debug: remove self assignments

Remove superfluous self assignements.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
6 years agoarm: mvebu: remove self assignment
xypron.glpk@gmx.de [Sun, 30 Jul 2017 19:51:05 +0000 (21:51 +0200)] 
arm: mvebu: remove self assignment

Assigning dev_num to itself is superfluous.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
6 years agotpm: add missing va_end
xypron.glpk@gmx.de [Sun, 30 Jul 2017 19:40:37 +0000 (21:40 +0200)] 
tpm: add missing va_end

va_start must always be matched by va_end.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: hisilicon: hikey: do not rely on random stack value
xypron.glpk@gmx.de [Sun, 30 Jul 2017 19:30:55 +0000 (21:30 +0200)] 
ARM: hisilicon: hikey: do not rely on random stack value

If CONFIG_MMC_DW is not defined the return value of
init_dwmmc should not rely on a random stack value.

Instead indicate that no error occured.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agostm32: remove redundant 'else if'
xypron.glpk@gmx.de [Sun, 30 Jul 2017 18:46:05 +0000 (20:46 +0200)] 
stm32: remove redundant 'else if'

The if in the else branch is superfluous.
We can use a simple if.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm: mvebu: avoid possible NULL dereference
xypron.glpk@gmx.de [Sun, 30 Jul 2017 18:40:43 +0000 (20:40 +0200)] 
arm: mvebu: avoid possible NULL dereference

It does not make sense to check if info is NULL after
dereferencing it.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
6 years agoarmv7m: mpu_config add missing break
xypron.glpk@gmx.de [Sun, 30 Jul 2017 18:34:20 +0000 (20:34 +0200)] 
armv7m: mpu_config add missing break

For DEVICE_NON_SHARED the newly assigned value of attr
is overwritten due to a missing break.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agobcm281xx: clock: avoid possible NULL dereference
xypron.glpk@gmx.de [Sun, 30 Jul 2017 18:27:16 +0000 (20:27 +0200)] 
bcm281xx: clock: avoid possible NULL dereference

It does not make sense first to dereference c and then
to check if it is NULL.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm: bcm235xx: clk_set_rate avoid possible NULL deref
xypron.glpk@gmx.de [Sun, 30 Jul 2017 18:22:47 +0000 (20:22 +0200)] 
arm: bcm235xx: clk_set_rate avoid possible NULL deref

It does not make sense first to dereference c and then
to check if it is NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm: bcm235xx: avoid possible NULL dereference
xypron.glpk@gmx.de [Sun, 30 Jul 2017 18:15:51 +0000 (20:15 +0200)] 
arm: bcm235xx: avoid possible NULL dereference

It does not make sense to first dereference c and then
check if it is NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm: spear: do not return random value from stack
xypron.glpk@gmx.de [Sun, 30 Jul 2017 18:09:38 +0000 (20:09 +0200)] 
arm: spear: do not return random value from stack

If the NOR device is not available do not return
a random value from the stack.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoapi: remove superfluous assignment
xypron.glpk@gmx.de [Sun, 30 Jul 2017 17:54:37 +0000 (19:54 +0200)] 
api: remove superfluous assignment

No need to assign a value to sig if the next statement using sig
is itself an assignment of a value to sig.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoConvert CONFIG_OMAP3_SPI to Kconfig
Adam Ford [Thu, 27 Jul 2017 03:25:30 +0000 (22:25 -0500)] 
Convert CONFIG_OMAP3_SPI to Kconfig

This converts the following to Kconfig:
   CONFIG_OMAP3_SPI

Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Minor comment tweaks]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agorockchip: clk: remove RATE_TO_DIV
Kever Yang [Thu, 27 Jul 2017 04:54:02 +0000 (12:54 +0800)] 
rockchip: clk: remove RATE_TO_DIV

Use DIV_ROUND_UP instead RATE_TO_DIV for all Rockchip SoC
clock driver.
Add or fix the div-field overflow check at the same time.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: update dwmmc clock div
Kever Yang [Thu, 27 Jul 2017 04:54:01 +0000 (12:54 +0800)] 
rockchip: clk: update dwmmc clock div

dwmmc controller has default internal divider by 2,
and we always provide double of the clock rate request by
dwmmc controller. Sync code for all Rockchip SoC with:
4055b46 rockchip: clk: rk3288: fix mmc clock setting

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[fixup for 'missing DIV_ROUND_UP' conflict for clk_rk3288.c:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk322x: update max-frequency for mmc node
Kever Yang [Thu, 27 Jul 2017 04:54:00 +0000 (12:54 +0800)] 
rockchip: rk322x: update max-frequency for mmc node

mmc using 150000000 as max-frequency like what rk3288 sets.
This can speed up the mmc read/write, the actual mmc clock is:
Before this patch: 37.125M
After this patch: 49.5M

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: dts: rk322x: add sdmmc device node
Kever Yang [Fri, 21 Jul 2017 10:21:09 +0000 (18:21 +0800)] 
rockchip: dts: rk322x: add sdmmc device node

add node for sdmmc in dts and rk3229-evb.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoscripts: setlocalversion: safely extract variables from auto.conf using awk
Philipp Tomsich [Tue, 8 Aug 2017 13:26:12 +0000 (15:26 +0200)] 
scripts: setlocalversion: safely extract variables from auto.conf using awk

Moving SPL_LDSCRIPT to Kconfig triggered an unfortunate attempt of
command substitution, as the sourced auto.conf may include $(ARCH)
which tries to execute a command 'ARCH'.
This showed up as a warning similar to the following:
  include/config/auto.conf: line 209: ARCH: command not found

This change does no longer attempt to source auto.conf, but rather
passes it through awk to retrieve the values for CONFIG_LOCALVERSION
and CONFIG_LOCALVERSION_AUTO.  This will also mitigate the risk of
unintended command substitution.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reported-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
6 years agorockchip: rk322x: set the DDR region as non-secure in SPL
Kever Yang [Thu, 27 Jul 2017 04:53:59 +0000 (12:53 +0800)] 
rockchip: rk322x: set the DDR region as non-secure in SPL

Disable the ddr secure region setting in SPL and the ddr memory
becomes non-secure, every one can access it. the trust firmware
like OPTEE should have the correct setting for it after SPL if
there is one.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3288: fix EMMC_DIV_MASK definition in header
Kever Yang [Mon, 31 Jul 2017 01:28:14 +0000 (09:28 +0800)] 
rockchip: rk3288: fix EMMC_DIV_MASK definition in header

It should be '<<' instead of '<' for _MASK definition, fix it.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agorockchip: rk3368: spl: move SPL_LDSCRIPT to Kconfig
Philipp Tomsich [Fri, 4 Aug 2017 12:12:26 +0000 (14:12 +0200)] 
rockchip: rk3368: spl: move SPL_LDSCRIPT to Kconfig

With the new way of doing things (i.e. the hierarchical selection of
SPL_LDSCRIPT via Kconfig) in place, this moves the SPL_LDSCRIPT setting
for the RK3368 from defconfig back into Kconfig.

With this done, there should be no lingering cases of SPL_LDSCRIPT
outside of Kconfig files.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agospl: moveconfig: remove SPL_LDSCRIPT definitions for header-files
Philipp Tomsich [Fri, 4 Aug 2017 12:01:32 +0000 (14:01 +0200)] 
spl: moveconfig: remove SPL_LDSCRIPT definitions for header-files

With the hierarchical defaults set up, we remove these from the header
files.  To do so, I've run moveconfig on SPL_LDSCRIPT and this commits
the changes.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agospl: add hierarchical defaults for SPL_LDSCRIPT
Philipp Tomsich [Thu, 3 Aug 2017 21:23:55 +0000 (23:23 +0200)] 
spl: add hierarchical defaults for SPL_LDSCRIPT

With SPL_LDSCRIPT moved to Kconfig (and this being a 'string' config
node), all the lingering definitions in header files will cause
warnings/errors due to the redefinition of the configuration item.

As we don't want to pollute the defconfig files (and values should
usually be identical for entire architectures), the defaults are moved
into Kconfig.  Kconfig will always pick the first default that
matches, so please keep these values at the end of each file (to allow
any board-specific Kconfig, which will be included earlier) to
override with an unconditional default setting.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agorockchip: rk3188: rock: adjust for SPL/TPL split
Philipp Tomsich [Thu, 3 Aug 2017 20:52:04 +0000 (22:52 +0200)] 
rockchip: rk3188: rock: adjust for SPL/TPL split

With the changes to split SPL/TPL for the RK3368, I apparently missed
some needed adjustments to the RK3188 Kconfig and rock_defconfig.

This fixes build-issues for the rock board after applying the RK3368
enablement (and SPL/TPL) set that resulted from TPL_SERIAL_SUPPORT,
TPL_ROCKCHIP_BACK_TO_BROM and TPL_TINY_MEMSET being separate symbols
now.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agorockchip: remove the hard coded uart iomux setting for px5 evb
Andy Yan [Wed, 2 Aug 2017 13:10:56 +0000 (21:10 +0800)] 
rockchip: remove the hard coded uart iomux setting for px5 evb

As the debug uart is marked as dm-pre-reloc, the pinctrl driver
will handle the correct iomux setting.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agorockchip: set Pre-reloc malloc pool size to 4kb for rk3368 based boards
Andy Yan [Wed, 2 Aug 2017 13:10:13 +0000 (21:10 +0800)] 
rockchip: set Pre-reloc malloc pool size to 4kb for rk3368 based boards

The default 1kb pre-reloc malloc pool is not enough for dm
core to enable the dm-pre-reloc device drivers.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>