Skip to contentSkip to conversation

ARM: kirkwood: add mvsdio driver

PATCH New Gerald Kerma 3 participants 6 messages Jul 25, 2014 – Aug 1, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 ARM: kirkwood: add mvsdio driver

This patch add Marvell kirkwood MVSDIO/MMC driver
and enable it for Sheevaplugs and OpenRD boards.

---

Changes in v7:
- removed unrelated stuff
- minor code cleaning

Changes in v6:
- rename driver to mvebu_mmc
- renames constants and functions
- move mmc_init to kirkwood/cpu
- code cleaning

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/cpu/arm926ejs/kirkwood/cpu.c         |   9 +
 arch/arm/include/asm/arch-kirkwood/kirkwood.h |   1 +
 drivers/mmc/Makefile                          |   1 +
 drivers/mmc/mvebu_mmc.c                       | 361 ++++++++++++++++++++++++++
 include/configs/openrd.h                      |   8 +
 include/configs/sheevaplug.h                  |  11 +
 include/mvebu_mmc.h                           | 278 ++++++++++++++++++++
 7 files changed, 669 insertions(+)
 create mode 100644 drivers/mmc/mvebu_mmc.c
 create mode 100644 include/mvebu_mmc.h
arch/arm/cpu/arm926ejs/kirkwood/cpu.c +9 -0
index da80240..881e2de 100644
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/kirkwood.h>
+#include <mvebu_mmc.h>
 
 #define BUFLEN	16
 
@@ -377,3 +378,11 @@ int cpu_eth_init(bd_t *bis)
 	return 0;
 }
 #endif
+
+#ifdef CONFIG_MVEBU_MMC
+int board_mmc_init(bd_t *bis)
+{
+	mvebu_mmc_init(bis);
+	return 0;
+}
+#endif /* CONFIG_MVEBU_MMC */
arch/arm/include/asm/arch-kirkwood/kirkwood.h +1 -0
index bc207f5..3ea51d7 100644
@@ -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
drivers/mmc/Makefile +1 -0
index 34febf5..f5be96f 100644
@@ -37,3 +37,4 @@ obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o
 else
 obj-$(CONFIG_GENERIC_MMC) += mmc_write.o
 endif
+obj-$(CONFIG_MVEBU_MMC) += mvebu_mmc.o
drivers/mmc/mvebu_mmc.c new file +361 -0

361 lines not on this page · raw message

include/configs/openrd.h +8 -0
index 8fab6e6..3eb408f 100644
@@ -49,6 +49,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_MMC
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_USB
@@ -123,4 +124,11 @@
 #define CONFIG_SYS_ATA_IDE1_OFFSET	MV_SATA_PORT1_OFFSET
 #endif /*CONFIG_MVSATA_IDE*/
 
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MVEBU_MMC
+#define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
+#endif /* CONFIG_CMD_MMC */
+
 #endif /* _CONFIG_OPENRD_BASE_H */
include/configs/sheevaplug.h +11 -0
index ecc93bc..3d6ff09 100644
@@ -31,6 +31,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_MMC
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_USB
@@ -82,6 +83,16 @@
 #endif /* CONFIG_CMD_NET */
 
 /*
+ * SDIO/MMC Card Configuration
+ */
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MVEBU_MMC
+#define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
+#endif /* CONFIG_CMD_MMC */
+
+/*
  * File system
  */
 #define CONFIG_CMD_EXT2
include/mvebu_mmc.h new file +278 -0

278 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#2 lore raw

PATCH v7 1/1 ARM: kirkwood: add mvsdio driver

Hi Stefan,

Quoted 9 lines · Stefan Roese
Quoted 4 lines · Gerald Kerma

This patch add Marvell kirkwood MVSDIO/MMC driver
and enable it for Sheevaplugs and OpenRD boards.

Looks good now, so:

Thank for you review.

Is there any action I have to do now ?

Enjoy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140729/d41ea62c/attachment.pgp>

#3 lore raw

PATCH v7 1/1 ARM: kirkwood: add mvsdio driver

Quoted 7 lines · drEagle
Quoted 6 lines · Stefan Roese
Quoted 4 lines · Gerald Kerma

This patch add Marvell kirkwood MVSDIO/MMC driver
and enable it for Sheevaplugs and OpenRD boards.

Quoted 7 lines
Quoted 3 lines

Looks good now, so:

Thank for you review.

Is there any action I have to do now ?

No. Just a bit of patience. If nobody else has some objections or other review comments your patch will be picked up by the subsystem custodian (Panto).

Thanks,
Stefan

#4 lore raw

PATCH v7 1/1 ARM: kirkwood: add mvsdio driver

Hi Stefan,

Quoted 10 lines · Stefan Roese
Quoted 9 lines · drEagle
Quoted 8 lines · Stefan Roese
Quoted 4 lines · Gerald Kerma

This patch add Marvell kirkwood MVSDIO/MMC driver
and enable it for Sheevaplugs and OpenRD boards.

Looks good now, so:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Thank for you review.

Is there any action I have to do now ?

No. Just a bit of patience. If nobody else has some objections or other review comments your patch will be picked up by the subsystem custodian (Panto).

New mmc pull req coming up at the end of this week.

Quoted 3 lines

Thanks,
Stefan

Regards

-- Pantelis

#5 lore raw

PATCH v7 1/1 ARM: kirkwood: add mvsdio driver

In reply to drEagle

Hi there,

Quoted 11 lines · drEagle

Hi Stefan,

Quoted 8 lines · Stefan Roese
Quoted 4 lines · Gerald Kerma

This patch add Marvell kirkwood MVSDIO/MMC driver
and enable it for Sheevaplugs and OpenRD boards.

Looks good now, so:

Quoted 8 lines
Quoted 1 line

Thank for you review.

Is there any action I have to do now ?

Enjoy

Applied, thanks.

-- Pantelis