diff options
author | Tom Rini <trini@konsulko.com> | 2017-04-13 17:31:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-13 17:31:06 -0400 |
commit | b7b24a7a3cd74bb165d28a2959ed9143e3648fbf (patch) | |
tree | 062fd13092cee10dc8746a1339ecea18f08d21d6 /drivers/serial | |
parent | 1622559066d890f1b7622be0ede8a5d64de66ef3 (diff) | |
parent | 22e10be456014400788f80d45fc5f5c0b9d4a81d (diff) | |
download | u-boot-b7b24a7a3cd74bb165d28a2959ed9143e3648fbf.tar.gz u-boot-b7b24a7a3cd74bb165d28a2959ed9143e3648fbf.tar.xz u-boot-b7b24a7a3cd74bb165d28a2959ed9143e3648fbf.zip |
Merge git://git.denx.de/u-boot-dm
Here with some DM changes as well as the long-standing AT91 DM/DT
conversion patches which I have picked up via dm.
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/ns16550.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 1f819d487b..4f86780cb1 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -452,8 +452,7 @@ const struct dm_serial_ops ns16550_serial_ops = { .setbrg = ns16550_serial_setbrg, }; -#if !CONFIG_IS_ENABLED(OF_PLATDATA) -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) /* * Please consider existing compatible strings before adding a new * one to keep this table compact. Or you may add a generic "ns16550" @@ -473,13 +472,16 @@ static const struct udevice_id ns16550_serial_ids[] = { { .compatible = "ti,dra742-uart", .data = PORT_NS16550 }, {} }; -#endif +#endif /* OF_CONTROL && !OF_PLATDATA */ #if CONFIG_IS_ENABLED(SERIAL_PRESENT) + +/* TODO(sjg@chromium.org): Integrate this into a macro like CONFIG_IS_ENABLED */ +#if !defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_DM_SERIAL) U_BOOT_DRIVER(ns16550_serial) = { .name = "ns16550_serial", .id = UCLASS_SERIAL, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = ns16550_serial_ids, .ofdata_to_platdata = ns16550_serial_ofdata_to_platdata, .platdata_auto_alloc_size = sizeof(struct ns16550_platdata), @@ -490,5 +492,6 @@ U_BOOT_DRIVER(ns16550_serial) = { .flags = DM_FLAG_PRE_RELOC, }; #endif -#endif /* !OF_PLATDATA */ +#endif /* SERIAL_PRESENT */ + #endif /* CONFIG_DM_SERIAL */ |