Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755250AbcKYPY7 (ORCPT ); Fri, 25 Nov 2016 10:24:59 -0500 Received: from smtpoutz27.laposte.net ([194.117.213.102]:41157 "EHLO smtp.laposte.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755055AbcKYPYr (ORCPT ); Fri, 25 Nov 2016 10:24:47 -0500 To: Douglas Anderson , Michal Simek , =?UTF-8?Q?S=c3=b6ren_Brinkmann?= , Jerry Huang , Ulf Hansson , Adrian Hunter Cc: Linux ARM , LKML , Linus Walleij , Mason From: Sebastian Frias Subject: Adding a .platform_init callback to sdhci_arasan_ops Message-ID: Date: Fri, 25 Nov 2016 16:24:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-VR-SrcIP: 92.154.11.170 X-VR-FullState: 0 X-VR-Score: -100 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrfeelfedrfedvgdejhecutefuodetggdotefrodftvfcurfhrohhf X-VR-Cause-2: ihhlvgemucfntefrqffuvffgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhs X-VR-Cause-3: ucdlqddutddtmdenucfjughrpefvhffukffffgggtgfgsehtjeertddtfeejnecuhfhrohhmpefuvggs X-VR-Cause-4: rghsthhirghnucfhrhhirghsuceoshhfkeegsehlrghpohhsthgvrdhnvghtqeenucfkphepledvrddu X-VR-Cause-5: heegrdduuddrudejtdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopegludejvddr X-VR-Cause-6: vdejrddtrddvudegngdpihhnvghtpeelvddrudehgedruddurddujedtpdhmrghilhhfrhhomhepshhf X-VR-Cause-7: keegsehlrghpohhsthgvrdhnvghtpdhrtghpthhtohepughirghnuggvrhhssegthhhrohhmihhumhdr X-VR-Cause-8: ohhrgh X-VR-AvState: No X-VR-State: 0 X-VR-State: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 34 Hi, When using the Arasan SDHCI HW IP, there is a set of parameters called "Hardware initialized registers" (Table 7, Section "Pin Signals", page 56 of Arasan "SD3.0/SDIO3.0/eMMC4.4 AHB Host Controller", revision 6.0 document) In some platforms those signals are connected to registers that need to be programmed at some point for proper driver/HW initialisation. I found that the 'struct sdhci_ops' contains a '.platform_init' callback that is called from within 'sdhci_pltfm_init', and that seems a good candidate for a place to program those registers (*). Do you agree? Best regards, Sebastian (*): This has been prototyped on 4.7 as working properly. However, upstream commit: commit 3ea4666e8d429223fbb39c1dccee7599ef7657d5 Author: Douglas Anderson Date: Mon Jun 20 10:56:47 2016 -0700 mmc: sdhci-of-arasan: Properly set corecfg_baseclkfreq on rk3399 ... could affect this solution because of the way the 'sdhci_arasan_of_match' struct is used after that commit.