[PATCH] arm: mvebu: sata_mv: Add bootstd hook to enable sata_bootdev

Add hook in sata_mv probe to enable bootstd bootdev.
Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet.
Signed-off-by: Tony Dinh mibodhi@gmail.com ---
drivers/ata/sata_mv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 18c7a66db1..55a5365b5a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -34,6 +34,7 @@ #include <common.h> #include <ahci.h> #include <blk.h> +#include <bootdev.h> #include <cpu_func.h> #include <dm.h> #include <log.h> @@ -1104,6 +1105,12 @@ static int sata_mv_probe(struct udevice *dev) /* TODO: undo create */ continue;
+ ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev"); + if (ret) { + printf("%s: Failed to create bootdev\n", __func__); + continue; + } + /* If we got here, the current SATA port was probed * successfully, so set the probe status to successful. */ @@ -1116,7 +1123,6 @@ static int sata_mv_probe(struct udevice *dev) static int sata_mv_scan(struct udevice *dev) { /* Nothing to do here */ - return 0; }

Hi Stefan,
In case you forgot, please review this patch!
Thanks, Tony
On Tue, Sep 5, 2023 at 10:23 PM Tony Dinh mibodhi@gmail.com wrote:
Add hook in sata_mv probe to enable bootstd bootdev.
Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet.
Signed-off-by: Tony Dinh mibodhi@gmail.com
drivers/ata/sata_mv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 18c7a66db1..55a5365b5a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -34,6 +34,7 @@ #include <common.h> #include <ahci.h> #include <blk.h> +#include <bootdev.h> #include <cpu_func.h> #include <dm.h> #include <log.h> @@ -1104,6 +1105,12 @@ static int sata_mv_probe(struct udevice *dev) /* TODO: undo create */ continue;
ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev");
if (ret) {
printf("%s: Failed to create bootdev\n", __func__);
continue;
}
/* If we got here, the current SATA port was probed * successfully, so set the probe status to successful. */
@@ -1116,7 +1123,6 @@ static int sata_mv_probe(struct udevice *dev) static int sata_mv_scan(struct udevice *dev) { /* Nothing to do here */
return 0;
}
-- 2.39.2

Hi Tony,
On Tue, 5 Sept 2023 at 23:23, Tony Dinh mibodhi@gmail.com wrote:
Add hook in sata_mv probe to enable bootstd bootdev.
Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet.
Signed-off-by: Tony Dinh mibodhi@gmail.com
drivers/ata/sata_mv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
But please see below
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 18c7a66db1..55a5365b5a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -34,6 +34,7 @@ #include <common.h> #include <ahci.h> #include <blk.h> +#include <bootdev.h> #include <cpu_func.h> #include <dm.h> #include <log.h> @@ -1104,6 +1105,12 @@ static int sata_mv_probe(struct udevice *dev) /* TODO: undo create */ continue;
ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev");
if (ret) {
printf("%s: Failed to create bootdev\n", __func__);
continue;
}
/* If we got here, the current SATA port was probed * successfully, so set the probe status to successful. */
@@ -1116,7 +1123,6 @@ static int sata_mv_probe(struct udevice *dev) static int sata_mv_scan(struct udevice *dev) { /* Nothing to do here */
You should leave this - the style is to put a newline before the final return in a function.
return 0;
}
-- 2.39.2
Regards, Simon

Hi Simon,
On Sun, Sep 24, 2023 at 1:40 PM Simon Glass sjg@chromium.org wrote:
Hi Tony,
On Tue, 5 Sept 2023 at 23:23, Tony Dinh mibodhi@gmail.com wrote:
Add hook in sata_mv probe to enable bootstd bootdev.
Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet.
Signed-off-by: Tony Dinh mibodhi@gmail.com
drivers/ata/sata_mv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
But please see below
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 18c7a66db1..55a5365b5a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -34,6 +34,7 @@ #include <common.h> #include <ahci.h> #include <blk.h> +#include <bootdev.h> #include <cpu_func.h> #include <dm.h> #include <log.h> @@ -1104,6 +1105,12 @@ static int sata_mv_probe(struct udevice *dev) /* TODO: undo create */ continue;
ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev");
if (ret) {
printf("%s: Failed to create bootdev\n", __func__);
continue;
}
/* If we got here, the current SATA port was probed * successfully, so set the probe status to successful. */
@@ -1116,7 +1123,6 @@ static int sata_mv_probe(struct udevice *dev) static int sata_mv_scan(struct udevice *dev) { /* Nothing to do here */
You should leave this - the style is to put a newline before the final return in a function.
Thanks, Tony
return 0;
}
-- 2.39.2
Regards, Simon

