From 872536bf5dfdf207d275cd627caec2aefb68aab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 16 Feb 2013 22:44:03 +0100 Subject: qtest: Add MMIO support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Andreas Färber Message-id: 1361051043-27944-4-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori --- tests/m48t59-test.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/m48t59-test.c') diff --git a/tests/m48t59-test.c b/tests/m48t59-test.c index 77d69b330d..4081a5fdb2 100644 --- a/tests/m48t59-test.c +++ b/tests/m48t59-test.c @@ -35,17 +35,14 @@ static bool use_mmio; static uint8_t cmos_read_mmio(uint8_t reg) { - uint8_t data; - - memread(base + (uint32_t)reg_base + (uint32_t)reg, &data, 1); - return data; + return readb(base + (uint32_t)reg_base + (uint32_t)reg); } static void cmos_write_mmio(uint8_t reg, uint8_t val) { uint8_t data = val; - memwrite(base + (uint32_t)reg_base + (uint32_t)reg, &data, 1); + writeb(base + (uint32_t)reg_base + (uint32_t)reg, data); } static uint8_t cmos_read_ioio(uint8_t reg) -- cgit v1.2.1