From: Christoph Hellwig <hch@infradead.org>
To: 김기웅 <kwmad.kim@samsung.com>
Cc: linux-scsi@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
cpgs@samsung.com, "HeonGwang Chu" <hg.chu@samsung.com>,
김부진 <boojin.kim@samsung.com>,
"YOUNGEUN PARK" <youngeun.park@samsung.com>
Subject: Re: [PATCH 2/2] scsi: ufs: add Exynos-specific driver
Date: Tue, 28 Nov 2017 06:24:39 -0800 [thread overview]
Message-ID: <20171128142439.GA5765@infradead.org> (raw)
In-Reply-To: <002a01d3680a$d8817200$89845600$@samsung.com>
On Tue, Nov 28, 2017 at 02:36:31PM +0900, 김기웅 wrote:
> This driver is to use UFS devices on Exynos SoC and
> has been already used for many years for commercial products.
So why do you only submit it only now?
> +/* Helper for UFS CAL interface */
> +static inline int ufs_init_cal(struct exynos_ufs *ufs, int idx,
> + struct platform_device *pdev)
> +{
> + return 0;
> +}
> +
> +static inline int ufs_pre_link(struct exynos_ufs *ufs)
> +{
> + return 0;
> +}
> +
> +static inline int ufs_post_link(struct exynos_ufs *ufs)
> +{
> + return 0;
> +}
> +
> +static inline int ufs_pre_gear_change(struct exynos_ufs *ufs,
> + struct uic_pwr_mode *pmd)
> +{
> + return 0;
> +}
> +
> +static inline int ufs_post_gear_change(struct exynos_ufs *ufs)
> +{
> + return 0;
> +}
> +
> +static inline int ufs_post_h8_enter(struct exynos_ufs *ufs)
> +{
> + return 0;
> +}
> +
> +static inline int ufs_pre_h8_exit(struct exynos_ufs *ufs)
> +{
> + return 0;
> +}
These are all dummys, please rmeove them.
> +#ifndef __EXYNOS_UFS_VS_DEBUG__
Please don't have ifdef code that isn't Kconfig selectable.
> +#ifndef __EXYNOS_UFS_MMIO_FUNC__
> +#define __EXYNOS_UFS_MMIO_FUNC__
> +#define EXYNOS_UFS_MMIO_FUNC(name) \
> +static inline void name##_writel(struct exynos_ufs *ufs, u32 val, u32 reg) \
> +{ \
> + writel(val, ufs->reg_##name + reg); \
> +} \
> + \
> +static inline u32 name##_readl(struct exynos_ufs *ufs, u32 reg) \
> +{ \
> + return readl(ufs->reg_##name + reg); \
> +}
> +
> +EXYNOS_UFS_MMIO_FUNC(hci);
> +EXYNOS_UFS_MMIO_FUNC(unipro);
Please remove this macro magic.
> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> index 1332e544da92..1afd5ac9707c 100644
> --- a/drivers/scsi/ufs/ufshcd.h
> +++ b/drivers/scsi/ufs/ufshcd.h
> @@ -308,6 +308,7 @@ struct ufs_hba_variant_ops {
> int (*setup_clocks)(struct ufs_hba *, bool,
> enum ufs_notify_change_status);
> int (*setup_regulators)(struct ufs_hba *, bool);
> + void (*host_reset)(struct ufs_hba *);
> int (*hce_enable_notify)(struct ufs_hba *,
> enum ufs_notify_change_status);
> int (*link_startup_notify)(struct ufs_hba *,
New ufs core methods should be added in a separate patch with
a good description, and also with actual callers using them.
next prev parent reply other threads:[~2017-11-28 14:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171128053631epcas1p389908b55511552b79b4083109dddc515@epcas1p3.samsung.com>
2017-11-28 5:36 ` [PATCH 2/2] scsi: ufs: add Exynos-specific driver 김기웅
2017-11-28 8:19 ` Jaehoon Chung
2017-11-28 8:27 ` 김기웅
2017-11-28 9:20 ` Jaehoon Chung
2017-11-30 8:35 ` 김기웅
2017-11-30 23:29 ` Jaehoon Chung
2017-11-28 14:24 ` Christoph Hellwig [this message]
2017-11-30 7:46 ` 김기웅
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=20171128142439.GA5765@infradead.org \
--to=hch@infradead.org \
--cc=boojin.kim@samsung.com \
--cc=cpgs@samsung.com \
--cc=hg.chu@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=youngeun.park@samsung.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).