linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] at91 : coding style fixes
@ 2012-01-24 23:56 Daniel Lezcano
  2012-01-24 23:56 ` [PATCH 2/4] at91 : declare header name Daniel Lezcano
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Daniel Lezcano @ 2012-01-24 23:56 UTC (permalink / raw)
  To: linux-arm-kernel

This patch is mindless and does only fix the line length.
The purpose is to facilitate the review of the next patches.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/mach-at91/pm.h |   31 +++++++++++++++++++++----------
 1 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h
index ce9a206..92d2223 100644
--- a/arch/arm/mach-at91/pm.h
+++ b/arch/arm/mach-at91/pm.h
@@ -20,14 +20,16 @@ static inline u32 sdram_selfrefresh_enable(void)
 	return saved_lpr;
 }
 
-#define sdram_selfrefresh_disable(saved_lpr)	at91_sys_write(AT91_SDRAMC_LPR, saved_lpr)
-#define wait_for_interrupt_enable()		asm volatile ("mcr p15, 0, %0, c7, c0, 4" \
-								: : "r" (0))
+#define sdram_selfrefresh_disable(saved_lpr) \
+	at91_sys_write(AT91_SDRAMC_LPR, saved_lpr)
+
+#define wait_for_interrupt_enable() \
+	asm volatile ("mcr p15, 0, %0, c7, c0, 4" \
+		      : : "r" (0))
 
 #elif defined(CONFIG_ARCH_AT91CAP9)
 #include <mach/at91cap9_ddrsdr.h>
 
-
 static inline u32 sdram_selfrefresh_enable(void)
 {
 	u32 saved_lpr, lpr;
@@ -35,12 +37,16 @@ static inline u32 sdram_selfrefresh_enable(void)
 	saved_lpr = at91_ramc_read(0, AT91_DDRSDRC_LPR);
 
 	lpr = saved_lpr & ~AT91_DDRSDRC_LPCB;
-	at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr | AT91_DDRSDRC_LPCB_SELF_REFRESH);
+	at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr |
+			AT91_DDRSDRC_LPCB_SELF_REFRESH);
 	return saved_lpr;
 }
 
-#define sdram_selfrefresh_disable(saved_lpr)	at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr)
-#define wait_for_interrupt_enable()		cpu_do_idle()
+#define sdram_selfrefresh_disable(saved_lpr) \
+	at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr)
+
+#define wait_for_interrupt_enable() \
+	cpu_do_idle()
 
 #elif defined(CONFIG_ARCH_AT91SAM9G45)
 #include <mach/at91sam9_ddrsdr.h>
@@ -77,6 +83,7 @@ static inline u32 sdram_selfrefresh_enable(void)
 		at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr0); \
 		at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \
 	} while (0)
+
 #define wait_for_interrupt_enable()		cpu_do_idle()
 
 #else
@@ -97,11 +104,15 @@ static inline u32 sdram_selfrefresh_enable(void)
 	saved_lpr = at91_ramc_read(0, AT91_SDRAMC_LPR);
 
 	lpr = saved_lpr & ~AT91_SDRAMC_LPCB;
-	at91_ramc_write(0, AT91_SDRAMC_LPR, lpr | AT91_SDRAMC_LPCB_SELF_REFRESH);
+	at91_ramc_write(0, AT91_SDRAMC_LPR, lpr |
+			AT91_SDRAMC_LPCB_SELF_REFRESH);
 	return saved_lpr;
 }
 
-#define sdram_selfrefresh_disable(saved_lpr)	at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr)
-#define wait_for_interrupt_enable()		cpu_do_idle()
+#define sdram_selfrefresh_disable(saved_lpr) \
+	at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr)
+
+#define wait_for_interrupt_enable() \
+	cpu_do_idle()
 
 #endif
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH 0/4] at91 : cleanup pm.h
@ 2012-01-17 23:40 Daniel Lezcano
  2012-01-17 23:40 ` [PATCH 3/4] at91 : remove wait_for_interrupt definition Daniel Lezcano
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Lezcano @ 2012-01-17 23:40 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset makes some cleanup and fix the rm9200 code by replacing
the standby routine by a asm routine where we have a better control.

This patchset has been tested on a sam9263, compiled on the other
platform but not tested because I don't have the hardware. 

This is my first attempt for an asm arm routine ...

Daniel Lezcano (4):
  at91 : coding style fixes
  at91 : declare header name
  at91 : remove wait_for_interrupt definition
  at91 : implement the standby function for pm/cpuidle

 arch/arm/mach-at91/cpuidle.c |   11 +----
 arch/arm/mach-at91/pm.c      |   12 +-----
 arch/arm/mach-at91/pm.h      |   86 +++++++++++++++++++++++++++---------------
 3 files changed, 59 insertions(+), 50 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-02-27 14:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24 23:56 [PATCH 1/4] at91 : coding style fixes Daniel Lezcano
2012-01-24 23:56 ` [PATCH 2/4] at91 : declare header name Daniel Lezcano
2012-01-24 23:56 ` [PATCH 3/4] at91 : remove wait_for_interrupt definition Daniel Lezcano
2012-01-25  0:18   ` Russell King - ARM Linux
2012-01-25 14:39     ` Daniel Lezcano
2012-02-27 12:50       ` Russell King - ARM Linux
2012-02-27 13:07         ` Daniel Lezcano
2012-02-27 14:52           ` Rob Lee
2012-01-24 23:56 ` [PATCH 4/4] at91 : implement the standby function for pm/cpuidle Daniel Lezcano
2012-01-26 16:18 ` at91: pm.h cleanup (was: [PATCH 1/4] at91 : coding style fixes) Nicolas Ferre
2012-01-26 20:33   ` Russell King - ARM Linux
2012-01-26 23:34     ` Russell King - ARM Linux
2012-01-27  9:43       ` at91: pm.h cleanup Nicolas Ferre
  -- strict thread matches above, loose matches on Subject: below --
2012-01-17 23:40 [PATCH 0/4] at91 : cleanup pm.h Daniel Lezcano
2012-01-17 23:40 ` [PATCH 3/4] at91 : remove wait_for_interrupt definition Daniel Lezcano
2012-01-18 21:53   ` Ryan Mallon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).