From: Andy P. <at...@us...> - 2001-09-14 20:30:25
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv28569/kernel Modified Files: cpu_ka46.c setup.c Log Message: Some changes for scsi boot. Add low memory DMA mapping for KA46 so that lance will work Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cpu_ka46.c 2001/07/31 17:28:26 1.7 +++ cpu_ka46.c 2001/09/14 20:30:21 1.8 @@ -10,7 +10,7 @@ #include <linux/types.h> /* For NULL */ #include <linux/kernel.h> /* For printk */ - +#include <linux/mm.h> #include <linux/config.h> #include <asm/mtpr.h> @@ -24,10 +24,11 @@ void ka46_cache_disable(void); void ka46_cache_clear(void); void ka46_cache_enable(void); - +void ka46_dma_init(void); void ka46_init_devices(void); const char *ka46_cpu_type_str(void); +unsigned long int *ka46_dmamap; struct ka46_machine_vector { struct vax_mv mv; @@ -130,4 +131,27 @@ #ifdef CONFIG_VSBUS vsbus_setup(); #endif /* CONFIG_VSBUS */ + /* initialise the DMA area */ + ka46_dma_init(); +} + +void ka46_dma_init(void) +{ + int i; + unsigned int *base_addr; + /* at present we just map all of the GFP_DMA region + * this is obviously wasteful */ + /* grab a block of 128kb */ + ka46_dmamap = (unsigned long int *)__get_free_pages(GFP_DMA, 5); + if (ka46_dmamap == NULL) { + printk(KERN_ERR "KA46 DMA unable to allocate map\n"); + return; + } + /* Map all 16MB of I/O space to low 16MB of memory (the GFP_DMA region)*/ + base_addr = ioremap(KA46_DMAMAP,0x4); + *base_addr = (unsigned int)ka46_dmamap; + for (i = 0; i < 0x8000; i++) ka46_dmamap[i] = 0x80000000 | i; + iounmap(base_addr); + + return; } Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/setup.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- setup.c 2001/09/11 19:24:40 1.15 +++ setup.c 2001/09/14 20:30:21 1.16 @@ -68,6 +68,7 @@ * atp -- have a temporary one. * Shouldn't we use strcpy here? */ +// memcpy(command_line, "root=/dev/sda1 rw debug\0",24); memcpy(command_line, "root=/dev/nfs nfsroot=/tftpboot/vaxroot rw debug\0",55); *cmdline_p = command_line; /* Save unparsed command line copy for /proc/cmdline */ |