Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933322AbcDYRtf (ORCPT ); Mon, 25 Apr 2016 13:49:35 -0400 Received: from mail-bn1on0054.outbound.protection.outlook.com ([157.56.110.54]:22768 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754855AbcDYRr7 (ORCPT ); Mon, 25 Apr 2016 13:47:59 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.227) smtp.mailfrom=opensource.altera.com; vger.kernel.org; dkim=pass (signature was verified) header.d=altera.onmicrosoft.com;vger.kernel.org; dmarc=none action=none header.from=opensource.altera.com; Authentication-Results: alien8.de; dkim=none (message not signed) header.d=none;alien8.de; dmarc=none action=none header.from=opensource.altera.com; From: To: , , , , , , , , , , CC: , , , , , , Subject: [PATCHv2 5/7] EDAC, altera: Add Arria10 ECC memory init functions Date: Mon, 25 Apr 2016 12:52:46 -0500 Message-ID: <1461606768-14404-6-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1461606768-14404-1-git-send-email-tthayer@opensource.altera.com> References: <1461606768-14404-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BLUPR05CA0052.namprd05.prod.outlook.com (10.141.20.22) To BLUPR03MB1476.namprd03.prod.outlook.com (10.163.81.18) X-MS-Office365-Filtering-Correlation-Id: 9d243c4e-ae2b-4ad5-3796-08d36d31badd X-Microsoft-Exchange-Diagnostics-untrusted: 1;BLUPR03MB1476;2:r10aQVk2x5B3jaSF2hYUaC4RMCZwHM6rPu6mCWhbrlVUlfl+k1AYNz4RqiLEi8Nd0SJGInRNEn8lJcNv7SF+pKMshCyB6aLKm7omDmmLkRBmkRq1Qjh+HPts4UYgLBo+8A2yguUTeDhAdQGVGmythGZHHGHAzxP2td1N7ZPng3zSvwrr3GIUeUidu6iC3aIP;3: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soft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521026)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026);SRVR:BLUPR03MB1476;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1476;BCL:0;PCL:0;RULEID:(9101521069)(601004)(2401047)(13015025)(13017025)(13024025)(8121501046)(5005006)(13023025)(13018025)(3002001)(10201501046)(6055026);SRVR:BY1PR0301MB1285;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1285; X-Microsoft-Exchange-Diagnostics-untrusted: 1;BLUPR03MB1476;4:WJpmvnb1GlznmTCYYNCUWSXaRCRNFugnT5SBhdbaR9iMWhZzA0ErwcsL2+GKSIrJ7wOfVRkRQ+9K33SNkSQV+0Bac9+C+EZ6SLDZ9egwTwMcqC72VA6M1ql94MfZgSQwcDsHPTc8XyTHIZZpuXA3yW6KTNiVU2r5Yer8KKBl9R/6hJkm4XKcrsHg6fhrONgIsM9W98lY97Mcu6LYQ4WM+Mq7W82rHJIGawpFVZZ1TEq6RQB14zCxhsr6PDF47ZtofeErJNTkhc3C9IsaGxPVHLrursxtDK1MgeTlofREF13gdLDAl4rNCRztaFtiPpdWlydJ8w8NRX/X+FRhaeIRK3L2JVCM7M542vjqzn31BSxuOc0Ss+cZgP1zJgt4Gegrw/UN9gkbLzCmSaba0JtxS2rkH26mZfsMIPjXEeFd6vw= X-Forefront-PRVS: 0923977CCA X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6049001)(4326007)(2876002)(77096005)(2906002)(5004730100002)(42186005)(86362001)(48376002)(229853001)(5001770100001)(66066001)(3846002)(6116002)(1096002)(189998001)(2950100001)(19580405001)(19580395003)(586003)(92566002)(107886002)(5008740100001)(50986999)(33646002)(4001430100002)(86152002)(5003940100001)(81166005)(2201001)(47776003)(76176999)(921003)(4720700001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB1476;H:tthayer-HP-Z620-Ubuntu.137.57.187.33;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;BLUPR03MB1476;23:mkKytWAIq8mtx09PV6uI7c3GOMHNdQpCJf9caYKns?= =?us-ascii?Q?hMW0GJVXWRHOEt4DWTGRTkQTAS3+kd8TgjTFabVEYXDjj5C/Zu2xy0YMc1Qi?= =?us-ascii?Q?cTf0wKbdCDn+8JiJI9JfPWJVxkwSgxuBJhvpUHgkSMye6TrdmlMCplAuQoA2?= =?us-ascii?Q?V9eSggFmLmaPtE+N+fLSNegT2Z8FlH0RerR8qnq2srVxFIghncAcK+06N9ro?= =?us-ascii?Q?OQbFgvSEKz1hSjAONMaysZHLfYvBUsY3yEczef8VJA9jDR4c4I6XpuEryuIh?= =?us-ascii?Q?ga34qFYvQcvDWnaxPlnzlcwC3KUqDTjfDvZne5QyqNibPtx4G1NKLmbwBgwp?= =?us-ascii?Q?ivKFQYe297+4kjo5G19NdHQSp+z5YFbcWTiY4lITtktAglfZUp7KZdz8RLoo?= =?us-ascii?Q?BQJhAjqeFw6tFNb6qED+H59gD8cEibD7y75ZfkfLg53Zg83+J8hl1E8uy1Xz?= =?us-ascii?Q?gbxOGJG8qCgVWPy8p8hCmG+crYFwTw/OHbA2oJpszrs3SbFEiY8e18HFNac1?= =?us-ascii?Q?r8fqcbcj9EyqUGob6XY+JR1Zg3uSwTlJqvmhVlVxZgFqFTpn5M73qpzBUnbN?= =?us-ascii?Q?dZOnFXMXZtyjE1rWs6Ei+T7gxP3o1jfVemr9ZPDCvbLuxL4Li14U6To6/702?= =?us-ascii?Q?MybFMvJ2+7VtMCOx9GW3/96oBtvJ37zgG5xofxPnI3EcAVzeQ+zgPAbEdvcn?= =?us-ascii?Q?xSFCDobeW0LuMgAcJ+RzlXv7vXkc7itwn+5d9I+GjDiBak27I3OIGDnmVadG?= =?us-ascii?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pamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1476 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD038.protection.gbl X-Forefront-Antispam-Report: CIP:66.35.236.227;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(86152002)(2201001)(2906002)(87936001)(956001)(33646002)(92566002)(5001770100001)(66066001)(106466001)(48376002)(4001430100002)(50986999)(105606002)(76176999)(85426001)(86362001)(6806005)(107886002)(229853001)(47776003)(189998001)(5008740100001)(3720700001)(4326007)(2876002)(81166005)(5004730100002)(11100500001)(21840400001)(3846002)(6116002)(1096002)(1220700001)(586003)(19580395003)(19580405001)(77096005)(2950100001)(16796002)(5003940100001)(7099028)(921003)(4720700001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0301MB1285;H:sj-itexedge03.altera.priv.altera.com;FPR:;SPF:Fail;MLV:sfv;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD038;1:6ONMrDQI9V/Tot/5ZCJ/5ezsxSFwMC2qOf4Ymz6DheaCZfBbNBP6h7td6xOaeVc33PfjqE0JVfiHjl6AlZVOectD6DhQYteyuxnSr3P/eS+FBLBFcJXKJlvkCqfU99YA+YU13JCKO5rPd0KQt1W7GzriTxtflXqT5QRF93axiTCkpuIjtDDfSfykOmxUs+JM6fLCulqXZ0ICYmnAkpTDQKn4ewkrtw/fklisZcsxkz252rU5qVP4bIf6ErcjuGDO1FjvkPyVo+EhFIye/LOg6/e6zQfQEO2TFLp7G0wns8rncoTwj0jmkFeNWmxUcBQExhduSl7yhb+2Difecv4wgpqTXHqOI2Lnhy86xS+P7+l0oU9WsVWowXXqyMSoPpAI5DKTFKE6kA7Tn6ld21oQuxPNDS8bRoMtsrT0uQp8swWeBcy0NuG9kyFTCF4V3zy9r/Xi2eQR2FlkDP0ythy3gURZaxoREaXDkTS6YbVwJ52VChQeGLH/02i2/OWpXXu67zLLazSj7zwDEmhCqs6N2BOVirUtYrfugNT1Tg6nZ7COvO7evpYjOWXjLvxJ4azy X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1285;2:2olOihUWNijlGOgxtPLPuSQvVOkfIkAkpFzdTcuMUtRRgontEgaS8lQ1kvA3z24ALKE/S9ui0fkiloVMuTnWj++VpFhLwO8AYOPEL8UpojhrCjJ5OXvI1XurN54vMlfJXOEgSZWnCH2aI69i2gOyAnYMLNYL+wFYr9oPvnWxPSchBC8UP6hiEkIotT+gW45W;3:NYV2UDlcA01vAWwktTvO3+S/EH4H6MwAvKj69dUqUZJX7SRmd/sW2cC1WWRKtuvNkk400RMRVkavNApTJP1ai5kN6nS2Wc3o9YL9qYa/kaa56VPcG6Qq0s+l4x3r6ZM72CTlHNyF+LpglwSvu/s8oubGxnhZ6XSS6itFoiaO+j1VKR2jvgKyebKPXWuafe3wRDkd8R972E7flVLiT4IoaAewRAIfP6ZhUfPqsLiC9Kt1NzsDkCRA9d0EQZDLnpS3 X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(3001016);SRVR:BY1PR0301MB1285; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1285;25:41oBlF1or4qN4aBwiAI8OLLC6xSYvW852cmRymRKfLWNruDDvmGl5/sM67SQI3Tqa4hcttgvze5SpTNbW4pqPIQFhKtua9BKx9/I5eK+M/jgEAW+4F9EGH+SW/+YMZ2kCp1hokpmfk7uuqL5SiZf91E6a4XvS7rmT3MmLASE2eRHwm6Z/sY3YAA3qhvc8kkeg1eyCFedcqK8f4G+K58WhGcAZK54PvYKge/jC6jA13QQbWSqgcW9t78pfVEbJdwNsC2pw3oX6P+o7PeEzXH9C4RShH02pc3aDPup2cGfks4le4UjcSzClCDDiB4eFGSqNNfPix+5FYxQ1qX7JTO6ueS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RVS: 0923977CCA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB1285;23:fJJmf9LOQVrtp7QMEeVpoptUtX4qOAyR+11xaOT?= =?us-ascii?Q?7SHTcg+wqV9ag6rMKB6jBYo0EnHY+KCLevHFa+CnWlEaGxupDQkudDV7pNqc?= =?us-ascii?Q?zWmKOX0E9ND3mmvYCGx71qmPOxMeFegH+n0ihpx+E761N9pDGN47FPlKAY3C?= =?us-ascii?Q?5sEcyUZTkm/mdRZTo6z5HUNpIjaLjrJ7/zcs3H0yNcXFoyvHKdwHSVUsAEHa?= =?us-ascii?Q?X1vj8wh5aIYS/+x4okem2ogXtd9Arj4KQYc438+50HCOWoItgeRe7+u6xJwp?= =?us-ascii?Q?P7G2c8XXkC7D9jD32nhZ7CnbRgl+SCNG7kxBTmGScL7dE72qX7sRezIMToph?= =?us-ascii?Q?sPD3SdufuB6N7OQW9WFHxov4ChR10AyE2NFCIntq1Ip9I7w987mHLEibnpLO?= =?us-ascii?Q?FVne8fAiNQfaaPcjp6gEJNwgknu0FurFk+rwQfSgd+OFBznkEq7Subc6qtgi?= =?us-ascii?Q?HjBOZO00gWW0p8xltZJDoVVF8oAT/GP2nDTqCt+LimmEqPK2cOwt4kF4QHVu?= =?us-ascii?Q?lM1HowCYUAqkWORXm5lrUsxX7dz7mKc3PvaTVZ6hPJg/dkg95xdG0BSvb2LP?= =?us-ascii?Q?YKJ9kZAmf3vKb/SV+X8TxQdDbv58r5yqkqq09FpvK43/WHLWwDr5yKbExwUF?= =?us-ascii?Q?UKVl2rjoLc9wkZ+oJ/3wtzta4a0914V+TIywZ5+8Ey5GmFRjPu43+0abbOJC?= =?us-ascii?Q?j0CG+nDIFIp1bWEkNJx0h3q4xZrLCJypQvegUO4FBuPTcLln04m8yw/bcbEj?= =?us-ascii?Q?cn/L4wOClmEyfvmGHsOvdjpGWra5e/JbKlXnIVOJiCVIoOmCrS1pkOjhOkxl?= =?us-ascii?Q?bFK1p5ljOBxe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n0jf4fKOjJOf4UiHzb0LKkhaRRFvoUBA=;20:aAm5ohZpBDtHry9iGiaAFkQTyu0oYXjKvS9G8I08A9fyznSJWp1Zssk3KrgmjbpRB8v1N4nf5n9WkvtAjMignZbJoeEsuLNiys1tNE2Ac4bWCwYyFP8QBElE1iKVclrh8Vs/S8nSjl5z819GzPmAitc26xNYDLwCJ9V6v41n7ic= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2016 17:47:54.3072 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.227];Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1285 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6515 Lines: 221 From: Thor Thayer In preparation for additional memory module ECCs, add the memory initialization functions. Signed-off-by: Thor Thayer --- v2: Specify INTMODE selection -> IRQ on each ECC error. Insert functions above memory-specific functions so that function declarations are not required. Use ERRINTENS & ERRINTENR registers instead of read/modify/write. --- drivers/edac/altera_edac.c | 157 ++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/altera_edac.h | 8 +++ 2 files changed, 165 insertions(+) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index dc09627..49a5239 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -869,6 +870,162 @@ static irqreturn_t altr_edac_a10_ecc_irq(struct altr_edac_device_dev *dci, #endif /* CONFIG_EDAC_ALTERA_OCRAM || CONFIG_EDAC_ALTERA_ETHERNET */ +/******************* Arria10 Memory Buffer Functions *********************/ + +#if defined(CONFIG_EDAC_ALTERA_ETHERNET) +static inline void ecc_set_bits(u32 bit_mask, void __iomem *ioaddr) +{ + u32 value = readl(ioaddr); + + value |= bit_mask; + writel(value, ioaddr); +} + +static inline void ecc_clear_bits(u32 bit_mask, void __iomem *ioaddr) +{ + u32 value = readl(ioaddr); + + value &= ~bit_mask; + writel(value, ioaddr); +} + +static inline int ecc_test_bits(u32 bit_mask, void __iomem *ioaddr) +{ + u32 value = readl(ioaddr); + + return (value & bit_mask) ? 1 : 0; +} + +/* + * This function uses the memory initialization block in the Arria10 ECC + * controller to initialize/clear the entire memory data and ECC data. + */ +static int altr_init_memory_port(void __iomem *ioaddr, int port) +{ + int limit = ALTR_A10_ECC_INIT_WATCHDOG_10US; + u32 init_mask = ALTR_A10_ECC_INITA; + u32 stat_mask = ALTR_A10_ECC_INITCOMPLETEA; + u32 clear_mask = ALTR_A10_ECC_ERRPENA_MASK; + int ret = 0; + + if (port) { + init_mask = ALTR_A10_ECC_INITB; + stat_mask = ALTR_A10_ECC_INITCOMPLETEB; + clear_mask = ALTR_A10_ECC_ERRPENB_MASK; + } + + ecc_set_bits(init_mask, (ioaddr + ALTR_A10_ECC_CTRL_OFST)); + while (limit--) { + if (ecc_test_bits(stat_mask, + (ioaddr + ALTR_A10_ECC_INITSTAT_OFST))) + break; + udelay(1); + } + if (limit < 0) + ret = -EBUSY; + + /* Clear any pending ECC interrupts */ + writel(clear_mask, (ioaddr + ALTR_A10_ECC_INTSTAT_OFST)); + + return ret; +} + +/* + * Aside from the L2 ECC, the Arria10 ECC memories have a common register + * layout so the following functions can be shared between all peripherals. + */ +static int altr_init_a10_ecc_block(const char *compat, u32 irq_mask, + u32 ecc_ctrl_en_mask, bool dual_port) +{ + int ret = 0; + void __iomem *ecc_block_base; + struct regmap *ecc_mgr_map; + char *ecc_name; + struct device_node *np, *parent, *np_eccmgr; + + np = of_find_compatible_node(NULL, NULL, compat); + if (!np) { + pr_err("SOCFPGA: Unable to find %s in dtb\n", compat); + ret = -ENODEV; + goto out; + } + ecc_name = (char *)np->name; + + /* Ensure device is enabled before calling init, otherwise exit */ + parent = of_parse_phandle(np, "parent", 0); + if (!parent || !of_device_is_available(parent)) { + ret = -ENODEV; + goto out1; + } + + /* Get the ECC Manager - parent of the device EDACs */ + np_eccmgr = of_get_parent(np); + ecc_mgr_map = syscon_regmap_lookup_by_phandle(np_eccmgr, + "altr,sysmgr-syscon"); + of_node_put(np_eccmgr); + if (IS_ERR(ecc_mgr_map)) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "Unable to get syscon altr,sysmgr-syscon\n"); + ret = -ENODEV; + goto out1; + } + + /* Map the ECC Block */ + ecc_block_base = of_iomap(np, 0); + if (!ecc_block_base) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "Unable to map %s ECC block\n", ecc_name); + ret = -ENODEV; + goto out1; + } + + /* Disable ECC */ + regmap_write(ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_SET_OFST, irq_mask); + writel(ALTR_A10_ECC_SERRINTEN, + (ecc_block_base + ALTR_A10_ECC_ERRINTENR_OFST)); + ecc_clear_bits(ecc_ctrl_en_mask, + (ecc_block_base + ALTR_A10_ECC_CTRL_OFST)); + /* Ensure all writes complete */ + wmb(); + /* Use HW initialization block to initialize memory for ECC */ + ret = altr_init_memory_port(ecc_block_base, 0); + if (ret) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "ECC: cannot init %s PORTA memory\n", ecc_name); + goto out2; + } + + if (dual_port) { + ret = altr_init_memory_port(ecc_block_base, 1); + if (ret) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "ECC: cannot init %s PORTB memory\n", + ecc_name); + goto out2; + } + } + + /* Interrupt mode set to every SBERR */ + regmap_write(ecc_mgr_map, ALTR_A10_ECC_INTMODE_OFST, + ALTR_A10_ECC_INTMODE); + /* Enable ECC */ + ecc_set_bits(ecc_ctrl_en_mask, (ecc_block_base + + ALTR_A10_ECC_CTRL_OFST)); + writel(ALTR_A10_ECC_SERRINTEN, + (ecc_block_base + ALTR_A10_ECC_ERRINTENS_OFST)); + regmap_write(ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_CLR_OFST, irq_mask); + /* Ensure all writes complete */ + wmb(); +out2: + iounmap(ecc_block_base); +out1: + of_node_put(parent); +out: + of_node_put(np); + return ret; +} +#endif /* CONFIG_EDAC_ALTERA_ETHERNET */ + /*********************** OCRAM EDAC Device Functions *********************/ #ifdef CONFIG_EDAC_ALTERA_OCRAM diff --git a/drivers/edac/altera_edac.h b/drivers/edac/altera_edac.h index 83e621e..a4f1539 100644 --- a/drivers/edac/altera_edac.h +++ b/drivers/edac/altera_edac.h @@ -230,8 +230,13 @@ struct altr_sdram_mc_data { #define ALTR_A10_ECC_INITCOMPLETEB BIT(8) #define ALTR_A10_ECC_ERRINTEN_OFST 0x10 +#define ALTR_A10_ECC_ERRINTENS_OFST 0x14 +#define ALTR_A10_ECC_ERRINTENR_OFST 0x18 #define ALTR_A10_ECC_SERRINTEN BIT(0) +#define ALTR_A10_ECC_INTMODE_OFST 0x1C +#define ALTR_A10_ECC_INTMODE BIT(0) + #define ALTR_A10_ECC_INTSTAT_OFST 0x20 #define ALTR_A10_ECC_SERRPENA BIT(0) #define ALTR_A10_ECC_DERRPENA BIT(8) @@ -280,6 +285,9 @@ struct altr_sdram_mc_data { /* Arria 10 OCRAM ECC Management Group Defines */ #define ALTR_A10_OCRAM_ECC_EN_CTL (BIT(1) | BIT(0)) +/* A10 ECC Controller memory initialization timeout */ +#define ALTR_A10_ECC_INIT_WATCHDOG_10US 10000 + struct altr_edac_device_dev; struct edac_device_prv_data { -- 1.7.9.5