diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-10-09 10:01:34 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-10-09 10:11:58 -0500 |
commit | 79f093bdd1e0b2eb28d94ef48a5ab452b338c5b2 (patch) | |
tree | 4e58f8d179f3ebd1facfdafaef80da6f76c22e12 /c/src/libchip/rtc/mc146818a_ioreg.c | |
parent | m32r/cpu_asm.c: Add prototype to fix warning (diff) | |
download | rtems-79f093bdd1e0b2eb28d94ef48a5ab452b338c5b2.tar.bz2 |
libchip/rtc/mc146818a*: Fix prototypes to use uintptr_t and fix set but unused warning
Diffstat (limited to '')
-rw-r--r-- | c/src/libchip/rtc/mc146818a_ioreg.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/c/src/libchip/rtc/mc146818a_ioreg.c b/c/src/libchip/rtc/mc146818a_ioreg.c index c8dc9ebf8b..4c438a516a 100644 --- a/c/src/libchip/rtc/mc146818a_ioreg.c +++ b/c/src/libchip/rtc/mc146818a_ioreg.c @@ -5,7 +5,9 @@ * + registers are in I/O space * + registers are accessed as bytes * + registers are only byte-aligned (no address gaps) - * + */ + +/* * COPYRIGHT (c) 1989-1997. * On-Line Applications Research Corporation (OAR). * @@ -16,6 +18,8 @@ #include <rtems.h> #include <bsp.h> +#include <libchip/rtc.h> +#include <libchip/mc146818a.h> /* * At this point, not all CPUs or BSPs have defined in/out port routines. @@ -23,13 +27,15 @@ #if defined(__i386__) || defined(__PPC__) #if defined(inport_byte) uint32_t mc146818a_get_register( - uint32_t ulCtrlPort, - uint8_t ucRegNum + uintptr_t ulCtrlPort, + uint8_t ucRegNum ) { uint8_t val; uint8_t tmp; + (void) tmp; /* eliminate warning for set but not used */ + outport_byte( ulCtrlPort, ucRegNum ); inport_byte( 0x84, tmp ); /* Hack a delay to give chip time to settle */ inport_byte( ulCtrlPort+1, val ); @@ -38,9 +44,9 @@ uint32_t mc146818a_get_register( } void mc146818a_set_register( - uint32_t ulCtrlPort, - uint8_t ucRegNum, - uint32_t ucData + uintptr_t ulCtrlPort, + uint8_t ucRegNum, + uint32_t ucData ) { outport_byte( ulCtrlPort, ucRegNum ); |