RTEMS
6.1-rc6
Loading...
Searching...
No Matches
bsps
include
grlib
grpci2.h
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
3
/* GRLIB GRPCI2 PCI HOST driver.
4
*
5
* COPYRIGHT (c) 2011
6
* Cobham Gaisler AB.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
10
* are met:
11
* 1. Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* 2. Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in the
15
* documentation and/or other materials provided with the distribution.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
* POSSIBILITY OF SUCH DAMAGE.
28
*/
29
30
#ifndef __GRPCI2_H__
31
#define __GRPCI2_H__
32
33
#ifdef __cplusplus
34
extern
"C"
{
35
#endif
36
37
extern
void
grpci2_register_drv(
void
);
38
39
/* Driver Resources:
40
*
41
* PCI Interrupts
42
* ==============
43
* The interrupt settings are normally autodetected from Plyg&Play, however
44
* if IRQs are routed using custom GPIO pins in order to reduce the PIN count
45
* reserved for PCI, the options below can be used to tell GRPCI2 driver which
46
* System IRQ a PCI interrupt is connected to.
47
* Name="INTA#", Type=INT, System Interrupt number that PCI INTA is connected to
48
* Name="INTB#", Type=INT, System Interrupt number that PCI INTB is connected to
49
* Name="INTC#", Type=INT, System Interrupt number that PCI INTC is connected to
50
* Name="INTD#", Type=INT, System Interrupt number that PCI INTD is connected to
51
*
52
* Name="IRQmask", Type=INT,
53
*
54
* PCI Bytetwisting (endianess)
55
* ============================
56
* Name="byteTwisting", Type=INT, Enable/Disable Bytetwisting by hardware
57
*
58
* PCI Latency timer
59
* ============================
60
* Name="latencyTimer", Type=INT, Set the latency timer
61
*
62
* PCI Host's Target BARs setup
63
* ============================
64
* The Host's BARs are not configured by the configuration routines, by default
65
* the BARs are configured disabled (BAR=0) except for BAR0 which is mapped to
66
* the Main Memory for the Host.
67
* Name="tgtBarCfg", Type=PTR (*grpci2_pcibar_cfg), Target PCI BARs of Host
68
*/
69
70
/* When the Host acts as a target on the PCI bus, the PCI BARs of the host's
71
* configuration space determine at which PCI address the Host will be accessed
72
* at and when accessing a BAR which AMBA address it will be translated to.
73
*/
74
struct
grpci2_pcibar_cfg
{
75
unsigned
int
pciadr;
/* PCI address of BAR (BAR content) */
76
unsigned
int
ahbadr;
/* 'pciadr' translated to this AHB Address */
77
unsigned
int
barsize;
/* PCI BAR Size, must be a power of 2 */
78
};
79
80
#ifdef __cplusplus
81
}
82
#endif
83
84
#endif
grpci2_pcibar_cfg
Definition:
grpci2.h:74
Generated by
1.9.6