]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-arm
authorTom Rini <trini@ti.com>
Fri, 12 Jul 2013 14:36:48 +0000 (10:36 -0400)
committerTom Rini <trini@ti.com>
Fri, 12 Jul 2013 14:36:48 +0000 (10:36 -0400)
Fix a trivial conflict in arch/arm/dts/exynos5250.dtsi about gpio and
serial.

Conflicts:
arch/arm/dts/exynos5250.dtsi

Signed-off-by: Tom Rini <trini@ti.com>
12 files changed:
1  2 
arch/arm/dts/exynos5250.dtsi
arch/arm/include/asm/arch-exynos/cpu.h
board/samsung/dts/exynos5250-snow.dts
boards.cfg
drivers/spi/mxc_spi.c
include/configs/beaver.h
include/configs/cardhu.h
include/configs/dalmore.h
include/configs/exynos5250-dt.h
include/configs/ventana.h
include/fdtdec.h
lib/fdtdec.c

index 2d6dfff5917b3747e6ee039e85b84ccd00374f4b,f98243c7a575e37483b779e60b20cc2f56b081c9..4fff5e36942ccead7ebf059861ab7204e33eaaa0
                interrupts = <0 78 0>;
        };
  
+       serial@12C00000 {
+               compatible = "samsung,exynos4210-uart";
+               reg = <0x12C00000 0x100>;
+               interrupts = <0 51 0>;
+               id = <0>;
+       };
+       serial@12C10000 {
+               compatible = "samsung,exynos4210-uart";
+               reg = <0x12C10000 0x100>;
+               interrupts = <0 52 0>;
+               id = <1>;
+       };
+       serial@12C20000 {
+               compatible = "samsung,exynos4210-uart";
+               reg = <0x12C20000 0x100>;
+               interrupts = <0 53 0>;
+               id = <2>;
+       };
+       serial@12C30000 {
+               compatible = "samsung,exynos4210-uart";
+               reg = <0x12C30000 0x100>;
+               interrupts = <0 54 0>;
+               id = <3>;
+       };
++
 +      gpio: gpio {
 +      };
  };
index 1ff7642d069c10d4d217c73c6cc6f4bde737f56e,8685c429fe739d639260aa5740986a9d8352f787..1ff231bcffd459c060567f027c704ef6f1759b4d
@@@ -40,8 -40,7 +40,7 @@@
  #define EXYNOS4_WATCHDOG_BASE         0x10060000
  #define EXYNOS4_TZPC_BASE             0x10110000
  #define EXYNOS4_MIU_BASE              0x10600000
- #define EXYNOS4_DMC0_BASE             0x10400000
- #define EXYNOS4_DMC1_BASE             0x10410000
+ #define EXYNOS4_DMC_CTRL_BASE         0x10400000
  #define EXYNOS4_GPIO_PART2_BASE               0x11000000
  #define EXYNOS4_GPIO_PART1_BASE               0x11400000
  #define EXYNOS4_FIMD_BASE             0x11C00000
@@@ -64,6 -63,7 +63,7 @@@
  #define EXYNOS4_DP_BASE                       DEVICE_NOT_AVAILABLE
  #define EXYNOS4_SPI_ISP_BASE          DEVICE_NOT_AVAILABLE
  #define EXYNOS4_ACE_SFR_BASE          DEVICE_NOT_AVAILABLE
+ #define EXYNOS4_DMC_PHY_BASE          DEVICE_NOT_AVAILABLE
  
  /* EXYNOS4X12 */
  #define EXYNOS4X12_GPIO_PART3_BASE    0x03860000
@@@ -76,8 -76,7 +76,7 @@@
  #define EXYNOS4X12_SYSTIMER_BASE      0x10050000
  #define EXYNOS4X12_WATCHDOG_BASE      0x10060000
  #define EXYNOS4X12_TZPC_BASE          0x10110000
- #define EXYNOS4X12_DMC0_BASE          0x10600000
- #define EXYNOS4X12_DMC1_BASE          0x10610000
+ #define EXYNOS4X12_DMC_CTRL_BASE      0x10600000
  #define EXYNOS4X12_GPIO_PART4_BASE    0x106E0000
  #define EXYNOS4X12_GPIO_PART2_BASE    0x11000000
  #define EXYNOS4X12_GPIO_PART1_BASE    0x11400000
@@@ -99,6 -98,7 +98,7 @@@
  #define EXYNOS4X12_SPI_BASE           DEVICE_NOT_AVAILABLE
  #define EXYNOS4X12_SPI_ISP_BASE               DEVICE_NOT_AVAILABLE
  #define EXYNOS4X12_ACE_SFR_BASE               DEVICE_NOT_AVAILABLE
+ #define EXYNOS4X12_DMC_PHY_BASE               DEVICE_NOT_AVAILABLE
  
  /* EXYNOS5 Common*/
  #define EXYNOS5_I2C_SPACING           0x10000
  #define EXYNOS5_TZPC_BASE             0x10100000
  #define EXYNOS5_WATCHDOG_BASE         0x101D0000
  #define EXYNOS5_ACE_SFR_BASE            0x10830000
