All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: ulp_wdog: only compile the code of DM driver when CONFIG_WDT=y
@ 2023-01-31  6:59 Ye Li
  2023-01-31  7:24 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Ye Li @ 2023-01-31  6:59 UTC (permalink / raw)
  To: sr, u-boot; +Cc: alice.guo, uboot-imx

From: Alice Guo <alice.guo@nxp.com>

DM watchdog timer driver and non-DM driver exist in ulp_wdog.c at the
same time. Add a compilation restriction that only compile the DM driver
part when CONFIG_WDT=y.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
---
 drivers/watchdog/ulp_wdog.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index e081054..8f8182d 100644
--- a/drivers/watchdog/ulp_wdog.c
+++ b/drivers/watchdog/ulp_wdog.c
@@ -164,6 +164,7 @@ void reset_cpu(void)
 	while (1);
 }
 
+#if CONFIG_IS_ENABLED(WDT)
 static int ulp_wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
 {
 	struct ulp_wdt_priv *priv = dev_get_priv(dev);
@@ -222,3 +223,4 @@ U_BOOT_DRIVER(ulp_wdt) = {
 	.probe		= ulp_wdt_probe,
 	.ops	= &ulp_wdt_ops,
 };
+#endif
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: ulp_wdog: only compile the code of DM driver when CONFIG_WDT=y
  2023-01-31  6:59 [PATCH] watchdog: ulp_wdog: only compile the code of DM driver when CONFIG_WDT=y Ye Li
@ 2023-01-31  7:24 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2023-01-31  7:24 UTC (permalink / raw)
  To: Ye Li, u-boot; +Cc: alice.guo, uboot-imx

On 1/31/23 07:59, Ye Li wrote:
> From: Alice Guo <alice.guo@nxp.com>
> 
> DM watchdog timer driver and non-DM driver exist in ulp_wdog.c at the
> same time. Add a compilation restriction that only compile the DM driver
> part when CONFIG_WDT=y.
> 
> Signed-off-by: Alice Guo <alice.guo@nxp.com>
> Reviewed-by: Ye Li <ye.li@nxp.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   drivers/watchdog/ulp_wdog.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
> index e081054..8f8182d 100644
> --- a/drivers/watchdog/ulp_wdog.c
> +++ b/drivers/watchdog/ulp_wdog.c
> @@ -164,6 +164,7 @@ void reset_cpu(void)
>   	while (1);
>   }
>   
> +#if CONFIG_IS_ENABLED(WDT)
>   static int ulp_wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
>   {
>   	struct ulp_wdt_priv *priv = dev_get_priv(dev);
> @@ -222,3 +223,4 @@ U_BOOT_DRIVER(ulp_wdt) = {
>   	.probe		= ulp_wdt_probe,
>   	.ops	= &ulp_wdt_ops,
>   };
> +#endif

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-31  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31  6:59 [PATCH] watchdog: ulp_wdog: only compile the code of DM driver when CONFIG_WDT=y Ye Li
2023-01-31  7:24 ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.