aboutsummaryrefslogtreecommitdiff
path: root/board/sunxi/board.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-18 08:08:55 -0500
committerTom Rini <trini@konsulko.com>2022-12-18 08:08:55 -0500
commit55e374f508da021cccc2fa90594ad147a1ba6c9d (patch)
tree8058a7380c55910cca074f7ccf0022d076fe8b7f /board/sunxi/board.c
parent9bd3d354a1a0712ac27c717df9ad60566b0406ee (diff)
parent64531496f990c2a63211c72b953dfc084b4c2589 (diff)
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
This cleans up each board's defconfig, and fixes the serial console on some Olimex board. Also we lose another legacy config variable. The rest are minor cleanups, that actually shouldn't change anything in the build. Passed the gitlab CI, plus briefly tested on Pine64-LTS, LicheePi Nano, and BananaPi M1.
Diffstat (limited to 'board/sunxi/board.c')
-rw-r--r--board/sunxi/board.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 21a2407e06..827e545032 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -184,10 +184,6 @@ enum env_location env_get_location(enum env_operation op, int prio)
return ENVL_UNKNOWN;
}
-#ifdef CONFIG_DM_MMC
-static void mmc_pinmux_setup(int sdc);
-#endif
-
/* add board specific code here */
int board_init(void)
{
@@ -355,7 +351,7 @@ void board_nand_init(void)
sunxi_nand_init();
#endif
}
-#endif
+#endif /* CONFIG_NAND_SUNXI */
#ifdef CONFIG_MMC
static void mmc_pinmux_setup(int sdc)
@@ -525,9 +521,14 @@ static void mmc_pinmux_setup(int sdc)
int board_mmc_init(struct bd_info *bis)
{
+ /*
+ * The BROM always accesses MMC port 0 (typically an SD card), and
+ * most boards seem to have such a slot. The others haven't reported
+ * any problem with unconditionally enabling this in the SPL.
+ */
if (!IS_ENABLED(CONFIG_UART0_PORT_F)) {
- mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);
- if (!sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT))
+ mmc_pinmux_setup(0);
+ if (!sunxi_mmc_init(0))
return -1;
}
@@ -553,7 +554,7 @@ int mmc_get_env_dev(void)
}
}
#endif
-#endif
+#endif /* CONFIG_MMC */
#ifdef CONFIG_SPL_BUILD
@@ -669,7 +670,7 @@ void sunxi_board_init(void)
else
printf("Failed to set core voltage! Can't set CPU frequency\n");
}
-#endif
+#endif /* CONFIG_SPL_BUILD */
#ifdef CONFIG_USB_GADGET
int g_dnl_board_usb_cable_connected(void)
@@ -698,7 +699,7 @@ int g_dnl_board_usb_cable_connected(void)
return sun4i_usb_phy_vbus_detect(&phy);
}
-#endif
+#endif /* CONFIG_USB_GADGET */
#ifdef CONFIG_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
@@ -927,7 +928,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
}
#ifdef CONFIG_SPL_LOAD_FIT
-
static void set_spl_dt_name(const char *name)
{
struct boot_file_head *spl = get_spl_header(SPL_ENV_HEADER_VERSION);
@@ -995,4 +995,4 @@ int board_fit_config_name_match(const char *name)
return ret;
}
-#endif
+#endif /* CONFIG_SPL_LOAD_FIT */