From patchwork Sat May 18 22:50: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: 2589491 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CC154DF2E5 for ; Sat, 18 May 2013 22:50:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753384Ab3ERWuM (ORCPT ); Sat, 18 May 2013 18:50:12 -0400 Received: from mail-ea0-f181.google.com ([209.85.215.181]:41956 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753347Ab3ERWuL (ORCPT ); Sat, 18 May 2013 18:50:11 -0400 Received: by mail-ea0-f181.google.com with SMTP id a11so3093753eae.26 for ; Sat, 18 May 2013 15:50:09 -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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=zxcGBU3/MBpcm8W8QJ+zO7R7OcxC99LhfPU8ovqsukk=; b=g/x4P+nMrNzhJc7A4semW2dfmUsx2Kdwch9zENxiTELz/sYkZc1byub/a6onbPlrYE sNKv5mjHz1EjP4LtYUjAtMpDHnU9EvD7kNkAo3XNb1HN5aF1EVhZ8Xjx9MFaBYV43/5Y NIpZUFB2efTNXts1XFxIdPWPMgxXIO5fugYBzGuuwk8qgVWvD+i1od/50AHekcnqXV4U KcAmBVnWNWE+h5e5CcgWLGOqKh2JeX7xiSA8Cul9DHMNRD1zJOCbMRGkglvLhdV3nIVQ ldqEd/0i8Q5K4y61ObwrairCwDlM7NVuGr2qW30/lwN2H2G7QUtDvWy1hDJbVwEfzSsA zi6A== X-Received: by 10.15.94.78 with SMTP id ba54mr49163397eeb.36.1368917409790; Sat, 18 May 2013 15:50:09 -0700 (PDT) Received: from flatron.localnet (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPSA id y2sm4160926eeu.2.2013.05.18.15.50.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 May 2013 15:50:08 -0700 (PDT) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org, Kukjin Kim , Sylwester Nawrocki , Heiko =?ISO-8859-1?Q?St=FCbner?= , Wim Van Sebroeck , linux-watchdog@vger.kernel.org, jhbird.choi@samsung.com Subject: [PATCH v2 2/6] ARM: SAMSUNG: uncompress: Use local definitions of watchdog registers Date: Sun, 19 May 2013 00:50:05 +0200 Message-ID: <3859367.63djUfrUBu@flatron> User-Agent: KMail/4.10.3 (Linux/3.9.2-gentoo; KDE/4.10.3; x86_64; ; ) In-Reply-To: <1368916627-23139-3-git-send-email-tomasz.figa@gmail.com> References: <1368916627-23139-1-git-send-email-tomasz.figa@gmail.com> <1368916627-23139-3-git-send-email-tomasz.figa@gmail.com> MIME-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch adds local definitions of required watchdog registers and bitfields to the uncompress header, allowing to remove the dependency on plat/regs-watchdog.h header and the ugly hack to replace virtual with physical addresses. In addition, it fixes reboot on decompression failure feature, due to the mentioned ugly hack not working anymore (the macro being redefined got renamed, without fixing this code). Signed-off-by: Tomasz Figa --- Changes since v1: - Proper commit message. I have sent wrong version previously, sorry for the noise. arch/arm/plat-samsung/include/plat/uncompress.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h index 438b248..e8954b8 100644 --- a/arch/arm/plat-samsung/include/plat/uncompress.h +++ b/arch/arm/plat-samsung/include/plat/uncompress.h @@ -28,11 +28,20 @@ static void arch_detect_cpu(void); /* defines for UART registers */ #include -#include /* working in physical space... */ -#undef S3C2410_WDOGREG -#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) +#define S3C_WDOGREG(x) ((S3C_PA_WDT + (x))) + +#define S3C2410_WTCON S3C_WDOGREG(0x00) +#define S3C2410_WTDAT S3C_WDOGREG(0x04) +#define S3C2410_WTCNT S3C_WDOGREG(0x08) + +#define S3C2410_WTCON_RSTEN (1 << 0) +#define S3C2410_WTCON_ENABLE (1 << 5) + +#define S3C2410_WTCON_DIV128 (3 << 3) + +#define S3C2410_WTCON_PRESCALE(x) ((x) << 8) /* how many bytes we allow into the FIFO at a time in FIFO mode */ #define FIFO_MAX (14)