source: rtems/c/src/lib/libbsp/sparc/leon3/include/amba.h @ 166247f

4.104.114.84.95
Last change on this file since 166247f was 166247f, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 28, 2007 at 6:15:49 PM

2007-03-28 Joel Sherrill <joel@…>

  • include/amba.h: Remove CVS conflict marker.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 *  AMBA Plag & Play Bus Driver Macros
3 *
4 *  Macros used for AMBA Plug & Play bus scanning
5 *
6 *  COPYRIGHT (c) 2004.
7 *  Gaisler Research
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#define LEON3_IO_AREA 0xfff00000
17#define LEON3_CONF_AREA 0xff000
18#define LEON3_AHB_SLAVE_CONF_AREA (1 << 11)
19
20#define LEON3_AHB_CONF_WORDS 8
21#define LEON3_APB_CONF_WORDS 2
22#define LEON3_AHB_MASTERS 64
23#define LEON3_AHB_SLAVES 64
24#define LEON3_APB_SLAVES 16
25#define LEON3_APBUARTS 8
26
27/* Vendor codes */ 
28#define VENDOR_GAISLER   1
29#define VENDOR_PENDER    2
30#define VENDOR_ESA       4
31#define VENDOR_OPENCORES 8
32
33/* Gaisler Research device id's */
34#define GAISLER_LEON3    0x03
35#define GAISLER_LEON3DSU 0x04
36#define GAISLER_ETHAHB   0x05
37#define GAISLER_APBMST   0x06
38#define GAISLER_AHBUART  0x07
39#define GAISLER_SRCTRL   0x08
40#define GAISLER_SDCTRL   0x09
41#define GAISLER_APBUART  0x0C
42#define GAISLER_IRQMP    0x0D
43#define GAISLER_AHBRAM   0x0E
44#define GAISLER_GPTIMER  0x11
45#define GAISLER_PCITRG   0x12
46#define GAISLER_PCISBRG  0x13
47#define GAISLER_PCIFBRG  0x14
48#define GAISLER_PCITRACE 0x15
49#define GAISLER_DMACTRL  0x16
50#define GAISLER_PIOPORT  0x1A
51#define GAISLER_ETHMAC   0x1D
52 
53#define GAISLER_SPACEWIRE 0x01f
54
55/* European Space Agency device id's */
56#define ESA_LEON2        0x2
57#define ESA_MCTRL        0xF
58
59/* Opencores device id's */
60#define OPENCORES_PCIBR  0x4 
61#define OPENCORES_ETHMAC 0x5
62
63
64/*
65 *
66 * Macros for manipulating Configuration registers 
67 *
68 */
69
70
71#define amba_get_confword(tab, index, word) (*((tab).addr[(index)]+(word)))
72
73#define amba_vendor(x) (((x) >> 24) & 0xff)
74
75#define amba_device(x) (((x) >> 12) & 0xfff)
76
77#define amba_ahb_get_membar(tab, index, nr) (*((tab).addr[(index)]+4+(nr)))
78
79#define amba_apb_get_membar(tab, index) (*((tab).addr[(index)]+1))
80
81#define amba_membar_start(mbar) (((mbar) & 0xfff00000) & (((mbar) & 0xfff0) << 16))
82
83#define amba_iobar_start(base, iobar) ((base) | ((((iobar) & 0xfff00000)>>12) & (((iobar) & 0xfff0)<<4)) )
84
85#define amba_irq(conf) ((conf) & 0xf)
86
87
Note: See TracBrowser for help on using the repository browser.