From patchwork Tue Jan 8 18:24:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Grussling X-Patchwork-Id: 210543 X-Patchwork-Delegate: kim.phillips@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 48C202C008D for ; Wed, 9 Jan 2013 08:33:27 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B6CC54A13A; Tue, 8 Jan 2013 22:33:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HBfkFy8gg465; Tue, 8 Jan 2013 22:33:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E9D5E4A13C; Tue, 8 Jan 2013 22:33:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7652A4A112 for ; Tue, 8 Jan 2013 19:52:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QB+wPaF6Mr2C for ; Tue, 8 Jan 2013 19:52:12 +0100 (CET) X-Greylist: delayed 1672 seconds by postgrey-1.27 at theia; Tue, 08 Jan 2013 19:52:10 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from valiant.selinc.com (valiant.selinc.com [74.117.214.141]) by theia.denx.de (Postfix) with ESMTP id 45C8E4A110 for ; Tue, 8 Jan 2013 19:52:10 +0100 (CET) Received: from pps.filterd (valiant [127.0.0.1]) by valiant.selinc.com (8.14.5/8.14.5) with SMTP id r08IGmiu002418; Tue, 8 Jan 2013 10:20:37 -0800 Received: from edison.ad.selinc.com (edison.ad.selinc.com [10.100.0.15]) by valiant.selinc.com with ESMTP id 19rrapg2r9-1; Tue, 08 Jan 2013 10:20:37 -0800 Received: from zoidberg.ad.selinc.com ([10.202.14.67]) by edison.ad.selinc.com (Lotus Domino Release 8.5.3FP2) with ESMTP id 2013010810241556-53087 ; Tue, 8 Jan 2013 10:24:15 -0800 From: Barry Grussling To: u-boot@lists.denx.de Date: Tue, 8 Jan 2013 10:24:05 -0800 Message-Id: <1357669446-29334-1-git-send-email-barry@grussling.com> X-Mailer: git-send-email 1.7.9.5 X-MIMETrack: Itemize by SMTP Server on Edison/SEL(Release 8.5.3FP2|July 02, 2012) at 01/08/2013 10:24:15 AM, Serialize by Router on Edison/SEL(Release 8.5.3FP2|July 02, 2012) at 01/08/2013 10:24:15 AM, Serialize complete at 01/08/2013 10:24:15 AM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327, 1.0.431, 0.0.0000 definitions=2013-01-08_06:2013-01-08, 2013-01-08, 1970-01-01 signatures=0 X-Mailman-Approved-At: Tue, 08 Jan 2013 22:33:20 +0100 Subject: [U-Boot] [PATCH] MPC8308: Fixup clocks in PCI Host configuration X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de While trying to bring up a custom MPC8308 based board I found that the clocking was wrong. The comment in include/configs/mpc8308_p1m.h led me to believe setting HRCWH_PCI_HOST and HRCWH_PCI1_ARBITER_ENABLE in the CONFIG_SYS_HRCW_HIGH should allow the system to work, but on my newer version of the 8308 this is not working. Setting the HRCWH_PCI_HOST bit (which doesn't exist according to the manual) doesn't latch, and as such the im->reset.rcwh & HRCWH_PCI_HOST test in speed.c fails. Since this board is running off the CONFIG_83XX_CLKIN and is not a PCI client, I end up with 0xdeadbeef and hosed clock values. This patch allows for proper clocks on the 8308 as a workaround for the lack of HRCWH_PCI_HOST support. Signed-off-by: Barry Grussling --- arch/powerpc/cpu/mpc83xx/speed.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index b8c05d1..6f715ea 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -160,6 +160,10 @@ int get_clocks(void) } else { #if defined(CONFIG_83XX_PCICLK) pci_sync_in = CONFIG_83XX_PCICLK; +#elif defined(CONFIG_83XX_CLKIN) && defined(CONFIG_MPC8308) + /* 8308 doesn't have the HRCWH_PCI_HOST, but should + * run off the CONFIG_83XX_CLKIN */ + pci_sync_in = CONFIG_83XX_CLKIN / (1 + clkin_div); #else pci_sync_in = 0xDEADBEEF; #endif