Ignore:
Timestamp:
Nov 4, 2005, 3:34:08 AM (14 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
758ee5c
Parents:
cca22863
Message:

2005-11-03 Till Straumann <strauman@…>

  • shared/motorola/motorola.c, shared/pci/detect_raven_bridge.c, shared/pci/pci.c, shared/pci/pci.h, shared/pci/pcifinddevice.c: Several PCI enhancements and fixes: all BSP flavors now use the generic clear_hostbridge_errors() routine (this means that only polling memory probing is possible [see detect_raven_bridge.c for details]). Interrupt fixup routine now supports multi-function devices. Interrupt fixup routine now honours a flag/option so that wrong firmware values can be overridden. Fixed irq routing table for mvme2100 [PMC]. Added irq routing table for mvme2300. Added a BSP_pciScan() routine that executes a user callback on each non-empty slot/fun. Added BSP_pciConfigDump() to display basic config headers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c

    rcca22863 r98afe31  
    2424#define RAVEN_MPIC_MEREN    ((volatile unsigned *)0xfeff0020)
    2525#define RAVEN_MPIC_MERST    ((volatile unsigned *)0xfeff0024)
    26 /* enable machine check on all conditions */
    2726#define MEREN_VAL           0x2f00
    2827
    2928#define pci BSP_pci_configuration
    30 extern unsigned int EUMBBAR;
    3129
    3230extern const pci_config_access_functions pci_direct_functions;
    3331extern const pci_config_access_functions pci_indirect_functions;
     32
    3433
    3534#define PCI_ERR_BITS        0xf900
     
    7978}
    8079
     80#if (defined(mpc8240) || defined(mpc8245))
     81/* FIXME - this should really be in a separate file - the 2100 doesn't
     82 *         have a raven chip so there is no point having 2100 code here
     83 */
     84
     85extern unsigned int EUMBBAR;
     86
    8187void detect_host_bridge()
    8288{
    83 #if (defined(mpc8240) || defined(mpc8245))
    8489  /*
    8590   * If the processor is an 8240 or an 8245 then the PIC is built
     
    9398  pci.pci_config_addr = (volatile unsigned char *) 0xfec00000;
    9499  pci.pci_config_data = (volatile unsigned char *) 0xfee00000;
     100}
    95101
    96102#else
     103
     104#if 0
     105/* Unfortunately, PCI config space access to empty slots generates
     106 * a 'signalled master abort' condition --> we can't really use
     107 * the machine check interrupt for memory probing unless
     108 * we use probing for PCI scanning also (which would make
     109 * all that code either BSP dependent or requiring yet another
     110 * API, sigh...).
     111 * So for the moment, we just don't use MCP on all mvme2xxx
     112 * boards (using the generic, hostbridge-independent 'clear'
     113 * implementation above).
     114 */
     115/*
     116 * enableMCP: whether to enable MCP checkstop / machine check interrupts
     117 *            on the hostbridge and in HID0.
     118 *
     119 *            NOTE: HID0 and MEREN are left alone if this flag is 0
     120 *
     121 * quiet    : be silent
     122 *
     123 * RETURNS  : raven MERST register contents (lowermost 16 bits), 0 if
     124 *            there were no errors
     125 */
     126unsigned long
     127_BSP_clear_hostbridge_errors(int enableMCP, int quiet)
     128{
     129unsigned merst;
     130
     131    merst = in_be32(RAVEN_MPIC_MERST);
     132    /* write back value to clear status */
     133    out_be32(RAVEN_MPIC_MERST, merst);
     134
     135    if (enableMCP) {
     136      if (!quiet)
     137        printk("Enabling MCP generation on hostbridge errors\n");
     138      out_be32(RAVEN_MPIC_MEREN, MEREN_VAL);
     139    } else {
     140      out_be32(RAVEN_MPIC_MEREN, 0);
     141      if ( !quiet && enableMCP ) {
     142        printk("leaving MCP interrupt disabled\n");
     143      }
     144    }
     145    return (merst & 0xffff);
     146}
     147#endif
     148
     149void detect_host_bridge()
     150{
    97151  PPC_DEVICE *hostbridge;
    98152  unsigned int id0;
     
    174228    }
    175229  }
    176 #endif
    177230  if (OpenPIC == (volatile struct OpenPIC *)0) {
    178231    BSP_panic("OpenPic Not found\n");
     
    180233
    181234}
     235
     236#endif
Note: See TracChangeset for help on using the changeset viewer.