/*1* Copyright (C) 2004 Olof Johansson <[email protected]>, IBM Corporation2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation; either version 2 of the License, or6* (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program; if not, write to the Free Software15* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA16*/1718#ifndef _POWERPC_SYSDEV_DART_H19#define _POWERPC_SYSDEV_DART_H202122/* Offset from base to control register */23#define DART_CNTL 02425/* Offset from base to exception register */26#define DART_EXCP_U3 0x1027/* Offset from base to TLB tag registers */28#define DART_TAGS_U3 0x10002930/* U4 registers */31#define DART_BASE_U4 0x1032#define DART_SIZE_U4 0x2033#define DART_EXCP_U4 0x3034#define DART_TAGS_U4 0x10003536/* Control Register fields */3738/* U3 registers */39#define DART_CNTL_U3_BASE_MASK 0xfffff40#define DART_CNTL_U3_BASE_SHIFT 1241#define DART_CNTL_U3_FLUSHTLB 0x40042#define DART_CNTL_U3_ENABLE 0x20043#define DART_CNTL_U3_SIZE_MASK 0x1ff44#define DART_CNTL_U3_SIZE_SHIFT 04546/* U4 registers */47#define DART_BASE_U4_BASE_MASK 0xffffff48#define DART_BASE_U4_BASE_SHIFT 049#define DART_CNTL_U4_ENABLE 0x8000000050#define DART_CNTL_U4_IONE 0x4000000051#define DART_CNTL_U4_FLUSHTLB 0x2000000052#define DART_CNTL_U4_IDLE 0x1000000053#define DART_CNTL_U4_PAR_EN 0x0800000054#define DART_CNTL_U4_IONE_MASK 0x07ffffff55#define DART_SIZE_U4_SIZE_MASK 0x1fff56#define DART_SIZE_U4_SIZE_SHIFT 05758#define DART_REG(r) (dart + ((r) >> 2))59#define DART_IN(r) (in_be32(DART_REG(r)))60#define DART_OUT(r,v) (out_be32(DART_REG(r), (v)))616263/* size of table in pages */646566/* DART table fields */6768#define DARTMAP_VALID 0x8000000069#define DARTMAP_RPNMASK 0x00ffffff707172#define DART_PAGE_SHIFT 1273#define DART_PAGE_SIZE (1 << DART_PAGE_SHIFT)747576#endif /* _POWERPC_SYSDEV_DART_H */777879