Skip to contentSkip to conversation

mmc: pxa: Flip over the remaining boards to pxa_mmc_generic

PATCH New Marek Vasut 2 participants 4 messages Sep 30, 2012 – Oct 15, 2012 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mmc: pxa: Flip over the remaining boards to pxa_mmc_generic

Some of the boards still used the old PXA_MMC driver instead of the new generic one. Use the new one instead so the old can be removed and the generic MMC framework can be properly used.

---
 board/lubbock/lubbock.c      |    9 +++++++++
 board/palmtc/palmtc.c        |    9 +++++++++
 board/pxa255_idp/pxa_idp.c   |    9 +++++++++
 board/trizepsiv/conxs.c      |    9 +++++++++
 include/configs/lubbock.h    |    3 ++-
 include/configs/palmtc.h     |    3 ++-
 include/configs/pxa255_idp.h |    3 ++-
 include/configs/trizepsiv.h  |    3 ++-
 8 files changed, 44 insertions(+), 4 deletions(-)
board/lubbock/lubbock.c +9 -0
index 3527b38..ef2cc24 100644
@@ -29,6 +29,7 @@
 #include <netdev.h>
 #include <asm/arch/pxa.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/arch/regs-mmc.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -56,6 +57,14 @@ int board_init (void)
 	return 0;
 }
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+	pxa_mmc_register(0);
+	return 0;
+}
+#endif
+
 int board_late_init(void)
 {
 	setenv("stdout", "serial");
board/palmtc/palmtc.c +9 -0
index 4adf152..c850cf9 100644
@@ -24,6 +24,7 @@
 #include <serial.h>
 #include <asm/io.h>
 #include <asm/arch/pxa.h>
+#include <asm/arch/regs-mmc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -51,6 +52,14 @@ int board_init(void)
 	return 0;
 }
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+	pxa_mmc_register(0);
+	return 0;
+}
+#endif
+
 struct serial_device *default_serial_console(void)
 {
 	return &serial_ffuart_device;
board/pxa255_idp/pxa_idp.c +9 -0
index 877e8d9..9931efd 100644
@@ -35,6 +35,7 @@
 #include <command.h>
 #include <asm/io.h>
 #include <asm/arch/pxa.h>
+#include <asm/arch/regs-mmc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -77,6 +78,14 @@ int board_init (void)
 	return 0;
 }
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+	pxa_mmc_register(0);
+	return 0;
+}
+#endif
+
 int board_late_init(void)
 {
 	setenv("stdout", "serial");
board/trizepsiv/conxs.c +9 -0
index 1291195..af6fe25 100644
@@ -34,6 +34,7 @@
 #include <common.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/pxa.h>
+#include <asm/arch/regs-mmc.h>
 #include <netdev.h>
 #include <asm/io.h>
 
@@ -159,3 +160,11 @@ int board_eth_init(bd_t *bis)
 	return dm9000_initialize(bis);
 }
 #endif
+
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+	pxa_mmc_register(0);
+	return 0;
+}
+#endif
include/configs/lubbock.h +2 -1
index 0a1d1e0..59515f5 100644
@@ -129,7 +129,8 @@
 #define CONFIG_SYS_CPUSPEED		0x161		/* set core clock to 400/200/100 MHz */
 
 #ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
+#define	CONFIG_GENERIC_MMC
+#define	CONFIG_PXA_MMC_GENERIC
 #define CONFIG_CMD_MMC
 #define CONFIG_SYS_MMC_BASE		0xF0000000
 #endif
include/configs/palmtc.h +2 -1
index bc88354..699b39f 100644
@@ -76,7 +76,8 @@
  */
 #ifdef	CONFIG_CMD_MMC
 #define	CONFIG_MMC
-#define	CONFIG_PXA_MMC
+#define	CONFIG_GENERIC_MMC
+#define	CONFIG_PXA_MMC_GENERIC
 #define	CONFIG_SYS_MMC_BASE		0xF0000000
 #define	CONFIG_CMD_FAT
 #define	CONFIG_CMD_EXT2
include/configs/pxa255_idp.h +2 -1
index ce9e7d1..d0d88c8 100644
@@ -244,7 +244,8 @@
 #define RTC	1				/* enable 32KHz osc */
 
 #ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
+#define	CONFIG_GENERIC_MMC
+#define	CONFIG_PXA_MMC_GENERIC
 #define CONFIG_CMD_MMC
 #define CONFIG_SYS_MMC_BASE		0xF0000000
 #endif
include/configs/trizepsiv.h +2 -1
index 151059a..52bc973 100644
@@ -170,7 +170,8 @@
 #define CONFIG_SYS_CPUSPEED		0x207		/* need to look more closely, I think this is Turbo = 2x, L=91Mhz */
 
 #ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
+#define	CONFIG_GENERIC_MMC
+#define	CONFIG_PXA_MMC_GENERIC
 #define CONFIG_CMD_MMC
 #define CONFIG_SYS_MMC_BASE		0xF0000000
 #endif
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 mmc: pxa: Remove the old non-generic PXA MMC driver

