From patchwork Sun Jan 9 21:16:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumar Gala X-Patchwork-Id: 78050 X-Patchwork-Delegate: galak@kernel.crashing.org 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 7DFB2B7063 for ; Mon, 10 Jan 2011 08:17:18 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7304281E9; Sun, 9 Jan 2011 22:17:10 +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 QLD+EBwam1Lv; Sun, 9 Jan 2011 22:17:10 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B0351281D1; Sun, 9 Jan 2011 22:17:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 804D0281BC for ; Sun, 9 Jan 2011 22:17:02 +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 zEmq4GemhBm7 for ; Sun, 9 Jan 2011 22:16:59 +0100 (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 gate.crashing.org (gate.crashing.org [63.228.1.57]) by theia.denx.de (Postfix) with ESMTPS id 0647E281BA for ; Sun, 9 Jan 2011 22:16:57 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id p09LGt4f004906 for ; Sun, 9 Jan 2011 15:16:55 -0600 From: Kumar Gala To: u-boot@lists.denx.de Date: Sun, 9 Jan 2011 15:16:53 -0600 Message-Id: <1294607813-27723-2-git-send-email-galak@kernel.crashing.org> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1294607813-27723-1-git-send-email-galak@kernel.crashing.org> References: <1294333132-28592-5-git-send-email-galak@kernel.crashing.org> <1294607813-27723-1-git-send-email-galak@kernel.crashing.org> Subject: [U-Boot] [PATCH v2 5/7] powerpc/86xx: Enable common SRIO init code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Add the needed defines and code to utilize the common 8xxx srio init code to setup LAWs and modify device tree if we have SRIO enabled on a board. Signed-off-by: Kumar Gala --- * Removed ifdef protection around extern per Sergei * Added missing call to srio_init arch/powerpc/cpu/mpc86xx/cpu_init.c | 7 ++++++- arch/powerpc/cpu/mpc86xx/fdt.c | 7 ++++++- arch/powerpc/include/asm/immap_86xx.h | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/cpu/mpc86xx/cpu_init.c b/arch/powerpc/cpu/mpc86xx/cpu_init.c index 1d35c0c..cf3e4d6 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc86xx/cpu_init.c @@ -1,5 +1,5 @@ /* - * Copyright 2004,2009-2010 Freescale Semiconductor, Inc. + * Copyright 2004,2009-2011 Freescale Semiconductor, Inc. * Jeff Brown * Srikanth Srinivasan (srikanth.srinivasan@freescale.com) * @@ -34,6 +34,7 @@ #include #include +extern void srio_init(void); void setup_bats(void); DECLARE_GLOBAL_DATA_PTR; @@ -80,6 +81,10 @@ int cpu_init_r(void) /* needs to be in ram since code uses global static vars */ fsl_serdes_init(); +#ifdef CONFIG_SYS_HAS_SRIO + srio_init(); +#endif + #if defined(CONFIG_MP) setup_mp(); #endif diff --git a/arch/powerpc/cpu/mpc86xx/fdt.c b/arch/powerpc/cpu/mpc86xx/fdt.c index ff89ee5..c3cd062 100644 --- a/arch/powerpc/cpu/mpc86xx/fdt.c +++ b/arch/powerpc/cpu/mpc86xx/fdt.c @@ -1,5 +1,5 @@ /* - * Copyright 2008,2010 Freescale Semiconductor, Inc. + * Copyright 2008, 2011 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -14,6 +14,7 @@ DECLARE_GLOBAL_DATA_PTR; extern void ft_fixup_num_cores(void *blob); +extern void ft_srio_setup(void *blob); void ft_cpu_setup(void *blob, bd_t *bd) { @@ -58,4 +59,8 @@ void ft_cpu_setup(void *blob, bd_t *bd) ft_fixup_num_cores(blob); #endif + +#ifdef CONFIG_SYS_HAS_SRIO + ft_srio_setup(blob); +#endif } diff --git a/arch/powerpc/include/asm/immap_86xx.h b/arch/powerpc/include/asm/immap_86xx.h index 4e60cbb..cc338e4 100644 --- a/arch/powerpc/include/asm/immap_86xx.h +++ b/arch/powerpc/include/asm/immap_86xx.h @@ -1,7 +1,7 @@ /* * MPC86xx Internal Memory Map * - * Copyright 2004 Freescale Semiconductor + * Copyright 2004, 2011 Freescale Semiconductor * Jeff Brown (Jeffrey@freescale.com) * Srikanth Srinivasan (srikanth.srinivasan@freescale.com) * @@ -1205,6 +1205,8 @@ typedef struct ccsr_gur { #define MPC86xx_DEVDISR_PCI1 0x80000000 #define MPC86xx_DEVDISR_PCIE1 0x40000000 #define MPC86xx_DEVDISR_PCIE2 0x20000000 +#define MPC86xx_DEVDISR_SRIO 0x00080000 +#define MPC86xx_DEVDISR_RMSG 0x00040000 #define MPC86xx_DEVDISR_CPU0 0x00008000 #define MPC86xx_DEVDISR_CPU1 0x00004000 #define MPC86xx_RSTCR_HRST_REQ 0x00000002