diff options
author | Andreas Färber <afaerber@suse.de> | 2013-02-16 22:44:03 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-18 08:39:10 -0600 |
commit | 872536bf5dfdf207d275cd627caec2aefb68aab9 (patch) | |
tree | dc65a96f89f6f0fa41c3f1298f8ad1e1748de961 /tests/libi2c-omap.c | |
parent | b73cf9e93f1c7fd6e949f71172c49848b4d70aa9 (diff) |
qtest: Add MMIO support
Introduce [qtest_]{read,write}[bwlq]() libqtest functions and
corresponding QTest protocol commands to replace local versions in
libi2c-omap.c.
Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1361051043-27944-4-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'tests/libi2c-omap.c')
-rw-r--r-- | tests/libi2c-omap.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/libi2c-omap.c b/tests/libi2c-omap.c index b7b10b5cbd..c52458cbd6 100644 --- a/tests/libi2c-omap.c +++ b/tests/libi2c-omap.c @@ -49,29 +49,6 @@ typedef struct OMAPI2C { } OMAPI2C; -/* FIXME Use TBD readw qtest API */ -static inline uint16_t readw(uint64_t addr) -{ - uint16_t data; - - memread(addr, &data, 2); - return le16_to_cpu(data); -} - -/* FIXME Use TBD writew qtest API */ -static inline void writew(uint64_t addr, uint16_t data) -{ - data = cpu_to_le16(data); - memwrite(addr, &data, 2); -} - -#ifdef __GNUC__ -#undef memread -#undef memwrite -#pragma GCC poison memread -#pragma GCC poison memwrite -#endif - static void omap_i2c_set_slave_addr(OMAPI2C *s, uint8_t addr) { uint16_t data = addr; |