[PATCH v1 2/2] ufs: mtk-host: Add MCQ feature

Eddie Huang (黃智傑) eddie.huang at mediatek.com
Mon Nov 7 23:32:41 PST 2022


Hi Angelo

Sorry for late due to miss the mail

On Wed, 2022-10-26 at 10:42 +0200, AngeloGioacchino Del Regno wrote:
> Il 26/10/22 09:39, Eddie Huang ha scritto:
> > Add Mediatek mcq resource and runtime configuration function
> > to support MCQ capability
> > 
> > Signed-off-by: Eddie Huang <eddie.huang at mediatek.com>
> > ---
> >   drivers/ufs/host/ufs-mediatek.c | 37
> > +++++++++++++++++++++++++++++++++++++
> >   drivers/ufs/host/ufs-mediatek.h |  7 +++++++
> >   2 files changed, 44 insertions(+)
> > 
> > diff --git a/drivers/ufs/host/ufs-mediatek.c
> > b/drivers/ufs/host/ufs-mediatek.c
> > index c958279..3f5fc05 100644
> > --- a/drivers/ufs/host/ufs-mediatek.c
> > +++ b/drivers/ufs/host/ufs-mediatek.c
> 
> ..snip..
> 
> > +
> > +static int ufs_mtk_config_mcq_resource(struct ufs_hba *hba)
> > +{
> > +	hba->mcq_base = hba->mmio_base +
> > +					MCQ_QUEUE_OFFSET(hba-
> > >mcq_capabilities);
> 

This define in UFSHCI4 spec
ADDR(SQATTR0) = UFS_HCI_BASE + QCFGPTR*200h

> This seems to either be an additional usecase that should be
> implemented into the
> API and not in MediaTek drivers, (as in that case I believe MediaTek
> won't be the
> only user of such usecase)... or just a way to avoid adding the MCQ
> iospace to the
> UFS devicetree node.
> 

I can base on next version of UFS MCQ patch [1], and check whether add
new API

[1]: https://www.spinics.net/lists/linux-scsi/msg178322.html

Thanks,
Eddie



More information about the Linux-mediatek mailing list