diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-11-10 23:51:17 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-11-10 23:51:17 +0000 |
commit | e79a194755c89fc9330ce74d6af450fa7c18c802 (patch) | |
tree | 8b4ba416f0d5996b89bb1a342e8b40b84d86b42e /c/src/lib/libbsp/powerpc/shared/motorola/motorola.c | |
parent | 2004-11-10 Richard Campbell <richard.campbell@oarcorp.com> (diff) | |
download | rtems-e79a194755c89fc9330ce74d6af450fa7c18c802.tar.bz2 |
2004-11-10 Richard Campbell <richard.campbell@oarcorp.com>
* Makefile.am, bootloader/misc.c, bootloader/pci.c, bootloader/pci.h,
console/console.c, console/inch.c, console/reboot.c, console/uart.c,
console/uart.h, irq/irq.c, irq/irq.h, irq/irq_init.c,
motorola/motorola.c, motorola/motorola.h, openpic/openpic.c,
openpic/openpic.h, pci/detect_raven_bridge.c, pci/pci.c,
start/start.S, startup/bspstart.c, vectors/vectors_init.c,
vme/vmeconfig.c: Add MVME2100 BSP and MPC8240 support. There was also
a significant amount of spelling and whitespace cleanup.
* tod/todcfg.c: New file.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/motorola/motorola.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/motorola/motorola.c | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c index c196228776..d928028f4c 100644 --- a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c +++ b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c @@ -3,7 +3,7 @@ * This include file describe the data structure and the functions implemented * by rtems to identify motorola boards. * - * CopyRight (C) 1999 valette@crf.canon.fr + * Copyright (C) 1999 valette@crf.canon.fr * * The license and distribution terms for this file may be * found in found in the file LICENSE in this distribution or at @@ -12,14 +12,15 @@ * $Id$ */ +#include <bsp.h> #include <bsp/motorola.h> #include <rtems/bspIo.h> #include <libcpu/io.h> #include <string.h> /* -** Board-specific table that maps interrupt names to onboard pci -** peripherals as well as local pci busses. This table is used at +** Board-specific table that maps interrupt names to onboard PCI +** peripherals as well as local PCI busses. This table is used at ** bspstart() to configure the interrupt name & pin for all devices that ** do not have it already specified. If the device is already ** configured, we leave it alone but sanity check & print a warning if @@ -109,6 +110,19 @@ static struct _int_map mtx603_intmap[] = { 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. */ + NULL_PINMAP}}, + + {0, 13, 0, {{1, {23,24,25,26}}, /* PCI INT[A-D]/Universe Lint[0-3] */ + NULL_PINMAP}}, + + {0, 14, 0, {{1, {17,-1,-1,-1}}, /* onboard ethernet */ + NULL_PINMAP}}, + + NULL_INTMAP }; + /* * This table represents the standard PCI swizzle defined in the * PCI bus specification. Table taken from Linux 2.4.18, prep_pci.c, @@ -162,11 +176,13 @@ static const mot_info_t mot_boards[] = { {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, ""} + {0x000, 0x00, ""}, /* end of probeable values for automatic scan */ + {0x000, 0x00, "MVME 2100", mvme2100_intmap, prep_pci_swizzle}, }; prep_t currentPrepType; -motorolaBoard currentBoard; +motorolaBoard currentBoard; + prep_t checkPrepBoardType(RESIDUAL *res) { prep_t PREP_type; @@ -188,8 +204,17 @@ prep_t checkPrepBoardType(RESIDUAL *res) return PREP_type; } -motorolaBoard getMotorolaBoard() +motorolaBoard getMotorolaBoard() { +/* + * At least the MVME2100 does not have the CPU Type and Base Type Registers, + * so it cannot be probed. + * + * NOTE: Every path must set currentBoard. + */ +#if defined(mvme2100) + currentBoard = (motorolaBoard) MVME_2100; +#else unsigned char cpu_type; unsigned char base_mod; int entry; @@ -209,7 +234,7 @@ motorolaBoard getMotorolaBoard() if (mot_boards[entry].base_type != base_mod) continue; - else{ + else { mot_entry = entry; break; } @@ -222,6 +247,7 @@ motorolaBoard getMotorolaBoard() return currentBoard; } currentBoard = (motorolaBoard) mot_entry; +#endif return currentBoard; } @@ -234,6 +260,7 @@ const char* motorolaBoardToString(motorolaBoard board) const struct _int_map *motorolaIntMap(motorolaBoard board) { if (board == MOTOROLA_UNKNOWN) return NULL; + /* printk( "IntMap board %d 0x%08x\n", board, mot_boards[board].intmap ); */ return mot_boards[board].intmap; } |