DesignWare UART.
Definition in file dwuart.c.
| int dwuart_probe |
( |
struct dt_device * | dt, |
|
|
unsigned int | offset ) |
|
static |
Probe devicetree device.
- Parameters
-
| dt | Devicetree device |
| offset | Starting node offset |
- Return values
-
Definition at line 45 of file dwuart.c.
45 {
51
52
56 goto err_alloc;
57 }
62
63
65 if ( ! ns16550->
base ) {
67 goto err_ioremap;
68 }
69
70
72 shift = 0;
73 ns16550->
shift = shift;
74
75
77 &clock ) ) != 0 ) {
79 }
80 ns16550->
clock = clock;
81
82
84 goto err_register;
85
86 return 0;
87
89 err_register:
91 err_ioremap:
92 uart_nullify (
uart );
94 err_alloc:
96}
struct arbelprm_rc_send_wqe rc
uint16_t offset
Offset to command line.
void * dt_ioremap(struct dt_device *dt, unsigned int offset, unsigned int index, size_t len)
Map devicetree range.
static void dt_set_drvdata(struct dt_device *dt, void *priv)
Set devicetree driver-private data.
int fdt_u32(struct fdt *fdt, unsigned int offset, const char *name, uint32_t *value)
Get 32-bit integer property.
struct fdt sysfdt
The system flattened device tree (if present)
#define ENOMEM
Not enough space.
#define ENODEV
No such device.
void iounmap(volatile const void *io_addr)
Unmap I/O address.
#define NS16550_CLK_DEFAULT
Default input clock rate (1.8432 MHz)
struct uart_operations ns16550_operations
16550 UART operations
const char * name
Device name.
unsigned int clock
Input clock frequency.
unsigned int shift
Register shift.
void * base
Register base address.
struct uart_operations * op
UART operations.
void * priv
Driver-private data.
void uart_unregister(struct uart *uart)
Unregister UART.
struct uart * alloc_uart(size_t priv_len)
Allocate UART.
int uart_register(struct uart *uart)
Register UART.
References alloc_uart(), ns16550_uart::base, ns16550_uart::clock, dt_ioremap(), dt_set_drvdata(), ENODEV, ENOMEM, fdt_u32(), iounmap(), dt_device::name, uart::name, NS16550_CLK_DEFAULT, ns16550_operations, offset, uart::op, uart::priv, rc, ns16550_uart::shift, sysfdt, uart_register(), and uart_unregister().