Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753201AbdCTIi4 (ORCPT ); Mon, 20 Mar 2017 04:38:56 -0400 Received: from mail-bn3nam01on0078.outbound.protection.outlook.com ([104.47.33.78]:3041 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753084AbdCTIiQ (ORCPT ); Mon, 20 Mar 2017 04:38:16 -0400 From: Piotr Sroka To: Masahiro Yamada CC: linux-mmc , Adrian Hunter , Ulf Hansson , Linux Kernel Mailing List Subject: RE: [v2 PATCH 3/3] mmc: sdhci-cadence: Update PHY delay configuration Thread-Topic: [v2 PATCH 3/3] mmc: sdhci-cadence: Update PHY delay configuration Thread-Index: AQHSln8jciSgWn5fkkGB6GObxzP5rqGJBXYAgAAbfICAAq44AIAGoJ+ggAbpZICABAEYwA== Date: Mon, 20 Mar 2017 08:38:10 +0000 Message-ID: References: <1488807587-5375-1-git-send-email-piotrs@cadence.com> In-Reply-To: Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNccGlvdHJzXGFwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0YmEyOWUzNWJcbXNnc1xtc2ctOGRjYzc5YzEtMGQ0OC0xMWU3LWIyM2ItYjg3NjNmYWJhNWQxXGFtZS10ZXN0XDhkY2M3OWMzLTBkNDgtMTFlNy1iMjNiLWI4NzYzZmFiYTVkMWJvZHkudHh0IiBzej0iMTg0NCIgdD0iMTMxMzQ0NzI2OTM2NTkzOTEyIiBoPSJCdVlibGQ5VGVpRXMxbmMzQXR0MDYrckptVG89IiBpZD0iIiBibD0iMCIgYm89IjEiLz48L21ldGE+ authentication-results: socionext.com; dkim=none (message not signed) header.d=none;socionext.com; dmarc=none action=none header.from=cadence.com; x-originating-ip: [213.131.238.28] x-microsoft-exchange-diagnostics: 1;DM5PR07MB3082;7:wMsBFUuknhwAZj/GMY/Ag58xu4JTSR1E1bIi70YOs3/IsgvLaAs1MmF4FpXDgotMsbSwGoQ0bour675SWDcmyWypjl2MoIKJkl4ZMeYd5UO66rgku6jporKUtxa5YwiEERr3m20JErRkic468w+0/npxzhhTNp8XMAaxmjNeeMvvnCPZLh+o/gkpNYCgtzDDm4jsDGPMYLXGDD4cF3iUKSlP4oUzaTy8Jw6fcpLOljdbmYZQQGkFQ0oGjBMdJtz+uAkEEmGE4omBHtBuFqWawu8DaYSc+sxI4CfG+Lq5Z4abzzMH6pBm3SuUUkszI9cpKHI/4+07rVmLEZIdvQE8qw==;20:tvoMhxOgYR0rjj5ImKUl38nowGBxy5sfoeOilkonD8MNma1d4Qc3YSkdZnpSaegRJslPvVSTYuXhQT75tBKIVPxUzyBqC6O//riLptXD+qm5SmjwTrRVHdZaDnB/x+Yq+z/jV6O+e1RXhSKwi9Kg19BvIS5o135v7gzavpbVeqqrEOddRUZzQe3wRN5YmnmrV7dN+k/Y3vVuGwX/xJNyiVpgNMfr0+6Gt529CrqH3HV2xBQtYa4Z/Map+FT3wlrK x-ms-office365-filtering-correlation-id: 558a8f39-9eba-40ce-15f1-08d46f6c7100 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075);SRVR:DM5PR07MB3082; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123558025)(20161123562025)(6072148);SRVR:DM5PR07MB3082;BCL:0;PCL:0;RULEID:;SRVR:DM5PR07MB3082; x-forefront-prvs: 02524402D6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39450400003)(13464003)(377454003)(76104003)(25786008)(86362001)(6116002)(77096006)(53936002)(76176999)(15650500001)(3846002)(7696004)(102836003)(2900100001)(8936002)(99286003)(6436002)(2906002)(8676002)(3660700001)(3280700002)(4326008)(38730400002)(9686003)(81166006)(55016002)(6506006)(189998001)(229853002)(2950100002)(54906002)(6246003)(5660300001)(110136004)(33656002)(66066001)(54356999)(122556002)(7736002)(305945005)(74316002)(50986999)(6916009)(53546008);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR07MB3082;H:DM5PR07MB3082.namprd07.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2017 08:38:10.7323 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3082 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v2K8dLvM028682 Content-Length: 1698 Lines: 47 > -----Original Message----- > From: Masahiro Yamada [mailto:yamada.masahiro@socionext.com] > Sent: 17 March, 2017 6:23 PM > Subject: Re: [v2 PATCH 3/3] mmc: sdhci-cadence: Update PHY delay configuration > > Hi Piotr, > > Sorry for my late reply. > > > > > > It looks that "input delays" and "DLL sdclk delays" should be defined in dts file because they depend on a chip and a board > implementation. On the other hand the less dts properties the better. > > > > There is one more way to handle input delays. It can be achieved by PHY training. PHY training is similar to the tuning and it should be > done when proper timing mode is selected and clock frequency is set. > > To make it possible the sdhci_set_ios function need to be global. Then I could create sdhci_cdns_set_ios function as follows: > > void sdhci_cdns_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { > > . . . > > > > sdhci_set_ios(mmc, ios); > > /* execute PHY training if needed */ > > sdhci_cdns_exec_phy_training(host); > > } > > > > The mmc framework configures timing and frequency separately so PHY training should be executed every time if timing or clock > frequency is changed. I am not sure If I can change sdhci_set_ios to global function. > > > I am OK with this, but I hope Adrian can advise us. > > > > > > So maybe put all delays to dts file would be a better solution? What do you think? > > I am OK with DT approach too > because this way seems simpler, after all. > > (My suggestion for data array approach was misleading, sorry.) > Thanks for review anyway it was useful. Now decision between DTS and data array is more clear for me. Regards Piotr Sroka