xref: /netbsd/sys/arch/evbarm/gumstix/gumstixreg.h (revision 6f3c0630)
1 /*	$NetBSD: gumstixreg.h,v 1.10 2019/05/18 08:49:24 skrll Exp $  */
2 /*
3  * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation.
4  * All rights reserved.
5  *
6  * Written by Takashi Kiyohara and Susumu Miki for WIDE Project and SOUM
7  * Corporation.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. Neither the name of the project nor the name of SOUM Corporation
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE PROJECT and SOUM CORPORATION ``AS IS''
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT AND SOUM CORPORATION
25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 #ifndef _EVBARM_GUMSTIXREG_H_
34 #define _EVBARM_GUMSTIXREG_H_
35 
36 /*
37  * Logical mapping for onboard/integrated peripherals
38  * that are used while bootstrapping.
39  */
40 #define GUMSTIX_IO_AREA_VBASE		0xfd000000
41 #define GUMSTIX_INTCTL_VBASE		0xfd000000
42 #define GUMSTIX_CLKMAN_VBASE		0xfd100000
43 #define GUMSTIX_GPIO_VBASE		0xfd200000
44 #define GUMSTIX_FFUART_VBASE		0xfd300000
45 #define GUMSTIX_STUART_VBASE		0xfd400000
46 #define GUMSTIX_BTUART_VBASE		0xfd500000
47 #define GUMSTIX_HWUART_VBASE		0xfd600000
48 #define GUMSTIX_LCDC_VBASE		0xfd700000
49 
50 #define OVERO_L4_CORE_VBASE		0xc0000000
51 #define OVERO_L4_PERIPHERAL_VBASE	0xc0100000
52 #define OVERO_L4_WAKEUP_VBASE		0xc0200000
53 #define OVERO_GPMC_VBASE		0xc0300000
54 #define OVERO_SRDC_VBASE		0xc0400000
55 
56 #define DUOVERO_L4_CM_VBASE		0xc0000000
57 #define DUOVERO_L4_PERIPHERAL_VBASE	0xc0100000
58 #define DUOVERO_L4_WAKEUP_VBASE		0xc0400000
59 #define DUOVERO_GPMC_VBASE		0xc0500000
60 #define DUOVERO_DMM_VBASE		0xc1000000
61 
62 #define PEPPER_PRCM_VBASE		0xc0000000
63 #define PEPPER_L4_PERIPHERAL_VBASE	0xc0100000
64 
65 #define ioreg_read(a)		(*(volatile unsigned *)(a))
66 #define ioreg_write(a,v)	(*(volatile unsigned *)(a)=(v))
67 
68 #define ioreg16_read(a)		(*(volatile uint16_t *)(a))
69 #define ioreg16_write(a,v)	(*(volatile uint16_t *)(a)=(v))
70 
71 #define ioreg8_read(a)		(*(volatile uint8_t *)(a))
72 #define ioreg8_write(a,v)	(*(volatile uint8_t *)(a)=(v))
73 
74 #endif /* _EVBARM_GUMSTIXREG_H_ */
75