common: board_f: Restore 85xx watchdog support
PATCH 1/1 common: board_f: Restore 85xx watchdog support
In commit 75918afa649b ("powerpc: Drop old non-generic-board code") we lost the call to init_85xx_watchdog() which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series).
---
Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably rename init_85xx_watchdog() to hw_watchdog_init() so it fits with the rest of the code.
The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it.
Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?).
So I thought I'd run this up the flag pole as-is and see what feedback I get.
common/board_f.c | 5 +++++ 1 file changed, 5 insertions(+)
common/board_f.c +5 -0
@@ -111,6 +111,11 @@ static int init_func_watchdog_init(void)hw_watchdog_init ();puts (" Watchdog enabled\n" );# endif +# ifdef CONFIG_MPC85xx +init_85xx_watchdog (); +puts (" Watchdog enabled\n" ); +# endif +WATCHDOG_RESET ();return 0 ;
Signature · 1 line
2.30.1
PATCH 1/1 common: board_f: Restore 85xx watchdog support
Hi Chris,
Quoted 32 lines · Chris Packham
In commit
75918afa649b("powerpc: Drop old non-generic-board code") we lost the call toinit_85xx_watchdog()which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series).Signed-off-by Chris Packham <[email protected]>---
Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably renameinit_85xx_watchdog()tohw_watchdog_init()so it fits with the rest of the code.The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it.
Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?).
So I thought I'd run this up the flag pole as-is and see what feedback I get.
common/board_f.c | 5 +++++ 1 file changed, 5 insertions(+)common/board_f.c +0
-0
common/board_f.c static int init_func_watchdog_init(void) · line 115
Quoted 5 lines
common/board_f.c +2
-0@@ -111,6 +111,11 @@ static int init_func_watchdog_init(void)hw_watchdog_init ();puts (" Watchdog enabled\n" );# endif +# ifdef CONFIG_MPC85xx +init_85xx_watchdog ();
That should be in a header file.
Quoted 9 lines
common/board_f.c +3
-1+puts (" Watchdog enabled\n" ); +# endif +WATCHDOG_RESET ();return 0 ; --2.30.1
I don't think you have made the existing code worse...so I suppose it is OK.
But really this should be converted to DM. I just noticed there is no watchdog uclass.
- Simon
PATCH 1/1 common: board_f: Restore 85xx watchdog support
Quoted 57 lines · Simon Glass,
Hi Chris,
Quoted 32 lines · Chris Packham
In commit
75918afa649b("powerpc: Drop old non-generic-board code") we lost the call toinit_85xx_watchdog()which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series).Signed-off-by Chris Packham <[email protected]>---
Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably renameinit_85xx_watchdog()tohw_watchdog_init()so it fits with the rest of the code.The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it.
Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?).
So I thought I'd run this up the flag pole as-is and see what feedback I get.
common/board_f.c | 5 +++++ 1 file changed, 5 insertions(+)common/board_f.c +0
-0common/board_f.c static int init_func_watchdog_init(void) · line 115
Quoted 5 lines
common/board_f.c +2
-0@@ -111,6 +111,11 @@ static int init_func_watchdog_init(void)hw_watchdog_init ();puts (" Watchdog enabled\n" );# endif +# ifdef CONFIG_MPC85xx +init_85xx_watchdog ();That should be in a header file.
Quoted 9 lines
common/board_f.c +3
-1+puts (" Watchdog enabled\n" ); +# endif +WATCHDOG_RESET ();return 0 ; --2.30.1
I don't think you have made the existing code worse...so I suppose it is OK.
Quoted 3 lines
But really this should be converted to DM. I just noticed there is no watchdog uclass.
It's called UCLASS_WDT. In the end I went with implementing a DM driver. Assuming that lands there will be some old code that can be removed. I'd still like to here from the keymile maintainers as they're the only in tree user of this.
Quoted 2 lines
- Simon
PATCH 1/1 common: board_f: Restore 85xx watchdog support
In reply to Chris PackhamQuoted 53 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Chris Packham
Sent: Wednesday, March 3, 2021 2:30 AM
To: u-boot at lists.denx.de
Cc: York Sun <[email protected]>; Rainer Boschung <[email protected]>; Chris Packham <[email protected]>; Masahiro Yamada <[email protected]>; Ovidiu Panait <[email protected]>; Patrick Delaunay <[email protected]>; Simon Glass <[email protected]>; Stefan Roese <[email protected]>; Stephen Warren <[email protected]>
Subject: [PATCH] common:board_f: Restore 85xx watchdog supportIn commit
75918afa649b("powerpc: Drop old non-generic-board code") we lost the call toinit_85xx_watchdog()which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series).Signed-off-by Chris Packham <[email protected]>---
Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably renameinit_85xx_watchdog()tohw_watchdog_init()so it fits with the rest of the code.The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it.
Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?).
So I thought I'd run this up the flag pole as-is and see what feedback I get.
common/board_f.c| 5 +++++1 file changed, 5 insertions(+)common/board_f.c index renamed from common/board_f.c +0
-0
0cddf0359dca..3778571a7196100644common/board_f.c +5
-1@@ -111,6 +111,11 @@ static int init_func_watchdog_init(void)hw_watchdog_init ();puts (" Watchdog enabled\n" );# endif +# ifdef CONFIG_MPC85xx +init_85xx_watchdog (); +puts (" Watchdog enabled\n" ); +# endif +WATCHDOG_RESET ();return 0 ; --
Quoted 1 line
2.30.1
Kindly fix below build error for non-fsl ppc boards
powerpc: w+ mpc8308_p1m sbc8349 sbc8349_PCI_33 sbc8349_PCI_66 ve8313 caddy2 vme8349 hrcon hrcon_dh strider_con strider_con_dp strider_cpu strider_cpu_dp ids8313 TQM834x sbc8548 sbc8548_PCI_33 sbc8548_PCI_33_PCIE sbc8548_PCI_66 sbc8548_PCI_66_PCIE socrates UCP1020 kmcent2 kmcoge4 Cyrus_P5020 Cyrus_P5040 xpedite520x xpedite537x xpedite550x sbc8641d xpedite517x MCR3000 + controlcenterd_36BIT_SDCARD controlcenterd_36BIT_SDCARD_DEVELOP controlcenterd_TRAILBLAZER controlcenterd_TRAILBLAZER_DEVELOP
+powerpc-linux-ld.bfd: common/built-in.o: in function `init_func_watchdog_init':
2021-03-23T11:09:10.9787128Z +common/board_f.c:115: undefined reference to `init_85xx_watchdog' 2021-03-23T11:09:10.9787600Z +make[1]: *** [u-boot] Error 1 2021-03-23T11:09:10.9787981Z +make: *** [sub-make] Error 2
Regards
Priyanka
PATCH 1/1 common: board_f: Restore 85xx watchdog support
Hi Chris,
Quoted 59 lines · Priyanka Jain
Quoted 53 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Chris Packham
Sent: Wednesday, March 3, 2021 2:30 AM
To: u-boot at lists.denx.de
Cc: York Sun <[email protected]>; Rainer Boschung <[email protected]>; Chris Packham <[email protected]>; Masahiro Yamada <[email protected]>; Ovidiu Panait <[email protected]>; Patrick Delaunay <[email protected]>; Simon Glass <[email protected]>; Stefan Roese <[email protected]>; Stephen Warren <[email protected]>
Subject: [PATCH] common:board_f: Restore 85xx watchdog supportIn commit
75918afa649b("powerpc: Drop old non-generic-board code") we lost the call toinit_85xx_watchdog()which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series).Signed-off-by Chris Packham <[email protected]>---
Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably renameinit_85xx_watchdog()tohw_watchdog_init()so it fits with the rest of the code.The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it.
Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?).
So I thought I'd run this up the flag pole as-is and see what feedback I get.
common/board_f.c| 5 +++++1 file changed, 5 insertions(+)common/board_f.c index renamed from common/board_f.c +0
-0
0cddf0359dca..3778571a7196100644common/board_f.c +5
-1@@ -111,6 +111,11 @@ static int init_func_watchdog_init(void)hw_watchdog_init ();puts (" Watchdog enabled\n" );# endif +# ifdef CONFIG_MPC85xx +init_85xx_watchdog (); +puts (" Watchdog enabled\n" ); +# endif +WATCHDOG_RESET ();return 0 ; --Quoted 1 line
2.30.1
Kindly fix below build error for non-fsl ppc boards
powerpc: w+mpc8308_p1msbc8349sbc8349_PCI_33sbc8349_PCI_66ve8313 caddy2 vme8349 hrconhrcon_dhstrider_constrider_con_dpstrider_cpustrider_cpu_dpids8313 TQM834x sbc8548sbc8548_PCI_33sbc8548_PCI_33_PCIEsbc8548_PCI_66sbc8548_PCI_66_PCIEsocrates UCP1020 kmcent2 kmcoge4Cyrus_P5020Cyrus_P5040xpedite520x xpedite537x xpedite550x sbc8641d xpedite517x MCR3000 +controlcenterd_36BIT_SDCARDcontrolcenterd_36BIT_SDCARD_DEVELOPcontrolcenterd_TRAILBLAZERcontrolcenterd_TRAILBLAZER_DEVELOP
Quoted 4 lines
+powerpc-linux-ld.bfd:
common/built-in.o: in function `init_func_watchdog_init':2021-03-23T11:09:10.9787128Z +common/board_f.c:115: undefined reference to `init_85xx_watchdog' 2021-03-23T11:09:10.9787600Z +make[1]: *** [u-boot] Error 1 2021-03-23T11:09:10.9787981Z +make: *** [sub-make] Error 2
Is this patch needed which your DM WDT driver for Booke PPCs?
Thanks,
Stefan
PATCH 1/1 common: board_f: Restore 85xx watchdog support
Quoted 63 lines · Stefan Roese
Hi Chris,
Quoted 59 lines · Priyanka Jain
Quoted 53 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Chris Packham
Sent: Wednesday, March 3, 2021 2:30 AM
To: u-boot at lists.denx.de
Cc: York Sun <[email protected]>; Rainer Boschung <[email protected]>; Chris Packham <[email protected]>; Masahiro Yamada <[email protected]>; Ovidiu Panait <[email protected]>; Patrick Delaunay <[email protected]>; Simon Glass <[email protected]>; Stefan Roese <[email protected]>; Stephen Warren <[email protected]>
Subject: [PATCH] common:board_f: Restore 85xx watchdog supportIn commit
75918afa649b("powerpc: Drop old non-generic-board code") we lost the call toinit_85xx_watchdog()which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series).Signed-off-by Chris Packham <[email protected]>---
Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably renameinit_85xx_watchdog()tohw_watchdog_init()so it fits with the rest of the code.The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it.
Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?).
So I thought I'd run this up the flag pole as-is and see what feedback I get.
common/board_f.c| 5 +++++1 file changed, 5 insertions(+)common/board_f.c index renamed from common/board_f.c +0
-0
0cddf0359dca..3778571a7196100644common/board_f.c +5
-1@@ -111,6 +111,11 @@ static int init_func_watchdog_init(void)hw_watchdog_init ();puts (" Watchdog enabled\n" );# endif +# ifdef CONFIG_MPC85xx +init_85xx_watchdog (); +puts (" Watchdog enabled\n" ); +# endif +WATCHDOG_RESET ();return 0 ; --Quoted 1 line
2.30.1
Kindly fix below build error for non-fsl ppc boards
powerpc: w+mpc8308_p1msbc8349sbc8349_PCI_33sbc8349_PCI_66ve8313 caddy2 vme8349 hrconhrcon_dhstrider_constrider_con_dpstrider_cpustrider_cpu_dpids8313 TQM834x sbc8548sbc8548_PCI_33sbc8548_PCI_33_PCIEsbc8548_PCI_66sbc8548_PCI_66_PCIEsocrates UCP1020 kmcent2 kmcoge4Cyrus_P5020Cyrus_P5040xpedite520x xpedite537x xpedite550x sbc8641d xpedite517x MCR3000 +controlcenterd_36BIT_SDCARDcontrolcenterd_36BIT_SDCARD_DEVELOPcontrolcenterd_TRAILBLAZERcontrolcenterd_TRAILBLAZER_DEVELOP
Quoted 7 lines
Quoted 4 lines
+powerpc-linux-ld.bfd:
common/built-in.o: in function `init_func_watchdog_init':2021-03-23T11:09:10.9787128Z +common/board_f.c:115: undefined reference to `init_85xx_watchdog' 2021-03-23T11:09:10.9787600Z +make[1]: *** [u-boot] Error 1 2021-03-23T11:09:10.9787981Z +make: *** [sub-make] Error 2Is this patch needed which your DM WDT driver for Booke PPCs?
The DM driver removes the need for this patch. Assuming we go with that there's a potential follow up to remove the vestiges of init_85xx_watchdog.
PATCH 1/1 common: board_f: Restore 85xx watchdog support
Quoted 69 lines · Chris Packham
Quoted 68 lines · Stefan Roese
Hi Chris,
Quoted 63 lines · Priyanka Jain
Quoted 53 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Chris Packham
Sent: Wednesday, March 3, 2021 2:30 AM
To: u-boot at lists.denx.de
Cc: York Sun <[email protected]>; Rainer Boschung <[email protected]>; Chris Packham <[email protected]>; Masahiro Yamada <[email protected]>; Ovidiu Panait <[email protected]>; Patrick Delaunay <[email protected]>; Simon Glass <[email protected]>; Stefan Roese <[email protected]>; Stephen Warren <[email protected]>
Subject: [PATCH] common:board_f: Restore 85xx watchdog supportIn commit
75918afa649b("powerpc: Drop old non-generic-board code") we lost the call toinit_85xx_watchdog()which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series).Signed-off-by Chris Packham <[email protected]>---
Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably renameinit_85xx_watchdog()tohw_watchdog_init()so it fits with the rest of the code.The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it.
Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?).
So I thought I'd run this up the flag pole as-is and see what feedback I get.
common/board_f.c| 5 +++++1 file changed, 5 insertions(+)common/board_f.c index renamed from common/board_f.c +0
-0
0cddf0359dca..3778571a7196100644common/board_f.c +5
-1@@ -111,6 +111,11 @@ static int init_func_watchdog_init(void)hw_watchdog_init ();puts (" Watchdog enabled\n" );# endif +# ifdef CONFIG_MPC85xx +init_85xx_watchdog (); +puts (" Watchdog enabled\n" ); +# endif +WATCHDOG_RESET ();return 0 ; --Quoted 1 line
2.30.1
Kindly fix below build error for non-fsl ppc boards
powerpc: w+mpc8308_p1msbc8349sbc8349_PCI_33sbc8349_PCI_66ve8313 caddy2 vme8349 hrconhrcon_dhstrider_constrider_con_dpstrider_cpustrider_cpu_dpids8313 TQM834x sbc8548sbc8548_PCI_33sbc8548_PCI_33_PCIEsbc8548_PCI_66sbc8548_PCI_66_PCIEsocrates UCP1020 kmcent2 kmcoge4Cyrus_P5020Cyrus_P5040xpedite520x xpedite537x xpedite550x sbc8641d xpedite517x MCR3000 +controlcenterd_36BIT_SDCARDcontrolcenterd_36BIT_SDCARD_DEVELOPcontrolcenterd_TRAILBLAZERcontrolcenterd_TRAILBLAZER_DEVELOP+powerpc-linux-ld.bfd:
common/built-in.o: in function `init_func_watchdog_init':2021-03-23T11:09:10.9787128Z +common/board_f.c:115: undefined reference to `init_85xx_watchdog' 2021-03-23T11:09:10.9787600Z +make[1]: *** [u-boot] Error 1 2021-03-23T11:09:10.9787981Z +make: *** [sub-make] Error 2
Quoted 5 lines
Quoted 2 lines
Is this patch needed which your DM WDT driver for Booke PPCs?
The DM driver removes the need for this patch. Assuming we go with that
Yes, I'm fine with this.
Quoted 2 lines
there's a potential follow up to remove the vestiges of
init_85xx_watchdog.
Nice.
Thanks,
Stefan