Re: [PATCH RFC 2/3] dt:net:stmmac: Add support to dwmac version 3.610 and 3.710

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

 



Thanks Peppe for the comments,
On 01/07/13 18:20, Giuseppe CAVALLARO wrote:
> On 7/1/2013 1:43 PM, Srinivas KANDAGATLA wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>
>>
>> +
>> +    plat->bus_id = of_alias_get_id(np, "ethernet");
>> +    if (plat->bus_id < 0)
>> +        plat->bus_id = 0;
>> +
>> +    of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr);
>> +
>>       plat->mdio_bus_data = devm_kzalloc(&pdev->dev,
>>                          sizeof(struct stmmac_mdio_bus_data),
>>                          GFP_KERNEL);
>> @@ -51,11 +60,25 @@ static int stmmac_probe_config_dt(struct
>> platform_device *pdev,
>>        */
>>       if (of_device_is_compatible(np, "st,spear600-gmac") ||
>>           of_device_is_compatible(np, "snps,dwmac-3.70a") ||
>> +        of_device_is_compatible(np, "snps,dwmac-3.610") ||
I forgot to add "snps,dwmac-3.710" to this list, I will do it in V2 patch.

>>           of_device_is_compatible(np, "snps,dwmac")) {
>>           plat->has_gmac = 1;
>>           plat->pmt = 1;
>>       }
>>
>> +    if (of_device_is_compatible(np, "snps,dwmac-3.610") ||
>> +        of_device_is_compatible(np, "snps,dwmac-3.710")) {
>> +        plat->enh_desc = 1;
>> +        plat->bugged_jumbo = 1;
>> +        plat->force_sf_dma_mode = 1;
>> +    }
> 
> I think some these shouldn't be forced here. Maybe plat->enh_desc could
> be set because for new syn mac cores.
> 
> Also pmt could not be forced because it is an extra module so it could
> happen that a new chip has no PMT block.
I agree with you, But the new chips should/will have different version
numbers, so having the version number in the compatible string should
make it possible for cores without PMT module to not set pmt or any
other properties.

Are you happy with the setting pmt based on compatible string or do you
think passing pmt as another property to device tree makes more sense?

Thanks,
srini

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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux