diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2007-04-09 14:30:49 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2007-04-09 14:30:49 +0000 |
commit | d59cae9773321be3163e3b0d79f676f1245c3092 (patch) | |
tree | ca7e8e21ca62be955cbbeefdb617e1d6c15b6cf1 /c/src/lib/libbsp/powerpc/shared/pci | |
parent | 2007-04-09 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-d59cae9773321be3163e3b0d79f676f1245c3092.tar.bz2 |
adapted BSP "motorola_powerpc" to support MVME24xx
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/pci')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c | 11 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/pci/pci.c | 10 |
2 files changed, 15 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c b/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c index 96020518bc..265af0fe0f 100644 --- a/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c +++ b/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c @@ -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 */ diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pci.c b/c/src/lib/libbsp/powerpc/shared/pci/pci.c index db2f4d9997..9f997d703f 100644 --- a/c/src/lib/libbsp/powerpc/shared/pci/pci.c +++ b/c/src/lib/libbsp/powerpc/shared/pci/pci.c @@ -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; |