From patchwork Thu Mar 27 01:30:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 334167 X-Patchwork-Delegate: yorksun@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 A9E38140097 for ; Thu, 27 Mar 2014 12:31:35 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 62C914B5EB; Thu, 27 Mar 2014 02:31:32 +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 Y1gUqdj4pl8I; Thu, 27 Mar 2014 02:31:32 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 634724B5EC; Thu, 27 Mar 2014 02:31:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C86FE4B5EC for ; Thu, 27 Mar 2014 02:31:24 +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 ErDJ+bLqbLu9 for ; Thu, 27 Mar 2014 02:31:21 +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 na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0239.outbound.protection.outlook.com [207.46.163.239]) by theia.denx.de (Postfix) with ESMTPS id 287944B5EB for ; Thu, 27 Mar 2014 02:31:17 +0100 (CET) Received: from snotra.am.freescale.net (192.88.168.49) by BLUPR03MB390.namprd03.prod.outlook.com (10.141.78.19) with Microsoft SMTP Server (TLS) id 15.0.908.10; Thu, 27 Mar 2014 01:31:10 +0000 From: Scott Wood To: Date: Wed, 26 Mar 2014 20:30:56 -0500 Message-ID: <1395883856-13444-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.8.3.2 Status: O Lines: 35 MIME-Version: 1.0 X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: BY2PR04CA011.namprd04.prod.outlook.com (10.141.216.11) To BLUPR03MB390.namprd03.prod.outlook.com (10.141.78.19) X-Forefront-PRVS: 01630974C0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009001)(6009001)(428001)(189002)(199002)(80976001)(83322001)(79102001)(19580395003)(19580405001)(74662001)(20776003)(47776003)(63696002)(49866001)(47736001)(88136002)(85306002)(87266001)(87286001)(87976001)(89996001)(83072002)(85852003)(93516002)(31966008)(90146001)(56816005)(93136001)(92726001)(86362001)(93916002)(92566001)(74502001)(47446002)(50986001)(47976001)(81686001)(77982001)(50226001)(81816001)(59766001)(4396001)(81542001)(62966002)(80022001)(65816001)(66066001)(76796001)(77096001)(77156001)(76786001)(76176001)(74876001)(74706001)(33646001)(81342001)(54316002)(94946001)(56776001)(97336001)(94316002)(53806001)(98676001)(95416001)(97186001)(95666003)(46102001)(36756003)(69226001)(48376002)(74366001)(50466002)(76482001)(42186004); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB390; H:snotra.am.freescale.net; FPR:FA987455.7A4A751.79D57B56.8FC8FEC9.2016A; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (: freescale.com does not designate permitted sender hosts) X-OriginatorOrg: freescale.com Cc: Scott Wood , u-boot@lists.denx.de Subject: [U-Boot] [PATCH] powerpc/85xx: Fix e6500 L2 cache stash IDs 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The value written to L2CSR1 didn't match the value written to the device tree. Signed-off-by: Scott Wood --- arch/powerpc/cpu/mpc85xx/fdt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 33bc900..31e63f7 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -275,12 +275,16 @@ static inline void ft_fixup_l2cache(void *blob) u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0); #if defined(CONFIG_SYS_FSL_QORIQ_CHASSIS2) && defined(CONFIG_E6500) /* Only initialize every eighth thread */ - if (reg && !((*reg) % 8)) + if (reg && !((*reg) % 8)) { + fdt_setprop_cell(blob, l2_off, "cache-stash-id", + (*reg / 4) + 32 + 1); + } #else - if (reg) -#endif + if (reg) { fdt_setprop_cell(blob, l2_off, "cache-stash-id", - (*reg * 2) + 32 + 1); + (*reg * 2) + 32 + 1); + } +#endif #endif fdt_setprop(blob, l2_off, "cache-unified", NULL, 0);