From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Piyush Malgujar <pmalgujar@marvell.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
adrian.hunter@intel.com, ulf.hansson@linaro.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
yamada.masahiro@socionext.com, devicetree@vger.kernel.org
Cc: jannadurai@marvell.com, cchavva@marvell.com,
Dhananjay Kangude <dkangude@cadence.com>
Subject: Re: [PATCH v2 1/5] drivers: mmc: sdhci-cadence: Reformat the code
Date: Mon, 23 Jan 2023 20:37:35 +0100 [thread overview]
Message-ID: <c1a49032-eefd-e028-5a10-845bd0762362@linaro.org> (raw)
In-Reply-To: <20230123192735.21136-2-pmalgujar@marvell.com>
On 23/01/2023 20:27, Piyush Malgujar wrote:
> From: Dhananjay Kangude <dkangude@cadence.com>
>
Use subject prefixes matching the subsystem (which you can get for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching).
(there is no "drivers:" part)
> Reformat the code so that further SD6 changes could be
> added and it could be isolated from SD4 related code.
> Also renamed functions accordingly.
Your code makes much more than just reformat. Split trivial reformating
and renaming from code which has functional impact.
>
> Signed-off-by: Dhananjay Kangude <dkangude@cadence.com>
> Co-developed-by: Jayanthi Annadurai <jannadurai@marvell.com>
> Signed-off-by: Jayanthi Annadurai <jannadurai@marvell.com>
> Signed-off-by: Piyush Malgujar <pmalgujar@marvell.com>
> ---
> drivers/mmc/host/sdhci-cadence.c | 165 ++++++++++++++++++++-----------
> 1 file changed, 110 insertions(+), 55 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
> index 6f2de54a598773879bf339aae8450f63e1251509..cb108ff9abda32767b356bb572abdf8626746cd6 100644
> --- a/drivers/mmc/host/sdhci-cadence.c
> +++ b/drivers/mmc/host/sdhci-cadence.c
> @@ -15,14 +15,14 @@
>
> #include "sdhci-pltfm.h"
>
> -/* HRS - Host Register Set (specific to Cadence) */
> +/* SD 4.0 Controller HRS - Host Register Set (specific to Cadence) */
> #define SDHCI_CDNS_HRS04 0x10 /* PHY access port */
> -#define SDHCI_CDNS_HRS04_ACK BIT(26)
> -#define SDHCI_CDNS_HRS04_RD BIT(25)
> -#define SDHCI_CDNS_HRS04_WR BIT(24)
> -#define SDHCI_CDNS_HRS04_RDATA GENMASK(23, 16)
> -#define SDHCI_CDNS_HRS04_WDATA GENMASK(15, 8)
> -#define SDHCI_CDNS_HRS04_ADDR GENMASK(5, 0)
> +#define SDHCI_CDNS_SD4_HRS04_ACK BIT(26)
> +#define SDHCI_CDNS_SD4_HRS04_RD BIT(25)
> +#define SDHCI_CDNS_SD4_HRS04_WR BIT(24)
> +#define SDHCI_CDNS_SD4_HRS04_RDATA GENMASK(23, 16)
> +#define SDHCI_CDNS_SD4_HRS04_WDATA GENMASK(15, 8)
> +#define SDHCI_CDNS_SD4_HRS04_ADDR GENMASK(5, 0)
>
> #define SDHCI_CDNS_HRS06 0x18 /* eMMC control */
> #define SDHCI_CDNS_HRS06_TUNE_UP BIT(15)
> @@ -38,7 +38,7 @@
> /* SRS - Slot Register Set (SDHCI-compatible) */
> #define SDHCI_CDNS_SRS_BASE 0x200
>
> -/* PHY */
> +/* PHY registers for SD4 controller */
> #define SDHCI_CDNS_PHY_DLY_SD_HS 0x00
> #define SDHCI_CDNS_PHY_DLY_SD_DEFAULT 0x01
> #define SDHCI_CDNS_PHY_DLY_UHS_SDR12 0x02
> @@ -59,24 +59,43 @@
> */
> #define SDHCI_CDNS_MAX_TUNING_LOOP 40
>
> -struct sdhci_cdns_phy_param {
> +struct sdhci_cdns_priv;
> +
> +struct sdhci_cdns_sd4_phy_param {
> u8 addr;
> u8 data;
> };
>
> +struct sdhci_cdns_data {
> + int (*phy_init)(struct sdhci_cdns_priv *priv);
> + int (*set_tune_val)(struct sdhci_host *host, unsigned int val);
> +};
> +
> +struct sdhci_cdns_sd4_phy {
> + unsigned int nr_phy_params;
> + struct sdhci_cdns_sd4_phy_param phy_params[];
> +};
Defining new structures is not a "reformat".
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-01-23 19:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 19:27 [PATCH v2 0/5] drivers: mmc: sdhci-cadence: SD6 controller support Piyush Malgujar
2023-01-23 19:27 ` [PATCH v2 1/5] drivers: mmc: sdhci-cadence: Reformat the code Piyush Malgujar
2023-01-23 19:37 ` Krzysztof Kozlowski [this message]
2023-02-02 18:42 ` Adrian Hunter
2023-02-20 13:40 ` Piyush Malgujar
2023-01-23 19:27 ` [PATCH v2 2/5] drivers: mmc: sdhci-cadence: SD6 controller support Piyush Malgujar
2023-01-23 19:27 ` [PATCH v2 3/5] drivers: mmc: sdhci-cadence: enable MMC_SDHCI_IO_ACCESSORS Piyush Malgujar
2023-01-23 19:27 ` [PATCH v2 4/5] dt-bindings: mmc: sdhci-cadence: SD6 support Piyush Malgujar
2023-01-23 19:42 ` Krzysztof Kozlowski
2023-02-20 13:22 ` Piyush Malgujar
2023-02-20 13:48 ` Krzysztof Kozlowski
2023-01-23 19:27 ` [PATCH v2 5/5] drivers: mmc: sdhci-cadence: Add debug option for sdhci-cadence driver Piyush Malgujar
2023-01-23 19:41 ` Krzysztof Kozlowski
2023-02-02 18:45 ` Adrian Hunter
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=c1a49032-eefd-e028-5a10-845bd0762362@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=adrian.hunter@intel.com \
--cc=cchavva@marvell.com \
--cc=devicetree@vger.kernel.org \
--cc=dkangude@cadence.com \
--cc=jannadurai@marvell.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=pmalgujar@marvell.com \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=yamada.masahiro@socionext.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