aboutsummaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test24.c
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-06-10 21:22:07 +0000
committerEric Biederman <ebiederm@xmission.com>2003-06-10 21:22:07 +0000
commit6aa31cc754744a83177ea922e71c6bdf02cad5df (patch)
tree00fc8a3cc81f367240eb5ac5a627841d1bb0a1a0 /util/romcc/tests/simple_test24.c
parentdc18ef018d080f050de9e28be913f544d3009cb2 (diff)
- Update romcc to version 0.27 and add more tests.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@865 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/romcc/tests/simple_test24.c')
-rw-r--r--util/romcc/tests/simple_test24.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/romcc/tests/simple_test24.c b/util/romcc/tests/simple_test24.c
new file mode 100644
index 0000000000..01413c2dad
--- /dev/null
+++ b/util/romcc/tests/simple_test24.c
@@ -0,0 +1,16 @@
+void smbus_read_byte(void)
+{
+ unsigned char host_status_register;
+ unsigned char byte;
+ int result;
+
+ host_status_register = __builtin_inb(0x1234);
+
+ /* read results of transaction */
+ byte = __builtin_inb(0x4567);
+
+ result = byte;
+ if (host_status_register != 0x02) {
+ result = -1;
+ }
+}