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 has a chance to perform type checking. > > I check the code again, and find there is a reason for previous > defined macro to use. > That is those register offset defined as macro may need later passing > as a function > parameter like: > err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1);
I don;t see that any register (which now would be an address in a struct insteadd of being an offset to be added to a base address) would be passed as parameter to mmc_switch(). So this is not an issue at all. > So if the ext_csd change to structure, maybe the function call here > don't looks like so > concise as before... What do you think for this? The EXT_CSD field definitions are completely independent of the way how you access the registers. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] ######## This message was made from 100% recycled electrons. ######## _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

