From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758397AbaCTMlv (ORCPT ); Thu, 20 Mar 2014 08:41:51 -0400 Received: from mxout1.netvision.net.il ([194.90.9.20]:61689 "EHLO mxout1.netvision.net.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755353AbaCTMls (ORCPT ); Thu, 20 Mar 2014 08:41:48 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Message-id: <532AE17F.9020509@gmail.com> Date: Thu, 20 Mar 2014 14:39:27 +0200 From: Eli Billauer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7 To: monstr@monstr.eu Cc: =?UTF-8?B?U8O2cmVuIEJyaW5rbWFubg==?= , Mike Looijmans , chris@printf.net, michal.simek@xilinx.com, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mmc: sdhci: add quirk for broken write protect detection References: <1393759200-22819-1-git-send-email-eli.billauer@gmail.com> <74003aec-1707-4f43-b947-df148d573fa1@TX2EHSMHS038.ehs.local> <53163247.8000904@gmail.com> <531878C8.2020001@topic.nl> <532ADE8D.7040900@monstr.eu> In-reply-to: <532ADE8D.7040900@monstr.eu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Michal. The Zybo board doesn't have any WP pin connected to the MicroSD card. There is no physical possibility for the processor to know whether the card is write-protected or not. As I mentioned earlier, the practical problem can be worked around by inverting the polarity of the WP bit, using wp-inverted. Practically speaking, there's no need for this patch. I insisted on this patch, because I think that the device tree should reflect the hardware as it is, and not contain tricks for fooling the driver into doing what we want. But I guess this wasn't a reason good enough for adding yet another quirk (to the existing 38 or so). Regards, Eli On 20/03/14 14:26, Michal Simek wrote: > we have got this from Mike (we couldn't reply because he has lost this email > thread. > > Mike: > "I think I found the issue. In ps7_init.c as generated by the tools, it sets the "WP" pin not to EMIO, but to MIO 0. We use pin 0 for a status LED. > > # devmem 0XF8000830 > 0x002E0000 > > Register 0XF8000830 is SD0_WP_CD_SEL, and 0x002E0000 sets CD to pin 46 and WP to pin "0", not to EMIO as I specified in the design. > " > > Eli: Maybe you have the same issue as Mike. Can you please check it? >