[U-Boot-Users] [PATCH] MMC: Consolidate MMC/SD command definitions

This moves the MMC and SD Card command definitions from include/asm/arch/mmc.h into include/mmc.h. These definitions are given by the MMC and SD Card standards, not by any particular architecture.
There's a lot more room for consolidation in the MMC drivers which I'm hoping to get done eventually, but this patch is a start.
Compile-tested for all avr32 boards as well as lpc2292sodimm and lubbock. This should cover all three mmc drivers in the tree.
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com --- cpu/at32ap/atmel_mci.c | 4 ++-- cpu/pxa/mmc.c | 8 ++++---- include/asm-arm/arch-pxa/mmc.h | 17 ----------------- include/asm-avr32/arch-at32ap700x/mmc.h | 19 ------------------- include/mmc.h | 24 ++++++++++++++++++++++++ 5 files changed, 30 insertions(+), 42 deletions(-)
diff --git a/cpu/at32ap/atmel_mci.c b/cpu/at32ap/atmel_mci.c index f59dfb5..92f5a28 100644 --- a/cpu/at32ap/atmel_mci.c +++ b/cpu/at32ap/atmel_mci.c @@ -350,7 +350,7 @@ static int sd_init_card(struct mmc_cid *cid, int verbose)
mmc_idle_cards(); for (i = 0; i < 1000; i++) { - ret = mmc_acmd(MMC_ACMD_SD_SEND_OP_COND, CFG_MMC_OP_COND, + ret = mmc_acmd(SD_CMD_APP_SEND_OP_COND, CFG_MMC_OP_COND, resp, R3 | NID); if (ret || (resp[0] & 0x80000000)) break; @@ -368,7 +368,7 @@ static int sd_init_card(struct mmc_cid *cid, int verbose) mmc_dump_cid(cid);
/* Get RCA of the card that responded */ - ret = mmc_cmd(MMC_CMD_SD_SEND_RELATIVE_ADDR, 0, resp, R6 | NCR); + ret = mmc_cmd(SD_CMD_SEND_RELATIVE_ADDR, 0, resp, R6 | NCR); if (ret) return ret;
diff --git a/cpu/pxa/mmc.c b/cpu/pxa/mmc.c index 039ce0f..bf48954 100644 --- a/cpu/pxa/mmc.c +++ b/cpu/pxa/mmc.c @@ -119,7 +119,7 @@ mmc_block_read(uchar * dst, ulong src, ulong len) MMC_RDTO = 0xffff; MMC_NOB = 1; MMC_BLKLEN = len; - mmc_cmd(MMC_CMD_READ_BLOCK, argh, argl, + mmc_cmd(MMC_CMD_READ_SINGLE_BLOCK, argh, argl, MMC_CMDAT_R1 | MMC_CMDAT_READ | MMC_CMDAT_BLOCK | MMC_CMDAT_DATA_EN);
@@ -568,7 +568,7 @@ mmc_init(int verbose) MMC_SPI = MMC_SPI_DISABLE;
/* reset */ - mmc_cmd(MMC_CMD_RESET, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0); + mmc_cmd(MMC_CMD_GO_IDLE_STATE, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0); udelay(200000); retries = 3; while (retries--) { @@ -578,7 +578,7 @@ mmc_init(int verbose) break; }
- resp = mmc_cmd(SD_CMD_APP_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */ + resp = mmc_cmd(SD_CMD_APP_SEND_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */ if (resp[0] & 0x80000000) { mmc_dev.if_type = IF_TYPE_SD; debug("Detected SD card\n"); @@ -616,7 +616,7 @@ mmc_init(int verbose) memcpy(cid_resp, resp, sizeof(cid_resp));
/* MMC exists, get CSD too */ - resp = mmc_cmd(MMC_CMD_SET_RCA, 0, 0, MMC_CMDAT_R1); + resp = mmc_cmd(MMC_CMD_SET_RELATIVE_ADDR, 0, 0, MMC_CMDAT_R1); if (IF_TYPE_SD == mmc_dev.if_type) rca = ((resp[0] & 0xffff0000) >> 16); resp = mmc_cmd(MMC_CMD_SEND_CSD, rca, 0, MMC_CMDAT_R2); diff --git a/include/asm-arm/arch-pxa/mmc.h b/include/asm-arm/arch-pxa/mmc.h index b9304b1..9954680 100644 --- a/include/asm-arm/arch-pxa/mmc.h +++ b/include/asm-arm/arch-pxa/mmc.h @@ -110,23 +110,6 @@ #define MMC_DEFAULT_RCA 1
#define MMC_BLOCK_SIZE 512 -#define MMC_CMD_RESET 0 -#define MMC_CMD_SEND_OP_COND 1 -#define MMC_CMD_ALL_SEND_CID 2 -#define MMC_CMD_SET_RCA 3 -#define MMC_CMD_SELECT_CARD 7 -#define MMC_CMD_SEND_CSD 9 -#define MMC_CMD_SEND_CID 10 -#define MMC_CMD_SEND_STATUS 13 -#define MMC_CMD_SET_BLOCKLEN 16 -#define MMC_CMD_READ_BLOCK 17 -#define MMC_CMD_RD_BLK_MULTI 18 -#define MMC_CMD_WRITE_BLOCK 24 -#define MMC_CMD_APP_CMD 55 - -#define SD_CMD_APP_SET_BUS_WIDTH 6 -#define SD_CMD_APP_OP_COND 41 - #define MMC_MAX_BLOCK_SIZE 512
#define MMC_R1_IDLE_STATE 0x01 diff --git a/include/asm-avr32/arch-at32ap700x/mmc.h b/include/asm-avr32/arch-at32ap700x/mmc.h index fcfbbb3..9caba91 100644 --- a/include/asm-avr32/arch-at32ap700x/mmc.h +++ b/include/asm-avr32/arch-at32ap700x/mmc.h @@ -71,25 +71,6 @@ struct mmc_csd u8 one:1; };
-/* MMC Command numbers */ -#define MMC_CMD_GO_IDLE_STATE 0 -#define MMC_CMD_SEND_OP_COND 1 -#define MMC_CMD_ALL_SEND_CID 2 -#define MMC_CMD_SET_RELATIVE_ADDR 3 -#define MMC_CMD_SD_SEND_RELATIVE_ADDR 3 -#define MMC_CMD_SET_DSR 4 -#define MMC_CMD_SELECT_CARD 7 -#define MMC_CMD_SEND_CSD 9 -#define MMC_CMD_SEND_CID 10 -#define MMC_CMD_SEND_STATUS 13 -#define MMC_CMD_SET_BLOCKLEN 16 -#define MMC_CMD_READ_SINGLE_BLOCK 17 -#define MMC_CMD_READ_MULTIPLE_BLOCK 18 -#define MMC_CMD_WRITE_BLOCK 24 -#define MMC_CMD_APP_CMD 55 - -#define MMC_ACMD_SD_SEND_OP_COND 41 - #define R1_ILLEGAL_COMMAND (1 << 22) #define R1_APP_CMD (1 << 5)
diff --git a/include/mmc.h b/include/mmc.h index a271695..268f27e 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -25,6 +25,30 @@ #define _MMC_H_ #include <asm/arch/mmc.h>
+/* MMC command numbers */ +#define MMC_CMD_GO_IDLE_STATE 0 +#define MMC_CMD_SEND_OP_COND 1 +#define MMC_CMD_ALL_SEND_CID 2 +#define MMC_CMD_SET_RELATIVE_ADDR 3 +#define MMC_CMD_SET_DSR 4 +#define MMC_CMD_SELECT_CARD 7 +#define MMC_CMD_SEND_CSD 9 +#define MMC_CMD_SEND_CID 10 +#define MMC_CMD_SEND_STATUS 13 +#define MMC_CMD_SET_BLOCKLEN 16 +#define MMC_CMD_READ_SINGLE_BLOCK 17 +#define MMC_CMD_READ_MULTIPLE_BLOCK 18 +#define MMC_CMD_WRITE_BLOCK 24 +#define MMC_CMD_APP_CMD 55 + +/* SD Card command numbers */ +#define SD_CMD_SEND_RELATIVE_ADDR 3 +#define SD_CMD_SWITCH 6 +#define SD_CMD_SEND_IF_COND 8 + +#define SD_CMD_APP_SET_BUS_WIDTH 6 +#define SD_CMD_APP_SEND_OP_COND 41 + int mmc_init(int verbose); int mmc_read(ulong src, uchar *dst, int size); int mmc_write(uchar *src, ulong dst, int size);

<snip>
This moves the MMC and SD Card command definitions from include/asm/arch/mmc.h into include/mmc.h. These definitions are given by the MMC and SD Card standards, not by any particular architecture.
There's a lot more room for consolidation in the MMC drivers which I'm hoping to get done eventually, but this patch is a start.
Can we have one mmc-lite stack from linux kernel? The linux kernel have one good frame work for sd/mmc/sdio.
Thanks, Dave

"Liu Dave" DaveLiu@freescale.com wrote:
This moves the MMC and SD Card command definitions from include/asm/arch/mmc.h into include/mmc.h. These definitions are given by the MMC and SD Card standards, not by any particular architecture.
There's a lot more room for consolidation in the MMC drivers which I'm hoping to get done eventually, but this patch is a start.
Can we have one mmc-lite stack from linux kernel? The linux kernel have one good frame work for sd/mmc/sdio.
Yes, I was hoping we could do something like that. There's a lot of duplication in the various MMC drivers we have, and none of them support all kinds of cards AFAIK.
It would be nice with a core protocol layer which takes care of initialization and stuff, leaving only the low-level hardware stuff to the driver.
The Linux mmc framework is certainly good...but it may be too heavyweight for u-boot.
Haavard

Your message
To: u-boot-users@lists.sourceforge.net Cc: wd@denx.de; kharris@nexus-tech.net; peter.pearse@arm.com; Skinnemoen, Haavard Subject: [PATCH] MMC: Consolidate MMC/SD command definitions Sent: Wed, 21 May 2008 14:12:45 +0200
did not reach the following recipient(s):
kharris@nexus-tech.net on Wed, 21 May 2008 14:10:52 +0200 The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient directly to find out the correct address. < bagnes.atmel.com #5.1.1 SMTP; 550 5.1.1 User unknown>
You can't be a maintainer without a valid e-mail address...
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com --- MAINTAINERS | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS index ac7572c..59d50cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -484,12 +484,6 @@ Kshitij Gupta kshitij@ti.com omap1510inn ARM925T omap1610inn ARM926EJS
-Kyle Harris kharris@nexus-tech.net - - lubbock xscale - cradle xscale - ixdp425 xscale - Gary Jennejohn gj@denx.de
smdk2400 ARM920T

In message 1211372806-5165-1-git-send-email-haavard.skinnemoen@atmel.com you wrote:
Your message
To: u-boot-users@lists.sourceforge.net Cc: wd@denx.de; kharris@nexus-tech.net; peter.pearse@arm.com; Skinnemoen, Haavard Subject: [PATCH] MMC: Consolidate MMC/SD command definitions Sent: Wed, 21 May 2008 14:12:45 +0200
did not reach the following recipient(s):
kharris@nexus-tech.net on Wed, 21 May 2008 14:10:52 +0200 The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient directly to find out the correct address. < bagnes.atmel.com #5.1.1 SMTP; 550 5.1.1 User unknown>
You can't be a maintainer without a valid e-mail address...
I agree with the change itself, but please provide a better commit message, and ...
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com
MAINTAINERS | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS index ac7572c..59d50cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -484,12 +484,6 @@ Kshitij Gupta kshitij@ti.com omap1510inn ARM925T omap1610inn ARM926EJS
-Kyle Harris kharris@nexus-tech.net
- lubbock xscale
- cradle xscale
- ixdp425 xscale
Gary Jennejohn gj@denx.de
smdk2400 ARM920T
... don't jusst delete the orphaned boards, but add them to the "Unknown / orphaned" list.
Thanks.
Best regards,
Wolfgang Denk

Mail to kharris@nexus-tech.net bounces because the user doesn't exist anymore. You can't be a maintainer without a valid e-mail address, so move all boards that used to be maintained by Kyle Harris to the "orphaned" list.
Currently, only PowerPC has a list of orphaned boards, so this patch creates one for ARM as well.
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com --- On Sun, 06 Jul 2008 00:32:01 +0200 Wolfgang Denk wd@denx.de wrote:
... don't jusst delete the orphaned boards, but add them to the "Unknown / orphaned" list.
I created a new Unknown/orphaned list for ARM since the existing one was located in the PowerPC section and only had PowerPC boards on it. Is that ok?
MAINTAINERS | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS index a3d70b1..6065e42 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -492,12 +492,6 @@ Kshitij Gupta kshitij@ti.com omap1510inn ARM925T omap1610inn ARM926EJS
-Kyle Harris kharris@nexus-tech.net - - lubbock xscale - cradle xscale - ixdp425 xscale - Gary Jennejohn gj@denx.de
smdk2400 ARM920T @@ -591,6 +585,14 @@ Michael Schwingen michael@schwingen.org actux3 xscale actux4 xscale
+------------------------------------------------------------------------- + +Unknown / orphaned boards: + + cradle xscale + ixdp425 xscale + lubbock xscale + ######################################################################### # x86 Systems: # # #

Haavard Skinnemoen wrote:
Mail to kharris@nexus-tech.net bounces because the user doesn't exist anymore. You can't be a maintainer without a valid e-mail address, so move all boards that used to be maintained by Kyle Harris to the "orphaned" list.
Currently, only PowerPC has a list of orphaned boards, so this patch creates one for ARM as well.
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com
On Sun, 06 Jul 2008 00:32:01 +0200 Wolfgang Denk wd@denx.de wrote:
... don't jusst delete the orphaned boards, but add them to the "Unknown / orphaned" list.
I created a new Unknown/orphaned list for ARM since the existing one was located in the PowerPC section and only had PowerPC boards on it. Is that ok?
MAINTAINERS | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS index a3d70b1..6065e42 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -492,12 +492,6 @@ Kshitij Gupta kshitij@ti.com omap1510inn ARM925T omap1610inn ARM926EJS
-Kyle Harris kharris@nexus-tech.net
- lubbock xscale
- cradle xscale
- ixdp425 xscale
Gary Jennejohn gj@denx.de
smdk2400 ARM920T @@ -591,6 +585,14 @@ Michael Schwingen michael@schwingen.org actux3 xscale actux4 xscale
+-------------------------------------------------------------------------
+Unknown / orphaned boards:
- cradle xscale
- ixdp425 xscale
- lubbock xscale
######################################################################### # x86 Systems: # # #
Would it be reasonable to add an optional tag "last known maintainer" for orphaned boards so someone can chase it without pawing through git history? E.g.:
+------------------------------------------------------------------------- + +Unknown / orphaned boards: + +Last known maintainer: Kyle Harris kharris@nexus-tech.net + cradle xscale + ixdp425 xscale + lubbock xscale +
Best regards, gvb

On 07:35 Thu 10 Jul , Jerry Van Baren wrote:
+Unknown / orphaned boards:
- cradle xscale
- ixdp425 xscale
- lubbock xscale
######################################################################### # x86 Systems: # # #
Would it be reasonable to add an optional tag "last known maintainer" for orphaned boards so someone can chase it without pawing through git history? E.g.:
+-------------------------------------------------------------------------
+Unknown / orphaned boards:
+Last known maintainer: Kyle Harris kharris@nexus-tech.net
- cradle xscale
- ixdp425 xscale
- lubbock xscale
Good idea
Best Regards, J.

In message 4875F3E7.1030209@ge.com you wrote:
Would it be reasonable to add an optional tag "last known maintainer" for orphaned boards so someone can chase it without pawing through git history? E.g.:
Excellent idea. I like it.
+-------------------------------------------------------------------------
+Unknown / orphaned boards:
+Last known maintainer: Kyle Harris kharris@nexus-tech.net
- cradle xscale
- ixdp425 xscale
- lubbock xscale
Let's rather have a third column:
board arch LKM (if any) cradle xscale Kyle Harris kharris@nexus-tech.net ...
etc.
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
In message 4875F3E7.1030209@ge.com you wrote:
Would it be reasonable to add an optional tag "last known maintainer" for orphaned boards so someone can chase it without pawing through git history? E.g.:
Excellent idea. I like it.
+-------------------------------------------------------------------------
+Unknown / orphaned boards:
+Last known maintainer: Kyle Harris kharris@nexus-tech.net
- cradle xscale
- ixdp425 xscale
- lubbock xscale
Let's rather have a third column:
board arch LKM (if any) cradle xscale Kyle Harris kharris@nexus-tech.net ...
etc.
Best regards,
Wolfgang Denk
I'm OK with that too. I actually did that first, but it linewrapped on me so I put the LKM on a separate line. Ahh, I see you deleted a tab.
+1 gvb

In message 20080710131604.507d5808@siona.local you wrote:
Mail to kharris@nexus-tech.net bounces because the user doesn't exist anymore. You can't be a maintainer without a valid e-mail address, so move all boards that used to be maintained by Kyle Harris to the "orphaned" list.
Currently, only PowerPC has a list of orphaned boards, so this patch creates one for ARM as well.
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com
On Sun, 06 Jul 2008 00:32:01 +0200 Wolfgang Denk wd@denx.de wrote:
... don't jusst delete the orphaned boards, but add them to the "Unknown / orphaned" list.
I created a new Unknown/orphaned list for ARM since the existing one was located in the PowerPC section and only had PowerPC boards on it. Is that ok?
MAINTAINERS | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
Applied. Thanks.
I will send an additional patch top add the "last known maintainer" column as discussed.
Best regards,
Wolfgang Denk

Signed-off-by: Wolfgang Denk wd@denx.de --- MAINTAINERS | 681 +++++++++++++++++++++++++++++------------------------------ 1 files changed, 339 insertions(+), 342 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS index 6065e42..1f29abb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14,261 +14,260 @@ # PowerPC Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Greg Allen gallen@arlut.utexas.edu
- UTX8245 MPC8245 + UTX8245 MPC8245
Pantelis Antoniou panto@intracom.gr
- NETVIA MPC8xx + NETVIA MPC8xx
Reinhard Arlt reinhard.arlt@esd-electronics.com
- cpci5200 MPC5200 - mecp5200 MPC5200 - pf5200 MPC5200 + cpci5200 MPC5200 + mecp5200 MPC5200 + pf5200 MPC5200
- CPCI750 PPC750FX/GX + CPCI750 PPC750FX/GX
Yuli Barcohen yuli@arabellasw.com
- Adder MPC87x/MPC852T - ep8248 MPC8248 - ISPAN MPC8260 - MPC8260ADS MPC826x/MPC827x/MPC8280 - Rattler MPC8248 - ZPC1900 MPC8265 + Adder MPC87x/MPC852T + ep8248 MPC8248 + ISPAN MPC8260 + MPC8260ADS MPC826x/MPC827x/MPC8280 + Rattler MPC8248 + ZPC1900 MPC8265
Michael Barkowski michael.barkowski@freescale.com
- MPC8323ERDB MPC8323 + MPC8323ERDB MPC8323
Jerry Van Baren gerald.vanbaren@smiths-aerospace.com
- sacsng MPC8260 + sacsng MPC8260
Oliver Brown obrown@adventnetworks.com
- gw8260 MPC8260 + gw8260 MPC8260
Conn Clark clark@esteem.com
- ESTEEM192E MPC8xx + ESTEEM192E MPC8xx
Joe D'Abbraccio ljd015@freescale.com
- MPC837xERDB MPC837x + MPC837xERDB MPC837x
Kári Davíðsson kd@flaga.is
- FLAGADM MPC823 + FLAGADM MPC823
Torsten Demke torsten.demke@fci.com
- eXalion MPC824x + eXalion MPC824x
Wolfgang Denk wd@denx.de
- IceCube_5100 MGT5100 - IceCube_5200 MPC5200 - - AMX860 MPC860 - ETX094 MPC850 - FPS850L MPC850 - FPS860L MPC860 - ICU862 MPC862 - IP860 MPC860 - IVML24 MPC860 - IVML24_128 MPC860 - IVML24_256 MPC860 - IVMS8 MPC860 - IVMS8_128 MPC860 - IVMS8_256 MPC860 - LANTEC MPC850 - LWMON MPC823 - NC650 MPC852 - R360MPI MPC823 - RMU MPC850 - RRvision MPC823 - SM850 MPC850 - SPD823TS MPC823 - TQM823L MPC823 - TQM823L_LCD MPC823 - TQM850L MPC850 - TQM855L MPC855 - TQM860L MPC860 - TQM860L_FEC MPC860 - c2mon MPC855 - hermes MPC860 - lwmon MPC823 - pcu_e MPC855 - - CU824 MPC8240 - Sandpoint8240 MPC8240 - SL8245 MPC8245 - - ATC MPC8250 - PM825 MPC8250 - - TQM8255 MPC8255 - - CPU86 MPC8260 - PM826 MPC8260 - TQM8260 MPC8260 - - P3G4 MPC7410 - - PCIPPC2 MPC750 - PCIPPC6 MPC750 - - EXBITGEN PPC405GP + IceCube_5100 MGT5100 + IceCube_5200 MPC5200 + + AMX860 MPC860 + ETX094 MPC850 + FPS850L MPC850 + FPS860L MPC860 + ICU862 MPC862 + IP860 MPC860 + IVML24 MPC860 + IVML24_128 MPC860 + IVML24_256 MPC860 + IVMS8 MPC860 + IVMS8_128 MPC860 + IVMS8_256 MPC860 + LANTEC MPC850 + LWMON MPC823 + NC650 MPC852 + R360MPI MPC823 + RMU MPC850 + RRvision MPC823 + SM850 MPC850 + SPD823TS MPC823 + TQM823L MPC823 + TQM823L_LCD MPC823 + TQM850L MPC850 + TQM855L MPC855 + TQM860L MPC860 + TQM860L_FEC MPC860 + c2mon MPC855 + hermes MPC860 + lwmon MPC823 + pcu_e MPC855 + + CU824 MPC8240 + Sandpoint8240 MPC8240 + SL8245 MPC8245 + + ATC MPC8250 + PM825 MPC8250 + + TQM8255 MPC8255 + + CPU86 MPC8260 + PM826 MPC8260 + TQM8260 MPC8260 + + P3G4 MPC7410 + + PCIPPC2 MPC750 + PCIPPC6 MPC750 + + EXBITGEN PPC405GP
Jon Diekema jon.diekema@smiths-aerospace.com
- sbc8260 MPC8260 + sbc8260 MPC8260
Dave Ellis DGE@sixnetio.com
- SXNI855T MPC8xx + SXNI855T MPC8xx
Thomas Frieden ThomasF@hyperion-entertainment.com
- AmigaOneG3SE MPC7xx + AmigaOneG3SE MPC7xx
Matthias Fuchs matthias.fuchs@esd-electronics.com
- ADCIOP IOP480 (PPC401) - APC405 PPC405GP - AR405 PPC405GP - ASH405 PPC405EP - CANBT PPC405CR - CPCI2DP PPC405GP - CPCI405 PPC405GP - CPCI4052 PPC405GP - CPCI405AB PPC405GP - CPCI405DT PPC405GP - CPCIISER4 PPC405GP - DASA_SIM IOP480 (PPC401) - DP405 PPC405EP - DU405 PPC405GP - DU440 PPC440EPx - G2000 PPC405EP - HH405 PPC405EP - HUB405 PPC405EP - OCRTC PPC405GP - ORSG PPC405GP - PCI405 PPC405GP - PLU405 PPC405EP - PMC405 PPC405GP - PMC440 PPC440EPx - VOH405 PPC405EP - VOM405 PPC405EP - WUH405 PPC405EP - CMS700 PPC405EP + ADCIOP IOP480 (PPC401) + APC405 PPC405GP + AR405 PPC405GP + ASH405 PPC405EP + CANBT PPC405CR + CPCI2DP PPC405GP + CPCI405 PPC405GP + CPCI4052 PPC405GP + CPCI405AB PPC405GP + CPCI405DT PPC405GP + CPCIISER4 PPC405GP + DASA_SIM IOP480 (PPC401) + DP405 PPC405EP + DU405 PPC405GP + DU440 PPC440EPx + G2000 PPC405EP + HH405 PPC405EP + HUB405 PPC405EP + OCRTC PPC405GP + ORSG PPC405GP + PCI405 PPC405GP + PLU405 PPC405EP + PMC405 PPC405GP + PMC440 PPC440EPx + VOH405 PPC405EP + VOM405 PPC405EP + WUH405 PPC405EP + CMS700 PPC405EP
Niklaus Giger niklaus.giger@netstal.com
- HCU4 PPC405GPr - MCU25 PPC405GPr - HCU5 PPC440EPx + HCU4 PPC405GPr + MCU25 PPC405GPr + HCU5 PPC440EPx
Frank Gottschling fgottschling@eltec.de
- MHPC MPC8xx + MHPC MPC8xx
- BAB7xx MPC740/MPC750 + BAB7xx MPC740/MPC750
Wolfgang Grandegger wg@denx.de
- CCM MPC855 + CCM MPC855
- PN62 MPC8240 - - IPHASE4539 MPC8260 - SCM MPC8260 + PN62 MPC8240 + IPHASE4539 MPC8260 + SCM MPC8260
Howard Gray mvsensor@matrix-vision.de
- MVS1 MPC823 + MVS1 MPC823
Joe Hamman joe.hamman@embeddedspecialties.com
- sbc8548 MPC8548 - sbc8641d MPC8641D + sbc8548 MPC8548 + sbc8641d MPC8641D
Klaus Heydeck heydeck@kieback-peter.de
- KUP4K MPC855 - KUP4X MPC859 + KUP4K MPC855 + KUP4X MPC859
Gary Jennejohn garyj@denx.de
- quad100hd PPC405EP + quad100hd PPC405EP
Murray Jensen Murray.Jensen@csiro.au
- cogent_mpc8xx MPC8xx + cogent_mpc8xx MPC8xx
- cogent_mpc8260 MPC8260 - hymod MPC8260 + cogent_mpc8260 MPC8260 + hymod MPC8260
Larry Johnson lrj@acm.org
- korat PPC440EPx + korat PPC440EPx
Brad Kemp Brad.Kemp@seranoa.com
- ppmc8260 MPC8260 + ppmc8260 MPC8260
Sangmoon Kim dogoil@etinsys.com
- debris MPC8245 - KVME080 MPC8245 + debris MPC8245 + KVME080 MPC8245
Thomas Lange thomas@corelatus.se
- GTH MPC860 + GTH MPC860
Robert Lazarski robertlazarski@gmail.com
- ATUM8548 MPC8548 + ATUM8548 MPC8548
The LEOX team team@leox.org
- ELPT860 MPC860T + ELPT860 MPC860T
Dave Liu daveliu@freescale.com
- MPC8315ERDB MPC8315 - MPC832XEMDS MPC832x - MPC8360EMDS MPC8360 - MPC837XEMDS MPC837x + MPC8315ERDB MPC8315 + MPC832XEMDS MPC832x + MPC8360EMDS MPC8360 + MPC837XEMDS MPC837x
Nye Liu nyet@zumanetworks.com
- ZUMA MPC7xx_74xx + ZUMA MPC7xx_74xx
Jon Loeliger jdl@freescale.com
- MPC8540ADS MPC8540 - MPC8560ADS MPC8560 - MPC8541CDS MPC8541 - MPC8555CDS MPC8555 + MPC8540ADS MPC8540 + MPC8560ADS MPC8560 + MPC8541CDS MPC8541 + MPC8555CDS MPC8555
- MPC8641HPCN MPC8641D + MPC8641HPCN MPC8641D
Dan Malek dan@embeddedalley.com
- stxgp3 MPC85xx - stxssa MPC85xx - stxxtc MPC8xx + stxgp3 MPC85xx + stxssa MPC85xx + stxxtc MPC8xx
Eran Man eran@nbase.co.il
- EVB64260_750CX MPC750CX + EVB64260_750CX MPC750CX
Andrea "llandre" Marson andrea.marson@dave-tech.it
@@ -276,75 +275,75 @@ Andrea "llandre" Marson andrea.marson@dave-tech.it
Reinhard Meyer r.meyer@emk-elektronik.de
- TOP860 MPC860T - TOP5200 MPC5200 + TOP860 MPC860T + TOP5200 MPC5200
Tolunay Orkun torkun@nextio.com
- csb272 PPC405GP - csb472 PPC405GP + csb272 PPC405GP + csb472 PPC405GP
John Otken jotken@softadvances.com
- luan PPC440SP - taihu PPC405EP + luan PPC440SP + taihu PPC405EP
Keith Outwater Keith_Outwater@mvis.com
- GEN860T MPC860T - GEN860T_SC MPC860T + GEN860T MPC860T + GEN860T_SC MPC860T
Frank Panno fpanno@delphintech.com
- ep8260 MPC8260 + ep8260 MPC8260
Denis Peter d.peter@mpl.ch
- MIP405 PPC4xx - PIP405 PPC4xx + MIP405 PPC4xx + PIP405 PPC4xx
Kim Phillips kim.phillips@freescale.com
- MPC8349EMDS MPC8349 + MPC8349EMDS MPC8349
Daniel Poirot dan.poirot@windriver.com
- sbc8240 MPC8240 - sbc405 PPC405GP + sbc8240 MPC8240 + sbc405 PPC405GP
Stefan Roese sr@denx.de
- P3M7448 MPC7448 - - uc100 MPC857 - - TQM85xx MPC8540/8541/8555/8560 - - acadia PPC405EZ - alpr PPC440GX - bamboo PPC440EP - bunbinga PPC405EP - canyonlands PPC460EX - ebony PPC440GP - glacier PPC460GT - haleakala PPC405EXr - katmai PPC440SPe - kilauea PPC405EX - lwmon5 PPC440EPx - makalu PPC405EX - ocotea PPC440GX - p3p440 PPC440GP - pcs440ep PPC440EP - rainier PPC440GRx - sequoia PPC440EPx - sycamore PPC405GPr - taishan PPC440GX - walnut PPC405GP - yellowstone PPC440GR - yosemite PPC440EP - zeus PPC405EP - - P3M750 PPC750FX/GX/GL + P3M7448 MPC7448 + + uc100 MPC857 + + TQM85xx MPC8540/8541/8555/8560 + + acadia PPC405EZ + alpr PPC440GX + bamboo PPC440EP + bunbinga PPC405EP + canyonlands PPC460EX + ebony PPC440GP + glacier PPC460GT + haleakala PPC405EXr + katmai PPC440SPe + kilauea PPC405EX + lwmon5 PPC440EPx + makalu PPC405EX + ocotea PPC440GX + p3p440 PPC440GP + pcs440ep PPC440EP + rainier PPC440GRx + sequoia PPC440EPx + sycamore PPC405GPr + taishan PPC440GX + walnut PPC405GP + yellowstone PPC440GR + yosemite PPC440EP + zeus PPC405EP + + P3M750 PPC750FX/GX/GL
Yusdi Santoso yusdi_santoso@adaptec.com
@@ -352,406 +351,404 @@ Yusdi Santoso yusdi_santoso@adaptec.com
Travis Sawyer (travis.sawyer@sandburst.com>
- KAREF PPC440GX - METROBOX PPC440GX - XPEDITE1K PPC440GX + KAREF PPC440GX + METROBOX PPC440GX + XPEDITE1K PPC440GX
Heiko Schocher hs@denx.de
- ids8247 MPC8247 - jupiter MPC5200 - mgcoge MPC8247 - mgsuvd MPC852 - municse MPC5200 - sc3 PPC405GP - uc101 MPC5200 + ids8247 MPC8247 + jupiter MPC5200 + mgcoge MPC8247 + mgsuvd MPC852 + municse MPC5200 + sc3 PPC405GP + uc101 MPC5200
Peter De Schrijver p2@mind.be
- ML2 PPC4xx + ML2 PPC4xx
Andre Schwarz andre.schwarz@matrix-vision.de
- mvblm7 MPC8343 + mvblm7 MPC8343
Timur Tabi timur@freescale.com
- MPC8349E-mITX MPC8349 - MPC8349E-mITX-GP MPC8349 + MPC8349E-mITX MPC8349 + MPC8349E-mITX-GP MPC8349
Erik Theisen etheisen@mindspring.com
- W7OLMC PPC4xx - W7OLMG PPC4xx + W7OLMC PPC4xx + W7OLMG PPC4xx
Jim Thompson jim@musenki.com
- MUSENKI MPC8245/8241 - Sandpoint8245 MPC8245 + MUSENKI MPC8245/8241 + Sandpoint8245 MPC8245
Rune Torgersen runet@innovsys.com
- MPC8266ADS MPC8266 + MPC8266ADS MPC8266
David Updegraff dave@cray.com
- CRAYL1 PPC4xx + CRAYL1 PPC4xx
Anton Vorontsov avorontsov@ru.mvista.com
- MPC8360ERDK MPC8360 + MPC8360ERDK MPC8360
Josef Wagner Wagner@Microsys.de
- CPC45 MPC8245 - PM520 MPC5200 + CPC45 MPC8245 + PM520 MPC5200
Stephen Williams steve@icarus.com
- JSE PPC405GPr + JSE PPC405GPr
John Zhan zhanz@sinovee.com
- svm_sc8xx MPC8xx + svm_sc8xx MPC8xx
Guennadi Liakhovetski g.liakhovetski@gmx.de
- linkstation MPC8241 + linkstation MPC8241
-------------------------------------------------------------------------
Unknown / orphaned boards:
- ADS860 MPC8xx - FADS823 MPC8xx - FADS850SAR MPC8xx - FADS860T MPC8xx - GENIETV MPC8xx - IAD210 MPC8xx - MBX MPC8xx - MBX860T MPC8xx - NX823 MPC8xx - RPXClassic MPC8xx - RPXlite MPC8xx + ADS860 MPC8xx + FADS823 MPC8xx + FADS850SAR MPC8xx + FADS860T MPC8xx + GENIETV MPC8xx + IAD210 MPC8xx + MBX MPC8xx + MBX860T MPC8xx + NX823 MPC8xx + RPXClassic MPC8xx + RPXlite MPC8xx
- ERIC PPC4xx + ERIC PPC4xx
- MOUSSE MPC824x + MOUSSE MPC824x
- RPXsuper MPC8260 - rsdproto MPC8260 + RPXsuper MPC8260 + rsdproto MPC8260
- EVB64260 MPC7xx_74xx + EVB64260 MPC7xx_74xx
######################################################################### # ARM Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Rowel Atienza rowel@diwalabs.com
- armadillo ARM720T + armadillo ARM720T
Rishi Bhattacharya rishi@ti.com
- omap5912osk ARM926EJS + omap5912osk ARM926EJS
Cliff Brake cliff.brake@gmail.com
- pxa255_idp xscale + pxa255_idp xscale
Rick Bronson rick@efn.org
- AT91RM9200DK at91rm9200 + AT91RM9200DK at91rm9200
George G. Davis gdavis@mvista.com
- assabet SA1100 - gcplus SA1100 + assabet SA1100 + gcplus SA1100
Thomas Elste info@elste.org
- modnet50 ARM720T (NET+50) + modnet50 ARM720T (NET+50)
Peter Figuli peposh@etc.sk
- wepep250 xscale + wepep250 xscale
Marius Gröger mag@sysgo.de
- impa7 ARM720T (EP7211) - ep7312 ARM720T (EP7312) + impa7 ARM720T (EP7211) + ep7312 ARM720T (EP7312)
Kshitij Gupta kshitij@ti.com
- omap1510inn ARM925T - omap1610inn ARM926EJS + omap1510inn ARM925T + omap1610inn ARM926EJS
Gary Jennejohn gj@denx.de
- smdk2400 ARM920T - trab ARM920T + smdk2400 ARM920T + trab ARM920T
Konstantin Kletschke kletschke@synertronixx.de - scb9328 ARM920T + scb9328 ARM920T
Nishant Kamat nskamat@ti.com
- omap1610h2 ARM926EJS + omap1610h2 ARM926EJS
Sergey Kubushyn ksi@koi8.net
- DV-EVM ARM926EJS - SONATA ARM926EJS - SCHMOOGIE ARM926EJS + DV-EVM ARM926EJS + SONATA ARM926EJS + SCHMOOGIE ARM926EJS
Prakash Kumar prakash@embedx.com
- cerf250 xscale + cerf250 xscale
David Müller d.mueller@elsoft.ch
- smdk2410 ARM920T - VCMA9 ARM920T + smdk2410 ARM920T + VCMA9 ARM920T
Rolf Offermanns rof@sysgo.de
- shannon SA1100 + shannon SA1100
Peter Pearse peter.pearse@arm.com - integratorcp All current ARM supplied & - supported core modules - -see http://www.arm.com - /products/DevTools - /Hardware_Platforms.html - versatile ARM926EJ-S - versatile ARM926EJ-S + integratorcp All current ARM supplied & supported core modules + -see http://www.arm.com/products/DevTools/Hardware_Platforms.html + versatile ARM926EJ-S + versatile ARM926EJ-S
Dave Peverley dpeverley@mpc-data.co.uk
- omap730p2 ARM926EJS + omap730p2 ARM926EJS
Stelian Pop stelian.pop@leadtechdesign.com
- at91cap9adk ARM926EJS (AT91CAP9 SoC) - at91sam9260ek ARM926EJS (AT91SAM9260 SoC) - at91sam9261ek ARM926EJS (AT91SAM9261 SoC) - at91sam9263ek ARM926EJS (AT91SAM9263 SoC) - at91sam9rlek ARM926EJS (AT91SAM9RL SoC) + at91cap9adk ARM926EJS (AT91CAP9 SoC) + at91sam9260ek ARM926EJS (AT91SAM9260 SoC) + at91sam9261ek ARM926EJS (AT91SAM9261 SoC) + at91sam9263ek ARM926EJS (AT91SAM9263 SoC) + at91sam9rlek ARM926EJS (AT91SAM9RL SoC)
Stefan Roese sr@denx.de
- ixdpg425 xscale - pdnb3 xscale - scpu xscale + ixdpg425 xscale + pdnb3 xscale + scpu xscale
Robert Schwebel r.schwebel@pengutronix.de
- csb226 xscale - innokom xscale + csb226 xscale + innokom xscale
Andrea Scian andrea.scian@dave-tech.it
- B2 ARM7TDMI (S3C44B0X) + B2 ARM7TDMI (S3C44B0X)
Greg Ungerer greg.ungerer@opengear.com
- cm4008 ks8695p - cm4116 ks8695p - cm4148 ks8695p + cm4008 ks8695p + cm4116 ks8695p + cm4148 ks8695p
Richard Woodruff r-woodruff2@ti.com
- omap2420h4 ARM1136EJS + omap2420h4 ARM1136EJS
Kyungmin Park kyungmin.park@samsung.com
- apollon ARM1136EJS + apollon ARM1136EJS
Alex Züpke azu@sysgo.de
- lart SA1100 - dnp1110 SA1110 + lart SA1100 + dnp1110 SA1110
Michael Schwingen michael@schwingen.org
- actux1 xscale - actux2 xscale - actux3 xscale - actux4 xscale + actux1 xscale + actux2 xscale + actux3 xscale + actux4 xscale
-------------------------------------------------------------------------
Unknown / orphaned boards: - - cradle xscale - ixdp425 xscale - lubbock xscale + Board CPU Last known maintainer / Comment +......................................................................... + cradle xscale Kyle Harris kharris@nexus-tech.net / dead address + ixdp425 xscale Kyle Harris kharris@nexus-tech.net / dead address + lubbock xscale Kyle Harris kharris@nexus-tech.net / dead address
######################################################################### # x86 Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Daniel Engström daniel@omicron.se
- sc520_cdp x86 + sc520_cdp x86
######################################################################### # MIPS Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Wolfgang Denk wd@denx.de
- incaip MIPS32 4Kc - purple MIPS64 5Kc + incaip MIPS32 4Kc + purple MIPS64 5Kc
Thomas Lange thomas@corelatus.se - dbau1x00 MIPS32 Au1000 - gth2 MIPS32 Au1000 + dbau1x00 MIPS32 Au1000 + gth2 MIPS32 Au1000
Vlad Lungu vlad.lungu@windriver.com - qemu_mips MIPS32 + qemu_mips MIPS32
######################################################################### # Nios-32 Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Stephan Linz linz@li-pro.net
- DK1S10 Nios-32 - ADNPESC1 Nios-32 + DK1S10 Nios-32 + ADNPESC1 Nios-32
Scott McNutt smcnutt@psyent.com
- DK1C20 Nios-32 + DK1C20 Nios-32
######################################################################### # Nios-II Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Scott McNutt smcnutt@psyent.com
- PCI5441 Nios-II - PK1C20 Nios-II - EP1C20 Nios-II - EP1S10 Nios-II - EP1S40 Nios-II + PCI5441 Nios-II + PK1C20 Nios-II + EP1C20 Nios-II + EP1S10 Nios-II + EP1S40 Nios-II
######################################################################### # MicroBlaze Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Yasushi Shoji yashi@atmark-techno.com
- SUZAKU MicroBlaze + SUZAKU MicroBlaze
Michal Simek monstr@monstr.eu
- ML401 MicroBlaze - XUPV2P MicroBlaze + ML401 MicroBlaze + XUPV2P MicroBlaze
######################################################################### # Coldfire Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Matthias Fuchs matthias.fuchs@esd-electronics.com
- TASREG MCF5249 + TASREG MCF5249
TsiChung Liew Tsi-Chung.Liew@freescale.com
- M52277EVB mcf5227x - M5235EVB mcf52x2 - M5329EVB mcf532x - M5373EVB mcf532x - M54455EVB mcf5445x - M5475EVB mcf547x_8x - M5485EVB mcf547x_8x + M52277EVB mcf5227x + M5235EVB mcf52x2 + M5329EVB mcf532x + M5373EVB mcf532x + M54455EVB mcf5445x + M5475EVB mcf547x_8x + M5485EVB mcf547x_8x
Hayden Fraser Hayden.Fraser@freescale.com
- M5253EVBE mcf52x2 + M5253EVBE mcf52x2
######################################################################### # AVR32 Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Haavard Skinnemoen hskinnemoen@atmel.com
- ATSTK1000 AT32AP7xxx - ATSTK1002 AT32AP7000 - ATSTK1003 AT32AP7001 - ATSTK1004 AT32AP7002 - ATSTK1006 AT32AP7000 - ATNGW100 AT32AP7000 + ATSTK1000 AT32AP7xxx + ATSTK1002 AT32AP7000 + ATSTK1003 AT32AP7001 + ATSTK1004 AT32AP7002 + ATSTK1006 AT32AP7000 + ATNGW100 AT32AP7000
######################################################################### # SuperH Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Nobuhiro Iwamatsu iwamatsu@nigauri.org
- MS7750SE SH7750 - MS7722SE SH7722 - R7780MP SH7780 - R2DPlus SH7751R - SH7763RDP SH7763 + MS7750SE SH7750 + MS7722SE SH7722 + R7780MP SH7780 + R2DPlus SH7751R + SH7763RDP SH7763
Mark Jonas mark.jonas@de.bosch.com
- mpr2 SH7720 + mpr2 SH7720
Yoshihiro Shimoda shimoda.yoshihiro@renesas.com
- MS7720SE SH7720 + MS7720SE SH7720
Yusuke Goda goda.yusuke@renesas.com
- MIGO-R SH7722 + MIGO-R SH7722
######################################################################### # Blackfin Systems: # # # # Maintainer Name, Email Address # -# Board CPU # +# Board CPU # #########################################################################
Mike Frysinger vapier@gentoo.org Blackfin Team u-boot-devel@blackfin.uclinux.org
- BF533-EZKIT BF533 - BF533-STAMP BF533 - BF537-STAMP BF537 - BF561-EZKIT BF561 + BF533-EZKIT BF533 + BF533-STAMP BF533 + BF537-STAMP BF537 + BF561-EZKIT BF561
######################################################################### # End of MAINTAINERS list #

MMC_CMDAT_R1 | MMC_CMDAT_READ | MMC_CMDAT_BLOCK | MMC_CMDAT_DATA_EN);
@@ -568,7 +568,7 @@ mmc_init(int verbose) MMC_SPI = MMC_SPI_DISABLE;
/* reset */
- mmc_cmd(MMC_CMD_RESET, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0);
- mmc_cmd(MMC_CMD_GO_IDLE_STATE, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0); udelay(200000); retries = 3; while (retries--) {
@@ -578,7 +578,7 @@ mmc_init(int verbose) break; }
resp = mmc_cmd(SD_CMD_APP_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */
resp = mmc_cmd(SD_CMD_APP_SEND_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */
Please split it
if (resp[0] & 0x80000000) { mmc_dev.if_type = IF_TYPE_SD; debug("Detected SD card\n");
@@ -616,7 +616,7 @@ mmc_init(int verbose) memcpy(cid_resp, resp, sizeof(cid_resp));
/* MMC exists, get CSD too */
resp = mmc_cmd(MMC_CMD_SET_RCA, 0, 0, MMC_CMDAT_R1);
if (IF_TYPE_SD == mmc_dev.if_type) rca = ((resp[0] & 0xffff0000) >> 16); resp = mmc_cmd(MMC_CMD_SEND_CSD, rca, 0, MMC_CMDAT_R2);resp = mmc_cmd(MMC_CMD_SET_RELATIVE_ADDR, 0, 0, MMC_CMDAT_R1);
diff --git a/include/asm-arm/arch-pxa/mmc.h b/include/asm-arm/arch-pxa/mmc.h index b9304b1..9954680 100644 --- a/include/asm-arm/arch-pxa/mmc.h +++ b/include/asm-arm/arch-pxa/mmc.h @@ -110,23 +110,6 @@ #define MMC_DEFAULT_RCA 1
#define MMC_BLOCK_SIZE 512 -#define MMC_CMD_RESET 0 -#define MMC_CMD_SEND_OP_COND 1 -#define MMC_CMD_ALL_SEND_CID 2 -#define MMC_CMD_SET_RCA 3 -#define MMC_CMD_SELECT_CARD 7 -#define MMC_CMD_SEND_CSD 9 -#define MMC_CMD_SEND_CID 10 -#define MMC_CMD_SEND_STATUS 13 -#define MMC_CMD_SET_BLOCKLEN 16
Best Regards, J

This moves the MMC and SD Card command definitions from include/asm/arch/mmc.h into include/mmc.h. These definitions are given by the MMC and SD Card standards, not by any particular architecture.
There's a lot more room for consolidation in the MMC drivers which I'm hoping to get done eventually, but this patch is a start.
Compile-tested for all avr32 boards as well as lpc2292sodimm and lubbock. This should cover all three mmc drivers in the tree.
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com --- Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com wrote:
resp = mmc_cmd(SD_CMD_APP_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */
resp = mmc_cmd(SD_CMD_APP_SEND_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */
Please split it
I didn't really intend to do a coding style clean up. But sure, I can fix the lines I touch anyway...
Updated patch below. I've rebased it on top of current HEAD (it conflicted with the big whitespace cleanup) and fixed the three whitespace issues that I copied into include/mmc.h
Haavard
cpu/at32ap/atmel_mci.c | 4 ++-- cpu/pxa/mmc.c | 11 +++++++---- include/asm-arm/arch-pxa/mmc.h | 17 ----------------- include/asm-avr32/arch-at32ap700x/mmc.h | 19 ------------------- include/mmc.h | 24 ++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 42 deletions(-)
diff --git a/cpu/at32ap/atmel_mci.c b/cpu/at32ap/atmel_mci.c index f59dfb5..92f5a28 100644 --- a/cpu/at32ap/atmel_mci.c +++ b/cpu/at32ap/atmel_mci.c @@ -350,7 +350,7 @@ static int sd_init_card(struct mmc_cid *cid, int verbose)
mmc_idle_cards(); for (i = 0; i < 1000; i++) { - ret = mmc_acmd(MMC_ACMD_SD_SEND_OP_COND, CFG_MMC_OP_COND, + ret = mmc_acmd(SD_CMD_APP_SEND_OP_COND, CFG_MMC_OP_COND, resp, R3 | NID); if (ret || (resp[0] & 0x80000000)) break; @@ -368,7 +368,7 @@ static int sd_init_card(struct mmc_cid *cid, int verbose) mmc_dump_cid(cid);
/* Get RCA of the card that responded */ - ret = mmc_cmd(MMC_CMD_SD_SEND_RELATIVE_ADDR, 0, resp, R6 | NCR); + ret = mmc_cmd(SD_CMD_SEND_RELATIVE_ADDR, 0, resp, R6 | NCR); if (ret) return ret;
diff --git a/cpu/pxa/mmc.c b/cpu/pxa/mmc.c index 039ce0f..4495a80 100644 --- a/cpu/pxa/mmc.c +++ b/cpu/pxa/mmc.c @@ -119,7 +119,7 @@ mmc_block_read(uchar * dst, ulong src, ulong len) MMC_RDTO = 0xffff; MMC_NOB = 1; MMC_BLKLEN = len; - mmc_cmd(MMC_CMD_READ_BLOCK, argh, argl, + mmc_cmd(MMC_CMD_READ_SINGLE_BLOCK, argh, argl, MMC_CMDAT_R1 | MMC_CMDAT_READ | MMC_CMDAT_BLOCK | MMC_CMDAT_DATA_EN);
@@ -568,7 +568,7 @@ mmc_init(int verbose) MMC_SPI = MMC_SPI_DISABLE;
/* reset */ - mmc_cmd(MMC_CMD_RESET, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0); + mmc_cmd(MMC_CMD_GO_IDLE_STATE, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0); udelay(200000); retries = 3; while (retries--) { @@ -578,7 +578,10 @@ mmc_init(int verbose) break; }
- resp = mmc_cmd(SD_CMD_APP_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */ + /* Select 3.2-3.3 and 3.3-3.4V */ + resp = mmc_cmd(SD_CMD_APP_SEND_OP_COND, 0x0020, 0, + MMC_CMDAT_R3 | (retries < 2 ? 0 + : MMC_CMDAT_INIT)); if (resp[0] & 0x80000000) { mmc_dev.if_type = IF_TYPE_SD; debug("Detected SD card\n"); @@ -616,7 +619,7 @@ mmc_init(int verbose) memcpy(cid_resp, resp, sizeof(cid_resp));
/* MMC exists, get CSD too */ - resp = mmc_cmd(MMC_CMD_SET_RCA, 0, 0, MMC_CMDAT_R1); + resp = mmc_cmd(MMC_CMD_SET_RELATIVE_ADDR, 0, 0, MMC_CMDAT_R1); if (IF_TYPE_SD == mmc_dev.if_type) rca = ((resp[0] & 0xffff0000) >> 16); resp = mmc_cmd(MMC_CMD_SEND_CSD, rca, 0, MMC_CMDAT_R2); diff --git a/include/asm-arm/arch-pxa/mmc.h b/include/asm-arm/arch-pxa/mmc.h index 9440d80..85e144b 100644 --- a/include/asm-arm/arch-pxa/mmc.h +++ b/include/asm-arm/arch-pxa/mmc.h @@ -110,23 +110,6 @@ #define MMC_DEFAULT_RCA 1
#define MMC_BLOCK_SIZE 512 -#define MMC_CMD_RESET 0 -#define MMC_CMD_SEND_OP_COND 1 -#define MMC_CMD_ALL_SEND_CID 2 -#define MMC_CMD_SET_RCA 3 -#define MMC_CMD_SELECT_CARD 7 -#define MMC_CMD_SEND_CSD 9 -#define MMC_CMD_SEND_CID 10 -#define MMC_CMD_SEND_STATUS 13 -#define MMC_CMD_SET_BLOCKLEN 16 -#define MMC_CMD_READ_BLOCK 17 -#define MMC_CMD_RD_BLK_MULTI 18 -#define MMC_CMD_WRITE_BLOCK 24 -#define MMC_CMD_APP_CMD 55 - -#define SD_CMD_APP_SET_BUS_WIDTH 6 -#define SD_CMD_APP_OP_COND 41 - #define MMC_MAX_BLOCK_SIZE 512
#define MMC_R1_IDLE_STATE 0x01 diff --git a/include/asm-avr32/arch-at32ap700x/mmc.h b/include/asm-avr32/arch-at32ap700x/mmc.h index 6a33fef..9caba91 100644 --- a/include/asm-avr32/arch-at32ap700x/mmc.h +++ b/include/asm-avr32/arch-at32ap700x/mmc.h @@ -71,25 +71,6 @@ struct mmc_csd u8 one:1; };
-/* MMC Command numbers */ -#define MMC_CMD_GO_IDLE_STATE 0 -#define MMC_CMD_SEND_OP_COND 1 -#define MMC_CMD_ALL_SEND_CID 2 -#define MMC_CMD_SET_RELATIVE_ADDR 3 -#define MMC_CMD_SD_SEND_RELATIVE_ADDR 3 -#define MMC_CMD_SET_DSR 4 -#define MMC_CMD_SELECT_CARD 7 -#define MMC_CMD_SEND_CSD 9 -#define MMC_CMD_SEND_CID 10 -#define MMC_CMD_SEND_STATUS 13 -#define MMC_CMD_SET_BLOCKLEN 16 -#define MMC_CMD_READ_SINGLE_BLOCK 17 -#define MMC_CMD_READ_MULTIPLE_BLOCK 18 -#define MMC_CMD_WRITE_BLOCK 24 -#define MMC_CMD_APP_CMD 55 - -#define MMC_ACMD_SD_SEND_OP_COND 41 - #define R1_ILLEGAL_COMMAND (1 << 22) #define R1_APP_CMD (1 << 5)
diff --git a/include/mmc.h b/include/mmc.h index a271695..19c76fe 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -25,6 +25,30 @@ #define _MMC_H_ #include <asm/arch/mmc.h>
+/* MMC command numbers */ +#define MMC_CMD_GO_IDLE_STATE 0 +#define MMC_CMD_SEND_OP_COND 1 +#define MMC_CMD_ALL_SEND_CID 2 +#define MMC_CMD_SET_RELATIVE_ADDR 3 +#define MMC_CMD_SET_DSR 4 +#define MMC_CMD_SELECT_CARD 7 +#define MMC_CMD_SEND_CSD 9 +#define MMC_CMD_SEND_CID 10 +#define MMC_CMD_SEND_STATUS 13 +#define MMC_CMD_SET_BLOCKLEN 16 +#define MMC_CMD_READ_SINGLE_BLOCK 17 +#define MMC_CMD_READ_MULTIPLE_BLOCK 18 +#define MMC_CMD_WRITE_BLOCK 24 +#define MMC_CMD_APP_CMD 55 + +/* SD Card command numbers */ +#define SD_CMD_SEND_RELATIVE_ADDR 3 +#define SD_CMD_SWITCH 6 +#define SD_CMD_SEND_IF_COND 8 + +#define SD_CMD_APP_SET_BUS_WIDTH 6 +#define SD_CMD_APP_SEND_OP_COND 41 + int mmc_init(int verbose); int mmc_read(ulong src, uchar *dst, int size); int mmc_write(uchar *src, ulong dst, int size);

In message 20080522110959.4458c6f2@hskinnemo-gx745.norway.atmel.com you wrote:
This moves the MMC and SD Card command definitions from include/asm/arch/mmc.h into include/mmc.h. These definitions are given by the MMC and SD Card standards, not by any particular architecture.
There's a lot more room for consolidation in the MMC drivers which I'm hoping to get done eventually, but this patch is a start.
Compile-tested for all avr32 boards as well as lpc2292sodimm and lubbock. This should cover all three mmc drivers in the tree.
Signed-off-by: Haavard Skinnemoen haavard.skinnemoen@atmel.com
...
cpu/at32ap/atmel_mci.c | 4 ++-- cpu/pxa/mmc.c | 11 +++++++---- include/asm-arm/arch-pxa/mmc.h | 17 ----------------- include/asm-avr32/arch-at32ap700x/mmc.h | 19 ------------------- include/mmc.h | 24 ++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 42 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (5)
-
Haavard Skinnemoen
-
Jean-Christophe PLAGNIOL-VILLARD
-
Jerry Van Baren
-
Liu Dave
-
Wolfgang Denk