From: "Alim Akhtar" <alim.akhtar@samsung.com>
To: "'Chanho Park'" <chanho61.park@samsung.com>,
"'James E . J . Bottomley'" <jejb@linux.ibm.com>,
"'Martin K . Petersen'" <martin.petersen@oracle.com>
Cc: "'Can Guo'" <cang@codeaurora.org>,
"'Jaegeuk Kim'" <jaegeuk@kernel.org>,
"'Kiwoong Kim'" <kwmad.kim@samsung.com>,
"'Avri Altman'" <avri.altman@wdc.com>,
"'Adrian Hunter'" <adrian.hunter@intel.com>,
"'Christoph Hellwig'" <hch@infradead.org>,
"'Bart Van Assche'" <bvanassche@acm.org>,
"'jongmin jeong'" <jjmin.jeong@samsung.com>,
"'Gyunghoon Kwon'" <goodjob.kwon@samsung.com>,
<linux-samsung-soc@vger.kernel.org>, <linux-scsi@vger.kernel.org>
Subject: RE: [PATCH 04/15] scsi: ufs: ufs-exynos: simplify drv_data retrieval
Date: Wed, 14 Jul 2021 00:29:41 +0530 [thread overview]
Message-ID: <037601d77819$404813e0$c0d83ba0$@samsung.com> (raw)
In-Reply-To: <20210709065711.25195-5-chanho61.park@samsung.com>
Hi Chanho
> -----Original Message-----
> From: Chanho Park <chanho61.park@samsung.com>
> Sent: 09 July 2021 12:27
> To: Alim Akhtar <alim.akhtar@samsung.com>; James E . J . Bottomley
> <jejb@linux.ibm.com>; Martin K . Petersen <martin.petersen@oracle.com>
> Cc: Can Guo <cang@codeaurora.org>; Jaegeuk Kim <jaegeuk@kernel.org>;
> Kiwoong Kim <kwmad.kim@samsung.com>; Avri Altman
> <avri.altman@wdc.com>; Adrian Hunter <adrian.hunter@intel.com>;
> Christoph Hellwig <hch@infradead.org>; Bart Van Assche
> <bvanassche@acm.org>; jongmin jeong <jjmin.jeong@samsung.com>;
> Gyunghoon Kwon <goodjob.kwon@samsung.com>; linux-samsung-
> soc@vger.kernel.org; linux-scsi@vger.kernel.org; Chanho Park
> <chanho61.park@samsung.com>
> Subject: [PATCH 04/15] scsi: ufs: ufs-exynos: simplify drv_data retrieval
>
> The compatible field of exynos_ufs_drv_data is not necessary because
> of_device_id already has it. Thus, we don't need it anymore and we can get
> drv_data by device_get_match_data.
>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
This patch can independently go in as this is clean-up and simplification of the existing driver.
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> drivers/scsi/ufs/ufs-exynos.c | 10 +--------- drivers/scsi/ufs/ufs-exynos.h |
> 3 +--
> 2 files changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
> index cf46d6f86e0e..db5892901cc0 100644
> --- a/drivers/scsi/ufs/ufs-exynos.c
> +++ b/drivers/scsi/ufs/ufs-exynos.c
> @@ -893,17 +893,10 @@ static int exynos_ufs_post_link(struct ufs_hba
> *hba) static int exynos_ufs_parse_dt(struct device *dev, struct exynos_ufs
> *ufs) {
> struct device_node *np = dev->of_node;
> - struct exynos_ufs_drv_data *drv_data = &exynos_ufs_drvs;
> struct exynos_ufs_uic_attr *attr;
> int ret = 0;
>
> - while (drv_data->compatible) {
> - if (of_device_is_compatible(np, drv_data->compatible)) {
> - ufs->drv_data = drv_data;
> - break;
> - }
> - drv_data++;
> - }
> + ufs->drv_data = device_get_match_data(dev);
>
> if (ufs->drv_data && ufs->drv_data->uic_attr) {
> attr = ufs->drv_data->uic_attr;
> @@ -1258,7 +1251,6 @@ static struct exynos_ufs_uic_attr exynos7_uic_attr
> = { };
>
> static struct exynos_ufs_drv_data exynos_ufs_drvs = {
> - .compatible = "samsung,exynos7-ufs",
> .uic_attr = &exynos7_uic_attr,
> .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN |
> UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR |
> diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h
> index 475a5adf0f8b..7bf2053f6e90 100644
> --- a/drivers/scsi/ufs/ufs-exynos.h
> +++ b/drivers/scsi/ufs/ufs-exynos.h
> @@ -142,7 +142,6 @@ struct exynos_ufs_uic_attr { };
>
> struct exynos_ufs_drv_data {
> - char *compatible;
> struct exynos_ufs_uic_attr *uic_attr;
> unsigned int quirks;
> unsigned int opts;
> @@ -191,7 +190,7 @@ struct exynos_ufs {
> struct ufs_pa_layer_attr dev_req_params;
> struct ufs_phy_time_cfg t_cfg;
> ktime_t entry_hibern8_t;
> - struct exynos_ufs_drv_data *drv_data;
> + const struct exynos_ufs_drv_data *drv_data;
>
> u32 opts;
> #define EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL BIT(0)
> --
> 2.32.0
next prev parent reply other threads:[~2021-07-14 3:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210709065721epcas2p46f7aae35571c10f233b71a6381214419@epcas2p4.samsung.com>
2021-07-09 6:56 ` [PATCH 00/15] introduce exynosauto v9 ufs driver Chanho Park
[not found] ` <CGME20210709065746epcas2p10d43898e863a873594f81f4a5a4f0ef2@epcas2p1.samsung.com>
2021-07-09 6:56 ` [PATCH 01/15] scsi: ufs: add quirk to handle broken UIC command Chanho Park
[not found] ` <CGME20210709065746epcas2p2f353983bbc64c1a21571fda2be59df34@epcas2p2.samsung.com>
2021-07-09 6:56 ` [PATCH 02/15] scsi: ufs: add quirk to enable host controller without interface configuration Chanho Park
2021-07-13 18:10 ` Alim Akhtar
2021-07-14 3:26 ` Chanho Park
[not found] ` <CGME20210709065746epcas2p47985fa3c33297a36d772fb9d45f30972@epcas2p4.samsung.com>
2021-07-09 6:56 ` [PATCH 03/15] scsi: ufs: ufs-exynos: change pclk available max value Chanho Park
2021-07-13 18:18 ` Alim Akhtar
[not found] ` <CGME20210709065746epcas2p26f07099abcb946400ff2777fd9df975d@epcas2p2.samsung.com>
2021-07-09 6:57 ` [PATCH 04/15] scsi: ufs: ufs-exynos: simplify drv_data retrieval Chanho Park
2021-07-13 18:59 ` Alim Akhtar [this message]
[not found] ` <CGME20210709065746epcas2p4cd871004fa034dace5046a8acf1d1b96@epcas2p4.samsung.com>
2021-07-09 6:57 ` [PATCH 05/15] scsi: ufs: ufs-exynos: get sysreg regmap for io-coherency Chanho Park
[not found] ` <CGME20210709065746epcas2p1367527fd1299b15fc339876281cb8af1@epcas2p1.samsung.com>
2021-07-09 6:57 ` [PATCH 06/15] scsi: ufs: ufs-exynos: add refclkout_stop control Chanho Park
2021-07-14 1:41 ` Alim Akhtar
[not found] ` <CGME20210709065746epcas2p20094c97a7abfd7704c30ca6bac04f924@epcas2p2.samsung.com>
2021-07-09 6:57 ` [PATCH 07/15] scsi: ufs: ufs-exynos: add setup_clocks callback Chanho Park
[not found] ` <CGME20210709065746epcas2p1b3e10cef9024d2092b019bddd7580256@epcas2p1.samsung.com>
2021-07-09 6:57 ` [PATCH 08/15] scsi: ufs: ufs-exynos: correct timeout value setting registers Chanho Park
[not found] ` <CGME20210709065746epcas2p35975dfa47363d0ea792988047f83a0ae@epcas2p3.samsung.com>
2021-07-09 6:57 ` [PATCH 09/15] scsi: ufs: ufs-exynos: support custom version of ufs_hba_variant_ops Chanho Park
[not found] ` <CGME20210709065747epcas2p2e966883390d1e77a43a897eae9ef0ad3@epcas2p2.samsung.com>
2021-07-09 6:57 ` [PATCH 10/15] scsi: ufs: ufs-exynos: add EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR option Chanho Park
[not found] ` <CGME20210709065747epcas2p11576f5bd85eb2d99ae24a7241869a2f9@epcas2p1.samsung.com>
2021-07-09 6:57 ` [PATCH 11/15] scsi: ufs: ufs-exynos: factor out priv data init Chanho Park
[not found] ` <CGME20210709065747epcas2p284a0f5eac2e46bf03283b7a7363616c4@epcas2p2.samsung.com>
2021-07-09 6:57 ` [PATCH 12/15] scsi: ufs: ufs-exynos: add pre/post_hce_enable drv callbacks Chanho Park
[not found] ` <CGME20210709065747epcas2p483ee186906567e9e61a2a2c10209fc79@epcas2p4.samsung.com>
2021-07-09 6:57 ` [PATCH 13/15] scsi: ufs: ufs-exynos: support exynosauto v9 ufs driver Chanho Park
2021-07-13 10:57 ` Krzysztof Kozlowski
2021-07-13 12:07 ` Chanho Park
2021-07-13 12:11 ` Alim Akhtar
2021-07-16 15:03 ` Rob Herring
[not found] ` <CGME20210709065747epcas2p10c59e097d9770fc02134cb0545c9de4f@epcas2p1.samsung.com>
2021-07-09 6:57 ` [PATCH 14/15] scsi: ufs: ufs-exynos: multi-host configuration for exynosauto Chanho Park
2021-08-03 16:57 ` Bean Huo
2021-08-03 23:35 ` Chanho Park
[not found] ` <CGME20210709065747epcas2p37d1d2fc1ce5b582b71fa5187099d1801@epcas2p3.samsung.com>
2021-07-09 6:57 ` [PATCH 15/15] scsi: ufs: ufs-exynos: introduce exynosauto v9 virtual host Chanho Park
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='037601d77819$404813e0$c0d83ba0$@samsung.com' \
--to=alim.akhtar@samsung.com \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=chanho61.park@samsung.com \
--cc=goodjob.kwon@samsung.com \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=jjmin.jeong@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-samsung-soc@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 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).