diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-31 12:21:43 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-31 12:21:43 +0000 |
commit | 85936516ee607c1a59f21cf5fd298f2506962948 (patch) | |
tree | 4f88c98816e56c7ff78e91183b7a0bf7bbff6111 /c | |
parent | 2010-05-31 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-85936516ee607c1a59f21cf5fd298f2506962948.tar.bz2 |
2010-05-31 Ralf Corsépius <ralf.corsepius@rtems.org>
* libchip/network/cs8900.c:
Misc. changes to make code 16bit-target compliant.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/ChangeLog | 2 | ||||
-rw-r--r-- | c/src/libchip/network/cs8900.c | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog index c2af89466e..de1a601e24 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,5 +1,7 @@ 2010-05-31 Ralf Corsépius <ralf.corsepius@rtems.org> + * libchip/network/cs8900.c: + Misc. changes to make code 16bit-target compliant. * libchip/network/i82586.c: Use int32_t instead of int for 16bit-target compliance. * libchip/network/open_eth.c: diff --git a/c/src/libchip/network/cs8900.c b/c/src/libchip/network/cs8900.c index 0d7dc42f46..b420b9c16f 100644 --- a/c/src/libchip/network/cs8900.c +++ b/c/src/libchip/network/cs8900.c @@ -65,16 +65,17 @@ io_pp_get_reg_16 (cs8900_device *cs, unsigned short reg) return data; } -static inline unsigned long -io_pp_get_reg_32 (cs8900_device *cs, unsigned short reg) +static inline uint32_t +io_pp_get_reg_32 (cs8900_device *cs, uint16_t reg) { rtems_interrupt_level level; - unsigned long data; + uint32_t data; rtems_interrupt_disable (level); cs8900_io_set_reg (cs, CS8900_IO_PACKET_PAGE_PTR, 0x3000 | CS8900_PPP_AUTO_INCREMENT | reg); - data = ((cs8900_io_get_reg (cs, CS8900_IO_PP_DATA_PORT0) << 16) | - cs8900_io_get_reg (cs, CS8900_IO_PP_DATA_PORT1)); + data = cs8900_io_get_reg (cs, CS8900_IO_PP_DATA_PORT0); + data <<= 16; + data |= cs8900_io_get_reg (cs, CS8900_IO_PP_DATA_PORT1); rtems_interrupt_enable (level); return data; } |