2018-02-23 06:43:13

by Jaehoon Chung

[permalink] [raw]
Subject: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

'clock-freq-min-max' property had already deprecated.
Remove the 'clock-freq-min-max' property that is kept to maintain
the compatibility.

Signed-off-by: Jaehoon Chung <[email protected]>
---
.../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 4 ----
drivers/mmc/host/dw_mmc.c | 15 ++++-----------
2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
index ef3e5f14067a..75c9fdca4aaf 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
@@ -59,10 +59,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 (DEPRECATED): 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.
- (Use the "max-frequency" instead of "clock-freq-min-max".)
-
* num-slots (DEPRECATED): 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 0aa39975f33b..38e0e7c4ffd9 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2784,7 +2784,6 @@ static int dw_mci_init_slot(struct dw_mci *host)
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)
@@ -2798,16 +2797,6 @@ static int dw_mci_init_slot(struct dw_mci *host)
host->slot = slot;

mmc->ops = &dw_mci_ops;
- if (device_property_read_u32_array(host->dev, "clock-freq-min-max",
- freq, 2)) {
- mmc->f_min = DW_MCI_FREQ_MIN;
- mmc->f_max = DW_MCI_FREQ_MAX;
- } else {
- dev_info(host->dev,
- "'clock-freq-min-max' property was deprecated.\n");
- mmc->f_min = freq[0];
- mmc->f_max = freq[1];
- }

/*if there are external regulators, get them*/
ret = mmc_regulator_get_supply(mmc);
@@ -2846,6 +2835,10 @@ static int dw_mci_init_slot(struct dw_mci *host)
if (ret)
goto err_host_allocated;

+ mmc->f_min = DW_MCI_FREQ_MIN;
+ if (!mmc->f_max)
+ mmc->f_max = DW_MCI_FREQ_MAX;
+
/* Process SDIO IRQs through the sdio_irq_work. */
if (mmc->caps & MMC_CAP_SDIO_IRQ)
mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;
--
2.15.1



2018-02-23 06:43:13

by Jaehoon Chung

[permalink] [raw]
Subject: [PATCH 2/6] mmc: dw_mmc: remove the deprecated "num-slots"

'num-slots' property had already deprecated.
Remove the 'nom-slots' property that is kept to maintain the compatibility.

Signed-off-by: Jaehoon Chung <[email protected]>
---
Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 -----
drivers/mmc/host/dw_mmc-pci.c | 1 -
drivers/mmc/host/dw_mmc.c | 4 ----
drivers/mmc/host/dw_mmc.h | 3 ---
4 files changed, 13 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
index 75c9fdca4aaf..7e5e427a22ce 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
@@ -59,11 +59,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.

-* num-slots (DEPRECATED): 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
- of num-slot property is assumed to be 1.
-
* fifo-depth: The maximum size of the tx/rx fifo's. If this property is not
specified, the default value of the fifo size is determined from the
controller registers.
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c
index ab8713297edb..3ad07d7b2c97 100644
--- a/drivers/mmc/host/dw_mmc-pci.c
+++ b/drivers/mmc/host/dw_mmc-pci.c
@@ -29,7 +29,6 @@
MMC_CAP_SDIO_IRQ)

static struct dw_mci_board pci_board_data = {
- .num_slots = 1,
.caps = DW_MCI_CAPABILITIES,
.bus_hz = 33 * 1000 * 1000,
.detect_delay_ms = 200,
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 38e0e7c4ffd9..a63ca7bc1099 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3124,10 +3124,6 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
return ERR_PTR(-EPROBE_DEFER);
}

