wdenk | 0442ed8 | 2002-11-03 10:24:00 +0000 | [diff] [blame] | 1 | /*----------------------------------------------------------------------------+ |
Josh Boyer | 471573b | 2009-08-07 13:53:20 -0400 | [diff] [blame] | 2 | | This source code is dual-licensed. You may use it under the terms of the |
| 3 | | GNU General Public License version 2, or under the license below. |
wdenk | 0442ed8 | 2002-11-03 10:24:00 +0000 | [diff] [blame] | 4 | | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 5 | | This source code has been made available to you by IBM on an AS-IS |
| 6 | | basis. Anyone receiving this source is licensed under IBM |
| 7 | | copyrights to use it in any way he or she deems fit, including |
| 8 | | copying it, modifying it, compiling it, and redistributing it either |
| 9 | | with or without modifications. No license under IBM patents or |
| 10 | | patent applications is to be implied by the copyright license. |
wdenk | 0442ed8 | 2002-11-03 10:24:00 +0000 | [diff] [blame] | 11 | | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 12 | | Any user of this software should understand that IBM cannot provide |
| 13 | | technical support for this software and will not be responsible for |
| 14 | | any consequences resulting from the use of this software. |
wdenk | 0442ed8 | 2002-11-03 10:24:00 +0000 | [diff] [blame] | 15 | | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 16 | | Any person who transfers this source code or any derivative work |
| 17 | | must include the IBM copyright notice, this paragraph, and the |
| 18 | | preceding two paragraphs in the transferred software. |
wdenk | 0442ed8 | 2002-11-03 10:24:00 +0000 | [diff] [blame] | 19 | | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 20 | | COPYRIGHT I B M CORPORATION 1999 |
| 21 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M |
wdenk | 0442ed8 | 2002-11-03 10:24:00 +0000 | [diff] [blame] | 22 | +----------------------------------------------------------------------------*/ |
| 23 | |
| 24 | #ifndef __PPC405_H__ |
| 25 | #define __PPC405_H__ |
| 26 | |
Grant Erickson | b693341 | 2008-05-22 14:44:14 -0700 | [diff] [blame] | 27 | /* Define bits and masks for real-mode storage attribute control registers */ |
| 28 | #define PPC_128MB_SACR_BIT(addr) ((addr) >> 27) |
| 29 | #define PPC_128MB_SACR_VALUE(addr) PPC_REG_VAL(PPC_128MB_SACR_BIT(addr),1) |
| 30 | |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 31 | #ifndef CONFIG_IOP480 |
Niklaus Giger | 3c8ef44 | 2009-10-04 20:04:22 +0200 | [diff] [blame] | 32 | #define CONFIG_SYS_DCACHE_SIZE (16 << 10) /* For AMCC 405 CPUs */ |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 33 | #else |
Niklaus Giger | 3c8ef44 | 2009-10-04 20:04:22 +0200 | [diff] [blame] | 34 | #define CONFIG_SYS_DCACHE_SIZE (2 << 10) /* For PLX IOP480(403)*/ |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 35 | #endif |
| 36 | |
Stefan Roese | 95ca5fa | 2010-09-11 09:31:43 +0200 | [diff] [blame] | 37 | /* DCR registers */ |
| 38 | #define PLB0_ACR 0x0087 |
| 39 | |
Stefan Roese | 8cb251a | 2010-09-12 06:21:37 +0200 | [diff] [blame] | 40 | /* SDR registers */ |
| 41 | #define SDR0_PINSTP 0x0040 |
Stefan Roese | 1bca919 | 2007-11-15 14:23:55 +0100 | [diff] [blame] | 42 | |
Stefan Roese | 8cb251a | 2010-09-12 06:21:37 +0200 | [diff] [blame] | 43 | /* CPR registers */ |
| 44 | #define CPR0_CLKUPD 0x0020 |
| 45 | #define CPR0_PLLC 0x0040 |
| 46 | #define CPR0_PLLD 0x0060 |
| 47 | #define CPR0_CPUD 0x0080 |
| 48 | #define CPR0_PLBD 0x00a0 |
| 49 | #define CPR0_OPBD0 0x00c0 |
| 50 | #define CPR0_PERD 0x00e0 |
Stefan Roese | 153b3e2 | 2007-10-05 17:10:59 +0200 | [diff] [blame] | 51 | |
Grant Erickson | be156f5 | 2008-07-09 16:31:36 -0700 | [diff] [blame] | 52 | /* |
Stefan Roese | 8cb251a | 2010-09-12 06:21:37 +0200 | [diff] [blame] | 53 | * DMA |
Grant Erickson | be156f5 | 2008-07-09 16:31:36 -0700 | [diff] [blame] | 54 | */ |
Stefan Roese | 8cb251a | 2010-09-12 06:21:37 +0200 | [diff] [blame] | 55 | #define DMA_DCR_BASE 0x0100 |
| 56 | #define DMACR0 (DMA_DCR_BASE + 0x00) /* DMA channel control reg 0 */ |
| 57 | #define DMACT0 (DMA_DCR_BASE + 0x01) /* DMA count reg 0 */ |
| 58 | #define DMADA0 (DMA_DCR_BASE + 0x02) /* DMA destination address reg 0 */ |
| 59 | #define DMASA0 (DMA_DCR_BASE + 0x03) /* DMA source address reg 0 */ |
| 60 | #define DMASB0 (DMA_DCR_BASE + 0x04) /* DMA sg descriptor addr 0 */ |
| 61 | #define DMACR1 (DMA_DCR_BASE + 0x08) /* DMA channel control reg 1 */ |
| 62 | #define DMACT1 (DMA_DCR_BASE + 0x09) /* DMA count reg 1 */ |
| 63 | #define DMADA1 (DMA_DCR_BASE + 0x0a) /* DMA destination address reg 1 */ |
| 64 | #define DMASA1 (DMA_DCR_BASE + 0x0b) /* DMA source address reg 1 */ |
| 65 | #define DMASB1 (DMA_DCR_BASE + 0x0c) /* DMA sg descriptor addr 1 */ |
| 66 | #define DMACR2 (DMA_DCR_BASE + 0x10) /* DMA channel control reg 2 */ |
| 67 | #define DMACT2 (DMA_DCR_BASE + 0x11) /* DMA count reg 2 */ |
| 68 | #define DMADA2 (DMA_DCR_BASE + 0x12) /* DMA destination address reg 2 */ |
| 69 | #define DMASA2 (DMA_DCR_BASE + 0x13) /* DMA source address reg 2 */ |
| 70 | #define DMASB2 (DMA_DCR_BASE + 0x14) /* DMA sg descriptor addr 2 */ |
| 71 | #define DMACR3 (DMA_DCR_BASE + 0x18) /* DMA channel control reg 3 */ |
| 72 | #define DMACT3 (DMA_DCR_BASE + 0x19) /* DMA count reg 3 */ |
| 73 | #define DMADA3 (DMA_DCR_BASE + 0x1a) /* DMA destination address reg 3 */ |
| 74 | #define DMASA3 (DMA_DCR_BASE + 0x1b) /* DMA source address reg 3 */ |
| 75 | #define DMASB3 (DMA_DCR_BASE + 0x1c) /* DMA sg descriptor addr 3 */ |
| 76 | #define DMASR (DMA_DCR_BASE + 0x20) /* DMA status reg */ |
| 77 | #define DMASGC (DMA_DCR_BASE + 0x23) /* DMA scatter/gather command reg*/ |
| 78 | #define DMAADR (DMA_DCR_BASE + 0x24) /* DMA address decode reg */ |
Stefan Roese | 153b3e2 | 2007-10-05 17:10:59 +0200 | [diff] [blame] | 79 | |
wdenk | 0442ed8 | 2002-11-03 10:24:00 +0000 | [diff] [blame] | 80 | #endif /* __PPC405_H__ */ |