Hi Joao,

2016-04-13 21:57 GMT+09:00 Joao Pinto <joao.pi...@synopsys.com>:
>
> Hi Akinobu,
>
> On 4/13/2016 1:19 PM, Akinobu Mita wrote:
>> Hi Joao,
>>
>> 2016-04-13 18:04 GMT+09:00 Joao Pinto <joao.pi...@synopsys.com>:
>>
>>> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
>>> index e3931d0..c780d14 100644
>>> --- a/drivers/scsi/ufs/ufshcd.h
>>> +++ b/drivers/scsi/ufs/ufshcd.h
>>> @@ -263,6 +263,7 @@ struct ufs_pwr_mode_info {
>>>   * @suspend: called during host controller PM callback
>>>   * @resume: called during host controller PM callback
>>>   * @dbg_register_dump: used to dump controller debug information
>>> + * @phy_initialization: used to initialize phys
>>>   */
>>>  struct ufs_hba_variant_ops {
>>>         const char *name;
>>> @@ -284,6 +285,7 @@ struct ufs_hba_variant_ops {
>>>         int     (*suspend)(struct ufs_hba *, enum ufs_pm_op);
>>>         int     (*resume)(struct ufs_hba *, enum ufs_pm_op);
>>>         void    (*dbg_register_dump)(struct ufs_hba *hba);
>>> +       int     (*phy_initialization)(struct ufs_hba *);
>>>  };
>>
>> This vops->phy_initialization is only called from ufs dwc specific
>> source files and not called from ufs core.  So this should not belong
>> to ufs_hba_variant_ops.
>
> At this time only DWC specific uses the phy_initialization, but can be used by
> others in the future when the same necessity comes.

But vops->phy_initialization is only called from DWC specific
vops->link_startup_notify.  So I think there is no point adding
new callback to vops.

>> You can use hba->priv to put the controller specific data structure
>> including phy_initialization and you also need to define vops->init
>> callback which allocates and initialize the data structure.

Or you can create another vops which have different link_startup_notify
because phy_initialization is only called from link_starup_notify.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to