xref: /openbsd/sys/arch/armv7/omap/omap3.c (revision 46104711)
1 /* $OpenBSD: omap3.c,v 1.6 2020/03/31 10:33:10 kettenis Exp $ */
2 
3 /*
4  * Copyright (c) 2011 Uwe Stuehler <uwe@openbsd.org>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #include <sys/param.h>
20 
21 #include <machine/bus.h>
22 
23 #include <armv7/armv7/armv7var.h>
24 
25 #define PRCM_ADDR	0x48004000
26 #define PRCM_SIZE	0x2000
27 
28 #define GPTIMERx_SIZE	0x100
29 #define GPTIMER1_ADDR	0x48318000
30 #define GPTIMER1_IRQ	37
31 #define GPTIMER2_ADDR	0x49032000
32 #define GPTIMER2_IRQ	38
33 
34 #define USBTLL_ADDR	0x48062000
35 #define USBTLL_SIZE	0x1000
36 
37 struct armv7_dev omap3_devs[] = {
38 
39 	/*
40 	 * Power, Reset and Clock Manager
41 	 */
42 
43 	{ .name = "prcm",
44 	  .unit = 0,
45 	  .mem = { { PRCM_ADDR, PRCM_SIZE } },
46 	},
47 
48 	/*
49 	 * General Purpose Timers
50 	 */
51 
52 	{ .name = "gptimer",
53 	  .unit = 1,			/* XXX see gptimer.c */
54 	  .mem = { { GPTIMER1_ADDR, GPTIMERx_SIZE } },
55 	  .irq = { GPTIMER1_IRQ }
56 	},
57 
58 	{ .name = "gptimer",
59 	  .unit = 0,			/* XXX see gptimer.c */
60 	  .mem = { { GPTIMER2_ADDR, GPTIMERx_SIZE } },
61 	  .irq = { GPTIMER2_IRQ }
62 	},
63 
64 	/*
65 	 * USB
66 	 */
67 
68 	{ .name = "omusbtll",
69 	  .unit = 0,
70 	  .mem = { { USBTLL_ADDR, USBTLL_SIZE } },
71 	},
72 
73 	/* Terminator */
74 	{ .name = NULL,
75 	  .unit = 0,
76 	}
77 };
78 
79 void
omap3_init(void)80 omap3_init(void)
81 {
82 	armv7_set_devs(omap3_devs);
83 }
84