- /* find out number of slots supported */
- if (!device_property_read_u32(dev, "num-slots", &pdata->num_slots))
- dev_info(dev, "'num-slots' was deprecated.\n");
-
if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth))
dev_info(dev,
"fifo-depth property not found, using value of FIFOTH register as default\n");
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index e3124f06a47e..80ff9a6c6fdd 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -102,7 +102,6 @@ struct dw_mci_dma_slave {
* @bus_hz: The rate of @mck in Hz. This forms the basis for MMC bus
* rate and timeout calculations.
* @current_speed: Configured rate of the controller.
- * @num_slots: Number of slots available.
* @fifoth_val: The value of FIFOTH register.
* @verid: Denote Version ID.
* @dev: Device associated with the MMC controller.
@@ -253,8 +252,6 @@ struct dma_pdata;

/* Board platform data */
struct dw_mci_board {
- u32 num_slots;
-
unsigned int bus_hz; /* Clock speed at the cclk_in pad */

u32 caps; /* Capabilities */
--
2.15.1


2018-02-23 06:44:07

by Jaehoon Chung

[permalink] [raw]
Subject: [PATCH 5/6] ARM: dts: lpc18xx: remove 'num-slots' property for dwmmc

Since 'num-slots' had already deprecated, remove the property in
device-tree file.

Signed-off-by: Jaehoon Chung <[email protected]>
---
arch/arm/boot/dts/lpc18xx.dtsi | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi
index 7cae9c5e27db..10b8249b8ab6 100644
--- a/arch/arm/boot/dts/lpc18xx.dtsi
+++ b/arch/arm/boot/dts/lpc18xx.dtsi
@@ -115,7 +115,6 @@
compatible = "snps,dw-mshc";
reg = <0x40004000 0x1000>;
interrupts = <6>;
- num-slots = <1>;
clocks = <&ccu2 CLK_SDIO>, <&ccu1 CLK_CPU_SDIO>;
clock-names = "ciu", "biu";
resets = <&rgu 20>;
--
2.15.1


2018-02-23 06:44:08

by Jaehoon Chung

[permalink] [raw]
Subject: [PATCH 3/6] ARM: dts: socfpga: remove 'num-slots' property for dwmmc

Since 'num-slots' had already deprecated, remove the property in
device-tree file.

Signed-off-by: Jaehoon Chung <[email protected]>
---
arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts | 1 -
arch/arm/boot/dts/socfpga_arria5.dtsi | 1 -
arch/arm/boot/dts/socfpga_cyclone5.dtsi | 1 -
arch/arm/boot/dts/socfpga_vt.dts | 1 -
4 files changed, 4 deletions(-)

diff --git a/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts b/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts
index 040a164ba148..5822fd2085db 100644
--- a/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts
+++ b/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts
@@ -20,7 +20,6 @@

&mmc {
status = "okay";
- num-slots = <1>;
cap-sd-highspeed;
broken-cd;
bus-width = <4>;
diff --git a/arch/arm/boot/dts/socfpga_arria5.dtsi b/arch/arm/boot/dts/socfpga_arria5.dtsi
index 8c037297296c..e59461f5416e 100644
--- a/arch/arm/boot/dts/socfpga_arria5.dtsi
+++ b/arch/arm/boot/dts/socfpga_arria5.dtsi
@@ -30,7 +30,6 @@
};

mmc0: dwmmc0@ff704000 {
- num-slots = <1>;
broken-cd;
bus-width = <4>;
cap-mmc-highspeed;
diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dtsi b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
index a05e3df23103..68ced67f8bfb 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5.dtsi
+++ b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
@@ -31,7 +31,6 @@
};

mmc0: dwmmc0@ff704000 {
- num-slots = <1>;
broken-cd;
bus-width = <4>;
cap-mmc-highspeed;
diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts
index dfe2193cd4d5..547c38632c68 100644
--- a/arch/arm/boot/dts/socfpga_vt.dts
+++ b/arch/arm/boot/dts/socfpga_vt.dts
@@ -42,7 +42,6 @@
};

dwmmc0@ff704000 {
- num-slots = <1>;
broken-cd;
bus-width = <4>;
cap-mmc-highspeed;
--
2.15.1


2018-02-23 06:44:22

by Jaehoon Chung

[permalink] [raw]
Subject: [PATCH 6/6] arm64: dts: hi3660: remove 'num-slots' property for dwmmc

Since 'num-slots' had already deprecated, remove the property in
device-tree file.

Signed-off-by: Jaehoon Chung <[email protected]>
---
arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index ab0b95ba5ae5..d6638b1f09ca 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -910,7 +910,6 @@
#size-cells = <0>;
cd-inverted;
compatible = "hisilicon,hi3660-dw-mshc";
- num-slots = <1>;
bus-width = <0x4>;
disable-wp;
cap-sd-highspeed;
@@ -948,7 +947,6 @@
compatible = "hisilicon,hi3660-dw-mshc";
reg = <0x0 0xff3ff000 0x0 0x1000>;
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
- num-slots = <1>;
clocks = <&crg_ctrl HI3660_CLK_GATE_SDIO0>,
<&crg_ctrl HI3660_HCLK_GATE_SDIO0>;
clock-names = "ciu", "biu";
--
2.15.1


2018-02-23 06:44:41

by Jaehoon Chung

[permalink] [raw]
Subject: [PATCH 4/6] arm64: dts: stratix10: remove 'num-slots' property for dwmmc

Since 'num-slots' had already deprecated, remove the property in
device-tree file.

Signed-off-by: Jaehoon Chung <[email protected]>
---
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
index a37c46112876..4e146b4e6487 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
@@ -88,7 +88,6 @@

&mmc {
status = "okay";
- num-slots = <1>;
cap-sd-highspeed;
broken-cd;
bus-width = <4>;
--
2.15.1


2018-02-23 13:28:06

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

On Fri, Feb 23, 2018 at 8:41 AM, Jaehoon Chung <[email protected]> wrote:
> 'clock-freq-min-max' property had already deprecated.
> Remove the 'clock-freq-min-max' property that is kept to maintain
> the compatibility.

Removing a property without telling the user what to expect is a bad
idea and ABI breakage.

--
With Best Regards,
Andy Shevchenko

2018-02-23 14:21:03

by Shawn Lin

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

Hi Andy,

On 2018/2/23 21:27, Andy Shevchenko wrote:
> On Fri, Feb 23, 2018 at 8:41 AM, Jaehoon Chung <[email protected]> wrote:
>> 'clock-freq-min-max' property had already deprecated.
>> Remove the 'clock-freq-min-max' property that is kept to maintain
>> the compatibility.
>
> Removing a property without telling the user what to expect is a bad
> idea and ABI breakage.
>

What's the general process to remove a property?

I guess we should do:
1) deprecate it in the first place and remove it from all upstream DT
2) wait some long enough days for expecting the stale of all old DTB
containing that property
3) remove the functionality of the deprecated property from the driver
but still leave some warning there
4) remove the left warning finally

