From patchwork Thu Oct 14 02:04:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shaohui xie X-Patchwork-Id: 67774 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 9B5E41009E7 for ; Thu, 14 Oct 2010 13:32:15 +1100 (EST) Received: from TX2EHSOBE009.bigfish.com (tx2ehsobe005.messaging.microsoft.com [65.55.88.15]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Cybertrust SureServer Standard Validation CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 06C071007D2 for ; Thu, 14 Oct 2010 13:32:05 +1100 (EST) Received: from mail52-tx2-R.bigfish.com (10.9.14.243) by TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id 14.1.225.8; Thu, 14 Oct 2010 02:31:59 +0000 Received: from mail52-tx2 (localhost.localdomain [127.0.0.1]) by mail52-tx2-R.bigfish.com (Postfix) with ESMTP id A442F5E81EF for ; Thu, 14 Oct 2010 02:31:59 +0000 (UTC) X-SpamScore: -3 X-BigFish: VS-3(zzbb2cKzz1202hzz8275bhz2dh2a8h66h) X-Spam-TCS-SCL: 5:0 Received: from mail52-tx2 (localhost.localdomain [127.0.0.1]) by mail52-tx2 (MessageSwitch) id 1287023519361230_18346; Thu, 14 Oct 2010 02:31:59 +0000 (UTC) Received: from TX2EHSMHS005.bigfish.com (unknown [10.9.14.251]) by mail52-tx2.bigfish.com (Postfix) with ESMTP id 4FF78518056 for ; Thu, 14 Oct 2010 02:31:59 +0000 (UTC) Received: from az33egw01.freescale.net (192.88.158.102) by TX2EHSMHS005.bigfish.com (10.9.99.105) with Microsoft SMTP Server (TLS) id 14.0.482.44; Thu, 14 Oct 2010 02:31:58 +0000 Received: from de01smr01.freescale.net (de01smr01.freescale.net [10.208.0.31]) by az33egw01.freescale.net (8.14.3/8.14.3) with ESMTP id o9E2Vu4e003892 for ; Wed, 13 Oct 2010 19:31:57 -0700 (MST) Received: from zmy16exm20.fsl.freescale.net (zmy16exm20.ap.freescale.net [10.211.3.23]) by de01smr01.freescale.net (8.13.1/8.13.0) with ESMTP id o9E2l5lr024837 for ; Wed, 13 Oct 2010 21:47:06 -0500 (CDT) Received: from localhost.localdomain ([10.193.20.106]) by zmy16exm20.fsl.freescale.net with Microsoft SMTPSVC(6.0.3790.4675); Thu, 14 Oct 2010 10:32:05 +0800 From: Shaohui Xie To: Subject: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access Date: Thu, 14 Oct 2010 10:04:26 +0800 Message-ID: <1287021866-22095-1-git-send-email-b21989@freescale.com> X-Mailer: git-send-email 1.6.4 X-OriginalArrivalTime: 14 Oct 2010 02:32:05.0160 (UTC) FILETIME=[FD976A80:01CB6B47] MIME-Version: 1.0 X-Reverse-DNS: az33egw01.freescale.net Cc: alexandre.bounine@idt.com, b21989@freescale.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org From: Li Yang The access to HID1 register is only legitimate for e500 v1/v2 cores. Also fixes magic number. Signed-off-by: Li Yang Signed-off-by: Shaohui Xie --- arch/powerpc/sysdev/fsl_rio.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 4127636..dfff3b7 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -1537,9 +1537,12 @@ int fsl_rio_setup(struct platform_device *dev) #ifdef CONFIG_E500 saved_mcheck_exception = ppc_md.machine_check_exception; ppc_md.machine_check_exception = fsl_rio_mcheck_exception; -#endif - /* Ensure that RFXE is set */ - mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000)); + +#ifndef CONFIG_PPC_E500MC + /* Ensure that RFXE is set on e500 v1/v2 */ + mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | HID1_RFXE)); +#endif /* !PPC_E500MC */ +#endif /* E500 */ return 0; err: