]> git.ipfire.org Git - thirdparty/u-boot.git/commit
sysreset: qemu virt: Use map_sysmem()
authorDaniel Palmer <daniel@thingy.jp>
Sat, 16 May 2026 07:39:53 +0000 (16:39 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 22 May 2026 22:47:54 +0000 (16:47 -0600)
commitccec4ce2ee8ae7c95a00b16da0b5dbd88615a8e2
tree03b90632fe4000e0471c39710abb9ab9613bb42e
parent21a3b9f03b05467ec7422399a92a43f89dd2b526
sysreset: qemu virt: Use map_sysmem()

In the platform data there is a phys_addr_t (an integer) for the address
of the register and we pass that as-is into writel() which is fine in most
places because we don't need to do any mapping and the macro for writel()
does a cast to a pointer.

If writel() is a static inline function the address argument is a pointer
so passing it in as an integer without casting it first causes warnings or
build failure.

map_sysmem() handles the casting part and if phys_addr_t is 32bits when
on a 64bit machine.

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
Acked-by: Kuan-Wei Chiu <visitorckw@gmail.com>
drivers/sysreset/sysreset_qemu_virt_ctrl.c