4.104.115
Line | |
---|
1 | /* |
---|
2 | * Macros used for brm controller |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 2006. |
---|
5 | * Gaisler Research |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | * |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef __B1553BRM_PCI_H__ |
---|
14 | #define __B1553BRM_PCI_H__ |
---|
15 | |
---|
16 | #include <b1553brm.h> |
---|
17 | |
---|
18 | #ifdef __cplusplus |
---|
19 | extern "C" { |
---|
20 | #endif |
---|
21 | |
---|
22 | /* Register BRM driver |
---|
23 | * See (struct brm_reg).w_ctrl for clksel and clkdiv. |
---|
24 | * See Enhanced register (the least signinficant 2 bits) in BRM Core for brm_freq |
---|
25 | * bus = &amba_conf for LEON3. (LEON2 not yet supported for this driver) |
---|
26 | * |
---|
27 | * Memory setup: |
---|
28 | * memarea = 128k aligned pointer to memory (if zero malloc will be used) (as the CPU sees it) |
---|
29 | * hw_address = address that HW must use to access memarea. (used in the translation process) |
---|
30 | */ |
---|
31 | |
---|
32 | int b1553brm_pci_register( |
---|
33 | amba_confarea_type *bus, |
---|
34 | unsigned int clksel, |
---|
35 | unsigned int clkdiv, |
---|
36 | unsigned int brm_freq, |
---|
37 | unsigned int memarea, |
---|
38 | unsigned int hw_address |
---|
39 | ); |
---|
40 | |
---|
41 | |
---|
42 | /* This function must be called on BRM interrupt. Called from the |
---|
43 | * PCI interrupt handler. irq = AMBA IRQ MASK assigned to the BRM device, |
---|
44 | * is found by reading pending register on IRQMP connected to BRM |
---|
45 | * device. |
---|
46 | * |
---|
47 | * Return 0=not handled. nono-zero=handled |
---|
48 | */ |
---|
49 | int b1553brm_pci_interrupt_handler(int irq, void *arg); |
---|
50 | |
---|
51 | extern void (*b1553brm_pci_int_reg)(void *handler, int irq, void *arg); |
---|
52 | |
---|
53 | #ifdef __cplusplus |
---|
54 | } |
---|
55 | #endif |
---|
56 | |
---|
57 | #endif /* __B1553BRM_PCI_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.