Olof Johansson | c707ffc | 2005-09-20 13:45:41 +1000 | [diff] [blame] | 1 | /* |
Olof Johansson | 91f1448 | 2005-11-21 02:12:32 -0600 | [diff] [blame^] | 2 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
Olof Johansson | c707ffc | 2005-09-20 13:45:41 +1000 | [diff] [blame] | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | */ |
| 18 | |
David Gibson | 9933f29 | 2005-11-02 15:13:20 +1100 | [diff] [blame] | 19 | #ifndef _POWERPC_SYSDEV_DART_H |
| 20 | #define _POWERPC_SYSDEV_DART_H |
Olof Johansson | c707ffc | 2005-09-20 13:45:41 +1000 | [diff] [blame] | 21 | |
| 22 | |
| 23 | /* physical base of DART registers */ |
| 24 | #define DART_BASE 0xf8033000UL |
| 25 | |
| 26 | /* Offset from base to control register */ |
| 27 | #define DARTCNTL 0 |
| 28 | /* Offset from base to exception register */ |
| 29 | #define DARTEXCP 0x10 |
| 30 | /* Offset from base to TLB tag registers */ |
| 31 | #define DARTTAG 0x1000 |
| 32 | |
| 33 | |
| 34 | /* Control Register fields */ |
| 35 | |
| 36 | /* base address of table (pfn) */ |
| 37 | #define DARTCNTL_BASE_MASK 0xfffff |
| 38 | #define DARTCNTL_BASE_SHIFT 12 |
| 39 | |
| 40 | #define DARTCNTL_FLUSHTLB 0x400 |
| 41 | #define DARTCNTL_ENABLE 0x200 |
| 42 | |
| 43 | /* size of table in pages */ |
| 44 | #define DARTCNTL_SIZE_MASK 0x1ff |
| 45 | #define DARTCNTL_SIZE_SHIFT 0 |
| 46 | |
| 47 | |
| 48 | /* DART table fields */ |
| 49 | |
| 50 | #define DARTMAP_VALID 0x80000000 |
| 51 | #define DARTMAP_RPNMASK 0x00ffffff |
| 52 | |
| 53 | |
Paul Mackerras | e607d98 | 2005-09-27 14:24:18 +1000 | [diff] [blame] | 54 | #define DART_PAGE_SHIFT 12 |
| 55 | #define DART_PAGE_SIZE (1 << DART_PAGE_SHIFT) |
| 56 | #define DART_PAGE_FACTOR (PAGE_SHIFT - DART_PAGE_SHIFT) |
Olof Johansson | d0035c62 | 2005-09-20 13:46:44 +1000 | [diff] [blame] | 57 | |
Olof Johansson | c707ffc | 2005-09-20 13:45:41 +1000 | [diff] [blame] | 58 | |
David Gibson | 9933f29 | 2005-11-02 15:13:20 +1100 | [diff] [blame] | 59 | #endif /* _POWERPC_SYSDEV_DART_H */ |