commit | b41d2e3172b9c6fe4d7c563fe7b428ee99efdf54 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Fri Mar 11 22:07:07 2016 -0700 |
committer | Bin Meng <bmeng.cn@gmail.com> | Thu Mar 17 10:27:25 2016 +0800 |
tree | decf168ce122d37d70487ff25d6598c5788c971d | |
parent | c6c2997cb73c2168fdc81f1d5f4397a591c77712 [diff] |
x86: Allow I/O functions to use pointers 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 work with inl(), outl(), etc. Add a cast to permit this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>