[U-Boot] [PATCH 7/8] dm: core: declare pre-reloc drivers with U_BOOT_DRIVER_F

Masahiro Yamada yamada.m at jp.panasonic.com
Mon Nov 17 09:19:44 CET 2014


Replace U_BOOT_DRIVER with U_BOOT_DRIVER_F where the DM_FLAG_PRE_RELOC
flag is set.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---

 drivers/serial/sandbox.c         | 3 +--
 drivers/serial/serial_mxc.c      | 3 +--
 drivers/serial/serial_omap.c     | 3 +--
 drivers/serial/serial_pl01x.c    | 3 +--
 drivers/serial/serial_s5p.c      | 3 +--
 drivers/serial/serial_uniphier.c | 3 +--
 include/dm/device.h              | 3 ---
 test/dm/test-driver.c            | 3 +--
 8 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index cd2f91e..b7e9f4e 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -176,7 +176,7 @@ static const struct udevice_id sandbox_serial_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(serial_sandbox) = {
+U_BOOT_DRIVER_F(serial_sandbox) = {
 	.name	= "serial_sandbox",
 	.id	= UCLASS_SERIAL,
 	.of_match = sandbox_serial_ids,
@@ -186,7 +186,6 @@ U_BOOT_DRIVER(serial_sandbox) = {
 	.probe = sandbox_serial_probe,
 	.remove = sandbox_serial_remove,
 	.ops	= &sandbox_serial_ops,
-	.flags = DM_FLAG_PRE_RELOC,
 };
 
 static const struct sandbox_serial_platdata platdata_non_fdt = {
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index d6cf1d8..e93d3e2 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -334,11 +334,10 @@ static const struct dm_serial_ops mxc_serial_ops = {
 	.setbrg = mxc_serial_setbrg,
 };
 
-U_BOOT_DRIVER(serial_mxc) = {
+U_BOOT_DRIVER_F(serial_mxc) = {
 	.name	= "serial_mxc",
 	.id	= UCLASS_SERIAL,
 	.probe = mxc_serial_probe,
 	.ops	= &mxc_serial_ops,
-	.flags = DM_FLAG_PRE_RELOC,
 };
 #endif
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index 265fe00..0dffba3 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -34,7 +34,7 @@ static int omap_serial_ofdata_to_platdata(struct udevice *dev)
 }
 #endif
 
-U_BOOT_DRIVER(serial_omap_ns16550) = {
+U_BOOT_DRIVER_F(serial_omap_ns16550) = {
 	.name	= "serial_omap",
 	.id	= UCLASS_SERIAL,
 	.of_match = of_match_ptr(omap_serial_ids),
@@ -43,5 +43,4 @@ U_BOOT_DRIVER(serial_omap_ns16550) = {
 	.priv_auto_alloc_size = sizeof(struct NS16550),
 	.probe = ns16550_serial_probe,
 	.ops	= &ns16550_serial_ops,
-	.flags	= DM_FLAG_PRE_RELOC,
 };
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 38dda91..53eab9a 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -338,12 +338,11 @@ static const struct dm_serial_ops pl01x_serial_ops = {
 	.setbrg = pl01x_serial_setbrg,
 };
 
-U_BOOT_DRIVER(serial_pl01x) = {
+U_BOOT_DRIVER_F(serial_pl01x) = {
 	.name	= "serial_pl01x",
 	.id	= UCLASS_SERIAL,
 	.probe = pl01x_serial_probe,
 	.ops	= &pl01x_serial_ops,
-	.flags = DM_FLAG_PRE_RELOC,
 };
 
 #endif
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 8469afd..abab286 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -178,7 +178,7 @@ static const struct udevice_id s5p_serial_ids[] = {
 	{ }
 };
 
-U_BOOT_DRIVER(serial_s5p) = {
+U_BOOT_DRIVER_F(serial_s5p) = {
 	.name	= "serial_s5p",
 	.id	= UCLASS_SERIAL,
 	.of_match = s5p_serial_ids,
@@ -186,5 +186,4 @@ U_BOOT_DRIVER(serial_s5p) = {
 	.platdata_auto_alloc_size = sizeof(struct s5p_serial_platdata),
 	.probe = s5p_serial_probe,
 	.ops	= &s5p_serial_ops,
-	.flags = DM_FLAG_PRE_RELOC,
 };
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c
index 6046efb..6fe68c7 100644
--- a/drivers/serial/serial_uniphier.c
+++ b/drivers/serial/serial_uniphier.c
@@ -136,7 +136,7 @@ static const struct dm_serial_ops uniphier_serial_ops = {
 	.pending = uniphier_serial_pending,
 };
 
-U_BOOT_DRIVER(uniphier_serial) = {
+U_BOOT_DRIVER_F(uniphier_serial) = {
 	.name = DRIVER_NAME,
 	.id = UCLASS_SERIAL,
 	.of_match = of_match_ptr(uniphier_uart_of_match),
@@ -147,5 +147,4 @@ U_BOOT_DRIVER(uniphier_serial) = {
 	.platdata_auto_alloc_size =
 				sizeof(struct uniphier_serial_platform_data),
 	.ops = &uniphier_serial_ops,
-	.flags = DM_FLAG_PRE_RELOC,
 };
diff --git a/include/dm/device.h b/include/dm/device.h
index a2fd7b6..ed14af9 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -23,9 +23,6 @@ struct driver_info;
 /* DM is responsible for allocating and freeing platdata */
 #define DM_FLAG_ALLOC_PDATA	(1 << 1)
 
-/* DM should init this device prior to relocation */
-#define DM_FLAG_PRE_RELOC	(1 << 2)
-
 /**
  * struct udevice - An instance of a driver
  *
diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c
index bc6a6e7..065bcbf 100644
--- a/test/dm/test-driver.c
+++ b/test/dm/test-driver.c
@@ -145,7 +145,7 @@ U_BOOT_DRIVER(test_manual_drv) = {
 	.unbind	= test_manual_unbind,
 };
 
-U_BOOT_DRIVER(test_pre_reloc_drv) = {
+U_BOOT_DRIVER_F(test_pre_reloc_drv) = {
 	.name	= "test_pre_reloc_drv",
 	.id	= UCLASS_TEST,
 	.ops	= &test_manual_ops,
@@ -153,5 +153,4 @@ U_BOOT_DRIVER(test_pre_reloc_drv) = {
 	.probe	= test_manual_probe,
 	.remove	= test_manual_remove,
 	.unbind	= test_manual_unbind,
-	.flags	= DM_FLAG_PRE_RELOC,
 };
-- 
1.9.1



More information about the U-Boot mailing list