summaryrefslogtreecommitdiffstats
path: root/drivers/sbus/dvma.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
commitc7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch)
tree3682407a599b8f9f03fc096298134cafba1c9b2f /drivers/sbus/dvma.c
parent1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff)
o Merge with Linux 2.1.116.
o New Newport console code. o New G364 console code.
Diffstat (limited to 'drivers/sbus/dvma.c')
-rw-r--r--drivers/sbus/dvma.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/sbus/dvma.c b/drivers/sbus/dvma.c
index f4ff7e539..31153efbc 100644
--- a/drivers/sbus/dvma.c
+++ b/drivers/sbus/dvma.c
@@ -74,8 +74,8 @@ init_one_dvma(struct Linux_SBus_DMA *dma, int num_dma))
}
/* Probe this SBus DMA module(s) */
-__initfunc(unsigned long
-dvma_init(struct linux_sbus *sbus, unsigned long memory_start))
+__initfunc(void
+dvma_init(struct linux_sbus *sbus))
{
struct linux_sbus_device *this_dev;
struct Linux_SBus_DMA *dma;
@@ -93,8 +93,7 @@ dvma_init(struct linux_sbus *sbus, unsigned long memory_start))
continue;
/* Found one... */
- dma = (struct Linux_SBus_DMA *) memory_start;
- memory_start += sizeof(struct Linux_SBus_DMA);
+ dma = kmalloc(sizeof(struct Linux_SBus_DMA), GFP_ATOMIC);
dma->SBus_dev = this_dev;
@@ -127,22 +126,19 @@ dvma_init(struct linux_sbus *sbus, unsigned long memory_start))
init_one_dvma(dma, num_dma++);
}; /* while(this_dev) */
-
- return memory_start;
}
#ifdef CONFIG_SUN4
#include <asm/sun4paddr.h>
-__initfunc(unsigned long
-sun4_dvma_init(unsigned long memory_start))
+__initfunc(void sun4_dvma_init(void))
{
struct Linux_SBus_DMA *dma;
struct Linux_SBus_DMA *dchain;
- dma = (struct Linux_SBus_DMA *) memory_start;
- memory_start += sizeof(struct Linux_SBus_DMA);
+ if(sun4_dma_physaddr) {
+ dma = kmalloc(sizeof(struct Linux_SBus_DMA), GFP_ATOMIC);
/* No SBUS */
dma->SBus_dev = 0x0;
@@ -151,14 +147,16 @@ sun4_dvma_init(unsigned long memory_start))
dma_chain=dma;
dma->regs = (struct sparc_dma_registers *)
- sparc_alloc_io (SUN4_300_DMA_PHYSADDR, 0,
+ sparc_alloc_io (sun4_dma_physaddr, 0,
PAGE_SIZE, "dma", 0x0, 0x0);
/* No prom node */
dma->node = 0x0;
init_one_dvma(dma, 0);
- return memory_start;
+ } else {
+ dma_chain=0x0;
+ }
}
#endif