mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
lib: add iomem emulation (logic_iomem)
Add IO memory emulation that uses callbacks for read/write to the allocated regions. The callbacks can be registered by the users using logic_iomem_alloc(). To use, an architecture must 'select LOGIC_IOMEM' in Kconfig and then include <asm-generic/logic_io.h> into asm/io.h to get the __raw_read*/__raw_write* functions. Optionally, an architecture may 'select LOGIC_IOMEM_FALLBACK' in which case non-emulated regions will 'fall back' to the various real_* functions that must then be provided. Cc: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
committed by
Richard Weinberger
parent
0bbadafdc4
commit
ca2e334232
14
lib/Kconfig
14
lib/Kconfig
@@ -102,6 +102,20 @@ config INDIRECT_PIO
|
||||
|
||||
When in doubt, say N.
|
||||
|
||||
config INDIRECT_IOMEM
|
||||
bool
|
||||
help
|
||||
This is selected by other options/architectures to provide the
|
||||
emulated iomem accessors.
|
||||
|
||||
config INDIRECT_IOMEM_FALLBACK
|
||||
bool
|
||||
depends on INDIRECT_IOMEM
|
||||
help
|
||||
If INDIRECT_IOMEM is selected, this enables falling back to plain
|
||||
mmio accesses when the IO memory address is not a registered
|
||||
emulated region.
|
||||
|
||||
config CRC_CCITT
|
||||
tristate "CRC-CCITT functions"
|
||||
help
|
||||
|
||||
Reference in New Issue
Block a user