mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 00:34:52 +00:00

When building with W=1: arch/m68k/apollo/config.c:132:6: warning: no previous prototype for ‘dn_serial_print’ [-Wmissing-prototypes] 110 | void dn_serial_print (const char *str) | ^~~~~~~~~~~~~~~ arch/m68k/apollo/dn_ints.c:8:14: warning: no previous prototype for ‘apollo_irq_startup’ [-Wmissing-prototypes] 8 | unsigned int apollo_irq_startup(struct irq_data *data) | ^~~~~~~~~~~~~~~~~~ arch/m68k/apollo/dn_ints.c:19:6: warning: no previous prototype for ‘apollo_irq_shutdown’ [-Wmissing-prototypes] 19 | void apollo_irq_shutdown(struct irq_data *data) | ^~~~~~~~~~~~~~~~~~~ arch/m68k/apollo/dn_ints.c:29:6: warning: no previous prototype for ‘apollo_irq_eoi’ [-Wmissing-prototypes] 29 | void apollo_irq_eoi(struct irq_data *data) | ^~~~~~~~~~~~~~ Fix this by making all local functions static. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/d2b3a6785d3e80069fea85921c72cf0b7afb8493.1694613528.git.geert@linux-m68k.org
48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/interrupt.h>
|
|
#include <linux/irq.h>
|
|
|
|
#include <asm/traps.h>
|
|
#include <asm/apollohw.h>
|
|
|
|
static unsigned int apollo_irq_startup(struct irq_data *data)
|
|
{
|
|
unsigned int irq = data->irq;
|
|
|
|
if (irq < 8)
|
|
*(volatile unsigned char *)(pica+1) &= ~(1 << irq);
|
|
else
|
|
*(volatile unsigned char *)(picb+1) &= ~(1 << (irq - 8));
|
|
return 0;
|
|
}
|
|
|
|
static void apollo_irq_shutdown(struct irq_data *data)
|
|
{
|
|
unsigned int irq = data->irq;
|
|
|
|
if (irq < 8)
|
|
*(volatile unsigned char *)(pica+1) |= (1 << irq);
|
|
else
|
|
*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
|
|
}
|
|
|
|
static void apollo_irq_eoi(struct irq_data *data)
|
|
{
|
|
*(volatile unsigned char *)(pica) = 0x20;
|
|
*(volatile unsigned char *)(picb) = 0x20;
|
|
}
|
|
|
|
static struct irq_chip apollo_irq_chip = {
|
|
.name = "apollo",
|
|
.irq_startup = apollo_irq_startup,
|
|
.irq_shutdown = apollo_irq_shutdown,
|
|
.irq_eoi = apollo_irq_eoi,
|
|
};
|
|
|
|
|
|
void __init dn_init_IRQ(void)
|
|
{
|
|
m68k_setup_user_interrupt(VEC_USER + 96, 16);
|
|
m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq,
|
|
IRQ_APOLLO, 16);
|
|
}
|