
/*
 Copyright 1999 by Digi International (www.digi.com)

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the 
 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 PURPOSE.  See the GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

/* 
 *	This file contains gory low-level system stuff that is needed
 *	by some of the assembler code.   Why isn't it in rap2.h?  Becuase
 *	we defined lots of structs and things that assemblers don't like.
 *	
 *	'include/ is absolutely the wrong place for this file.
 *	Once RAP-I goes away, this should be shoved down into fw/include/
 */



/*
 *	Define system control register bits.
 */
#define	SYS_WRITE_BUFFER_ENABLE	(1 << 30)
#define	SYS_DATA_ERROR		(1 << 13)
#define	SYS_PAGE_SIZE_16	(0 << 10)
#define	SYS_PAGE_SIZE_32	(1 << 10)
#define	SYS_PAGE_SIZE_64	(2 << 10)
#define	SYS_PAGE_SIZE_128	(3 << 10)
#define	SYS_PAGE_SIZE_256	(4 << 10)
#define	SYS_PAGE_SIZE_512	(5 << 10)
#define	SYS_PAGE_SIZE_1024	(6 << 10)
#define	SYS_PAGE_SIZE_2048	(7 << 10)
#define SYS_CACHE_MASK			(3 << 8)
#define	SYS_CACHE_MODE_NORMAL		(0 << 8)
#define	SYS_CACHE_MODE_ITESTDATA	(1 << 8)
#define	SYS_CACHE_MODE_ITESTTAG		(2 << 8)
#define	SYS_CACHE_MODE_DTESTTAG		(3 << 8)
#define	SYS_READ_PRIORITY	(1 << 7)
#define	SYS_DREFILL_1		(0 << 5)
#define	SYS_DREFILL_2		(1 << 5)
#define	SYS_DREFILL_4		(2 << 5)
#define	SYS_DREFILL_8		(3 << 5)
#define	SYS_DCACHE_ENABLE	(1 << 4)
#define	SYS_IREFILL_1		(0 << 2)
#define	SYS_IREFILL_2		(1 << 2)
#define	SYS_IREFILL_4		(2 << 2)
#define	SYS_IREFILL_8		(3 << 2)
#define	SYS_ISET1_ENABLE	(1 << 1)
#define	SYS_ISET0_ENABLE	(1 << 0)

#define	SYS_DEFAULT	(SYS_WRITE_BUFFER_ENABLE | SYS_CACHE_MODE_NORMAL \
		| SYS_DREFILL_8 | SYS_DCACHE_ENABLE \
		| SYS_IREFILL_8 | SYS_ISET1_ENABLE | SYS_ISET0_ENABLE)
