linux-mips
[Top] [All Lists]

[PATCH 2/3] MIPS: BCM63XX: don't write to the chipid register on reboot

To: linux-mips@linux-mips.org
Subject: [PATCH 2/3] MIPS: BCM63XX: don't write to the chipid register on reboot
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Fri, 13 Jul 2012 10:46:04 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, Florian Fainelli <florian@openwrt.org>, Maxime Bizon <mbizon@freebox.fr>, Kevin Cernekee <cernekee@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=XRP8s9bp9IpjPfAmln11Q2TXKl+uJAi2FqSiCyCltPE=; b=hQhyHuUfORxg/CGSH2Bxl1FMffaF9blZjldTGbcxPtV8IGaTmgU8ydTOPeqq7ccl2T t+MzAZbRqwIioA20Lxb7X1mB1aHDoBpbvCUBJg4DcujRVQRB9thUUN0FRGSOfacf8PmY FromeYhcqpEuZ5L3ASlW+5cqtyGbBU0cI5s1z2O3P9oqWh7d+Z7VGltnGU7lDyZ8Redt rQ2K3r69DK/3rKpg3XUSk2VixvPiCh42wluzj/Ypd+I0JLPdBMvaDIXz9FhZuujFge4M BNSEc0wHa/lpsXSMBzVzn3Zt2tQRtJdQ2vx4i2B9frxLbKuR+ukAZNe0vR5vTvureDcc tjQg==
In-reply-to: <1342169165-18382-1-git-send-email-jonas.gorski@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1342169165-18382-1-git-send-email-jonas.gorski@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Maxime Bizon <mbizon@freebox.fr>

While harmless, it is bad style to do so.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 arch/mips/bcm63xx/setup.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/mips/bcm63xx/setup.c b/arch/mips/bcm63xx/setup.c
index bd83836..314231b 100644
--- a/arch/mips/bcm63xx/setup.c
+++ b/arch/mips/bcm63xx/setup.c
@@ -86,6 +86,9 @@ void bcm63xx_machine_reboot(void)
        }
 
        for (i = 0; i < 2; i++) {
+               if (!perf_regs[i])
+                       break;
+
                reg = bcm_perf_readl(perf_regs[i]);
                if (BCMCPU_IS_6348()) {
                        reg &= ~EXTIRQ_CFG_MASK_ALL_6348;
-- 
1.7.2.5


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