All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minwoo Im <minwoo.im@samsung.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	gost.dev@samsung.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jeuk Kim <jeuk20.kim@samsung.com>,
	Minwoo Im <minwoo.im@samsung.com>
Subject: Re: [PATCH 1/3] ufs: mcq: Add ufshcd_mcq_queue_cfg_addr helper
Date: Sat, 1 Jun 2024 05:55:23 +0900	[thread overview]
Message-ID: <Zlo5O3NDlsX089Xz@localhost> (raw)
In-Reply-To: <d3d2d848-e70c-462b-bbb2-f5a2308646fd@acm.org>

[-- Attachment #1: Type: text/plain, Size: 2486 bytes --]

On 24-05-31 13:15:11, Bart Van Assche wrote:
> On 5/31/24 03:38, Minwoo Im wrote:
> > This helper returns an offset address of MCQ queue configuration
> > registers.  This is a prep patch for the following patch.
> > 
> > Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
> > ---
> >   drivers/ufs/core/ufs-mcq.c | 14 ++++++++++++++
> >   include/ufs/ufshcd.h       |  1 +
> >   2 files changed, 15 insertions(+)
> > 
> > diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
> > index 52210c4c20dc..46faa54aea94 100644
> > --- a/drivers/ufs/core/ufs-mcq.c
> > +++ b/drivers/ufs/core/ufs-mcq.c
> > @@ -18,6 +18,7 @@
> >   #include <linux/iopoll.h>
> >   #define MAX_QUEUE_SUP GENMASK(7, 0)
> > +#define QCFGPTR GENMASK(23, 16)
> >   #define UFS_MCQ_MIN_RW_QUEUES 2
> >   #define UFS_MCQ_MIN_READ_QUEUES 0
> >   #define UFS_MCQ_MIN_POLL_QUEUES 0
> > @@ -116,6 +117,19 @@ struct ufs_hw_queue *ufshcd_mcq_req_to_hwq(struct ufs_hba *hba,
> >   	return &hba->uhq[hwq];
> >   }
> > +/**
> > + * ufshcd_mcq_queue_cfg_addr - get an start address of the MCQ Queue Config
> > + * Registers.
> > + * @hba: per adapter instance
> > + *
> > + * Return: Start address of MCQ Queue Config Registers in HCI
> > + */
> > +unsigned int ufshcd_mcq_queue_cfg_addr(struct ufs_hba *hba)
> > +{
> > +	return FIELD_GET(QCFGPTR, hba->mcq_capabilities) * 0x200;
> > +}
> > +EXPORT_SYMBOL_GPL(ufshcd_mcq_queue_cfg_addr);
> > +
> >   /**
> >    * ufshcd_mcq_decide_queue_depth - decide the queue depth
> >    * @hba: per adapter instance
> > diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
> > index df68fb1d4f3f..9e0581115b34 100644
> > --- a/include/ufs/ufshcd.h
> > +++ b/include/ufs/ufshcd.h
> > @@ -1278,6 +1278,7 @@ void ufshcd_update_evt_hist(struct ufs_hba *hba, u32 id, u32 val);
> >   void ufshcd_hba_stop(struct ufs_hba *hba);
> >   void ufshcd_schedule_eh_work(struct ufs_hba *hba);
> >   void ufshcd_mcq_config_mac(struct ufs_hba *hba, u32 max_active_cmds);
> > +unsigned int ufshcd_mcq_queue_cfg_addr(struct ufs_hba *hba);
> >   u32 ufshcd_mcq_read_cqis(struct ufs_hba *hba, int i);
> >   void ufshcd_mcq_write_cqis(struct ufs_hba *hba, u32 val, int i);
> >   unsigned long ufshcd_mcq_poll_cqe_lock(struct ufs_hba *hba,
> 
> New functions should not be introduced as a separate patch but instead should
> be introduced in the first patch that adds a caller to the new function.

I will squash it to the second one and udpate it in the next version.

> 
> Thanks,
> 
> Bart.
> 

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2024-05-31 21:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240531104947epcas2p31961bda5ee0eb313c0d9a7d63d5461ba@epcas2p3.samsung.com>
2024-05-31 10:38 ` [PATCH 0/3] ufs: pci: Add support UFSHCI 4.0 MCQ Minwoo Im
2024-05-31 10:38   ` [PATCH 1/3] ufs: mcq: Add ufshcd_mcq_queue_cfg_addr helper Minwoo Im
2024-05-31 20:15     ` Bart Van Assche
2024-05-31 20:55       ` Minwoo Im [this message]
2024-05-31 10:38   ` [PATCH 2/3] ufs: pci: Add support MCQ for QEMU-based UFS Minwoo Im
2024-05-31 20:16     ` Bart Van Assche
2024-05-31 20:54       ` Minwoo Im
2024-05-31 10:38   ` [PATCH 3/3] ufs: mcq: Prevent no I/O queue case for MCQ Minwoo Im
2024-05-31 20:17     ` Bart Van Assche

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=Zlo5O3NDlsX089Xz@localhost \
    --to=minwoo.im@samsung.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=gost.dev@samsung.com \
    --cc=jeuk20.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.