forked from Imagelibrary/rtems
2010-04-25 Joel Sherrill <joel.sherrilL@OARcorp.com>
* libchip/serial/mc68681.c, libchip/serial/mc68681_reg.c, libchip/serial/ns16550.c, libchip/serial/serial.h, libchip/serial/z85c30.c, libchip/serial/z85c30_reg.c: Use uintptr_t or intptr_t instead of uint32_t or int32_t.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2010-04-25 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
||||
|
||||
* libchip/serial/mc68681.c, libchip/serial/mc68681_reg.c,
|
||||
libchip/serial/ns16550.c, libchip/serial/serial.h,
|
||||
libchip/serial/z85c30.c, libchip/serial/z85c30_reg.c: Use uintptr_t
|
||||
or intptr_t instead of uint32_t or int32_t.
|
||||
|
||||
2010-04-25 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
||||
|
||||
* libchip/rtc/ds1375-rtc.h, libchip/rtc/ds1375.c,
|
||||
|
||||
@@ -592,7 +592,8 @@ MC68681_STATIC int mc68681_baud_rate(
|
||||
|
||||
baud_requested = rtems_termios_baud_to_index( baud_requested );
|
||||
|
||||
baud_tbl = (mc68681_baud_table_t *) Console_Port_Tbl[minor].ulClock;
|
||||
baud_tbl = (mc68681_baud_table_t *)
|
||||
((uintptr_t)Console_Port_Tbl[minor].ulClock);
|
||||
if (!baud_tbl)
|
||||
rtems_fatal_error_occurred(RTEMS_INVALID_ADDRESS);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
uint8_t _MC68681_NAME(mc68681_get_register)(
|
||||
uint32_t ulCtrlPort,
|
||||
uintptr_t ulCtrlPort,
|
||||
uint8_t ucRegNum
|
||||
)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ uint8_t _MC68681_NAME(mc68681_get_register)(
|
||||
*/
|
||||
|
||||
void _MC68681_NAME(mc68681_set_register)(
|
||||
uint32_t ulCtrlPort,
|
||||
uintptr_t ulCtrlPort,
|
||||
uint8_t ucRegNum,
|
||||
uint8_t ucData
|
||||
)
|
||||
|
||||
@@ -95,7 +95,7 @@ console_fns ns16550_fns_polled = {
|
||||
|
||||
NS16550_STATIC void ns16550_init(int minor)
|
||||
{
|
||||
uint32_t pNS16550;
|
||||
uintptr_t pNS16550;
|
||||
uint8_t ucTrash;
|
||||
uint8_t ucDataByte;
|
||||
uint32_t ulBaudDivisor;
|
||||
@@ -129,7 +129,7 @@ NS16550_STATIC void ns16550_init(int minor)
|
||||
|
||||
ulBaudDivisor = NS16550_Baud(
|
||||
(uint32_t) Console_Port_Tbl[minor].ulClock,
|
||||
(uint32_t) Console_Port_Tbl[minor].pDeviceParams
|
||||
(uint32_t) ((uintptr_t)Console_Port_Tbl[minor].pDeviceParams)
|
||||
);
|
||||
ucDataByte = SP_LINE_DLAB;
|
||||
(*setReg)(pNS16550, NS16550_LINE_CONTROL, ucDataByte);
|
||||
@@ -183,7 +183,7 @@ NS16550_STATIC int ns16550_open(
|
||||
}
|
||||
|
||||
/* Set initial baud */
|
||||
rtems_termios_set_initial_baud( tty, (int32_t) c->pDeviceParams);
|
||||
rtems_termios_set_initial_baud( tty, (intptr_t) c->pDeviceParams);
|
||||
|
||||
if (c->pDeviceFns->deviceOutputUsesInterrupts) {
|
||||
ns16550_enable_interrupts( minor, NS16550_ENABLE_ALL_INTR_EXCEPT_TX);
|
||||
@@ -217,10 +217,10 @@ NS16550_STATIC int ns16550_close(
|
||||
/**
|
||||
* @brief Polled write for NS16550.
|
||||
*/
|
||||
NS16550_STATIC void ns16550_write_polled( int minor, char out)
|
||||
NS16550_STATIC void ns16550_write_polled(int minor, char out)
|
||||
{
|
||||
console_tbl *c = &Console_Port_Tbl [minor];
|
||||
uint32_t port = c->ulCtrlPort1;
|
||||
uintptr_t port = c->ulCtrlPort1;
|
||||
getRegister_f get = c->getRegister;
|
||||
setRegister_f set = c->setRegister;
|
||||
uint32_t status = 0;
|
||||
|
||||
@@ -28,11 +28,10 @@ extern "C" {
|
||||
* Types for get and set register routines
|
||||
*/
|
||||
|
||||
typedef uint8_t (*getRegister_f)(uint32_t port, uint8_t register);
|
||||
typedef void (*setRegister_f)(
|
||||
uint32_t port, uint8_t reg, uint8_t value);
|
||||
typedef uint8_t (*getData_f)(uint32_t port);
|
||||
typedef void (*setData_f)(uint32_t port, uint8_t value);
|
||||
typedef uint8_t (*getRegister_f)(uintptr_t port, uint8_t reg);
|
||||
typedef void (*setRegister_f)(uintptr_t port, uint8_t reg, uint8_t value);
|
||||
typedef uint8_t (*getData_f)(uintptr_t port);
|
||||
typedef void (*setData_f)(uintptr_t port, uint8_t value);
|
||||
|
||||
typedef struct _console_fns {
|
||||
bool (*deviceProbe)(int minor);
|
||||
|
||||
@@ -92,8 +92,8 @@ Z85C30_STATIC void z85c30_initialize_port(
|
||||
int minor
|
||||
)
|
||||
{
|
||||
uint32_t ulCtrlPort;
|
||||
uint32_t ulBaudDivisor;
|
||||
uintptr_t ulCtrlPort;
|
||||
uintptr_t ulBaudDivisor;
|
||||
setRegister_f setReg;
|
||||
|
||||
ulCtrlPort = Console_Port_Tbl[minor].ulCtrlPort1;
|
||||
@@ -138,7 +138,7 @@ Z85C30_STATIC void z85c30_initialize_port(
|
||||
|
||||
ulBaudDivisor = Z85C30_Baud(
|
||||
(uint32_t) Console_Port_Tbl[minor].ulClock,
|
||||
(uint32_t) Console_Port_Tbl[minor].pDeviceParams
|
||||
(uint32_t) ((uintptr_t)Console_Port_Tbl[minor].pDeviceParams)
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -253,7 +253,7 @@ Z85C30_STATIC int z85c30_close(
|
||||
|
||||
Z85C30_STATIC void z85c30_init(int minor)
|
||||
{
|
||||
uint32_t ulCtrlPort;
|
||||
uintptr_t ulCtrlPort;
|
||||
uint8_t dummy;
|
||||
z85c30_context *pz85c30Context;
|
||||
setRegister_f setReg;
|
||||
@@ -430,7 +430,7 @@ Z85C30_STATIC int z85c30_set_attributes(
|
||||
const struct termios *t
|
||||
)
|
||||
{
|
||||
uint32_t ulCtrlPort;
|
||||
uintptr_t ulCtrlPort;
|
||||
uint32_t ulBaudDivisor;
|
||||
uint32_t wr3;
|
||||
uint32_t wr4;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
uint8_t _Z85C30_NAME(z85c30_get_register)(
|
||||
uint32_t ulCtrlPort,
|
||||
uintptr_t ulCtrlPort,
|
||||
uint8_t ucRegNum
|
||||
)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ uint8_t _Z85C30_NAME(z85c30_get_register)(
|
||||
*/
|
||||
|
||||
void _Z85C30_NAME(z85c30_set_register)(
|
||||
uint32_t ulCtrlPort,
|
||||
uintptr_t ulCtrlPort,
|
||||
uint8_t ucRegNum,
|
||||
uint8_t ucData
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user