Re: [RFC PATCH] mmc: sprd: add MMC host driver for Spreadtrum SoC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 2, 2015 at 4:26 AM, Orson Zhai <orsonzhai@xxxxxxxxx> 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@xxxxxxxxx> wrote:
>> On Wed, Jul 1, 2015 at 2:23 AM, Chunyan Zhang
>> <chunyan.zhang@xxxxxxxxxxxxxx> wrote:
>>> From: Billows Wu <billows.wu@xxxxxxxxxxxxxx>

[...]

>>> +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@80012000 {
>  44                                 compatible = "fsl,imx28-mmc";
>  45                                 bus-width = <8>;
>  46                                 wp-gpios = <&gpio0 28 0>;
>  47                         };
>  48
>  49                         ssp2: ssp@80014000 {
>  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.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux