public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/6] ARM: SAMSUNG: uncompress: Use local definitions of watchdog registers
Date: Sun, 19 May 2013 00:50:05 +0200	[thread overview]
Message-ID: <3859367.63djUfrUBu@flatron> (raw)
In-Reply-To: <1368916627-23139-3-git-send-email-tomasz.figa@gmail.com>

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 <tomasz.figa@gmail.com>
---
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 <plat/regs-serial.h>
-#include <plat/regs-watchdog.h>
 
 /* 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@a time in FIFO mode */
 #define FIFO_MAX	 (14)
-- 
1.8.2.1

  reply	other threads:[~2013-05-18 22:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-18 22:37 [PATCH 0/6] Samsung watchdog support clean-up Tomasz Figa
2013-05-18 22:37 ` [PATCH 1/6] watchdog: s3c2410_wdt: Use local register definitions Tomasz Figa
2013-05-18 22:37 ` [PATCH 2/6] ARM: SAMSUNG: uncompress: Use local definitions of watchdog registers Tomasz Figa
2013-05-18 22:50   ` Tomasz Figa [this message]
2013-05-18 22:37 ` [PATCH 3/6] ARM: SAMSUNG: Add watchdog reset driver Tomasz Figa
2013-05-18 22:37 ` [PATCH 4/6] ARM: SAMSUNG: Let platforms use the new " Tomasz Figa
2013-05-18 22:37 ` [PATCH 5/6] ARM: SAMSUNG: Remove legacy watchdog reset code Tomasz Figa
2013-05-18 22:37 ` [PATCH 6/6] ARM: SAMSUNG: Remove unused plat/regs-watchdog.h header Tomasz Figa
2013-06-01  8:16 ` [PATCH 0/6] Samsung watchdog support clean-up Sylwester Nawrocki
2013-06-03 12:49   ` Tomasz Figa
2013-06-04  9:37     ` Kukjin Kim
2013-06-04  9:45       ` Tomasz Figa
2013-06-10 10:00         ` Kukjin Kim
2013-06-13 19:11           ` Tomasz Figa
2013-06-13 23:22             ` Kukjin Kim
2013-06-13 23:25               ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3859367.63djUfrUBu@flatron \
    --to=tomasz.figa@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox