Message ID | 20161103062135.10697-10-jh80.chung@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Jaehoon, Am Donnerstag, 3. November 2016, 15:21:31 schrieb Jaehoon Chung: > Remove the "clock-freq-min-max" property. > There is "max-frequency" property in drivers/mmc/core/host.c > It can be used for getting maximum frequency. > > And minimum clock value is assigned to 100K by default. > Because MMC core should check the initial clock value from > 400K to 100K until finding correct value. > It's why Minimum value puts 100K by default. > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 3 --- > drivers/mmc/host/dw_mmc.c | 13 > ++++--------- 2 files changed, 4 insertions(+), 12 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt > b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index > 4e00e85..21c8251 100644 > --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt > +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt > @@ -56,9 +56,6 @@ Optional properties: > is specified and the ciu clock is specified then we'll try to set the ciu > clock to this at probe time. > > -* clock-freq-min-max: Minimum and Maximum clock frequency for card output > - clock(cclk_out). If it's not specified, max is 200MHZ and min is 400KHz > by default. - I'd think devicetree people will protest about simply removing this property without deprecating it first - to be backwards compatible with old devicetrees. Especially as this property was added already back in 2013, so has been in use for quite some time. Heiko -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Heiko. On 11/03/2016 05:20 PM, Heiko Stübner wrote: > Hi Jaehoon, > > Am Donnerstag, 3. November 2016, 15:21:31 schrieb Jaehoon Chung: >> Remove the "clock-freq-min-max" property. >> There is "max-frequency" property in drivers/mmc/core/host.c >> It can be used for getting maximum frequency. >> >> And minimum clock value is assigned to 100K by default. >> Because MMC core should check the initial clock value from >> 400K to 100K until finding correct value. >> It's why Minimum value puts 100K by default. >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >> --- >> Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 3 --- >> drivers/mmc/host/dw_mmc.c | 13 >> ++++--------- 2 files changed, 4 insertions(+), 12 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt >> b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index >> 4e00e85..21c8251 100644 >> --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt >> +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt >> @@ -56,9 +56,6 @@ Optional properties: >> is specified and the ciu clock is specified then we'll try to set the ciu >> clock to this at probe time. >> >> -* clock-freq-min-max: Minimum and Maximum clock frequency for card output >> - clock(cclk_out). If it's not specified, max is 200MHZ and min is 400KHz >> by default. - > > I'd think devicetree people will protest about simply removing this property > without deprecating it first - to be backwards compatible with old devicetrees. > > Especially as this property was added already back in 2013, so has been in use > for quite some time. Thanks for pointing out. I will resend the patchset with changing this. And maintain the backwards compatible. Best Regards, Jaehoon Chung > > > Heiko > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index 4e00e85..21c8251 100644 --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt @@ -56,9 +56,6 @@ Optional properties: is specified and the ciu clock is specified then we'll try to set the ciu clock to this at probe time. -* clock-freq-min-max: Minimum and Maximum clock frequency for card output - clock(cclk_out). If it's not specified, max is 200MHZ and min is 400KHz by default. - * num-slots: specifies the number of slots supported by the controller. The number of physical slots actually used could be equal or less than the value specified by num-slots. If this property is not specified, the value diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index bd8c5ea..a0c5a85 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2589,7 +2589,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) struct dw_mci_slot *slot; const struct dw_mci_drv_data *drv_data = host->drv_data; int ctrl_id, ret; - u32 freq[2]; mmc = mmc_alloc_host(sizeof(struct dw_mci_slot), host->dev); if (!mmc) @@ -2603,14 +2602,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) host->slot[id] = slot; mmc->ops = &dw_mci_ops; - if (of_property_read_u32_array(host->dev->of_node, - "clock-freq-min-max", freq, 2)) { - mmc->f_min = DW_MCI_FREQ_MIN; - mmc->f_max = DW_MCI_FREQ_MAX; - } else { - mmc->f_min = freq[0]; - mmc->f_max = freq[1]; - } /*if there are external regulators, get them*/ ret = mmc_regulator_get_supply(mmc); @@ -2649,6 +2640,10 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) if (ret) goto err_host_allocated; + mmc->f_min = DW_MCI_FREQ_MIN; + if (!mmc->f_max) + mmc->f_max = DW_MCI_FREQ_MAX; + /* Useful defaults if platform data is unset. */ if (host->use_dma == TRANS_MODE_IDMAC) { mmc->max_segs = host->ring_size;
Remove the "clock-freq-min-max" property. There is "max-frequency" property in drivers/mmc/core/host.c It can be used for getting maximum frequency. And minimum clock value is assigned to 100K by default. Because MMC core should check the initial clock value from 400K to 100K until finding correct value. It's why Minimum value puts 100K by default. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> --- Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 3 --- drivers/mmc/host/dw_mmc.c | 13 ++++--------- 2 files changed, 4 insertions(+), 12 deletions(-)