diff options
author | Alexander Graf <agraf@suse.de> | 2018-01-25 12:05:55 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-28 12:27:36 -0500 |
commit | 6001985f92e4a99504343485bfe2c18940a41011 (patch) | |
tree | 49cd40e00fef73d73f5b4544336f098f74aa4ad6 /drivers/serial/serial_pl01x_internal.h | |
parent | 958d55f26ce4cde87a0f7cc5d5379b193a90d816 (diff) |
bcm2835_pl011_serial: Add BCM2835 specific serial driver
On bcm2835 we need to ensure we only access serial devices that are
muxed to the serial output pins of the pin header. To achieve this
for the pl011 device, add a bcm2835 specific pl011 wrapper device
that does this check but otherwise behaves like a pl011 device.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'drivers/serial/serial_pl01x_internal.h')
-rw-r--r-- | drivers/serial/serial_pl01x_internal.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/serial/serial_pl01x_internal.h b/drivers/serial/serial_pl01x_internal.h index 288a4f19f56..c56dd54c7b8 100644 --- a/drivers/serial/serial_pl01x_internal.h +++ b/drivers/serial/serial_pl01x_internal.h @@ -38,7 +38,20 @@ struct pl01x_regs { u32 pl011_lcrh; /* 0x2C Line control register */ u32 pl011_cr; /* 0x30 Control register */ }; -#endif + +#ifdef CONFIG_DM_SERIAL + +int pl01x_serial_ofdata_to_platdata(struct udevice *dev); +int pl01x_serial_probe(struct udevice *dev); +extern const struct dm_serial_ops pl01x_serial_ops; + +struct pl01x_priv { + struct pl01x_regs *regs; + enum pl01x_type type; +}; + +#endif /* CONFIG_DM_SERIAL */ +#endif /* !__ASSEMBLY__ */ #define UART_PL01x_RSR_OE 0x08 #define UART_PL01x_RSR_BE 0x04 |