From patchwork Mon Jul 6 21:14:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 34328 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n66LK38r016997 for ; Mon, 6 Jul 2009 21:20:03 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n66LIdad016070; Mon, 6 Jul 2009 16:18:44 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n66LIddt013614; Mon, 6 Jul 2009 16:18:39 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 1B40D80641; Mon, 6 Jul 2009 16:18:08 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 76C52807C3 for ; Mon, 6 Jul 2009 16:17:34 -0500 (CDT) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id n66LHY1H014370 for ; Mon, 6 Jul 2009 16:17:34 -0500 (CDT) Received: from mail192-va3-R.bigfish.com (mail-va3.bigfish.com [216.32.180.114]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id n66LHSAw022728 for ; Mon, 6 Jul 2009 16:17:33 -0500 Received: from mail192-va3 (localhost.localdomain [127.0.0.1]) by mail192-va3-R.bigfish.com (Postfix) with ESMTP id 725C91468156 for ; Mon, 6 Jul 2009 21:17:28 +0000 (UTC) X-SpamScore: 0 X-BigFish: vps0(zzzz1202hzzz2dh62h) X-Spam-TCS-SCL: 1:0 X-FB-SS: 5, X-MS-Exchange-Organization-Antispam-Report: OrigIP: 209.85.216.201; Service: EHS Received: by mail192-va3 (MessageSwitch) id 1246915044785085_11014; Mon, 6 Jul 2009 21:17:24 +0000 (UCT) Received: from mail-px0-f201.google.com (mail-px0-f201.google.com [209.85.216.201]) by mail192-va3.bigfish.com (Postfix) with ESMTP id 86C6B14C0082 for ; Mon, 6 Jul 2009 21:17:00 +0000 (UTC) Received: by mail-px0-f201.google.com with SMTP id 39so1158123pxi.4 for ; Mon, 06 Jul 2009 14:17:00 -0700 (PDT) Received: by 10.114.15.9 with SMTP id 9mr8144836wao.146.1246915020339; Mon, 06 Jul 2009 14:17:00 -0700 (PDT) Received: from localhost ([216.254.16.51]) by mx.google.com with ESMTPS id v39sm11950802wah.27.2009.07.06.14.16.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 06 Jul 2009 14:16:59 -0700 (PDT) From: Kevin Hilman To: linux-arm-kernel@lists.arm.linux.org.uk Date: Mon, 6 Jul 2009 14:14:46 -0700 Message-Id: <1246914900-9034-13-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1246914900-9034-12-git-send-email-khilman@deeprootsystems.com> References: <1246914900-9034-1-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-2-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-3-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-4-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-5-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-6-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-7-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-8-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-9-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-10-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-11-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-12-git-send-email-khilman@deeprootsystems.com> Cc: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 12/26] davinci: remove watchdog from soc_info X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com watchdog info is not needed in soc_info, platform_device can be used directly in core code. Signed-off-by: Kevin Hilman --- arch/arm/mach-davinci/devices.c | 7 ++----- arch/arm/mach-davinci/dm355.c | 1 - arch/arm/mach-davinci/dm644x.c | 1 - arch/arm/mach-davinci/dm646x.c | 1 - arch/arm/mach-davinci/include/mach/common.h | 1 - arch/arm/mach-davinci/time.c | 6 +++--- 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 7a2f8ae..385e833 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c @@ -216,6 +216,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config) static struct resource wdt_resources[] = { { + .start = DAVINCI_WDOG_BASE, + .end = DAVINCI_WDOG_BASE + SZ_1K - 1, .flags = IORESOURCE_MEM, }, }; @@ -229,11 +231,6 @@ struct platform_device davinci_wdt_device = { static void davinci_init_wdt(void) { - struct davinci_soc_info *soc_info = &davinci_soc_info; - - wdt_resources[0].start = (resource_size_t)soc_info->wdt_base; - wdt_resources[0].end = (resource_size_t)soc_info->wdt_base + SZ_1K - 1; - platform_device_register(&davinci_wdt_device); } diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 9baeed3..f0b10b4 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -723,7 +723,6 @@ static struct davinci_soc_info davinci_soc_info_dm355 = { .intc_irq_prios = dm355_default_priorities, .intc_irq_num = DAVINCI_N_AINTC_IRQ, .timer_info = &dm355_timer_info, - .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE), .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE), .gpio_num = 104, .gpio_irq = IRQ_DM355_GPIOBNK0, diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 1b3aec8..dd58f08 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c @@ -656,7 +656,6 @@ static struct davinci_soc_info davinci_soc_info_dm644x = { .intc_irq_prios = dm644x_default_priorities, .intc_irq_num = DAVINCI_N_AINTC_IRQ, .timer_info = &dm644x_timer_info, - .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE), .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE), .gpio_num = 71, .gpio_irq = IRQ_GPIOBNK0, diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index e4d7d0f..64a291f 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c @@ -687,7 +687,6 @@ static struct davinci_soc_info davinci_soc_info_dm646x = { .intc_irq_prios = dm646x_default_priorities, .intc_irq_num = DAVINCI_N_AINTC_IRQ, .timer_info = &dm646x_timer_info, - .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE), .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE), .gpio_num = 43, /* Only 33 usable */ .gpio_irq = IRQ_DM646X_GPIOBNK0, diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index a1f03b6..b21393b 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h @@ -60,7 +60,6 @@ struct davinci_soc_info { u8 *intc_irq_prios; unsigned long intc_irq_num; struct davinci_timer_info *timer_info; - void __iomem *wdt_base; void __iomem *gpio_base; unsigned gpio_num; unsigned gpio_irq; diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index ca85d18..0d1b6d4 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c @@ -406,11 +406,11 @@ struct sys_timer davinci_timer = { void davinci_watchdog_reset(void) { u32 tgcr, wdtcr; - struct davinci_soc_info *soc_info = &davinci_soc_info; - void __iomem *base = soc_info->wdt_base; + struct platform_device *pdev = &davinci_wdt_device; + void __iomem *base = IO_ADDRESS(pdev->resource[0].start); struct clk *wd_clk; - wd_clk = clk_get(&davinci_wdt_device.dev, NULL); + wd_clk = clk_get(&pdev->dev, NULL); if (WARN_ON(IS_ERR(wd_clk))) return; clk_enable(wd_clk);