diff options
author | Simon Glass <sjg@chromium.org> | 2015-01-25 15:27:05 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-30 00:09:55 (GMT) |
commit | 9cc36a2b89ebe5148d69d521745c1e1d26365c3a (patch) | |
tree | b7c92e1a8f9f9a2a87c3fd12735ff5bc3d5a502d /drivers/serial | |
parent | b367053102e597eb21b0a5e86c63e8d10f368cb0 (diff) | |
download | u-boot-9cc36a2b89ebe5148d69d521745c1e1d26365c3a.tar.xz |
dm: core: Add a flag to control sequence numbering
At present we try to use the 'reg' property and device tree aliases to give
devices a sequence number. The 'reg' property is often actually a memory
address, so the sequence numbers thus-obtained are not useful. It would be
better if the devices were just sequentially numbered in that case. In fact
neither I2C nor SPI use this feature, so drop it.
Some devices need us to look up an alias to number them within the uclass.
Add a flag to control this, so it is not done unless it is needed.
Adjust the tests to test this new behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/serial-uclass.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index d1b5777..9131a8f 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -297,6 +297,7 @@ static int serial_pre_remove(struct udevice *dev) UCLASS_DRIVER(serial) = { .id = UCLASS_SERIAL, .name = "serial", + .flags = DM_UC_FLAG_SEQ_ALIAS, .post_probe = serial_post_probe, .pre_remove = serial_pre_remove, .per_device_auto_alloc_size = sizeof(struct serial_dev_priv), |