From: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Avri Altman <Avri.Altman-Sjgp3cTcYWE@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org"
<martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
"chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org"
<chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
"kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org"
<kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
"wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org"
<wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org"
<peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
"matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: RE: [PATCH v1 2/2] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips
Date: Fri, 22 Feb 2019 22:13:51 +0800 [thread overview]
Message-ID: <1550844831.30977.21.camel@mtkswgap22> (raw)
In-Reply-To: <SN6PR04MB4925CDAF80047DBCED9E2836FC7F0-UKdxhu0+N/VnT3GYGerMaFM8qxBPnqtHvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
Hi Avri,
On Fri, 2019-02-22 at 10:29 +0000, Avri Altman wrote:
> Hi,
>
> > +
> > +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.
>
> > +/*
> > + * PHY Adpater attributes
> > + */
> > +#define PA_LOCALTXLCCENABLE 0x155E
> Already 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
prev parent reply other threads:[~2019-02-22 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 9:50 [PATCH v1] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips stanley.chu-NuS5LvNUpcJWk0Htik3J/w
[not found] ` <1550742637-12385-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-02-21 9:50 ` [PATCH v1 0/2] " stanley.chu-NuS5LvNUpcJWk0Htik3J/w
2019-02-21 9:50 ` [PATCH v1 1/2] dt-bindings: scsi: ufs: Add document for ufs-mediatek stanley.chu-NuS5LvNUpcJWk0Htik3J/w
2019-02-21 9:50 ` [PATCH v1 2/2] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips stanley.chu-NuS5LvNUpcJWk0Htik3J/w
[not found] ` <1550742637-12385-4-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-02-22 10:29 ` Avri Altman
[not found] ` <SN6PR04MB4925CDAF80047DBCED9E2836FC7F0-UKdxhu0+N/VnT3GYGerMaFM8qxBPnqtHvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-22 14:13 ` Stanley Chu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1550844831.30977.21.camel@mtkswgap22 \
--to=stanley.chu-nus5lvnupcjwk0htik3j/w@public.gmane.org \
--cc=Avri.Altman-Sjgp3cTcYWE@public.gmane.org \
--cc=chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).