diff options
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/openpic')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/openpic/openpic.c | 25 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/openpic/openpic.h | 14 |
2 files changed, 0 insertions, 39 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c index 0a619ba1c2..b7aa4777ce 100644 --- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c +++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c @@ -34,13 +34,11 @@ #define REGISTER_DEBUG #undef REGISTER_DEBUG - volatile struct OpenPIC *OpenPIC = NULL; static unsigned int NumProcessors; static unsigned int NumSources; - /* * Accesses to the current processor's registers */ @@ -48,7 +46,6 @@ static unsigned int NumSources; #define THIS_CPU Processor[cpu] #define CHECK_THIS_CPU check_arg_cpu(cpu) - /* * Sanity checks */ @@ -84,8 +81,6 @@ static unsigned int NumSources; #define check_arg_cpu(cpu) do {} while (0) #endif - - /* * I/O functions */ @@ -109,7 +104,6 @@ static inline void openpic_write(volatile unsigned int *addr, unsigned int val) out_le32(addr, val); } - static inline unsigned int openpic_readfield(volatile unsigned int *addr, unsigned int mask) { unsigned int val = openpic_read(addr); @@ -133,7 +127,6 @@ static inline void openpic_setfield(volatile unsigned int *addr, unsigned int ma openpic_writefield(addr, mask, mask); } - /* * Update a Vector/Priority register in a safe manner. The interrupt will * be disabled. @@ -148,10 +141,8 @@ static void openpic_safe_writefield(volatile unsigned int *addr, unsigned int ma openpic_writefield(addr, mask | OPENPIC_MASK, field | OPENPIC_MASK); } - /* -------- Global Operations ---------------------------------------------- */ - /* * Initialize the OpenPIC * @@ -272,7 +263,6 @@ void openpic_init(int main_pic, unsigned char *polarities, unsigned char *senses } } - /* * Reset the OpenPIC */ @@ -283,7 +273,6 @@ void openpic_reset(void) OPENPIC_CONFIG_RESET); } - /* * Enable/disable 8259 Pass Through Mode */ @@ -300,7 +289,6 @@ void openpic_disable_8259_pass_through(void) OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); } - /* * Find out the current interrupt */ @@ -315,7 +303,6 @@ unsigned int openpic_irq(unsigned int cpu) return vec; } - /* * Signal end of interrupt (EOI) processing */ @@ -326,7 +313,6 @@ void openpic_eoi(unsigned int cpu) openpic_write(&OpenPIC->THIS_CPU.EOI, 0); } - /* * Get/set the current task priority */ @@ -363,7 +349,6 @@ void openpic_set_spurious(unsigned int vec) vec); } - /* * Initialize one or more CPUs */ @@ -373,10 +358,8 @@ void openpic_init_processor(unsigned int cpumask) openpic_write(&OpenPIC->Global.Processor_Initialization, cpumask); } - /* -------- Interprocessor Interrupts -------------------------------------- */ - /* * Initialize an interprocessor interrupt (and disable it) * @@ -395,7 +378,6 @@ void openpic_initipi(unsigned int ipi, unsigned int pri, unsigned int vec) (pri << OPENPIC_PRIORITY_SHIFT) | vec); } - /* * Send an IPI to one or more CPUs */ @@ -407,10 +389,8 @@ void openpic_cause_IPI(unsigned int cpu, unsigned int ipi, unsigned int cpumask) openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi), cpumask); } - /* -------- Timer Interrupts ----------------------------------------------- */ - /* * Initialize a timer interrupt (and disable it) * @@ -429,7 +409,6 @@ void openpic_inittimer(unsigned int timer, unsigned int pri, unsigned int vec) (pri << OPENPIC_PRIORITY_SHIFT) | vec); } - /* * Map a timer interrupt to one or more CPUs */ @@ -440,10 +419,8 @@ void openpic_maptimer(unsigned int timer, unsigned int cpumask) openpic_write(&OpenPIC->Global.Timer[timer].Destination, cpumask); } - /* -------- Interrupt Sources ---------------------------------------------- */ - /* * Enable/disable an interrupt source */ @@ -466,7 +443,6 @@ unsigned long flags; rtems_interrupt_enable(flags); } - /* * Initialize an interrupt source (and disable it!) * @@ -490,7 +466,6 @@ void openpic_initirq(unsigned int irq, unsigned int pri, unsigned int vec, int p (sense ? OPENPIC_SENSE_LEVEL : 0)); } - /* * Map an interrupt source to one or more CPUs */ diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h index e6b83138db..776b5ec723 100644 --- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h +++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h @@ -37,7 +37,6 @@ #ifndef _RTEMS_OPENPIC_H #define _RTEMS_OPENPIC_H - /* * OpenPIC supports up to 2048 interrupt sources and up to 32 processors */ @@ -50,7 +49,6 @@ #define OPENPIC_NUM_PRI 16 #define OPENPIC_NUM_VECTORS 256 - /* * Vector numbers */ @@ -60,7 +58,6 @@ #define OPENPIC_VEC_IPI 0x50 /* and up */ #define OPENPIC_VEC_SPURIOUS 99 - /* * OpenPIC Registers are 32 bits and aligned on 128 bit boundaries */ @@ -70,7 +67,6 @@ typedef struct _OpenPIC_Reg { char Pad[0xc]; } OpenPIC_Reg; - /* * Per Processor Registers */ @@ -103,7 +99,6 @@ typedef struct _OpenPIC_Processor { char Pad5[0xf40]; } OpenPIC_Processor; - /* * Timer Registers */ @@ -115,7 +110,6 @@ typedef struct _OpenPIC_Timer { OpenPIC_Reg _Destination; /* Read/Write */ } OpenPIC_Timer; - /* * Global Registers */ @@ -159,7 +153,6 @@ typedef struct _OpenPIC_Global { char Pad1[0xee00]; } OpenPIC_Global; - /* * Interrupt Source Registers */ @@ -169,7 +162,6 @@ typedef struct _OpenPIC_Source { OpenPIC_Reg _Destination; /* Read/Write */ } OpenPIC_Source; - /* * OpenPIC Register Map */ @@ -192,7 +184,6 @@ struct OpenPIC { extern volatile struct OpenPIC *OpenPIC; - /* * Current Task Priority Register */ @@ -243,7 +234,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_PRIORITY_SHIFT 16 #define OPENPIC_VECTOR_MASK 0x000000ff - /* * Interrupt Source Registers */ @@ -251,7 +241,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_SENSE_POLARITY 0x00800000 /* Undoc'd */ #define OPENPIC_SENSE_LEVEL 0x00400000 - /* * Timer Registers */ @@ -260,7 +249,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_TIMER_TOGGLE 0x80000000 #define OPENPIC_TIMER_COUNT_INHIBIT 0x80000000 - /* * Aliases to make life simpler */ @@ -293,7 +281,6 @@ extern volatile struct OpenPIC *OpenPIC; #define Vector_Priority _Vector_Priority.Reg #define Destination _Destination.Reg - /* * Vendor and Device IDs */ @@ -301,7 +288,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_VENDOR_ID_APPLE 0x14 #define OPENPIC_DEVICE_ID_APPLE_HYDRA 0x46 - /* * OpenPIC Operations */ |