- #define EXYNOS5_DMC_PHY0_BASE         0x10C00000
- #define EXYNOS5_DMC_PHY1_BASE         0x10C10000
+ #define EXYNOS5_DMC_PHY_BASE          0x10C00000
  #define EXYNOS5_GPIO_PART3_BASE               0x10D10000
  #define EXYNOS5_DMC_CTRL_BASE         0x10DD0000
  #define EXYNOS5_GPIO_PART1_BASE               0x11400000
@@@ -178,7 -177,7 +177,7 @@@ static inline char *s5p_get_cpu_name(vo
  }
  
  #define IS_SAMSUNG_TYPE(type, id)                     \
 -static inline int cpu_is_##type(void)                 \
 +static inline int __attribute__((no_instrument_function)) cpu_is_##type(void) \
  {                                                     \
        return (s5p_cpu_id >> 12) == id;                \
  }
@@@ -187,8 -186,7 +186,8 @@@ IS_SAMSUNG_TYPE(exynos4, 0x4
  IS_SAMSUNG_TYPE(exynos5, 0x5)
  
  #define IS_EXYNOS_TYPE(type, id)                      \
 -static inline int proid_is_##type(void)                       \
 +static inline int __attribute__((no_instrument_function)) \
 +      proid_is_##type(void)                           \
  {                                                     \
        return s5p_cpu_id == id;                        \
  }
@@@ -198,10 -196,9 +197,10 @@@ IS_EXYNOS_TYPE(exynos4412, 0x4412
  IS_EXYNOS_TYPE(exynos5250, 0x5250)
  
  #define SAMSUNG_BASE(device, base)                            \
 -static inline unsigned int samsung_get_base_##device(void)    \
 +static inline unsigned int __attribute__((no_instrument_function)) \
 +      samsung_get_base_##device(void) \
  {                                                             \
 -      if (cpu_is_exynos4()) {                                 \
 +      if (cpu_is_exynos4()) {                         \
                if (proid_is_exynos4412())                      \
                        return EXYNOS4X12_##base;               \
                return EXYNOS4_##base;                          \
@@@ -239,6 -236,8 +238,8 @@@ SAMSUNG_BASE(power, POWER_BASE
  SAMSUNG_BASE(spi, SPI_BASE)
  SAMSUNG_BASE(spi_isp, SPI_ISP_BASE)
  SAMSUNG_BASE(tzpc, TZPC_BASE)
+ SAMSUNG_BASE(dmc_ctrl, DMC_CTRL_BASE)
+ SAMSUNG_BASE(dmc_phy, DMC_PHY_BASE)
  #endif
  
  #endif        /* _EXYNOS4_CPU_H */
index d2ccc6675d60837b38e60a7675c2503188af62f5,fdc047a1425329c22fce32eb0e594f00f81056b6..dca3386cf2835c869b45d0fedb0b7a9c26952411
                spi2 = "/spi@12d40000";
                spi3 = "/spi@131a0000";
                spi4 = "/spi@131b0000";
+               mmc0 = "/mmc@12200000";
+               mmc1 = "/mmc@12210000";
+               mmc2 = "/mmc@12220000";
+               mmc3 = "/mmc@12230000";
+               serial0 = "/serial@12C30000";
+               console = "/serial@12C30000";
        };
  
 +      i2c4: i2c@12ca0000 {
 +              cros-ec@1e {
 +                      reg = <0x1e>;
 +                      compatible = "google,cros-ec";
 +                      i2c-max-frequency = <100000>;
 +                      ec-interrupt = <&gpio 782 1>;
 +              };
 +
 +              power-regulator@48 {
 +                      compatible = "ti,tps65090";
 +                      reg = <0x48>;
 +              };
 +      };
 +
 +      spi@131b0000 {
 +              spi-max-frequency = <1000000>;
 +              spi-deactivate-delay = <100>;
 +              cros-ec@0 {
 +                      reg = <0>;
 +                      compatible = "google,cros-ec";
 +                      spi-max-frequency = <5000000>;
 +                      ec-interrupt = <&gpio 782 1>;
 +                      optimise-flash-write;
 +                      status = "disabled";
 +              };
 +      };
 +
        sound@12d60000 {
                samsung,i2s-epll-clock-frequency = <192000000>;
                samsung,i2s-sampling-rate = <48000>;
                };
        };
  
+       mmc@12200000 {
+               samsung,bus-width = <8>;
+               samsung,timing = <1 3 3>;
+               samsung,removable = <0>;
+       };
+       mmc@12210000 {
+               status = "disabled";
+       };
+       mmc@12220000 {
+               samsung,bus-width = <4>;
+               samsung,timing = <1 2 3>;
+               samsung,removable = <1>;
+       };
+       mmc@12230000 {
+               status = "disabled";
+       };
        tmu@10060000 {
                samsung,min-temp        = <25>;
                samsung,max-temp        = <125>;
                samsung,dc-value        = <25>;
        };
  
 +      cros-ec-keyb {
 +              compatible = "google,cros-ec-keyb";
 +              google,key-rows = <8>;
 +              google,key-columns = <13>;
 +              google,repeat-delay-ms = <240>;
 +              google,repeat-rate-ms = <30>;
 +              google,ghost-filter;
 +              /*
 +               * Keymap entries take the form of 0xRRCCKKKK where
 +               * RR=Row CC=Column KKKK=Key Code
 +               * The values below are for a US keyboard layout and
 +               * are taken from the Linux driver. Note that the
 +               * 102ND key is not used for US keyboards.
 +               */
 +              linux,keymap = <
 +                      /* CAPSLCK F1         B          F10     */
 +                      0x0001003a 0x0002003b 0x00030030 0x00040044
 +                      /* N       =          R_ALT      ESC     */
 +                      0x00060031 0x0008000d 0x000a0064 0x01010001
 +                      /* F4      G          F7         H       */
 +                      0x0102003e 0x01030022 0x01040041 0x01060023
 +                      /* '       F9         BKSPACE    L_CTRL  */
 +                      0x01080028 0x01090043 0x010b000e 0x0200001d
 +                      /* TAB     F3         T          F6      */
 +                      0x0201000f 0x0202003d 0x02030014 0x02040040
 +                      /* ]       Y          102ND      [       */
 +                      0x0205001b 0x02060015 0x02070056 0x0208001a
 +                      /* F8      GRAVE      F2         5       */
 +                      0x02090042 0x03010029 0x0302003c 0x03030006
 +                      /* F5      6          -          \       */
 +                      0x0304003f 0x03060007 0x0308000c 0x030b002b
 +                      /* R_CTRL  A          D          F       */
 +                      0x04000061 0x0401001e 0x04020020 0x04030021
 +                      /* S       K          J          ;       */
 +                      0x0404001f 0x04050025 0x04060024 0x04080027
 +                      /* L       ENTER      Z          C       */
 +                      0x04090026 0x040b001c 0x0501002c 0x0502002e
 +                      /* V       X          ,          M       */
 +                      0x0503002f 0x0504002d 0x05050033 0x05060032
 +                      /* L_SHIFT /          .          SPACE   */
 +                      0x0507002a 0x05080035 0x05090034 0x050B0039
 +                      /* 1       3          4          2       */
 +                      0x06010002 0x06020004 0x06030005 0x06040003
 +                      /* 8       7          0          9       */
 +                      0x06050009 0x06060008 0x0608000b 0x0609000a
 +                      /* L_ALT   DOWN       RIGHT      Q       */
 +                      0x060a0038 0x060b006c 0x060c006a 0x07010010
 +                      /* E       R          W          I       */
 +                      0x07020012 0x07030013 0x07040011 0x07050017
 +                      /* U       R_SHIFT    P          O       */
 +                      0x07060016 0x07070036 0x07080019 0x07090018
 +                      /* UP      LEFT    */
 +                      0x070b0067 0x070c0069>;
 +      };
  };
diff --combined boards.cfg
index c0c428262b2f1d8f57f46cf63724d041f6a4958d,1458289abf9cb03fa8c06933358ce5deb0d9ba78..dd2cd98424279ba28868e7e50b8091540c8abde0
@@@ -267,9 -267,10 +267,10 @@@ ima3-mx53                    ar
  vision2                      arm         armv7       vision2             ttcontrol      mx5           vision2:IMX_CONFIG=board/ttcontrol/vision2/imximage_hynix.cfg
  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
+ 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
- mx6qsabresd                  arm         armv7       mx6qsabresd         freescale      mx6           mx6qsabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
+ 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
  titanium                     arm         armv7       titanium            freescale      mx6           titanium:IMX_CONFIG=board/freescale/titanium/imximage.cfg
  vf610twr                     arm         armv7       vf610twr            freescale      vf610         vf610twr:IMX_CONFIG=board/freescale/vf610twr/imximage.cfg
@@@ -281,6 -282,7 +282,7 @@@ nitrogen6q2g                 ar
  nitrogen6s                   arm         armv7       nitrogen6x          boundary       mx6           nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX6S,DDR_MB=512
  nitrogen6s1g                 arm         armv7       nitrogen6x          boundary       mx6           nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,MX6S,DDR_MB=1024
  wandboard_dl               arm         armv7       wandboard           -              mx6 wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DDR_MB=1024
+ wandboard_quad                     arm         armv7       wandboard           -              mx6 wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q,DDR_MB=2048
  wandboard_solo                     arm         armv7       wandboard           -              mx6 wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX6S,DDR_MB=512
  omap3_overo                  arm         armv7       overo               -              omap3
  omap3_pandora                arm         armv7       pandora             -              omap3
@@@ -352,6 -354,7 +354,7 @@@ lp8x4x                       ar
  lubbock                      arm         pxa
  palmld                       arm         pxa
  palmtc                       arm         pxa
+ palmtreo680                  arm         pxa
  polaris                      arm         pxa         trizepsiv           -              -           trizepsiv:POLARIS
  pxa255_idp                   arm         pxa
  trizepsiv                    arm         pxa
@@@ -831,7 -834,6 +834,7 @@@ P1022DS_36BIT_SPIFLASH       powerp
  P1022DS_SDCARD               powerpc     mpc85xx     p1022ds             freescale    -           P1022DS:SDCARD
  P1022DS_36BIT_SDCARD         powerpc     mpc85xx     p1022ds             freescale    -           P1022DS:36BIT,SDCARD
  P1022DS_36BIT                powerpc     mpc85xx     p1022ds             freescale      -           P1022DS:36BIT
 +P1023RDB                     powerpc     mpc85xx     p1023rdb            freescale      -           P1023RDB
  P1023RDS                     powerpc     mpc85xx     p1023rds            freescale      -           P1023RDS
  P1023RDS_NAND                powerpc     mpc85xx     p1023rds            freescale      -           P1023RDS:NAND
  P1024RDB                     powerpc     mpc85xx     p1_p2_rdb_pc        freescale      -           p1_p2_rdb_pc:P1024RDB
@@@ -901,13 -903,8 +904,13 @@@ P5040DS_NAND                  powerpc     mpc85x
  P5040DS_SDCARD                     powerpc     mpc85xx     corenet_ds          freescale      -           P5040DS:RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF80000
  P5040DS_SPIFLASH           powerpc     mpc85xx     corenet_ds          freescale      -           P5040DS:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000
  BSC9131RDB_SPIFLASH          powerpc     mpc85xx     bsc9131rdb          freescale      -           BSC9131RDB:BSC9131RDB,SPIFLASH
 +BSC9131RDB_SPIFLASH_SYSCLK100 powerpc     mpc85xx     bsc9131rdb          freescale      -           BSC9131RDB:BSC9131RDB,SPIFLASH,SYS_CLK_100
 +BSC9131RDB_NAND              powerpc     mpc85xx     bsc9131rdb          freescale      -           BSC9131RDB:BSC9131RDB,NAND
 +BSC9131RDB_NAND_SYSCLK100    powerpc     mpc85xx     bsc9131rdb          freescale      -           BSC9131RDB:BSC9131RDB,NAND,SYS_CLK_100
  BSC9132QDS_NOR_DDRCLK100     powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SYS_CLK_100_DDR_100
  BSC9132QDS_NOR_DDRCLK133     powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SYS_CLK_100_DDR_133
 +BSC9132QDS_NAND_DDRCLK100    powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,NAND,SYS_CLK_100_DDR_100
 +BSC9132QDS_NAND_DDRCLK133    powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,NAND,SYS_CLK_100_DDR_133
  BSC9132QDS_SDCARD_DDRCLK100  powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SDCARD,SYS_CLK_100_DDR_100
  BSC9132QDS_SDCARD_DDRCLK133  powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SDCARD,SYS_CLK_100_DDR_133
  BSC9132QDS_SPIFLASH_DDRCLK100 powerpc    mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SPIFLASH,SYS_CLK_100_DDR_100
@@@ -918,14 -915,12 +921,14 @@@ stxssa_4M                    powerp
  T4240QDS                     powerpc     mpc85xx     t4qds               freescale      -           T4240QDS:PPC_T4240
  T4240QDS_SDCARD              powerpc     mpc85xx     t4qds               freescale    -           T4240QDS:PPC_T4240,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF80000
  T4240QDS_SPIFLASH            powerpc     mpc85xx     t4qds               freescale    -           T4240QDS:PPC_T4240,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000
 +T4240QDS_SRIO_PCIE_BOOT            powerpc     mpc85xx     t4qds               freescale      -           T4240QDS:PPC_T4240,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF80000
  T4160QDS                     powerpc     mpc85xx     t4qds               freescale      -           T4240QDS:PPC_T4160
  T4160QDS_SDCARD              powerpc     mpc85xx     t4qds               freescale    -           T4240QDS:PPC_T4160,RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF80000
  T4160QDS_SPIFLASH            powerpc     mpc85xx     t4qds               freescale    -           T4240QDS:PPC_T4160,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000
  B4860QDS                     powerpc     mpc85xx     b4860qds            freescale      -           B4860QDS:PPC_B4860
  B4860QDS_NAND              powerpc     mpc85xx     b4860qds            freescale      -           B4860QDS:PPC_B4860,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF80000
  B4860QDS_SPIFLASH            powerpc     mpc85xx     b4860qds            freescale    -           B4860QDS:PPC_B4860,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000
 +B4860QDS_SRIO_PCIE_BOOT            powerpc     mpc85xx     b4860qds            freescale      -           B4860QDS:PPC_B4860,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF80000
  B4420QDS                     powerpc     mpc85xx     b4860qds            freescale    -           B4860QDS:PPC_B4420
  B4420QDS_NAND              powerpc     mpc85xx     b4860qds            freescale      -           B4860QDS:PPC_B4420,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF80000
  B4420QDS_SPIFLASH            powerpc     mpc85xx     b4860qds            freescale    -           B4860QDS:PPC_B4420,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000
diff --combined drivers/spi/mxc_spi.c
index 2ea322833c29cb30275313d06292ae6292d3ffcd,0eca7767e0bf3e30015af4b536f836de8a0348c1..9c68d7d29ffe32b08936d8316175cdd1158876b6
@@@ -128,8 -128,8 +128,8 @@@ static s32 spi_cfg_mxc(struct mxc_spi_s
                unsigned int max_hz, unsigned int mode)
  {
        u32 clk_src = mxc_get_clock(MXC_CSPI_CLK);
-       s32 pre_div = 0, post_div = 0, i, reg_ctrl, reg_config;
-       u32 ss_pol = 0, sclkpol = 0, sclkpha = 0;
+       s32 reg_ctrl, reg_config;
+       u32 ss_pol = 0, sclkpol = 0, sclkpha = 0, pre_div = 0, post_div = 0;
        struct cspi_regs *regs = (struct cspi_regs *)mxcs->base;
  
        if (max_hz == 0) {
        reg_ctrl |=  MXC_CSPICTRL_EN;
        reg_write(&regs->ctrl, reg_ctrl);
  
-       /*
-        * The following computation is taken directly from Freescale's code.
-        */
        if (clk_src > max_hz) {
-               pre_div = DIV_ROUND_UP(clk_src, max_hz);
-               if (pre_div > 16) {
-                       post_div = pre_div / 16;
-                       pre_div = 15;
-               }
-               if (post_div != 0) {
-                       for (i = 0; i < 16; i++) {
-                               if ((1 << i) >= post_div)
-                                       break;
-                       }
-                       if (i == 16) {
+               pre_div = (clk_src - 1) / max_hz;
+               /* fls(1) = 1, fls(0x80000000) = 32, fls(16) = 5 */
+               post_div = fls(pre_div);
+               if (post_div > 4) {
+                       post_div -= 4;
+                       if (post_div >= 16) {
                                printf("Error: no divider for the freq: %d\n",
                                        max_hz);
                                return -1;
                        }
-                       post_div = i;
+                       pre_div >>= post_div;
+               } else {
+                       post_div = 0;
                }
        }
  
@@@ -224,7 -218,7 +218,7 @@@ int spi_xchg_single(struct spi_slave *s
        const u8 *dout, u8 *din, unsigned long flags)
  {
        struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave);
 -      int nbytes = (bitlen + 7) / 8;
 +      int nbytes = DIV_ROUND_UP(bitlen, 8);
        u32 data, cnt, i;
        struct cspi_regs *regs = (struct cspi_regs *)mxcs->base;
  
        /* Transfer completed, clear any pending request */
        reg_write(&regs->stat, MXC_CSPICTRL_TC | MXC_CSPICTRL_RXOVF);
  
 -      nbytes = (bitlen + 7) / 8;
 +      nbytes = DIV_ROUND_UP(bitlen, 8);
  
        cnt = nbytes % 32;
  
  int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
                void *din, unsigned long flags)
  {
 -      int n_bytes = (bitlen + 7) / 8;
 +      int n_bytes = DIV_ROUND_UP(bitlen, 8);
        int n_bits;
        int ret;
        u32 blk_size;
diff --combined include/configs/beaver.h
index d51f5f885f0f9c1d880f4f58acf0dc2a159d7bd9,165de137531b87923b4abecf0f94ad8bfd9290b0..628d5d3db144bb00b889f1b2eb73de3d13cc4921
@@@ -56,7 -56,7 +56,7 @@@
  
  /* Environment in eMMC, at the end of 2nd "boot sector" */
  #define CONFIG_ENV_IS_IN_MMC
 -#define CONFIG_ENV_OFFSET             ((1024 * 1024) - CONFIG_ENV_SIZE)
 +#define CONFIG_ENV_OFFSET             (-CONFIG_ENV_SIZE)
  #define CONFIG_SYS_MMC_ENV_DEV                0
  #define CONFIG_SYS_MMC_ENV_PART               2
  
  #define CONFIG_CMD_SF
  #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
  
+ /* USB Host support */
+ #define CONFIG_USB_EHCI
+ #define CONFIG_USB_EHCI_TEGRA
+ #define CONFIG_USB_STORAGE
+ #define CONFIG_CMD_USB
+ /* USB networking support */
+ #define CONFIG_USB_HOST_ETHER
+ #define CONFIG_USB_ETHER_ASIX
+ /* General networking support */
+ #define CONFIG_CMD_NET
+ #define CONFIG_CMD_DHCP
  #include "tegra-common-post.h"
  
  #endif /* __CONFIG_H */
diff --combined include/configs/cardhu.h
index f3916de55d61fb0426e3000340dc27d067753cbf,fd46083581a0d6e70b4ac7aa830733b1a79a6821..142d20b5c53b3655d5e9d6f57a2a1f44a2c1e74e
@@@ -55,7 -55,7 +55,7 @@@
  
  /* Environment in eMMC, at the end of 2nd "boot sector" */
  #define CONFIG_ENV_IS_IN_MMC
 -#define CONFIG_ENV_OFFSET             ((512 * 1024) - CONFIG_ENV_SIZE)
 +#define CONFIG_ENV_OFFSET             (-CONFIG_ENV_SIZE)
  #define CONFIG_SYS_MMC_ENV_DEV                0
  #define CONFIG_SYS_MMC_ENV_PART               2
  
  #define CONFIG_CMD_SF
  #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
  
+ /* USB Host support */
+ #define CONFIG_USB_EHCI
+ #define CONFIG_USB_EHCI_TEGRA
+ #define CONFIG_USB_STORAGE
+ #define CONFIG_CMD_USB
+ /* USB networking support */
+ #define CONFIG_USB_HOST_ETHER
+ #define CONFIG_USB_ETHER_ASIX
+ /* General networking support */
+ #define CONFIG_CMD_NET
+ #define CONFIG_CMD_DHCP
  #include "tegra-common-post.h"
  
  #endif /* __CONFIG_H */
index 6d7a187cf1da954cc71753c876ff0522d9b7becb,272384343930736f5c2e551ece2cb1ae71e4de82..b6e01617c828ebb0adf4aff9170557084ba2140c
@@@ -60,7 -60,7 +60,7 @@@
  #define CONFIG_ENV_IS_IN_MMC
  #define CONFIG_SYS_MMC_ENV_DEV                0
  #define CONFIG_SYS_MMC_ENV_PART               2
 -#define CONFIG_ENV_OFFSET             ((4096 * 1024) - CONFIG_ENV_SIZE)
 +#define CONFIG_ENV_OFFSET             (-CONFIG_ENV_SIZE)
  
  #define MACH_TYPE_DALMORE     4304    /* not yet in mach-types.h */
  
  #define CONFIG_CMD_SF
  #define CONFIG_SPI_FLASH_SIZE          (4 << 20)
  
+ /* USB Host support */
+ #define CONFIG_USB_EHCI
+ #define CONFIG_USB_EHCI_TEGRA
+ #define CONFIG_USB_STORAGE
+ #define CONFIG_CMD_USB
+ /* USB networking support */
+ #define CONFIG_USB_HOST_ETHER
+ #define CONFIG_USB_ETHER_ASIX
+ /* General networking support */
+ #define CONFIG_CMD_NET
+ #define CONFIG_CMD_DHCP
  #include "tegra-common-post.h"
  
  #endif /* __CONFIG_H */
index e2a096b6439fc818b357a8e1730a5943b80500dd,b32d1bdb98e338146eff488ae66ef4b0e954df34..582c584ae69625352fdde8a1dd2aa2e88bcebc01
  #define CONFIG_OF_CONTROL
  #define CONFIG_OF_SEPARATE
  
 +/* Allow tracing to be enabled */
 +#define CONFIG_TRACE
 +#define CONFIG_CMD_TRACE
 +#define CONFIG_TRACE_BUFFER_SIZE      (16 << 20)
 +#define CONFIG_TRACE_EARLY_SIZE               (8 << 20)
 +#define CONFIG_TRACE_EARLY
 +#define CONFIG_TRACE_EARLY_ADDR               0x50000000
 +
  /* Keep L2 Cache Disabled */
  #define CONFIG_SYS_DCACHE_OFF
  
  #define CONFIG_SYS_MALLOC_LEN         (CONFIG_ENV_SIZE + (4 << 20))
  
  /* select serial console configuration */
- #define CONFIG_SERIAL3                        /* use SERIAL 3 */
  #define CONFIG_BAUDRATE                       115200
  #define EXYNOS5_DEFAULT_UART_OFFSET   0x010000
+ #define CONFIG_SILENT_CONSOLE
  
 +/* Enable keyboard */
 +#define CONFIG_CROS_EC                /* CROS_EC protocol */
 +#define CONFIG_CROS_EC_SPI            /* Support CROS_EC over SPI */
 +#define CONFIG_CROS_EC_I2C            /* Support CROS_EC over I2C */
 +#define CONFIG_CROS_EC_KEYB   /* CROS_EC keyboard input */
 +#define CONFIG_CMD_CROS_EC
 +#define CONFIG_KEYBOARD
 +
  /* Console configuration */
  #define CONFIG_CONSOLE_MUX
  #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  #define EXYNOS_DEVICE_SETTINGS \
 -              "stdin=serial\0" \
 +              "stdin=serial,cros-ec-keyb\0" \
                "stdout=serial,lcd\0" \
                "stderr=serial,lcd\0"
  
  
  
  #define CONFIG_BOARD_EARLY_INIT_F
+ #define CONFIG_SKIP_LOWLEVEL_INIT
  
  /* PWM */
  #define CONFIG_PWM
  #define CONFIG_USB_STORAGE
  
  /* USB boot mode */
+ #define CONFIG_USB_BOOTING
  #define EXYNOS_COPY_USB_FNPTR_ADDR    0x02020070
  #define EXYNOS_USB_SECONDARY_BOOT     0xfeed0002
  #define EXYNOS_IRAM_SECONDARY_BASE    0x02020018
  /* TPM */
  #define CONFIG_TPM
  #define CONFIG_CMD_TPM
 -#define CONFIG_INFINEON_TPM_I2C
 -#define CONFIG_INFINEON_TPM_I2C_BUS 3
 -#define CONFIG_INFINEON_TPM_I2C_ADDR 0x20
 +#define CONFIG_TPM_TIS_I2C
 +#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3
 +#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20
  
  /* MMC SPL */
  #define CONFIG_SPL
  #define COPY_BL2_FNPTR_ADDR   0x02020030
  
+ #define CONFIG_SPL_LIBCOMMON_SUPPORT
  /* specific .lds file */
- #define CONFIG_SPL_LDSCRIPT   "board/samsung/smdk5250/smdk5250-uboot-spl.lds"
+ #define CONFIG_SPL_LDSCRIPT   "board/samsung/common/exynos-uboot-spl.lds"
  #define CONFIG_SPL_TEXT_BASE  0x02023400
  #define CONFIG_SPL_MAX_FOOTPRINT      (14 * 1024)
  
  #define BL2_START_OFFSET      (CONFIG_BL2_OFFSET/512)
  #define BL2_SIZE_BLOC_COUNT   (CONFIG_BL2_SIZE/512)
  
- #define OM_STAT                               (0x1f << 1)
+ #define CONFIG_SPI_BOOTING
  #define EXYNOS_COPY_SPI_FNPTR_ADDR    0x02020058
  #define SPI_FLASH_UBOOT_POS           (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
  
  
  #define CONFIG_IRAM_STACK     0x02050000
  
- #define CONFIG_SYS_INIT_SP_ADDR       (CONFIG_SYS_LOAD_ADDR - 0x1000000)
+ #define CONFIG_SYS_INIT_SP_ADDR       CONFIG_IRAM_STACK
  
  /* I2C */
  #define CONFIG_SYS_I2C_INIT_BOARD
index 41a717622d3ccc41258f617b034c9579a46dd2c6,64e78751af7344db6772b2894d08fa7af04c651d..05e682c4e9198f06fc543e635179340f2674d2e3
@@@ -43,6 -43,7 +43,7 @@@
  #define CONFIG_MACH_TYPE              MACH_TYPE_VENTANA
  
  #define CONFIG_BOARD_EARLY_INIT_F
+ #define CONFIG_BOARD_LATE_INIT                /* Make sure LCD init is complete */
  
  /* SD/MMC */
  #define CONFIG_MMC
@@@ -52,7 -53,7 +53,7 @@@
  
  /* Environment in eMMC, at the end of 2nd "boot sector" */
  #define CONFIG_ENV_IS_IN_MMC
 -#define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE)
 +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE)
  #define CONFIG_SYS_MMC_ENV_DEV 0
  #define CONFIG_SYS_MMC_ENV_PART 2
  
  /* USB keyboard */
  #define CONFIG_USB_KEYBOARD
  
+ /* LCD support */
+ #define CONFIG_LCD
+ #define CONFIG_PWM_TEGRA
+ #define CONFIG_VIDEO_TEGRA
+ #define LCD_BPP                               LCD_COLOR16
+ #define CONFIG_SYS_WHITE_ON_BLACK
+ #define CONFIG_CONSOLE_SCROLL_LINES   10
  #include "tegra-common-post.h"
  
  #endif /* __CONFIG_H */
diff --combined include/fdtdec.h
index d93e102ac6e9578f72e29cd8994bd31491e3d2c3,818ddde369e55d916cf9df22706b92d8171226d8..bdefda49587801bb9616717de901e4d3ab436e67
@@@ -64,6 -64,8 +64,8 @@@ struct fdt_memory 
  enum fdt_compat_id {
        COMPAT_UNKNOWN,
        COMPAT_NVIDIA_TEGRA20_USB,      /* Tegra20 USB port */
+       COMPAT_NVIDIA_TEGRA30_USB,      /* Tegra30 USB port */
+       COMPAT_NVIDIA_TEGRA114_USB,     /* Tegra114 USB port */
        COMPAT_NVIDIA_TEGRA114_I2C,     /* Tegra114 I2C w/single clock source */
        COMPAT_NVIDIA_TEGRA20_I2C,      /* Tegra20 i2c */
        COMPAT_NVIDIA_TEGRA20_DVC,      /* Tegra20 dvc (really just i2c) */
        COMPAT_SAMSUNG_EXYNOS5_SOUND,   /* Exynos Sound */
        COMPAT_WOLFSON_WM8994_CODEC,    /* Wolfson WM8994 Sound Codec */
        COMPAT_SAMSUNG_EXYNOS_SPI,      /* Exynos SPI */
 +      COMPAT_GOOGLE_CROS_EC,          /* Google CROS_EC Protocol */
 +      COMPAT_GOOGLE_CROS_EC_KEYB,     /* Google CROS_EC Keyboard */
        COMPAT_SAMSUNG_EXYNOS_EHCI,     /* Exynos EHCI controller */
        COMPAT_SAMSUNG_EXYNOS_USB_PHY,  /* Exynos phy controller for usb2.0 */
        COMPAT_SAMSUNG_EXYNOS_TMU,      /* Exynos TMU */
        COMPAT_SAMSUNG_EXYNOS_FIMD,     /* Exynos Display controller */
        COMPAT_SAMSUNG_EXYNOS5_DP,      /* Exynos Display port controller */
        COMPAT_SAMSUNG_EXYNOS5_DWMMC,   /* Exynos5 DWMMC controller */
+       COMPAT_SAMSUNG_EXYNOS_SERIAL,   /* Exynos UART */
        COMPAT_MAXIM_MAX77686_PMIC,     /* MAX77686 PMIC */
        COMPAT_GENERIC_SPI_FLASH,       /* Generic SPI Flash chip */
        COMPAT_MAXIM_98095_CODEC,       /* MAX98095 Codec */
        COMPAT_INFINEON_SLB9635_TPM,    /* Infineon SLB9635 TPM */
 +      COMPAT_INFINEON_SLB9645_TPM,    /* Infineon SLB9645 TPM */
  
        COMPAT_COUNT,
  };
diff --combined lib/fdtdec.c
index b3142685a2d273f5eb093468d34c1c7168fc59d2,24ccd0af11285474ac4cb932fe60a92961311fd0..1b3c810588b66a9064bc080da51776c5f8136768
@@@ -37,6 -37,8 +37,8 @@@ DECLARE_GLOBAL_DATA_PTR
  static const char * const compat_names[COMPAT_COUNT] = {
        COMPAT(UNKNOWN, "<none>"),
        COMPAT(NVIDIA_TEGRA20_USB, "nvidia,tegra20-ehci"),
+       COMPAT(NVIDIA_TEGRA30_USB, "nvidia,tegra30-ehci"),
+       COMPAT(NVIDIA_TEGRA114_USB, "nvidia,tegra114-ehci"),
        COMPAT(NVIDIA_TEGRA114_I2C, "nvidia,tegra114-i2c"),
        COMPAT(NVIDIA_TEGRA20_I2C, "nvidia,tegra20-i2c"),
        COMPAT(NVIDIA_TEGRA20_DVC, "nvidia,tegra20-i2c-dvc"),
        COMPAT(SAMSUNG_EXYNOS5_SOUND, "samsung,exynos-sound"),
        COMPAT(WOLFSON_WM8994_CODEC, "wolfson,wm8994-codec"),
        COMPAT(SAMSUNG_EXYNOS_SPI, "samsung,exynos-spi"),
 +      COMPAT(GOOGLE_CROS_EC, "google,cros-ec"),
 +      COMPAT(GOOGLE_CROS_EC_KEYB, "google,cros-ec-keyb"),
        COMPAT(SAMSUNG_EXYNOS_EHCI, "samsung,exynos-ehci"),
        COMPAT(SAMSUNG_EXYNOS_USB_PHY, "samsung,exynos-usb-phy"),
        COMPAT(SAMSUNG_EXYNOS_TMU, "samsung,exynos-tmu"),
        COMPAT(SAMSUNG_EXYNOS_FIMD, "samsung,exynos-fimd"),
        COMPAT(SAMSUNG_EXYNOS5_DP, "samsung,exynos5-dp"),
        COMPAT(SAMSUNG_EXYNOS5_DWMMC, "samsung,exynos5250-dwmmc"),
+       COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
        COMPAT(MAXIM_MAX77686_PMIC, "maxim,max77686_pmic"),
        COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
        COMPAT(MAXIM_98095_CODEC, "maxim,max98095-codec"),
        COMPAT(INFINEON_SLB9635_TPM, "infineon,slb9635-tpm"),
 +      COMPAT(INFINEON_SLB9645_TPM, "infineon,slb9645-tpm"),
  };
  
  const char *fdtdec_get_compatible(enum fdt_compat_id id)