1 /*
2  * $Id: ppc.h,v 1.5 2005/09/29 08:51:07 telka Exp $
3  *
4  * StrongARM SA-1110 PPC Registers
5  * Copyright (C) 2002 ETC s.r.o.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the ETC s.r.o. nor the names of its contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  *
31  * Written by Marcel Telka <marcel@telka.sk>, 2002.
32  *
33  * Documentation:
34  * [1] Intel Corporation, "Intel StrongARM SA-1110 Microprocessor
35  *     Developer's Manual", October 2001, Order Number: 278240-004
36  *
37  */
38 
39 #ifndef	SA11X0_PPC_H
40 #define	SA11X0_PPC_H
41 
42 #include <openwince.h>
43 
44 #if LANGUAGE == C
45 #include <stdint.h>
46 #endif
47 
48 /* PPC Registers */
49 
50 #define	PPC_BASE	0x90060000
51 
52 #if LANGUAGE == C
53 typedef volatile struct PPC_registers {
54 	uint32_t ppdr;
55 	uint32_t ppsr;
56 	uint32_t ppar;
57 	uint32_t psdr;
58 	uint32_t ppfr;
59 	uint32_t __reserved1[5];
60 	uint32_t hscr2;
61 	uint32_t __reserved2;
62 	uint32_t mccr1;
63 } PPC_registers_t;
64 
65 #ifdef SA11X0_UNMAPPED
66 #define	PPC_pointer	((PPC_registers_t*) PPC_BASE)
67 #endif
68 
69 #define	PPDR		PPC_pointer->ppdr
70 #define	PPSR		PPC_pointer->ppsr
71 #define	PPAR		PPC_pointer->ppar
72 #define	PSDR		PPC_pointer->psdr
73 #define	PPFR		PPC_pointer->ppfr
74 #define	HSCR2		PPC_pointer->hscr2
75 #define	MCCR1		PPC_pointer->mccr1
76 #endif /* LANGUAGE == C */
77 
78 #define	PPDR_OFFSET	0x00
79 #define	PPSR_OFFSET	0x04
80 #define	PPAR_OFFSET	0x08
81 #define	PSDR_OFFSET	0x0C
82 #define	PPFR_OFFSET	0x10
83 #define	HSCR2_OFFSET	0x28
84 #define	MCCR1_OFFSET	0x30
85 
86 #endif /* SA11X0_PPC_H */
87