: Fixing blksz_bits calling inside drivers/mmc/mmc.c and drivers/mmc/omap.c
PATCH 1/1 : Fixing blksz_bits calling inside drivers/mmc/mmc.c and drivers/mmc/omap.c
This small patch solves the problem ;-)
Here's the error dump:drivers/mmc/omap.c: In function 'mmc_omap_prepare_dma':drivers/mmc/omap.c:636: error: 'struct mmc_data' has no member named 'blksz_bits' drivers/mmc/omap.c:639: error: 'struct mmc_data' has no member named 'blksz_bits' drivers/mmc/omap.c: In function 'mmc_omap_prepare_data':drivers/mmc/omap.c:828: error: 'struct mmc_data' has no member named 'blksz_bits'
Obs: The same occurs for drivers/mmc/mmc.c file
Signature · 5 lines
Regards, Felipe Balbi [email protected] OSMRC
drivers/mmc/omap.c +3 -3
@@ -633,10 +633,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame =1 << data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (1 << data->blksz))) count = frame; host->dma_len = count;
@@ -825,7 +825,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size =1 << data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );
drivers/mmc/mmc.c +1 -1
@@ -996,7 +996,7 @@mmc_set_data_timeout (&data, card,0 ); - data.blksz =1 <<3 ; + data.blksz_bits =1 <<3 ; data.blocks =1 ; data.flags =MMC_DATA_READ ; data.sg = &sg;
Quoted 44 lines · Felipe Balbi
This small patch solves the problem ;-)
Here's the error dump:
drivers/mmc/omap.c: In function 'mmc_omap_prepare_dma':drivers/mmc/omap.c:636: error: 'structmmc_data' has no member named 'blksz_bits'drivers/mmc/omap.c:639: error: 'structmmc_data' has no member named 'blksz_bits'drivers/mmc/omap.c: In function 'mmc_omap_prepare_data':drivers/mmc/omap.c:828: error: 'structmmc_data' has no member named 'blksz_bits'Obs: The same occurs for
drivers/mmc/mmc.cfile------------------------------------------------------------------------
Index:
linux-omap/drivers/mmc/omap.c
===================================================================drivers/mmc/omap.c +3
-3@@ -633,10 +633,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame =1 << data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (1 << data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +825,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size =1 << data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );
drivers/mmc/mmc.c line 1002
Quoted 8 lines
drivers/mmc/mmc.c +1
-1@@ -996,7 +996,7 @@mmc_set_data_timeout (&data, card,0 ); - data.blksz =1 <<3 ; + data.blksz_bits =1 <<3 ; data.blocks =1 ; data.flags =MMC_DATA_READ ; data.sg = &sg;
This doesn't look correct to me (and compilation still fails). Why do you add data.blksz_bits in mmc.c again? It was removed by RMK at
Whats about the attachment instead? It additionally removes warning
drivers/mmc/omap.c:587: warning: 'mmc_omap_switch_callback' defined but not used
too.
drivers/mmc/omap.c +3 -9
@@ -581,12 +581,6 @@ static void mmc_omap_switch_timer(unsignschedule_work (&host->switch_work); } -/* FIXME: Handle card insertion and removal properly. Maybe use a mask -* for MMC state? */ -static void mmc_omap_switch_callback (unsigned long data,u8 mmc_mask) -{ -} -static void mmc_omap_switch_handler (void *data) {struct mmc_omap_host *host = (struct mmc_omap_host *) data;
@@ -633,10 +627,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame = data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (data->blksz))) count = frame; host->dma_len = count;
@@ -825,7 +819,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size = data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );
Quoted 108 lines · ext Dirk Behme
Quoted 46 lines · Felipe Balbi
This small patch solves the problem ;-)
Here's the error dump:
drivers/mmc/omap.c: In function 'mmc_omap_prepare_dma':drivers/mmc/omap.c:636: error: 'structmmc_data' has no member named 'blksz_bits'drivers/mmc/omap.c:639: error: 'structmmc_data' has no member named 'blksz_bits'drivers/mmc/omap.c: In function 'mmc_omap_prepare_data':drivers/mmc/omap.c:828: error: 'structmmc_data' has no member named 'blksz_bits'Obs: The same occurs for
drivers/mmc/mmc.cfile------------------------------------------------------------------------
Index:
linux-omap/drivers/mmc/omap.c
===================================================================
---linux-omap.orig/drivers/mmc/omap.c2006-10-27
09:18:34.000000000 -0400
+++linux-omap/drivers/mmc/omap.c2006-10-27 11:03:14.000000000 -0400drivers/mmc/omap.c +3
-3@@ -633,10 +633,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame =1 << data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (1 << data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +825,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size =1 << data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +0
-1-0400drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 line 1002
Quoted 8 lines
drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +1
-1@@ -996,7 +996,7 @@ mmc_set_data_timeout(&data, card, 0); - data.blksz = 1 << 3; + data.blksz_bits = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;This doesn't look correct to me (and compilation still fails). Why do you add data.blksz_bits in
mmc.cagain? It was removed by RMK atWhats about the attachment instead? It additionally removes warning
drivers/mmc/omap.c:587: warning: 'mmc_omap_switch_callback' defined but not usedtoo.
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
------------------------------------------------------------------------Index:
linux-osk/drivers/mmc/omap.c
===================================================================drivers/mmc/omap.c +2
-8@@ -581,12 +581,6 @@ static void mmc_omap_switch_timer(unsignschedule_work (&host->switch_work); } -/* FIXME: Handle card insertion and removal properly. Maybe use a mask -* for MMC state? */ -static void mmc_omap_switch_callback (unsigned long data,u8 mmc_mask) -{ -} -static void mmc_omap_switch_handler (void *data) {struct mmc_omap_host *host = (struct mmc_omap_host *) data;@@ -633,10 +627,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame = data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (data->blksz))) count = frame; host->dma_len = count;
drivers/mmc/omap.c mmc_omap_prepare_data(struct mmc_omap_ho · line 825
Quoted 8 lines
drivers/mmc/omap.c +1
-1@@ -825,7 +819,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size = data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );
But then you will need to modify the struct mmc_data... and that didn't seem correct for me 'cause every module using this structure (and probable future modules) would need to modify the same way you did...
Signature · 5 lines
Regards, Felipe Balbi [email protected] OSMRC
I just saw an error in the patch generation...
(...)
drivers/mmc/mmc.c +0 -0
@@ -996,7 +996,7 @@
mmc_set_data_timeout(&data, card, 0);
- data.blksz = 1 << 3;
+ data.blksz_bits = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;
The module should actually be inverted here... just like:
(...)
drivers/mmc/mmc.c +0 -0
@@ -996,7 +996,7 @@
mmc_set_data_timeout(&data, card, 0);
- data.blksz_bits = 1 << 3;
+ data.blksz = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;
I look at my quilt "repository" and the patch is ok... Don't know how that happened.
Quoted 121 lines · ext Felipe Balbi
Quoted 110 lines · ext Dirk Behme
Quoted 48 lines · Felipe Balbi
This small patch solves the problem ;-)
Here's the error dump:
drivers/mmc/omap.c: In function 'mmc_omap_prepare_dma':drivers/mmc/omap.c:636: error: 'structmmc_data' has no member named 'blksz_bits'drivers/mmc/omap.c:639: error: 'structmmc_data' has no member named 'blksz_bits'drivers/mmc/omap.c: In function 'mmc_omap_prepare_data':drivers/mmc/omap.c:828: error: 'structmmc_data' has no member named 'blksz_bits'Obs: The same occurs for
drivers/mmc/mmc.cfile------------------------------------------------------------------------
Index:
linux-omap/drivers/mmc/omap.c
===================================================================
---linux-omap.orig/drivers/mmc/omap.c2006-10-27
09:18:34.000000000 -0400
+++linux-omap/drivers/mmc/omap.c2006-10-27 11:03:14.000000000
-0400(quoted diff) +3
-3@@ -633,10 +633,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hos int sync_dev = 0; data_addr = host->phys_base + OMAP_MMC_REG_DATA; - frame = 1 << data->blksz_bits; + frame = 1 << data->blksz; count = sg_dma_len(sg); - if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) + if ((data->blocks == 1) && (count > (1 << data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +825,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size = 1 << data->blksz_bits; + block_size = 1 << data->blksz; OMAP_MMC_WRITE(host, NBLK, data->blocks - 1); OMAP_MMC_WRITE(host, BLEN, block_size - 1);drivers/mmc/mmc.c 2006-10-26 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +0
-009:53:24.000000000 -0400
drivers/mmc/mmc.c 2006-10-26 line 1002
Quoted 8 lines
drivers/mmc/mmc.c 2006-10-26 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +1
-1@@ -996,7 +996,7 @@ mmc_set_data_timeout(&data, card, 0); - data.blksz = 1 << 3; + data.blksz_bits = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;This doesn't look correct to me (and compilation still fails). Why do you add data.blksz_bits in
mmc.cagain? It was removed by RMK atWhats about the attachment instead? It additionally removes warning
drivers/mmc/omap.c:587: warning: 'mmc_omap_switch_callback' defined but not usedtoo.
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
------------------------------------------------------------------------Index:
linux-osk/drivers/mmc/omap.c
===================================================================drivers/mmc/omap.c +2
-8@@ -581,12 +581,6 @@ static void mmc_omap_switch_timer(unsignschedule_work (&host->switch_work); } -/* FIXME: Handle card insertion and removal properly. Maybe use a mask -* for MMC state? */ -static void mmc_omap_switch_callback (unsigned long data,u8 mmc_mask) -{ -} -static void mmc_omap_switch_handler (void *data) {struct mmc_omap_host *host = (struct mmc_omap_host *) data;@@ -633,10 +627,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame = data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (data->blksz))) count = frame; host->dma_len = count;drivers/mmc/omap.c mmc_omap_prepare_data(struct mmc_omap_ho · line 825
Quoted 8 lines
drivers/mmc/omap.c +1
-1@@ -825,7 +819,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size = data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );But then you will need to modify the struct
mmc_data... and that didn't seem correct for me 'cause every module using this structure (and probable future modules) would need to modify the same way you did...
Signature · 5 lines
Regards, Felipe Balbi [email protected] OSMRC
Quoted 97 lines · Felipe Balbi
Quoted 97 lines
Quoted 32 lines
Index:
linux-omap/drivers/mmc/omap.c
===================================================================
---linux-omap.orig/drivers/mmc/omap.c2006-10-27
09:18:34.000000000 -0400
+++linux-omap/drivers/mmc/omap.c2006-10-27 11:03:14.000000000 -0400drivers/mmc/omap.c +3
-3@@ -633,10 +633,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame =1 << data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (1 << data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +825,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size =1 << data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +0
-1-0400drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 line 1002
Quoted 8 lines
drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +1
-1@@ -996,7 +996,7 @@ mmc_set_data_timeout(&data, card, 0); - data.blksz = 1 << 3; + data.blksz_bits = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;This doesn't look correct to me (and compilation still fails). Why do you add data.blksz_bits in
mmc.cagain? It was removed by RMK atWhats about the attachment instead? It additionally removes warning
drivers/mmc/omap.c:587: warning: 'mmc_omap_switch_callback' defined but not usedtoo.
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
------------------------------------------------------------------------Index:
linux-osk/drivers/mmc/omap.c
===================================================================drivers/mmc/omap.c +3
-9@@ -581,12 +581,6 @@ static void mmc_omap_switch_timer(unsignschedule_work (&host->switch_work); } -/* FIXME: Handle card insertion and removal properly. Maybe use a mask -* for MMC state? */ -static void mmc_omap_switch_callback (unsigned long data,u8 mmc_mask) -{ -} -static void mmc_omap_switch_handler (void *data) {struct mmc_omap_host *host = (struct mmc_omap_host *) data;@@ -633,10 +627,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame = data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +819,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size = data->blksz;
Quoted 7 lines
drivers/mmc/omap.c mmc_omap_prepare_data(struct mmc_omap_ho · line 825
Quoted 5 lines
drivers/mmc/omap.c +0
-0OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );But then you will need to modify the struct
mmc_data...
Mmh, why? Above patch compiles for me.
blksz is part of the global struct mmc_data, isn't it?
Do we both talk about recent git? Or do you use an other or locally modified version?
Best regards
Dirk
Quoted 116 lines · ext Dirk Behme
Quoted 100 lines · Felipe Balbi
Quoted 100 lines
Quoted 34 lines
Index:
linux-omap/drivers/mmc/omap.c
===================================================================
---linux-omap.orig/drivers/mmc/omap.c2006-10-27
09:18:34.000000000 -0400
+++linux-omap/drivers/mmc/omap.c2006-10-27 11:03:14.000000000
-0400(quoted diff) +4
-5@@ -633,10 +633,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hos int sync_dev = 0; data_addr = host->phys_base + OMAP_MMC_REG_DATA; - frame = 1 << data->blksz_bits; + frame = 1 << data->blksz; count = sg_dma_len(sg); - if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) + if ((data->blocks == 1) && (count > (1 << data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +825,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size = 1 << data->blksz_bits; + block_size = 1 << data->blksz; OMAP_MMC_WRITE(host, NBLK, data->blocks - 1); OMAP_MMC_WRITE(host, BLEN, block_size - 1); --- linux-omap/drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +++ linux-omap-dev/drivers/mmc/mmc.c 2006-10-2609:53:24.000000000 -0400
Review line 1002
Quoted 8 lines
(quoted diff) +1
-1@@ -996,7 +996,7 @@ mmc_set_data_timeout(&data, card, 0); - data.blksz = 1 << 3; + data.blksz_bits = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;This doesn't look correct to me (and compilation still fails). Why do you add data.blksz_bits in
mmc.cagain? It was removed by RMK atWhats about the attachment instead? It additionally removes warning
drivers/mmc/omap.c:587: warning: 'mmc_omap_switch_callback' defined but not usedtoo.
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
------------------------------------------------------------------------Index:
linux-osk/drivers/mmc/omap.c
===================================================================drivers/mmc/omap.c +3
-9@@ -581,12 +581,6 @@ static void mmc_omap_switch_timer(unsignschedule_work (&host->switch_work); } -/* FIXME: Handle card insertion and removal properly. Maybe use a mask -* for MMC state? */ -static void mmc_omap_switch_callback (unsigned long data,u8 mmc_mask) -{ -} -static void mmc_omap_switch_handler (void *data) {struct mmc_omap_host *host = (struct mmc_omap_host *) data;@@ -633,10 +627,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame = data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +819,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size = data->blksz;Quoted 7 lines
drivers/mmc/omap.c mmc_omap_prepare_data(struct mmc_omap_ho · line 825
Quoted 5 lines
drivers/mmc/omap.c +0
-0OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );But then you will need to modify the struct
mmc_data...Mmh, why? Above patch compiles for me.
blksz is part of the global struct
mmc_data, isn't it?
Quoted 9 lines
Do we both talk about recent git? Or do you use an other or locally modified version?
Best regards
Dirk
Yep, my git tree is the newest version...
And I made a mistake here...
drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 -0400 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +1 -1
@@ -996,7 +996,7 @@ mmc_set_data_timeout(&data, card, 0); - data.blksz = 1 << 3; + data.blksz_bits = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;
It's deordered... it should appear like:
drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 -0400 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +1 -1
@@ -996,7 +996,7 @@ mmc_set_data_timeout(&data, card, 0); - data.blksz_bits = 1 << 3; + data.blksz = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;
Signature · 5 lines
Best Regards, Felipe Balbi [email protected] OSMRC
Quoted 41 lines · Felipe Balbi
Quoted 40 lines · ext Dirk Behme
Quoted 40 lines
Quoted 40 lines
Index:
linux-osk/drivers/mmc/omap.c
===================================================================drivers/mmc/omap.c +3
-9@@ -581,12 +581,6 @@ static void mmc_omap_switch_timer(unsignschedule_work (&host->switch_work); } -/* FIXME: Handle card insertion and removal properly. Maybe use a mask -* for MMC state? */ -static void mmc_omap_switch_callback (unsigned long data,u8 mmc_mask) -{ -} -static void mmc_omap_switch_handler (void *data) {struct mmc_omap_host *host = (struct mmc_omap_host *) data;@@ -633,10 +627,10 @@ mmc_omap_prepare_dma(struct mmc_omap_hosint sync_dev =0 ; data_addr = host->phys_base +OMAP_MMC_REG_DATA ; - frame =1 << data->blksz_bits; + frame = data->blksz; count =sg_dma_len (sg); -if ((data->blocks ==1 ) && (count > (1 << data->blksz_bits))) +if ((data->blocks ==1 ) && (count > (data->blksz))) count = frame; host->dma_len = count;@@ -825,7 +819,7 @@ mmc_omap_prepare_data(struct mmc_omap_ho } - block_size =1 << data->blksz_bits; + block_size = data->blksz;OMAP_MMC_WRITE (host,NBLK , data->blocks -1 );OMAP_MMC_WRITE (host,BLEN , block_size -1 );
...
Quoted 1 line
Yep, my git tree is the newest version...
...
drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 -0400 line 1002
Quoted 11 lines
drivers/mmc/mmc.c 2006-10-26 09:53:24.000000000 -0400 renamed from drivers/mmc/mmc.c 2006-10-26 06:42:31.000000000 -0400 +1
-1@@ -996,7 +996,7 @@ mmc_set_data_timeout(&data, card, 0); - data.blksz_bits = 1 << 3; + data.blksz = 1 << 3; data.blocks = 1; data.flags = MMC_DATA_READ; data.sg = &sg;
Weird. My drivers/mmc/mmc.c looks
...mmc_set_data_timeout(&data, card, 0);
data.blksz = 1 << 3;
data.blocks = 1;
data.flags = MMC_DATA_READ;
data.sg = &sg;
data.sg_len = 1;
...
without any patch. Looking at line ~999 of
it's the same. So I don't have to touch mmc.c for my patch above.
Best regards
Dirk