RE: [PATCH v1 2/2] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips
From: Stanley Chu <hidden>
Date: 2019-02-22 14:13:51
Also in:
linux-mediatek, linux-scsi
Hi Avri, On Fri, 2019-02-22 at 10:29 +0000, Avri Altman wrote:
Hi,quoted
+ +struct ufs_mtk_dev_params { + u32 pwm_rx_gear; /* pwm rx gear to work in */ + u32 pwm_tx_gear; /* pwm tx gear to work in */ + u32 hs_rx_gear; /* hs rx gear to work in */ + u32 hs_tx_gear; /* hs tx gear to work in */ + u32 rx_lanes; /* number of rx lanes */ + u32 tx_lanes; /* number of tx lanes */ + u32 rx_pwr_pwm; /* rx pwm working pwr */ + u32 tx_pwr_pwm; /* tx pwm working pwr */ + u32 rx_pwr_hs; /* rx hs working pwr */ + u32 tx_pwr_hs; /* tx hs working pwr */ + u32 hs_rate; /* rate A/B to work in HS */ + u32 desired_working_mode; +};As this is essentially identical to ufs_qcom_dev_params and ufs_hisi_dev_params etc., Maybe move it to ufshcd-platform.h in a short preparatory patch, so it can be reused?
Good suggestion. This is currently also our preferred way to define host limitation. I can help re-factor this in next patch.
Also, the vast majority of the code in these platform-dependent modules is pretty much the same. I wonder if it can be shape to fit some standard form? But this is out of scope of your series.
Currently ufs-mediatek driver is a "shell" only for basic UFS operations in Mediatek SoC chips. We are planning to try to add more rich features in the near future and thus more and more different platform-dependent codes will be uploaded. However, as you mentioned, there may be still lots of similar codes and flows in these platform-dependent drivers. And we can think how to simplify or standardize them later.
quoted
+/* + * PHY Adpater attributes + */ +#define PA_LOCALTXLCCENABLE 0x155EAlready in unipro.h
Will remove this.
Thanks, Avri
Thanks, Stanley
_______________________________________________ Linux-mediatek mailing list Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org http://lists.infradead.org/mailman/listinfo/linux-mediatek