summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared/include/apbuart_rasta.h
blob: fe73b2e2a7a90cab1af8efa1e67908b315fdd287 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
 * @file
 * @ingroup uart
 * @brief APBUART RASTA via PCI - driver interface
 */

/*
 *  COPYRIGHT (c) 2007.
 *  Gaisler Research
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.com/license/LICENSE.
 *
 */

#ifndef __APBUART_RASTA_H__
#define __APBUART_RASTA_H__

#include <apbuart.h>

#ifdef __cplusplus
extern "C" {
#endif

/* Register APBUART driver, if APBUART devices are found.
 * bus = pointer to AMBA bus description used to search for APBUART(s).
 *
 */

int apbuart_rasta_register(struct ambapp_bus *bus);

/* This function must be called on APBUART interrupt. Called from the
 * RASTA interrupt handler.
 * irq = AMBA IRQ assigned to the APBUART device, is found by reading
 *       pending register on IRQMP connected to the APBUART device.
 *
 */
void apbuartrasta_interrupt_handler(int irq, void *arg);

extern void (*apbuart_rasta_int_reg)(void *handler, int irq, void *arg);

#ifdef __cplusplus
}
#endif

#endif /* __APBUART_RASTA_H__ */