diff options
Diffstat (limited to 'arch/m68k/apollo')
-rw-r--r-- | arch/m68k/apollo/apollo.h | 4 | ||||
-rw-r--r-- | arch/m68k/apollo/config.c | 45 | ||||
-rw-r--r-- | arch/m68k/apollo/dn_ints.c | 8 |
3 files changed, 18 insertions, 39 deletions
diff --git a/arch/m68k/apollo/apollo.h b/arch/m68k/apollo/apollo.h new file mode 100644 index 0000000000..1fe9d856df --- /dev/null +++ b/arch/m68k/apollo/apollo.h @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +/* dn_ints.c */ +void dn_init_IRQ(void); diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c index 42a8b8e2b6..e161ecd760 100644 --- a/arch/m68k/apollo/config.c +++ b/arch/m68k/apollo/config.c @@ -4,7 +4,6 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/tty.h> -#include <linux/console.h> #include <linux/rtc.h> #include <linux/vt_kern.h> #include <linux/interrupt.h> @@ -18,6 +17,8 @@ #include <asm/machdep.h> #include <asm/config.h> +#include "apollo.h" + u_long sio01_physaddr; u_long sio23_physaddr; u_long rtc_physaddr; @@ -28,9 +29,8 @@ u_long timer_physaddr; u_long apollo_model; extern void dn_sched_init(void); -extern void dn_init_IRQ(void); extern int dn_dummy_hwclk(int, struct rtc_time *); -extern void dn_dummy_reset(void); +static void dn_dummy_reset(void); #ifdef CONFIG_HEARTBEAT static void dn_heartbeat(int on); #endif @@ -108,28 +108,7 @@ static void __init dn_setup_model(void) } -int dn_serial_console_wait_key(struct console *co) { - - while(!(sio01.srb_csrb & 1)) - barrier(); - return sio01.rhrb_thrb; -} - -void dn_serial_console_write (struct console *co, const char *str,unsigned int count) -{ - while(count--) { - if (*str == '\n') { - sio01.rhrb_thrb = (unsigned char)'\r'; - while (!(sio01.srb_csrb & 0x4)) - ; - } - sio01.rhrb_thrb = (unsigned char)*str++; - while (!(sio01.srb_csrb & 0x4)) - ; - } -} - -void dn_serial_print (const char *str) +static void dn_serial_print(const char *str) { while (*str) { if (*str == '\n') { @@ -168,13 +147,13 @@ void __init config_apollo(void) irqreturn_t dn_timer_int(int irq, void *dev_id) { - volatile unsigned char x; + unsigned char *at = (unsigned char *)apollo_timer; legacy_timer_tick(1); timer_heartbeat(); - x = *(volatile unsigned char *)(apollo_timer + 3); - x = *(volatile unsigned char *)(apollo_timer + 5); + READ_ONCE(*(at + 3)); + READ_ONCE(*(at + 5)); return IRQ_HANDLED; } @@ -229,20 +208,14 @@ int dn_dummy_hwclk(int op, struct rtc_time *t) { } -void dn_dummy_reset(void) { - +static void dn_dummy_reset(void) +{ dn_serial_print("The end !\n"); for(;;); } -void dn_dummy_waitbut(void) { - - dn_serial_print("waitbut\n"); - -} - static void dn_get_model(char *model) { strcpy(model, "Apollo "); diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c index 02cff7efc8..ba96a92f8f 100644 --- a/arch/m68k/apollo/dn_ints.c +++ b/arch/m68k/apollo/dn_ints.c @@ -5,7 +5,9 @@ #include <asm/traps.h> #include <asm/apollohw.h> -unsigned int apollo_irq_startup(struct irq_data *data) +#include "apollo.h" + +static unsigned int apollo_irq_startup(struct irq_data *data) { unsigned int irq = data->irq; @@ -16,7 +18,7 @@ unsigned int apollo_irq_startup(struct irq_data *data) return 0; } -void apollo_irq_shutdown(struct irq_data *data) +static void apollo_irq_shutdown(struct irq_data *data) { unsigned int irq = data->irq; @@ -26,7 +28,7 @@ void apollo_irq_shutdown(struct irq_data *data) *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); } -void apollo_irq_eoi(struct irq_data *data) +static void apollo_irq_eoi(struct irq_data *data) { *(volatile unsigned char *)(pica) = 0x20; *(volatile unsigned char *)(picb) = 0x20; |