Message ID | 20200106141346.47008-1-marex@denx.de |
---|---|
State | Superseded |
Headers | show |
Series | [V3,1/3] watchdog: designware: Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig | expand |
On Mon, Jan 6, 2020 at 7:44 PM Marek Vasut <marex at denx.de> wrote: > > Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig and update the headers > accordingly, no functional change. The S10 enables the WDT only in > SPL, but does not enable it in U-Boot itself, hence disable it in > the config again. > > Signed-off-by: Marek Vasut <marex at denx.de> > Cc: Chin Liang See <chin.liang.see at intel.com> > Cc: Dalon Westergreen <dwesterg at gmail.com> > Cc: Dinh Nguyen <dinguyen at kernel.org> > Cc: Jagan Teki <jagan at amarulasolutions.com> > Cc: Ley Foon Tan <ley.foon.tan at intel.com> > Cc: Philipp Tomisch <philipp.tomisch at theobroma-systems.com> > Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com> > Cc: Tien Fong Chee <tien.fong.chee at intel.com> > --- > V2: Use non-DM watchdog in SPL on S10 > V3: No changes > --- > configs/socfpga_stratix10_defconfig | 1 + > configs/socfpga_vining_fpga_defconfig | 1 + > drivers/watchdog/Kconfig | 7 +++++++ > include/configs/socfpga_common.h | 4 +--- > include/configs/socfpga_stratix10_socdk.h | 7 +++++-- > scripts/config_whitelist.txt | 1 - > 6 files changed, 15 insertions(+), 6 deletions(-) > > diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig > index 0665b460de..82ffedf41a 100644 > --- a/configs/socfpga_stratix10_defconfig > +++ b/configs/socfpga_stratix10_defconfig > @@ -59,3 +59,4 @@ CONFIG_DM_USB=y > CONFIG_USB_DWC2=y > CONFIG_USB_STORAGE=y > # CONFIG_SPL_USE_TINY_PRINTF is not set > +CONFIG_DESIGNWARE_WATCHDOG=y > diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig > index 19bed6be27..0e31e4f165 100644 > --- a/configs/socfpga_vining_fpga_defconfig > +++ b/configs/socfpga_vining_fpga_defconfig > @@ -97,3 +97,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 > CONFIG_USB_GADGET_DWC2_OTG=y > CONFIG_USB_GADGET_DOWNLOAD=y > # CONFIG_SPL_WDT is not set > +CONFIG_DESIGNWARE_WATCHDOG=y > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > index 8c16d69d33..5f8a070ef5 100644 > --- a/drivers/watchdog/Kconfig > +++ b/drivers/watchdog/Kconfig > @@ -45,6 +45,13 @@ config ULP_WATCHDOG > help > Say Y here to enable i.MX7ULP watchdog driver. > > +config DESIGNWARE_WATCHDOG > + bool "Designware watchdog timer support" > + select HW_WATCHDOG > + help > + Enable this to support Designware Watchdog Timer IP, present e.g. > + on Altera SoCFPGA SoCs. > + > config WDT > bool "Enable driver model for watchdog timer drivers" > depends on DM > diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h > index 05bfef75c0..d1a14d23aa 100644 > --- a/include/configs/socfpga_common.h > +++ b/include/configs/socfpga_common.h > @@ -104,11 +104,9 @@ > /* > * L4 Watchdog > */ > -#ifdef CONFIG_HW_WATCHDOG > -#define CONFIG_DESIGNWARE_WATCHDOG > #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS > #define CONFIG_DW_WDT_CLOCK_KHZ 25000 > -#endif > +#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 We have kconfig for this, how about moving this into defconfig file? otherwise, Reviewed-by: Jagan Teki <jagan at amarulasolutions.com> Tested-by: Jagan Teki <jagan at amarulasolutions.com> # roc-rk3399-pc
On 1/8/20 12:25 PM, Jagan Teki wrote: > On Mon, Jan 6, 2020 at 7:44 PM Marek Vasut <marex at denx.de> wrote: >> >> Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig and update the headers >> accordingly, no functional change. The S10 enables the WDT only in >> SPL, but does not enable it in U-Boot itself, hence disable it in >> the config again. >> >> Signed-off-by: Marek Vasut <marex at denx.de> >> Cc: Chin Liang See <chin.liang.see at intel.com> >> Cc: Dalon Westergreen <dwesterg at gmail.com> >> Cc: Dinh Nguyen <dinguyen at kernel.org> >> Cc: Jagan Teki <jagan at amarulasolutions.com> >> Cc: Ley Foon Tan <ley.foon.tan at intel.com> >> Cc: Philipp Tomisch <philipp.tomisch at theobroma-systems.com> >> Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com> >> Cc: Tien Fong Chee <tien.fong.chee at intel.com> >> --- >> V2: Use non-DM watchdog in SPL on S10 >> V3: No changes >> --- >> configs/socfpga_stratix10_defconfig | 1 + >> configs/socfpga_vining_fpga_defconfig | 1 + >> drivers/watchdog/Kconfig | 7 +++++++ >> include/configs/socfpga_common.h | 4 +--- >> include/configs/socfpga_stratix10_socdk.h | 7 +++++-- >> scripts/config_whitelist.txt | 1 - >> 6 files changed, 15 insertions(+), 6 deletions(-) >> >> diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig >> index 0665b460de..82ffedf41a 100644 >> --- a/configs/socfpga_stratix10_defconfig >> +++ b/configs/socfpga_stratix10_defconfig >> @@ -59,3 +59,4 @@ CONFIG_DM_USB=y >> CONFIG_USB_DWC2=y >> CONFIG_USB_STORAGE=y >> # CONFIG_SPL_USE_TINY_PRINTF is not set >> +CONFIG_DESIGNWARE_WATCHDOG=y >> diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig >> index 19bed6be27..0e31e4f165 100644 >> --- a/configs/socfpga_vining_fpga_defconfig >> +++ b/configs/socfpga_vining_fpga_defconfig >> @@ -97,3 +97,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 >> CONFIG_USB_GADGET_DWC2_OTG=y >> CONFIG_USB_GADGET_DOWNLOAD=y >> # CONFIG_SPL_WDT is not set >> +CONFIG_DESIGNWARE_WATCHDOG=y >> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig >> index 8c16d69d33..5f8a070ef5 100644 >> --- a/drivers/watchdog/Kconfig >> +++ b/drivers/watchdog/Kconfig >> @@ -45,6 +45,13 @@ config ULP_WATCHDOG >> help >> Say Y here to enable i.MX7ULP watchdog driver. >> >> +config DESIGNWARE_WATCHDOG >> + bool "Designware watchdog timer support" >> + select HW_WATCHDOG >> + help >> + Enable this to support Designware Watchdog Timer IP, present e.g. >> + on Altera SoCFPGA SoCs. >> + >> config WDT >> bool "Enable driver model for watchdog timer drivers" >> depends on DM >> diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h >> index 05bfef75c0..d1a14d23aa 100644 >> --- a/include/configs/socfpga_common.h >> +++ b/include/configs/socfpga_common.h >> @@ -104,11 +104,9 @@ >> /* >> * L4 Watchdog >> */ >> -#ifdef CONFIG_HW_WATCHDOG >> -#define CONFIG_DESIGNWARE_WATCHDOG >> #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS >> #define CONFIG_DW_WDT_CLOCK_KHZ 25000 >> -#endif >> +#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 > > We have kconfig for this, how about moving this into defconfig file? > otherwise, I sent a V4, give it a try. It's also rebased on master.
diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig index 0665b460de..82ffedf41a 100644 --- a/configs/socfpga_stratix10_defconfig +++ b/configs/socfpga_stratix10_defconfig @@ -59,3 +59,4 @@ CONFIG_DM_USB=y CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y # CONFIG_SPL_USE_TINY_PRINTF is not set +CONFIG_DESIGNWARE_WATCHDOG=y diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig index 19bed6be27..0e31e4f165 100644 --- a/configs/socfpga_vining_fpga_defconfig +++ b/configs/socfpga_vining_fpga_defconfig @@ -97,3 +97,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y # CONFIG_SPL_WDT is not set +CONFIG_DESIGNWARE_WATCHDOG=y diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 8c16d69d33..5f8a070ef5 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -45,6 +45,13 @@ config ULP_WATCHDOG help Say Y here to enable i.MX7ULP watchdog driver. +config DESIGNWARE_WATCHDOG + bool "Designware watchdog timer support" + select HW_WATCHDOG + help + Enable this to support Designware Watchdog Timer IP, present e.g. + on Altera SoCFPGA SoCs. + config WDT bool "Enable driver model for watchdog timer drivers" depends on DM diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 05bfef75c0..d1a14d23aa 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -104,11 +104,9 @@ /* * L4 Watchdog */ -#ifdef CONFIG_HW_WATCHDOG -#define CONFIG_DESIGNWARE_WATCHDOG #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS #define CONFIG_DW_WDT_CLOCK_KHZ 25000 -#endif +#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* * MMC Driver diff --git a/include/configs/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h index a10cbec17f..f7a4a30f3a 100644 --- a/include/configs/socfpga_stratix10_socdk.h +++ b/include/configs/socfpga_stratix10_socdk.h @@ -152,13 +152,16 @@ unsigned int cm_get_qspi_controller_clk_hz(void); */ #ifdef CONFIG_SPL_BUILD #define CONFIG_HW_WATCHDOG -#define CONFIG_DESIGNWARE_WATCHDOG +#else +#undef CONFIG_HW_WATCHDOG +#undef CONFIG_DESIGNWARE_WATCHDOG +#endif #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS #ifndef __ASSEMBLY__ unsigned int cm_get_l4_sys_free_clk_hz(void); #define CONFIG_DW_WDT_CLOCK_KHZ (cm_get_l4_sys_free_clk_hz() / 1000) #endif -#endif +#define CONFIG_WATCHDOG_TIMEOUT_MSECS 3000 /* * SPL memory layout diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index cf1808e051..5984e579da 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -312,7 +312,6 @@ CONFIG_DEFAULT_IMMR CONFIG_DEF_HWCONFIG CONFIG_DELAY_ENVIRONMENT CONFIG_DESIGNWARE_ETH -CONFIG_DESIGNWARE_WATCHDOG CONFIG_DEVELOP CONFIG_DEVICE_TREE_LIST CONFIG_DFU_ALT
Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig and update the headers accordingly, no functional change. The S10 enables the WDT only in SPL, but does not enable it in U-Boot itself, hence disable it in the config again. Signed-off-by: Marek Vasut <marex at denx.de> Cc: Chin Liang See <chin.liang.see at intel.com> Cc: Dalon Westergreen <dwesterg at gmail.com> Cc: Dinh Nguyen <dinguyen at kernel.org> Cc: Jagan Teki <jagan at amarulasolutions.com> Cc: Ley Foon Tan <ley.foon.tan at intel.com> Cc: Philipp Tomisch <philipp.tomisch at theobroma-systems.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com> Cc: Tien Fong Chee <tien.fong.chee at intel.com> --- V2: Use non-DM watchdog in SPL on S10 V3: No changes --- configs/socfpga_stratix10_defconfig | 1 + configs/socfpga_vining_fpga_defconfig | 1 + drivers/watchdog/Kconfig | 7 +++++++ include/configs/socfpga_common.h | 4 +--- include/configs/socfpga_stratix10_socdk.h | 7 +++++-- scripts/config_whitelist.txt | 1 - 6 files changed, 15 insertions(+), 6 deletions(-)