mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-17 07:28:51 +09:00
![Masahiro Yamada](/assets/img/avatar_default.png)
For most of architectures in U-Boot, virtual address is straight mapped to physical address. So, it makes sense to have generic defines of ioremap and friends in <linux/io.h>. All of them are just empty and will disappear at compile time, but they will be helpful to implement drivers which are counterparts of Linux ones. I notice MIPS already has its own implementation, so I added a Kconfig symbol CONFIG_HAVE_ARCH_IOREMAP which MIPS (and maybe Sandbox as well) can select. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
27 lines
483 B
C
27 lines
483 B
C
/*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef _LINUX_IO_H
|
|
#define _LINUX_IO_H
|
|
|
|
#include <linux/compiler.h>
|
|
#include <linux/types.h>
|
|
#include <asm/io.h>
|
|
|
|
#ifndef CONFIG_HAVE_ARCH_IOREMAP
|
|
static inline void __iomem *ioremap(resource_size_t offset,
|
|
resource_size_t size)
|
|
{
|
|
return (void __iomem *)(unsigned long)offset;
|
|
}
|
|
|
|
static inline void iounmap(void __iomem *addr)
|
|
{
|
|
}
|
|
|
|
#define devm_ioremap(dev, offset, size) ioremap(offset, size)
|
|
#endif
|
|
|
|
#endif /* _LINUX_IO_H */
|