]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Merge remote-tracking branch 'u-boot-imx/master'
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 29 Sep 2012 09:12:34 +0000 (11:12 +0200)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 29 Sep 2012 09:12:34 +0000 (11:12 +0200)
arch/arm/imx-common/cpu.c
arch/arm/include/asm/arch-mx5/imx-regs.h
board/freescale/mx28evk/mx28evk.c
board/freescale/mx51evk/mx51evk.c
board/karo/tx25/lowlevel_init.S
drivers/video/mxc_ipuv3_fb.c
include/configs/mx28evk.h
include/configs/mx51evk.h
include/ipu_pixfmt.h

index fa1d4680416ff2d3470257cd007351650df441e6..a10d12d97dcdc9739de53e66db9e15cfadbb54f2 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/crm_regs.h>
+#include <ipu_pixfmt.h>
 
 #ifdef CONFIG_FSL_ESDHC
 #include <fsl_esdhc.h>
@@ -138,3 +139,11 @@ u32 get_ahb_clk(void)
 
        return get_periph_clk() / (ahb_podf + 1);
 }
+
+#if defined(CONFIG_VIDEO_IPUV3)
+void arch_preboot_os(void)
+{
+       /* disable video before launching O/S */
+       ipuv3_fb_shutdown();
+}
+#endif
index d1ef15d043da143cd81b7b6d85ed86b8a75ef54d..46017f4ad062a5289e007ab4507bef43db6a5216 100644 (file)
 #define BOARD_REV_1_0           0x0
 #define BOARD_REV_2_0           0x1
 
+#define BOARD_VER_OFFSET       0x8
+
 #define IMX_IIM_BASE            (IIM_BASE_ADDR)
 
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
index d782aea61b85537c83673b8b88d2937a5a4b5811..6e719ffc39f84136c1e69b8a532781ae0d5fbbeb 100644 (file)
@@ -100,19 +100,6 @@ int board_mmc_init(bd_t *bis)
 
 #ifdef CONFIG_CMD_NET
 
-#define        MII_OPMODE_STRAP_OVERRIDE       0x16
-#define        MII_PHY_CTRL1                   0x1e
-#define        MII_PHY_CTRL2                   0x1f
-
-int fecmxc_mii_postcall(int phy)
-{
-       miiphy_write("FEC1", phy, MII_BMCR, 0x9000);
-       miiphy_write("FEC1", phy, MII_OPMODE_STRAP_OVERRIDE, 0x0202);
-       if (phy == 3)
-               miiphy_write("FEC1", 3, MII_PHY_CTRL2, 0x8180);
-       return 0;
-}
-
 int board_eth_init(bd_t *bis)
 {
        struct mxs_clkctrl_regs *clkctrl_regs =
@@ -152,24 +139,12 @@ int board_eth_init(bd_t *bis)
                return -EINVAL;
        }
 
-       ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
-       if (ret) {
-               puts("FEC MXS: Unable to register FEC0 mii postcall\n");
-               return ret;
-       }
-
        dev = eth_get_dev_by_name("FEC1");
        if (!dev) {
                puts("FEC MXS: Unable to get FEC1 device entry\n");
                return -EINVAL;
        }
 
-       ret = fecmxc_register_mii_postcall(dev, fecmxc_mii_postcall);
-       if (ret) {
-               puts("FEC MXS: Unable to register FEC1 mii postcall\n");
-               return ret;
-       }
-
        return ret;
 }
 
index 7a0682a7e96286f1f4b8e0547fd6972d19f802f2..a94701cbf1757d04ad0b894c039072d5cf8fd399 100644 (file)
@@ -60,6 +60,14 @@ int dram_init(void)
        return 0;
 }
 
+u32 get_board_rev(void)
+{
+       u32 rev = get_cpu_rev();
+       if (!gpio_get_value(IMX_GPIO_NR(1, 22)))
+               rev |= BOARD_REV_2_0 << BOARD_VER_OFFSET;
+       return rev;
+}
+
 static void setup_iomux_uart(void)
 {
        unsigned int pad = PAD_CTL_HYS_ENABLE | PAD_CTL_PKE_ENABLE |
index 823df10701e9c093c67ec04ea0cb134d8fbd1772..eb3f187806eac216b12030f6f53671735bb35ba5 100644 (file)
        write32 0x53f80064, 0x45600000
        write32 0x53f80008, 0x20034000
 
+       /*
+        * PCDR2: NFC = 33.25 MHz
+        * This is required for the NAND Flash of this board, which is a Samsung
+        * K9F1G08U0B with 25-ns R/W cycle times, in order to make it work with
+        * the NFC driver in symmetric (i.e. one-cycle) mode.
+        */
+       write32 0x53f80020, 0x01010103
+
        /*
         * enable all implemented clocks in all three
         * clock control registers
index c38e22de1f340b914575b7c2e6191596d33fc419..47b336e7aa4fb7de28996b4921779162a42f3f27 100644 (file)
@@ -38,6 +38,7 @@
 #include "videomodes.h"
 #include "ipu.h"
 #include "mxcfb.h"
+#include "ipu_regs.h"
 
 static int mxcfb_map_video_memory(struct fb_info *fbi);
 static int mxcfb_unmap_video_memory(struct fb_info *fbi);
@@ -576,6 +577,25 @@ err0:
        return ret;
 }
 
+void ipuv3_fb_shutdown(void)
+{
+       int i;
+       struct ipu_stat *stat = (struct ipu_stat *)IPU_STAT;
+
+       for (i = 0; i < ARRAY_SIZE(mxcfb_info); i++) {
+               struct fb_info *fbi = mxcfb_info[i];
+               if (fbi) {
+                       struct mxcfb_info *mxc_fbi = fbi->par;
+                       ipu_disable_channel(mxc_fbi->ipu_ch);
+                       ipu_uninit_channel(mxc_fbi->ipu_ch);
+               }
+       }
+       for (i = 0; i < ARRAY_SIZE(stat->int_stat); i++) {
+               __raw_writel(__raw_readl(&stat->int_stat[i]),
+                            &stat->int_stat[i]);
+       }
+}
+
 void *video_hw_init(void)
 {
        int ret;
index dffb744c3dc0fe2e007e9cc7f0756b1976f7f12c..7cdbec68deac5191afa2246a5340d50947748591 100644 (file)
@@ -63,6 +63,7 @@
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_SETEXPR
 #define CONFIG_CMD_SF
 #define CONFIG_CMD_SPI
 #define CONFIG_CMD_USB
index ba4a4a623c10403fdd9aa196fb4a0b2044bcc2be..7b027b42acd8d403633c5cb1dca9b6bb04ee2b15 100644 (file)
@@ -44,6 +44,7 @@
 #define CONFIG_CMDLINE_TAG                     /* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
+#define CONFIG_REVISION_TAG
 
 #define CONFIG_OF_LIBFDT
 
index 0019898d51087f223c815a8c676bcbab9aa9ac55..4baa71187d9c1febd18980cbbc50d069ebb0b224 100644 (file)
@@ -77,5 +77,6 @@
 #define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P') /*< 16 YUV 4:2:2 */
 
 int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt);
+void ipuv3_fb_shutdown(void);
 
 #endif