On Wed, Jun 4, 2008 at 10:32 AM, Stefan Reinauer <[EMAIL PROTECTED]> wrote:

> #define MCHBAR8(x) *((volatile u8 *)(DEFAULT_MCHBAR + x))
> #define MCHBAR16(x) *((volatile u16 *)(DEFAULT_MCHBAR + x))
> #define MCHBAR32(x) *((volatile u32 *)(DEFAULT_MCHBAR + x))
>
> so you can write
>
> MCHBAR8(DCC) |= (1<<1);
>
> for maximum readablility
>

yes but as I mentioned .... one of the very earliest uses of struct,
from the guy who designed C, was to avoid this kind of construct.
Register structures accessed via mmio? set up a struct.

thanks

ron

-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to