forked from Imagelibrary/rtems
adapted BSP "motorola_powerpc" to support MVME24xx
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2007-04-09 Thomas Doerfler |Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* shared/motorola/motorola.c,shared/openpic/openpic.c,
|
||||
* shared/pci/detect_raven_bridge.c, shared/pci/pci.c:
|
||||
adapted to detect/use MVME2400
|
||||
|
||||
2007-04-02 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* shared/pci/pci.c: More stdint.h fixed-size types.
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-09 Thomas Doerfler |Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* README.MVME2400:
|
||||
Added file to describe setup of a MVME2432 board for use with RTEMS
|
||||
|
||||
2007-01-30 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
* Makefile.am, preinstall.am, include/bsp.h:
|
||||
|
||||
29
c/src/lib/libbsp/powerpc/motorola_powerpc/README.MVME2400
Normal file
29
c/src/lib/libbsp/powerpc/motorola_powerpc/README.MVME2400
Normal file
@@ -0,0 +1,29 @@
|
||||
The generic motorla_powerpc BSP was adapted to work on a MVME2432 by
|
||||
Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>.
|
||||
|
||||
The main steps needed were adaptions to the "Hawk" controller, which
|
||||
replaces the MVME2300 Raven and Falcon chips.
|
||||
|
||||
This board now runs with the same BSP configuration as the MCP750, so
|
||||
select the mcp750 BSP.
|
||||
|
||||
The following settings in the PPCBUG's ENV were also important (taken
|
||||
from the "README.MVME2300" file:)
|
||||
|
||||
VME3PCI Master Master Enable [Y/N] = Y?
|
||||
PCI Slave Image 0 Control = 00000000? <-----
|
||||
PCI Slave Image 0 Base Address Register = 00000000?
|
||||
PCI Slave Image 0 Bound Address Register = 00000000?
|
||||
PCI Slave Image 0 Translation Offset = 00000000?
|
||||
PCI Slave Image 1 Control = 00000000? <-----
|
||||
PCI Slave Image 1 Base Address Register = 01000000?
|
||||
PCI Slave Image 1 Bound Address Register = 20000000?
|
||||
PCI Slave Image 1 Translation Offset = 00000000?
|
||||
PCI Slave Image 2 Control = 00000000? <-----
|
||||
PCI Slave Image 2 Base Address Register = 20000000?
|
||||
PCI Slave Image 2 Bound Address Register = 22000000?
|
||||
PCI Slave Image 2 Translation Offset = D0000000?
|
||||
PCI Slave Image 3 Control = 00000000? <-----
|
||||
PCI Slave Image 3 Base Address Register = 2FFF0000?
|
||||
PCI Slave Image 3 Bound Address Register = 30000000?
|
||||
PCI Slave Image 3 Translation Offset = D0000000?
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <rtems/bspIo.h>
|
||||
#include <libcpu/io.h>
|
||||
#include <string.h>
|
||||
#include <libcpu/cpuIdent.h>
|
||||
|
||||
/*
|
||||
** Board-specific table that maps interrupt names to onboard PCI
|
||||
@@ -153,6 +154,45 @@ static struct _int_map mvme23xx_intmap[] = {
|
||||
|
||||
NULL_INTMAP };
|
||||
|
||||
static struct _int_map mvme24xx_intmap[] = {
|
||||
/* Raven Hostbridge; has int_pin == 0
|
||||
{0, 0, 0, {{0, {-1,-1,-1,-1}},
|
||||
NULL_PINMAP}},
|
||||
*/
|
||||
|
||||
/* Winbond PCI/ISA 83c553; has int_pin == 0
|
||||
{0, 11, 0, {{0, {-1,-1,-1,-1}},
|
||||
NULL_PINMAP}},
|
||||
*/
|
||||
|
||||
{0, 13, PCI_FIXUP_OPT_OVERRIDE_NAME,
|
||||
{{1, {11,21,-1,-1,-1}}, /* Universe ISA/PCI */
|
||||
/* strictly speaking, a non-multi function device
|
||||
* must only use pin A
|
||||
*/
|
||||
{2, {22,-1,-1,-1,-1}}, /* Universe */
|
||||
{3, {23,-1,-1,-1,-1}}, /* Universe */
|
||||
{4, {24,-1,-1,-1,-1}}, /* Universe */
|
||||
NULL_PINMAP}},
|
||||
|
||||
{0, 14, PCI_FIXUP_OPT_OVERRIDE_NAME,
|
||||
{{1, {10,18,-1,-1}}, /* DEC Tulip enet (ISA/PCI) */
|
||||
NULL_PINMAP}},
|
||||
{0, 16, PCI_FIXUP_OPT_OVERRIDE_NAME,
|
||||
{{1, {25,-1,-1,-1}}, /* pci/pmc slot 1 */
|
||||
{2, {26,-1,-1,-1}},
|
||||
{3, {27,-1,-1,-1}},
|
||||
{4, {28,-1,-1,-1}},
|
||||
NULL_PINMAP}},
|
||||
|
||||
{0, 17, PCI_FIXUP_OPT_OVERRIDE_NAME,
|
||||
{{1, {28,-1,-1,-1}}, /* pci/pmc slot 2 */ /* orig: 0xf */
|
||||
{2, {25,-1,-1,-1}},
|
||||
{3, {26,-1,-1,-1}},
|
||||
{4, {27,-1,-1,-1}},
|
||||
NULL_PINMAP}},
|
||||
NULL_INTMAP };
|
||||
|
||||
static struct _int_map mvme2100_intmap[] = {
|
||||
{0, 0, 0, {{1, {16,-1,-1,-1}}, /* something shows up in slot 0 and OpenPIC */
|
||||
/* 0 is unused. This hushes the init code. */
|
||||
@@ -211,6 +251,7 @@ typedef struct {
|
||||
*/
|
||||
int cpu_type;
|
||||
int base_type;
|
||||
ppc_cpu_id_t proc_type;
|
||||
const char *name;
|
||||
|
||||
struct _int_map *intmap;
|
||||
@@ -218,28 +259,28 @@ typedef struct {
|
||||
} mot_info_t;
|
||||
|
||||
static const mot_info_t mot_boards[] = {
|
||||
{0x300, 0x00, "MVME 2400", NULL, NULL},
|
||||
{0x010, 0x00, "Genesis", NULL, NULL},
|
||||
{0x020, 0x00, "Powerstack (Series E)", NULL, NULL},
|
||||
{0x040, 0x00, "Blackhawk (Powerstack)", NULL, NULL},
|
||||
{0x050, 0x00, "Omaha (PowerStack II Pro3000)", NULL, NULL},
|
||||
{0x060, 0x00, "Utah (Powerstack II Pro4000)", NULL, NULL},
|
||||
{0x0A0, 0x00, "Powerstack (Series EX)", NULL, NULL},
|
||||
{0x1E0, 0xE0, "Mesquite cPCI (MCP750)", mcp750_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xE1, "Sitka cPCI (MCPN750)", mcp750_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xE2, "Mesquite cPCI (MCP750) w/ HAC", mcp750_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xF6, "MTX Plus", NULL, NULL},
|
||||
{0x1E0, 0xF7, "MTX w/o Parallel Port", mtx603_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xF8, "MTX w/ Parallel Port", mtx603_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xF9, "MVME 2300", mvme23xx_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xFA, "MVME 2300SC/2600", mvme23xx_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xFB, "MVME 2600 with MVME712M", NULL, NULL},
|
||||
{0x1E0, 0xFC, "MVME 2600/2700 with MVME761", NULL, NULL},
|
||||
{0x1E0, 0xFD, "MVME 3600 with MVME712M", NULL, NULL},
|
||||
{0x1E0, 0xFE, "MVME 3600 with MVME761", NULL, NULL},
|
||||
{0x1E0, 0xFF, "MVME 1600-001 or 1600-011", NULL, NULL},
|
||||
{0x000, 0x00, ""}, /* end of probeable values for automatic scan */
|
||||
{0x000, 0x00, "MVME 2100", mvme2100_intmap, prep_pci_swizzle},
|
||||
{0x3E0, 0x00, PPC_750, "MVME 2400", mvme24xx_intmap,prep_pci_swizzle},
|
||||
{0x010, 0x00, PPC_UNKNOWN, "Genesis", NULL, NULL},
|
||||
{0x020, 0x00, PPC_UNKNOWN, "Powerstack (Series E)", NULL, NULL},
|
||||
{0x040, 0x00, PPC_UNKNOWN, "Blackhawk (Powerstack)", NULL, NULL},
|
||||
{0x050, 0x00, PPC_UNKNOWN, "Omaha (PowerStack II Pro3000)", NULL, NULL},
|
||||
{0x060, 0x00, PPC_UNKNOWN, "Utah (Powerstack II Pro4000)", NULL, NULL},
|
||||
{0x0A0, 0x00, PPC_UNKNOWN, "Powerstack (Series EX)", NULL, NULL},
|
||||
{0x1E0, 0xE0, PPC_UNKNOWN, "Mesquite cPCI (MCP750)", mcp750_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xE1, PPC_UNKNOWN, "Sitka cPCI (MCPN750)", mcp750_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xE2, PPC_UNKNOWN, "Mesquite cPCI (MCP750) w/ HAC", mcp750_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xF6, PPC_UNKNOWN, "MTX Plus", NULL, NULL},
|
||||
{0x1E0, 0xF7, PPC_UNKNOWN, "MTX w/o Parallel Port", mtx603_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xF8, PPC_UNKNOWN, "MTX w/ Parallel Port", mtx603_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xF9, PPC_604, "MVME 2300", mvme23xx_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xFA, PPC_UNKNOWN, "MVME 2300SC/2600", mvme23xx_intmap, prep_pci_swizzle},
|
||||
{0x1E0, 0xFB, PPC_UNKNOWN, "MVME 2600 with MVME712M", NULL, NULL},
|
||||
{0x1E0, 0xFC, PPC_UNKNOWN, "MVME 2600/2700 with MVME761", NULL, NULL},
|
||||
{0x1E0, 0xFD, PPC_UNKNOWN, "MVME 3600 with MVME712M", NULL, NULL},
|
||||
{0x1E0, 0xFE, PPC_UNKNOWN, "MVME 3600 with MVME761", NULL, NULL},
|
||||
{0x1E0, 0xFF, PPC_UNKNOWN, "MVME 1600-001 or 1600-011", NULL, NULL},
|
||||
{0x000, 0x00, PPC_UNKNOWN, ""}, /* end of probeable values for automatic scan */
|
||||
{0x000, 0x00, PPC_UNKNOWN, "MVME 2100", mvme2100_intmap, prep_pci_swizzle},
|
||||
};
|
||||
|
||||
prep_t currentPrepType;
|
||||
@@ -279,16 +320,26 @@ motorolaBoard getMotorolaBoard()
|
||||
#else
|
||||
unsigned char cpu_type;
|
||||
unsigned char base_mod;
|
||||
ppc_cpu_id_t proc_type;
|
||||
int entry;
|
||||
int mot_entry = -1;
|
||||
|
||||
cpu_type = inb(MOTOROLA_CPUTYPE_REG) & 0xF0;
|
||||
base_mod = inb(MOTOROLA_BASETYPE_REG);
|
||||
cpu_type = inb(MOTOROLA_CPUTYPE_REG) & 0xF0;
|
||||
base_mod = inb(MOTOROLA_BASETYPE_REG);
|
||||
proc_type = get_ppc_cpu_type ();
|
||||
|
||||
for (entry = 0; mot_boards[entry].cpu_type != 0; entry++) {
|
||||
if ((mot_boards[entry].cpu_type & 0xff) != cpu_type)
|
||||
continue;
|
||||
|
||||
|
||||
if ((mot_boards[entry].proc_type != PPC_UNKNOWN) &&
|
||||
(mot_boards[entry].proc_type != proc_type))
|
||||
/*
|
||||
* IMD: processor type does not match
|
||||
* (here we distinguish a MVME2300 and a MVME2400)
|
||||
*/
|
||||
continue;
|
||||
|
||||
if (mot_boards[entry].base_type == 0) {
|
||||
mot_entry = entry;
|
||||
break;
|
||||
|
||||
@@ -200,6 +200,11 @@ void openpic_init(int main_pic, unsigned char *polarities, unsigned char *senses
|
||||
vendor = "Motorola";
|
||||
device = "Raven";
|
||||
NumSources += 1;
|
||||
}
|
||||
else if (t == PCI_VENDOR_ID_MOTOROLA + (PCI_DEVICE_ID_MOTOROLA_HAWK<<16)) {
|
||||
vendor = "Motorola";
|
||||
device = "Hawk";
|
||||
NumSources += 1;
|
||||
} else {
|
||||
switch (vendorid) {
|
||||
case OPENPIC_VENDOR_ID_APPLE:
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <rtems/bspIo.h>
|
||||
#include <libcpu/cpuIdent.h>
|
||||
|
||||
#define SHOW_RAVEN_SETTINGS
|
||||
|
||||
#define RAVEN_MPIC_IOSPACE_ENABLE 0x0001
|
||||
#define RAVEN_MPIC_MEMSPACE_ENABLE 0x0002
|
||||
#define RAVEN_MASTER_ENABLE 0x0004
|
||||
@@ -196,8 +198,13 @@ void detect_host_bridge()
|
||||
*/
|
||||
}
|
||||
pci_read_config_dword(0, 0, 0, 0, &id0);
|
||||
if(id0 == PCI_VENDOR_ID_MOTOROLA +
|
||||
(PCI_DEVICE_ID_MOTOROLA_RAVEN<<16)) {
|
||||
#ifdef SHOW_RAVEN_SETTINGS
|
||||
printk("idreg 0 = 0x%x\n",id0);
|
||||
#endif
|
||||
if((id0 == PCI_VENDOR_ID_MOTOROLA +
|
||||
(PCI_DEVICE_ID_MOTOROLA_RAVEN<<16)) ||
|
||||
(id0 == PCI_VENDOR_ID_MOTOROLA +
|
||||
(PCI_DEVICE_ID_MOTOROLA_HAWK<<16))) {
|
||||
/*
|
||||
* We have a Raven bridge. We will get information about its settings
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <bsp/pci.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
#undef SHOW_PCI_SETTING
|
||||
|
||||
/* allow for overriding these definitions */
|
||||
#ifndef PCI_CONFIG_ADDR
|
||||
#define PCI_CONFIG_ADDR 0xcf8
|
||||
@@ -359,12 +361,12 @@ static int FindPCIbridge( int mybus, struct pcibridge *pb )
|
||||
pci_read_config_byte(pbus, pslot, 0, PCI_PRIMARY_BUS, &buspri);
|
||||
pci_read_config_byte(pbus, pslot, 0, PCI_SECONDARY_BUS, &bussec);
|
||||
|
||||
#if 0
|
||||
#ifdef SHOW_PCI_SETTING
|
||||
printk("pci : Found bridge at %d:0x%02x, mybus %d, pribus %d, secbus %d ",
|
||||
pbus, pslot, mybus, buspri, bussec );
|
||||
#endif
|
||||
if ( bussec == mybus ) {
|
||||
#if 0
|
||||
#ifdef SHOW_PCI_SETTING
|
||||
printk("match\n");
|
||||
#endif
|
||||
/* found our nearest bridge going towards the root */
|
||||
@@ -373,7 +375,7 @@ static int FindPCIbridge( int mybus, struct pcibridge *pb )
|
||||
|
||||
return 0;
|
||||
}
|
||||
#if 0
|
||||
#ifdef SHOW_PCI_SETTING
|
||||
printk("no match\n");
|
||||
#endif
|
||||
}
|
||||
@@ -417,7 +419,7 @@ void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) )
|
||||
/* printk("pci : device %d:0x%02x:%i devid %04x, intpin %d, intline %d\n",
|
||||
pbus, pslot, pfun, devid, int_pin, int_name ); */
|
||||
|
||||
#if 0
|
||||
#ifdef SHOW_PCI_SETTING
|
||||
{
|
||||
unsigned short cmd,stat;
|
||||
unsigned char lat, seclat, csize;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-04-09 Thomas Doerfler |Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* include/rtems/pci.h:
|
||||
added device ID for MOTOROLA_HAWK
|
||||
|
||||
2007-04-09 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libcsupport/src/newlibc.c: Add __ATTRIBUTE_IMPURE_PTR__
|
||||
|
||||
@@ -510,6 +510,7 @@
|
||||
#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001
|
||||
#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002
|
||||
#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801
|
||||
#define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803
|
||||
|
||||
#define PCI_VENDOR_ID_PROMISE 0x105a
|
||||
#define PCI_DEVICE_ID_PROMISE_20246 0x4d33
|
||||
|
||||
Reference in New Issue
Block a user