linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] pxa/zeus: Fixes for 2.6.33
@ 2009-12-26 20:25 Marc Zyngier
  2009-12-26 20:25 ` [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress Marc Zyngier
  0 siblings, 1 reply; 9+ messages in thread
From: Marc Zyngier @ 2009-12-26 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

This serie of patches fixes a few problems with the Arcom Zeus.

[PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress
[PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static
[PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports
[PATCH 4/4] pxa/zeus: provide power-source information when APM is enabled

I'd appreciate if they could make it for 2.6.33.

Thanks,

        M.

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

* [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress
  2009-12-26 20:25 [PATCH 0/4] pxa/zeus: Fixes for 2.6.33 Marc Zyngier
@ 2009-12-26 20:25 ` Marc Zyngier
  2009-12-26 20:25   ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Marc Zyngier
  2009-12-28 13:35   ` [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress Eric Miao
  0 siblings, 2 replies; 9+ messages in thread
From: Marc Zyngier @ 2009-12-26 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

Zeus console port is wired to a 8250-compatible device
(pxa UARTs are reserved to other uses). This patch
allows such a configuration in the uncompress sequence.

It has been regression-tested on a Viper using FFUART.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
---
 arch/arm/mach-pxa/include/mach/uncompress.h |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 237734b..dc94a34 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -13,17 +13,21 @@
 #include <mach/regs-uart.h>
 #include <asm/mach-types.h>
 
-#define __REG(x)       ((volatile unsigned long *)x)
+#define __REG(x)       ((volatile char *)x)
 
-static volatile unsigned long *UART = FFUART;
+static volatile char *UART = FFUART;
+static int shift = 2;
+static int is_pxa_uart = 1;
+
+#define UART_REG(x)	UART[(x) << shift]
 
 static inline void putc(char c)
 {
-	if (!(UART[UART_IER] & IER_UUE))
+	if (is_pxa_uart && !(UART_REG(UART_IER) & IER_UUE))
 		return;
-	while (!(UART[UART_LSR] & LSR_TDRQ))
+	while (!(UART_REG(UART_LSR) & LSR_TDRQ))
 		barrier();
-	UART[UART_TX] = c;
+	UART_REG(UART_TX) = c;
 }
 
 /*
@@ -39,6 +43,12 @@ static inline void arch_decomp_setup(void)
 	    || machine_is_csb726() || machine_is_stargate2()
 	    || machine_is_cm_x300() || machine_is_balloon3())
 		UART = STUART;
+
+	if (machine_is_arcom_zeus()) {
+		UART = __REG(0x10000000);
+		is_pxa_uart = 0;
+		shift = 1;
+	}
 }
 
 /*
-- 
1.6.5.7

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

* [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static
  2009-12-26 20:25 ` [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress Marc Zyngier
@ 2009-12-26 20:25   ` Marc Zyngier
  2009-12-26 20:25     ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Marc Zyngier
  2009-12-28 13:33     ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Eric Miao
  2009-12-28 13:35   ` [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress Eric Miao
  1 sibling, 2 replies; 9+ messages in thread
From: Marc Zyngier @ 2009-12-26 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marc Zyngier <maz@misterjones.org>
---
 arch/arm/mach-pxa/zeus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 5b986a8..865df5d 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -626,8 +626,8 @@ static void zeus_power_off(void)
 	pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
 }
 
-int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio,
-		      unsigned ngpio, void *context)
+static int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio,
+			     unsigned ngpio, void *context)
 {
 	int i;
 	u8 pcb_info = 0;
-- 
1.6.5.7

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

* [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports
  2009-12-26 20:25   ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Marc Zyngier
@ 2009-12-26 20:25     ` Marc Zyngier
  2009-12-26 20:25       ` [PATCH 4/4] pxa/zeus: provide power-source information when APM is enabled Marc Zyngier
  2009-12-28 13:34       ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Eric Miao
  2009-12-28 13:33     ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Eric Miao
  1 sibling, 2 replies; 9+ messages in thread
From: Marc Zyngier @ 2009-12-26 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

DM9000s on Zeus sometime fail under heavy load.
Relaxing the timings a bit seems to be of a great help.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
---
 arch/arm/mach-pxa/zeus.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 865df5d..7ddd265 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -726,9 +726,18 @@ static mfp_cfg_t zeus_pin_config[] __initdata = {
 	GPIO99_GPIO,		/* CF RDY */
 };
 
+/* 
+ * DM9k MSCx settings:	SRAM, 16 bits
+ *			17 cycles delay first access
+ *			 5 cycles delay next access
+ *			13 cycles recovery time
+ *			faster device
+ */
+#define DM9K_MSC_VALUE		0xe4c9;
+
 static void __init zeus_init(void)
 {
-	u16 dm9000_msc = 0xe279;
+	u16 dm9000_msc = DM9K_MSC_VALUE;
 
 	system_rev = __raw_readw(ZEUS_CPLD_VERSION);
 	pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f));
-- 
1.6.5.7

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

* [PATCH 4/4] pxa/zeus: provide power-source information when APM is enabled
  2009-12-26 20:25     ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Marc Zyngier
@ 2009-12-26 20:25       ` Marc Zyngier
  2009-12-28 13:34         ` Eric Miao
  2009-12-28 13:34       ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Eric Miao
  1 sibling, 1 reply; 9+ messages in thread
From: Marc Zyngier @ 2009-12-26 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marc Zyngier <maz@misterjones.org>
---
 arch/arm/mach-pxa/zeus.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 7ddd265..e1c9b1a 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -25,6 +25,7 @@
 #include <linux/mtd/physmap.h>
 #include <linux/i2c.h>
 #include <linux/i2c/pca953x.h>
+#include <linux/apm-emulation.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -626,6 +627,25 @@ static void zeus_power_off(void)
 	pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
 }
 
