linux-mips
[Top] [All Lists]

Re: [PATCH v3] mips/alchemy: add basic support for the GPR board

To: Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [PATCH v3] mips/alchemy: add basic support for the GPR board
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 23 Jul 2010 19:44:48 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <1279185683-21037-1-git-send-email-wg@grandegger.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1279185683-21037-1-git-send-email-wg@grandegger.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.20 (2009-08-17)
On Thu, Jul 15, 2010 at 11:21:23AM +0200, Wolfgang Grandegger wrote:

> From: Wolfgang Grandegger <wg@denx.de>
> 
> This patch adds basic support for the General Purpose Router (GPR)
> board from Trapeze ITS.
> 
> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
> ---
> 
> Something went wrong with my previous "git send-email", please ignore.

It even triggers a bug in Patchwork - it doens't handle subject-less
patches very gracefully.

+static void gpr_power_off(void)
+{
+       printk(KERN_ALERT "It's now safe to remove power\n");

My favorite line to delete from kernel patches.  Messages to the user
belong into userspace.

+       while (1)
+               asm volatile (".set mips3 ; wait ; .set mips0");
+}
+
+static void gpr_power_off(void)
+{
[..]
+       while (1)
+               asm volatile (".set mips3 ; wait ; .set mips0");
+}

Call cpu_wait() instead of open coding the WAIT instruction.  This avoids
certain restrictions of the WAIT instruction.

I've sorted that and also updated the defconfig file.  As is due to
other changes make gpr_defconfig did configure a kernel for IP22.  The
changed kconfig behaviour is worse than useless!

Queued for 2.6.36,

  Ralf

<Prev in Thread] Current Thread [Next in Thread>