This driver is no longer used and it's remaining users were converted to the new generic PXA MMC driver. Thus, remove this driver.

---
 drivers/mmc/Makefile  |    1 -
 drivers/mmc/pxa_mmc.c |  643 -------------------------------------------------
 2 files changed, 644 deletions(-)
 delete mode 100644 drivers/mmc/pxa_mmc.c
drivers/mmc/Makefile +0 -1
index 565ba6a..ac3cb0b 100644
@@ -41,7 +41,6 @@ COBJS-$(CONFIG_MV_SDHCI) += mv_sdhci.o
 COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
 COBJS-$(CONFIG_MXS_MMC) += mxsmmc.o
 COBJS-$(CONFIG_OMAP_HSMMC) += omap_hsmmc.o
-COBJS-$(CONFIG_PXA_MMC) += pxa_mmc.o
 COBJS-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o
 COBJS-$(CONFIG_SDHCI) += sdhci.o
 COBJS-$(CONFIG_S5P_SDHCI) += s5p_sdhci.o
drivers/mmc/pxa_mmc.c deleted +0 -643

643 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/2 mmc: pxa: Flip over the remaining boards to pxa_mmc_generic

In reply to Marek Vasut
Quoted 30 lines · Marek Vasut

Some of the boards still used the old PXA_MMC driver instead of the new generic one. Use the new one instead so the old can be removed and the generic MMC framework can be properly used.

---
 board/lubbock/lubbock.c      |    9 +++++++++
 board/palmtc/palmtc.c        |    9 +++++++++
 board/pxa255_idp/pxa_idp.c   |    9 +++++++++
 board/trizepsiv/conxs.c      |    9 +++++++++
 include/configs/lubbock.h    |    3 ++-
 include/configs/palmtc.h     |    3 ++-
 include/configs/pxa255_idp.h |    3 ++-
 include/configs/trizepsiv.h  |    3 ++-
 8 files changed, 44 insertions(+), 4 deletions(-)
board/lubbock/lubbock.c +1 -0
index 3527b38..ef2cc24 100644
@@ -29,6 +29,7 @@
 #include <netdev.h>
 #include <asm/arch/pxa.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/arch/regs-mmc.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;

board/lubbock/lubbock.c int board_init (void) · line 60

Quoted 4 lines
board/lubbock/lubbock.c +1 -0
@@ -56,6 +57,14 @@ int board_init (void)
        return 0;
 }
 
+#ifdef CONFIG_CMD_MMC

Do we want to use CONFIG_CMD_MMC for this?

That technically just means that the mmc *command* exists, but there are other reasons to enable the MMC driver (such as storing the environment or other behind-the-scenes mmc uses).

It looks like this was done a handful of other places. I'm thinking we should use CONFIG_MMC, instead. If you update your patch, I'll submit a patch which fixes the others.

Andy

#3 lore raw

PATCH 1/2 mmc: pxa: Flip over the remaining boards to pxa_mmc_generic

Dear Andy Fleming,

Quoted 37 lines · Marek Vasut
Quoted 36 lines

Some of the boards still used the old PXA_MMC driver instead of the new generic one. Use the new one instead so the old can be removed and the generic MMC framework can be properly used.

---

 board/lubbock/lubbock.c      |    9 +++++++++
 board/palmtc/palmtc.c        |    9 +++++++++
 board/pxa255_idp/pxa_idp.c   |    9 +++++++++
 board/trizepsiv/conxs.c      |    9 +++++++++
 include/configs/lubbock.h    |    3 ++-
 include/configs/palmtc.h     |    3 ++-
 include/configs/pxa255_idp.h |    3 ++-
 include/configs/trizepsiv.h  |    3 ++-
 8 files changed, 44 insertions(+), 4 deletions(-)
board/lubbock/lubbock.c +1 -0
index 3527b38..ef2cc24 100644
@@ -29,6 +29,7 @@
 
 #include <netdev.h>
 #include <asm/arch/pxa.h>
 #include <asm/arch/pxa-regs.h>
 
+#include <asm/arch/regs-mmc.h>
 

#include <asm/io.h>

DECLARE_GLOBAL_DATA_PTR;

board/lubbock/lubbock.c +0 -0
@@ -56,6 +57,14 @@ int board_init (void)
 
Quoted 7 lines

board/lubbock/lubbock.c int board_init (void) · line 60

Quoted 5 lines
board/lubbock/lubbock.c +1 -0
        return 0;
 
 }
 
+#ifdef CONFIG_CMD_MMC

Do we want to use CONFIG_CMD_MMC for this?

No we don't ... but that's what other boards do use, so ...

Quoted 3 lines

That technically just means that the mmc *command* exists, but there are other reasons to enable the MMC driver (such as storing the environment or other behind-the-scenes mmc uses).

Agreed.

Quoted 3 lines

It looks like this was done a handful of other places. I'm thinking we should use CONFIG_MMC, instead. If you update your patch, I'll submit a patch which fixes the others.

Can you just apply this and then fix them all please?

Quoted 1 line

Andy

Best regards,
Marek Vasut