Changeset d59cae9 in rtems


Ignore:
Timestamp:
Apr 9, 2007, 2:30:49 PM (15 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f7d92471
Parents:
2fb3035
Message:

adapted BSP "motorola_powerpc" to support MVME24xx

Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ChangeLog

    r2fb3035 rd59cae9  
     12007-04-09      Thomas Doerfler |Thomas.Doerfler@embedded-brains.de>
     2
     3        * shared/motorola/motorola.c,shared/openpic/openpic.c,
     4        * shared/pci/detect_raven_bridge.c, shared/pci/pci.c:
     5        adapted to detect/use MVME2400
     6
    172007-04-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/powerpc/motorola_powerpc/ChangeLog

    r2fb3035 rd59cae9  
     12007-04-09      Thomas Doerfler |Thomas.Doerfler@embedded-brains.de>
     2
     3        * README.MVME2400:
     4        Added file to describe setup of a MVME2432 board for use with RTEMS
     5
    162007-01-30      Till Straumann <strauman@slac.stanford.edu>
    27
  • c/src/lib/libbsp/powerpc/shared/motorola/motorola.c

    r2fb3035 rd59cae9  
    1818#include <libcpu/io.h>
    1919#include <string.h>
     20#include <libcpu/cpuIdent.h>
    2021
    2122/*
     
    154155   NULL_INTMAP };
    155156
     157static struct _int_map mvme24xx_intmap[] = {
     158/* Raven Hostbridge; has int_pin == 0
     159   {0,  0, 0, {{0, {-1,-1,-1,-1}},
     160               NULL_PINMAP}},
     161*/
     162
     163/* Winbond PCI/ISA 83c553; has int_pin == 0
     164   {0, 11, 0, {{0, {-1,-1,-1,-1}},
     165               NULL_PINMAP}},
     166*/
     167
     168   {0, 13, PCI_FIXUP_OPT_OVERRIDE_NAME,
     169                        {{1, {11,21,-1,-1,-1}},  /* Universe  ISA/PCI */
     170                        /* strictly speaking, a non-multi function device
     171                         * must only use pin A
     172                         */
     173                         {2, {22,-1,-1,-1,-1}},  /* Universe          */
     174                         {3, {23,-1,-1,-1,-1}},  /* Universe          */
     175                         {4, {24,-1,-1,-1,-1}},  /* Universe          */
     176             NULL_PINMAP}},
     177
     178   {0, 14, PCI_FIXUP_OPT_OVERRIDE_NAME,
     179                        {{1, {10,18,-1,-1}},  /* DEC Tulip enet (ISA/PCI)  */
     180             NULL_PINMAP}},
     181   {0, 16, PCI_FIXUP_OPT_OVERRIDE_NAME,
     182            {{1, {25,-1,-1,-1}},  /* pci/pmc slot 1   */
     183             {2, {26,-1,-1,-1}},
     184             {3, {27,-1,-1,-1}},
     185             {4, {28,-1,-1,-1}},
     186             NULL_PINMAP}},
     187
     188   {0, 17, PCI_FIXUP_OPT_OVERRIDE_NAME,
     189            {{1, {28,-1,-1,-1}},  /* pci/pmc slot 2   */ /* orig: 0xf */
     190             {2, {25,-1,-1,-1}},
     191             {3, {26,-1,-1,-1}},
     192             {4, {27,-1,-1,-1}},
     193             NULL_PINMAP}},
     194   NULL_INTMAP };
     195
    156196static struct _int_map mvme2100_intmap[] = {
    157197   {0, 0, 0, {{1, {16,-1,-1,-1}}, /* something shows up in slot 0 and OpenPIC  */
     
    212252      int               cpu_type;
    213253      int               base_type;
     254      ppc_cpu_id_t      proc_type;
    214255      const char        *name;
    215256
     
    219260
    220261static const mot_info_t mot_boards[] = {
    221   {0x300, 0x00, "MVME 2400", NULL, NULL},
    222   {0x010, 0x00, "Genesis", NULL, NULL},
    223   {0x020, 0x00, "Powerstack (Series E)", NULL, NULL},
    224   {0x040, 0x00, "Blackhawk (Powerstack)", NULL, NULL},
    225   {0x050, 0x00, "Omaha (PowerStack II Pro3000)", NULL, NULL},
    226   {0x060, 0x00, "Utah (Powerstack II Pro4000)", NULL, NULL},
    227   {0x0A0, 0x00, "Powerstack (Series EX)", NULL, NULL},
    228   {0x1E0, 0xE0, "Mesquite cPCI (MCP750)", mcp750_intmap, prep_pci_swizzle},
    229   {0x1E0, 0xE1, "Sitka cPCI (MCPN750)", mcp750_intmap, prep_pci_swizzle},
    230   {0x1E0, 0xE2, "Mesquite cPCI (MCP750) w/ HAC", mcp750_intmap, prep_pci_swizzle},
    231   {0x1E0, 0xF6, "MTX Plus", NULL, NULL},
    232   {0x1E0, 0xF7, "MTX w/o Parallel Port", mtx603_intmap, prep_pci_swizzle},
    233   {0x1E0, 0xF8, "MTX w/ Parallel Port", mtx603_intmap, prep_pci_swizzle},
    234   {0x1E0, 0xF9, "MVME 2300", mvme23xx_intmap, prep_pci_swizzle},
    235   {0x1E0, 0xFA, "MVME 2300SC/2600", mvme23xx_intmap, prep_pci_swizzle},
    236   {0x1E0, 0xFB, "MVME 2600 with MVME712M", NULL, NULL},
    237   {0x1E0, 0xFC, "MVME 2600/2700 with MVME761", NULL, NULL},
    238   {0x1E0, 0xFD, "MVME 3600 with MVME712M", NULL, NULL},
    239   {0x1E0, 0xFE, "MVME 3600 with MVME761", NULL, NULL},
    240   {0x1E0, 0xFF, "MVME 1600-001 or 1600-011", NULL, NULL},
    241   {0x000, 0x00, ""},   /* end of probeable values for automatic scan */
    242   {0x000, 0x00, "MVME 2100", mvme2100_intmap, prep_pci_swizzle},
     262  {0x3E0, 0x00, PPC_750,     "MVME 2400", mvme24xx_intmap,prep_pci_swizzle},
     263  {0x010, 0x00, PPC_UNKNOWN, "Genesis", NULL, NULL},
     264  {0x020, 0x00, PPC_UNKNOWN, "Powerstack (Series E)", NULL, NULL},
     265  {0x040, 0x00, PPC_UNKNOWN, "Blackhawk (Powerstack)", NULL, NULL},
     266  {0x050, 0x00, PPC_UNKNOWN, "Omaha (PowerStack II Pro3000)", NULL, NULL},
     267  {0x060, 0x00, PPC_UNKNOWN, "Utah (Powerstack II Pro4000)", NULL, NULL},
     268  {0x0A0, 0x00, PPC_UNKNOWN, "Powerstack (Series EX)", NULL, NULL},
     269  {0x1E0, 0xE0, PPC_UNKNOWN, "Mesquite cPCI (MCP750)", mcp750_intmap, prep_pci_swizzle},
     270  {0x1E0, 0xE1, PPC_UNKNOWN, "Sitka cPCI (MCPN750)", mcp750_intmap, prep_pci_swizzle},
     271  {0x1E0, 0xE2, PPC_UNKNOWN, "Mesquite cPCI (MCP750) w/ HAC", mcp750_intmap, prep_pci_swizzle},
     272  {0x1E0, 0xF6, PPC_UNKNOWN, "MTX Plus", NULL, NULL},
     273  {0x1E0, 0xF7, PPC_UNKNOWN, "MTX w/o Parallel Port", mtx603_intmap, prep_pci_swizzle},
     274  {0x1E0, 0xF8, PPC_UNKNOWN, "MTX w/ Parallel Port", mtx603_intmap, prep_pci_swizzle},
     275  {0x1E0, 0xF9, PPC_604,     "MVME 2300", mvme23xx_intmap, prep_pci_swizzle},
     276  {0x1E0, 0xFA, PPC_UNKNOWN, "MVME 2300SC/2600", mvme23xx_intmap, prep_pci_swizzle},
     277  {0x1E0, 0xFB, PPC_UNKNOWN, "MVME 2600 with MVME712M", NULL, NULL},
     278  {0x1E0, 0xFC, PPC_UNKNOWN, "MVME 2600/2700 with MVME761", NULL, NULL},
     279  {0x1E0, 0xFD, PPC_UNKNOWN, "MVME 3600 with MVME712M", NULL, NULL},
     280  {0x1E0, 0xFE, PPC_UNKNOWN, "MVME 3600 with MVME761", NULL, NULL},
     281  {0x1E0, 0xFF, PPC_UNKNOWN, "MVME 1600-001 or 1600-011", NULL, NULL},
     282  {0x000, 0x00, PPC_UNKNOWN, ""},   /* end of probeable values for automatic scan */
     283  {0x000, 0x00, PPC_UNKNOWN, "MVME 2100", mvme2100_intmap, prep_pci_swizzle},
    243284};
    244285
     
    280321  unsigned char  cpu_type;
    281322  unsigned char  base_mod;
     323  ppc_cpu_id_t   proc_type;
    282324  int            entry;
    283325  int            mot_entry = -1;
    284326
    285   cpu_type = inb(MOTOROLA_CPUTYPE_REG) & 0xF0;
    286   base_mod = inb(MOTOROLA_BASETYPE_REG);
     327  cpu_type  = inb(MOTOROLA_CPUTYPE_REG) & 0xF0;
     328  base_mod  = inb(MOTOROLA_BASETYPE_REG);
     329  proc_type = get_ppc_cpu_type ();
    287330
    288331  for (entry = 0; mot_boards[entry].cpu_type != 0; entry++) {
    289332    if ((mot_boards[entry].cpu_type & 0xff) != cpu_type)
    290333      continue;
    291 
     334   
     335    if ((mot_boards[entry].proc_type != PPC_UNKNOWN) &&
     336        (mot_boards[entry].proc_type != proc_type))
     337      /*
     338       * IMD: processor type does not match
     339       * (here we distinguish a MVME2300 and a MVME2400)
     340       */
     341      continue;
     342   
    292343    if (mot_boards[entry].base_type == 0) {
    293344      mot_entry = entry;
  • c/src/lib/libbsp/powerpc/shared/openpic/openpic.c

    r2fb3035 rd59cae9  
    201201        device = "Raven";
    202202        NumSources += 1;
     203    }
     204    else if (t == PCI_VENDOR_ID_MOTOROLA + (PCI_DEVICE_ID_MOTOROLA_HAWK<<16)) {
     205        vendor = "Motorola";
     206        device = "Hawk";
     207        NumSources += 1;
    203208    } else {
    204209        switch (vendorid) {
  • c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c

    r2fb3035 rd59cae9  
    1414#include <rtems/bspIo.h>
    1515#include <libcpu/cpuIdent.h>
     16
     17#define SHOW_RAVEN_SETTINGS
    1618
    1719#define RAVEN_MPIC_IOSPACE_ENABLE  0x0001
     
    197199  }
    198200  pci_read_config_dword(0, 0, 0, 0, &id0);
    199   if(id0 == PCI_VENDOR_ID_MOTOROLA +
    200      (PCI_DEVICE_ID_MOTOROLA_RAVEN<<16)) {
     201#ifdef SHOW_RAVEN_SETTINGS
     202  printk("idreg 0 = 0x%x\n",id0);
     203#endif
     204  if((id0 == PCI_VENDOR_ID_MOTOROLA +
     205      (PCI_DEVICE_ID_MOTOROLA_RAVEN<<16)) ||
     206     (id0 == PCI_VENDOR_ID_MOTOROLA +
     207      (PCI_DEVICE_ID_MOTOROLA_HAWK<<16))) {
    201208    /*
    202209     * We have a Raven bridge. We will get information about its settings
  • c/src/lib/libbsp/powerpc/shared/pci/pci.c

    r2fb3035 rd59cae9  
    2727#include <rtems/bspIo.h>
    2828
     29#undef SHOW_PCI_SETTING
     30
    2931/* allow for overriding these definitions */
    3032#ifndef PCI_CONFIG_ADDR
     
    360362        pci_read_config_byte(pbus, pslot, 0, PCI_SECONDARY_BUS,  &bussec);
    361363
    362 #if 0
     364#ifdef SHOW_PCI_SETTING
    363365         printk("pci : Found bridge at %d:0x%02x, mybus %d, pribus %d, secbus %d ",
    364366                 pbus, pslot, mybus, buspri, bussec );
    365367#endif
    366368         if ( bussec == mybus ) {
    367 #if 0
     369#ifdef SHOW_PCI_SETTING
    368370           printk("match\n");
    369371#endif
     
    374376           return 0;
    375377        }
    376 #if 0
     378#ifdef SHOW_PCI_SETTING
    377379         printk("no match\n");
    378380#endif
     
    418420                   pbus, pslot, pfun, devid, int_pin, int_name ); */
    419421
    420 #if 0
     422#ifdef SHOW_PCI_SETTING
    421423                {
    422424                  unsigned short cmd,stat;
  • cpukit/ChangeLog

    r2fb3035 rd59cae9  
     12007-04-09      Thomas Doerfler |Thomas.Doerfler@embedded-brains.de>
     2
     3        * include/rtems/pci.h:
     4        added device ID for MOTOROLA_HAWK
     5
    162007-04-09      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • cpukit/include/rtems/pci.h

    r2fb3035 rd59cae9  
    511511#define PCI_DEVICE_ID_MOTOROLA_MPC106              0x0002
    512512#define PCI_DEVICE_ID_MOTOROLA_RAVEN               0x4801
     513#define PCI_DEVICE_ID_MOTOROLA_HAWK                0x4803
    513514
    514515#define PCI_VENDOR_ID_PROMISE                      0x105a
Note: See TracChangeset for help on using the changeset viewer.