mmc: pxa: Flip over the remaining boards to pxa_mmc_generic
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
PATCH 1/2 mmc: pxa: Flip over the remaining boards to pxa_mmc_generic
In reply to Marek VasutQuoted 30 lines · Marek Vasut
Some of the boards still used the old
PXA_MMCdriver 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.Signed-off-by Marek Vasut <[email protected]>Cc Andy Fleming <[email protected]>--- 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@@ -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
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_MMCdriver 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.Signed-off-by Marek Vasut <[email protected]>Cc Andy Fleming <[email protected]>---
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@@ -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
-0return 0 ; } +#ifdef CONFIG_CMD_MMC Do we want to use
CONFIG_CMD_MMCfor 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