linux-mips
[Top] [All Lists]

[PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings

To: ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings
From: Florian Fainelli <florian@openwrt.org>
Date: Mon, 31 Aug 2009 20:28:10 +0200
Cc: linux-mips@linux-mips.org, Maxime Bizon <mbizon@freebox.fr>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:date:subject :mime-version:x-uid:x-length:to:cc:content-type :content-transfer-encoding:content-disposition:message-id; bh=k4NF42aAer1bAizsDqHBs55d6oqDin8327YucO9OfWE=; b=QZwg3iH+q43hgbbmPtpcZzQJ8C83S+uB44xmJteOuxOH4yMocMOvB75F6E0u9THGMM jbb6mD/aymv0F6YrE4Ye9kNAUrPSB3exGUjHm7wN74WmSpiQEESmjkKaqPfYw1QZvXY9 Rdf/7RrYZC3uSLZkWN4TXothxF76UnXQcnMXE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:date:subject:mime-version:x-uid:x-length:to:cc :content-type:content-transfer-encoding:content-disposition :message-id; b=TLuKgSj/voIH2HUdRIUeWDuIhP6n8dsJSokq6hBlX5T6/aU+yv6nShT091zY66Bjlo 6sxNwrcgVLClUdQEm2fWYxO6P4Yuv9OHXqitqTQn3oyoqOytOnqm9JXfgPcGVd8BUll5 W1OzysWauP1KLwh2gfQL85mJjJtXrwFVjHxoE=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
This patch makes the GPIO pin multiplexing configuration
read the initial GPIO mode register value instead of
setting it initially to 0, then setting the correct
bits, this is safer.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index cfe32af..6ae4242 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -634,7 +634,7 @@ void __init board_prom_init(void)
        /* setup pin multiplexing depending on board enabled device,
         * this has to be done this early since PCI init is done
         * inside arch_initcall */
-       val = 0;
+       val = bcm_gpio_readl(GPIO_MODE_REG);
 
 #ifdef CONFIG_PCI
        if (board.has_pci) {


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