public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 1/1] ARM: kirkwood: add mvsdio driver
Date: Fri, 25 Jul 2014 16:50:54 +0200	[thread overview]
Message-ID: <53D26ECE.2050104@denx.de> (raw)
In-Reply-To: <1406294864-6839-1-git-send-email-drEagle@doukki.net>

On 25.07.2014 15:27, Gerald Kerma wrote:
> This patch add Marvell kirkwood MVSDIO/MMC driver
> and enable it for Sheevaplugs and OpenRD boards.
>
> Signed-off-by: Gerald Kerma <drEagle@doukki.net>

Please don't send this patch as base64 encoded. It makes it impossible 
to apply this patch or run checkpatch on it.

Did you run it though checkpatch btw?

> ---
>
>   Changes in v5:
>   - purge uneeded code
>   - remove some extra debug
>
>   Changes in v4:
>   - rename drivers files to MVSDIO
>   - fix MMC clock init which now use dev ID
>   - clean debug strings
>   - remove MVSDIO_TWEAK_NOSDHS quirk
>   - remove dead code
>
>   Changes in v3:
>   - Add MVSDIO_TWEAK_NOSDHS quirk
>   - Minor clean
>
>   Changes in v2:
>   - Fix some typo and missing lines from patch import
>
>   arch/arm/include/asm/arch-kirkwood/kirkwood.h |   1 +
>   board/Marvell/openrd/openrd.c                 |  11 +
>   board/Marvell/sheevaplug/sheevaplug.c         |  11 +
>   drivers/mmc/Makefile                          |   1 +
>   drivers/mmc/mvsdio.c                          | 353 ++++++++++++++++++++++++++

I suggest to rename the driver to mvebu_mmc.c instead. This MVEBU is the 
generally agreed upon abbreviation for Marvell SoC's (Orion, Kirkwood, 
Armada XP, 370 ...).

>   include/configs/openrd.h                      |   8 +
>   include/configs/sheevaplug.h                  |  17 +-
>   include/mvsdio.h                              | 279 ++++++++++++++++++++
>   8 files changed, 679 insertions(+), 2 deletions(-)
>   create mode 100644 drivers/mmc/mvsdio.c
>   create mode 100644 include/mvsdio.h
>
> diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
> index bc207f5..3ea51d7 100644
> --- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
> +++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
> @@ -39,6 +39,7 @@
>   #define KW_EGIGA0_BASE			(KW_REGISTER(0x72000))
>   #define KW_EGIGA1_BASE			(KW_REGISTER(0x76000))
>   #define KW_SATA_BASE			(KW_REGISTER(0x80000))
> +#define KW_SDIO_BASE			(KW_REGISTER(0x90000))
>
>   /* Kirkwood Sata controller has two ports */
>   #define KW_SATA_PORT0_OFFSET		0x2000
> diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
> index a005a2f..6e9dca6 100644
> --- a/board/Marvell/openrd/openrd.c
> +++ b/board/Marvell/openrd/openrd.c
> @@ -17,6 +17,9 @@
>   #include <asm/arch/kirkwood.h>
>   #include <asm/arch/mpp.h>
>   #include "openrd.h"
> +#ifdef CONFIG_MVSDIO_MMC
> +# include <mvsdio.h>
> +#endif /* CONFIG_MVSDIO_MMC */
>
>   DECLARE_GLOBAL_DATA_PTR;
>
> @@ -159,3 +162,11 @@ void reset_phy(void)
>   #endif
>   }
>   #endif /* CONFIG_RESET_PHY_R */
> +
> +#ifdef CONFIG_MRVL_MMC
> +int board_mmc_init(bd_t *bis)
> +{
> +	mrvl_mmc_init(bis);
> +	return 0;
> +}
> +#endif /* CONFIG_MRVL_MMC */

Doesn't it make sense to move this code to init / enable the MMC driver 
into the arch/cpu/... SoC code? Instead of adding it to all the board 
specific files?

> diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
> index 87e49f4..c33f55c 100644
> --- a/board/Marvell/sheevaplug/sheevaplug.c
> +++ b/board/Marvell/sheevaplug/sheevaplug.c
> @@ -12,6 +12,9 @@
>   #include <asm/arch/kirkwood.h>
>   #include <asm/arch/mpp.h>
>   #include "sheevaplug.h"
> +#ifdef CONFIG_MVSDIO_MMC
> +# include <mvsdio.h>
> +#endif /* CONFIG_MVSDIO_MMC */
>
>   DECLARE_GLOBAL_DATA_PTR;
>
> @@ -131,3 +134,11 @@ void reset_phy(void)
>   	printf("88E1116 Initialized on %s\n", name);
>   }
>   #endif /* CONFIG_RESET_PHY_R */
> +
> +#ifdef CONFIG_MRVL_MMC
> +int board_mmc_init(bd_t *bis)
> +{
> +	mrvl_mmc_init(bis);
> +	return 0;
> +}
> +#endif /* CONFIG_MRVL_MMC */

Here we have this code again. I suggest to move it to the kirkwood cpu.c 
file instead.

Thanks,
Stefan

  reply	other threads:[~2014-07-25 14:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 13:27 [U-Boot] [PATCH v5 1/1] ARM: kirkwood: add mvsdio driver Gerald Kerma
2014-07-25 14:50 ` Stefan Roese [this message]
2014-07-25 16:36   ` drEagle
2014-07-25 17:01     ` drEagle

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=53D26ECE.2050104@denx.de \
    --to=sr@denx.de \
    --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