From patchwork Sat May 18 22:37:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2589441 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 516C4DF2E5 for ; Sat, 18 May 2013 22:39:38 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Udpm4-00076k-7R; Sat, 18 May 2013 22:38:50 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Udplk-0005Bc-N2; Sat, 18 May 2013 22:38:28 +0000 Received: from mail-ea0-x234.google.com ([2a00:1450:4013:c01::234]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UdplD-00057t-7K for linux-arm-kernel@lists.infradead.org; Sat, 18 May 2013 22:37:57 +0000 Received: by mail-ea0-f180.google.com with SMTP id g10so3193313eak.39 for ; Sat, 18 May 2013 15:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=vhE6GDWOGadKU3mQHjxNqXBgOdQbTyqOf3Gzs4WHLi8=; b=I/IdTyK876xZ0qzzorR6RxePnMJ7mZcHbBLcAfU6we2UpwDOGcSRCP/XeqrmujNW4G e0IsRp7mLX31sb1NzqcL2SJ8RgofVKvvO1y2wUDlGEJ3cuLMivxvytJENno4Ts7Vw9Dz Jea2+Yuduo1h3naW36DZ+LVS4wtzIVz91zKe1hDfebG7wEzesg0SaGW5A/zEu3OCAziS k4e2pFLWcZr+gXgFFxpyPYB3LojTgpGxMD5nlTb0q8UZPZDpX7RzuuVYjyVezEN1tA6Y mm8/IvY3c/5vI+vfJACLl4grMzfAkQPsrwzsJ7/YOqD6ui+9CwUF/kmfK27wEZnaFrXe gNqQ== X-Received: by 10.14.220.71 with SMTP id n47mr68921782eep.33.1368916653493; Sat, 18 May 2013 15:37:33 -0700 (PDT) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPSA id i3sm28210104eev.1.2013.05.18.15.37.31 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 May 2013 15:37:32 -0700 (PDT) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/6] ARM: SAMSUNG: Let platforms use the new watchdog reset driver Date: Sun, 19 May 2013 00:37:05 +0200 Message-Id: <1368916627-23139-5-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1368916627-23139-1-git-send-email-tomasz.figa@gmail.com> References: <1368916627-23139-1-git-send-email-tomasz.figa@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130518_183755_585585_4F12B0E9 X-CRM114-Status: GOOD ( 13.49 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomasz.figa[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Kukjin Kim , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Tomasz Figa , Wim Van Sebroeck , linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki , jhbird.choi@samsung.com, linux-watchdog@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch moves all platforms using the legacy watchdog reset helper function to the new watchdog reset driver. Signed-off-by: Tomasz Figa --- arch/arm/Kconfig | 3 +++ arch/arm/mach-s3c24xx/Kconfig | 2 ++ arch/arm/mach-s3c24xx/s3c2410.c | 3 ++- arch/arm/mach-s3c24xx/s3c244x.c | 3 ++- arch/arm/mach-s3c64xx/common.c | 8 +++++++- arch/arm/mach-s5p64x0/common.c | 4 +++- arch/arm/mach-s5pc100/common.c | 3 ++- 7 files changed, 21 insertions(+), 5 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7b7ab65..676df53 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -731,6 +731,7 @@ config ARCH_S3C64XX select SAMSUNG_CLKSRC select SAMSUNG_GPIOLIB_4BIT select SAMSUNG_IRQ_VIC_TIMER + select SAMSUNG_WDT_RESET select USB_ARCH_HAS_OHCI help Samsung S3C64XX series based systems @@ -746,6 +747,7 @@ config ARCH_S5P64X0 select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H + select SAMSUNG_WDT_RESET help Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, SMDK6450. @@ -762,6 +764,7 @@ config ARCH_S5PC100 select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H + select SAMSUNG_WDT_RESET help Samsung S5PC100 series based systems diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index f2f7088..f8d1912 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -31,6 +31,7 @@ config CPU_S3C2410 select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX select S3C2410_PM if PM select SAMSUNG_HRT + select SAMSUNG_WDT_RESET help Support for S3C2410 and S3C2410A family from the S3C24XX line of Samsung Mobile CPUs. @@ -81,6 +82,7 @@ config CPU_S3C2442 config CPU_S3C244X def_bool y depends on CPU_S3C2440 || CPU_S3C2442 + select SAMSUNG_WDT_RESET config CPU_S3C2443 bool "SAMSUNG S3C2443" diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index d850ea5..ff384ac 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c @@ -138,6 +138,7 @@ void __init s3c2410_init_clocks(int xtal) s3c2410_baseclk_add(); s3c24xx_register_clock(&s3c2410_armclk); clkdev_add_table(s3c2410_clk_lookup, ARRAY_SIZE(s3c2410_clk_lookup)); + samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG); } struct bus_type s3c2410_subsys = { @@ -201,7 +202,7 @@ void s3c2410_restart(char mode, const char *cmd) soft_restart(0); } - arch_wdt_reset(); + samsung_wdt_reset(); /* we'll take a jump through zero as a poor second */ soft_restart(0); diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index 2a35edb..d0423e2 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c @@ -133,6 +133,7 @@ void __init s3c244x_init_clocks(int xtal) s3c24xx_register_baseclocks(xtal); s3c244x_setup_clocks(); s3c2410_baseclk_add(); + samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG); } /* Since the S3C2442 and S3C2440 share items, put both subsystems here */ @@ -202,7 +203,7 @@ void s3c244x_restart(char mode, const char *cmd) if (mode == 's') soft_restart(0); - arch_wdt_reset(); + samsung_wdt_reset(); /* we'll take a jump through zero as a poor second */ soft_restart(0); diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 0b9c0ba..1aed6f4 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -183,6 +183,12 @@ core_initcall(s3c64xx_dev_init); void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) { + /* + * FIXME: there is no better place to put this at the moment + * (samsung_wdt_reset_init needs clocks) + */ + samsung_wdt_reset_init(S3C_VA_WATCHDOG); + printk(KERN_DEBUG "%s: initialising interrupts\n", __func__); /* initialise the pair of VICs */ @@ -378,7 +384,7 @@ arch_initcall(s3c64xx_init_irq_eint); void s3c64xx_restart(char mode, const char *cmd) { if (mode != 's') - arch_wdt_reset(); + samsung_wdt_reset(); /* if all else fails, or mode was for soft, jump to 0 */ soft_restart(0); diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 8ae5800..76d0053 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c @@ -173,6 +173,8 @@ void __init s5p64x0_init_io(struct map_desc *mach_desc, int size) s5p_init_cpu(S5P64X0_SYS_ID); s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); + samsung_wdt_reset_init(S3C_VA_WATCHDOG); + } void __init s5p6440_map_io(void) @@ -440,7 +442,7 @@ arch_initcall(s5p64x0_init_irq_eint); void s5p64x0_restart(char mode, const char *cmd) { if (mode != 's') - arch_wdt_reset(); + samsung_wdt_reset(); soft_restart(0); } diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c index cc6e561..5110315 100644 --- a/arch/arm/mach-s5pc100/common.c +++ b/arch/arm/mach-s5pc100/common.c @@ -178,6 +178,7 @@ void __init s5pc100_init_clocks(int xtal) s5p_register_clocks(xtal); s5pc100_register_clocks(); s5pc100_setup_clocks(); + samsung_wdt_reset_init(S3C_VA_WATCHDOG); } void __init s5pc100_init_irq(void) @@ -219,7 +220,7 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no) void s5pc100_restart(char mode, const char *cmd) { if (mode != 's') - arch_wdt_reset(); + samsung_wdt_reset(); soft_restart(0); }