forked from Imagelibrary/rtems
2001-05-14 Till Straumann <strauman@slac.stanford.edu>
* shared/include/io.h: Per PR215 address the following issues: - _IO_BASE, _ISA_MEM_BASE and PCI_DRAM_OFFSET are no longer defined by libcpu (powerpc/shared/include/io.h) but by the BSP (who is the only one to know the values) - the affected BSP (shared/motorola) headers have been fixed in a separate "libbsp/powerpc/shared" patch. - the DEC 21140 driver (libchip/network/dec21140.c) has been fixed to use PCI_DRAM_OFFSET instead of PREP_PCI_DRAM_OFFSET. and PCI_MEM_BASE instead of PREP_ISA_MEM_BASE. PCI_MEM_BASE is to be defined by the BSP who is using this driver. - the DEC driver also has been fixed to use the newer rtems_bsp_delay_in_bus_cycles() instead of the obsolete delay_in_bus_cycles().
This commit is contained in:
@@ -23,12 +23,22 @@
|
||||
#define PREP_ISA_MEM_BASE 0xc0000000
|
||||
#define PREP_PCI_DRAM_OFFSET 0x80000000
|
||||
|
||||
#define _IO_BASE PREP_ISA_IO_BASE
|
||||
#define _ISA_MEM_BASE PREP_ISA_MEM_BASE
|
||||
#define PCI_DRAM_OFFSET PREP_PCI_DRAM_OFFSET
|
||||
#define CHRP_ISA_IO_BASE 0xfe000000
|
||||
#define CHRP_ISA_MEM_BASE 0xfd000000
|
||||
#define CHRP_PCI_DRAM_OFFSET 0x00000000
|
||||
|
||||
/* _IO_BASE, _ISA_MEM_BASE, PCI_DRAM_OFFSET are now defined by bsp.h */
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
#include <bsp.h> /* for _IO_BASE & friends */
|
||||
|
||||
/* NOTE: The use of these macros is DISCOURAGED.
|
||||
* you should consider e.g. using in_xxx / out_xxx
|
||||
* with a device specific base address that is
|
||||
* defined by the BSP. This makes drivers easier
|
||||
* to port.
|
||||
*/
|
||||
#define inb(port) in_8((unsigned char *)((port)+_IO_BASE))
|
||||
#define outb(val, port) out_8((unsigned char *)((port)+_IO_BASE), (val))
|
||||
#define inw(port) in_le16((unsigned short *)((port)+_IO_BASE))
|
||||
|
||||
Reference in New Issue
Block a user