aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/apollo
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/apollo')
-rw-r--r--arch/m68k/apollo/config.c14
-rw-r--r--arch/m68k/apollo/dma.c50
-rw-r--r--arch/m68k/apollo/dn_ints.c2
3 files changed, 8 insertions, 58 deletions
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index 6f4581575fb4..cb8e7609df4c 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -25,7 +25,7 @@ u_long cpuctrl_physaddr;
25u_long timer_physaddr; 25u_long timer_physaddr;
26u_long apollo_model; 26u_long apollo_model;
27 27
28extern void dn_sched_init(irqreturn_t (*handler)(int,void *,struct pt_regs *)); 28extern void dn_sched_init(irq_handler_t handler);
29extern void dn_init_IRQ(void); 29extern void dn_init_IRQ(void);
30extern unsigned long dn_gettimeoffset(void); 30extern unsigned long dn_gettimeoffset(void);
31extern int dn_dummy_hwclk(int, struct rtc_time *); 31extern int dn_dummy_hwclk(int, struct rtc_time *);
@@ -38,7 +38,7 @@ extern irqreturn_t dn_process_int(int irq, struct pt_regs *fp);
38#ifdef CONFIG_HEARTBEAT 38#ifdef CONFIG_HEARTBEAT
39static void dn_heartbeat(int on); 39static void dn_heartbeat(int on);
40#endif 40#endif
41static irqreturn_t dn_timer_int(int irq,void *, struct pt_regs *); 41static irqreturn_t dn_timer_int(int irq,void *);
42static void dn_get_model(char *model); 42static void dn_get_model(char *model);
43static const char *apollo_models[] = { 43static const char *apollo_models[] = {
44 [APOLLO_DN3000-APOLLO_DN3000] = "DN3000 (Otter)", 44 [APOLLO_DN3000-APOLLO_DN3000] = "DN3000 (Otter)",
@@ -174,13 +174,13 @@ void config_apollo(void) {
174 174
175} 175}
176 176
177irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp) 177irqreturn_t dn_timer_int(int irq, void *dev_id)
178{ 178{
179 irqreturn_t (*timer_handler)(int, void *, struct pt_regs *) = dev_id; 179 irq_handler_t timer_handler = dev_id;
180 180
181 volatile unsigned char x; 181 volatile unsigned char x;
182 182
183 timer_handler(irq, dev_id, fp); 183 timer_handler(irq, dev_id);
184 184
185 x=*(volatile unsigned char *)(timer+3); 185 x=*(volatile unsigned char *)(timer+3);
186 x=*(volatile unsigned char *)(timer+5); 186 x=*(volatile unsigned char *)(timer+5);
@@ -188,8 +188,8 @@ irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp)
188 return IRQ_HANDLED; 188 return IRQ_HANDLED;
189} 189}
190 190
191void dn_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) { 191void dn_sched_init(irq_handler_t timer_routine)
192 192{
193 /* program timer 1 */ 193 /* program timer 1 */
194 *(volatile unsigned char *)(timer+3)=0x01; 194 *(volatile unsigned char *)(timer+3)=0x01;
195 *(volatile unsigned char *)(timer+1)=0x40; 195 *(volatile unsigned char *)(timer+1)=0x40;
diff --git a/arch/m68k/apollo/dma.c b/arch/m68k/apollo/dma.c
deleted file mode 100644
index aed8be177ef1..000000000000
--- a/arch/m68k/apollo/dma.c
+++ /dev/null
@@ -1,50 +0,0 @@
1#include <linux/types.h>
2#include <linux/kernel.h>
3#include <linux/mm.h>
4#include <linux/kd.h>
5#include <linux/tty.h>
6#include <linux/console.h>
7
8#include <asm/setup.h>
9#include <asm/bootinfo.h>
10#include <asm/system.h>
11#include <asm/pgtable.h>
12#include <asm/apollodma.h>
13#include <asm/io.h>
14
15/* note only works for 16 Bit 1 page DMA's */
16
17static unsigned short next_free_xlat_entry=0;
18
19unsigned short dma_map_page(unsigned long phys_addr,int count,int type) {
20
21 unsigned long page_aligned_addr=phys_addr & (~((1<<12)-1));
22 unsigned short start_map_addr=page_aligned_addr >> 10;
23 unsigned short free_xlat_entry, *xlat_map_entry;
24 int i;
25
26 free_xlat_entry=next_free_xlat_entry;
27 for(i=0,xlat_map_entry=addr_xlat_map+(free_xlat_entry<<2);i<8;i++,xlat_map_entry++) {
28#if 0
29 printk("phys_addr: %x, page_aligned_addr: %x, start_map_addr: %x\n",phys_addr,page_aligned_addr,start_map_addr+i);
30#endif
31 out_be16(xlat_map_entry, start_map_addr+i);
32 }
33
34 next_free_xlat_entry+=2;
35 if(next_free_xlat_entry>125)
36 next_free_xlat_entry=0;
37
38#if 0
39 printk("next_free_xlat_entry: %d\n",next_free_xlat_entry);
40#endif
41
42 return free_xlat_entry<<10;
43}
44
45void dma_unmap_page(unsigned short dma_addr) {
46
47 return ;
48
49}
50
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 9fe07803797b..4274af125998 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -6,7 +6,7 @@
6 6
7void dn_process_int(unsigned int irq, struct pt_regs *fp) 7void dn_process_int(unsigned int irq, struct pt_regs *fp)
8{ 8{
9 m68k_handle_int(irq, fp); 9 __m68k_handle_int(irq, fp);
10 10
11 *(volatile unsigned char *)(pica)=0x20; 11 *(volatile unsigned char *)(pica)=0x20;
12 *(volatile unsigned char *)(picb)=0x20; 12 *(volatile unsigned char *)(picb)=0x20;