* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg @ 2016-07-26 10:06 ` Jaehoon Chung 2016-07-26 10:06 ` [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns " Jaehoon Chung ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Jaehoon Chung @ 2016-07-26 10:06 UTC (permalink / raw) To: u-boot buswidth isn't used anywhere in sdhci_setup_cfg. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> --- drivers/mmc/msm_sdhci.c | 4 ++-- drivers/mmc/sdhci.c | 4 ++-- drivers/mmc/zynq_sdhci.c | 2 +- include/sdhci.h | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 70a8d96..e90a044 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -144,8 +144,8 @@ static int msm_sdc_probe(struct udevice *dev) host->version = sdhci_readw(host, SDHCI_HOST_VERSION); caps = sdhci_readl(host, SDHCI_CAPABILITIES); - ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width, - caps, 0, 0, host->version, host->quirks, 0); + ret = sdhci_setup_cfg(&plat->cfg, dev->name, caps, + 0, 0, host->version, host->quirks, 0); host->mmc = &plat->mmc; if (ret) return ret; diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index de8d8ea..d8cd75f 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -510,7 +510,7 @@ static const struct mmc_ops sdhci_ops = { }; #endif -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, +int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, uint caps, u32 max_clk, u32 min_clk, uint version, uint quirks, uint host_caps) { @@ -584,7 +584,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) } #endif - if (sdhci_setup_cfg(&host->cfg, host->name, host->bus_width, caps, + if (sdhci_setup_cfg(&host->cfg, host->name, caps, max_clk, min_clk, SDHCI_GET_VERSION(host), host->quirks, host->host_caps)) { printf("%s: Hardware doesn't specify base clock frequency\n", diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index bcd154a..69d6151 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -40,7 +40,7 @@ static int arasan_sdhci_probe(struct udevice *dev) host->version = sdhci_readw(host, SDHCI_HOST_VERSION); caps = sdhci_readl(host, SDHCI_CAPABILITIES); - ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width, + ret = sdhci_setup_cfg(&plat->cfg, dev->name, caps, CONFIG_ZYNQ_SDHCI_MAX_FREQ, CONFIG_ZYNQ_SDHCI_MIN_FREQ, host->version, host->quirks, 0); diff --git a/include/sdhci.h b/include/sdhci.h index c4d3b55..693ecc1 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -368,7 +368,6 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) * * @cfg: Configuration structure to fill in (generally &plat->mmc) * @name: Device name (normally dev->name) - * @buswidth: Bus width (in bits, such as 4 or 8) * @caps: Host capabilities (MMC_MODE_...) * @max_clk: Maximum supported clock speed in HZ (0 for default) * @min_clk: Minimum supported clock speed in HZ (0 for default) @@ -377,7 +376,7 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) * @quirks: Quick flags (SDHCI_QUIRK_...) * @host_caps: Additional host capabilities (0 if none) */ -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, +int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, uint caps, u32 max_clk, u32 min_clk, uint version, uint quirks, uint host_caps); -- 1.9.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns for sdhci_setup_cfg 2016-07-26 10:06 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg Jaehoon Chung @ 2016-07-26 10:06 ` Jaehoon Chung 2016-08-01 2:20 ` Simon Glass 2016-07-27 1:10 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument " Minkyu Kang 2016-08-01 2:20 ` Simon Glass 2 siblings, 1 reply; 13+ messages in thread From: Jaehoon Chung @ 2016-07-26 10:06 UTC (permalink / raw) To: u-boot Some arguments don't need to pass to sdhci_setup_cfg. Generic variable can be used in sdhci_setup_cfg, and some arguments are already included in sdhci_host struct. It's enough that just pass the board specific things to sdhci_setup_cfg(). After removing the unnecessary arguments, it's more simpler than before. It doesn't consider "Version" and "Capabilities" anymore in each SoC driver. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> --- drivers/mmc/msm_sdhci.c | 4 +--- drivers/mmc/sdhci.c | 28 +++++++++++++++------------- drivers/mmc/zynq_sdhci.c | 9 ++------- include/sdhci.h | 12 +++--------- 4 files changed, 21 insertions(+), 32 deletions(-) diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index e90a044..a8cb9e2 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -143,9 +143,7 @@ static int msm_sdc_probe(struct udevice *dev) /* Set host controller version */ host->version = sdhci_readw(host, SDHCI_HOST_VERSION); - caps = sdhci_readl(host, SDHCI_CAPABILITIES); - ret = sdhci_setup_cfg(&plat->cfg, dev->name, caps, - 0, 0, host->version, host->quirks, 0); + ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0); host->mmc = &plat->mmc; if (ret) return ret; diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index d8cd75f..86ddab4 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -510,18 +510,22 @@ static const struct mmc_ops sdhci_ops = { }; #endif -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, - uint caps, u32 max_clk, u32 min_clk, uint version, - uint quirks, uint host_caps) +int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, + u32 max_clk, u32 min_clk) { - cfg->name = name; + u32 caps; + + caps = sdhci_readl(host, SDHCI_CAPABILITIES); + host->version = sdhci_readw(host, SDHCI_HOST_VERSION); + + cfg->name = host->name; #ifndef CONFIG_DM_MMC_OPS cfg->ops = &sdhci_ops; #endif if (max_clk) cfg->f_max = max_clk; else { - if (version >= SDHCI_SPEC_300) + if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) cfg->f_max = (caps & SDHCI_CLOCK_V3_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; else @@ -534,7 +538,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, if (min_clk) cfg->f_min = min_clk; else { - if (version >= SDHCI_SPEC_300) + if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) cfg->f_min = cfg->f_max / SDHCI_MAX_DIV_SPEC_300; else cfg->f_min = cfg->f_max / SDHCI_MAX_DIV_SPEC_200; @@ -548,16 +552,16 @@ int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, cfg->voltages |= MMC_VDD_165_195; cfg->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT; - if (version >= SDHCI_SPEC_300) { + if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { if (caps & SDHCI_CAN_DO_8BIT) cfg->host_caps |= MMC_MODE_8BIT; } - if (quirks & SDHCI_QUIRK_NO_HISPD_BIT) + if (host->quirks & SDHCI_QUIRK_NO_HISPD_BIT) cfg->host_caps &= ~(MMC_MODE_HS | MMC_MODE_HS_52MHz); - if (host_caps) - cfg->host_caps |= host_caps; + if (host->host_caps) + cfg->host_caps |= host->host_caps; cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; @@ -584,9 +588,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) } #endif - if (sdhci_setup_cfg(&host->cfg, host->name, caps, - max_clk, min_clk, SDHCI_GET_VERSION(host), - host->quirks, host->host_caps)) { + if (sdhci_setup_cfg(&host->cfg, host, max_clk, min_clk)) { printf("%s: Hardware doesn't specify base clock frequency\n", __func__); return -EINVAL; diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index 69d6151..b7d1f94 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -37,13 +37,8 @@ static int arasan_sdhci_probe(struct udevice *dev) host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT; #endif - host->version = sdhci_readw(host, SDHCI_HOST_VERSION); - - caps = sdhci_readl(host, SDHCI_CAPABILITIES); - ret = sdhci_setup_cfg(&plat->cfg, dev->name, - caps, CONFIG_ZYNQ_SDHCI_MAX_FREQ, - CONFIG_ZYNQ_SDHCI_MIN_FREQ, host->version, - host->quirks, 0); + ret = sdhci_setup_cfg(&plat->cfg, host, CONFIG_ZYNQ_SDHCI_MAX_FREQ, + CONFIG_ZYNQ_SDHCI_MIN_FREQ); host->mmc = &plat->mmc; if (ret) return ret; diff --git a/include/sdhci.h b/include/sdhci.h index 693ecc1..fcef4dc 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -367,18 +367,12 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) * See msm_sdhci.c for an example. * * @cfg: Configuration structure to fill in (generally &plat->mmc) - * @name: Device name (normally dev->name) - * @caps: Host capabilities (MMC_MODE_...) + * @host: SDHCI host structure * @max_clk: Maximum supported clock speed in HZ (0 for default) * @min_clk: Minimum supported clock speed in HZ (0 for default) - * @version: Host controller version (generally read from the - * SDHCI_HOST_VERSION register) - * @quirks: Quick flags (SDHCI_QUIRK_...) - * @host_caps: Additional host capabilities (0 if none) */ -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, - uint caps, u32 max_clk, u32 min_clk, uint version, - uint quirks, uint host_caps); +int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, + u32 max_clk, u32 min_clk); /** * sdhci_bind() - Set up a new MMC block device -- 1.9.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns for sdhci_setup_cfg 2016-07-26 10:06 ` [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns " Jaehoon Chung @ 2016-08-01 2:20 ` Simon Glass 2016-08-04 2:36 ` Simon Glass 0 siblings, 1 reply; 13+ messages in thread From: Simon Glass @ 2016-08-01 2:20 UTC (permalink / raw) To: u-boot On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: > Some arguments don't need to pass to sdhci_setup_cfg. > Generic variable can be used in sdhci_setup_cfg, and some arguments are > already included in sdhci_host struct. > > It's enough that just pass the board specific things to sdhci_setup_cfg(). > After removing the unnecessary arguments, it's more simpler than before. > It doesn't consider "Version" and "Capabilities" anymore in each SoC > driver. > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > drivers/mmc/msm_sdhci.c | 4 +--- > drivers/mmc/sdhci.c | 28 +++++++++++++++------------- > drivers/mmc/zynq_sdhci.c | 9 ++------- > include/sdhci.h | 12 +++--------- > 4 files changed, 21 insertions(+), 32 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns for sdhci_setup_cfg 2016-08-01 2:20 ` Simon Glass @ 2016-08-04 2:36 ` Simon Glass 2016-08-04 2:39 ` Jaehoon Chung 0 siblings, 1 reply; 13+ messages in thread From: Simon Glass @ 2016-08-04 2:36 UTC (permalink / raw) To: u-boot On 31 July 2016 at 20:20, Simon Glass <sjg@chromium.org> wrote: > On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: >> Some arguments don't need to pass to sdhci_setup_cfg. >> Generic variable can be used in sdhci_setup_cfg, and some arguments are >> already included in sdhci_host struct. >> >> It's enough that just pass the board specific things to sdhci_setup_cfg(). >> After removing the unnecessary arguments, it's more simpler than before. >> It doesn't consider "Version" and "Capabilities" anymore in each SoC >> driver. >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >> --- >> drivers/mmc/msm_sdhci.c | 4 +--- >> drivers/mmc/sdhci.c | 28 +++++++++++++++------------- >> drivers/mmc/zynq_sdhci.c | 9 ++------- >> include/sdhci.h | 12 +++--------- >> 4 files changed, 21 insertions(+), 32 deletions(-) > > Reviewed-by: Simon Glass <sjg@chromium.org> If you are applying this, can you please fix the typo in the subject? - Simon ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns for sdhci_setup_cfg 2016-08-04 2:36 ` Simon Glass @ 2016-08-04 2:39 ` Jaehoon Chung 0 siblings, 0 replies; 13+ messages in thread From: Jaehoon Chung @ 2016-08-04 2:39 UTC (permalink / raw) To: u-boot Hi Simon, On 08/04/2016 11:36 AM, Simon Glass wrote: > On 31 July 2016 at 20:20, Simon Glass <sjg@chromium.org> wrote: >> On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: >>> Some arguments don't need to pass to sdhci_setup_cfg. >>> Generic variable can be used in sdhci_setup_cfg, and some arguments are >>> already included in sdhci_host struct. >>> >>> It's enough that just pass the board specific things to sdhci_setup_cfg(). >>> After removing the unnecessary arguments, it's more simpler than before. >>> It doesn't consider "Version" and "Capabilities" anymore in each SoC >>> driver. >>> >>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >>> --- >>> drivers/mmc/msm_sdhci.c | 4 +--- >>> drivers/mmc/sdhci.c | 28 +++++++++++++++------------- >>> drivers/mmc/zynq_sdhci.c | 9 ++------- >>> include/sdhci.h | 12 +++--------- >>> 4 files changed, 21 insertions(+), 32 deletions(-) >> >> Reviewed-by: Simon Glass <sjg@chromium.org> > > If you are applying this, can you please fix the typo in the subject? Sure! Also i'm preparing other mmc patches..Thanks for reminding. Best Regards, Jaehoon Chung > > - Simon > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-07-26 10:06 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg Jaehoon Chung 2016-07-26 10:06 ` [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns " Jaehoon Chung @ 2016-07-27 1:10 ` Minkyu Kang 2016-07-27 11:26 ` Jaehoon Chung 2016-08-01 2:20 ` Simon Glass 2 siblings, 1 reply; 13+ messages in thread From: Minkyu Kang @ 2016-07-27 1:10 UTC (permalink / raw) To: u-boot Hi, On 26/07/16 19:06, Jaehoon Chung wrote: > buswidth isn't used anywhere in sdhci_setup_cfg. > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > drivers/mmc/msm_sdhci.c | 4 ++-- > drivers/mmc/sdhci.c | 4 ++-- > drivers/mmc/zynq_sdhci.c | 2 +- > include/sdhci.h | 3 +-- > 4 files changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c > index 70a8d96..e90a044 100644 > --- a/drivers/mmc/msm_sdhci.c > +++ b/drivers/mmc/msm_sdhci.c > @@ -144,8 +144,8 @@ static int msm_sdc_probe(struct udevice *dev) > host->version = sdhci_readw(host, SDHCI_HOST_VERSION); > > caps = sdhci_readl(host, SDHCI_CAPABILITIES); > - ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width, > - caps, 0, 0, host->version, host->quirks, 0); > + ret = sdhci_setup_cfg(&plat->cfg, dev->name, caps, > + 0, 0, host->version, host->quirks, 0); > host->mmc = &plat->mmc; > if (ret) > return ret; > diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c > index de8d8ea..d8cd75f 100644 > --- a/drivers/mmc/sdhci.c > +++ b/drivers/mmc/sdhci.c > @@ -510,7 +510,7 @@ static const struct mmc_ops sdhci_ops = { > }; > #endif > > -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, > +int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, > uint caps, u32 max_clk, u32 min_clk, uint version, > uint quirks, uint host_caps) > { > @@ -584,7 +584,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) > } > #endif > > - if (sdhci_setup_cfg(&host->cfg, host->name, host->bus_width, caps, > + if (sdhci_setup_cfg(&host->cfg, host->name, caps, > max_clk, min_clk, SDHCI_GET_VERSION(host), > host->quirks, host->host_caps)) { > printf("%s: Hardware doesn't specify base clock frequency\n", > diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c > index bcd154a..69d6151 100644 > --- a/drivers/mmc/zynq_sdhci.c > +++ b/drivers/mmc/zynq_sdhci.c > @@ -40,7 +40,7 @@ static int arasan_sdhci_probe(struct udevice *dev) > host->version = sdhci_readw(host, SDHCI_HOST_VERSION); > > caps = sdhci_readl(host, SDHCI_CAPABILITIES); > - ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width, > + ret = sdhci_setup_cfg(&plat->cfg, dev->name, > caps, CONFIG_ZYNQ_SDHCI_MAX_FREQ, > CONFIG_ZYNQ_SDHCI_MIN_FREQ, host->version, > host->quirks, 0); > diff --git a/include/sdhci.h b/include/sdhci.h > index c4d3b55..693ecc1 100644 > --- a/include/sdhci.h > +++ b/include/sdhci.h > @@ -368,7 +368,6 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) > * > * @cfg: Configuration structure to fill in (generally &plat->mmc) > * @name: Device name (normally dev->name) > - * @buswidth: Bus width (in bits, such as 4 or 8) > * @caps: Host capabilities (MMC_MODE_...) > * @max_clk: Maximum supported clock speed in HZ (0 for default) > * @min_clk: Minimum supported clock speed in HZ (0 for default) > @@ -377,7 +376,7 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) > * @quirks: Quick flags (SDHCI_QUIRK_...) > * @host_caps: Additional host capabilities (0 if none) > */ > -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, > +int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, > uint caps, u32 max_clk, u32 min_clk, uint version, > uint quirks, uint host_caps); > > looks good to me. Reviewed-by: Minkyu Kang <mk7.kang@samsung.com> but, this may make conflict with your patch (http://patchwork.ozlabs.org/patch/651179/) What patch will apply first? Please let me know. Thanks, Minkyu Kang. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-07-27 1:10 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument " Minkyu Kang @ 2016-07-27 11:26 ` Jaehoon Chung 0 siblings, 0 replies; 13+ messages in thread From: Jaehoon Chung @ 2016-07-27 11:26 UTC (permalink / raw) To: u-boot Hi, On 07/27/2016 10:10 AM, Minkyu Kang wrote: > Hi, > > On 26/07/16 19:06, Jaehoon Chung wrote: >> buswidth isn't used anywhere in sdhci_setup_cfg. >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >> --- >> drivers/mmc/msm_sdhci.c | 4 ++-- >> drivers/mmc/sdhci.c | 4 ++-- >> drivers/mmc/zynq_sdhci.c | 2 +- >> include/sdhci.h | 3 +-- >> 4 files changed, 6 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c >> index 70a8d96..e90a044 100644 >> --- a/drivers/mmc/msm_sdhci.c >> +++ b/drivers/mmc/msm_sdhci.c >> @@ -144,8 +144,8 @@ static int msm_sdc_probe(struct udevice *dev) >> host->version = sdhci_readw(host, SDHCI_HOST_VERSION); >> >> caps = sdhci_readl(host, SDHCI_CAPABILITIES); >> - ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width, >> - caps, 0, 0, host->version, host->quirks, 0); >> + ret = sdhci_setup_cfg(&plat->cfg, dev->name, caps, >> + 0, 0, host->version, host->quirks, 0); >> host->mmc = &plat->mmc; >> if (ret) >> return ret; >> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c >> index de8d8ea..d8cd75f 100644 >> --- a/drivers/mmc/sdhci.c >> +++ b/drivers/mmc/sdhci.c >> @@ -510,7 +510,7 @@ static const struct mmc_ops sdhci_ops = { >> }; >> #endif >> >> -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, >> +int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, >> uint caps, u32 max_clk, u32 min_clk, uint version, >> uint quirks, uint host_caps) >> { >> @@ -584,7 +584,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) >> } >> #endif >> >> - if (sdhci_setup_cfg(&host->cfg, host->name, host->bus_width, caps, >> + if (sdhci_setup_cfg(&host->cfg, host->name, caps, >> max_clk, min_clk, SDHCI_GET_VERSION(host), >> host->quirks, host->host_caps)) { >> printf("%s: Hardware doesn't specify base clock frequency\n", >> diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c >> index bcd154a..69d6151 100644 >> --- a/drivers/mmc/zynq_sdhci.c >> +++ b/drivers/mmc/zynq_sdhci.c >> @@ -40,7 +40,7 @@ static int arasan_sdhci_probe(struct udevice *dev) >> host->version = sdhci_readw(host, SDHCI_HOST_VERSION); >> >> caps = sdhci_readl(host, SDHCI_CAPABILITIES); >> - ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width, >> + ret = sdhci_setup_cfg(&plat->cfg, dev->name, >> caps, CONFIG_ZYNQ_SDHCI_MAX_FREQ, >> CONFIG_ZYNQ_SDHCI_MIN_FREQ, host->version, >> host->quirks, 0); >> diff --git a/include/sdhci.h b/include/sdhci.h >> index c4d3b55..693ecc1 100644 >> --- a/include/sdhci.h >> +++ b/include/sdhci.h >> @@ -368,7 +368,6 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) >> * >> * @cfg: Configuration structure to fill in (generally &plat->mmc) >> * @name: Device name (normally dev->name) >> - * @buswidth: Bus width (in bits, such as 4 or 8) >> * @caps: Host capabilities (MMC_MODE_...) >> * @max_clk: Maximum supported clock speed in HZ (0 for default) >> * @min_clk: Minimum supported clock speed in HZ (0 for default) >> @@ -377,7 +376,7 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) >> * @quirks: Quick flags (SDHCI_QUIRK_...) >> * @host_caps: Additional host capabilities (0 if none) >> */ >> -int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, >> +int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, >> uint caps, u32 max_clk, u32 min_clk, uint version, >> uint quirks, uint host_caps); >> >> > > looks good to me. > > Reviewed-by: Minkyu Kang <mk7.kang@samsung.com> > > but, this may make conflict with your patch (http://patchwork.ozlabs.org/patch/651179/) > What patch will apply first? > Please let me know. If applied my patches, then i want to apply this at first, not "s5p_sdhci: support the Driver model for Exynos". But I want to know Simon's opinion about this patch. I don't know correct why passed the buswidth. The below patch will resend with other patch..(Modify Device-tree and remove the unused codes.) http://patchwork.ozlabs.org/patch/651179 Best Regards, Jaehoon Chung > > Thanks, > Minkyu Kang. > > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-07-26 10:06 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg Jaehoon Chung 2016-07-26 10:06 ` [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns " Jaehoon Chung 2016-07-27 1:10 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument " Minkyu Kang @ 2016-08-01 2:20 ` Simon Glass 2016-08-04 2:35 ` Simon Glass 2 siblings, 1 reply; 13+ messages in thread From: Simon Glass @ 2016-08-01 2:20 UTC (permalink / raw) To: u-boot On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: > buswidth isn't used anywhere in sdhci_setup_cfg. > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > drivers/mmc/msm_sdhci.c | 4 ++-- > drivers/mmc/sdhci.c | 4 ++-- > drivers/mmc/zynq_sdhci.c | 2 +- > include/sdhci.h | 3 +-- > 4 files changed, 6 insertions(+), 7 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-08-01 2:20 ` Simon Glass @ 2016-08-04 2:35 ` Simon Glass 2016-08-04 2:38 ` Jaehoon Chung 0 siblings, 1 reply; 13+ messages in thread From: Simon Glass @ 2016-08-04 2:35 UTC (permalink / raw) To: u-boot Hi Jaehoon, On 31 July 2016 at 20:20, Simon Glass <sjg@chromium.org> wrote: > On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: >> buswidth isn't used anywhere in sdhci_setup_cfg. >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >> --- >> drivers/mmc/msm_sdhci.c | 4 ++-- >> drivers/mmc/sdhci.c | 4 ++-- >> drivers/mmc/zynq_sdhci.c | 2 +- >> include/sdhci.h | 3 +-- >> 4 files changed, 6 insertions(+), 7 deletions(-) > > Reviewed-by: Simon Glass <sjg@chromium.org> Are you going to pick this up? I suggest that it goes in now since it will affect people porting drivers. Regards, Simon ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-08-04 2:35 ` Simon Glass @ 2016-08-04 2:38 ` Jaehoon Chung 2016-08-04 2:40 ` Simon Glass 0 siblings, 1 reply; 13+ messages in thread From: Jaehoon Chung @ 2016-08-04 2:38 UTC (permalink / raw) To: u-boot Hi Simon, On 08/04/2016 11:35 AM, Simon Glass wrote: > Hi Jaehoon, > > On 31 July 2016 at 20:20, Simon Glass <sjg@chromium.org> wrote: >> On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: >>> buswidth isn't used anywhere in sdhci_setup_cfg. >>> >>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >>> --- >>> drivers/mmc/msm_sdhci.c | 4 ++-- >>> drivers/mmc/sdhci.c | 4 ++-- >>> drivers/mmc/zynq_sdhci.c | 2 +- >>> include/sdhci.h | 3 +-- >>> 4 files changed, 6 insertions(+), 7 deletions(-) >> >> Reviewed-by: Simon Glass <sjg@chromium.org> > > Are you going to pick this up? I suggest that it goes in now since it > will affect people porting drivers. I think it's related with DM side. So if you can pick this, I'm ok. Otherwise, i will apply on u-boot-mmc, today..And tomorrow i will request pull. > > Regards, > Simon > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-08-04 2:38 ` Jaehoon Chung @ 2016-08-04 2:40 ` Simon Glass 2016-08-04 2:43 ` Jaehoon Chung 0 siblings, 1 reply; 13+ messages in thread From: Simon Glass @ 2016-08-04 2:40 UTC (permalink / raw) To: u-boot Hi Jaehoon, On 3 August 2016 at 20:38, Jaehoon Chung <jh80.chung@samsung.com> wrote: > Hi Simon, > > On 08/04/2016 11:35 AM, Simon Glass wrote: >> Hi Jaehoon, >> >> On 31 July 2016 at 20:20, Simon Glass <sjg@chromium.org> wrote: >>> On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: >>>> buswidth isn't used anywhere in sdhci_setup_cfg. >>>> >>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >>>> --- >>>> drivers/mmc/msm_sdhci.c | 4 ++-- >>>> drivers/mmc/sdhci.c | 4 ++-- >>>> drivers/mmc/zynq_sdhci.c | 2 +- >>>> include/sdhci.h | 3 +-- >>>> 4 files changed, 6 insertions(+), 7 deletions(-) >>> >>> Reviewed-by: Simon Glass <sjg@chromium.org> >> >> Are you going to pick this up? I suggest that it goes in now since it >> will affect people porting drivers. > > I think it's related with DM side. So if you can pick this, I'm ok. > Otherwise, i will apply on u-boot-mmc, today..And tomorrow i will request pull. Yes it is DM-related, but if you don't mind I think it would be good for you to pick these up. Regards, Simon ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-08-04 2:40 ` Simon Glass @ 2016-08-04 2:43 ` Jaehoon Chung 2016-08-04 4:21 ` Simon Glass 0 siblings, 1 reply; 13+ messages in thread From: Jaehoon Chung @ 2016-08-04 2:43 UTC (permalink / raw) To: u-boot On 08/04/2016 11:40 AM, Simon Glass wrote: > Hi Jaehoon, > > On 3 August 2016 at 20:38, Jaehoon Chung <jh80.chung@samsung.com> wrote: >> Hi Simon, >> >> On 08/04/2016 11:35 AM, Simon Glass wrote: >>> Hi Jaehoon, >>> >>> On 31 July 2016 at 20:20, Simon Glass <sjg@chromium.org> wrote: >>>> On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: >>>>> buswidth isn't used anywhere in sdhci_setup_cfg. >>>>> >>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >>>>> --- >>>>> drivers/mmc/msm_sdhci.c | 4 ++-- >>>>> drivers/mmc/sdhci.c | 4 ++-- >>>>> drivers/mmc/zynq_sdhci.c | 2 +- >>>>> include/sdhci.h | 3 +-- >>>>> 4 files changed, 6 insertions(+), 7 deletions(-) >>>> >>>> Reviewed-by: Simon Glass <sjg@chromium.org> >>> >>> Are you going to pick this up? I suggest that it goes in now since it >>> will affect people porting drivers. >> >> I think it's related with DM side. So if you can pick this, I'm ok. >> Otherwise, i will apply on u-boot-mmc, today..And tomorrow i will request pull. > > Yes it is DM-related, but if you don't mind I think it would be good > for you to pick these up. Ok, I will do. And tomorrow, I will request pull to Tom for u-boot-mmc with other mmc patches. How about? Best Regards, Jaehoon Chung > > Regards, > Simon > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg 2016-08-04 2:43 ` Jaehoon Chung @ 2016-08-04 4:21 ` Simon Glass 0 siblings, 0 replies; 13+ messages in thread From: Simon Glass @ 2016-08-04 4:21 UTC (permalink / raw) To: u-boot Hi Jaehoon, On 3 August 2016 at 20:43, Jaehoon Chung <jh80.chung@samsung.com> wrote: > On 08/04/2016 11:40 AM, Simon Glass wrote: >> Hi Jaehoon, >> >> On 3 August 2016 at 20:38, Jaehoon Chung <jh80.chung@samsung.com> wrote: >>> Hi Simon, >>> >>> On 08/04/2016 11:35 AM, Simon Glass wrote: >>>> Hi Jaehoon, >>>> >>>> On 31 July 2016 at 20:20, Simon Glass <sjg@chromium.org> wrote: >>>>> On 26 July 2016 at 04:06, Jaehoon Chung <jh80.chung@samsung.com> wrote: >>>>>> buswidth isn't used anywhere in sdhci_setup_cfg. >>>>>> >>>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >>>>>> --- >>>>>> drivers/mmc/msm_sdhci.c | 4 ++-- >>>>>> drivers/mmc/sdhci.c | 4 ++-- >>>>>> drivers/mmc/zynq_sdhci.c | 2 +- >>>>>> include/sdhci.h | 3 +-- >>>>>> 4 files changed, 6 insertions(+), 7 deletions(-) >>>>> >>>>> Reviewed-by: Simon Glass <sjg@chromium.org> >>>> >>>> Are you going to pick this up? I suggest that it goes in now since it >>>> will affect people porting drivers. >>> >>> I think it's related with DM side. So if you can pick this, I'm ok. >>> Otherwise, i will apply on u-boot-mmc, today..And tomorrow i will request pull. >> >> Yes it is DM-related, but if you don't mind I think it would be good >> for you to pick these up. > > Ok, I will do. And tomorrow, I will request pull to Tom for u-boot-mmc with other mmc patches. > How about? Sounds good thank you. - Simon ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-08-04 4:21 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20160726100627epcas1p30faabf0759be69e1b671717b54054cad@epcas1p3.samsung.com>
2016-07-26 10:06 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument for sdhci_setup_cfg Jaehoon Chung
2016-07-26 10:06 ` [U-Boot] [PATCH 2/2] mmc: sdhci: remove the unnecessary argumetns " Jaehoon Chung
2016-08-01 2:20 ` Simon Glass
2016-08-04 2:36 ` Simon Glass
2016-08-04 2:39 ` Jaehoon Chung
2016-07-27 1:10 ` [U-Boot] [PATCH 1/2] mmc: sdhci: remove the unused argument " Minkyu Kang
2016-07-27 11:26 ` Jaehoon Chung
2016-08-01 2:20 ` Simon Glass
2016-08-04 2:35 ` Simon Glass
2016-08-04 2:38 ` Jaehoon Chung
2016-08-04 2:40 ` Simon Glass
2016-08-04 2:43 ` Jaehoon Chung
2016-08-04 4:21 ` Simon Glass
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox