summaryrefslogtreecommitdiff
path: root/board/toradex
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel@ziswiler.com>2019-05-20 02:45:01 +0200
committerTom Rini <trini@konsulko.com>2020-06-30 11:13:11 -0400
commit3450f626ba865ca527e99cc649bc97a61c46913a (patch)
treebd1e14e83f0d81e8016e4c53dff31ffdbf7b6a5b /board/toradex
parent885b3cdd159d0af24f650cc7d360022481d445bc (diff)
colibri_pxa270: add mmc platform data
Add MMC platform data. While at it also fix trivial checkpatch.pl issues. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Diffstat (limited to 'board/toradex')
-rw-r--r--board/toradex/colibri_pxa270/colibri_pxa270.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index 18b3d3f542..4c21731eed 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -3,7 +3,7 @@
* Toradex Colibri PXA270 Support
*
* Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
- * Copyright (C) 2016 Marcel Ziswiler <marcel.ziswiler@toradex.com>
+ * Copyright (C) 2016-2019 Marcel Ziswiler <marcel.ziswiler@toradex.com>
*/
#include <common.h>
@@ -17,6 +17,7 @@
#include <asm/arch/regs-uart.h>
#include <asm/io.h>
#include <dm/platdata.h>
+#include <dm/platform_data/pxa_mmc_gen.h>
#include <dm/platform_data/serial_pxa.h>
#include <netdev.h>
#include <serial.h>
@@ -36,7 +37,7 @@ int board_init(void)
/* arch number of Toradex Colibri PXA270 */
gd->bd->bi_arch_number = MACH_TYPE_COLIBRI;
- /* adress of boot parameters */
+ /* address of boot parameters */
gd->bd->bi_boot_params = 0xa0000100;
return 0;
@@ -86,7 +87,7 @@ int board_usb_init(int index, enum usb_init_type init)
writel(readl(UHCRHDA) | 0x100, UHCRHDA);
/* Set port power control mask bits, only 3 ports. */
- writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB);
+ writel(readl(UHCRHDB) | (0x7 << 17), UHCRHDB);
/* enable port 2 */
writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
@@ -110,8 +111,6 @@ void usb_board_stop(void)
udelay(10);
writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
-
- return;
}
#endif
@@ -123,11 +122,22 @@ int board_eth_init(bd_t *bis)
#endif
#ifdef CONFIG_CMD_MMC
+#if !CONFIG_IS_ENABLED(DM_MMC)
int board_mmc_init(bd_t *bis)
{
pxa_mmc_register(0);
return 0;
}
+#else /* !CONFIG_IS_ENABLED(DM_MMC) */
+static const struct pxa_mmc_plat mmc_platdata = {
+ .base = (struct pxa_mmc_regs *)MMC0_BASE,
+};
+
+U_BOOT_DEVICE(pxa_mmcs) = {
+ .name = "pxa_mmc",
+ .platdata = &mmc_platdata,
+};
+#endif /* !CONFIG_IS_ENABLED(DM_MMC) */
#endif
static const struct pxa_serial_platdata serial_platdata = {