]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx6/tx6ul.c
karo: tx6: replace open coded interpretation of cpurev by calls to is_cpu_type()
[karo-tx-uboot.git] / board / karo / tx6 / tx6ul.c
index 6a21c3b1b8a5997fd72a3a94e215b04ff17e4d8c..a7e6d5f3f5e5258250243555db112f62503fc7a3 100644 (file)
@@ -357,23 +357,16 @@ int checkboard(void)
        u32 cpurev = get_cpu_rev();
        char *cpu_str = "?";
 
-       switch ((cpurev >> 12) & 0xff) {
-       case MXC_CPU_MX6SL:
+       if (is_cpu_type(MXC_CPU_MX6SL))
                cpu_str = "SL";
-               break;
-       case MXC_CPU_MX6DL:
+       else if (is_cpu_type(MXC_CPU_MX6DL))
                cpu_str = "DL";
-               break;
-       case MXC_CPU_MX6SOLO:
+       else if (is_cpu_type(MXC_CPU_MX6SOLO))
                cpu_str = "SOLO";
-               break;
-       case MXC_CPU_MX6Q:
+       else if (is_cpu_type(MXC_CPU_MX6Q))
                cpu_str = "Q";
-               break;
-       case MXC_CPU_MX6UL:
+       else if (is_cpu_type(MXC_CPU_MX6UL))
                cpu_str = "UL";
-               break;
-       }
 
        printf("CPU:   Freescale i.MX6%s rev%d.%d at %d MHz\n",
                cpu_str,
@@ -711,22 +704,17 @@ static const iomux_v3_cfg_t stk5_pads[] = {
 static const struct gpio stk5_gpios[] = {
        { TX6UL_LED_GPIO, GPIOFLAG_OUTPUT_INIT_LOW, "HEARTBEAT LED", },
 
-       { IMX_GPIO_NR(3, 23), GPIOFLAG_INPUT, "USBOTG ID", },
-       { IMX_GPIO_NR(1, 8), GPIOFLAG_INPUT, "USBOTG OC", },
-       { IMX_GPIO_NR(1, 7), GPIOFLAG_OUTPUT_INIT_LOW, "USBOTG VBUS enable", },
-       { IMX_GPIO_NR(3, 30), GPIOFLAG_INPUT, "USBH1 OC", },
-       { IMX_GPIO_NR(3, 31), GPIOFLAG_OUTPUT_INIT_LOW, "USBH1 VBUS enable", },
+       { IMX_GPIO_NR(1, 27), GPIOFLAG_INPUT, "USBOTG OC", },
+       { IMX_GPIO_NR(1, 26), GPIOFLAG_OUTPUT_INIT_LOW, "USBOTG VBUS enable", },
 };
 
 #ifdef CONFIG_LCD
-static u16 tx6_cmap[256];
 vidinfo_t panel_info = {
        /* set to max. size supported by SoC */
        .vl_col = 4096,
        .vl_row = 1024,
 
        .vl_bpix = LCD_COLOR32,    /* Bits per pixel, 0: 1bpp, 1: 2bpp, 2: 4bpp, 3: 8bpp ... */
-       .cmap = tx6_cmap,
 };
 
 static struct fb_videomode tx6_fb_modes[] = {