]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-uniphier/board_init.c
rockchip: dts: rk3399-puma: disable 'fifo-mode' in sdmmc
[u-boot] / arch / arm / mach-uniphier / board_init.c
index 413b338228032dc40d6c28b630762eb72848ffe9..2564a02a62305cc2fb8e75cf4507b9e62e6cfcf8 100644 (file)
@@ -165,36 +165,31 @@ static const struct uniphier_initdata uniphier_initdata[] = {
                .nand_2cs = false,
                .sbc_init = uniphier_ld11_sbc_init,
                .pll_init = uniphier_ld20_pll_init,
+               .clk_init = uniphier_ld20_clk_init,
                .misc_init = uniphier_ld20_misc_init,
        },
 #endif
+#if defined(CONFIG_ARCH_UNIPHIER_PXS3)
+       {
+               .soc_id = UNIPHIER_PXS3_ID,
+               .nand_2cs = false,
+               .sbc_init = uniphier_pxs2_sbc_init,
+               .pll_init = uniphier_pxs3_pll_init,
+       },
+#endif
 };
-
-static const struct uniphier_initdata *uniphier_get_initdata(
-                                                       unsigned int soc_id)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(uniphier_initdata); i++) {
-               if (uniphier_initdata[i].soc_id == soc_id)
-                       return &uniphier_initdata[i];
-       }
-
-       return NULL;
-}
+UNIPHIER_DEFINE_SOCDATA_FUNC(uniphier_get_initdata, uniphier_initdata)
 
 int board_init(void)
 {
        const struct uniphier_initdata *initdata;
-       unsigned int soc_id;
        int ret;
 
        led_puts("U0");
 
-       soc_id = uniphier_get_soc_id();
-       initdata = uniphier_get_initdata(soc_id);
+       initdata = uniphier_get_initdata();
        if (!initdata) {
-               pr_err("unsupported board\n");
+               pr_err("unsupported SoC\n");
                return -EINVAL;
        }