obs266.h revision 1.4 1 1.4 rin /* $NetBSD: obs266.h,v 1.4 2021/03/30 04:08:02 rin Exp $ */
2 1.1 shige
3 1.1 shige /*
4 1.1 shige * Copyright 2004 Shigeyuki Fukushima.
5 1.1 shige * All rights reserved.
6 1.1 shige *
7 1.1 shige * Written by Shigeyuki Fukushima for The NetBSD Project.
8 1.1 shige *
9 1.1 shige * Redistribution and use in source and binary forms, with or without
10 1.1 shige * modification, are permitted provided that the following conditions
11 1.1 shige * are met:
12 1.1 shige * 1. Redistributions of source code must retain the above copyright
13 1.1 shige * notice, this list of conditions and the following disclaimer.
14 1.1 shige * 2. Redistributions in binary form must reproduce the above
15 1.1 shige * copyright notice, this list of conditions and the following
16 1.1 shige * disclaimer in the documentation and/or other materials provided
17 1.1 shige * with the distribution.
18 1.1 shige * 3. The name of the author may not be used to endorse or promote
19 1.1 shige * products derived from this software without specific prior
20 1.1 shige * written permission.
21 1.1 shige *
22 1.1 shige * THIS SOFTWARE IS PROVIDED THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 1.1 shige * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 1.1 shige * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 1.1 shige * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
26 1.1 shige * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 1.1 shige * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28 1.1 shige * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
29 1.1 shige * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 1.1 shige * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 1.1 shige * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
32 1.1 shige * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
33 1.1 shige * DAMAGE.
34 1.1 shige */
35 1.1 shige
36 1.1 shige #ifndef _EVBPPC_OBS266_H_
37 1.1 shige #define _EVBPPC_OBS266_H_
38 1.1 shige
39 1.4 rin #include <dev/ic/comreg.h>
40 1.4 rin
41 1.1 shige /*
42 1.1 shige * Device Properties for OpenBlockS266 (IBM405GPr 266MHz)
43 1.1 shige */
44 1.1 shige
45 1.1 shige /* UART Clock */
46 1.1 shige #define OBS266_COM_FREQ (COM_FREQ * 4) /* UART CLK 7.3728 MHz */
47 1.1 shige
48 1.1 shige /* OpenBlockS266 GPIO LED */
49 1.1 shige #define OBS266_LED1 (1)
50 1.1 shige #define OBS266_LED2 (2)
51 1.1 shige #define OBS266_LED4 (4)
52 1.1 shige #define OBS266_LED_ON (OBS266_LED1 | OBS266_LED2 | OBS266_LED4)
53 1.1 shige #define OBS266_LED_OFF (~OBS266_LED1 & ~OBS266_LED2 & ~OBS266_LED4)
54 1.1 shige
55 1.1 shige #define OBS266_GPIO_LED1 (12)
56 1.1 shige #define OBS266_GPIO_LED2 (13)
57 1.1 shige #define OBS266_GPIO_LED4 (14)
58 1.1 shige
59 1.1 shige /*
60 1.1 shige * extern variables and functions
61 1.1 shige */
62 1.1 shige extern void obs266_led_set(int led);
63 1.1 shige
64 1.1 shige #endif /* _EVBPPC_OBS266_H_ */
65