And for the ABI breakage, we should add something in Documentation/ABI
/obsolete or Documentation/ABI/removed ?

--
Best Regards
Shawn Lin


2018-02-23 16:18:05

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

On Fri, Feb 23, 2018 at 4:19 PM, Shawn Lin <[email protected]> wrote:
> On 2018/2/23 21:27, Andy Shevchenko wrote:
>> On Fri, Feb 23, 2018 at 8:41 AM, Jaehoon Chung <[email protected]>
>> wrote:
>>>
>>> 'clock-freq-min-max' property had already deprecated.
>>> Remove the 'clock-freq-min-max' property that is kept to maintain
>>> the compatibility.
>>
>>
>> Removing a property without telling the user what to expect is a bad
>> idea and ABI breakage.
>>
>
> What's the general process to remove a property?
>
> I guess we should do:
> 1) deprecate it in the first place and remove it from all upstream DT
> 2) wait some long enough days for expecting the stale of all old DTB
> containing that property
> 3) remove the functionality of the deprecated property from the driver
> but still leave some warning there
> 4) remove the left warning finally

I don't know. Perhaps Rob can shed a light here.
But I would really OK with removal of some of such properties from
some drivers where it's more burden to keep them.

> And for the ABI breakage, we should add something in Documentation/ABI
> /obsolete or Documentation/ABI/removed ?

--
With Best Regards,
Andy Shevchenko

2018-02-26 02:09:04

by Jaehoon Chung

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

