]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge git://git.denx.de/u-boot-arm
authorStefano Babic <sbabic@denx.de>
Wed, 31 Jul 2013 09:30:38 +0000 (11:30 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 31 Jul 2013 09:30:38 +0000 (11:30 +0200)
Conflicts:
board/freescale/mx6qsabrelite/Makefile
board/freescale/mx6qsabrelite/mx6qsabrelite.c
include/configs/mx6qsabrelite.h

Signed-off-by: Stefano Babic <sbabic@denx.de>
22 files changed:
1  2 
README
arch/arm/cpu/armv7/mx6/clock.c
arch/arm/cpu/armv7/mx6/soc.c
arch/arm/imx-common/cmd_hdmidet.c
arch/arm/include/asm/arch-mx6/clock.h
arch/arm/include/asm/arch-mx6/mxc_hdmi.h
board/boundary/nitrogen6x/nitrogen6x.c
board/freescale/mx6sabresd/mx6sabresd.c
board/wandboard/wandboard.c
boards.cfg
drivers/gpio/mxc_gpio.c
drivers/video/mxc_ipuv3_fb.c
include/configs/apx4devkit.h
include/configs/m28evk.h
include/configs/mx23_olinuxino.h
include/configs/mx23evk.h
include/configs/mx28evk.h
include/configs/mx6sabre_common.h
include/configs/mx6sabresd.h
include/configs/nitrogen6x.h
include/configs/sc_sps_1.h
include/configs/wandboard.h

diff --combined README
index 657faaa0d999538c0f81800dac0238ac53358a03,a5c3e8dcf7f349badd7295f261ea3dcf7a51c748..78aa5a518031e47c917b85ca3ebb65cc9325d823
--- 1/README
--- 2/README
+++ b/README
@@@ -1,24 -1,8 +1,8 @@@
  #
- # (C) Copyright 2000 - 2012
+ # (C) Copyright 2000 - 2013
  # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  #
- # See file CREDITS for list of people who contributed to this
- # project.
- #
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU General Public License as
- # published by the Free Software Foundation; either version 2 of
- # the License, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- # MA 02111-1307 USA
+ # SPDX-License-Identifier:    GPL-2.0+
  #
  
  Summary:
@@@ -1944,11 -1928,114 +1928,114 @@@ CBFS (Coreboot Filesystem) suppor
                on those systems that support this (optional)
                feature, like the TQM8xxL modules.
  
- - I2C Support:        CONFIG_HARD_I2C | CONFIG_SOFT_I2C
-               These enable I2C serial bus commands. Defining either of
-               (but not both of) CONFIG_HARD_I2C or CONFIG_SOFT_I2C will
-               include the appropriate I2C driver for the selected CPU.
+ - I2C Support:        CONFIG_SYS_I2C
+               This enable the NEW i2c subsystem, and will allow you to use
+               i2c commands at the u-boot command line (as long as you set
+               CONFIG_CMD_I2C in CONFIG_COMMANDS) and communicate with i2c
+               based realtime clock chips or other i2c devices. See
+               common/cmd_i2c.c for a description of the command line
+               interface.
+               ported i2c driver to the new framework:
+               - drivers/i2c/soft_i2c.c:
+                 - activate first bus with CONFIG_SYS_I2C_SOFT define
+                   CONFIG_SYS_I2C_SOFT_SPEED and CONFIG_SYS_I2C_SOFT_SLAVE
+                   for defining speed and slave address
+                 - activate second bus with I2C_SOFT_DECLARATIONS2 define
+                   CONFIG_SYS_I2C_SOFT_SPEED_2 and CONFIG_SYS_I2C_SOFT_SLAVE_2
+                   for defining speed and slave address
+                 - activate third bus with I2C_SOFT_DECLARATIONS3 define
+                   CONFIG_SYS_I2C_SOFT_SPEED_3 and CONFIG_SYS_I2C_SOFT_SLAVE_3
+                   for defining speed and slave address
+                 - activate fourth bus with I2C_SOFT_DECLARATIONS4 define
+                   CONFIG_SYS_I2C_SOFT_SPEED_4 and CONFIG_SYS_I2C_SOFT_SLAVE_4
+                   for defining speed and slave address
+               - drivers/i2c/fsl_i2c.c:
+                 - activate i2c driver with CONFIG_SYS_I2C_FSL
+                   define CONFIG_SYS_FSL_I2C_OFFSET for setting the register
+                   offset CONFIG_SYS_FSL_I2C_SPEED for the i2c speed and
+                   CONFIG_SYS_FSL_I2C_SLAVE for the slave addr of the first
+                   bus.
+                   - If your board supports a second fsl i2c bus, define
+                   CONFIG_SYS_FSL_I2C2_OFFSET for the register offset
+                   CONFIG_SYS_FSL_I2C2_SPEED for the speed and
+                   CONFIG_SYS_FSL_I2C2_SLAVE for the slave address of the
+                   second bus.
+               - drivers/i2c/tegra_i2c.c:
+                - activate this driver with CONFIG_SYS_I2C_TEGRA
+                - This driver adds 4 i2c buses with a fix speed from
+                  100000 and the slave addr 0!
+               - drivers/i2c/ppc4xx_i2c.c
+                 - activate this driver with CONFIG_SYS_I2C_PPC4XX
+                 - CONFIG_SYS_I2C_PPC4XX_CH0 activate hardware channel 0
+                 - CONFIG_SYS_I2C_PPC4XX_CH1 activate hardware channel 1
+               additional defines:
+               CONFIG_SYS_NUM_I2C_BUSES
+               Hold the number of i2c busses you want to use. If you
+               don't use/have i2c muxes on your i2c bus, this
+               is equal to CONFIG_SYS_NUM_I2C_ADAPTERS, and you can
+               omit this define.
+               CONFIG_SYS_I2C_DIRECT_BUS
+               define this, if you don't use i2c muxes on your hardware.
+               if CONFIG_SYS_I2C_MAX_HOPS is not defined or == 0 you can
+               omit this define.
+               CONFIG_SYS_I2C_MAX_HOPS
+               define how many muxes are maximal consecutively connected
+               on one i2c bus. If you not use i2c muxes, omit this
+               define.
+               CONFIG_SYS_I2C_BUSES
+               hold a list of busses you want to use, only used if
+               CONFIG_SYS_I2C_DIRECT_BUS is not defined, for example
+               a board with CONFIG_SYS_I2C_MAX_HOPS = 1 and
+               CONFIG_SYS_NUM_I2C_BUSES = 9:
+                CONFIG_SYS_I2C_BUSES   {{0, {I2C_NULL_HOP}}, \
+                                       {0, {{I2C_MUX_PCA9547, 0x70, 1}}}, \
+                                       {0, {{I2C_MUX_PCA9547, 0x70, 2}}}, \
+                                       {0, {{I2C_MUX_PCA9547, 0x70, 3}}}, \
+                                       {0, {{I2C_MUX_PCA9547, 0x70, 4}}}, \
+                                       {0, {{I2C_MUX_PCA9547, 0x70, 5}}}, \
+                                       {1, {I2C_NULL_HOP}}, \
+                                       {1, {{I2C_MUX_PCA9544, 0x72, 1}}}, \
+                                       {1, {{I2C_MUX_PCA9544, 0x72, 2}}}, \
+                                       }
+               which defines
+                       bus 0 on adapter 0 without a mux
+                       bus 1 on adapter 0 with a PCA9547 on address 0x70 port 1
+                       bus 2 on adapter 0 with a PCA9547 on address 0x70 port 2
+                       bus 3 on adapter 0 with a PCA9547 on address 0x70 port 3
+                       bus 4 on adapter 0 with a PCA9547 on address 0x70 port 4
+                       bus 5 on adapter 0 with a PCA9547 on address 0x70 port 5
+                       bus 6 on adapter 1 without a mux
+                       bus 7 on adapter 1 with a PCA9544 on address 0x72 port 1
+                       bus 8 on adapter 1 with a PCA9544 on address 0x72 port 2
+               If you do not have i2c muxes on your board, omit this define.
+ - Legacy I2C Support: CONFIG_HARD_I2C
+               NOTE: It is intended to move drivers to CONFIG_SYS_I2C which
+               provides the following compelling advantages:
+               - more than one i2c adapter is usable
+               - approved multibus support
+               - better i2c mux support
+               ** Please consider updating your I2C driver now. **
+               These enable legacy I2C serial bus commands. Defining
+               CONFIG_HARD_I2C will include the appropriate I2C driver
+               for the selected CPU.
  
                This will allow you to use i2c commands at the u-boot
                command line (as long as you set CONFIG_CMD_I2C in
  
                CONFIG_HARD_I2C selects a hardware I2C controller.
  
-               CONFIG_SOFT_I2C configures u-boot to use a software (aka
-               bit-banging) driver instead of CPM or similar hardware
-               support for I2C.
                There are several other quantities that must also be
-               defined when you define CONFIG_HARD_I2C or CONFIG_SOFT_I2C.
+               defined when you define CONFIG_HARD_I2C.
  
                In both cases you will need to define CONFIG_SYS_I2C_SPEED
                to be the frequency (in Hz) at which you wish your i2c bus
  
                That's all that's required for CONFIG_HARD_I2C.
  
-               If you use the software i2c interface (CONFIG_SOFT_I2C)
+               If you use the software i2c interface (CONFIG_SYS_I2C_SOFT)
                then the following macros need to be defined (examples are
                from include/configs/lwmon.h):
  
                If not defined, then U-Boot uses predefined value for
                specified DTT device.
  
-               CONFIG_FSL_I2C
-               Define this option if you want to use Freescale's I2C driver in
-               drivers/i2c/fsl_i2c.c.
-               CONFIG_I2C_MUX
-               Define this option if you have I2C devices reached over 1 .. n
-               I2C Muxes like the pca9544a. This option addes a new I2C
-               Command "i2c bus [muxtype:muxaddr:muxchannel]" which adds a
-               new I2C Bus to the existing I2C Busses. If you select the
-               new Bus with "i2c dev", u-bbot sends first the commandos for
-               the muxes to activate this new "bus".
-               CONFIG_I2C_MULTI_BUS must be also defined, to use this
-               feature!
-               Example:
-               Adding a new I2C Bus reached over 2 pca9544a muxes
-                       The First mux with address 70 and channel 6
-                       The Second mux with address 71 and channel 4
-               => i2c bus pca9544a:70:6:pca9544a:71:4
-               Use the "i2c bus" command without parameter, to get a list
-               of I2C Busses with muxes:
-               => i2c bus
-               Busses reached over muxes:
-               Bus ID: 2
-                 reached over Mux(es):
-                   pca9544a@70 ch: 4
-               Bus ID: 3
-                 reached over Mux(es):
-                   pca9544a@70 ch: 6
-                   pca9544a@71 ch: 4
-               =>
-               If you now switch to the new I2C Bus 3 with "i2c dev 3"
-               u-boot first sends the command to the mux@70 to enable
-               channel 6, and then the command to the mux@71 to enable
-               the channel 4.
-               After that, you can use the "normal" i2c commands as
-               usual to communicate with your I2C devices behind
-               the 2 muxes.
-               This option is actually implemented for the bitbanging
-               algorithm in common/soft_i2c.c and for the Hardware I2C
-               Bus on the MPC8260. But it should be not so difficult
-               to add this option to other architectures.
                CONFIG_SOFT_I2C_READ_REPEATED_START
  
                defining this will force the i2c_read() function in
                Note: There is also a sha1sum command, which should perhaps
                be deprecated in favour of 'hash sha1'.
  
 +- Freescale i.MX specific commands:
 +              CONFIG_CMD_HDMIDETECT
 +              This enables 'hdmidet' command which returns true if an
 +              HDMI monitor is detected.  This command is i.MX 6 specific.
 +
 +              CONFIG_CMD_BMODE
 +              This enables the 'bmode' (bootmode) command for forcing
 +              a boot from specific media.
 +
 +              This is useful for forcing the ROM's usb downloader to
 +              activate upon a watchdog reset which is nice when iterating
 +              on U-Boot.  Using the reset button or running bmode normal
 +              will set it back to normal.  This command currently
 +              supports i.MX53 and i.MX6.
 +
  - Signing support:
                CONFIG_RSA
  
@@@ -3619,7 -3635,7 +3650,7 @@@ to save the current settings
          I2C muxes, you can define here, how to reach this
          EEPROM. For example:
  
-         #define CONFIG_I2C_ENV_EEPROM_BUS       "pca9547:70:d\0"
+         #define CONFIG_I2C_ENV_EEPROM_BUS       1
  
          EEPROM which holds the environment, is reached over
          a pca9547 i2c mux with address 0x70, channel 3.
index ce063ae9fe49856a6a9f51070d7fd15890f60441,3bdb553ffbd5b15d1d0a7edfbe529b48138e9134..7efb0d209a5c86a5d4b13e71a7905c08b8a014cd
@@@ -1,23 -1,7 +1,7 @@@
  /*
   * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #include <common.h>
@@@ -468,14 -452,6 +452,14 @@@ int do_mx6_showclocks(cmd_tbl_t *cmdtp
        return 0;
  }
  
 +void enable_ipu_clock(void)
 +{
 +      struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
 +      int reg;
 +      reg = readl(&mxc_ccm->CCGR3);
 +      reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_OFFSET;
 +      writel(reg, &mxc_ccm->CCGR3);
 +}
  /***************************************************/
  
  U_BOOT_CMD(
index a79369f32c273952eef5cd0e400760244c9bfff8,32572eea6a20c63e1829ffc8c7d115bc6ed0c90f..8150bffb8ce60b5c1947f65e5554598b24316f6d
@@@ -4,23 -4,7 +4,7 @@@
   *
   * (C) Copyright 2009 Freescale Semiconductor, Inc.
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #include <common.h>
@@@ -32,8 -16,6 +16,8 @@@
  #include <asm/imx-common/boot_mode.h>
  #include <asm/imx-common/dma.h>
  #include <stdbool.h>
 +#include <asm/arch/mxc_hdmi.h>
 +#include <asm/arch/crm_regs.h>
  
  struct scu_regs {
        u32     ctrl;
@@@ -230,44 -212,3 +214,44 @@@ const struct boot_mode soc_boot_modes[
  void s_init(void)
  {
  }
 +
 +#ifdef CONFIG_IMX_HDMI
 +void imx_enable_hdmi_phy(void)
 +{
 +      struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 +      u8 reg;
 +      reg = readb(&hdmi->phy_conf0);
 +      reg |= HDMI_PHY_CONF0_PDZ_MASK;
 +      writeb(reg, &hdmi->phy_conf0);
 +      udelay(3000);
 +      reg |= HDMI_PHY_CONF0_ENTMDS_MASK;
 +      writeb(reg, &hdmi->phy_conf0);
 +      udelay(3000);
 +      reg |= HDMI_PHY_CONF0_GEN2_TXPWRON_MASK;
 +      writeb(reg, &hdmi->phy_conf0);
 +      writeb(HDMI_MC_PHYRSTZ_ASSERT, &hdmi->mc_phyrstz);
 +}
 +
 +void imx_setup_hdmi(void)
 +{
 +      struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
 +      struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 +      int reg;
 +
 +      /* Turn on HDMI PHY clock */
 +      reg = readl(&mxc_ccm->CCGR2);
 +      reg |=  MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK|
 +               MXC_CCM_CCGR2_HDMI_TX_ISFRCLK_MASK;
 +      writel(reg, &mxc_ccm->CCGR2);
 +      writeb(HDMI_MC_PHYRSTZ_DEASSERT, &hdmi->mc_phyrstz);
 +      reg = readl(&mxc_ccm->chsccdr);
 +      reg &= ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK|
 +               MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK|
 +               MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK);
 +      reg |= (CHSCCDR_PODF_DIVIDE_BY_3
 +               << MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET)
 +               |(CHSCCDR_IPU_PRE_CLK_540M_PFD
 +               << MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET);
 +      writel(reg, &mxc_ccm->chsccdr);
 +}
 +#endif
index ce0b26e9736570bb440366f1e139e9c46425fdef,d6ec7c46913f29b512f5470e908f23b60f76be3c..e9fd9553cfe7dbbe02ae7f436875ed42f0513650
@@@ -1,23 -1,7 +1,7 @@@
  /*
   * Copyright (C) 2012 Boundary Devices Inc.
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  #include <common.h>
  #include <asm/arch/imx-regs.h>
@@@ -27,7 -11,8 +11,7 @@@
  static int do_hdmidet(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  {
        struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 -      u8 reg = readb(&hdmi->phy_stat0) & HDMI_PHY_HPD;
 -      return (reg&HDMI_PHY_HPD) ? 0 : 1;
 +      return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;
  }
  
  U_BOOT_CMD(hdmidet, 1, 1, do_hdmidet,
index d03d24a796ee6a9a15983158120e7eabf220036b,21a4fbb59a57f7dcec15e2396ac9b0604cf6e031..c49368765b261803e95c15574870b16eb24d5006
@@@ -2,23 -2,7 +2,7 @@@
   * (C) Copyright 2009
   * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #ifndef __ASM_ARCH_CLOCK_H
@@@ -65,5 -49,5 +49,5 @@@ void enable_ocotp_clk(unsigned char ena
  void enable_usboh3_clk(unsigned char enable);
  int enable_sata_clock(void);
  int enable_i2c_clk(unsigned char enable, unsigned i2c_num);
 -
 +void enable_ipu_clock(void);
  #endif /* __ASM_ARCH_CLOCK_H */
index 2d93658434c72b6f3940f20a492daddce73a3350,561e8ff82ae7d502804e07d891c818d76b685ad4..e5e3eff5966cdf56bb3e24f606da56fe5da5c1ef
@@@ -3,29 -3,12 +3,17 @@@
   */
  
  /*
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation; either version 2 of the License, or
-  * (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License along
-  * with this program; if not, write to the Free Software Foundation, Inc.,
-  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #ifndef __MXC_HDMI_H__
  #define __MXC_HDMI_H__
  
 +#ifdef CONFIG_IMX_HDMI
 +void imx_enable_hdmi_phy(void);
 +void imx_setup_hdmi(void);
 +#endif
 +
  /*
   * Hdmi controller registers
   */
@@@ -901,9 -884,6 +889,9 @@@ enum 
        HDMI_PHY_HPD = 0x02,
        HDMI_PHY_TX_PHY_LOCK = 0x01,
  
 +/* Convenience macro RX_SENSE | HPD */
 +      HDMI_DVI_STAT = 0xF2,
 +
  /* PHY_I2CM_SLAVE_ADDR field values */
        HDMI_PHY_I2CM_SLAVE_ADDR_PHY_GEN2 = 0x69,
        HDMI_PHY_I2CM_SLAVE_ADDR_HEAC_PHY = 0x49,
index ff033dae71f6ef8586d803c9bccc481a9bc9ed05,1a29b6f4bd0639ff06aef6056b70b1ca83b421db..79ab44904e19a8ad293896c7fb2b3ef410b7ff3f
@@@ -2,23 -2,7 +2,7 @@@
   * Copyright (C) 2010-2013 Freescale Semiconductor, Inc.
   * Copyright (C) 2013, Boundary Devices <info@boundarydevices.com>
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+ 
   */
  
  #include <common.h>
@@@ -477,12 -461,25 +461,12 @@@ struct display_info_t 
  static int detect_hdmi(struct display_info_t const *dev)
  {
        struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 -      return readb(&hdmi->phy_stat0) & HDMI_PHY_HPD;
 +      return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;
  }
  
 -static void enable_hdmi(struct display_info_t const *dev)
 +static void do_enable_hdmi(struct display_info_t const *dev)
  {
 -      struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 -      u8 reg;
 -      printf("%s: setup HDMI monitor\n", __func__);
 -      reg = readb(&hdmi->phy_conf0);
 -      reg |= HDMI_PHY_CONF0_PDZ_MASK;
 -      writeb(reg, &hdmi->phy_conf0);
 -
 -      udelay(3000);
 -      reg |= HDMI_PHY_CONF0_ENTMDS_MASK;
 -      writeb(reg, &hdmi->phy_conf0);
 -      udelay(3000);
 -      reg |= HDMI_PHY_CONF0_GEN2_TXPWRON_MASK;
 -      writeb(reg, &hdmi->phy_conf0);
 -      writeb(HDMI_MC_PHYRSTZ_ASSERT, &hdmi->mc_phyrstz);
 +      imx_enable_hdmi_phy();
  }
  
  static int detect_i2c(struct display_info_t const *dev)
@@@ -515,7 -512,7 +499,7 @@@ static struct display_info_t const disp
        .addr   = 0,
        .pixfmt = IPU_PIX_FMT_RGB24,
        .detect = detect_hdmi,
 -      .enable = enable_hdmi,
 +      .enable = do_enable_hdmi,
        .mode   = {
                .name           = "HDMI",
                .refresh        = 60,
@@@ -640,15 -637,25 +624,15 @@@ static void setup_display(void
        struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
        struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
        struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
 -      struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 -
        int reg;
  
 +      enable_ipu_clock();
 +      imx_setup_hdmi();
        /* Turn on LDB0,IPU,IPU DI0 clocks */
        reg = __raw_readl(&mxc_ccm->CCGR3);
 -      reg |=   MXC_CCM_CCGR3_IPU1_IPU_DI0_OFFSET
 -              |MXC_CCM_CCGR3_LDB_DI0_MASK;
 +      reg |=  MXC_CCM_CCGR3_LDB_DI0_MASK;
        writel(reg, &mxc_ccm->CCGR3);
  
 -      /* Turn on HDMI PHY clock */
 -      reg = __raw_readl(&mxc_ccm->CCGR2);
 -      reg |=  MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK
 -             |MXC_CCM_CCGR2_HDMI_TX_ISFRCLK_MASK;
 -      writel(reg, &mxc_ccm->CCGR2);
 -
 -      /* clear HDMI PHY reset */
 -      writeb(HDMI_MC_PHYRSTZ_DEASSERT, &hdmi->mc_phyrstz);
 -
        /* set PFD1_FRAC to 0x13 == 455 MHz (480*18)/0x13 */
        writel(ANATOP_PFD_480_PFD1_FRAC_MASK, &anatop->pfd_480_clr);
        writel(0x13<<ANATOP_PFD_480_PFD1_FRAC_SHIFT, &anatop->pfd_480_set);
        writel(reg, &mxc_ccm->cscmr2);
  
        reg = readl(&mxc_ccm->chsccdr);
 -      reg &= ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK
 -              |MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK
 -              |MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK);
        reg |= (CHSCCDR_CLK_SEL_LDB_DI0
 -              <<MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET)
 -            |(CHSCCDR_PODF_DIVIDE_BY_3
 -              <<MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET)
 -            |(CHSCCDR_IPU_PRE_CLK_540M_PFD
 -              <<MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET);
 +              <<MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
        writel(reg, &mxc_ccm->chsccdr);
  
        reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES
index 4694b5cba501c829093664544f70f36fc1ea8662,936f029b4ec88b5e4f9a4fba7fadb29c0bc91293..5db516d5fd92fa07a248c55efcd7267693016c54
@@@ -3,18 -3,7 +3,7 @@@
   *
   * Author: Fabio Estevam <fabio.estevam@freescale.com>
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #include <asm/arch/clock.h>
  #include <fsl_esdhc.h>
  #include <miiphy.h>
  #include <netdev.h>
 -
 +#include <asm/arch/mxc_hdmi.h>
 +#include <asm/arch/crm_regs.h>
 +#include <linux/fb.h>
 +#include <ipu_pixfmt.h>
 +#include <asm/io.h>
 +#include <asm/arch/sys_proto.h>
  DECLARE_GLOBAL_DATA_PTR;
  
  #define UART_PAD_CTRL  (PAD_CTL_PUS_100K_UP |                 \
@@@ -244,60 -228,6 +233,60 @@@ int board_phy_config(struct phy_device 
        return 0;
  }
  
 +#if defined(CONFIG_VIDEO_IPUV3)
 +static struct fb_videomode const hdmi = {
 +      .name           = "HDMI",
 +      .refresh        = 60,
 +      .xres           = 1024,
 +      .yres           = 768,
 +      .pixclock       = 15385,
 +      .left_margin    = 220,
 +      .right_margin   = 40,
 +      .upper_margin   = 21,
 +      .lower_margin   = 7,
 +      .hsync_len      = 60,
 +      .vsync_len      = 10,
 +      .sync           = FB_SYNC_EXT,
 +      .vmode          = FB_VMODE_NONINTERLACED
 +};
 +
 +int board_video_skip(void)
 +{
 +      int ret;
 +
 +      ret = ipuv3_fb_init(&hdmi, 0, IPU_PIX_FMT_RGB24);
 +
 +      if (ret)
 +              printf("HDMI cannot be configured: %d\n", ret);
 +
 +      imx_enable_hdmi_phy();
 +      return ret;
 +}
 +
 +static void setup_display(void)
 +{
 +      struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
 +      int reg;
 +
 +      enable_ipu_clock();
 +      imx_setup_hdmi();
 +
 +      reg = readl(&mxc_ccm->chsccdr);
 +      reg |= (CHSCCDR_CLK_SEL_LDB_DI0
 +              << MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
 +      writel(reg, &mxc_ccm->chsccdr);
 +}
 +#endif /* CONFIG_VIDEO_IPUV3 */
 +
 +/*
 + * Do not overwrite the console
 + * Use always serial for U-Boot console
 + */
 +int overwrite_console(void)
 +{
 +      return 1;
 +}
 +
  int board_eth_init(bd_t *bis)
  {
        int ret;
  int board_early_init_f(void)
  {
        setup_iomux_uart();
 +#if defined(CONFIG_VIDEO_IPUV3)
 +      setup_display();
 +#endif
  
        return 0;
  }
index 6cd28eda87fbf131f69bded5a14d9ba0b8cd5f08,2f7d93b915daced42f03d8306685a8723c61d866..23a78c1663852ed46774762b2c38699a4a49f6e7
@@@ -3,10 -3,7 +3,7 @@@
   *
   * Author: Fabio Estevam <fabio.estevam@freescale.com>
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #include <asm/arch/clock.h>
@@@ -211,6 -208,23 +208,6 @@@ int board_phy_config(struct phy_device 
  }
  
  #if defined(CONFIG_VIDEO_IPUV3)
 -static void enable_hdmi(void)
 -{
 -      struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 -      u8 reg;
 -      reg = readb(&hdmi->phy_conf0);
 -      reg |= HDMI_PHY_CONF0_PDZ_MASK;
 -      writeb(reg, &hdmi->phy_conf0);
 -
 -      udelay(3000);
 -      reg |= HDMI_PHY_CONF0_ENTMDS_MASK;
 -      writeb(reg, &hdmi->phy_conf0);
 -      udelay(3000);
 -      reg |= HDMI_PHY_CONF0_GEN2_TXPWRON_MASK;
 -      writeb(reg, &hdmi->phy_conf0);
 -      writeb(HDMI_MC_PHYRSTZ_ASSERT, &hdmi->mc_phyrstz);
 -}
 -
  static struct fb_videomode const hdmi = {
        .name           = "HDMI",
        .refresh        = 60,
@@@ -236,7 -250,7 +233,7 @@@ int board_video_skip(void
        if (ret)
                printf("HDMI cannot be configured: %d\n", ret);
  
 -      enable_hdmi();
 +      imx_enable_hdmi_phy();
  
        return ret;
  }
  static void setup_display(void)
  {
        struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
 -      struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
        int reg;
  
 -      /* Turn on IPU clock */
 -      reg = readl(&mxc_ccm->CCGR3);
 -      reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_OFFSET;
 -      writel(reg, &mxc_ccm->CCGR3);
 -
 -      /* Turn on HDMI PHY clock */
 -      reg = readl(&mxc_ccm->CCGR2);
 -      reg |=  MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK
 -              | MXC_CCM_CCGR2_HDMI_TX_ISFRCLK_MASK;
 -      writel(reg, &mxc_ccm->CCGR2);
 -
 -      /* clear HDMI PHY reset */
 -      writeb(HDMI_MC_PHYRSTZ_DEASSERT, &hdmi->mc_phyrstz);
 +      enable_ipu_clock();
 +      imx_setup_hdmi();
  
        reg = readl(&mxc_ccm->chsccdr);
 -      reg &= ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK
 -              | MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK
 -              | MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK);
        reg |= (CHSCCDR_CLK_SEL_LDB_DI0
 -              << MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET)
 -            | (CHSCCDR_PODF_DIVIDE_BY_3
 -              << MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET)
 -            | (CHSCCDR_IPU_PRE_CLK_540M_PFD
 -              << MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET);
 +              << MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
        writel(reg, &mxc_ccm->chsccdr);
  }
  #endif /* CONFIG_VIDEO_IPUV3 */
diff --combined boards.cfg
index f919c53f9e20065d4e6fc18a798a74bbe38352d4,211ed589c642a4cd06000ceb4721eb762a226afc..454da7f974dec3d7646c34f31fc01dbf8cdc90e1
@@@ -241,14 -241,17 +241,17 @@@ integratorcp_cm946es         ar
  vexpress_ca15_tc2            arm         armv7       vexpress            armltd
  vexpress_ca5x2               arm         armv7       vexpress            armltd
  vexpress_ca9x4               arm         armv7       vexpress            armltd
- am335x_evm                   arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1
+ am335x_evm                   arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NAND
+ am335x_evm_nor               arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NAND,NOR
+ am335x_evm_norboot           arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NOR,NOR_BOOT
  am335x_evm_spiboot           arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,SPI_BOOT
- am335x_evm_uart1             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL2,CONS_INDEX=2
- am335x_evm_uart2             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL3,CONS_INDEX=3
- am335x_evm_uart3             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL4,CONS_INDEX=4
- am335x_evm_uart4             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL5,CONS_INDEX=5
- am335x_evm_uart5             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL6,CONS_INDEX=6
- am335x_evm_usbspl            arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,SPL_USBETH_SUPPORT
+ am335x_evm_uart1             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL2,CONS_INDEX=1,NAND
+ am335x_evm_uart2             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL3,CONS_INDEX=1,NAND
+ am335x_evm_uart3             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL4,CONS_INDEX=1,NAND
+ am335x_evm_uart4             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL5,CONS_INDEX=1,NAND
+ am335x_evm_uart5             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL6,CONS_INDEX=1,NAND
+ am335x_evm_usbspl            arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,NAND,SPL_USBETH_SUPPORT
+ am335x_boneblack             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL1,CONS_INDEX=1,EMMC_BOOT
  ti814x_evm                   arm         armv7       ti814x              ti             am33xx
  pcm051                       arm         armv7       pcm051              phytec         am33xx      pcm051
  sama5d3xek_mmc               arm         armv7       sama5d3xek          atmel          at91        sama5d3xek:SAMA5D3,SYS_USE_MMC
@@@ -268,7 -271,7 +271,7 @@@ vision2                      ar
  cgtqmx6qeval                           arm             armv7           cgtqmx6eval             congatec               mx6             cgtqmx6eval:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q
  mx6qarm2                     arm         armv7       mx6qarm2            freescale      mx6           mx6qarm2:IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg
  mx6qsabreauto                arm         armv7       mx6qsabreauto       freescale      mx6           mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q
 -mx6qsabrelite                arm         armv7       mx6qsabrelite       freescale      mx6           mx6qsabrelite:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
 +mx6qsabrelite                arm         armv7       nitrogen6x          boundary       mx6           nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE
  mx6dlsabresd                 arm         armv7       mx6sabresd          freescale      mx6           mx6sabresd:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL
  mx6qsabresd                  arm         armv7       mx6sabresd          freescale      mx6           mx6sabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q
  mx6slevk                     arm         armv7       mx6slevk            freescale      mx6           mx6slevk:IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL
@@@ -337,7 -340,7 +340,7 @@@ kzm9g                        ar
  armadillo-800eva             arm         armv7       armadillo-800eva    atmark-techno  rmobile
  zynq                         arm         armv7       zynq                xilinx         zynq
  zynq_dcc                     arm         armv7       zynq                xilinx         zynq        zynq:ZYNQ_DCC
- socfpga_cyclone5                arm         armv7          socfpga_cyclone5    altera             socfpga
+ socfpga_cyclone5                arm         armv7          socfpga    altera              socfpga
  actux1_4_16                  arm         ixp         actux1              -              -           actux1:FLASH2X2
  actux1_4_32                  arm         ixp         actux1              -              -           actux1:FLASH2X2,RAM_32MB
  actux1_8_16                  arm         ixp         actux1              -              -           actux1:FLASH1X8
@@@ -470,6 -473,8 +473,8 @@@ qemu_mips                    mip
  qemu_mipsel                  mips        mips32      qemu-mips           -              -           qemu-mips:SYS_LITTLE_ENDIAN
  qemu_mips64                  mips        mips64      qemu-mips           -              -           qemu-mips64:SYS_BIG_ENDIAN
  qemu_mips64el                mips        mips64      qemu-mips           -              -           qemu-mips64:SYS_LITTLE_ENDIAN
+ qemu_malta                   mips        mips32      qemu-malta          -              -           qemu-malta:MIPS32,SYS_BIG_ENDIAN
+ qemu_maltael                 mips        mips32      qemu-malta          -              -           qemu-malta:MIPS32,SYS_LITTLE_ENDIAN
  vct_platinum                 mips        mips32      vct                 micronas       -           vct:VCT_PLATINUM
  vct_platinumavc              mips        mips32      vct                 micronas       -           vct:VCT_PLATINUMAVC
  vct_platinumavc_onenand      mips        mips32      vct                 micronas       -           vct:VCT_PLATINUMAVC,VCT_ONENAND
diff --combined drivers/gpio/mxc_gpio.c
index 1d820d4c3ef63201be241c2c4c0e634b3d8c332c,46c0255adc35e43fc6367f2c54ca03cf95203410..6a572d5454b39e4905da9094edd01f47cf451035
@@@ -5,23 -5,7 +5,7 @@@
   * Copyright (C) 2011
   * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  #include <common.h>
  #include <asm/arch/imx-regs.h>
@@@ -143,10 -127,10 +127,10 @@@ int gpio_direction_input(unsigned gpio
  
  int gpio_direction_output(unsigned gpio, int value)
  {
 -      int ret = mxc_gpio_direction(gpio, MXC_GPIO_DIRECTION_OUT);
 +      int ret = gpio_set_value(gpio, value);
  
        if (ret < 0)
                return ret;
  
 -      return gpio_set_value(gpio, value);
 +      return mxc_gpio_direction(gpio, MXC_GPIO_DIRECTION_OUT);
  }
index d922d5d099a170fda5d1aac021d1b94fa0a0c414,fd74370ed48775b811eab7a7bc8e88b582a75c5c..3e21fb23067c0dc41c16f35fc58964db806eae07
@@@ -8,23 -8,7 +8,7 @@@
   *
   * (C) Copyright 2004-2010 Freescale Semiconductor, Inc.
   *
-  * See file CREDITS for list of people who contributed to this
-  * project.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #include <common.h>
@@@ -415,9 -399,8 +399,9 @@@ static int mxcfb_map_video_memory(struc
                fbi->fix.smem_len = fbi->var.yres_virtual *
                                    fbi->fix.line_length;
        }
 -
 -      fbi->screen_base = (char *)malloc(fbi->fix.smem_len);
 +      fbi->fix.smem_len = roundup(fbi->fix.smem_len, ARCH_DMA_MINALIGN);
 +      fbi->screen_base = (char *)memalign(ARCH_DMA_MINALIGN,
 +                                          fbi->fix.smem_len);
        fbi->fix.smem_start = (unsigned long)fbi->screen_base;
        if (fbi->screen_base == 0) {
                puts("Unable to allocate framebuffer memory\n");
index 7081f3769e6bb77b0173cf9efaf0ef357b02c83f,8561a248c41398eb1b3daee8b42e451c07101b43..d1f18bc45c30878b16348875cfaa9199df405692
@@@ -9,26 -9,36 +9,18 @@@
   * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
   * on behalf of DENX Software Engineering GmbH
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
-  * GNU General Public License for more details.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
 -#ifndef __CONFIG_H
 -#define __CONFIG_H
 +#ifndef __CONFIGS_APX4DEVKIT_H__
 +#define __CONFIGS_APX4DEVKIT_H__
  
 -/* SoC configurations */
 +/* System configurations */
  #define CONFIG_MX28                           /* i.MX28 SoC */
 -#define CONFIG_MXS_GPIO                               /* GPIO control */
 -#define CONFIG_SYS_HZ         1000            /* Ticks per second */
 -
  #define MACH_TYPE_APX4DEVKIT  3712
  #define CONFIG_MACH_TYPE      MACH_TYPE_APX4DEVKIT
  
 -#include <asm/arch/regs-base.h>
 -
 -#define CONFIG_SYS_NO_FLASH
 -#define CONFIG_BOARD_EARLY_INIT_F
 -#define CONFIG_ARCH_CPU_INIT
 -#define CONFIG_ARCH_MISC_INIT
 -
 -/* SPL */
 -#define CONFIG_SPL
 -#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
 -#define CONFIG_SPL_START_S_PATH       "arch/arm/cpu/arm926ejs/mxs"
 -#define CONFIG_SPL_LDSCRIPT   "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
 -#define CONFIG_SPL_LIBCOMMON_SUPPORT
 -#define CONFIG_SPL_LIBGENERIC_SUPPORT
 -#define CONFIG_SPL_GPIO_SUPPORT
 -
  /* U-Boot Commands */
 +#define CONFIG_SYS_NO_FLASH
  #include <config_cmd_default.h>
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DOS_PARTITION
  #define CONFIG_CMD_SAVEENV
  #define CONFIG_CMD_USB
  
 -/* Memory configurations */
 +/* Memory configuration */
  #define CONFIG_NR_DRAM_BANKS          1               /* 1 bank of DRAM */
  #define PHYS_SDRAM_1                  0x40000000      /* Base address */
  #define PHYS_SDRAM_1_SIZE             0x20000000      /* Max 512 MB RAM */
 -#define CONFIG_SYS_MALLOC_LEN         0x00400000      /* 4 MB for malloc */
 -#define CONFIG_SYS_MEMTEST_START      0x40000000      /* Memtest start adr */
 -#define CONFIG_SYS_MEMTEST_END                0x40400000      /* 4 MB RAM test */
  #define CONFIG_SYS_SDRAM_BASE         PHYS_SDRAM_1
  
 -/* Point initial SP in SRAM so SPL can use it too. */
 -#define CONFIG_SYS_INIT_RAM_ADDR      0x00000000
 -#define CONFIG_SYS_INIT_RAM_SIZE      (128 * 1024)
 -
 -#define CONFIG_SYS_INIT_SP_OFFSET \
 -      (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 -#define CONFIG_SYS_INIT_SP_ADDR \
 -      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 -
 -/*
 - * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
 - * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
 - * binary. In case there was more of this mess, 0x100 bytes are skipped.
 - */
 -#define CONFIG_SYS_TEXT_BASE          0x40000100
  
 +/* Environment */
  #define CONFIG_ENV_OVERWRITE
 -
 -/* U-Boot general configurations */
 -#define CONFIG_SYS_LONGHELP
 -#define CONFIG_SYS_PROMPT             "=> "
 -#define CONFIG_SYS_CBSIZE             1024    /* Console I/O buffer size */
 -#define CONFIG_SYS_PBSIZE     \
 -      (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 -                                              /* Print buffer size */
 -#define CONFIG_SYS_MAXARGS            32      /* Max number of command args */
 -#define CONFIG_SYS_BARGSIZE           CONFIG_SYS_CBSIZE
 -                                              /* Boot argument buffer size */
 -#define CONFIG_VERSION_VARIABLE                       /* U-Boot version */
 -#define CONFIG_AUTO_COMPLETE                  /* Command auto complete */
 -#define CONFIG_CMDLINE_EDITING                        /* Command history etc. */
 -#define CONFIG_SYS_HUSH_PARSER
 -#define CONFIG_SYS_PROMPT_HUSH_PS2    "> "
 -#define CONFIG_OF_LIBFDT
  #define CONFIG_ENV_IS_IN_NAND
  
 -/* Serial Driver */
 -#define CONFIG_PL011_SERIAL
 -#define CONFIG_PL011_CLOCK            24000000
 -#define CONFIG_PL01x_PORTS            { (void *)MXS_UARTDBG_BASE }
 -#define CONFIG_CONS_INDEX             0
 -#define CONFIG_BAUDRATE                       115200  /* Default baud rate */
 -#define CONFIG_SYS_BAUDRATE_TABLE     { 9600, 19200, 38400, 57600, 115200 }
 -
 -/* DMA */
 -#define CONFIG_APBH_DMA
 -
 -/* MMC Driver */
 -#ifdef CONFIG_ENV_IS_IN_MMC
 +/* Environment is in MMC */
 +#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
  #define CONFIG_ENV_OFFSET             (256 * 1024)
  #define CONFIG_ENV_SIZE                       (16 * 1024)
  #define CONFIG_SYS_MMC_ENV_DEV                0
  #endif
  
 -#ifdef CONFIG_CMD_MMC
 -#define CONFIG_MMC
 -#define CONFIG_GENERIC_MMC
 -#define CONFIG_BOUNCE_BUFFER
 -#define CONFIG_MXS_MMC
 -#endif
 -
 -/* NAND Driver */
 -#ifdef CONFIG_ENV_IS_IN_NAND
 +/* Environment is in NAND */
 +#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
  #define CONFIG_ENV_SECT_SIZE          (128 * 1024)
  #define CONFIG_ENV_SIZE                       (128 * 1024)
  #define CONFIG_ENV_SIZE_REDUND                CONFIG_ENV_SIZE
                (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
  #endif
  
 +/* UBI and NAND partitioning */
  #ifdef CONFIG_CMD_NAND
 -#define CONFIG_NAND_MXS
 -#define CONFIG_SYS_MAX_NAND_DEVICE    1
 -#define CONFIG_SYS_NAND_BASE          0x60000000
 -#define CONFIG_SYS_NAND_5_ADDR_CYCLE
 -
  #define CONFIG_CMD_UBI
  #define CONFIG_CMD_UBIFS
  #define CONFIG_CMD_MTDPARTS
  #define MTDPARTS_DEFAULT              ""
  #endif
  
 -/* Ethernet on SOC (FEC) */
 +/* FEC Ethernet on SoC */
  #ifdef CONFIG_CMD_NET
 +#define CONFIG_FEC_MXC
  #define CONFIG_NET_MULTI
  #define CONFIG_ETHPRIME                       "FEC"
 -#define CONFIG_FEC_MXC
  #define CONFIG_FEC_MXC_PHYADDR                0
  #define IMX_FEC_BASE                  MXS_ENET0_BASE
 -#define CONFIG_MII
 -#define CONFIG_FEC_XCV_TYPE           RMII
  #endif
  
  /* USB */
  #ifdef CONFIG_CMD_USB
 -#define CONFIG_USB_EHCI
 -#define CONFIG_USB_EHCI_MXS
  #define CONFIG_EHCI_MXS_PORT1
  #define CONFIG_USB_MAX_CONTROLLER_COUNT       1
 -#define CONFIG_EHCI_IS_TDI
  #define CONFIG_USB_STORAGE
  #endif
  
 -/* I2C */
 -#ifdef CONFIG_CMD_I2C
 -#define CONFIG_I2C_MXS
 -#define CONFIG_HARD_I2C
 -#define CONFIG_SYS_I2C_SPEED          400000
 -#endif
  
  /* RTC */
 -#if defined(CONFIG_CMD_DATE)
 +#ifdef CONFIG_CMD_DATE
  #define CONFIG_RTC_PCF8563
  #define CONFIG_SYS_I2C_RTC_ADDR               0x51
  #endif
  
  /* Boot Linux */
 -#define CONFIG_CMDLINE_TAG
 -#define CONFIG_SETUP_MEMORY_TAGS
  #define CONFIG_BOOTDELAY              1
  #define CONFIG_BOOTFILE                       "uImage"
  #define CONFIG_BOOTCOMMAND            "run bootcmd_nand"
                "ext2load mmc 0:2 41000000 boot/uImage && bootm 41000000\0" \
  ""
  
 -#endif /* __CONFIG_H */
 +/* The rest of the configuration is shared */
 +#include <configs/mxs.h>
 +
 +#endif /* __CONFIGS_APX4DEVKIT_H__ */
diff --combined include/configs/m28evk.h
index b6fa6ebb3f47b046f7deec88d10aa2eed38ec7bc,fd3ae028dc3aa6b7db05e340b8c56e452b627bca..eba875954df2455cdd26b92578a8c057a4b00f91
@@@ -2,32 -2,45 +2,19 @@@
   * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
   * on behalf of DENX Software Engineering GmbH
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+ 
   */
 -#ifndef __M28EVK_CONFIG_H__
 -#define __M28EVK_CONFIG_H__
 +#ifndef __CONFIGS_M28EVK_H__
 +#define __CONFIGS_M28EVK_H__
  
 -/*
 - * SoC configurations
 - */
 -#define CONFIG_MX28                           /* i.MX28 SoC */
 -#define CONFIG_MXS_GPIO                               /* GPIO control */
 -#define CONFIG_SYS_HZ         1000            /* Ticks per second */
  
 -/*
 - * Define M28EVK machine type by hand until it lands in mach-types
 - */
 +/* System configurations */
 +#define CONFIG_MX28                           /* i.MX28 SoC */
  #define MACH_TYPE_M28EVK      3613
 -
  #define CONFIG_MACH_TYPE      MACH_TYPE_M28EVK
  
 -#include <asm/arch/regs-base.h>
 -
 +/* U-Boot Commands */
  #define CONFIG_SYS_NO_FLASH
 -#define CONFIG_BOARD_EARLY_INIT_F
 -#define CONFIG_ARCH_MISC_INIT
 -
 -/*
 - * SPL
 - */
 -#define CONFIG_SPL
 -#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
 -#define CONFIG_SPL_START_S_PATH               "arch/arm/cpu/arm926ejs/mxs"
 -#define CONFIG_SPL_LDSCRIPT   "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
 -#define CONFIG_SPL_LIBCOMMON_SUPPORT
 -#define CONFIG_SPL_LIBGENERIC_SUPPORT
 -#define CONFIG_SPL_GPIO_SUPPORT
 -
 -/*
 - * U-Boot Commands
 - */
  #include <config_cmd_default.h>
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DOS_PARTITION
  
  #define CONFIG_REGEX                  /* Enable regular expression support */
  
 -/*
 - * Memory configurations
 - */
 +/* Memory configuration */
  #define CONFIG_NR_DRAM_BANKS          1               /* 1 bank of DRAM */
  #define PHYS_SDRAM_1                  0x40000000      /* Base address */
  #define PHYS_SDRAM_1_SIZE             0x20000000      /* Max 512 MB RAM */
 -#define CONFIG_SYS_MALLOC_LEN         0x00400000      /* 4 MB for malloc */
 -#define CONFIG_SYS_GBL_DATA_SIZE      128             /* Initial data */
 -#define CONFIG_SYS_MEMTEST_START      0x40000000      /* Memtest start adr */
 -#define CONFIG_SYS_MEMTEST_END                0x40400000      /* 4 MB RAM test */
  #define CONFIG_SYS_SDRAM_BASE         PHYS_SDRAM_1
 -/* Point initial SP in SRAM so SPL can use it too. */
 -
 -#define CONFIG_SYS_INIT_RAM_ADDR      0x00000000
 -#define CONFIG_SYS_INIT_RAM_SIZE      (128 * 1024)
 -
 -#define CONFIG_SYS_INIT_SP_OFFSET \
 -      (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 -#define CONFIG_SYS_INIT_SP_ADDR \
 -      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 -/*
 - * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
 - * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
 - * binary. In case there was more of this mess, 0x100 bytes are skipped.
 - */
 -#define CONFIG_SYS_TEXT_BASE          0x40000100
 -
 -/*
 - * U-Boot general configurations
 - */
 -#define CONFIG_SYS_LONGHELP
 -#define CONFIG_SYS_PROMPT     "=> "
 -#define CONFIG_SYS_CBSIZE     1024            /* Console I/O buffer size */
 -#define CONFIG_SYS_PBSIZE     \
 -      (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 -                                              /* Print buffer size */
 -#define CONFIG_SYS_MAXARGS    32              /* Max number of command args */
 -#define CONFIG_SYS_BARGSIZE   CONFIG_SYS_CBSIZE
 -                                              /* Boot argument buffer size */
 -#define CONFIG_VERSION_VARIABLE                       /* U-BOOT version */
 -#define CONFIG_AUTO_COMPLETE                  /* Command auto complete */
 -#define CONFIG_CMDLINE_EDITING                        /* Command history etc */
 -#define CONFIG_SYS_HUSH_PARSER
 -
 -/*
 - * Serial Driver
 - */
 -#define CONFIG_PL011_SERIAL
 -#define CONFIG_PL011_CLOCK            24000000
 -#define CONFIG_PL01x_PORTS            { (void *)MXS_UARTDBG_BASE }
 -#define CONFIG_CONS_INDEX             0
 -#define CONFIG_BAUDRATE                       115200  /* Default baud rate */
 -
 -/*
 - * MMC Driver
 - */
 -#ifdef        CONFIG_CMD_MMC
 -#define CONFIG_MMC
 -#define CONFIG_BOUNCE_BUFFER
 -#define CONFIG_GENERIC_MMC
 -#define CONFIG_MXS_MMC
 -#endif
  
 -/*
 - * APBH DMA
 - */
 -#define CONFIG_APBH_DMA
 -
 -/*
 - * NAND
 - */
 +/* Environment */
  #define CONFIG_ENV_SIZE                       (16 * 1024)
 -#ifdef        CONFIG_CMD_NAND
 -#define CONFIG_NAND_MXS
 -#define CONFIG_SYS_MAX_NAND_DEVICE    1
 -#define CONFIG_SYS_NAND_BASE          0x60000000
 -#define CONFIG_SYS_NAND_5_ADDR_CYCLE
 +#define CONFIG_ENV_IS_IN_NAND
  
  /* Environment is in NAND */
 -#define CONFIG_ENV_IS_IN_NAND
 +#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
  #define CONFIG_ENV_SIZE_REDUND                CONFIG_ENV_SIZE
  #define CONFIG_ENV_SECT_SIZE          (128 * 1024)
  #define CONFIG_ENV_RANGE              (512 * 1024)
  #define CONFIG_ENV_IS_NOWHERE
  #endif
  
 -/*
 - * Ethernet on SOC (FEC)
 - */
 -#ifdef        CONFIG_CMD_NET
 -#define CONFIG_ETHPRIME                       "FEC0"
 +/* FEC Ethernet on SoC */
 +#ifdef CONFIG_CMD_NET
  #define CONFIG_FEC_MXC
 -#define CONFIG_MII
 -#define CONFIG_FEC_XCV_TYPE           RMII
  #endif
  
 -/*
 - * I2C
 - */
 -#ifdef        CONFIG_CMD_I2C
 -#define CONFIG_I2C_MXS
 -#define CONFIG_HARD_I2C
 -#define CONFIG_SYS_I2C_SPEED          400000
 -#endif
 -
 -/*
 - * EEPROM
 - */
 -#ifdef        CONFIG_CMD_EEPROM
 +/* EEPROM */
 +#ifdef CONFIG_CMD_EEPROM
  #define CONFIG_SYS_I2C_MULTI_EEPROMS
  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN        2
  #endif
  
 -/*
 - * RTC
 - */
 -#ifdef        CONFIG_CMD_DATE
 +/* RTC */
 +#ifdef CONFIG_CMD_DATE
  /* Use the internal RTC in the MXS chip */
  #define CONFIG_RTC_INTERNAL
 -#ifdef        CONFIG_RTC_INTERNAL
 +#ifdef CONFIG_RTC_INTERNAL
  #define CONFIG_RTC_MXS
  #else
  #define CONFIG_RTC_M41T62
  #endif
  #endif
  
 -/*
 - * USB
 - */
 -#ifdef        CONFIG_CMD_USB
 -#define CONFIG_USB_EHCI
 -#define CONFIG_USB_EHCI_MXS
 +/* USB */
 +#ifdef CONFIG_CMD_USB
  #define CONFIG_EHCI_MXS_PORT0
  #define CONFIG_EHCI_MXS_PORT1
  #define CONFIG_USB_MAX_CONTROLLER_COUNT       2
 -#define CONFIG_EHCI_IS_TDI
  #define CONFIG_USB_STORAGE
  #endif
  
 -/*
 - * SPI
 - */
 -#ifdef        CONFIG_CMD_SPI
 -#define CONFIG_HARD_SPI
 -#define CONFIG_MXS_SPI
 -#define CONFIG_SPI_HALF_DUPLEX
 +/* SPI */
 +#ifdef CONFIG_CMD_SPI
  #define CONFIG_DEFAULT_SPI_BUS                2
  #define CONFIG_DEFAULT_SPI_CS         0
  #define CONFIG_DEFAULT_SPI_MODE               SPI_MODE_0
  
  /* SPI FLASH */
 -#ifdef        CONFIG_CMD_SF
 +#ifdef CONFIG_CMD_SF
  #define CONFIG_SPI_FLASH
  #define CONFIG_SPI_FLASH_STMICRO
  #define CONFIG_SF_DEFAULT_BUS         2
  #define CONFIG_ENV_SPI_MAX_HZ         40000000
  #define CONFIG_ENV_SPI_MODE           SPI_MODE_0
  #endif
 +
  #endif
  
 -/*
 - * LCD
 - */
 -#ifdef        CONFIG_VIDEO
 -#define       CONFIG_CFB_CONSOLE
 -#define       CONFIG_VIDEO_MXS
 +/* LCD */
 +#ifdef CONFIG_VIDEO
  #define       CONFIG_VIDEO_LOGO
 -#define       CONFIG_VIDEO_SW_CURSOR
 -#define       CONFIG_VGA_AS_SINGLE_DEVICE
 -#define       CONFIG_SYS_CONSOLE_IS_IN_ENV
  #define       CONFIG_SPLASH_SCREEN
  #define       CONFIG_CMD_BMP
  #define       CONFIG_BMP_16BPP
  #define       CONFIG_SYS_VIDEO_LOGO_MAX_SIZE  (512 << 10)
  #endif
  
 -/*
 - * Boot Linux
 - */
 -#define CONFIG_CMDLINE_TAG
 -#define CONFIG_SETUP_MEMORY_TAGS
 +/* Booting Linux */
  #define CONFIG_BOOTDELAY      3
  #define CONFIG_BOOTFILE               "uImage"
  #define CONFIG_BOOTARGS               "console=ttyAMA0,115200n8 "
  #define CONFIG_BOOTCOMMAND    "run bootcmd_net"
  #define CONFIG_LOADADDR               0x42000000
  #define CONFIG_SYS_LOAD_ADDR  CONFIG_LOADADDR
 -#define CONFIG_OF_LIBFDT
  
 -/*
 - * Extra Environments
 - */
 +/* Extra Environment */
  #define CONFIG_EXTRA_ENV_SETTINGS                                     \
        "update_nand_full_filename=u-boot.nand\0"                       \
        "update_nand_firmware_filename=u-boot.sb\0"                     \
                "fi ; "                                                 \
                "fi\0"
  
 -#endif /* __M28EVK_CONFIG_H__ */
 +/* The rest of the configuration is shared */
 +#include <configs/mxs.h>
 +
 +#endif /* __CONFIGS_M28EVK_H__ */
index 418d4fd948c9f0fc084be2e40664bebb5c796f81,94bedd6d253379a24ba92e93d225644a403b2251..575fe2a22ddb361d75d83e1339256c97d77ed0db
@@@ -1,30 -1,42 +1,17 @@@
  /*
   * Copyright (C) 2013 Marek Vasut <marex@denx.de>
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+ 
   */
 -#ifndef __MX23_OLINUXINO_CONFIG_H__
 -#define __MX23_OLINUXINO_CONFIG_H__
 +#ifndef __CONFIGS_MX23_OLINUXINO_H__
 +#define __CONFIGS_MX23_OLINUXINO_H__
  
 -#include <asm/arch/iomux-mx23.h>
 -
 -/*
 - * SoC configurations
 - */
 +/* System configurations */
  #define CONFIG_MX23                           /* i.MX23 SoC */
 -#define CONFIG_MXS_GPIO                               /* GPIO control */
 -#define CONFIG_SYS_HZ         1000            /* Ticks per second */
 -
  #define CONFIG_MACH_TYPE      4105
  
 -#include <asm/arch/regs-base.h>
 -
 +/* U-Boot Commands */
  #define CONFIG_SYS_NO_FLASH
 -#define CONFIG_BOARD_EARLY_INIT_F
 -#define CONFIG_ARCH_MISC_INIT
 -
 -/*
 - * SPL
 - */
 -#define CONFIG_SPL
 -#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
 -#define CONFIG_SPL_START_S_PATH               "arch/arm/cpu/arm926ejs/mxs"
 -#define CONFIG_SPL_LDSCRIPT   "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
 -#define CONFIG_SPL_LIBCOMMON_SUPPORT
 -#define CONFIG_SPL_LIBGENERIC_SUPPORT
 -#define CONFIG_SPL_GPIO_SUPPORT
 -
 -/*
 - * U-Boot Commands
 - */
  #include <config_cmd_default.h>
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DOS_PARTITION
  #define CONFIG_CMD_NET
  #define CONFIG_CMD_USB
  
 -/*
 - * Memory configurations
 - */
 +/* Memory configuration */
  #define CONFIG_NR_DRAM_BANKS          1               /* 1 bank of DRAM */
  #define PHYS_SDRAM_1                  0x40000000      /* Base address */
  #define PHYS_SDRAM_1_SIZE             0x08000000      /* Max 128 MB RAM */
 -#define CONFIG_SYS_MALLOC_LEN         0x00400000      /* 4 MB for malloc */
 -#define CONFIG_SYS_GBL_DATA_SIZE      128             /* Initial data */
 -#define CONFIG_SYS_MEMTEST_START      0x40000000      /* Memtest start adr */
 -#define CONFIG_SYS_MEMTEST_END                0x40400000      /* 4 MB RAM test */
  #define CONFIG_SYS_SDRAM_BASE         PHYS_SDRAM_1
 -/* Point initial SP in SRAM so SPL can use it too. */
 -
 -#define CONFIG_SYS_INIT_RAM_ADDR      0x00000000
 -#define CONFIG_SYS_INIT_RAM_SIZE      (128 * 1024)
 -
 -#define CONFIG_SYS_INIT_SP_OFFSET \
 -      (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 -#define CONFIG_SYS_INIT_SP_ADDR \
 -      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 -/*
 - * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
 - * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
 - * binary. In case there was more of this mess, 0x100 bytes are skipped.
 - */
 -#define CONFIG_SYS_TEXT_BASE          0x40000100
  
 -/*
 - * U-Boot general configurations
 - */
 -#define CONFIG_SYS_LONGHELP
 -#define CONFIG_SYS_PROMPT     "=> "
 -#define CONFIG_SYS_CBSIZE     1024            /* Console I/O buffer size */
 -#define CONFIG_SYS_PBSIZE     \
 -      (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 -                                              /* Print buffer size */
 -#define CONFIG_SYS_MAXARGS    32              /* Max number of command args */
 -#define CONFIG_SYS_BARGSIZE   CONFIG_SYS_CBSIZE
 -                                              /* Boot argument buffer size */
 -#define CONFIG_VERSION_VARIABLE                       /* U-BOOT version */
 -#define CONFIG_AUTO_COMPLETE                  /* Command auto complete */
 -#define CONFIG_CMDLINE_EDITING                        /* Command history etc */
 -#define CONFIG_SYS_HUSH_PARSER
 +/* Environment */
 +#define CONFIG_ENV_IS_IN_MMC
 +#define CONFIG_ENV_OVERWRITE
  
 -/*
 - * Serial Driver
 - */
 -#define CONFIG_PL011_SERIAL
 -#define CONFIG_PL011_CLOCK            24000000
 -#define CONFIG_PL01x_PORTS            { (void *)MXS_UARTDBG_BASE }
 -#define CONFIG_CONS_INDEX             0
 -#define CONFIG_BAUDRATE                       115200  /* Default baud rate */
 +/* Environment is in MMC */
 +#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
 +#define CONFIG_ENV_OFFSET     (256 * 1024)
 +#define CONFIG_ENV_SIZE               (16 * 1024)
 +#define CONFIG_SYS_MMC_ENV_DEV        0
 +#endif
  
 -/*
 - * Status LED
 - */
 +/* Status LED */
  #define CONFIG_STATUS_LED
  #define CONFIG_GPIO_LED
  #define CONFIG_BOARD_SPECIFIC_LED
 -#define STATUS_LED_BOOT       0
 -#define STATUS_LED_BIT        MX23_PAD_SSP1_DETECT__GPIO_2_1
 +#define STATUS_LED_BOOT               0
 +#define STATUS_LED_BIT                MX23_PAD_SSP1_DETECT__GPIO_2_1
  #define STATUS_LED_STATE      STATUS_LED_ON
  #define STATUS_LED_PERIOD     (CONFIG_SYS_HZ / 2)
  
 -/*
 - * MMC Driver
 - */
 -#ifdef CONFIG_CMD_MMC
 -#define CONFIG_MMC
 -#define CONFIG_BOUNCE_BUFFER
 -#define CONFIG_GENERIC_MMC
 -#define CONFIG_MXS_MMC
 -#endif
 -
 -/*
 - * APBH DMA
 - */
 -#define CONFIG_APBH_DMA
 -
  /* USB */
  #ifdef CONFIG_CMD_USB
 -#define CONFIG_USB_EHCI
 -#define CONFIG_USB_EHCI_MXS
  #define CONFIG_EHCI_MXS_PORT0
  #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 -#define CONFIG_EHCI_IS_TDI
  #define CONFIG_USB_STORAGE
  #endif
  
  #define CONFIG_USB_ETHER_SMSC95XX
  #endif
  
 -/*
 - * Boot Linux
 - */
 -#define CONFIG_CMDLINE_TAG
 -#define CONFIG_SETUP_MEMORY_TAGS
 +/* Booting Linux */
  #define CONFIG_BOOTDELAY      3
  #define CONFIG_BOOTFILE               "uImage"
  #define CONFIG_LOADADDR               0x42000000
  #define CONFIG_SYS_LOAD_ADDR  CONFIG_LOADADDR
 -#define CONFIG_OF_LIBFDT
  
 -/*
 - * Environment
 - */
 -#define CONFIG_ENV_IS_IN_MMC
 -#define CONFIG_ENV_OVERWRITE
 -#ifdef CONFIG_ENV_IS_IN_MMC
 -#define CONFIG_ENV_OFFSET     (256 * 1024)
 -#define CONFIG_ENV_SIZE       (16 * 1024)
 -#define CONFIG_SYS_MMC_ENV_DEV 0
 -#endif
 -
 -/*
 - * Extra Environments
 - */
 +/* Extra Environment */
  #define CONFIG_EXTRA_ENV_SETTINGS \
        "update_sd_firmware_filename=u-boot.sd\0" \
        "update_sd_firmware="           /* Update the SD firmware partition */ \
                "fi; " \
        "else run netboot; fi"
  
 -#endif /* __MX23_OLINUXINO_CONFIG_H__ */
 +/* The rest of the configuration is shared */
 +#include <configs/mxs.h>
 +
 +#endif /* __CONFIGS_MX23_OLINUXINO_H__ */
index b52b9e68e08729a7d4daa92a5444f51aafa7c4af,2380649e06607403bbecdb1d01d09a2e3ff544fc..1b40a36fcf587629beb54932b13418dcb699f01a
@@@ -4,30 -4,35 +4,17 @@@
   * Copyright (C) 2013 Otavio Salvador <otavio@ossystems.com.br>
   * on behalf of O.S. Systems Software LTDA.
   *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation; either version 2 of the License, or
-  * (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-  *
+  * SPDX-License-Identifier:   GPL-2.0+
   */
 -#ifndef __MX23EVK_CONFIG_H__
 -#define __MX23EVK_CONFIG_H__
 +#ifndef __CONFIGS_MX23EVK_H__
 +#define __CONFIGS_MX23EVK_H__
  
 -/* SoC configurations */
 +/* System configurations */
  #define CONFIG_MX23                           /* i.MX23 SoC */
 -
 -#include <asm/arch/regs-base.h>
 -
 -#define CONFIG_MXS_GPIO                       /* GPIO control */
 -#define CONFIG_SYS_HZ         1000            /* Ticks per second */
 -
  #define CONFIG_MACH_TYPE      MACH_TYPE_MX23EVK
  
 -#define CONFIG_SYS_NO_FLASH
 -#define CONFIG_BOARD_EARLY_INIT_F
 -#define CONFIG_ARCH_MISC_INIT
 -
 -/* SPL */
 -#define CONFIG_SPL
 -#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
 -#define CONFIG_SPL_START_S_PATH       "arch/arm/cpu/arm926ejs/mxs"
 -#define CONFIG_SPL_LDSCRIPT   "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
 -#define CONFIG_SPL_LIBCOMMON_SUPPORT
 -#define CONFIG_SPL_LIBGENERIC_SUPPORT
 -#define CONFIG_SPL_GPIO_SUPPORT
 -
  /* U-Boot Commands */
 +#define CONFIG_SYS_NO_FLASH
  #include <config_cmd_default.h>
  #undef CONFIG_CMD_NET
  #undef CONFIG_CMD_NFS
  #define CONFIG_CMD_BOOTZ
  #define CONFIG_VIDEO
  
 -/* Memory configurations */
 +/* Memory configuration */
  #define CONFIG_NR_DRAM_BANKS          1               /* 1 bank of DRAM */
  #define PHYS_SDRAM_1                  0x40000000      /* Base address */
  #define PHYS_SDRAM_1_SIZE             0x08000000      /* Max 128 MB RAM */
 -#define CONFIG_STACKSIZE              (128 * 1024)    /* 128 KB stack */
 -#define CONFIG_SYS_MALLOC_LEN         0x00400000      /* 4 MB for malloc */
 -#define CONFIG_SYS_MEMTEST_START      0x40000000      /* Memtest start adr */
 -#define CONFIG_SYS_MEMTEST_END                0x40400000      /* 4 MB RAM test */
  #define CONFIG_SYS_SDRAM_BASE         PHYS_SDRAM_1
 -/* Point initial SP in SRAM so SPL can use it too. */
 -
 -#define CONFIG_SYS_INIT_RAM_ADDR      0x00000000
 -#define CONFIG_SYS_INIT_RAM_SIZE      (128 * 1024)
 -
 -#define CONFIG_SYS_INIT_SP_OFFSET \
 -      (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 -#define CONFIG_SYS_INIT_SP_ADDR \
 -      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 -
 -/*
 - * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
 - * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
 - * binary. In case there was more of this mess, 0x100 bytes are skipped.
 - */
 -#define CONFIG_SYS_TEXT_BASE  0x40000100
  
 +/* Environment */
  #define CONFIG_ENV_OVERWRITE
 +#define CONFIG_ENV_IS_IN_MMC
  
 -/* U-Boot general configurations */
 -#define CONFIG_SYS_LONGHELP
 -#define CONFIG_SYS_PROMPT     "=> "
 -#define CONFIG_SYS_CBSIZE     256             /* Console I/O buffer size */
 -#define CONFIG_SYS_PBSIZE     \
 -      (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 -                                              /* Print buffer size */
 -#define CONFIG_SYS_MAXARGS    32              /* Max number of command args */
 -#define CONFIG_SYS_BARGSIZE   CONFIG_SYS_CBSIZE
 -                                              /* Boot argument buffer size */
 -#define CONFIG_VERSION_VARIABLE       /* U-BOOT version */
 -#define CONFIG_AUTO_COMPLETE          /* Command auto complete */
 -#define CONFIG_CMDLINE_EDITING                /* Command history etc */
 -#define CONFIG_SYS_HUSH_PARSER
 -#define CONFIG_SYS_PROMPT_HUSH_PS2    "> "
 -
 -/* Serial Driver */
 -#define CONFIG_PL011_SERIAL
 -#define CONFIG_PL011_CLOCK            24000000
 -#define CONFIG_PL01x_PORTS            { (void *)MXS_UARTDBG_BASE }
 -#define CONFIG_CONS_INDEX             0
 -#define CONFIG_BAUDRATE                       115200  /* Default baud rate */
 -
 -/* DMA */
 -#define CONFIG_APBH_DMA
 -
 -/* MMC Driver */
 -#ifdef        CONFIG_CMD_MMC
 -#define CONFIG_MMC
 -#define CONFIG_GENERIC_MMC
 -#define CONFIG_BOUNCE_BUFFER
 -#define CONFIG_MXS_MMC
 +/* Environment is in MMC */
 +#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
 +#define CONFIG_ENV_OFFSET     (256 * 1024)
 +#define CONFIG_ENV_SIZE               (16 * 1024)
 +#define CONFIG_SYS_MMC_ENV_DEV        0
  #endif
  
  /* USB */
  #ifdef        CONFIG_CMD_USB
 -#define CONFIG_USB_EHCI
 -#define CONFIG_USB_EHCI_MXS
  #define CONFIG_EHCI_MXS_PORT0
  #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 -#define CONFIG_EHCI_IS_TDI
  #define CONFIG_USB_STORAGE
  #endif
  
  /* Framebuffer support */
  #ifdef CONFIG_VIDEO
 -#define CONFIG_CFB_CONSOLE
 -#define CONFIG_VIDEO_MXS
  #define CONFIG_VIDEO_LOGO
 -#define CONFIG_VIDEO_SW_CURSOR
 -#define CONFIG_VGA_AS_SINGLE_DEVICE
 -#define CONFIG_SYS_CONSOLE_IS_IN_ENV
  #define CONFIG_SPLASH_SCREEN
  #define CONFIG_CMD_BMP
  #define CONFIG_BMP_16BPP
  #endif
  
  /* Boot Linux */
 -#define CONFIG_CMDLINE_TAG
 -#define CONFIG_SETUP_MEMORY_TAGS
  #define CONFIG_BOOTDELAY      1
 -#define CONFIG_BOOTFILE       "uImage"
 -#define CONFIG_LOADADDR       0x42000000
 +#define CONFIG_BOOTFILE               "uImage"
 +#define CONFIG_LOADADDR               0x42000000
  #define CONFIG_SYS_LOAD_ADDR  CONFIG_LOADADDR
 -#define CONFIG_OF_LIBFDT
 -
 -/* Environment */
 -#define CONFIG_ENV_IS_IN_MMC
 -#ifdef CONFIG_ENV_IS_IN_MMC
 - #define CONFIG_ENV_OFFSET    (256 * 1024)
 - #define CONFIG_ENV_SIZE      (16 * 1024)
 - #define CONFIG_SYS_MMC_ENV_DEV 0
 -#endif
  
  /* Extra Environments */
  #define CONFIG_EXTRA_ENV_SETTINGS \
                "fi; " \
        "else exit; fi"
  
 -#endif /* __MX23EVK_CONFIG_H__ */
 +/* The rest of the configuration is shared */
 +#include <configs/mxs.h>
 +
 +#endif /* __CONFIGS_MX23EVK_H__ */
index 877b811052ffd3f92f78a4caf49fbf816e313450,885e513f9d99425f4c854f8abc1d05f8b0d52a28..07f88ca4c7df17ec58845c1ed6c7885bc07f43d8
@@@ -6,26 -6,35 +6,18 @@@
   * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
   * on behalf of DENX Software Engineering GmbH
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
-  * GNU General Public License for more details.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
 -#ifndef __MX28EVK_CONFIG_H__
 -#define __MX28EVK_CONFIG_H__
 +#ifndef __CONFIGS_MX28EVK_H__
 +#define __CONFIGS_MX28EVK_H__
  
 -/* SoC configurations */
 +/* System configurations */
  #define CONFIG_MX28                           /* i.MX28 SoC */
 -
 -#define CONFIG_MXS_GPIO                       /* GPIO control */
 -#define CONFIG_SYS_HZ         1000            /* Ticks per second */
 -
  #define CONFIG_MACH_TYPE      MACH_TYPE_MX28EVK
 -
 -#include <asm/arch/regs-base.h>
 -
 -#define CONFIG_SYS_NO_FLASH
 -#define CONFIG_BOARD_EARLY_INIT_F
 -#define CONFIG_ARCH_MISC_INIT
 -
 -/* SPL */
 -#define CONFIG_SPL
 -#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
 -#define CONFIG_SPL_START_S_PATH       "arch/arm/cpu/arm926ejs/mxs"
 -#define CONFIG_SPL_LDSCRIPT   "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
 -#define CONFIG_SPL_LIBCOMMON_SUPPORT
 -#define CONFIG_SPL_LIBGENERIC_SUPPORT
 -#define CONFIG_SPL_GPIO_SUPPORT
 +#define CONFIG_SYS_PROMPT     "MX28EVK U-Boot > "
  
  /* U-Boot Commands */
 +#define CONFIG_SYS_NO_FLASH
  #include <config_cmd_default.h>
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DOS_PARTITION
@@@ -40,7 -49,6 +32,7 @@@
  #define CONFIG_CMD_NET
  #define CONFIG_CMD_NFS
  #define CONFIG_CMD_PING
 +#define CONFIG_CMD_SAVEENV
  #define CONFIG_CMD_SETEXPR
  #define CONFIG_CMD_SF
  #define CONFIG_CMD_SPI
  #define CONFIG_CMD_NAND_TRIMFFS
  #define CONFIG_VIDEO
  
 -/* Memory configurations */
 +/* Memory configuration */
  #define CONFIG_NR_DRAM_BANKS          1               /* 1 bank of DRAM */
  #define PHYS_SDRAM_1                  0x40000000      /* Base address */
  #define PHYS_SDRAM_1_SIZE             0x40000000      /* Max 1 GB RAM */
 -#define CONFIG_SYS_MALLOC_LEN         0x00400000      /* 4 MB for malloc */
 -#define CONFIG_SYS_MEMTEST_START      0x40000000      /* Memtest start adr */
 -#define CONFIG_SYS_MEMTEST_END                0x40400000      /* 4 MB RAM test */
  #define CONFIG_SYS_SDRAM_BASE         PHYS_SDRAM_1
 -/* Point initial SP in SRAM so SPL can use it too. */
 -
 -#define CONFIG_SYS_INIT_RAM_ADDR      0x00000000
 -#define CONFIG_SYS_INIT_RAM_SIZE      (128 * 1024)
 -
 -#define CONFIG_SYS_INIT_SP_OFFSET \
 -      (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 -#define CONFIG_SYS_INIT_SP_ADDR \
 -      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 -
 -/*
 - * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
 - * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
 - * binary. In case there was more of this mess, 0x100 bytes are skipped.
 - */
 -#define CONFIG_SYS_TEXT_BASE  0x40000100
  
 +/* Environment */
 +#define CONFIG_ENV_SIZE                       (16 * 1024)
  #define CONFIG_ENV_OVERWRITE
 -/* U-Boot general configurations */
 -#define CONFIG_SYS_LONGHELP
 -#define CONFIG_SYS_PROMPT     "MX28EVK U-Boot > "
 -#define CONFIG_SYS_CBSIZE     1024            /* Console I/O buffer size */
 -#define CONFIG_SYS_PBSIZE     \
 -      (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 -                                              /* Print buffer size */
 -#define CONFIG_SYS_MAXARGS    32              /* Max number of command args */
 -#define CONFIG_SYS_BARGSIZE   CONFIG_SYS_CBSIZE
 -                                              /* Boot argument buffer size */
 -#define CONFIG_VERSION_VARIABLE       /* U-BOOT version */
 -#define CONFIG_AUTO_COMPLETE          /* Command auto complete */
 -#define CONFIG_CMDLINE_EDITING                /* Command history etc */
 -#define CONFIG_SYS_HUSH_PARSER
 -
 -/* Serial Driver */
 -#define CONFIG_PL011_SERIAL
 -#define CONFIG_PL011_CLOCK            24000000
 -#define CONFIG_PL01x_PORTS            { (void *)MXS_UARTDBG_BASE }
 -#define CONFIG_CONS_INDEX             0
 -#define CONFIG_BAUDRATE                       115200  /* Default baud rate */
  
 -/* DMA */
 -#define CONFIG_APBH_DMA
 -
 -/* MMC Driver */
 -#ifdef CONFIG_ENV_IS_IN_MMC
 - #define CONFIG_ENV_OFFSET    (256 * 1024)
 - #define CONFIG_ENV_SIZE      (16 * 1024)
 - #define CONFIG_SYS_MMC_ENV_DEV 0
 -#endif
 -#define CONFIG_CMD_SAVEENV
 -#ifdef        CONFIG_CMD_MMC
 -#define CONFIG_MMC
 -#define CONFIG_GENERIC_MMC
 -#define CONFIG_BOUNCE_BUFFER
 -#define CONFIG_MXS_MMC
 +/* Environment is in MMC */
 +#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
 +#define CONFIG_ENV_OFFSET             (256 * 1024)
 +#define CONFIG_SYS_MMC_ENV_DEV                0
  #endif
  
 -/* NAND Driver */
 -#define CONFIG_ENV_SIZE                       (16 * 1024)
 -#ifdef CONFIG_CMD_NAND
 -#define CONFIG_NAND_MXS
 -#define CONFIG_SYS_MAX_NAND_DEVICE    1
 -#define CONFIG_SYS_NAND_BASE          0x60000000
 -#define CONFIG_SYS_NAND_5_ADDR_CYCLE
 -
  /* Environment is in NAND */
 -#ifdef CONFIG_ENV_IS_IN_NAND
 +#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
  #define CONFIG_ENV_SIZE_REDUND                CONFIG_ENV_SIZE
  #define CONFIG_ENV_SECT_SIZE          (128 * 1024)
  #define CONFIG_ENV_RANGE              (512 * 1024)
                (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
  #endif
  
 +/* Environemnt is in SPI flash */
 +#if defined(CONFIG_CMD_SF) && defined(CONFIG_ENV_IS_IN_SPI_FLASH)
 +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 +#define CONFIG_ENV_SIZE                       0x1000          /* 4KB */
 +#define CONFIG_ENV_OFFSET             0x40000         /* 256K */
 +#define CONFIG_ENV_OFFSET_REDUND      (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 +#define CONFIG_ENV_SECT_SIZE          0x1000
 +#define CONFIG_ENV_SPI_CS             0
 +#define CONFIG_ENV_SPI_BUS            2
 +#define CONFIG_ENV_SPI_MAX_HZ         24000000
 +#define CONFIG_ENV_SPI_MODE           SPI_MODE_0
 +#endif
 +
 +/* UBI and NAND partitioning */
 +#ifdef CONFIG_CMD_NAND
  #define CONFIG_CMD_UBI
  #define CONFIG_CMD_UBIFS
  #define CONFIG_CMD_MTDPARTS
                "-(filesystem)"
  #endif
  
 -/* Ethernet on SOC (FEC) */
 +/* FEC Ethernet on SoC */
  #ifdef        CONFIG_CMD_NET
 -#define CONFIG_NET_MULTI
 -#define CONFIG_ETHPRIME       "FEC0"
  #define CONFIG_FEC_MXC
 -#define CONFIG_MII
 -#define CONFIG_FEC_XCV_TYPE   RMII
 +#define CONFIG_NET_MULTI
  #define CONFIG_MX28_FEC_MAC_IN_OCOTP
  #endif
  
  
  /* USB */
  #ifdef        CONFIG_CMD_USB
 -#define       CONFIG_USB_EHCI
 -#define       CONFIG_USB_EHCI_MXS
  #define CONFIG_EHCI_MXS_PORT1
  #define CONFIG_USB_MAX_CONTROLLER_COUNT       1
 -#define       CONFIG_EHCI_IS_TDI
  #define       CONFIG_USB_STORAGE
  #define       CONFIG_USB_HOST_ETHER
  #define       CONFIG_USB_ETHER_ASIX
  #define       CONFIG_USB_ETHER_SMSC95XX
  #endif
  
 -/* I2C */
 -#ifdef CONFIG_CMD_I2C
 -#define CONFIG_I2C_MXS
 -#define CONFIG_HARD_I2C
 -#define CONFIG_SYS_I2C_SPEED  400000
 -#endif
 -
  /* SPI */
  #ifdef CONFIG_CMD_SPI
 -#define CONFIG_HARD_SPI
 -#define CONFIG_MXS_SPI
 -#define CONFIG_SPI_HALF_DUPLEX
  #define CONFIG_DEFAULT_SPI_BUS                2
  #define CONFIG_DEFAULT_SPI_MODE               SPI_MODE_0
  
  /* SPI Flash */
  #ifdef CONFIG_CMD_SF
  #define CONFIG_SPI_FLASH
 -#define CONFIG_SF_DEFAULT_BUS 2
 -#define CONFIG_SF_DEFAULT_CS  0
 +#define CONFIG_SF_DEFAULT_BUS         2
 +#define CONFIG_SF_DEFAULT_CS          0
  /* this may vary and depends on the installed chip */
  #define CONFIG_SPI_FLASH_SST
  #define CONFIG_SF_DEFAULT_MODE                SPI_MODE_0
  #define CONFIG_SF_DEFAULT_SPEED               24000000
 -
 -/* (redundant) environemnt in SPI flash */
 -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 -#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 -#define CONFIG_ENV_SIZE                       0x1000          /* 4KB */
 -#define CONFIG_ENV_OFFSET             0x40000         /* 256K */
 -#define CONFIG_ENV_OFFSET_REDUND      (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 -#define CONFIG_ENV_SECT_SIZE          0x1000
 -#define CONFIG_ENV_SPI_CS             0
 -#define CONFIG_ENV_SPI_BUS            2
 -#define CONFIG_ENV_SPI_MAX_HZ         24000000
 -#define CONFIG_ENV_SPI_MODE           SPI_MODE_0
 -#endif
  #endif
 +
  #endif
  
  /* Framebuffer support */
  #ifdef CONFIG_VIDEO
 -#define CONFIG_CFB_CONSOLE
 -#define CONFIG_VIDEO_MXS
  #define CONFIG_VIDEO_LOGO
 -#define CONFIG_VIDEO_SW_CURSOR
 -#define CONFIG_VGA_AS_SINGLE_DEVICE
 -#define CONFIG_SYS_CONSOLE_IS_IN_ENV
  #define CONFIG_SPLASH_SCREEN
  #define CONFIG_CMD_BMP
  #define CONFIG_BMP_16BPP
  #endif
  
  /* Boot Linux */
 -#define CONFIG_CMDLINE_TAG
 -#define CONFIG_SETUP_MEMORY_TAGS
  #define CONFIG_BOOTDELAY      1
 -#define CONFIG_BOOTFILE       "uImage"
 -#define CONFIG_LOADADDR       0x42000000
 +#define CONFIG_BOOTFILE               "uImage"
 +#define CONFIG_LOADADDR               0x42000000
  #define CONFIG_SYS_LOAD_ADDR  CONFIG_LOADADDR
 -#define CONFIG_OF_LIBFDT
  
 -/* Extra Environments */
 +/* Extra Environment */
  #define CONFIG_EXTRA_ENV_SETTINGS \
        "update_nand_full_filename=u-boot.nand\0" \
        "update_nand_firmware_filename=u-boot.sb\0"     \
                "fi; " \
        "else run netboot; fi"
  
 -#endif /* __MX28EVK_CONFIG_H__ */
 +/* The rest of the configuration is shared */
 +#include <configs/mxs.h>
 +
 +#endif /* __CONFIGS_MX28EVK_H__ */
index dd93fffab0dc2bdfc2b5fe6c2741787217c67f1e,dad8618c0ad93462fe85e2a52a1b2d384b451dc7..bf6113b2aa1a4e6cc095fee93ccfc17bf70b3c67
@@@ -3,15 -3,7 +3,7 @@@
   *
   * Configuration settings for the Freescale i.MX6Q SabreSD board.
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
-  * GNU General Public License for more details.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #ifndef __MX6QSABRE_COMMON_CONFIG_H
@@@ -20,7 -12,6 +12,7 @@@
  #define CONFIG_MX6
  
  #include "mx6_common.h"
 +#include <asm/sizes.h>
  
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DISPLAY_BOARDINFO
@@@ -33,7 -24,7 +25,7 @@@
  #define CONFIG_REVISION_TAG
  
  /* Size of malloc() pool */
 -#define CONFIG_SYS_MALLOC_LEN         (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
 +#define CONFIG_SYS_MALLOC_LEN         (10 * SZ_1M)
  
  #define CONFIG_BOARD_EARLY_INIT_F
  #define CONFIG_BOARD_LATE_INIT
index 5637c190250dff0f3a3819103d1e857d1d00eb83,57e1860b1b1a6354138a36f0c6b02ea5a78fc6b3..a3dd74a4a254d9f93535e595425f0b1f53d56e8d
@@@ -3,23 -3,12 +3,15 @@@
   *
   * Configuration settings for the Freescale i.MX6Q SabreSD board.
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
-  * GNU General Public License for more details.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #ifndef __MX6QSABRESD_CONFIG_H
  #define __MX6QSABRESD_CONFIG_H
  
 +#include <asm/arch/imx-regs.h>
 +#include <asm/imx-common/gpio.h>
 +
  #define CONFIG_MACH_TYPE      3980
  #define CONFIG_MXC_UART_BASE  UART1_BASE
  #define CONFIG_CONSOLE_DEV            "ttymxc0"
  #define CONFIG_SYS_MMC_ENV_DEV                1       /* SDHC3 */
  #endif
  
 +/* Framebuffer */
 +#define CONFIG_VIDEO
 +#define CONFIG_VIDEO_IPUV3
 +#define CONFIG_CFB_CONSOLE
 +#define CONFIG_VGA_AS_SINGLE_DEVICE
 +#define CONFIG_SYS_CONSOLE_IS_IN_ENV
 +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 +#define CONFIG_VIDEO_BMP_RLE8
 +#define CONFIG_SPLASH_SCREEN
 +#define CONFIG_SPLASH_SCREEN_ALIGN
 +#define CONFIG_BMP_16BPP
 +#define CONFIG_VIDEO_LOGO
 +#define CONFIG_VIDEO_BMP_LOGO
 +#define CONFIG_IPUV3_CLK 260000000
 +#define CONFIG_IMX_HDMI
 +
  #endif                         /* __MX6QSABRESD_CONFIG_H */
index b057039170a05c9e465f3e005dadbb6b0f6f6073,4242414266cb9f305603198017644be69aaddda3..3454b862a8df6505fff04d3026bd706a495ef83c
@@@ -4,20 -4,7 +4,7 @@@
   * Configuration settings for the Boundary Devices Nitrogen6X
   * and Freescale i.MX6Q Sabre Lite boards.
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #ifndef __CONFIG_H
  #define CONFIG_IPUV3_CLK 260000000
  #define CONFIG_CMD_HDMIDETECT
  #define CONFIG_CONSOLE_MUX
 +#define CONFIG_IMX_HDMI
  
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
  
  #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
  
 +#if defined(CONFIG_SABRELITE)
 +#define CONFIG_EXTRA_ENV_SETTINGS \
 +      "script=boot.scr\0" \
 +      "uimage=uImage\0" \
 +      "console=ttymxc1\0" \
 +      "fdt_high=0xffffffff\0" \
 +      "initrd_high=0xffffffff\0" \
 +      "fdt_file=imx6q-sabrelite.dtb\0" \
 +      "fdt_addr=0x11000000\0" \
 +      "boot_fdt=try\0" \
 +      "ip_dyn=yes\0" \
 +      "mmcdev=0\0" \
 +      "mmcpart=1\0" \
 +      "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
 +      "mmcargs=setenv bootargs console=${console},${baudrate} " \
 +              "root=${mmcroot}\0" \
 +      "loadbootscript=" \
 +              "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
 +      "bootscript=echo Running bootscript from mmc ...; " \
 +              "source\0" \
 +      "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
 +      "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
 +      "mmcboot=echo Booting from mmc ...; " \
 +              "run mmcargs; " \
 +              "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
 +                      "if run loadfdt; then " \
 +                              "bootm ${loadaddr} - ${fdt_addr}; " \
 +                      "else " \
 +                              "if test ${boot_fdt} = try; then " \
 +                                      "bootm; " \
 +                              "else " \
 +                                      "echo WARN: Cannot load the DT; " \
 +                              "fi; " \
 +                      "fi; " \
 +              "else " \
 +                      "bootm; " \
 +              "fi;\0" \
 +      "netargs=setenv bootargs console=${console},${baudrate} " \
 +              "root=/dev/nfs " \
 +      "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
 +              "netboot=echo Booting from net ...; " \
 +              "run netargs; " \
 +              "if test ${ip_dyn} = yes; then " \
 +                      "setenv get_cmd dhcp; " \
 +              "else " \
 +                      "setenv get_cmd tftp; " \
 +              "fi; " \
 +              "${get_cmd} ${uimage}; " \
 +              "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
 +                      "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
 +                              "bootm ${loadaddr} - ${fdt_addr}; " \
 +                      "else " \
 +                              "if test ${boot_fdt} = try; then " \
 +                                      "bootm; " \
 +                              "else " \
 +                                      "echo WARN: Cannot load the DT; " \
 +                              "fi; " \
 +                      "fi; " \
 +              "else " \
 +                      "bootm; " \
 +              "fi;\0"
 +
 +#define CONFIG_BOOTCOMMAND \
 +         "mmc dev ${mmcdev}; if mmc rescan; then " \
 +                 "if run loadbootscript; then " \
 +                         "run bootscript; " \
 +                 "else " \
 +                         "if run loaduimage; then " \
 +                                 "run mmcboot; " \
 +                         "else run netboot; " \
 +                         "fi; " \
 +                 "fi; " \
 +         "else run netboot; fi"
 +#else
  #define CONFIG_EXTRA_ENV_SETTINGS \
        "console=ttymxc1\0" \
        "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
                "done ; " \
        "done\0" \
  
 +#endif
  /* Miscellaneous configurable options */
  #define CONFIG_SYS_LONGHELP
  #define CONFIG_SYS_HUSH_PARSER
  
  #define CONFIG_ENV_SIZE                       (8 * 1024)
  
 -/* #define CONFIG_ENV_IS_IN_MMC */
 +#if defined(CONFIG_SABRELITE)
 +#define CONFIG_ENV_IS_IN_MMC
 +#else
  #define CONFIG_ENV_IS_IN_SPI_FLASH
 +#endif
  
  #if defined(CONFIG_ENV_IS_IN_MMC)
  #define CONFIG_ENV_OFFSET             (6 * 64 * 1024)
index b7b46b4a50017b777addb8f68e54c1ee83cb6660,9c2eb05c04663e65a1da404eacb1d3003b901b9a..58ffa36dd9f7f316fb0dfd4afb3115a416237865
@@@ -4,31 -4,50 +4,18 @@@
   * Copyright (C) 2012 Marek Vasut <marex@denx.de>
   * on behalf of DENX Software Engineering GmbH
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-  * MA 02111-1307 USA
+  * SPDX-License-Identifier:   GPL-2.0+ 
   */
 -#ifndef __SC_SPS_1_H__
 -#define __SC_SPS_1_H__
 +#ifndef __CONFIGS_SC_SPS_1_H__
 +#define __CONFIGS_SC_SPS_1_H__
  
 -/*
 - * SoC configurations
 - */
 +/* System configuration */
  #define CONFIG_MX28                           /* i.MX28 SoC */
 -#define CONFIG_MXS_GPIO                               /* GPIO control */
 -#define CONFIG_SYS_HZ         1000            /* Ticks per second */
 -
 -/*
 - * Define SC_SPS_1 machine type by hand until it lands in mach-types
 - */
  #define MACH_TYPE_SC_SPS_1    4172
 -
  #define CONFIG_MACH_TYPE      MACH_TYPE_SC_SPS_1
  
 -#include <asm/arch/regs-base.h>
 -
 +/* U-Boot Commands */
  #define CONFIG_SYS_NO_FLASH
 -#define CONFIG_BOARD_EARLY_INIT_F
 -#define CONFIG_ARCH_CPU_INIT
 -#define CONFIG_ARCH_MISC_INIT
 -
 -#define CONFIG_ENV_IS_IN_MMC
 -
 -#define CONFIG_OF_LIBFDT
 -
 -/*
 - * SPL
 - */
 -#define CONFIG_SPL
 -#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
 -#define CONFIG_SPL_START_S_PATH               "arch/arm/cpu/arm926ejs/mxs"
 -#define CONFIG_SPL_LDSCRIPT   "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
 -#define CONFIG_SPL_LIBCOMMON_SUPPORT
 -#define CONFIG_SPL_LIBGENERIC_SUPPORT
 -#define CONFIG_SPL_GPIO_SUPPORT
 -
 -/*
 - * U-Boot Commands
 - */
  #include <config_cmd_default.h>
  #define CONFIG_DISPLAY_CPUINFO
  #define CONFIG_DOS_PARTITION
  #define CONFIG_CMD_SETEXPR
  #define CONFIG_CMD_USB
  
 -/*
 - * Memory configurations
 - */
 +/* Memory configuration */
  #define CONFIG_NR_DRAM_BANKS          1               /* 1 bank of DRAM */
  #define PHYS_SDRAM_1                  0x40000000      /* Base address */
  #define PHYS_SDRAM_1_SIZE             0x40000000      /* Max 1 GB RAM */
 -#define CONFIG_STACKSIZE              0x00010000      /* 128 KB stack */
 -#define CONFIG_SYS_MALLOC_LEN         0x00400000      /* 4 MB for malloc */
 -#define CONFIG_SYS_GBL_DATA_SIZE      128             /* Initial data */
 -#define CONFIG_SYS_MEMTEST_START      0x40000000      /* Memtest start adr */
 -#define CONFIG_SYS_MEMTEST_END                0x40400000      /* 4 MB RAM test */
  #define CONFIG_SYS_SDRAM_BASE         PHYS_SDRAM_1
  
 -/* Point initial SP in SRAM so SPL can use it too. */
 -#define CONFIG_SYS_INIT_RAM_ADDR      0x00000000
 -#define CONFIG_SYS_INIT_RAM_SIZE      (128 * 1024)
 -
 -#define CONFIG_SYS_INIT_SP_OFFSET \
 -      (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 -#define CONFIG_SYS_INIT_SP_ADDR \
 -      (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 -/*
 - * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
 - * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
 - * binary. In case there was more of this mess, 0x100 bytes are skipped.
 - */
 -#define CONFIG_SYS_TEXT_BASE          0x40000100
 -
 -/*
 - * U-Boot general configurations
 - */
 -#define CONFIG_SYS_LONGHELP
 -#define CONFIG_SYS_PROMPT     "=> "
 -#define CONFIG_SYS_CBSIZE     1024            /* Console I/O buffer size */
 -#define CONFIG_SYS_PBSIZE     \
 -      (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 -                                              /* Print buffer size */
 -#define CONFIG_SYS_MAXARGS    32              /* Max number of command args */
 -#define CONFIG_SYS_BARGSIZE   CONFIG_SYS_CBSIZE
 -                                              /* Boot argument buffer size */
 -#define CONFIG_VERSION_VARIABLE                       /* U-BOOT version */
 -#define CONFIG_AUTO_COMPLETE                  /* Command auto complete */
 -#define CONFIG_CMDLINE_EDITING                        /* Command history etc */
 -#define CONFIG_SYS_HUSH_PARSER
 -#define CONFIG_SYS_PROMPT_HUSH_PS2    "> "
 -
 -/*
 - * Serial Driver
 - */
 -#define CONFIG_PL011_SERIAL
 -#define CONFIG_PL011_CLOCK            24000000
 -#define CONFIG_PL01x_PORTS            { (void *)MXS_UARTDBG_BASE }
 -#define CONFIG_CONS_INDEX             0
 -#define CONFIG_BAUDRATE                       115200  /* Default baud rate */
 -#define CONFIG_SYS_BAUDRATE_TABLE     { 9600, 19200, 38400, 57600, 115200 }
 -
 -/*
 - * MMC Driver
 - */
 -#ifdef CONFIG_CMD_MMC
 -#define CONFIG_APBH_DMA
 -#define CONFIG_MMC
 -#define CONFIG_BOUNCE_BUFFER
 -#define CONFIG_GENERIC_MMC
 -#define CONFIG_MXS_MMC
 -#endif
 +/* Environment */
  #define CONFIG_ENV_SIZE                       (16 * 1024)
 -#ifdef CONFIG_ENV_IS_IN_MMC
 +#define CONFIG_ENV_IS_IN_MMC
 +
 +/* Environment is in MMC */
 +#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
  #define CONFIG_ENV_OFFSET             (256 * 1024)
  #define CONFIG_SYS_MMC_ENV_DEV                0
  #else
  #define CONFIG_ENV_IS_NOWHERE
  #endif
  
 -/*
 - * Ethernet on SOC (FEC)
 - */
 +/* FEC Ethernet on SoC */
  #ifdef CONFIG_CMD_NET
 -#define CONFIG_ETHPRIME                       "FEC0"
  #define CONFIG_FEC_MXC
 -#define CONFIG_MII
 -#define CONFIG_FEC_XCV_TYPE           RMII
  #define CONFIG_PHYLIB
  #define CONFIG_PHY_SMSC
  #endif
  
 -/*
 - * USB
 - */
 +/* USB */
  #ifdef CONFIG_CMD_USB
 -#define CONFIG_USB_EHCI
 -#define CONFIG_USB_EHCI_MXS
  #define CONFIG_EHCI_MXS_PORT0
  #define CONFIG_USB_MAX_CONTROLLER_COUNT       1
 -#define CONFIG_EHCI_IS_TDI
  #define CONFIG_USB_STORAGE
  #endif
  
 -/*
 - * Boot Linux
 - */
 -#define CONFIG_CMDLINE_TAG
 -#define CONFIG_SETUP_MEMORY_TAGS
 +/* Booting Linux */
  #define CONFIG_BOOTDELAY      3
  #define CONFIG_BOOTFILE               "uImage"
  #define CONFIG_BOOTARGS               "console=ttyAMA0,115200"
 -#define CONFIG_BOOTCOMMAND    "bootm "
 +#define CONFIG_BOOTCOMMAND    "bootm"
  #define CONFIG_LOADADDR               0x42000000
  #define CONFIG_SYS_LOAD_ADDR  CONFIG_LOADADDR
  
 -/*
 - * Extra Environments
 - */
 +/* Extra Environment */
  #define CONFIG_EXTRA_ENV_SETTINGS                                     \
        "update_sd_firmware_filename=u-boot.sd\0"                       \
        "update_sd_firmware="           /* Update the SD firmware partition */ \
                "fi ; "                                                 \
                "fi\0"
  
 -#endif /* __SC_SPS_1_H__ */
 +/* The rest of the configuration is shared */
 +#include <configs/mxs.h>
 +
 +#endif /* __CONFIGS_SC_SPS_1_H__ */
index 1f83e89fa5cb73fe823fda422e11dcdeebf4a563,9c23b2620049ab0f5c1eba653a1cf4446ac84615..665cfc3cfa1c87ddaa3ded5188f04b9a788b49f6
@@@ -3,10 -3,7 +3,7 @@@
   *
   * Configuration settings for the Wandboard.
   *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License as
-  * published by the Free Software Foundation; either version 2 of
-  * the License, or (at your option) any later version.
+  * SPDX-License-Identifier:   GPL-2.0+
   */
  
  #ifndef __CONFIG_H
  #define CONFIG_VIDEO_LOGO
  #define CONFIG_VIDEO_BMP_LOGO
  #define CONFIG_IPUV3_CLK 260000000
 +#define CONFIG_IMX_HDMI
  
  #if defined(CONFIG_MX6DL)
  #define CONFIG_DEFAULT_FDT_FILE               "imx6dl-wandboard.dtb"
        "script=boot.scr\0" \
        "uimage=uImage\0" \
        "console=ttymxc0\0" \
 +      "splashpos=m,m\0" \
        "fdt_high=0xffffffff\0" \
        "initrd_high=0xffffffff\0" \
        "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \