Re: [PATCH v3 3/4] ata: Add APM X-Gene SoC SATA host controller driver

Kishon Vijay Abraham I
2013-11-26T10:12:18Z

Hi,

On Wednesday 20 November 2013 02:52 AM, Loc Ho wrote:
> Hi Kishon,
>
>>>> +
>>>> +/* Temporary function until the PHY parameter API */
>>>> +extern void xgene_ahci_phy_set_pq(struct phy *phy, int chan, int data);
>>>> +extern void xgene_ahci_phy_set_spd(struct phy *phy, int chan, int gen);
>>>
>>> Ah, that should have been mentioned in the changeset text. Do you think you
>>> can remove these for the final version?
>> [Loc Ho]
>> Yes... Krishon, can you provide an patch that allows me to accommodate
>> this? Or should I come up one? I will trying to get rip of the first
>> one. But I will need the function to set the PHY speed - for
>> Gen2/Gen1. Let's plan on add these function:
>>
>> a. int (*set_speed)(int gen_speed) where gen_speed is either AUTO,
>> GEN1, GEN2, or GEN3.
>> b. Change the PHY init function to take an optional parameter. This
>> would help my first function in case I can get rip of it.
>>
> [Loc Ho]
> I will provide this patch as part of my next version to include an
> function as follow:

sure..
>
> int set_speed(struct *phy, int lane, u64 speed);

it should be phy_set_speed.
>
> where lane indicates the lane of the PHY and speed is the PHY speed in hertz.

Does lane here means the number of lanes? Is the lane also obtained after the
training sequence?

Thanks
Kishon