On 02/24/2018 01:16 AM, Andy Shevchenko wrote:
> On Fri, Feb 23, 2018 at 4:19 PM, Shawn Lin <[email protected]> wrote:
>> On 2018/2/23 21:27, Andy Shevchenko wrote:
>>> On Fri, Feb 23, 2018 at 8:41 AM, Jaehoon Chung <[email protected]>
>>> wrote:
>>>>
>>>> 'clock-freq-min-max' property had already deprecated.
>>>> Remove the 'clock-freq-min-max' property that is kept to maintain
>>>> the compatibility.
>>>
>>>
>>> Removing a property without telling the user what to expect is a bad
>>> idea and ABI breakage.
>>>
>>
>> What's the general process to remove a property?
>>
>> I guess we should do:
>> 1) deprecate it in the first place and remove it from all upstream DT
>> 2) wait some long enough days for expecting the stale of all old DTB
>> containing that property
>> 3) remove the functionality of the deprecated property from the driver
>> but still leave some warning there
>> 4) remove the left warning finally
>
> I don't know. Perhaps Rob can shed a light here.
> But I would really OK with removal of some of such properties from
> some drivers where it's more burden to keep them.

This property had deprecated about 8months ago.
I think that it was enough to keep this property for maintaining the compatibility.

I didn't remove this property without any alternative.

Best Regards,
Jaehoon Chung

>
>> And for the ABI breakage, we should add something in Documentation/ABI
>> /obsolete or Documentation/ABI/removed ?
>


2018-02-26 03:27:32

by thetruthbeforeus

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property -- You wokr with japanese after they fucked you

You all know that you're working with white and japanese mthr fuckers
right? you just fine with that? After what they did to your people? Ok
then. You be you. You be you.

Here's some real talk about the while mother fuckers:
https://www.liveleak.com/view?i=c34_1519605684

On 2018-02-26 02:07, Jaehoon Chung wrote:
> On 02/24/2018 01:16 AM, Andy Shevchenko wrote:
>> On Fri, Feb 23, 2018 at 4:19 PM, Shawn Lin <[email protected]>
>> wrote:
>>> On 2018/2/23 21:27, Andy Shevchenko wrote:
>>>> On Fri, Feb 23, 2018 at 8:41 AM, Jaehoon Chung
>>>> <[email protected]>
>>>> wrote:
>>>>>
>>>>> 'clock-freq-min-max' property had already deprecated.
>>>>> Remove the 'clock-freq-min-max' property that is kept to maintain
>>>>> the compatibility.
>>>>
>>>>
>>>> Removing a property without telling the user what to expect is a bad
>>>> idea and ABI breakage.
>>>>
>>>
>>> What's the general process to remove a property?
>>>
>>> I guess we should do:
>>> 1) deprecate it in the first place and remove it from all upstream DT
>>> 2) wait some long enough days for expecting the stale of all old DTB
>>> containing that property
>>> 3) remove the functionality of the deprecated property from the
>>> driver
>>> but still leave some warning there
>>> 4) remove the left warning finally
>>
>> I don't know. Perhaps Rob can shed a light here.
>> But I would really OK with removal of some of such properties from
>> some drivers where it's more burden to keep them.
>
> This property had deprecated about 8months ago.
> I think that it was enough to keep this property for maintaining the
> compatibility.
>
> I didn't remove this property without any alternative.
>
> Best Regards,
> Jaehoon Chung
>
>>
>>> And for the ABI breakage, we should add something in
>>> Documentation/ABI
>>> /obsolete or Documentation/ABI/removed ?
>>

2018-03-02 16:06:52

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

On Fri, Feb 23, 2018 at 03:41:33PM +0900, Jaehoon Chung wrote:
> 'clock-freq-min-max' property had already deprecated.
> Remove the 'clock-freq-min-max' property that is kept to maintain
> the compatibility.
>
> Signed-off-by: Jaehoon Chung <[email protected]>
> ---
> .../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 4 ----
> drivers/mmc/host/dw_mmc.c | 15 ++++-----------
> 2 files changed, 4 insertions(+), 15 deletions(-)

In no way an endorsement that this is the right time to remove,

Reviewed-by: Rob Herring <[email protected]>

2018-03-02 16:11:33

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/6] mmc: dw_mmc: remove the deprecated "num-slots"

