forked from Imagelibrary/rtems
Numerous changes and cleanups to support MVME2100.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2005-10-20 Eric Norum <norume@aps.anl.gov>
|
||||
|
||||
* libchip/network/dec21140.c: Clean up PCI mapping
|
||||
|
||||
2005-09-19 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libnetworking/pppd/Makefile.am: Use preinstall.am.
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2005-10-20 Eric Norum <norume@aps.anl.gov>
|
||||
|
||||
shared/pci/detect_raven_bridge.c: Support MVME2100
|
||||
shared/startup/bspstart.c: Support MVME2100
|
||||
shared/vme/VMEConfig.h: Support MVME2100
|
||||
|
||||
2005-10-17 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Merge-in shared/Makefile.am.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2005-10-20 Eric Norum <norume@aps.anl.gov>
|
||||
|
||||
* include/bsp.h: Support MVME2100.
|
||||
|
||||
2005-05-26 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: New header guard.
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#define _ISA_MEM_BASE CHRP_ISA_MEM_BASE
|
||||
/* address of our ram on the PCI bus */
|
||||
#define PCI_DRAM_OFFSET CHRP_PCI_DRAM_OFFSET
|
||||
#define PCI_MEM_BASE 0x80000000
|
||||
#define PCI_MEM_BASE_ADJUSTMENT 0
|
||||
#define PCI_MEM_BASE 0
|
||||
#define PCI_MEM_WIN0 0x80000000
|
||||
|
||||
#else
|
||||
#define _IO_BASE PREP_ISA_IO_BASE
|
||||
@@ -48,7 +48,7 @@
|
||||
#define PCI_DRAM_OFFSET PREP_PCI_DRAM_OFFSET
|
||||
/* offset of pci memory as seen from the CPU */
|
||||
#define PCI_MEM_BASE PREP_ISA_MEM_BASE
|
||||
#define PCI_MEM_BASE_ADJUSTMENT PREP_ISA_MEM_BASE
|
||||
#define PCI_MEM_WIN0 0
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -32,26 +32,50 @@ extern unsigned int EUMBBAR;
|
||||
extern const pci_config_access_functions pci_direct_functions;
|
||||
extern const pci_config_access_functions pci_indirect_functions;
|
||||
|
||||
#define PCI_ERR_BITS 0xf900
|
||||
#define PCI_STATUS_OK(x) (!((x)&PCI_ERR_BITS))
|
||||
|
||||
/* For now, just clear errors in the PCI status reg.
|
||||
*
|
||||
* Returns: (for diagnostic purposes)
|
||||
* original settings (i.e. before applying the clearing
|
||||
* sequence) or the error bits or 0 if there were no errors.
|
||||
*
|
||||
*/
|
||||
|
||||
unsigned long
|
||||
_BSP_clear_hostbridge_errors(int enableMCP, int quiet)
|
||||
{
|
||||
unsigned merst;
|
||||
unsigned long rval;
|
||||
unsigned short pcistat;
|
||||
int count;
|
||||
|
||||
merst = in_be32(RAVEN_MPIC_MERST);
|
||||
/* write back value to clear status */
|
||||
out_be32(RAVEN_MPIC_MERST, merst);
|
||||
if (enableMCP)
|
||||
return -1; /* exceptions not supported / MCP not wired */
|
||||
|
||||
if (enableMCP) {
|
||||
if (!quiet)
|
||||
printk("Enabling MCP generation on hostbridge errors\n");
|
||||
out_be32(RAVEN_MPIC_MEREN, MEREN_VAL);
|
||||
} else {
|
||||
out_be32(RAVEN_MPIC_MEREN, 0);
|
||||
if ( !quiet && enableMCP ) {
|
||||
printk("leaving MCP interrupt disabled\n");
|
||||
}
|
||||
/* read error status for info return */
|
||||
pci_read_config_word(0,0,0,PCI_STATUS,&pcistat);
|
||||
rval = pcistat;
|
||||
|
||||
count=10;
|
||||
do {
|
||||
/* clear error reporting registers */
|
||||
|
||||
/* clear PCI status register */
|
||||
pci_write_config_word(0,0,0,PCI_STATUS, PCI_ERR_BITS);
|
||||
|
||||
/* read new status */
|
||||
pci_read_config_word(0,0,0,PCI_STATUS, &pcistat);
|
||||
|
||||
} while ( ! PCI_STATUS_OK(pcistat) && count-- );
|
||||
|
||||
if ( !PCI_STATUS_OK(rval) && !quiet) {
|
||||
printk("Cleared PCI errors: pci_stat was 0x%04x\n", rval);
|
||||
}
|
||||
return (merst & 0xffff);
|
||||
if ( !PCI_STATUS_OK(pcistat) ) {
|
||||
printk("Unable to clear PCI errors: still 0x%04x after 10 attempts\n", pcistat);
|
||||
}
|
||||
return rval & PCI_ERR_BITS;
|
||||
}
|
||||
|
||||
void detect_host_bridge()
|
||||
|
||||
@@ -333,7 +333,7 @@ void bsp_start( void )
|
||||
*
|
||||
* T. Straumann: give more PCI address space
|
||||
*/
|
||||
setdbat(2, PCI_MEM_BASE, PCI_MEM_BASE, 0x10000000, IO_PAGE);
|
||||
setdbat(2, PCI_MEM_BASE+PCI_MEM_WIN0, PCI_MEM_BASE+PCI_MEM_WIN0, 0x10000000, IO_PAGE);
|
||||
|
||||
/*
|
||||
* Must have acces to open pic PCI ACK registers provided by the RAVEN
|
||||
|
||||
@@ -11,9 +11,15 @@
|
||||
* hardcoded window lengths that match this
|
||||
* layout:
|
||||
*/
|
||||
#if defined(mvme2100)
|
||||
#define _VME_A32_WIN0_ON_PCI 0x90000000
|
||||
#define _VME_A24_ON_PCI 0x9f000000
|
||||
#define _VME_A16_ON_PCI 0x9fff0000
|
||||
#else
|
||||
#define _VME_A32_WIN0_ON_PCI 0x10000000
|
||||
#define _VME_A24_ON_PCI 0x1f000000
|
||||
#define _VME_A16_ON_PCI 0x1fff0000
|
||||
#endif
|
||||
|
||||
/* start of the A32 window on the VME bus
|
||||
* TODO: this should perhaps be a configuration option
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2005-10-20 Eric Norum <norume@aps.anl.gov>
|
||||
|
||||
vmeUniverse/vmeUniverse.c: Support MVME2100
|
||||
|
||||
2005-09-02 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 577/bsps
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
typedef unsigned int pci_ulong;
|
||||
#define PCI_TO_LOCAL_ADDR(memaddr) \
|
||||
((pci_ulong)(memaddr) + PCI_MEM_BASE_ADJUSTMENT)
|
||||
((pci_ulong)(memaddr) + PCI_MEM_BASE)
|
||||
|
||||
#elif defined(__vxworks)
|
||||
typedef unsigned long pci_ulong;
|
||||
|
||||
@@ -1118,7 +1118,7 @@ rtems_dec21140_driver_attach (struct rtems_bsdnet_ifconfig *config, int attach)
|
||||
&lvalue);
|
||||
|
||||
tmp = (unsigned int)(lvalue & (unsigned int)(~MEM_MASK))
|
||||
+ (unsigned int)PCI_MEM_BASE_ADJUSTMENT;
|
||||
+ (unsigned int)PCI_MEM_BASE;
|
||||
|
||||
sc->base = (unsigned int *)(tmp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user