4.115
Last change
on this file since c499856 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[1d325e7b] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * @ingroup 1553 |
---|
| 4 | * @brief Macros used for brm RASTA controller |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | /* |
---|
[e16e0ca] | 8 | * COPYRIGHT (c) 2006. |
---|
| 9 | * Gaisler Research |
---|
| 10 | * |
---|
| 11 | * The license and distribution terms for this file may be |
---|
| 12 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 13 | * http://www.rtems.org/license/LICENSE. |
---|
[e16e0ca] | 14 | * |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | #ifndef __B1553BRM_RASTA_H__ |
---|
| 18 | #define __B1553BRM_RASTA_H__ |
---|
| 19 | |
---|
| 20 | #include <b1553brm.h> |
---|
| 21 | |
---|
| 22 | #ifdef __cplusplus |
---|
| 23 | extern "C" { |
---|
| 24 | #endif |
---|
| 25 | |
---|
[44b06ca] | 26 | /* Register BRM driver |
---|
[e16e0ca] | 27 | * See (struct brm_reg).w_ctrl for clksel and clkdiv. |
---|
| 28 | * See Enhanced register (the least signinficant 2 bits) in BRM Core for brm_freq |
---|
[7a01a888] | 29 | * bus = &ambapp_plb for LEON3. (LEON2 not yet supported for this driver) |
---|
[44b06ca] | 30 | * |
---|
[e16e0ca] | 31 | * Memory setup: |
---|
| 32 | * memarea = 128k aligned pointer to memory (if zero malloc will be used) (as the CPU sees it) |
---|
| 33 | * hw_address = address that HW must use to access memarea. (used in the translation process) |
---|
| 34 | */ |
---|
| 35 | |
---|
| 36 | int b1553brm_rasta_register( |
---|
[7a01a888] | 37 | struct ambapp_bus *bus, |
---|
[44b06ca] | 38 | unsigned int clksel, |
---|
| 39 | unsigned int clkdiv, |
---|
[e16e0ca] | 40 | unsigned int brm_freq, |
---|
| 41 | unsigned int memarea, |
---|
| 42 | unsigned int hw_address |
---|
| 43 | ); |
---|
[44b06ca] | 44 | |
---|
[e16e0ca] | 45 | |
---|
| 46 | /* This function must be called on BRM interrupt. Called from the |
---|
| 47 | * PCI interrupt handler. irq = AMBA IRQ MASK assigned to the BRM device, |
---|
| 48 | * is found by reading pending register on IRQMP connected to BRM |
---|
| 49 | * device. |
---|
| 50 | * |
---|
| 51 | * Return 0=not handled. nono-zero=handled |
---|
| 52 | */ |
---|
| 53 | int b1553brm_rasta_interrupt_handler(int irq, void *arg); |
---|
| 54 | |
---|
| 55 | extern void (*b1553brm_rasta_int_reg)(void *handler, int irq, void *arg); |
---|
| 56 | |
---|
| 57 | #ifdef __cplusplus |
---|
| 58 | } |
---|
| 59 | #endif |
---|
| 60 | |
---|
| 61 | #endif /* __B1553BRM_RASTA_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.