mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
This commit is contained in:
commit
a8b972bfa8
3 changed files with 24 additions and 4 deletions
|
@ -23,4 +23,13 @@ config MACH_PH1_SLD8
|
|||
|
||||
endchoice
|
||||
|
||||
config CMD_PINMON
|
||||
bool "Enable boot mode pins monitor command"
|
||||
depends on !SPL_BUILD
|
||||
default y
|
||||
help
|
||||
The command "pinmon" shows the state of the boot mode pins.
|
||||
The boot mode pins are latched when the system reset is deasserted
|
||||
and determine which device the system should load a boot image from.
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -12,7 +12,7 @@ obj-y += dram_init.o
|
|||
obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o
|
||||
obj-$(CONFIG_BOARD_LATE_INIT) += board_late_init.o
|
||||
obj-$(CONFIG_UNIPHIER_SMP) += smp.o
|
||||
obj-$(if $(CONFIG_SPL_BUILD),,y) += cmd_pinmon.o
|
||||
obj-$(CONFIG_CMD_PINMON) += cmd_pinmon.o
|
||||
|
||||
obj-y += board_common.o
|
||||
obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += support_card.o
|
||||
|
|
|
@ -55,7 +55,7 @@ struct uniphier_serial_private_data {
|
|||
#define uniphier_serial_port(dev) \
|
||||
((struct uniphier_serial_private_data *)dev_get_priv(dev))->membase
|
||||
|
||||
int uniphier_serial_setbrg(struct udevice *dev, int baudrate)
|
||||
static int uniphier_serial_setbrg(struct udevice *dev, int baudrate)
|
||||
{
|
||||
struct uniphier_serial_platform_data *plat = dev_get_platdata(dev);
|
||||
struct uniphier_serial __iomem *port = uniphier_serial_port(dev);
|
||||
|
@ -93,7 +93,17 @@ static int uniphier_serial_putc(struct udevice *dev, const char c)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int uniphier_serial_probe(struct udevice *dev)
|
||||
static int uniphier_serial_pending(struct udevice *dev, bool input)
|
||||
{
|
||||
struct uniphier_serial __iomem *port = uniphier_serial_port(dev);
|
||||
|
||||
if (input)
|
||||
return readb(&port->lsr) & UART_LSR_DR;
|
||||
else
|
||||
return !(readb(&port->lsr) & UART_LSR_THRE);
|
||||
}
|
||||
|
||||
static int uniphier_serial_probe(struct udevice *dev)
|
||||
{
|
||||
struct uniphier_serial_private_data *priv = dev_get_priv(dev);
|
||||
struct uniphier_serial_platform_data *plat = dev_get_platdata(dev);
|
||||
|
@ -106,7 +116,7 @@ int uniphier_serial_probe(struct udevice *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int uniphier_serial_remove(struct udevice *dev)
|
||||
static int uniphier_serial_remove(struct udevice *dev)
|
||||
{
|
||||
unmap_sysmem(uniphier_serial_port(dev));
|
||||
|
||||
|
@ -134,6 +144,7 @@ static const struct dm_serial_ops uniphier_serial_ops = {
|
|||
.setbrg = uniphier_serial_setbrg,
|
||||
.getc = uniphier_serial_getc,
|
||||
.putc = uniphier_serial_putc,
|
||||
.pending = uniphier_serial_pending,
|
||||
};
|
||||
|
||||
U_BOOT_DRIVER(uniphier_serial) = {
|
||||
|
|
Loading…
Reference in a new issue