On Fri, Feb 23, 2018 at 03:41:34PM +0900, Jaehoon Chung wrote:
> 'num-slots' property had already deprecated.
> Remove the 'nom-slots' property that is kept to maintain the compatibility.
>
> Signed-off-by: Jaehoon Chung <[email protected]>
> ---
> Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 -----
> drivers/mmc/host/dw_mmc-pci.c | 1 -
> drivers/mmc/host/dw_mmc.c | 4 ----
> drivers/mmc/host/dw_mmc.h | 3 ---
> 4 files changed, 13 deletions(-)

Normally I'd say you need to wait some time after updating the dts
files, but given that all the users are 1 slot I think this is fine.

For this and the rest of the series:

Reviewed-by: Rob Herring <[email protected]>

2018-03-02 23:15:46

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

On Fri, Feb 23, 2018 at 06:16:39PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 23, 2018 at 4:19 PM, Shawn Lin <[email protected]> wrote:
> > On 2018/2/23 21:27, Andy Shevchenko wrote:
> >> On Fri, Feb 23, 2018 at 8:41 AM, Jaehoon Chung <[email protected]>
> >> wrote:
> >>>
> >>> 'clock-freq-min-max' property had already deprecated.
> >>> Remove the 'clock-freq-min-max' property that is kept to maintain
> >>> the compatibility.
> >>
> >>
> >> Removing a property without telling the user what to expect is a bad
> >> idea and ABI breakage.
> >>
> >
> > What's the general process to remove a property?
> >
> > I guess we should do:
> > 1) deprecate it in the first place and remove it from all upstream DT

Yes

> > 2) wait some long enough days for expecting the stale of all old DTB
> > containing that property

Yes. How long that is depends on the platform. I think the minimum is 1
release cycle. Some stable platforms are years. If there are other DT
changes with new features everyone should want/need, then that can be a
decision point.

Given this is a shared IP block it's harder to know, so you may need to
err on the longer side.

> > 3) remove the functionality of the deprecated property from the driver
> > but still leave some warning there

I'd say add a warning in step 1 and combine 3 and 4.

> > 4) remove the left warning finally
>
> I don't know. Perhaps Rob can shed a light here.
> But I would really OK with removal of some of such properties from
> some drivers where it's more burden to keep them.
>
> > And for the ABI breakage, we should add something in Documentation/ABI
> > /obsolete or Documentation/ABI/removed ?

It is only an ABI break if someone notices.

Rob

2018-03-07 14:40:58

by Dinh Nguyen

[permalink] [raw]
Subject: Re: [PATCH 4/6] arm64: dts: stratix10: remove 'num-slots' property for dwmmc



On 02/23/2018 12:41 AM, Jaehoon Chung wrote:
> Since 'num-slots' had already deprecated, remove the property in
> device-tree file.
>
> Signed-off-by: Jaehoon Chung <[email protected]>
> ---
> arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
> index a37c46112876..4e146b4e6487 100644
> --- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
> +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
> @@ -88,7 +88,6 @@
>
> &mmc {
> status = "okay";
> - num-slots = <1>;
> cap-sd-highspeed;
> broken-cd;
> bus-width = <4>;
>

Acked-by: Dinh Nguyen <[email protected]>

2018-03-15 10:23:45

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

On 23 February 2018 at 07:41, Jaehoon Chung <[email protected]> wrote:
> 'clock-freq-min-max' property had already deprecated.
> Remove the 'clock-freq-min-max' property that is kept to maintain
> the compatibility.
>
> Signed-off-by: Jaehoon Chung <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> .../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 4 ----
> drivers/mmc/host/dw_mmc.c | 15 ++++-----------
> 2 files changed, 4 insertions(+), 15 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
> index ef3e5f14067a..75c9fdca4aaf 100644
> --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
> +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
> @@ -59,10 +59,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 (DEPRECATED): 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.
> - (Use the "max-frequency" instead of "clock-freq-min-max".)
> -
> * num-slots (DEPRECATED): 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 0aa39975f33b..38e0e7c4ffd9 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2784,7 +2784,6 @@ static int dw_mci_init_slot(struct dw_mci *host)
> 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)
> @@ -2798,16 +2797,6 @@ static int dw_mci_init_slot(struct dw_mci *host)
> host->slot = slot;
>
> mmc->ops = &dw_mci_ops;
> - if (device_property_read_u32_array(host->dev, "clock-freq-min-max",
> - freq, 2)) {
> - mmc->f_min = DW_MCI_FREQ_MIN;
> - mmc->f_max = DW_MCI_FREQ_MAX;
> - } else {
> - dev_info(host->dev,
> - "'clock-freq-min-max' property was deprecated.\n");
> - mmc->f_min = freq[0];
> - mmc->f_max = freq[1];
> - }
>
> /*if there are external regulators, get them*/
> ret = mmc_regulator_get_supply(mmc);
> @@ -2846,6 +2835,10 @@ static int dw_mci_init_slot(struct dw_mci *host)
> if (ret)
> goto err_host_allocated;
>
> + mmc->f_min = DW_MCI_FREQ_MIN;
> + if (!mmc->f_max)
> + mmc->f_max = DW_MCI_FREQ_MAX;
> +
> /* Process SDIO IRQs through the sdio_irq_work. */
> if (mmc->caps & MMC_CAP_SDIO_IRQ)
> mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;
> --
> 2.15.1
>

