mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 19:33:50 +08:00
bsps/powerpc/shared: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings. Found with GCC's warning -Wunused-parameter.
This commit is contained in:
committed by
Gedare Bloom
parent
8702ef9677
commit
056a3ab365
@@ -57,11 +57,15 @@ static struct timecounter Clock_TC;
|
||||
|
||||
static uint32_t Clock_Get_timecount(struct timecounter *tc)
|
||||
{
|
||||
(void) tc;
|
||||
|
||||
return ppc_time_base();
|
||||
}
|
||||
|
||||
void clockOff(void* unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
rtems_interrupt_level l;
|
||||
|
||||
if ( ppc_cpu_is_bookE() ) {
|
||||
@@ -78,6 +82,8 @@ void clockOff(void* unused)
|
||||
|
||||
void clockOn(void* unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
rtems_interrupt_level l;
|
||||
|
||||
PPC_Set_decrementer( Clock_Decrementer_value );
|
||||
@@ -143,6 +149,8 @@ static void (*clock_handler)(void);
|
||||
*/
|
||||
void clockIsr(void *unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
int decr;
|
||||
|
||||
/*
|
||||
@@ -177,6 +185,8 @@ void clockIsr(void *unused)
|
||||
*/
|
||||
void clockIsrBookE(void *unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
/* Note: TSR bit has already been cleared in the exception handler */
|
||||
|
||||
/*
|
||||
@@ -193,6 +203,8 @@ void clockIsrBookE(void *unused)
|
||||
|
||||
int clockIsOn(void* unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
uint32_t msr_value;
|
||||
|
||||
_CPU_MSR_GET( msr_value );
|
||||
|
||||
@@ -94,6 +94,8 @@ static inline uint32_t get_itimer(void)
|
||||
*/
|
||||
static void Clock_isr(void* handle)
|
||||
{
|
||||
(void) handle;
|
||||
|
||||
uint32_t clicks_til_next_interrupt;
|
||||
#if defined(BSP_PPC403_CLOCK_ISR_IRQ_LEVEL)
|
||||
uint32_t l_orig = _ISR_Get_level();
|
||||
@@ -158,6 +160,8 @@ static void Clock_isr(void* handle)
|
||||
|
||||
static int ClockIsOn(const rtems_irq_connect_data* unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
register uint32_t tcr;
|
||||
|
||||
__asm__ volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
|
||||
@@ -167,6 +171,8 @@ static int ClockIsOn(const rtems_irq_connect_data* unused)
|
||||
|
||||
static void ClockOff(const rtems_irq_connect_data* unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
register uint32_t tcr;
|
||||
|
||||
__asm__ volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
|
||||
@@ -176,6 +182,8 @@ static void ClockOff(const rtems_irq_connect_data* unused)
|
||||
|
||||
static void ClockOn(const rtems_irq_connect_data* unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
uint32_t iocr;
|
||||
register uint32_t tcr;
|
||||
#ifndef ppc405
|
||||
|
||||
@@ -64,6 +64,8 @@ static struct timecounter ppc_tc;
|
||||
|
||||
static uint32_t ppc_get_timecount(struct timecounter *tc)
|
||||
{
|
||||
(void) tc;
|
||||
|
||||
return ppc_time_base();
|
||||
}
|
||||
|
||||
@@ -79,6 +81,9 @@ static int ppc_clock_exception_handler(
|
||||
unsigned number
|
||||
)
|
||||
{
|
||||
(void) frame;
|
||||
(void) number;
|
||||
|
||||
uint32_t delta = ppc_clock_decrementer_value;
|
||||
uint32_t next = ppc_clock_next_time_base;
|
||||
uint32_t dec = 0;
|
||||
@@ -138,6 +143,9 @@ static int ppc_clock_exception_handler_booke(
|
||||
unsigned number
|
||||
)
|
||||
{
|
||||
(void) frame;
|
||||
(void) number;
|
||||
|
||||
uint32_t msr;
|
||||
|
||||
/* Acknowledge decrementer request */
|
||||
@@ -160,6 +168,9 @@ static int ppc_clock_exception_handler_booke(
|
||||
|
||||
static int ppc_clock_exception_handler_ppc405(BSP_Exception_frame *frame, unsigned number)
|
||||
{
|
||||
(void) frame;
|
||||
(void) number;
|
||||
|
||||
uint32_t msr;
|
||||
|
||||
/* Acknowledge PIT request */
|
||||
|
||||
@@ -97,6 +97,8 @@ rtems_device_driver console_initialize(
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
(void) arg;
|
||||
|
||||
rtems_status_code status;
|
||||
|
||||
/*
|
||||
@@ -148,6 +150,8 @@ rtems_device_driver console_initialize(
|
||||
#if !defined(USE_POLLED_IO)
|
||||
static int console_first_open(int major, int minor, void *arg)
|
||||
{
|
||||
(void) major;
|
||||
|
||||
rtems_status_code status;
|
||||
|
||||
/* must not open a minor device we have no ISR for */
|
||||
@@ -177,6 +181,10 @@ static int console_first_open(int major, int minor, void *arg)
|
||||
#if !defined(USE_POLLED_IO)
|
||||
static int console_last_close(int major, int minor, void *arg)
|
||||
{
|
||||
(void) major;
|
||||
(void) minor;
|
||||
(void) arg;
|
||||
|
||||
BSP_uart_remove_isr(minor, ttyS[minor].isr);
|
||||
return 0;
|
||||
}
|
||||
@@ -241,6 +249,9 @@ console_close(
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
(void) major;
|
||||
(void) minor;
|
||||
|
||||
rtems_device_driver res = RTEMS_SUCCESSFUL;
|
||||
|
||||
res = rtems_termios_close (arg);
|
||||
@@ -259,6 +270,9 @@ rtems_device_driver console_read(
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
(void) major;
|
||||
(void) minor;
|
||||
|
||||
return rtems_termios_read (arg);
|
||||
} /* console_read */
|
||||
|
||||
@@ -273,6 +287,9 @@ rtems_device_driver console_write(
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
(void) major;
|
||||
(void) minor;
|
||||
|
||||
return rtems_termios_write (arg);
|
||||
} /* console_write */
|
||||
|
||||
@@ -285,6 +302,8 @@ rtems_device_driver console_control(
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
(void) major;
|
||||
|
||||
/* does the BSP support break callbacks ? */
|
||||
#if defined(BIOCSETBREAKCB) && defined(BIOCGETBREAKCB)
|
||||
rtems_libio_ioctl_args_t *ioa=arg;
|
||||
@@ -293,6 +312,9 @@ rtems_device_driver console_control(
|
||||
case BIOCGETBREAKCB: return BSP_uart_get_break_cb(minor, ioa);
|
||||
default: break;
|
||||
}
|
||||
#else
|
||||
(void) minor;
|
||||
(void) arg;
|
||||
#endif
|
||||
return rtems_termios_ioctl (arg);
|
||||
}
|
||||
|
||||
@@ -451,6 +451,8 @@ BSP_poll_char_via_serial()
|
||||
static void
|
||||
uart_noop(const rtems_irq_connect_data *unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -747,12 +749,16 @@ BSP_uart_termios_isr_com(int uart)
|
||||
void
|
||||
BSP_uart_termios_isr_com1(void *unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
BSP_uart_termios_isr_com(BSP_UART_COM1);
|
||||
}
|
||||
|
||||
void
|
||||
BSP_uart_termios_isr_com2(void *unused)
|
||||
{
|
||||
(void) unused;
|
||||
|
||||
BSP_uart_termios_isr_com(BSP_UART_COM2);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ void _CPU_Context_Initialize(
|
||||
void *tls_area
|
||||
)
|
||||
{
|
||||
(void) is_fp;
|
||||
|
||||
ppc_context *the_ppc_context;
|
||||
uint32_t msr_value = 0;
|
||||
uintptr_t sp;
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
int ppc_exc_alignment_handler(BSP_Exception_frame *frame, unsigned excNum)
|
||||
{
|
||||
(void) excNum;
|
||||
|
||||
unsigned opcode = *(unsigned *) frame->EXC_SRR0;
|
||||
|
||||
/* Do we have a dcbz instruction? */
|
||||
|
||||
@@ -46,6 +46,9 @@ uint32_t ppc_exc_msr_bits = MSR_IR | MSR_DR | MSR_RI;
|
||||
|
||||
int ppc_exc_handler_default(BSP_Exception_frame *f, unsigned int vector)
|
||||
{
|
||||
(void) f;
|
||||
(void) vector;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@ union bconv {
|
||||
static void
|
||||
rd_par(struct bankdesc *b, union bconv *pv, uint32_t a)
|
||||
{
|
||||
(void) b;
|
||||
|
||||
if ( 4 == FLASH_STRIDE(b) ) {
|
||||
pv->u = *(_u32_a_t*)a;
|
||||
} else if ( 2 == FLASH_STRIDE(b) ) {
|
||||
|
||||
@@ -252,6 +252,8 @@ uint32_t then, now, sta;
|
||||
STATIC void
|
||||
flash_array_mode_intel(struct bankdesc *b, uint32_t a)
|
||||
{
|
||||
(void) b;
|
||||
|
||||
BSP_flashReadRaw(F_CMD_RD_ARR, a);
|
||||
}
|
||||
|
||||
@@ -259,6 +261,8 @@ flash_array_mode_intel(struct bankdesc *b, uint32_t a)
|
||||
STATIC void
|
||||
flash_print_stat_intel(struct bankdesc *b, uint32_t sta, int verbose)
|
||||
{
|
||||
(void) b;
|
||||
|
||||
int ch;
|
||||
if ( sta & STA_ERROR ) {
|
||||
ch = ':';
|
||||
|
||||
@@ -200,6 +200,8 @@ uint32_t rval;
|
||||
static inline void
|
||||
fl_wr32(struct bankdesc *b, uint32_t a, uint32_t v)
|
||||
{
|
||||
(void) b;
|
||||
|
||||
volatile union bconv *p = (volatile union bconv*)a;
|
||||
if ( 4 == FLASH_STRIDE(b) ) {
|
||||
p->u = v;
|
||||
@@ -216,6 +218,8 @@ volatile union bconv *p = (volatile union bconv*)a;
|
||||
static inline uint32_t
|
||||
fl_splat32(struct bankdesc *b, uint32_t x)
|
||||
{
|
||||
(void) b;
|
||||
|
||||
if ( 4 == FLASH_STRIDE(b) ) {
|
||||
if ( 1 == b->width ) {
|
||||
x = (x << 8) | x;
|
||||
@@ -231,6 +235,8 @@ fl_splat32(struct bankdesc *b, uint32_t x)
|
||||
static inline uint32_t
|
||||
fl_x32(struct bankdesc *b, union bconv *pv)
|
||||
{
|
||||
(void) b;
|
||||
|
||||
if ( 4 == FLASH_STRIDE(b) )
|
||||
return pv->u;
|
||||
else if ( 2 == FLASH_STRIDE(b) )
|
||||
@@ -353,11 +359,15 @@ uint32_t dev_id[3], x, i;
|
||||
STATIC void
|
||||
flash_lock_block_s160(struct bankdesc *b, uint32_t addr)
|
||||
{
|
||||
(void) b;
|
||||
(void) addr;
|
||||
}
|
||||
|
||||
STATIC void
|
||||
flash_unlock_block_s160(struct bankdesc *b, uint32_t addr)
|
||||
{
|
||||
(void) b;
|
||||
(void) addr;
|
||||
}
|
||||
|
||||
STATIC uint32_t
|
||||
@@ -422,6 +432,9 @@ rtems_interval p,i;
|
||||
STATIC void
|
||||
flash_print_stat_s160(struct bankdesc *b, uint32_t sta, int verbose)
|
||||
{
|
||||
(void) b;
|
||||
(void) verbose;
|
||||
|
||||
fprintf(stderr,"Flash Spansion 160 error %"PRIi32"\n", sta);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,14 +47,18 @@ static pci_isa_bridge_device bridge;
|
||||
*/
|
||||
static void nop_hdl(rtems_irq_hdl_param ignored)
|
||||
{
|
||||
(void) ignored;
|
||||
}
|
||||
|
||||
static void nop_irq_enable(const struct __rtems_irq_connect_data__*ignored)
|
||||
{
|
||||
(void) ignored;
|
||||
}
|
||||
|
||||
static int irq_is_connected(const struct __rtems_irq_connect_data__*ignored)
|
||||
{
|
||||
(void) ignored;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -278,6 +282,8 @@ loop_exit:
|
||||
*/
|
||||
void BSP_rtems_irq_mng_init(unsigned cpuId)
|
||||
{
|
||||
(void) cpuId;
|
||||
|
||||
#if BSP_ISA_IRQ_NUMBER > 0 && !defined(mot_ppc_mvme2100)
|
||||
int known_cpi_isa_bridge = 0;
|
||||
#endif
|
||||
|
||||
@@ -233,6 +233,8 @@ unsigned BSP_spuriousIntr = 0;
|
||||
*/
|
||||
int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum)
|
||||
{
|
||||
(void) frame;
|
||||
|
||||
register unsigned int irq;
|
||||
#if BSP_ISA_IRQ_NUMBER > 0
|
||||
register unsigned isaIntr; /* boolean */
|
||||
|
||||
@@ -56,6 +56,8 @@ SPR_RW(PPC405_TSR)
|
||||
*/
|
||||
static int C_dispatch_dec_handler_bookE (BSP_Exception_frame *frame, unsigned int excNum)
|
||||
{
|
||||
(void) excNum;
|
||||
|
||||
/* clear interrupt; we must do this
|
||||
* before C_dispatch_irq_handler()
|
||||
* re-enables MSR_EE.
|
||||
@@ -100,6 +102,9 @@ rtems_status_code bsp_interrupt_get_attributes(
|
||||
rtems_interrupt_attributes *attributes
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
(void) attributes;
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -108,6 +113,8 @@ rtems_status_code bsp_interrupt_is_pending(
|
||||
bool *pending
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
|
||||
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
|
||||
bsp_interrupt_assert(pending != NULL);
|
||||
*pending = false;
|
||||
@@ -116,12 +123,16 @@ rtems_status_code bsp_interrupt_is_pending(
|
||||
|
||||
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
|
||||
{
|
||||
(void) vector;
|
||||
|
||||
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
|
||||
rtems_status_code bsp_interrupt_clear(rtems_vector_number vector)
|
||||
{
|
||||
(void) vector;
|
||||
|
||||
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
@@ -131,6 +142,8 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
|
||||
bool *enabled
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
|
||||
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
|
||||
bsp_interrupt_assert(enabled != NULL);
|
||||
*enabled = false;
|
||||
@@ -156,6 +169,9 @@ rtems_status_code bsp_interrupt_set_priority(
|
||||
uint32_t priority
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
(void) priority;
|
||||
|
||||
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
@@ -165,6 +181,9 @@ rtems_status_code bsp_interrupt_get_priority(
|
||||
uint32_t *priority
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
(void) priority;
|
||||
|
||||
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
|
||||
bsp_interrupt_assert(priority != NULL);
|
||||
return RTEMS_UNSATISFIED;
|
||||
|
||||
@@ -47,6 +47,8 @@ SPR_RW(PPC405_TSR)
|
||||
*/
|
||||
static int C_dispatch_dec_handler_bookE (BSP_Exception_frame *frame, unsigned int excNum)
|
||||
{
|
||||
(void) excNum;
|
||||
|
||||
/* clear interrupt; we must do this
|
||||
* before C_dispatch_irq_handler()
|
||||
* re-enables MSR_EE.
|
||||
|
||||
@@ -54,6 +54,10 @@ void mvmertc_set_register(
|
||||
uint32_t value
|
||||
)
|
||||
{
|
||||
(void) base;
|
||||
(void) reg;
|
||||
(void) value;
|
||||
|
||||
printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n");
|
||||
}
|
||||
|
||||
@@ -62,6 +66,9 @@ uint32_t mvmertc_get_register(
|
||||
uint8_t reg
|
||||
)
|
||||
{
|
||||
(void) base;
|
||||
(void) reg;
|
||||
|
||||
printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
*/
|
||||
void *bsp_idle_thread( uintptr_t ignored )
|
||||
{
|
||||
(void) ignored;
|
||||
|
||||
for( ; ; ) {
|
||||
__asm__ volatile(
|
||||
"mfmsr 3; oris 3,3,4; sync; mtmsr 3; isync; ori 3,3,0; ori 3,3,0"
|
||||
|
||||
@@ -73,6 +73,8 @@ SPR_RW(HID0)
|
||||
void *
|
||||
bsp_ppc_idle_task_body(uintptr_t ignored)
|
||||
{
|
||||
(void) ignored;
|
||||
|
||||
uint32_t msr;
|
||||
|
||||
switch ( current_ppc_cpu ) {
|
||||
|
||||
@@ -1583,11 +1583,15 @@ int lvl;
|
||||
|
||||
static void
|
||||
my_no_op(const rtems_irq_connect_data * arg)
|
||||
{}
|
||||
{
|
||||
(void) arg;
|
||||
}
|
||||
|
||||
static int
|
||||
my_isOn(const rtems_irq_connect_data *arg)
|
||||
{
|
||||
(void) arg;
|
||||
|
||||
return (int)(TSI_RD(THEBASE, TSI_INTEO_REG) & TSI_RD(THEBASE, TSI_INTEN_REG));
|
||||
}
|
||||
|
||||
|
||||
@@ -505,6 +505,9 @@ unsigned long vdw =0;
|
||||
static int
|
||||
disableUniversePort(int ismaster, int portno, volatile unsigned long *preg, void *param)
|
||||
{
|
||||
(void) portno;
|
||||
(void) param;
|
||||
|
||||
unsigned long cntrl;
|
||||
cntrl=READ_LE0(preg);
|
||||
cntrl &= ~(ismaster ? UNIV_MCTL_EN : UNIV_SCTL_EN);
|
||||
@@ -844,6 +847,9 @@ hasPWENWindow(
|
||||
volatile LERegister *preg,
|
||||
void *parm)
|
||||
{
|
||||
(void) portno;
|
||||
(void) parm;
|
||||
|
||||
unsigned long cntrl = READ_LE0(preg);
|
||||
unsigned long mask = ismaster ? (UNIV_MCTL_EN|UNIV_MCTL_PWEN) : (UNIV_SCTL_EN|UNIV_SCTL_PWEN);
|
||||
return (cntrl & mask) == mask ? -1 : 0;
|
||||
@@ -1654,6 +1660,8 @@ LERegister1 dctl;
|
||||
static int uni_desc_start
|
||||
(volatile void *controller_addr, int channel, DmaDescriptor p)
|
||||
{
|
||||
(void) channel;
|
||||
|
||||
volatile LERegister *base = controller_addr;
|
||||
uint32_t dgcs;
|
||||
|
||||
@@ -2013,11 +2021,15 @@ unsigned long linten;
|
||||
/* STUPID API */
|
||||
static void
|
||||
my_no_op(const rtems_irq_connect_data * arg)
|
||||
{}
|
||||
{
|
||||
(void) arg;
|
||||
}
|
||||
|
||||
static int
|
||||
my_isOn(const rtems_irq_connect_data *arg)
|
||||
{
|
||||
(void) arg;
|
||||
|
||||
return (int)vmeUniverseReadReg(UNIV_REGOFF_LINT_EN);
|
||||
}
|
||||
|
||||
|
||||
@@ -359,6 +359,8 @@ void *carg;
|
||||
static unsigned short
|
||||
tsi_clear_errors(int quiet)
|
||||
{
|
||||
(void) quiet;
|
||||
|
||||
unsigned long v;
|
||||
unsigned short rval;
|
||||
v = vmeTsi148ClearVMEBusErrors(0);
|
||||
|
||||
Reference in New Issue
Block a user