From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Mon, 05 Dec 2011 11:54:18 +0100 Subject: [U-Boot] [PATCH 1/4] mmc: Change board_mmc_getcd() signature. In-Reply-To: <20111205100051.GA4935@avionic-0098.mockup.avionic-design.de> References: <1323073424-16656-1-git-send-email-thierry.reding@avionic-design.de> <201112051053.49109.marek.vasut@gmail.com> <20111205100051.GA4935@avionic-0098.mockup.avionic-design.de> Message-ID: <4EDCA2DA.4000207@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/12/2011 11:00, Thierry Reding wrote: > * Marek Vasut wrote: >>> The new API no longer uses the extra cd parameter that was used >>> to store the card presence state. Instead, this information is >>> returned via the function's return value. board_mmc_getcd() >>> returns -1 to indicate that no card-detection mechanism is >>> implemented; 0 indicates that no card is present and 1 is >>> returned if it was detected that a card is present. >>> >>> Signed-off-by: Thierry Reding >>> >> >> A silly question -- why do we need this change ? Can you explain >> it in the changelog of V2 too? > > It's the first step in implementing card-detection. I discussed > this with Andy and he came up with the idea that board_mmc_getcd() > should really have had the mmc parameter as first argument in the > first place instead of the cd parameter. Ok, I get it now. > Furthermore, the cd parameter is used inconsistently in individual > implementations. After some discussion we came to the conclusion > that the cd parameter wasn't required at all and the same > information can be represented in the return value. The whole > discussion is in this thread: > > http://lists.denx.de/pipermail/u-boot/2011-November/110180.html > > It's not really a necessary change, but it makes board_mmc_getcd() > much more consistent with other MMC-related functions. > > Perhaps this last sentence would be a good explanation to put in > the v2 commit message? Ok, thanks - this explains much better which is your intention for the patchset. It is also not bad to add a reference to the above thread. Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================