2018-03-15 10:24:05

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 3/6] ARM: dts: socfpga: remove 'num-slots' property for dwmmc

On 23 February 2018 at 07:41, Jaehoon Chung <[email protected]> wrote:
> Since 'num-slots' had already deprecated, remove the property in
> device-tree file.
>
> Signed-off-by: Jaehoon Chung <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts | 1 -
> arch/arm/boot/dts/socfpga_arria5.dtsi | 1 -
> arch/arm/boot/dts/socfpga_cyclone5.dtsi | 1 -
> arch/arm/boot/dts/socfpga_vt.dts | 1 -
> 4 files changed, 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts b/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts
> index 040a164ba148..5822fd2085db 100644
> --- a/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts
> +++ b/arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts
> @@ -20,7 +20,6 @@
>
> &mmc {
> status = "okay";
> - num-slots = <1>;
> cap-sd-highspeed;
> broken-cd;
> bus-width = <4>;
> diff --git a/arch/arm/boot/dts/socfpga_arria5.dtsi b/arch/arm/boot/dts/socfpga_arria5.dtsi
> index 8c037297296c..e59461f5416e 100644
> --- a/arch/arm/boot/dts/socfpga_arria5.dtsi
> +++ b/arch/arm/boot/dts/socfpga_arria5.dtsi
> @@ -30,7 +30,6 @@
> };
>
> mmc0: dwmmc0@ff704000 {
> - num-slots = <1>;
> broken-cd;
> bus-width = <4>;
> cap-mmc-highspeed;
> diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dtsi b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
> index a05e3df23103..68ced67f8bfb 100644
> --- a/arch/arm/boot/dts/socfpga_cyclone5.dtsi
> +++ b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
> @@ -31,7 +31,6 @@
> };
>
> mmc0: dwmmc0@ff704000 {
> - num-slots = <1>;
> broken-cd;
> bus-width = <4>;
> cap-mmc-highspeed;
> diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts
> index dfe2193cd4d5..547c38632c68 100644
> --- a/arch/arm/boot/dts/socfpga_vt.dts
> +++ b/arch/arm/boot/dts/socfpga_vt.dts
> @@ -42,7 +42,6 @@
> };
>
> dwmmc0@ff704000 {
> - num-slots = <1>;
> broken-cd;
> bus-width = <4>;
> cap-mmc-highspeed;
> --
> 2.15.1
>

2018-03-15 10:24:05

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 4/6] arm64: dts: stratix10: remove 'num-slots' property for dwmmc

