summaryrefslogtreecommitdiff
path: root/arch/sandbox/include/asm/state.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:56:09 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:57:41 +0800
commite77663cf747b4c01fc72e3af1c72996a0f586613 (patch)
tree8cf486cf1702413b582ede0790f08b4bedc0d720 /arch/sandbox/include/asm/state.h
parentb0e2c23d3ea7786492178302758712e498bba380 (diff)
sandbox: Allow use of real I/O with readl(), etc.
At present these functions are stubbed out. For more comprehensive testing with PCI devices it is useful to be able to fully emulate I/O access. Add simple implementations for these. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: change to use 'const void *' in sandbox_write(); cast 'addr' in read/write macros in arch/sandbox/include/asm/io.h; remove the unnecessary cast in readq/writeq in nvme.h] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/sandbox/include/asm/state.h')
-rw-r--r--arch/sandbox/include/asm/state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h
index 2d773d3fa6..ad3e94beb9 100644
--- a/arch/sandbox/include/asm/state.h
+++ b/arch/sandbox/include/asm/state.h
@@ -102,6 +102,7 @@ struct sandbox_state {
ulong next_tag; /* Next address tag to allocate */
struct list_head mapmem_head; /* struct sandbox_mapmem_entry */
bool hwspinlock; /* Hardware Spinlock status */
+ bool allow_memio; /* Allow readl() etc. to work */
/*
* This struct is getting large.