lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 04 Jul 2015 12:03:39 +0800
From:	Orson Zhai <orsonzhai@...il.com>
To:	"Billows Wu (武洪涛)" 
	<Billows.Wu@...eadtrum.com>, Rob Herring <robherring2@...il.com>
CC:	"Chunyan Zhang (张春艳)" 
	<Chunyan.Zhang@...eadtrum.com>,
	"chris@...ntf.net" <chris@...ntf.net>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Lee Jones <lee.jones@...aro.org>,
	Shawn Guo <shawn.guo@...aro.org>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Arnd Bergmann <arnd@...db.de>,
	"Wei Qiao (乔伟)" 
	<Wei.Qiao@...eadtrum.com>,
	"Baolin Wang (王宝林)" 
	<Baolin.Wang@...eadtrum.com>,
	"Ning Yang (杨宁)" 
	<Ning.Yang@...eadtrum.com>,
	"Orson Zhai (翟京)" 
	<Orson.Zhai@...eadtrum.com>,
	"Jason Wu (吴霁爽)" 
	<Jason.Wu@...eadtrum.com>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [RFC PATCH] mmc: sprd: add MMC host driver for Spreadtrum SoC



On 2015年07月03日 13:44, Billows Wu (武洪涛) wrote:
> Hi Rob,
>
> Thanks for your reply.
> The MMC subsys core can figure out the type of the device attached. But it happaped after MMC probe function run over.
> If we want to distinguish MMC,SD or Wi-Fi in controller's probe function, we may by controller's register physical address, for example  20600000.sdio,2.400000.sdio or 20300000.sdio.   So we must know MMC controller's physical address is 0x20600000 and SD controller's physical address is 0x20300000. This reduces the code readability.
why not answer rob's 2nd comment on POWER_OFF flag in same time?
and you should use "in-line reply" without base64 encoding.

back to the question, i think you don't need to know the exact card type 
at probe time only a little bit earlier than in later work queue.
just printing out the devname and card type at work queue is good enough.
say some logs in work-queue as "20600000.sdio detecting... card type: emmc"

-orson
> If you have a good opinion how to distinguish MMC form SD or SDIO device in host controller probe function not by physical address, please tell us.
>
> Thanks!
> --billows
> ___________________________________
> From: Orson Zhai <orsonzhai@...il.com>
> Sent: Friday, July 3, 2015 10:50 AM
> To: Rob Herring
> Cc: Chunyan Zhang (张春艳); chris@...ntf.net; Ulf Hansson; Lee Jones; Shawn Guo; Grant Likely; Rob Herring; Arnd Bergmann; Billows Wu (武洪涛); Wei Qiao (乔伟); Baolin Wang (王宝林); Ning Yang (杨宁); Orson Zhai (翟京); Jason Wu (吴霁爽); linux-mmc@...r.kernel.org; linux-kernel@...r.kernel.org; devicetree@...r.kernel.org
> Subject: Re: [RFC PATCH] mmc: sprd: add MMC host driver for Spreadtrum SoC
>
> On Thu, Jul 2, 2015 at 11:47 PM, Rob Herring <robherring2@...il.com> wrote:
>> On Thu, Jul 2, 2015 at 4:26 AM, Orson Zhai <orsonzhai@...il.com> wrote:
>>> Hi Rob,
>>>
>>> Thanks for your quick reply.
>>> I have one question to your last comment.
>>>
>>> On Thu, Jul 2, 2015 at 1:50 AM, Rob Herring <robherring2@...il.com> wrote:
>>>> On Wed, Jul 1, 2015 at 2:23 AM, Chunyan Zhang
>>>> <chunyan.zhang@...eadtrum.com> wrote:
>>>>> From: Billows Wu <billows.wu@...eadtrum.com>
>> [...]
>>
>>>>> +const struct of_device_id sdhost_of_match[] = {
>>>>> +       {.compatible = "sprd,sd-sdhost-3.0", .data = &sd_caps_info,},
>>>>> +       {.compatible = "sprd,wifi-sdhost-3.0", .data = &wifi_caps_info,},
>>>>> +       {.compatible = "sprd,emmc-sdhost-3.0",  .data = &emmc_caps_info,},
>>>> What these are connected to is irrelevant to the driver and compatible
>>>> string. All these differences belong in the DT unless the IP blocks
>>>> are really different.
>>> It's my idea to let Billows do like this.
>>> I learn from SSP part in freescale  "arch/arm/boot/dts/imx28-evk.dts"
>>> Their ssp0-ssp2 each have 2 roles, mmc or generic spi bus.
>>> And they may write one of their combo configuration like this:
>> That is a bit different as the host controller is operating in
>> completely different modes. In your case, the host controller is the
>> same and functions the same way, but just has different cards
>> attached.
>>
>>>   43                         ssp1: ssp@...12000 {
>>>   44                                 compatible = "fsl,imx28-mmc";
>>>   45                                 bus-width = <8>;
>>>   46                                 wp-gpios = <&gpio0 28 0>;
>>>   47                         };
>>>   48
>>>   49                         ssp2: ssp@...14000 {
>>>   50                                 #address-cells = <1>;
>>>   51                                 #size-cells = <0>;
>>>   52                                 compatible = "fsl,imx28-spi";
>>>   53                                 pinctrl-names = "default";
>>>   54                                 pinctrl-0 = <&spi2_pins_a>;
>>>   55                                 status = "okay";
>>>   56
>>>   57                                 flash: m25p80@0 {
>>>   58                                         #address-cells = <1>;
>>>   59                                         #size-cells = <1>;
>>>   60                                         compatible = "sst,sst25vf016b";
>>>   61                                         spi-max-frequency = <40000000>;
>>>   62                                         reg = <0>;
>>>   63                                 };
>>>   64                         };
>>>
>>> Billows tell me they also have 3 roles in their sd host controller
>>> corresponding to 3 kinds of different operation.
>>> He used to create "sprd,name" property for this. Is it a good way or
>>> anything else better?
>> Why do you need to know? You can define parameters which can't be
>> probed such as bus width, voltage, and clock freq. in DT for each
>> host. The MMC subsys core will figure out the type of device attached.
> I think you're right.
> Thanks!
> -orson
>
>> Rob

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