On 23 February 2018 at 07:41, Jaehoon Chung <[email protected]> wrote:
> Since 'num-slots' had already deprecated, remove the property in
> device-tree file.
>
> Signed-off-by: Jaehoon Chung <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
> index a37c46112876..4e146b4e6487 100644
> --- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
> +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
> @@ -88,7 +88,6 @@
>
> &mmc {
> status = "okay";
> - num-slots = <1>;
> cap-sd-highspeed;
> broken-cd;
> bus-width = <4>;
> --
> 2.15.1
>

2018-03-15 10:24:15

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 6/6] arm64: dts: hi3660: remove 'num-slots' property for dwmmc

On 23 February 2018 at 07:41, Jaehoon Chung <[email protected]> wrote:
> Since 'num-slots' had already deprecated, remove the property in
> device-tree file.
>
> Signed-off-by: Jaehoon Chung <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> index ab0b95ba5ae5..d6638b1f09ca 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> @@ -910,7 +910,6 @@
> #size-cells = <0>;
> cd-inverted;
> compatible = "hisilicon,hi3660-dw-mshc";
> - num-slots = <1>;
> bus-width = <0x4>;
> disable-wp;
> cap-sd-highspeed;
> @@ -948,7 +947,6 @@
> compatible = "hisilicon,hi3660-dw-mshc";
> reg = <0x0 0xff3ff000 0x0 0x1000>;
> interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
> - num-slots = <1>;
> clocks = <&crg_ctrl HI3660_CLK_GATE_SDIO0>,
> <&crg_ctrl HI3660_HCLK_GATE_SDIO0>;
> clock-names = "ciu", "biu";
> --
> 2.15.1
>

2018-03-15 10:24:28

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 5/6] ARM: dts: lpc18xx: remove 'num-slots' property for dwmmc

On 23 February 2018 at 07:41, Jaehoon Chung <[email protected]> wrote:
> Since 'num-slots' had already deprecated, remove the property in
> device-tree file.
>
> Signed-off-by: Jaehoon Chung <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> arch/arm/boot/dts/lpc18xx.dtsi | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi
> index 7cae9c5e27db..10b8249b8ab6 100644
> --- a/arch/arm/boot/dts/lpc18xx.dtsi
> +++ b/arch/arm/boot/dts/lpc18xx.dtsi
> @@ -115,7 +115,6 @@
> compatible = "snps,dw-mshc";
> reg = <0x40004000 0x1000>;
> interrupts = <6>;
> - num-slots = <1>;
> clocks = <&ccu2 CLK_SDIO>, <&ccu1 CLK_CPU_SDIO>;
> clock-names = "ciu", "biu";
> resets = <&rgu 20>;
> --
> 2.15.1
>

2018-03-15 10:26:32

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 2/6] mmc: dw_mmc: remove the deprecated "num-slots"

