[xtensa-cvscommit] linux/include/asm-xtensa dma.h,1.1.1.1,1.2
Brought to you by:
zankel
|
From: <ma...@us...> - 2003-04-01 19:58:10
|
Update of /cvsroot/xtensa/linux/include/asm-xtensa
In directory sc8-pr-cvs1:/tmp/cvs-serv30921
Modified Files:
dma.h
Log Message:
Fix MAX_DMA_ADDRESS macro, and add relevant comments.
Index: dma.h
===================================================================
RCS file: /cvsroot/xtensa/linux/include/asm-xtensa/dma.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** dma.h 28 Aug 2002 16:11:31 -0000 1.1.1.1
--- dma.h 1 Apr 2003 19:58:06 -0000 1.2
***************
*** 10,27 ****
* for more details.
*
! * Copyright (C) 2001 Tensilica Inc.
*/
#include <linux/config.h>
#include <asm/io.h> /* need byte IO */
! #define MAX_DMA_CHANNELS 8
- /* The maximum address that we can perform a DMA transfer to on this platform */
- /* Don't define MAX_DMA_ADDRESS; it's useless on the SuperH and any
- occurrence should be flagged as an error. */
- /* But... */
- /* XXX: This is not applicable to SuperH, just needed for alloc_bootmem */
- #define MAX_DMA_ADDRESS (PAGE_OFFSET+0x10000000)
extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
--- 10,55 ----
* for more details.
*
! * Copyright (C) 2003 Tensilica Inc.
*/
#include <linux/config.h>
#include <asm/io.h> /* need byte IO */
+ #include <xtensa/config/core.h>
! /*
! * This is only to be defined if we have PC-like DMA.
! * By default this is not true on an Xtensa processor,
! * however on boards with a PCI bus, such functionality
! * might be emulated externally (eg. on the XT2000?
! * XTFIXME: verify).
! *
! * NOTE: there still exists driver code that assumes
! * this is defined, eg. drivers/sound/soundcard.c (as of 2.4).
! */
! #define MAX_DMA_CHANNELS 8
!
! /*
! * The maximum virtual address to which DMA transfers
! * can be performed on this platform.
! *
! * NOTE: This is board (platform) specific, not processor-specific!
! *
! * NOTE: This assumes DMA transfers can only be performed on
! * the section of physical memory contiguously mapped in virtual
! * space for the kernel. For the Xtensa architecture, this
! * means the maximum possible size of this DMA area is
! * the size of the statically mapped kernel segment
! * (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB.
! *
! * NOTE: When the entire KSEG area is DMA capable, we substract
! * one from the max address so that the virt_to_phys() macro
! * works correctly on the address (otherwise the address
! * enters another area, and virt_to_phys() may not return
! * the value desired).
! *
! * XTFIXME: need more appropriate values for XT2000 and ISS.
! */
! #define MAX_DMA_ADDRESS (PAGE_OFFSET + XCHAL_KSEG_CACHED_SIZE - 1)
extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
|