diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-05-05 00:56:30 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-02 16:00:36 -0400 |
commit | 6f070e1867f5c31df17571b0c26f0a73cc3fe600 (patch) | |
tree | 4ec975f31c48b2d4fa729360f02bf0cb0efe966a /arch/blackfin/include | |
parent | 2c0a6f2d4fc292c8eac43bb4c4b8c0d124d30e2e (diff) | |
download | u-boot-imx-6f070e1867f5c31df17571b0c26f0a73cc3fe600.zip u-boot-imx-6f070e1867f5c31df17571b0c26f0a73cc3fe600.tar.gz u-boot-imx-6f070e1867f5c31df17571b0c26f0a73cc3fe600.tar.bz2 |
Blackfin: bfin_spi: add optional DMA support
This moves the last piece from the old spi_flash driver to the new SPI
framework -- optional DMA RX support. This typically cuts speeds by ~40%
at the cost of additional ~300 bytes.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r-- | arch/blackfin/include/asm/dma.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h new file mode 100644 index 0000000..21ff1cf --- /dev/null +++ b/arch/blackfin/include/asm/dma.h @@ -0,0 +1,75 @@ +/* + * dma.h - Blackfin DMA defines/structures/etc... + * + * Copyright 2004-2008 Analog Devices Inc. + * Licensed under the GPL-2 or later. + */ + +#ifndef _BLACKFIN_DMA_H_ +#define _BLACKFIN_DMA_H_ + +#include <asm/mach-common/bits/dma.h> + +struct dmasg_large { + void *next_desc_addr; + unsigned long start_addr; + unsigned short cfg; + unsigned short x_count; + short x_modify; + unsigned short y_count; + short y_modify; +} __attribute__((packed)); + +struct dmasg { + unsigned long start_addr; + unsigned short cfg; + unsigned short x_count; + short x_modify; + unsigned short y_count; + short y_modify; +} __attribute__((packed)); + +struct dma_register { + void *next_desc_ptr; /* DMA Next Descriptor Pointer register */ + unsigned long start_addr; /* DMA Start address register */ + + unsigned short cfg; /* DMA Configuration register */ + unsigned short dummy1; /* DMA Configuration register */ + + unsigned long reserved; + + unsigned short x_count; /* DMA x_count register */ + unsigned short dummy2; + + short x_modify; /* DMA x_modify register */ + unsigned short dummy3; + + unsigned short y_count; /* DMA y_count register */ + unsigned short dummy4; + + short y_modify; /* DMA y_modify register */ + unsigned short dummy5; + + void *curr_desc_ptr; /* DMA Current Descriptor Pointer + register */ + unsigned long curr_addr_ptr; /* DMA Current Address Pointer + register */ + unsigned short irq_status; /* DMA irq status register */ + unsigned short dummy6; + + unsigned short peripheral_map; /* DMA peripheral map register */ + unsigned short dummy7; + + unsigned short curr_x_count; /* DMA Current x-count register */ + unsigned short dummy8; + + unsigned long reserved2; + + unsigned short curr_y_count; /* DMA Current y-count register */ + unsigned short dummy9; + + unsigned long reserved3; + +}; + +#endif |