[v4,2/2] watchdog: s3c2410_wdt: use exynos_get_pmu_regmap_by_phandle() for PMU regs
Message ID | 20240208161700.268570-3-peter.griffin@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-58342-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp296818dyd; Thu, 8 Feb 2024 08:41:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXWnk1EOVCOd61u+Gyv92srrFN/Wouyw6UClI2LQmiCjEUDmInspLobTL1JqPC6PVadjfydZipcMgVN/+PE3zRVwls9Tg== X-Google-Smtp-Source: AGHT+IFvmzsNOMwJw3///p/sqYu2cKSUrILujZ/z/SqzRpGFIMqVuTNm+subWYj7Jm13caFbBLZ5 X-Received: by 2002:a17:906:4691:b0:a38:7541:36f6 with SMTP id a17-20020a170906469100b00a38754136f6mr4128606ejr.21.1707410513123; Thu, 08 Feb 2024 08:41:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707410513; cv=pass; d=google.com; s=arc-20160816; b=hmF25JJ/8m4cJwQGnny5KtjUoFv2YugCrcBpCcBy89gxO1ha58ErRZjifkSz7K4gDP GVwh7/2fuyVo1vNlil3rzNiwnqv7M5we97Wk6QtY00sFy4JZoVinSNcmzr+MAsysytFM Hay+5KfIpb3auPOHFmw1DYI8HYGVPrtN6ayWd6XDEo/AFT6EZRGOhJf0sLVLgT1xvwRp YEAD93Y7pVxveGtj+rocF3kA7pxZ1MaHbtC6licwNK5ddQNrcjFlnYd9si/rN4bDqc8g c917NJp4xnMusOjcZElMairyZvBhOfwjC32okJfJZHZl9T3jxmvVpHS96HTvKrenZi4k 2Rag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=nxb698xf8QkMydB4z0YB9c3r/9JegaMn6kB+mk5+8LA=; fh=f9NRqIru4z8vNkrgB5vAowsktwb/2+1G/zxk8Cb20Ro=; b=RDvOFyPlVdUtq/mamTvNgvDnXJ38DxcRe/0Lg4/ZbKvj0nYYDSNYD48VjEbnNt0sQ/ qTBGfLItTRUEADTXc8CQSasyp9kyDziwpoABVkQ6epp4MV4dhrS0TNOV3wgA0zwXn0ZG BG2Tca/vOC+KNgev3TyDsTZBywwixXRrs84y745GEeAqjkSDvLkOjNDOF7Me5wePU5gT WQaiEvH50GXm2OH1k1Bmu/Vpw+ykD2AsVSAuvlF/5BpDICzXyuYVOMahnuGb69hRldAr WAvrize4lLWi2vt3gbIvOJb7y4PZS4gRD3yhq7GIbvaXdK+brBGns629IRJv7pvnCB83 bqRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J7XS626l; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-58342-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58342-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCVlyg4mme/HiSRTp/i2SC74dyDCk4D8h+A5D8neBg5oKdcngxh1AvoYYRBAAPAXSKFOz0PeqirkpHCRWPYSjuWnXB9jpA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lj22-20020a170906f9d600b00a38a2c6da91si201640ejb.146.2024.02.08.08.41.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 08:41:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58342-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J7XS626l; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-58342-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58342-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E62311F298A8 for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 16:22:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6401580050; Thu, 8 Feb 2024 16:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="J7XS626l" Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 898EF7E790 for <linux-kernel@vger.kernel.org>; Thu, 8 Feb 2024 16:21:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707409290; cv=none; b=J0BXrq/Lo1WDwhWNT4npOJlYMqYbo78hgdYXUePNLq7xy0R00bAKsZTuPJTsDzXkSmgkSWsDOzgSYZI1IAroWMVp9AC7njR1jyZxGCFpRjDQTA7P3Mn6Mup/OOFvJ3XUsu/t/fXGaQznmV8VgD+hwEdVDBIJa/0t0jhdDOu2voI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707409290; c=relaxed/simple; bh=4BFXoEKq0dKkvxzn8sylQVAACo62MxLym87l7SMkOww=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bhnWEu5fwjwyuBubavP+zy9iz41ivuVPynHIP8zyWVSAg6+GSuc4wrNGjogvZpPvYraXmLFBzDmo1UMBTPoxYY2kY4g69oKlROEjzgCiNAMsA6wFcXmnepmYlNprAW6Lc5DlAOPKC+yIdbRKynEk+d0xINCBiklMXJwPFPUC++0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=J7XS626l; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-33b45e8a670so1108722f8f.3 for <linux-kernel@vger.kernel.org>; Thu, 08 Feb 2024 08:21:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707409287; x=1708014087; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nxb698xf8QkMydB4z0YB9c3r/9JegaMn6kB+mk5+8LA=; b=J7XS626lTjGcri5LhjN1kT1BMZlUZlBR1M7U5MFL5DKLmZOlsVtiS1sKRFyIMDkvkh Oa5Sms0tfWuLQ1M1q3YR/q/qHvqUE6MHApSzfOKXUMib2VGWhdTiSwBEmE+4I9LcdXEB N8V1Ev63db+q2IqOktK3Cz3fYWHhlE5cVhgVT6kKElakAQk/1PWJIYGeaNjCGxoyXvFa aPAMnUOgcJeXAeSsZI05ZgNJaoQgyKro9peSF9IVb5H6QUk+O6z1H/v6p731J9O30HnK /IWDYJ/tBGe+Q3YFPiBWf994+jDbYThl/241sH/YURQJ+S9c8lxjSGB4ZqL1QGHK5dbm NS4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707409287; x=1708014087; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nxb698xf8QkMydB4z0YB9c3r/9JegaMn6kB+mk5+8LA=; b=hL9ykl2NZUTTGaqcIeB6ahUjxX03u8Jvjv5B1EIgHz3aDUtHsikuweoW3avXC6DNPC 8M7f0k/bUqpm+u/TybuK9cy5EsWWAJuWhwBOoB8IVStRoB0fIa0eKNgxwEjXncNQ42cu p6Tv2oF2MzhZW44x56Xtsu1hgc8conJDKSOu+tWOUBN3/rk91ysbVVcHYvQd/mXHGxGM Zvs4Vj/bshvbu2IAohRAOmsagfF6HeU5X5rn6q7jUj5Tf1nY5P/6g+HmwMO6yWkHUuk3 3x83n0KuN8dUiUbDfCWrI086QgXvwAtQNyZNpmcxAsh7xov4V01onYrub+jngUuvO0hl 5PvA== X-Forwarded-Encrypted: i=1; AJvYcCVIWMEylh5uEC93oKreQIb3iWbfo9rHsmTiyeUIo4rE0i/nKg+5pK5Wg0WzORcf/3amFgFFWr7JRVpdpWVU1YycFaAZrZ4g3AKr7CLZ X-Gm-Message-State: AOJu0Yz9vnrIQDPqXszPoJnpMfuJ5MpBxpo2G9RuJj4zvElIXkBzK+Tx GSv5LLseAm5fjiBR8ZnXznJXe3AK//Tdoh+VsKBjoLxdtT7j1RSnGBlBDL6k4t4= X-Received: by 2002:adf:f70a:0:b0:33b:37fd:eafe with SMTP id r10-20020adff70a000000b0033b37fdeafemr6274601wrp.69.1707409286849; Thu, 08 Feb 2024 08:21:26 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW9QSqiihNfbdq7cJ4HSCgq7fx+xjvtIvCIXg1uNCblGGv7Zg6YsinZ5dEMJMj69hMDubW2XrTIRaH6V7oYBE1TZC8bkhHTFZ934qZoXq6oi9iOrCffZd40IW3EcRm+L5xkK57a7Ppt7kZeBlt+Zygiq57SPJdM37Woe2JsiCVeeDVsUZ1PoCHzxHB8fV14T1Y4zjvsLIZZ+dOzFTPdbMFOEqKU0pavc/Lohx+YQypK/LXXMPXfJQzDyOHL7J89SG4dkdanalvgC5BKGvCY/X5vTD1FzWtH9OKWfwkSTGyU1+bYYNm/uPKfETlFW3FDYzcaJTOrhjWXBxAQUxJreX/KIouUaKXP3vlto6kFlc85D4BApqOxAF6y8nrkPNe3Z+CkorGdR1jj67GzDFZ6Oqq+YR7zLHyiwktg8qnrYK9ImbMJEysPJ4Z73rPDIQ6OfMHQU4azQjrWrYCgXQURS3A7kCr0TOuRJAQPZa0jg+zadEv4d0Er4MQzyY840BGFmVxND9EZ7KD5p8b6G8m5mncaAIxZBGl4+h7lils0U0aYEGw9pNJ0HSkEe78rwZNhMgOiH1uZoKT5FOqrBWYXOeVIEIIX2DqWcvhpGGb8H80inclkduhb+myMYQxfQdW3d/Z94mtwlK/CuyzG22kzc2dlxNwiQalosE+9p0E= Received: from gpeter-l.lan (host-92-21-139-67.as13285.net. [92.21.139.67]) by smtp.gmail.com with ESMTPSA id v18-20020adfe4d2000000b0033aedaea1b2sm3915846wrm.30.2024.02.08.08.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 08:21:26 -0800 (PST) From: Peter Griffin <peter.griffin@linaro.org> To: arnd@arndb.de, krzysztof.kozlowski@linaro.org, linux@roeck-us.net, wim@linux-watchdog.org, alim.akhtar@samsung.com, jaewon02.kim@samsung.com, semen.protsenko@linaro.org Cc: alexey.klimov@linaro.org, kernel-team@android.com, peter.griffin@linaro.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, linux-fsd@tesla.com, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 2/2] watchdog: s3c2410_wdt: use exynos_get_pmu_regmap_by_phandle() for PMU regs Date: Thu, 8 Feb 2024 16:17:00 +0000 Message-ID: <20240208161700.268570-3-peter.griffin@linaro.org> X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog In-Reply-To: <20240208161700.268570-1-peter.griffin@linaro.org> References: <20240208161700.268570-1-peter.griffin@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790349685992289027 X-GMAIL-MSGID: 1790349685992289027 |
Series |
Add regmap support to exynos-pmu for protected PMU regs
|
|
Commit Message
Peter Griffin
Feb. 8, 2024, 4:17 p.m. UTC
Obtain the PMU regmap using the new API added to exynos-pmu driver rather than syscon_regmap_lookup_by_phandle(). As this driver no longer depends on mfd syscon remove that header and Kconfig dependency. Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Peter Griffin <peter.griffin@linaro.org> --- drivers/watchdog/Kconfig | 1 - drivers/watchdog/s3c2410_wdt.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-)
Comments
On 2/8/24 08:17, Peter Griffin wrote: > Obtain the PMU regmap using the new API added to exynos-pmu driver rather > than syscon_regmap_lookup_by_phandle(). As this driver no longer depends > on mfd syscon remove that header and Kconfig dependency. > > Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> > Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> > --- > drivers/watchdog/Kconfig | 1 - > drivers/watchdog/s3c2410_wdt.c | 8 ++++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > index 7d22051b15a2..d78fe7137799 100644 > --- a/drivers/watchdog/Kconfig > +++ b/drivers/watchdog/Kconfig > @@ -512,7 +512,6 @@ config S3C2410_WATCHDOG > tristate "S3C6410/S5Pv210/Exynos Watchdog" > depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST > select WATCHDOG_CORE > - select MFD_SYSCON if ARCH_EXYNOS > help > Watchdog timer block in the Samsung S3C64xx, S5Pv210 and Exynos > SoCs. This will reboot the system when the timer expires with > diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c > index 349d30462c8c..686cf544d0ae 100644 > --- a/drivers/watchdog/s3c2410_wdt.c > +++ b/drivers/watchdog/s3c2410_wdt.c > @@ -24,9 +24,9 @@ > #include <linux/slab.h> > #include <linux/err.h> > #include <linux/of.h> > -#include <linux/mfd/syscon.h> > #include <linux/regmap.h> > #include <linux/delay.h> > +#include <linux/soc/samsung/exynos-pmu.h> > > #define S3C2410_WTCON 0x00 > #define S3C2410_WTDAT 0x04 > @@ -699,11 +699,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev) > return ret; > > if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { > - wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node, > - "samsung,syscon-phandle"); > + wdt->pmureg = exynos_get_pmu_regmap_by_phandle(dev->of_node, > + "samsung,syscon-phandle"); > if (IS_ERR(wdt->pmureg)) > return dev_err_probe(dev, PTR_ERR(wdt->pmureg), > - "syscon regmap lookup failed.\n"); > + "PMU regmap lookup failed.\n"); > } > > wdt_irq = platform_get_irq(pdev, 0);
On Thu, 8 Feb 2024 at 16:21, Peter Griffin <peter.griffin@linaro.org> wrote: > > Obtain the PMU regmap using the new API added to exynos-pmu driver rather > than syscon_regmap_lookup_by_phandle(). As this driver no longer depends > on mfd syscon remove that header and Kconfig dependency. > > Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> > Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> Tested on odroid xu3 (exynos5422). Watchdog works as expected and can reset the system. > --- > drivers/watchdog/Kconfig | 1 - > drivers/watchdog/s3c2410_wdt.c | 8 ++++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > index 7d22051b15a2..d78fe7137799 100644 > --- a/drivers/watchdog/Kconfig > +++ b/drivers/watchdog/Kconfig > @@ -512,7 +512,6 @@ config S3C2410_WATCHDOG > tristate "S3C6410/S5Pv210/Exynos Watchdog" > depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST > select WATCHDOG_CORE > - select MFD_SYSCON if ARCH_EXYNOS > help > Watchdog timer block in the Samsung S3C64xx, S5Pv210 and Exynos > SoCs. This will reboot the system when the timer expires with > diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c > index 349d30462c8c..686cf544d0ae 100644 > --- a/drivers/watchdog/s3c2410_wdt.c > +++ b/drivers/watchdog/s3c2410_wdt.c > @@ -24,9 +24,9 @@ > #include <linux/slab.h> > #include <linux/err.h> > #include <linux/of.h> > -#include <linux/mfd/syscon.h> > #include <linux/regmap.h> > #include <linux/delay.h> > +#include <linux/soc/samsung/exynos-pmu.h> > > #define S3C2410_WTCON 0x00 > #define S3C2410_WTDAT 0x04 > @@ -699,11 +699,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev) > return ret; > > if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { > - wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node, > - "samsung,syscon-phandle"); > + wdt->pmureg = exynos_get_pmu_regmap_by_phandle(dev->of_node, > + "samsung,syscon-phandle"); > if (IS_ERR(wdt->pmureg)) > return dev_err_probe(dev, PTR_ERR(wdt->pmureg), > - "syscon regmap lookup failed.\n"); > + "PMU regmap lookup failed.\n"); > } > > wdt_irq = platform_get_irq(pdev, 0); > -- > 2.43.0.594.gd9cf4e227d-goog >
On Thu, Feb 8, 2024 at 10:21 AM Peter Griffin <peter.griffin@linaroorg> wrote: > > Obtain the PMU regmap using the new API added to exynos-pmu driver rather > than syscon_regmap_lookup_by_phandle(). As this driver no longer depends > on mfd syscon remove that header and Kconfig dependency. > > Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> > Signed-off-by: Peter Griffin <peter.griffin@linaro.org> > --- Tested-by: Sam Protsenko <semen.protsenko@linaro.org> Tested on my E850-96 board (Exynos850 chip) with Debian rootfs. Test procedure: 1. Added this to /chosen node in dts: bootargs = "s3c2410_wdt.tmr_atboot=1 s3c2410_wdt.nowayout=1 s3c2410_wdt.soft_noboot=0"; 2. Check if watchdogs are active: # dmesg | grep watchdog [ 1.488149] s3c2410-wdt 10050000.watchdog: starting watchdog timer [ 1.489003] s3c2410-wdt 10050000.watchdog: watchdog active, reset enabled, irq disabled [ 1.496928] s3c2410-wdt 10060000.watchdog: starting watchdog timer [ 1.502984] s3c2410-wdt 10060000.watchdog: watchdog active, reset enabled, irq disabled 3. Generate a panic to cause wdt reset: # echo c > /proc/sysrq-trigger In 15 seconds (wdt timeout) reboot happens, and bootloader shows this message for the reboot reason: Watchdog or Warm Reset Detected That proves regmap works fine with this patch. Otherwise reboot wouldn't happen. > drivers/watchdog/Kconfig | 1 - > drivers/watchdog/s3c2410_wdt.c | 8 ++++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > index 7d22051b15a2..d78fe7137799 100644 > --- a/drivers/watchdog/Kconfig > +++ b/drivers/watchdog/Kconfig > @@ -512,7 +512,6 @@ config S3C2410_WATCHDOG > tristate "S3C6410/S5Pv210/Exynos Watchdog" > depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST > select WATCHDOG_CORE > - select MFD_SYSCON if ARCH_EXYNOS > help > Watchdog timer block in the Samsung S3C64xx, S5Pv210 and Exynos > SoCs. This will reboot the system when the timer expires with > diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c > index 349d30462c8c..686cf544d0ae 100644 > --- a/drivers/watchdog/s3c2410_wdt.c > +++ b/drivers/watchdog/s3c2410_wdt.c > @@ -24,9 +24,9 @@ > #include <linux/slab.h> > #include <linux/err.h> > #include <linux/of.h> > -#include <linux/mfd/syscon.h> > #include <linux/regmap.h> > #include <linux/delay.h> > +#include <linux/soc/samsung/exynos-pmu.h> > > #define S3C2410_WTCON 0x00 > #define S3C2410_WTDAT 0x04 > @@ -699,11 +699,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev) > return ret; > > if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { > - wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node, > - "samsung,syscon-phandle"); > + wdt->pmureg = exynos_get_pmu_regmap_by_phandle(dev->of_node, > + "samsung,syscon-phandle"); > if (IS_ERR(wdt->pmureg)) > return dev_err_probe(dev, PTR_ERR(wdt->pmureg), > - "syscon regmap lookup failed\n"); > + "PMU regmap lookup failed.\n"); > } > > wdt_irq = platform_get_irq(pdev, 0); > -- > 2.43.0.594.gd9cf4e227d-goog >
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 7d22051b15a2..d78fe7137799 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -512,7 +512,6 @@ config S3C2410_WATCHDOG tristate "S3C6410/S5Pv210/Exynos Watchdog" depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST select WATCHDOG_CORE - select MFD_SYSCON if ARCH_EXYNOS help Watchdog timer block in the Samsung S3C64xx, S5Pv210 and Exynos SoCs. This will reboot the system when the timer expires with diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 349d30462c8c..686cf544d0ae 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -24,9 +24,9 @@ #include <linux/slab.h> #include <linux/err.h> #include <linux/of.h> -#include <linux/mfd/syscon.h> #include <linux/regmap.h> #include <linux/delay.h> +#include <linux/soc/samsung/exynos-pmu.h> #define S3C2410_WTCON 0x00 #define S3C2410_WTDAT 0x04 @@ -699,11 +699,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev) return ret; if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { - wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node, - "samsung,syscon-phandle"); + wdt->pmureg = exynos_get_pmu_regmap_by_phandle(dev->of_node, + "samsung,syscon-phandle"); if (IS_ERR(wdt->pmureg)) return dev_err_probe(dev, PTR_ERR(wdt->pmureg), - "syscon regmap lookup failed.\n"); + "PMU regmap lookup failed.\n"); } wdt_irq = platform_get_irq(pdev, 0);