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