Ignore:
Timestamp:
May 14, 2002, 5:10:17 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
6a4df9f9
Parents:
3ce2907
Message:

2001-05-14 Till Straumann <strauman@…>

  • bootloader/misc.c, console/Makefile.am, console/console.c, console/consoleIo.h, console/inch.c, console/polled_io.c, console/uart.c, console/uart.h, include/bsp.h, irq/Makefile.am, irq/irq.c, irq/irq.h, irq/irq_init.c, openpic/openpic.c, openpic/openpic.h, pci/Makefile.am, pci/pci.c, pci/pci.h, residual/Makefile.am, start/start.S, startup/bspstart.c, vectors/vectors.S, vectors/vectors.h, vectors/vectors_init.c: Per PR216, "libbsp/powerpc/shared" BSP has been modified considerably with the goal to make it more flexible and reusable by other BSPs. The main strategies were:
    • eliminate hardcoded base addresses; devices use offsets and a BSP defined base address.
    • separate functionality into different files (e.g. reboot from inch.c to reboot.c) which can be overridden by a 'derived' BSP.
    • separate initialization code into separate files (e.g. PCI bridge detection/initialization was separated from the more generic PCI access routines), also to make it easier for 'derived' BSPs to substitute their own initialization code.

There are also a couple of enhancements and fixes:

  • IRQ handling code now has a hook for attaching a VME bridge.
  • OpenPIC is now explicitely initialized (polarities, senses). Eliminated the implicit assumption on the presence of an ISA PIC.
  • UART and console driver now supports more than 1 port. The current maximum of 2 can easily be extended by enlarging a table (it would even be easier if the ISR API was not broken by design).
  • fixed polled_io.c so it correctly supports console on COM2
  • fixed TLB invalidation code (start.S).
  • exception handler prints a stack backtrace.
  • added BSP_pciFindDevice() to scan the pci bus for a particular vendor/device/instance.
Location:
c/src/lib/libbsp/powerpc/shared/openpic
Files:
2 edited

Legend:

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

    r3ce2907 r69ed59f  
    2727#include <libcpu/byteorder.h>
    2828#include <bsp.h>
    29 
     29#include <rtems/bspIo.h>
     30
     31#ifndef NULL
    3032#define NULL 0
     33#endif
    3134#define REGISTER_DEBUG
    3235#undef REGISTER_DEBUG
     
    3437
    3538volatile struct OpenPIC *OpenPIC = NULL;
    36 unsigned int OpenPIC_NumInitSenses  = 0;
    37 unsigned char *OpenPIC_InitSenses  = NULL;
    3839
    3940static unsigned int NumProcessors;
     
    158159     * report vendor and device id, and gets the wrong number of interrupts.
    159160     * (Motorola did a great job on that one!)
    160      */
    161 
    162 void openpic_init(int main_pic)
     161     *
     162     * T. Straumann, 12/20/2001: polarities and senses are now passed as
     163     *                           parameters, eliminated global vars.
     164     *                           IRQ0 is no longer treated specially.
     165     */
     166
     167void openpic_init(int main_pic, unsigned char *polarities, unsigned char *senses)
    163168{
    164169    unsigned int t, i;
     
    251256            /* Processor 0 */
    252257            openpic_mapirq(0, 1<<0);
    253             for (i = 1; i < NumSources; i++) {
     258            for (i = 0; i < NumSources; i++) {
    254259                    /* Enabled, Priority 8 */
    255                     openpic_initirq(i, 8, OPENPIC_VEC_SOURCE+i, 0,
    256                                     i < OpenPIC_NumInitSenses ? OpenPIC_InitSenses[i] : 1);
     260                    openpic_initirq(i, 8, OPENPIC_VEC_SOURCE+i,
     261                                        polarities ? polarities[i] : 0,
     262                                        senses     ? senses[i]     : 1);
    257263                    /* Processor 0 */
    258264                    openpic_mapirq(i, 1<<0);
  • c/src/lib/libbsp/powerpc/shared/openpic/openpic.h

    r3ce2907 r69ed59f  
    192192
    193193extern volatile struct OpenPIC *OpenPIC;
    194 extern unsigned int OpenPIC_NumInitSenses;
    195 extern unsigned char *OpenPIC_InitSenses;
    196194
    197195
     
    310308
    311309/* Global Operations */
    312 extern void openpic_init(int);
     310extern void openpic_init(int,unsigned char *, unsigned char *);
    313311extern void openpic_reset(void);
    314312extern void openpic_enable_8259_pass_through(void);
Note: See TracChangeset for help on using the changeset viewer.