{"id":816960,"url":"http://patchwork.ozlabs.org/api/patches/816960/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1506007346-10037-11-git-send-email-jjhiblot@ti.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","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":"<1506007346-10037-11-git-send-email-jjhiblot@ti.com>","list_archive_url":null,"date":"2017-09-21T15:22:13","name":"[U-Boot,10/23] ARM: OMAP5/DRA7: Enable iodelay recalibration to be done from uboot","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"c937fe07307aee1c8a0d5bffe66231b446edc126","submitter":{"id":70508,"url":"http://patchwork.ozlabs.org/api/people/70508/?format=json","name":"Jean-Jacques Hiblot","email":"jjhiblot@ti.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1506007346-10037-11-git-send-email-jjhiblot@ti.com/mbox/","series":[{"id":4414,"url":"http://patchwork.ozlabs.org/api/series/4414/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=4414","date":"2017-09-21T15:22:03","name":"mmc: omap5: Add support for UHS and HS200 modes","version":1,"mbox":"http://patchwork.ozlabs.org/series/4414/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/816960/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/816960/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","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"y6+7Mhoy\";\n\tdkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xygVN40Vpz9t43\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 01:28:12 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid D9844C220A1; Thu, 21 Sep 2017 15:23:56 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 58500C22068;\n\tThu, 21 Sep 2017 15:23:21 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 1C7DCC21FD0; Thu, 21 Sep 2017 15:22:58 +0000 (UTC)","from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17])\n\tby lists.denx.de (Postfix) with ESMTPS id 7B482C2203F\n\tfor <u-boot@lists.denx.de>; Thu, 21 Sep 2017 15:22:54 +0000 (UTC)","from dflxv15.itg.ti.com ([128.247.5.124])\n\tby fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8LFMqoH010598; \n\tThu, 21 Sep 2017 10:22:52 -0500","from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25])\n\tby dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LFMq4s009461;\n\tThu, 21 Sep 2017 10:22:52 -0500","from DFLE106.ent.ti.com (10.64.6.27) by DFLE104.ent.ti.com\n\t(10.64.6.25) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tThu, 21 Sep 2017 10:22:52 -0500","from dlep32.itg.ti.com (157.170.170.100) by DFLE106.ent.ti.com\n\t(10.64.6.27) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Thu, 21 Sep 2017 10:22:52 -0500","from localhost (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LFMp3x020830;\n\tThu, 21 Sep 2017 10:22:51 -0500"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1506007372;\n\tbh=92M/OmzV5qovTuXugUlI8oC6LFq00Y4thloiiCM0MK4=;\n\th=From:To:CC:Subject:Date:In-Reply-To:References;\n\tb=y6+7MhoyCkXW8sE1zYLZpcxbeg+PmpN3SP5CsdBTxnRgWq552mgElqnd5IhXJNaxY\n\tGEWneG78RJCcop5HG6vDui8iSQ7G/ToPqL7tlC0kZRAoq5XJDrQ2EvwOyDWXMv+H1A\n\tzAfBg8OY2jQSaqUW0Dbn7HyEXXIZjl7fBAxrcYR4=","From":"Jean-Jacques Hiblot <jjhiblot@ti.com>","To":"<jh80.chung@samsung.com>, <trini@konsulko.com>, <kishon@ti.com>,\n\t<sjg@chromium.org>, <lokeshvutla@ti.com>","Date":"Thu, 21 Sep 2017 17:22:13 +0200","Message-ID":"<1506007346-10037-11-git-send-email-jjhiblot@ti.com>","X-Mailer":"git-send-email 1.9.1","In-Reply-To":"<1506007346-10037-1-git-send-email-jjhiblot@ti.com>","References":"<1506007346-10037-1-git-send-email-jjhiblot@ti.com>","MIME-Version":"1.0","X-EXCLAIMER-MD-CONFIG":"e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180","Cc":"u-boot@lists.denx.de","Subject":"[U-Boot] [PATCH 10/23] ARM: OMAP5/DRA7: Enable iodelay\n\trecalibration to be done from uboot","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/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":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"From: Kishon Vijay Abraham I <kishon@ti.com>\n\nAdd a new API to perform iodelay recalibration without isolate\nio to be used in uboot.\n\nThe data manual of J6/J6 Eco recommends to set different IODELAY values\ndepending on the mode in which the MMC/SD is enumerated in order to\nensure IO timings are met. The MMC driver can use the new API to\nset the IO delay values depending on the MMC mode.\n\nSigned-off-by: Kishon Vijay Abraham I <kishon@ti.com>\nSigned-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>\n---\n arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h |  3 +++\n arch/arm/mach-omap2/omap5/dra7xx_iodelay.c       | 30 ++++++++++++++++++++++++\n include/configs/am57xx_evm.h                     |  2 --\n include/configs/dra7xx_evm.h                     |  2 --\n 4 files changed, 33 insertions(+), 4 deletions(-)","diff":"diff --git a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h\nindex c997004..a8780ee 100644\n--- a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h\n+++ b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h\n@@ -83,6 +83,9 @@\n void __recalibrate_iodelay(struct pad_conf_entry const *pad, int npads,\n \t\t\t   struct iodelay_cfg_entry const *iodelay,\n \t\t\t   int niodelays);\n+void late_recalibrate_iodelay(struct pad_conf_entry const *pad, int npads,\n+\t\t\t      struct iodelay_cfg_entry const *iodelay,\n+\t\t\t      int niodelays);\n int __recalibrate_iodelay_start(void);\n void __recalibrate_iodelay_end(int ret);\n \ndiff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c\nindex 8798730..a9a9f75 100644\n--- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c\n+++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c\n@@ -272,3 +272,33 @@ err:\n \t__recalibrate_iodelay_end(ret);\n \n }\n+\n+void late_recalibrate_iodelay(struct pad_conf_entry const *pad, int npads,\n+\t\t\t      struct iodelay_cfg_entry const *iodelay,\n+\t\t\t      int niodelays)\n+{\n+\tint ret = 0;\n+\n+\t/* unlock IODELAY CONFIG registers */\n+\twritel(CFG_IODELAY_UNLOCK_KEY, (*ctrl)->iodelay_config_base +\n+\t       CFG_REG_8_OFFSET);\n+\n+\tret = calibrate_iodelay((*ctrl)->iodelay_config_base);\n+\tif (ret)\n+\t\tgoto err;\n+\n+\tret = update_delay_mechanism((*ctrl)->iodelay_config_base);\n+\n+\t/* Configure Mux settings */\n+\tdo_set_mux32((*ctrl)->control_padconf_core_base, pad, npads);\n+\n+\t/* Configure Manual IO timing modes */\n+\tret = do_set_iodelay((*ctrl)->iodelay_config_base, iodelay, niodelays);\n+\tif (ret)\n+\t\tgoto err;\n+\n+err:\n+\t/* lock IODELAY CONFIG registers */\n+\twritel(CFG_IODELAY_LOCK_KEY, (*ctrl)->iodelay_config_base +\n+\t       CFG_REG_8_OFFSET);\n+}\ndiff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h\nindex 0c70c53..4125391 100644\n--- a/include/configs/am57xx_evm.h\n+++ b/include/configs/am57xx_evm.h\n@@ -15,9 +15,7 @@\n #include <environment/ti/dfu.h>\n #include <linux/sizes.h>\n \n-#ifdef CONFIG_SPL_BUILD\n #define CONFIG_IODELAY_RECALIBRATION\n-#endif\n \n #define CONFIG_NR_DRAM_BANKS\t\t2\n \ndiff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h\nindex 6c0fc35..435284a 100644\n--- a/include/configs/dra7xx_evm.h\n+++ b/include/configs/dra7xx_evm.h\n@@ -14,9 +14,7 @@\n \n #include <environment/ti/dfu.h>\n \n-#ifdef CONFIG_SPL_BUILD\n #define CONFIG_IODELAY_RECALIBRATION\n-#endif\n \n #define CONFIG_VERY_BIG_RAM\n #define CONFIG_NR_DRAM_BANKS\t\t2\n","prefixes":["U-Boot","10/23"]}