Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-15 Thread Lei Wen
Hi Wolfgang, On Sat, Oct 15, 2011 at 4:36 AM, Wolfgang Denk w...@denx.de wrote: Dear Lei Wen, In message CALZhoSSygHZ22N=odn4qv44a_1zxgupqlsrwa3pbbpnxbxj...@mail.gmail.com you wrote: And both the index and value arguments are never used in I/O context, i. e. they are actual plain

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-15 Thread Wolfgang Denk
Dear Lei Wen, In message calzhostndr9u9ajqku8f8mx_9jdpbbrhjlocyrpzudcb63d...@mail.gmail.com you wrote: Thanks for your kindly explaination on the c structure usage in UBOOT. So should I keep the V2 version of this patch, or anything else need to be modified? From my point of view this is

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-14 Thread Wolfgang Denk
Dear Lei Wen, In message CALZhoSSygHZ22N=odn4qv44a_1zxgupqlsrwa3pbbpnxbxj...@mail.gmail.com you wrote: And both the index and value arguments are never used in I/O context, i. e. they are actual plain integer parameters. So just keep it as err = mmc_switch(mmc,

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-13 Thread Wolfgang Denk
Dear Lei Wen, In message CALButC+bZZwYhE0VT99Yjh_=p0lvjqnmm1yvzsex3inutn7...@mail.gmail.com Graeme Russ wrote: So do you means I should keep the EXT_CSD_HS_TIMING? Or I change like below? from err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1); to: err =

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-13 Thread Lei Wen
Hi Wolfgang, On Fri, Oct 14, 2011 at 4:09 AM, Wolfgang Denk w...@denx.de wrote: Dear Lei Wen, In message CALButC+bZZwYhE0VT99Yjh_=p0lvjqnmm1yvzsex3inutn7...@mail.gmail.com Graeme Russ wrote: So do you means I should keep the EXT_CSD_HS_TIMING? Or I change like below? from err =

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-11 Thread Lei Wen
Hi Graeme, On Tue, Oct 11, 2011 at 9:09 AM, Graeme Russ graeme.r...@gmail.com wrote: Hi Lei Wen, On Tue, Oct 11, 2011 at 11:48 AM, Lei Wen adrian.w...@gmail.com wrote: Hi Wolfgang, On Tue, Oct 11, 2011 at 1:33 AM, Wolfgang Denk w...@denx.de wrote: Dear Lei Wen, In message

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-11 Thread Andy Fleming
On Mon, Oct 10, 2011 at 8:12 PM, Graeme Russ graeme.r...@gmail.com wrote: Hi Prafulla, Hi Lei, this is better, but what about structure-based access ? struct somrthing {  u8 a1;  u8 a2; ... }; Like this. Also, CC Andy. The ext_csd current usage in mmc.c is not too

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-10 Thread Lei Wen
Hi Wolfgang, On Fri, Oct 7, 2011 at 1:39 AM, Wolfgang Denk w...@denx.de wrote: Dear Lei Wen, In message calzhosrhbf2vmu5olp3hwh4yq4xfip19ajd24gn4sy-rm6b...@mail.gmail.com you wrote: The ext_csd current usage in mmc.c is not too much, here I mean only few of the fields of the ext_csd is

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-10 Thread Wolfgang Denk
Dear Lei Wen, In message CALZhoSQbvKj0MtqryeHX-4LkvQJR2=b9u_m4yjjfm1mjv2m...@mail.gmail.com you wrote: So macro may looks more concise and could parse from its meaning easily eno= ugh. We do not accept (typeless) register offset definitions. Please use a struct, so the compiler

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-10 Thread Lei Wen
Hi Wolfgang, On Tue, Oct 11, 2011 at 1:33 AM, Wolfgang Denk w...@denx.de wrote: Dear Lei Wen, In message CALZhoSQbvKj0MtqryeHX-4LkvQJR2=b9u_m4yjjfm1mjv2m...@mail.gmail.com you wrote: So macro may looks more concise and could parse from its meaning easily eno= ugh. We do not

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-10 Thread Graeme Russ
Hi Lei Wen, On Tue, Oct 11, 2011 at 11:48 AM, Lei Wen adrian.w...@gmail.com wrote: Hi Wolfgang, On Tue, Oct 11, 2011 at 1:33 AM, Wolfgang Denk w...@denx.de wrote: Dear Lei Wen, In message CALZhoSQbvKj0MtqryeHX-4LkvQJR2=b9u_m4yjjfm1mjv2m...@mail.gmail.com you wrote: So macro may looks

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-10 Thread Graeme Russ
@lists.denx.de; Andy Fleming Subject: Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define Hi Marek, On Tue, Oct 4, 2011 at 8:07 PM, Marek Vasut marek.va...@gmail.com wrote: Hi Lei, this is better, but what about structure-based access ? struct somrthing { u8 a1

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-08 Thread Lei Wen
; Andy Fleming Subject: Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define Hi Marek, On Tue, Oct 4, 2011 at 8:07 PM, Marek Vasut marek.va...@gmail.com wrote: On Tuesday, October 04, 2011 08:35:10 AM Lei Wen wrote: Previous magic number is hard to parse its meaning, change

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-07 Thread Prafulla Wadaskar
-Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Lei Wen Sent: Thursday, October 06, 2011 8:41 PM To: Marek Vasut Cc: Lei Wen; u-boot@lists.denx.de; Andy Fleming Subject: Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-06 Thread Lei Wen
Hi Marek, On Tue, Oct 4, 2011 at 8:07 PM, Marek Vasut marek.va...@gmail.com wrote: On Tuesday, October 04, 2011 08:35:10 AM Lei Wen wrote: Previous magic number is hard to parse its meaning, change it to respective macro definition Signed-off-by: Lei Wen lei...@marvell.com [..] ---

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-06 Thread Marek Vasut
On Thursday, October 06, 2011 05:10:32 PM Lei Wen wrote: Hi Marek, On Tue, Oct 4, 2011 at 8:07 PM, Marek Vasut marek.va...@gmail.com wrote: On Tuesday, October 04, 2011 08:35:10 AM Lei Wen wrote: Previous magic number is hard to parse its meaning, change it to respective macro definition

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-06 Thread Wolfgang Denk
Dear Lei Wen, In message calzhosrhbf2vmu5olp3hwh4yq4xfip19ajd24gn4sy-rm6b...@mail.gmail.com you wrote: The ext_csd current usage in mmc.c is not too much, here I mean only few of the fields of the ext_csd is used, also fully definition of ext_csd member would seems so huge a structure at its

[U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-04 Thread Lei Wen
Previous magic number is hard to parse its meaning, change it to respective macro definition Signed-off-by: Lei Wen lei...@marvell.com --- Changelog: V2: change all magic number for ext_csd to macro definition drivers/mmc/mmc.c | 21 - include/mmc.h | 16

Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro define

2011-10-04 Thread Marek Vasut
On Tuesday, October 04, 2011 08:35:10 AM Lei Wen wrote: Previous magic number is hard to parse its meaning, change it to respective macro definition Signed-off-by: Lei Wen lei...@marvell.com [..] --- a/include/mmc.h +++ b/include/mmc.h @@ -145,13 +145,15 @@ /* * EXT_CSD fields */