summaryrefslogtreecommitdiff
path: root/src/block.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-09-15 02:29:06 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-09-28 22:05:55 -0400
commit8b7861c4d4b573ca7e0b43e58bc97ff0244ba9a3 (patch)
tree09bda27298457051fa75436f792d77d56aedaef5 /src/block.c
parent9fcd199861abe0941c76f92b6ee5d450db364e66 (diff)
downloadqemu-seabios-8b7861c4d4b573ca7e0b43e58bc97ff0244ba9a3.tar.gz
Rename hw/cmos.h to hw/rtc.h and copy RTC code from clock.c to hw/rtc.c.
Group the Real Time Clock code into hw/rtc.[ch]. Also, use rtc_read/write/mask function naming (instead of inb/outb_cmos) to be more consistent with other register accessors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/block.c')
-rw-r--r--src/block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block.c b/src/block.c
index 4560b24..cbcf9e1 100644
--- a/src/block.c
+++ b/src/block.c
@@ -10,8 +10,8 @@
#include "bregs.h" // struct bregs
#include "hw/ata.h" // process_ata_op
#include "hw/ahci.h" // process_ahci_op
-#include "hw/cmos.h" // inb_cmos
#include "hw/blockcmd.h" // cdb_*
+#include "hw/rtc.h" // rtc_read
#include "hw/virtio-blk.h" // process_virtio_blk_op
#include "malloc.h" // malloc_low
#include "output.h" // dprintf
@@ -72,7 +72,7 @@ get_translation(struct drive_s *drive_g)
// Emulators pass in the translation info via nvram.
u8 ataid = GET_GLOBAL(drive_g->cntl_id);
u8 channel = ataid / 2;
- u8 translation = inb_cmos(CMOS_BIOS_DISKTRANSFLAG + channel/2);
+ u8 translation = rtc_read(CMOS_BIOS_DISKTRANSFLAG + channel/2);
translation >>= 2 * (ataid % 4);
translation &= 0x03;
return translation;