On 23 February 2018 at 07:41, Jaehoon Chung <[email protected]> wrote:
> 'num-slots' property had already deprecated.
> Remove the 'nom-slots' property that is kept to maintain the compatibility.
>
> Signed-off-by: Jaehoon Chung <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 -----
> drivers/mmc/host/dw_mmc-pci.c | 1 -
> drivers/mmc/host/dw_mmc.c | 4 ----
> drivers/mmc/host/dw_mmc.h | 3 ---
> 4 files changed, 13 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
> index 75c9fdca4aaf..7e5e427a22ce 100644
> --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
> +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
> @@ -59,11 +59,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.
>
> -* num-slots (DEPRECATED): 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
> - of num-slot property is assumed to be 1.
> -
> * fifo-depth: The maximum size of the tx/rx fifo's. If this property is not
> specified, the default value of the fifo size is determined from the
> controller registers.
> diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c
> index ab8713297edb..3ad07d7b2c97 100644
> --- a/drivers/mmc/host/dw_mmc-pci.c
> +++ b/drivers/mmc/host/dw_mmc-pci.c
> @@ -29,7 +29,6 @@
> MMC_CAP_SDIO_IRQ)
>
> static struct dw_mci_board pci_board_data = {
> - .num_slots = 1,
> .caps = DW_MCI_CAPABILITIES,
> .bus_hz = 33 * 1000 * 1000,
> .detect_delay_ms = 200,
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 38e0e7c4ffd9..a63ca7bc1099 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3124,10 +3124,6 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
> return ERR_PTR(-EPROBE_DEFER);
> }
>
> - /* find out number of slots supported */
> - if (!device_property_read_u32(dev, "num-slots", &pdata->num_slots))
> - dev_info(dev, "'num-slots' was deprecated.\n");
> -
> if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth))
> dev_info(dev,
> "fifo-depth property not found, using value of FIFOTH register as default\n");
> diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
> index e3124f06a47e..80ff9a6c6fdd 100644
> --- a/drivers/mmc/host/dw_mmc.h
> +++ b/drivers/mmc/host/dw_mmc.h
> @@ -102,7 +102,6 @@ struct dw_mci_dma_slave {
> * @bus_hz: The rate of @mck in Hz. This forms the basis for MMC bus
> * rate and timeout calculations.
> * @current_speed: Configured rate of the controller.
> - * @num_slots: Number of slots available.
> * @fifoth_val: The value of FIFOTH register.
> * @verid: Denote Version ID.
> * @dev: Device associated with the MMC controller.
> @@ -253,8 +252,6 @@ struct dma_pdata;
>
> /* Board platform data */
> struct dw_mci_board {
> - u32 num_slots;
> -
> unsigned int bus_hz; /* Clock speed at the cclk_in pad */
>
> u32 caps; /* Capabilities */
> --
> 2.15.1
>

2018-03-15 11:50:11

by Jaehoon Chung

[permalink] [raw]
Subject: Re: [PATCH 1/6] mmc: dw_mmc: remove the deprecated "clock-freq-min-max" property

On 03/15/2018 07:22 PM, Ulf Hansson wrote:
> On 23 February 2018 at 07:41, Jaehoon Chung <[email protected]> wrote:
>> 'clock-freq-min-max' property had already deprecated.
>> Remove the 'clock-freq-min-max' property that is kept to maintain
>> the compatibility.
>>
>> Signed-off-by: Jaehoon Chung <[email protected]>
>
> Thanks, applied for next!

Sorry. Thanks for applying this. :)

Best Regards,
Jaehoon Chung

>
> Kind regards
> Uffe
>
>> ---
>> .../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 4 ----
>> drivers/mmc/host/dw_mmc.c | 15 ++++-----------
>> 2 files changed, 4 insertions(+), 15 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
>> index ef3e5f14067a..75c9fdca4aaf 100644
>> --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
>> +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
>> @@ -59,10 +59,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 (DEPRECATED): 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.
>> - (Use the "max-frequency" instead of "clock-freq-min-max".)
>> -
>> * num-slots (DEPRECATED): 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 0aa39975f33b..38e0e7c4ffd9 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -2784,7 +2784,6 @@ static int dw_mci_init_slot(struct dw_mci *host)
>> 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)
>> @@ -2798,16 +2797,6 @@ static int dw_mci_init_slot(struct dw_mci *host)
>> host->slot = slot;
>>
>> mmc->ops = &dw_mci_ops;
>> - if (device_property_read_u32_array(host->dev, "clock-freq-min-max",
>> - freq, 2)) {
>> - mmc->f_min = DW_MCI_FREQ_MIN;
>> - mmc->f_max = DW_MCI_FREQ_MAX;
>> - } else {
>> - dev_info(host->dev,
>> - "'clock-freq-min-max' property was deprecated.\n");
>> - mmc->f_min = freq[0];
>> - mmc->f_max = freq[1];
>> - }
>>
>> /*if there are external regulators, get them*/
>> ret = mmc_regulator_get_supply(mmc);
>> @@ -2846,6 +2835,10 @@ static int dw_mci_init_slot(struct dw_mci *host)
>> if (ret)
>> goto err_host_allocated;
>>
>> + mmc->f_min = DW_MCI_FREQ_MIN;
>> + if (!mmc->f_max)
>> + mmc->f_max = DW_MCI_FREQ_MAX;
>> +
>> /* Process SDIO IRQs through the sdio_irq_work. */
>> if (mmc->caps & MMC_CAP_SDIO_IRQ)
>> mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;
>> --
>> 2.15.1
>>
>
>
>