summaryrefslogtreecommitdiff
path: root/arch/m68k/apollo/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/apollo/config.c')
-rw-r--r--arch/m68k/apollo/config.c45
1 files changed, 9 insertions, 36 deletions
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index 42a8b8e2b664..e161ecd76035 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 ");