On 9/6/23 07:22, Tony Dinh wrote:
Add hook in sata_mv probe to enable bootstd bootdev.
Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet.
Signed-off-by: Tony Dinh mibodhi@gmail.com
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan
drivers/ata/sata_mv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 18c7a66db1..55a5365b5a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -34,6 +34,7 @@ #include <common.h> #include <ahci.h> #include <blk.h> +#include <bootdev.h> #include <cpu_func.h> #include <dm.h> #include <log.h> @@ -1104,6 +1105,12 @@ static int sata_mv_probe(struct udevice *dev) /* TODO: undo create */ continue;
ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev");
if (ret) {
printf("%s: Failed to create bootdev\n", __func__);
continue;
}
- /* If we got here, the current SATA port was probed
*/
- successfully, so set the probe status to successful.
@@ -1116,7 +1123,6 @@ static int sata_mv_probe(struct udevice *dev) static int sata_mv_scan(struct udevice *dev) { /* Nothing to do here */
- return 0; }
Viele Grüße, Stefan Roese

Thanks Stefan!
All the best, Tony
On Mon, Sep 25, 2023 at 1:14 AM Stefan Roese sr@denx.de wrote:
On 9/6/23 07:22, Tony Dinh wrote:
Add hook in sata_mv probe to enable bootstd bootdev.
Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet.
Signed-off-by: Tony Dinh mibodhi@gmail.com
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan
drivers/ata/sata_mv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 18c7a66db1..55a5365b5a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -34,6 +34,7 @@ #include <common.h> #include <ahci.h> #include <blk.h> +#include <bootdev.h> #include <cpu_func.h> #include <dm.h> #include <log.h> @@ -1104,6 +1105,12 @@ static int sata_mv_probe(struct udevice *dev) /* TODO: undo create */ continue;
ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev");
if (ret) {
printf("%s: Failed to create bootdev\n", __func__);
continue;
}
/* If we got here, the current SATA port was probed * successfully, so set the probe status to successful. */
@@ -1116,7 +1123,6 @@ static int sata_mv_probe(struct udevice *dev) static int sata_mv_scan(struct udevice *dev) { /* Nothing to do here */
}return 0;
Viele Grüße, Stefan Roese
-- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

On 9/25/23 10:14, Stefan Roese wrote:
On 9/6/23 07:22, Tony Dinh wrote:
Add hook in sata_mv probe to enable bootstd bootdev.
Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is not enabled for ahci sata yet.
Signed-off-by: Tony Dinh mibodhi@gmail.com
Reviewed-by: Stefan Roese sr@denx.de
Applied to u-boot-marvell/master
Thanks, Stefan
Thanks, Stefan
drivers/ata/sata_mv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 18c7a66db1..55a5365b5a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -34,6 +34,7 @@ #include <common.h> #include <ahci.h> #include <blk.h> +#include <bootdev.h> #include <cpu_func.h> #include <dm.h> #include <log.h> @@ -1104,6 +1105,12 @@ static int sata_mv_probe(struct udevice *dev) /* TODO: undo create */ continue; + ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev"); + if (ret) { + printf("%s: Failed to create bootdev\n", __func__); + continue; + }
/* If we got here, the current SATA port was probed * successfully, so set the probe status to successful. */ @@ -1116,7 +1123,6 @@ static int sata_mv_probe(struct udevice *dev) static int sata_mv_scan(struct udevice *dev) { /* Nothing to do here */
return 0; }
Viele Grüße, Stefan Roese
Viele Grüße, Stefan Roese
participants (3)
-
Simon Glass
-
Stefan Roese
-
Tony Dinh