forked from Imagelibrary/rtems
libchip/rtc/mc146818a*: Fix prototypes to use uintptr_t and fix set but unused warning
This commit is contained in:
@@ -54,12 +54,12 @@ bool mc146818a_probe(
|
|||||||
* Default register access routines
|
* Default register access routines
|
||||||
*/
|
*/
|
||||||
uint32_t mc146818a_get_register(
|
uint32_t mc146818a_get_register(
|
||||||
uint32_t ulCtrlPort,
|
uintptr_t ulCtrlPort,
|
||||||
uint8_t ucRegNum
|
uint8_t ucRegNum
|
||||||
);
|
);
|
||||||
|
|
||||||
void mc146818a_set_register(
|
void mc146818a_set_register(
|
||||||
uint32_t ulCtrlPort,
|
uintptr_t ulCtrlPort,
|
||||||
uint8_t ucRegNum,
|
uint8_t ucRegNum,
|
||||||
uint32_t ucData
|
uint32_t ucData
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
* + registers are in I/O space
|
* + registers are in I/O space
|
||||||
* + registers are accessed as bytes
|
* + registers are accessed as bytes
|
||||||
* + registers are only byte-aligned (no address gaps)
|
* + registers are only byte-aligned (no address gaps)
|
||||||
*
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
* COPYRIGHT (c) 1989-1997.
|
* COPYRIGHT (c) 1989-1997.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
@@ -16,6 +18,8 @@
|
|||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include <bsp.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.
|
* 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(__i386__) || defined(__PPC__)
|
||||||
#if defined(inport_byte)
|
#if defined(inport_byte)
|
||||||
uint32_t mc146818a_get_register(
|
uint32_t mc146818a_get_register(
|
||||||
uint32_t ulCtrlPort,
|
uintptr_t ulCtrlPort,
|
||||||
uint8_t ucRegNum
|
uint8_t ucRegNum
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
uint8_t val;
|
uint8_t val;
|
||||||
uint8_t tmp;
|
uint8_t tmp;
|
||||||
|
|
||||||
|
(void) tmp; /* eliminate warning for set but not used */
|
||||||
|
|
||||||
outport_byte( ulCtrlPort, ucRegNum );
|
outport_byte( ulCtrlPort, ucRegNum );
|
||||||
inport_byte( 0x84, tmp ); /* Hack a delay to give chip time to settle */
|
inport_byte( 0x84, tmp ); /* Hack a delay to give chip time to settle */
|
||||||
inport_byte( ulCtrlPort+1, val );
|
inport_byte( ulCtrlPort+1, val );
|
||||||
@@ -38,7 +44,7 @@ uint32_t mc146818a_get_register(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mc146818a_set_register(
|
void mc146818a_set_register(
|
||||||
uint32_t ulCtrlPort,
|
uintptr_t ulCtrlPort,
|
||||||
uint8_t ucRegNum,
|
uint8_t ucRegNum,
|
||||||
uint32_t ucData
|
uint32_t ucData
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user