From 438b538811fdeeff27159f959c7b2ef9538e76a7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 14 May 2002 17:07:42 +0000 Subject: 2001-05-14 Till Straumann * 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(). --- c/src/lib/libcpu/powerpc/ChangeLog | 16 ++++++++++++++++ c/src/lib/libcpu/powerpc/shared/include/io.h | 16 +++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'c/src/lib/libcpu/powerpc') diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 96eba47501..e859bb3d17 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,19 @@ +2001-05-14 Till Straumann + + * 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(). + 2001-05-14 Till Straumann * rtems/powerpc/registers.h, rtems/score/ppc.h: Per PR213, add diff --git a/c/src/lib/libcpu/powerpc/shared/include/io.h b/c/src/lib/libcpu/powerpc/shared/include/io.h index 7abcf40c3e..77cd984f83 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/io.h +++ b/c/src/lib/libcpu/powerpc/shared/include/io.h @@ -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 /* 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)) -- cgit v1.2.3