Re: [U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data

2020-06-30 Thread Tom Rini
On Mon, May 20, 2019 at 02:45:01AM +0200, Marcel Ziswiler wrote:

> Add MMC platform data.
> 
> While at it also fix trivial checkpatch.pl issues.
> 
> Signed-off-by: Marcel Ziswiler 

Applied to u-boot/next, thanks!

-- 
Tom


signature.asc
Description: PGP signature


Re: [U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data

2019-05-19 Thread Marek Vasut
On 5/20/19 2:45 AM, Marcel Ziswiler wrote:
> Add MMC platform data.
> 
> While at it also fix trivial checkpatch.pl issues.
> 
> Signed-off-by: Marcel Ziswiler 
> 
> ---
> 
>  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 
> - * Copyright (C) 2016 Marcel Ziswiler 
> + * Copyright (C) 2016-2019 Marcel Ziswiler 
>   */
>  
>  #include 
> @@ -14,6 +14,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -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 = 0xa100;
>  
>   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);

setbits_le32(UHCRHDB, GEN_MASK(17, 19)); I think ?

>   /* 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 = _platdata,
> +};
> +#endif /* !CONFIG_IS_ENABLED(DM_MMC) */
>  #endif
>  
>  static const struct pxa_serial_platdata serial_platdata = {
> 


-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data

2019-05-19 Thread Marcel Ziswiler
Add MMC platform data.

While at it also fix trivial checkpatch.pl issues.

Signed-off-by: Marcel Ziswiler 

---

 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 
- * Copyright (C) 2016 Marcel Ziswiler 
+ * Copyright (C) 2016-2019 Marcel Ziswiler 
  */
 
 #include 
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -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 = 0xa100;
 
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 = _platdata,
+};
+#endif /* !CONFIG_IS_ENABLED(DM_MMC) */
 #endif
 
 static const struct pxa_serial_platdata serial_platdata = {
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot