From: Marcel Ziswiler <marcel@ziswiler.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data
Date: Mon, 20 May 2019 02:45:01 +0200 [thread overview]
Message-ID: <20190520004502.8924-10-marcel@ziswiler.com> (raw)
In-Reply-To: <20190520004502.8924-1-marcel@ziswiler.com>
Add MMC platform data.
While at it also fix trivial checkpatch.pl issues.
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
---
board/toradex/colibri_pxa270/colibri_pxa270.c | 20 ++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index e9e17508a5..507bf579cf 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>
@@ -14,6 +14,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>
@@ -32,7 +33,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;
@@ -82,7 +83,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 |
@@ -106,8 +107,6 @@ void usb_board_stop(void)
udelay(10);
writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN);
-
- return;
}
#endif
@@ -119,11 +118,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 = {
--
2.21.0
next prev parent reply other threads:[~2019-05-20 0:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 0:44 [U-Boot] [PATCH v1 00/10] arm: pxa: mmc: add driver model support Marcel Ziswiler
2019-05-20 0:44 ` [U-Boot] [PATCH v1 01/10] mmc: add missing space before comment delimiter Marcel Ziswiler
2019-05-20 7:06 ` Peng Fan
2019-05-20 13:55 ` Igor Opaniuk
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:44 ` [U-Boot] [PATCH v1 02/10] mmc: fsl_esdhc: annotate endifs Marcel Ziswiler
2019-05-20 2:17 ` Fabio Estevam
2019-05-20 7:07 ` Peng Fan
2019-05-20 13:51 ` Igor Opaniuk
2019-05-20 0:44 ` [U-Boot] [PATCH v1 03/10] serial: pxa: clean-up platform data include file Marcel Ziswiler
2019-05-20 0:59 ` Marek Vasut
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:44 ` [U-Boot] [PATCH v1 04/10] Makefile: allow dm_mmc without of_control Marcel Ziswiler
2019-05-20 16:09 ` Simon Glass
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:44 ` [U-Boot] [PATCH v1 05/10] dm: core: gracefully handle alias seq without of Marcel Ziswiler
2019-05-20 16:09 ` Simon Glass
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:44 ` [U-Boot] [PATCH v1 06/10] kconfig: mmc: move pxa_mmc_generic to kconfig Marcel Ziswiler
2019-05-20 16:09 ` Simon Glass
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:44 ` [U-Boot] [PATCH v1 07/10] arm: pxa: mmc: add driver model support Marcel Ziswiler
2019-05-20 1:04 ` Marek Vasut
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:45 ` [U-Boot] [PATCH v1 08/10] colibri_pxa270_defconfig: enable cmd_dm Marcel Ziswiler
2019-05-20 1:05 ` Marek Vasut
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:45 ` Marcel Ziswiler [this message]
2019-05-20 1:06 ` [U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data Marek Vasut
2020-06-30 15:21 ` Tom Rini
2019-05-20 0:45 ` [U-Boot] [PATCH v1 10/10] colibri_pxa270_defconfig: enable dm_mmc Marcel Ziswiler
2019-05-20 13:57 ` Igor Opaniuk
2020-06-30 15:22 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190520004502.8924-10-marcel@ziswiler.com \
--to=marcel@ziswiler.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox