Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/429103/?format=api
{ "id": 429103, "url": "http://patchwork.ozlabs.org/api/patches/429103/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1421268367-27117-1-git-send-email-yorksun@freescale.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1421268367-27117-1-git-send-email-yorksun@freescale.com>", "list_archive_url": null, "date": "2015-01-14T20:46:07", "name": "[U-Boot,v2] arm/ls1021a: Add workaround for DDR erratum A008378", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "3cf51506efa255fd3fc6e54f5df9b235a6a921e7", "submitter": { "id": 3777, "url": "http://patchwork.ozlabs.org/api/people/3777/?format=api", "name": "York Sun", "email": "yorksun@freescale.com" }, "delegate": { "id": 2666, "url": "http://patchwork.ozlabs.org/api/users/2666/?format=api", "username": "yorksun", "first_name": "York", "last_name": "Sun", "email": "yorksun@freescale.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1421268367-27117-1-git-send-email-yorksun@freescale.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/429103/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/429103/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "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])\n\tby ozlabs.org (Postfix) with ESMTP id 109041400EA\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 15 Jan 2015 07:46:27 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id DA8174B615;\n\tWed, 14 Jan 2015 21:46:22 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id JnV82ByKvbIa; Wed, 14 Jan 2015 21:46:22 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 2E7484B60F;\n\tWed, 14 Jan 2015 21:46:22 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id D89954B60F\n\tfor <u-boot@lists.denx.de>; Wed, 14 Jan 2015 21:46:17 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id cDYL9XBunvGh for <u-boot@lists.denx.de>;\n\tWed, 14 Jan 2015 21:46:17 +0100 (CET)", "from na01-bl2-obe.outbound.protection.outlook.com\n\t(mail-bl2on0140.outbound.protection.outlook.com [65.55.169.140])\n\tby theia.denx.de (Postfix) with ESMTPS id 6F9D14B60B\n\tfor <u-boot@lists.denx.de>; Wed, 14 Jan 2015 21:46:15 +0100 (CET)", "from BN3PR0301CA0036.namprd03.prod.outlook.com (25.160.180.174) by\n\tBL2PR03MB148.namprd03.prod.outlook.com (10.255.230.27) with\n\tMicrosoft\n\tSMTP Server (TLS) id 15.1.53.17; Wed, 14 Jan 2015 20:46:11 +0000", "from BN1BFFO11FD034.protection.gbl (2a01:111:f400:7c10::1:149) by\n\tBN3PR0301CA0036.outlook.office365.com (2a01:111:e400:4000::46) with\n\tMicrosoft SMTP Server (TLS) id 15.1.59.20 via Frontend Transport;\n\tWed, 14 Jan 2015 20:46:11 +0000", "from az84smr01.freescale.net (192.88.158.2) by\n\tBN1BFFO11FD034.mail.protection.outlook.com (10.58.144.97) with\n\tMicrosoft SMTP Server (TLS) id 15.1.49.13 via Frontend Transport;\n\tWed, 14 Jan 2015 20:46:11 +0000", "from oslab-l1.am.freescale.net ([10.214.80.95])\n\tby az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tt0EKk9cQ004658; Wed, 14 Jan 2015 13:46:09 -0700" ], "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)", "From": "York Sun <yorksun@freescale.com>", "To": "<u-boot@lists.denx.de>", "Date": "Wed, 14 Jan 2015 12:46:07 -0800", "Message-ID": "<1421268367-27117-1-git-send-email-yorksun@freescale.com>", "X-Mailer": "git-send-email 1.7.9.5", "X-EOPAttributedMessage": "0", "Received-SPF": "Fail (protection.outlook.com: domain of freescale.com does not\n\tdesignate 192.88.158.2 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.158.2; helo=az84smr01.freescale.net;", "Authentication-Results": "spf=fail (sender IP is 192.88.158.2)\n\tsmtp.mailfrom=yorksun@freescale.com; ", "X-Forefront-Antispam-Report": "CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10019020)(6009001)(339900001)(189002)(199003)(77156002)(62966003)(450100001)(48376002)(97736003)(50226001)(92566002)(77096005)(50466002)(85426001)(68736005)(104016003)(69596002)(36756003)(229853001)(19580395003)(105606002)(86362001)(33646002)(50986999)(6806004)(19580405001)(2351001)(110136001)(87936001)(106466001)(81156004)(46102003)(47776003)(64706001);\n\tDIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB148;\n\tH:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv;\n\tPTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; ", "MIME-Version": "1.0", "X-DmarcAction-Test": "None", "X-Microsoft-Antispam": [ "UriScan:;", "BCL:0;PCL:0;RULEID:(3005004);SRVR:BL2PR03MB148;" ], "X-Exchange-Antispam-Report-Test": "UriScan:;", "X-Exchange-Antispam-Report-CFA-Test": [ "BCL:0; PCL:0; RULEID:(601004);\n\tSRVR:BL2PR03MB148; ", "BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB148;" ], "X-Forefront-PRVS": "04569283F9", "X-OriginatorOrg": "freescale.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "14 Jan 2015 20:46:11.4091\n\t(UTC)", "X-MS-Exchange-CrossTenant-Id": "710a03f5-10f6-4d38-9ff4-a80b81da590d", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;\n\tIp=[192.88.158.2]", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BL2PR03MB148", "Cc": "York Sun <yorksun@freescale.com>", "Subject": "[U-Boot] [PATCH v2] arm/ls1021a: Add workaround for DDR erratum\n\tA008378", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.13", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "u-boot-bounces@lists.denx.de", "Errors-To": "u-boot-bounces@lists.denx.de" }, "content": "Internal memory controller counters can reach a bad state after\ntraining in DDR4 mode if accumulated ECC or DBI mode is eanbled.\n\nSigned-off-by: York Sun <yorksun@freescale.com>\n---\nChange log\n v2: Add access macros to handle big- and little-endian. These macros were\n added by other patches, but not yet merged.\n Add parentheses for logic in macro, as suggested by compiling warning\n\n arch/arm/include/asm/arch-ls102xa/config.h | 1 +\n drivers/ddr/fsl/fsl_ddr_gen4.c | 8 ++++++++\n include/fsl_ddr.h | 6 ++++++\n 3 files changed, 15 insertions(+)", "diff": "diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h\nindex 5e934da..a06ef9d 100644\n--- a/arch/arm/include/asm/arch-ls102xa/config.h\n+++ b/arch/arm/include/asm/arch-ls102xa/config.h\n@@ -97,6 +97,7 @@\n #define CONFIG_SYS_FSL_DDR_VER\t\t\tFSL_DDR_VER_5_0\n #define CONFIG_SYS_FSL_SEC_COMPAT\t\t5\n #define CONFIG_USB_MAX_CONTROLLER_COUNT\t\t1\n+#define CONFIG_SYS_FSL_ERRATUM_A008378\n #else\n #error SoC not defined\n #endif\ndiff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c\nindex a3c01e7..4eef047 100644\n--- a/drivers/ddr/fsl/fsl_ddr_gen4.c\n+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c\n@@ -171,6 +171,14 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,\n \t\t\tddr_out32(&ddr->debug[i], regs->debug[i]);\n \t\t}\n \t}\n+#ifdef CONFIG_SYS_FSL_ERRATUM_A008378\n+\t/* Erratum applies when accumulated ECC is used, or DBI is enabled */\n+#define IS_ACC_ECC_EN(v) ((v) & 0x4)\n+#define IS_DBI(v) ((((v) >> 12) & 0x3) == 0x2)\n+\tif (IS_ACC_ECC_EN(regs->ddr_sdram_cfg) ||\n+\t IS_DBI(regs->ddr_sdram_cfg_3))\n+\t\tddr_setbits32(ddr->debug[28], 0x9 << 20);\n+#endif\n \n \t/*\n \t * For RDIMMs, JEDEC spec requires clocks to be stable before reset is\ndiff --git a/include/fsl_ddr.h b/include/fsl_ddr.h\nindex 675557a..3286c95 100644\n--- a/include/fsl_ddr.h\n+++ b/include/fsl_ddr.h\n@@ -23,9 +23,15 @@\n #ifdef CONFIG_SYS_FSL_DDR_LE\n #define ddr_in32(a)\tin_le32(a)\n #define ddr_out32(a, v)\tout_le32(a, v)\n+#define ddr_setbits32(a, v)\tsetbits_le32(a, v)\n+#define ddr_clrbits32(a, v)\tclrbits_le32(a, v)\n+#define ddr_clrsetbits32(a, clear, set)\tclrsetbits_le32(a, clear, set)\n #else\n #define ddr_in32(a)\tin_be32(a)\n #define ddr_out32(a, v)\tout_be32(a, v)\n+#define ddr_setbits32(a, v)\tsetbits_be32(a, v)\n+#define ddr_clrbits32(a, v)\tclrbits_be32(a, v)\n+#define ddr_clrsetbits32(a, clear, set)\tclrsetbits_be32(a, clear, set)\n #endif\n \n #define _DDR_ADDR CONFIG_SYS_FSL_DDR_ADDR\n", "prefixes": [ "U-Boot", "v2" ] }