+#ifdef CONFIG_APM_EMULATION
+static void zeus_get_power_status(struct apm_power_info *info)
+{
+	/* Power supply is always present */
+	info->ac_line_status	= APM_AC_ONLINE;
+	info->battery_status	= APM_BATTERY_STATUS_NOT_PRESENT;
+	info->battery_flag	= APM_BATTERY_FLAG_NOT_PRESENT;
+}
+
+static inline void zeus_setup_apm(void)
+{
+	apm_get_power_status = zeus_get_power_status;
+}
+#else
+static inline void zeus_setup_apm(void)
+{
+}
+#endif
+
 static int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio,
 			     unsigned ngpio, void *context)
 {
@@ -747,6 +767,7 @@ static void __init zeus_init(void)
 	MSC1 = (MSC1 & 0xffff0000) | dm9000_msc;
 
 	pm_power_off = zeus_power_off;
+	zeus_setup_apm();
 
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(zeus_pin_config));
 
-- 
1.6.5.7

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

* [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static
  2009-12-26 20:25   ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Marc Zyngier
  2009-12-26 20:25     ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Marc Zyngier
@ 2009-12-28 13:33     ` Eric Miao
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Miao @ 2009-12-28 13:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Dec 27, 2009 at 4:25 AM, Marc Zyngier <maz@misterjones.org> wrote:
> Signed-off-by: Marc Zyngier <maz@misterjones.org>

Applied.

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

* [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports
  2009-12-26 20:25     ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Marc Zyngier
  2009-12-26 20:25       ` [PATCH 4/4] pxa/zeus: provide power-source information when APM is enabled Marc Zyngier
@ 2009-12-28 13:34       ` Eric Miao
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Miao @ 2009-12-28 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Dec 27, 2009 at 4:25 AM, Marc Zyngier <maz@misterjones.org> wrote:
> DM9000s on Zeus sometime fail under heavy load.
> Relaxing the timings a bit seems to be of a great help.
>
> Signed-off-by: Marc Zyngier <maz@misterjones.org>

Applied with removal of trailing whitespace and a typo of additional ";" in
the #define statement.

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

* [PATCH 4/4] pxa/zeus: provide power-source information when APM is enabled
  2009-12-26 20:25       ` [PATCH 4/4] pxa/zeus: provide power-source information when APM is enabled Marc Zyngier
@ 2009-12-28 13:34         ` Eric Miao
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Miao @ 2009-12-28 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Dec 27, 2009 at 4:25 AM, Marc Zyngier <maz@misterjones.org> wrote:
> Signed-off-by: Marc Zyngier <maz@misterjones.org>

Applied.

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

* [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress
  2009-12-26 20:25 ` [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress Marc Zyngier
  2009-12-26 20:25   ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Marc Zyngier
@ 2009-12-28 13:35   ` Eric Miao
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Miao @ 2009-12-28 13:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Dec 27, 2009 at 4:25 AM, Marc Zyngier <maz@misterjones.org> wrote:
> Zeus console port is wired to a 8250-compatible device
> (pxa UARTs are reserved to other uses). This patch
> allows such a configuration in the uncompress sequence.
>
> It has been regression-tested on a Viper using FFUART.
>
> Signed-off-by: Marc Zyngier <maz@misterjones.org>

Not sure if we can do this a little bit cleaner, allow me to think for
a while.

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

end of thread, other threads:[~2009-12-28 13:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-26 20:25 [PATCH 0/4] pxa/zeus: Fixes for 2.6.33 Marc Zyngier
2009-12-26 20:25 ` [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress Marc Zyngier
2009-12-26 20:25   ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Marc Zyngier
2009-12-26 20:25     ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Marc Zyngier
2009-12-26 20:25       ` [PATCH 4/4] pxa/zeus: provide power-source information when APM is enabled Marc Zyngier
2009-12-28 13:34         ` Eric Miao
2009-12-28 13:34       ` [PATCH 3/4] pxa/zeus: Relax memory timings on Zeus ethernet ports Eric Miao
2009-12-28 13:33     ` [PATCH 2/4] pxa/zeus: Make internal zeus_get_pcb_info static Eric Miao
2009-12-28 13:35   ` [PATCH 1/4] pxa/zeus: Allow usage of 8250-compatible UART in uncompress Eric Miao

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).