RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
include
grlib
gr_cpci_gr740.h
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
3
/* GR-CPCI-GR740 PCI Peripheral driver
4
*
5
* COPYRIGHT (c) 2017.
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
* Configures the GR-CPIC-GR740 interface PCI board in peripheral
30
* mode. This driver provides a AMBA PnP bus by using the general part
31
* of the AMBA PnP bus driver (ambapp_bus.c).
32
*
33
*
34
* Driver resource options:
35
* NAME DEFAULT VALUE
36
* ahbmst2pci _RAM_START AMBA->PCI translation PCI base address
37
* ambaFreq 250000000 (250MHz) AMBA system frequency of GR740
38
* cgEnMask 0x1f (all) Clock gating enable mask
39
*
40
* TODO/UNTESTED
41
* Interrupt testing
42
* bar0 RESOURCE 0x00000000 L2-Cache SDRAM memory
43
* bar1 RESOURCE 0xf0000000 L2-Cache registers
44
*/
45
46
#ifndef __GR_CPCI_GR740_H__
47
#define __GR_CPCI_GR740_H__
48
49
#include <
drvmgr/drvmgr.h
>
50
51
#ifdef __cplusplus
52
extern
"C"
{
53
#endif
54
55
/* An array of pointers to GR-CPCI-GR740 resources. The resources will be
56
* used by the drivers controlling the cores on the GR-CPCI-GR740 target
57
* AMBA bus.
58
*
59
* The gr_cpci_gr740_resources is declared weak so that the user can override the
60
* default configuration. The array must be terminated with a NULL resource.
61
*/
62
extern
struct
drvmgr_bus_res
*gr_cpci_gr740_resources[];
63
64
/* Options to gr_cpci_gr740_print function */
65
#define GR_CPCI_GR740_OPTIONS_AMBA 0x01
/* Print AMBA bus devices */
66
67
/* Print information about all GR-CPCI-GR740 PCI boards */
68
void
gr_cpci_gr740_print(
int
options);
69
70
/* Print information about one GR-CPCI-GR740 PCI board */
71
void
gr_cpci_gr740_print_dev(
struct
drvmgr_dev
*dev,
int
options);
72
73
/* Register GR-CPCI-GR740 driver */
74
void
gr_cpci_gr740_register_drv(
void
);
75
76
#ifdef __cplusplus
77
}
78
#endif
79
80
#endif
drvmgr.h
Driver Manager Interface.
drvmgr_bus_res
Definition
drvmgr.h:238
drvmgr_dev
Definition
drvmgr.h:299
Generated by
1.18.0