Re: [U-Boot] [PATCH 37/69] x86: Allow I/O functions to use pointers

2016-03-10 Thread Bin Meng
On Mon, Mar 7, 2016 at 10:28 AM, Simon Glass wrote: > It is common with memory-mapped I/O to use the address of a structure member > to access memory, as in: > >struct some_regs { > u32 ctrl; > u32 data; >} > >struct some_regs *regs = (struct some_regs *)BASE_ADDRESS; > >

[U-Boot] [PATCH 37/69] x86: Allow I/O functions to use pointers

2016-03-06 Thread Simon Glass
It is common with memory-mapped I/O to use the address of a structure member to access memory, as in: struct some_regs { u32 ctrl; u32 data; } struct some_regs *regs = (struct some_regs *)BASE_ADDRESS; writel(1, ®->ctrl); writel(2, ®->data); This does not currently wo