diff options
author | Anatolij Gustschin <agust@denx.de> | 2009-12-11 23:24:44 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-12-11 23:24:44 -0500 |
commit | 12458ea06efd7b44281e68fe59c950ec7d59c649 (patch) | |
tree | 264df3c6fa054b7b866bb2eccca5f83e41044632 /arch/powerpc/include/asm | |
parent | 2e032b62c4c8560d6416ad3cc925cfc2a5eafb07 (diff) |
ppc440spe-adma: adds updated ppc440spe adma driver
This patch adds new version of the PPC440SPe ADMA driver.
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/async_tx.h | 47 | ||||
-rw-r--r-- | arch/powerpc/include/asm/dcr-regs.h | 23 |
2 files changed, 70 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/async_tx.h b/arch/powerpc/include/asm/async_tx.h new file mode 100644 index 000000000000..8b2dc55d01ab --- /dev/null +++ b/arch/powerpc/include/asm/async_tx.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008-2009 DENX Software Engineering. | ||
3 | * | ||
4 | * Author: Yuri Tikhonov <yur@emcraft.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the Free | ||
8 | * Software Foundation; either version 2 of the License, or (at your option) | ||
9 | * any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along with | ||
17 | * this program; if not, write to the Free Software Foundation, Inc., 59 | ||
18 | * Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | * | ||
20 | * The full GNU General Public License is included in this distribution in the | ||
21 | * file called COPYING. | ||
22 | */ | ||
23 | #ifndef _ASM_POWERPC_ASYNC_TX_H_ | ||
24 | #define _ASM_POWERPC_ASYNC_TX_H_ | ||
25 | |||
26 | #if defined(CONFIG_440SPe) || defined(CONFIG_440SP) | ||
27 | extern struct dma_chan * | ||
28 | ppc440spe_async_tx_find_best_channel(enum dma_transaction_type cap, | ||
29 | struct page **dst_lst, int dst_cnt, struct page **src_lst, | ||
30 | int src_cnt, size_t src_sz); | ||
31 | |||
32 | #define async_tx_find_channel(dep, cap, dst_lst, dst_cnt, src_lst, \ | ||
33 | src_cnt, src_sz) \ | ||
34 | ppc440spe_async_tx_find_best_channel(cap, dst_lst, dst_cnt, src_lst, \ | ||
35 | src_cnt, src_sz) | ||
36 | #else | ||
37 | |||
38 | #define async_tx_find_channel(dep, type, dst, dst_count, src, src_count, len) \ | ||
39 | __async_tx_find_channel(dep, type) | ||
40 | |||
41 | struct dma_chan * | ||
42 | __async_tx_find_channel(struct async_submit_ctl *submit, | ||
43 | enum dma_transaction_type tx_type); | ||
44 | |||
45 | #endif | ||
46 | |||
47 | #endif | ||
diff --git a/arch/powerpc/include/asm/dcr-regs.h b/arch/powerpc/include/asm/dcr-regs.h index 828e3aa1f2fc..380274de429f 100644 --- a/arch/powerpc/include/asm/dcr-regs.h +++ b/arch/powerpc/include/asm/dcr-regs.h | |||
@@ -157,4 +157,27 @@ | |||
157 | #define L2C_SNP_SSR_32G 0x0000f000 | 157 | #define L2C_SNP_SSR_32G 0x0000f000 |
158 | #define L2C_SNP_ESR 0x00000800 | 158 | #define L2C_SNP_ESR 0x00000800 |
159 | 159 | ||
160 | /* | ||
161 | * DCR register offsets for 440SP/440SPe I2O/DMA controller. | ||
162 | * The base address is configured in the device tree. | ||
163 | */ | ||
164 | #define DCRN_I2O0_IBAL 0x006 | ||
165 | #define DCRN_I2O0_IBAH 0x007 | ||
166 | #define I2O_REG_ENABLE 0x00000001 /* Enable I2O/DMA access */ | ||
167 | |||
168 | /* 440SP/440SPe Software Reset DCR */ | ||
169 | #define DCRN_SDR0_SRST 0x0200 | ||
170 | #define DCRN_SDR0_SRST_I2ODMA (0x80000000 >> 15) /* Reset I2O/DMA */ | ||
171 | |||
172 | /* 440SP/440SPe Memory Queue DCR offsets */ | ||
173 | #define DCRN_MQ0_XORBA 0x04 | ||
174 | #define DCRN_MQ0_CF2H 0x06 | ||
175 | #define DCRN_MQ0_CFBHL 0x0f | ||
176 | #define DCRN_MQ0_BAUH 0x10 | ||
177 | |||
178 | /* HB/LL Paths Configuration Register */ | ||
179 | #define MQ0_CFBHL_TPLM 28 | ||
180 | #define MQ0_CFBHL_HBCL 23 | ||
181 | #define MQ0_CFBHL_POLY 15 | ||
182 | |||
160 | #endif /* __DCR_REGS_H__ */ | 183 | #endif /* __DCR_REGS_H__ */ |