linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller
@ 2016-11-03  6:21 Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 01/13] mmc: dw_mmc: display the real register value on debugfs Jaehoon Chung
                   ` (13 more replies)
  0 siblings, 14 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

This patchset is modified the some minor fixing and cleaning code.
If needs to split the patches, i will re-send the patches.

* Major changes
- Use the cookie enum values like sdhci controller.
- Remove the unnecessary codes and use stop_abort() by default.
- Remove the obsoleted property "supports-highspeed"
- Remove the "clock-freq-min-max" property. Instead, use "max-frequency"
- Minimum clock value is set to 100K by default.

Jaehoon Chung (13):
  mmc: dw_mmc: display the real register value on debugfs
  mmc: dw_mmc: fix the debug message for checking card's present
  mmc: dw_mmc: change the DW_MCI_FREQ_MIN from 400K to 100K
  mmc: dw_mmc: use the hold register when send stop command
  mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default
  mmc: core: move the cookie's enum values from sdhci.h to mmc.h
  mmc: dw_mmc: use the cookie's enum values for post/pre_req()
  mmc: dw_mmc: remove the unnecessary mmc_data structure
  mmc: dw_mmc: remove the "clock-freq-min-max" property
  ARM: dts: exynos: replace to "max-frequecy" instead of
    "clock-freq-min-max"
  ARM: dts: rockchip: replace to "max-frequency" instead of
    "clock-freq-min-max"
  ARM64: dts: rockchip: replace to "max-frequency" instead of
    "clock-freq-min-max"
  Documentation: synopsys-dw-mshc: remove the unused properties

 .../devicetree/bindings/mmc/synopsys-dw-mshc.txt   |  8 --
 arch/arm/boot/dts/exynos3250-artik5-eval.dts       |  2 +-
 arch/arm/boot/dts/exynos3250-artik5.dtsi           |  2 +-
 arch/arm/boot/dts/exynos3250-monk.dts              |  2 +-
 arch/arm/boot/dts/exynos3250-rinato.dts            |  2 +-
 arch/arm/boot/dts/rk3036.dtsi                      |  6 +-
 arch/arm/boot/dts/rk322x.dtsi                      |  2 +-
 arch/arm/boot/dts/rk3288.dtsi                      |  8 +-
 .../boot/dts/rockchip/rk3368-orion-r68-meta.dts    |  2 +-
 arch/arm64/boot/dts/rockchip/rk3368.dtsi           |  6 +-
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |  4 +-
 drivers/mmc/host/dw_mmc.c                          | 99 ++++++++++------------
 drivers/mmc/host/sdhci.h                           |  6 --
 include/linux/mmc/core.h                           |  6 ++
 14 files changed, 68 insertions(+), 87 deletions(-)

-- 
2.10.1

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH 01/13] mmc: dw_mmc: display the real register value on debugfs
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 02/13] mmc: dw_mmc: fix the debug message for checking card's present Jaehoon Chung
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

Developer wants to see the real register value, not register offset.
This patch fixed to display the real value of register.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1c9ee36..b87dd07 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -165,12 +165,14 @@ static const struct file_operations dw_mci_req_fops = {
 
 static int dw_mci_regs_show(struct seq_file *s, void *v)
 {
-	seq_printf(s, "STATUS:\t0x%08x\n", SDMMC_STATUS);
-	seq_printf(s, "RINTSTS:\t0x%08x\n", SDMMC_RINTSTS);
-	seq_printf(s, "CMD:\t0x%08x\n", SDMMC_CMD);
-	seq_printf(s, "CTRL:\t0x%08x\n", SDMMC_CTRL);
-	seq_printf(s, "INTMASK:\t0x%08x\n", SDMMC_INTMASK);
-	seq_printf(s, "CLKENA:\t0x%08x\n", SDMMC_CLKENA);
+	struct dw_mci *host = s->private;
+
+	seq_printf(s, "STATUS:\t0x%08x\n", mci_readl(host, STATUS));
+	seq_printf(s, "RINTSTS:\t0x%08x\n", mci_readl(host, RINTSTS));
+	seq_printf(s, "CMD:\t0x%08x\n", mci_readl(host, CMD));
+	seq_printf(s, "CTRL:\t0x%08x\n", mci_readl(host, CTRL));
+	seq_printf(s, "INTMASK:\t0x%08x\n", mci_readl(host, INTMASK));
+	seq_printf(s, "CLKENA:\t0x%08x\n", mci_readl(host, CLKENA));
 
 	return 0;
 }
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 02/13] mmc: dw_mmc: fix the debug message for checking card's present
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 01/13] mmc: dw_mmc: display the real register value on debugfs Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 03/13] mmc: dw_mmc: change the DW_MCI_FREQ_MIN from 400K to 100K Jaehoon Chung
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

If display the debug message, this message should be spamming.
If flags is maintained the previous value, didn't display the debug
message.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index b87dd07..1e71fd4 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1537,13 +1537,10 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
 			== 0 ? 1 : 0;
 
 	spin_lock_bh(&host->lock);
-	if (present) {
-		set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
+	if (present && !test_and_set_bit(DW_MMC_CARD_PRESENT, &slot->flags))
 		dev_dbg(&mmc->class_dev, "card is present\n");
-	} else {
-		clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
+	else if (!test_and_clear_bit(DW_MMC_CARD_PRESENT, &slot->flags))
 		dev_dbg(&mmc->class_dev, "card is not present\n");
-	}
 	spin_unlock_bh(&host->lock);
 
 	return present;
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 03/13] mmc: dw_mmc: change the DW_MCI_FREQ_MIN from 400K to 100K
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 01/13] mmc: dw_mmc: display the real register value on debugfs Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 02/13] mmc: dw_mmc: fix the debug message for checking card's present Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 04/13] mmc: dw_mmc: use the hold register when send stop command Jaehoon Chung
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

If there is no property "clock-freq-min-max", mmc->f_min should be set
to 400K by default. But Some SoC can be used 100K.
When 100K is used, MMC core will try to check from 400K to 100K.

Reported-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1e71fd4..6ccb817 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -54,7 +54,7 @@
 #define DW_MCI_DMA_THRESHOLD	16
 
 #define DW_MCI_FREQ_MAX	200000000	/* unit: HZ */
-#define DW_MCI_FREQ_MIN	400000		/* unit: HZ */
+#define DW_MCI_FREQ_MIN	100000		/* unit: HZ */
 
 #define IDMAC_INT_CLR		(SDMMC_IDMAC_INT_AI | SDMMC_IDMAC_INT_NI | \
 				 SDMMC_IDMAC_INT_CES | SDMMC_IDMAC_INT_DU | \
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 04/13] mmc: dw_mmc: use the hold register when send stop command
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (2 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 03/13] mmc: dw_mmc: change the DW_MCI_FREQ_MIN from 400K to 100K Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 05/13] mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default Jaehoon Chung
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

If DW_MMC_CARD_NO_USE_HOLD isn't set, it's usesd by default.
Enve if SDMMC_CMD_USB_HOLD_REG is set in prepare_command(), but it
doesn't set in pre_stop_abort().

To maintain the consistency, add the checking condition for this.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 6ccb817..23fc505 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -337,6 +337,9 @@ static u32 dw_mci_prep_stop_abort(struct dw_mci *host, struct mmc_command *cmd)
 	cmdr = stop->opcode | SDMMC_CMD_STOP |
 		SDMMC_CMD_RESP_CRC | SDMMC_CMD_RESP_EXP;
 
+	if (!test_bit(DW_MMC_CARD_NO_USE_HOLD, &host->cur_slot->flags))
+		cmdr |= SDMMC_CMD_USE_HOLD_REG;
+
 	return cmdr;
 }
 
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 05/13] mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (3 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 04/13] mmc: dw_mmc: use the hold register when send stop command Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 06/13] mmc: core: move the cookie's enum values from sdhci.h to mmc.h Jaehoon Chung
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

stop_cmdr should be set to values relevant to stop command.
It migth be assigned to values whatever there is mrq->stop or not.
Then it doesn't need to use dw_mci_prepare_command().
It's enough to use the prep_stop_abort for preparing stop command.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 23fc505..16df93b 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -385,7 +385,7 @@ static void dw_mci_start_command(struct dw_mci *host,
 
 static inline void send_stop_abort(struct dw_mci *host, struct mmc_data *data)
 {
-	struct mmc_command *stop = data->stop ? data->stop : &host->stop_abort;
+	struct mmc_command *stop = &host->stop_abort;
 
 	dw_mci_start_command(host, stop, host->stop_cmdr);
 }
@@ -1277,10 +1277,7 @@ static void __dw_mci_start_request(struct dw_mci *host,
 		spin_unlock_irqrestore(&host->irq_lock, irqflags);
 	}
 
-	if (mrq->stop)
-		host->stop_cmdr = dw_mci_prepare_command(slot->mmc, mrq->stop);
-	else
-		host->stop_cmdr = dw_mci_prep_stop_abort(host, cmd);
+	host->stop_cmdr = dw_mci_prep_stop_abort(host, cmd);
 }
 
 static void dw_mci_start_request(struct dw_mci *host,
@@ -1890,8 +1887,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
 			if (test_and_clear_bit(EVENT_DATA_ERROR,
 					       &host->pending_events)) {
 				dw_mci_stop_dma(host);
-				if (data->stop ||
-				    !(host->data_status & (SDMMC_INT_DRTO |
+				if (!(host->data_status & (SDMMC_INT_DRTO |
 							   SDMMC_INT_EBE)))
 					send_stop_abort(host, data);
 				state = STATE_DATA_ERROR;
@@ -1927,8 +1923,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
 			if (test_and_clear_bit(EVENT_DATA_ERROR,
 					       &host->pending_events)) {
 				dw_mci_stop_dma(host);
-				if (data->stop ||
-				    !(host->data_status & (SDMMC_INT_DRTO |
+				if (!(host->data_status & (SDMMC_INT_DRTO |
 							   SDMMC_INT_EBE)))
 					send_stop_abort(host, data);
 				state = STATE_DATA_ERROR;
@@ -2004,7 +1999,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
 			host->cmd = NULL;
 			host->data = NULL;
 
-			if (mrq->stop)
+			if (!mrq->sbc && mrq->stop)
 				dw_mci_command_complete(host, mrq->stop);
 			else
 				host->cmd_status = 0;
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 06/13] mmc: core: move the cookie's enum values from sdhci.h to mmc.h
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (4 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 05/13] mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 07/13] mmc: dw_mmc: use the cookie's enum values for post/pre_req() Jaehoon Chung
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

It's not for only sdhci controller.
So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie
to mmc_cookie.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/sdhci.h | 6 ------
 include/linux/mmc/core.h | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 766df17..325663b 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -321,12 +321,6 @@ struct sdhci_adma2_64_desc {
 /* Allow for a a command request and a data request at the same time */
 #define SDHCI_MAX_MRQS		2
 
-enum sdhci_cookie {
-	COOKIE_UNMAPPED,
-	COOKIE_PRE_MAPPED,	/* mapped by sdhci_pre_req() */
-	COOKIE_MAPPED,		/* mapped by sdhci_prepare_data() */
-};
-
 struct sdhci_host {
 	/* Data set by hardware interface driver */
 	const char *hw_name;	/* Hardware bus name */
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 2b953eb..d23a675 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -106,6 +106,12 @@ struct mmc_command {
 	struct mmc_request	*mrq;		/* associated request */
 };
 
+enum mmc_cookie {
+	COOKIE_UNMAPPED,
+	COOKIE_PRE_MAPPED,	/* mapped by pre_req() of controller */
+	COOKIE_MAPPED,		/* mapped by prepare_data() of controller */
+};
+
 struct mmc_data {
 	unsigned int		timeout_ns;	/* data timeout (in ns, max 80ms) */
 	unsigned int		timeout_clks;	/* data timeout (in clocks) */
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 07/13] mmc: dw_mmc: use the cookie's enum values for post/pre_req()
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (5 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 06/13] mmc: core: move the cookie's enum values from sdhci.h to mmc.h Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 08/13] mmc: dw_mmc: remove the unnecessary mmc_data structure Jaehoon Chung
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

This patch removed the meaningless value. Instead, use the cookie's enum
values for executing correctly.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 16df93b..df151c8 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -414,12 +414,13 @@ static void dw_mci_dma_cleanup(struct dw_mci *host)
 {
 	struct mmc_data *data = host->data;
 
-	if (data)
-		if (!data->host_cookie)
-			dma_unmap_sg(host->dev,
-				     data->sg,
-				     data->sg_len,
-				     dw_mci_get_dma_dir(data));
+	if (data && data->host_cookie == COOKIE_MAPPED) {
+		dma_unmap_sg(host->dev,
+			     data->sg,
+			     data->sg_len,
+			     dw_mci_get_dma_dir(data));
+		data->host_cookie = COOKIE_UNMAPPED;
+	}
 }
 
 static void dw_mci_idmac_reset(struct dw_mci *host)
@@ -850,13 +851,13 @@ static const struct dw_mci_dma_ops dw_mci_edmac_ops = {
 
 static int dw_mci_pre_dma_transfer(struct dw_mci *host,
 				   struct mmc_data *data,
-				   bool next)
+				   int cookie)
 {
 	struct scatterlist *sg;
 	unsigned int i, sg_len;
 
-	if (!next && data->host_cookie)
-		return data->host_cookie;
+	if (data->host_cookie == COOKIE_PRE_MAPPED)
+		return data->sg_len;
 
 	/*
 	 * We don't do DMA on "complex" transfers, i.e. with
@@ -881,8 +882,7 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host,
 	if (sg_len == 0)
 		return -EINVAL;
 
-	if (next)
-		data->host_cookie = sg_len;
+	data->host_cookie = cookie;
 
 	return sg_len;
 }
@@ -897,13 +897,12 @@ static void dw_mci_pre_req(struct mmc_host *mmc,
 	if (!slot->host->use_dma || !data)
 		return;
 
-	if (data->host_cookie) {
-		data->host_cookie = 0;
-		return;
-	}
+	/* This data might be unmapped at this time */
+	data->host_cookie = COOKIE_UNMAPPED;
 
-	if (dw_mci_pre_dma_transfer(slot->host, mrq->data, 1) < 0)
-		data->host_cookie = 0;
+	if (dw_mci_pre_dma_transfer(slot->host, mrq->data,
+				COOKIE_PRE_MAPPED) < 0)
+		data->host_cookie = COOKIE_UNMAPPED;
 }
 
 static void dw_mci_post_req(struct mmc_host *mmc,
@@ -916,12 +915,12 @@ static void dw_mci_post_req(struct mmc_host *mmc,
 	if (!slot->host->use_dma || !data)
 		return;
 
-	if (data->host_cookie)
+	if (data->host_cookie != COOKIE_UNMAPPED)
 		dma_unmap_sg(slot->host->dev,
 			     data->sg,
 			     data->sg_len,
 			     dw_mci_get_dma_dir(data));
-	data->host_cookie = 0;
+	data->host_cookie = COOKIE_UNMAPPED;
 }
 
 static void dw_mci_adjust_fifoth(struct dw_mci *host, struct mmc_data *data)
@@ -1027,7 +1026,7 @@ static int dw_mci_submit_data_dma(struct dw_mci *host, struct mmc_data *data)
 	if (!host->use_dma)
 		return -ENODEV;
 
-	sg_len = dw_mci_pre_dma_transfer(host, data, 0);
+	sg_len = dw_mci_pre_dma_transfer(host, data, COOKIE_MAPPED);
 	if (sg_len < 0) {
 		host->dma_ops->stop(host);
 		return sg_len;
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 08/13] mmc: dw_mmc: remove the unnecessary mmc_data structure
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (6 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 07/13] mmc: dw_mmc: use the cookie's enum values for post/pre_req() Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  6:21 ` [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property Jaehoon Chung
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

Remove the unnecessary mmc_data structure.
Instead, cmd->data can be used.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index df151c8..bd8c5ea 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -236,7 +236,6 @@ static void mci_send_cmd(struct dw_mci_slot *slot, u32 cmd, u32 arg);
 
 static u32 dw_mci_prepare_command(struct mmc_host *mmc, struct mmc_command *cmd)
 {
-	struct mmc_data	*data;
 	struct dw_mci_slot *slot = mmc_priv(mmc);
 	struct dw_mci *host = slot->host;
 	u32 cmdr;
@@ -291,10 +290,9 @@ static u32 dw_mci_prepare_command(struct mmc_host *mmc, struct mmc_command *cmd)
 	if (cmd->flags & MMC_RSP_CRC)
 		cmdr |= SDMMC_CMD_RESP_CRC;
 
-	data = cmd->data;
-	if (data) {
+	if (cmd->data) {
 		cmdr |= SDMMC_CMD_DAT_EXP;
-		if (data->flags & MMC_DATA_WRITE)
+		if (cmd->data->flags & MMC_DATA_WRITE)
 			cmdr |= SDMMC_CMD_DAT_WR;
 	}
 
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (7 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 08/13] mmc: dw_mmc: remove the unnecessary mmc_data structure Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03  8:20   ` Heiko Stübner
  2016-11-03  6:21 ` [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max" Jaehoon Chung
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	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.
-
 * 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;
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max"
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (8 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-03 18:41   ` Krzysztof Kozlowski
  2016-11-03  6:21 ` [PATCH 11/13] ARM: dts: rockchip: replace to "max-frequency" " Jaehoon Chung
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

In drivers/mmc/core/host.c, there is "max-frequency" property.
It should be same behavior. So Use the "max-frequency" instead of
"clock-freq-min-max".

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 arch/arm/boot/dts/exynos3250-artik5-eval.dts | 2 +-
 arch/arm/boot/dts/exynos3250-artik5.dtsi     | 2 +-
 arch/arm/boot/dts/exynos3250-monk.dts        | 2 +-
 arch/arm/boot/dts/exynos3250-rinato.dts      | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/exynos3250-artik5-eval.dts b/arch/arm/boot/dts/exynos3250-artik5-eval.dts
index be4d6aa..4bd2ee8 100644
--- a/arch/arm/boot/dts/exynos3250-artik5-eval.dts
+++ b/arch/arm/boot/dts/exynos3250-artik5-eval.dts
@@ -28,7 +28,7 @@
 	vqmmc-supply = <&ldo3_reg>;
 	card-detect-delay = <200>;
 	clock-frequency = <100000000>;
-	clock-freq-min-max = <400000 100000000>;
+	max-frequency = <100000000>;
 	samsung,dw-mshc-ciu-div = <1>;
 	samsung,dw-mshc-sdr-timing = <0 1>;
 	samsung,dw-mshc-ddr-timing = <1 2>;
diff --git a/arch/arm/boot/dts/exynos3250-artik5.dtsi b/arch/arm/boot/dts/exynos3250-artik5.dtsi
index a70819b..59c89d7 100644
--- a/arch/arm/boot/dts/exynos3250-artik5.dtsi
+++ b/arch/arm/boot/dts/exynos3250-artik5.dtsi
@@ -310,7 +310,7 @@
 	card-detect-delay = <200>;
 	vmmc-supply = <&ldo12_reg>;
 	clock-frequency = <100000000>;
-	clock-freq-min-max = <400000 100000000>;
+	max-frequency = <100000000>;
 	samsung,dw-mshc-ciu-div = <1>;
 	samsung,dw-mshc-sdr-timing = <0 1>;
 	samsung,dw-mshc-ddr-timing = <1 2>;
diff --git a/arch/arm/boot/dts/exynos3250-monk.dts b/arch/arm/boot/dts/exynos3250-monk.dts
index 66f04f6..cccfe4b 100644
--- a/arch/arm/boot/dts/exynos3250-monk.dts
+++ b/arch/arm/boot/dts/exynos3250-monk.dts
@@ -435,7 +435,7 @@
 	card-detect-delay = <200>;
 	vmmc-supply = <&vemmc_reg>;
 	clock-frequency = <100000000>;
-	clock-freq-min-max = <400000 100000000>;
+	max-frequency = <100000000>;
 	samsung,dw-mshc-ciu-div = <1>;
 	samsung,dw-mshc-sdr-timing = <0 1>;
 	samsung,dw-mshc-ddr-timing = <1 2>;
diff --git a/arch/arm/boot/dts/exynos3250-rinato.dts b/arch/arm/boot/dts/exynos3250-rinato.dts
index 3967ee5..548413e 100644
--- a/arch/arm/boot/dts/exynos3250-rinato.dts
+++ b/arch/arm/boot/dts/exynos3250-rinato.dts
@@ -649,7 +649,7 @@
 	card-detect-delay = <200>;
 	vmmc-supply = <&ldo12_reg>;
 	clock-frequency = <100000000>;
-	clock-freq-min-max = <400000 100000000>;
+	max-frequency = <100000000>;
 	samsung,dw-mshc-ciu-div = <1>;
 	samsung,dw-mshc-sdr-timing = <0 1>;
 	samsung,dw-mshc-ddr-timing = <1 2>;
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 11/13] ARM: dts: rockchip: replace to "max-frequency" instead of "clock-freq-min-max"
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (9 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max" Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-09 14:05   ` Heiko Stuebner
  2016-11-03  6:21 ` [PATCH 12/13] ARM64: " Jaehoon Chung
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

In drivers/mmc/core/host.c, there is "max-frequency" property.
It should be same behavior. So use the "max-frequency" instead of
"clock-freq-min-max".

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 arch/arm/boot/dts/rk3036.dtsi | 6 +++---
 arch/arm/boot/dts/rk322x.dtsi | 2 +-
 arch/arm/boot/dts/rk3288.dtsi | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi
index a935523..d3fb323 100644
--- a/arch/arm/boot/dts/rk3036.dtsi
+++ b/arch/arm/boot/dts/rk3036.dtsi
@@ -244,7 +244,7 @@
 		compatible = "rockchip,rk3036-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x10214000 0x4000>;
 		clock-frequency = <37500000>;
-		clock-freq-min-max = <400000 37500000>;
+		max-frequency = <37500000>;
 		clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
 		clock-names = "biu", "ciu";
 		fifo-depth = <0x100>;
@@ -255,7 +255,7 @@
 	sdio: dwmmc@10218000 {
 		compatible = "rockchip,rk3036-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x10218000 0x4000>;
-		clock-freq-min-max = <400000 37500000>;
+		max-frequency = <37500000>;
 		clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
 			 <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
@@ -271,7 +271,7 @@
 		bus-width = <8>;
 		cap-mmc-highspeed;
 		clock-frequency = <37500000>;
-		clock-freq-min-max = <400000 37500000>;
+		max-frequency = <37500000>;
 		clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
 			 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 9e6bf0e..8c2e360 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -402,7 +402,7 @@
 		reg = <0x30020000 0x4000>;
 		interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
 		clock-frequency = <37500000>;
-		clock-freq-min-max = <400000 37500000>;
+		max-frequency = <37500000>;
 		clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
 			 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 17ec2e2..65b60b7 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -227,7 +227,7 @@
 
 	sdmmc: dwmmc@ff0c0000 {
 		compatible = "rockchip,rk3288-dw-mshc";
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
 			 <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -239,7 +239,7 @@
 
 	sdio0: dwmmc@ff0d0000 {
 		compatible = "rockchip,rk3288-dw-mshc";
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_SDIO0>, <&cru SCLK_SDIO0>,
 			 <&cru SCLK_SDIO0_DRV>, <&cru SCLK_SDIO0_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -251,7 +251,7 @@
 
 	sdio1: dwmmc@ff0e0000 {
 		compatible = "rockchip,rk3288-dw-mshc";
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_SDIO1>, <&cru SCLK_SDIO1>,
 			 <&cru SCLK_SDIO1_DRV>, <&cru SCLK_SDIO1_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -263,7 +263,7 @@
 
 	emmc: dwmmc@ff0f0000 {
 		compatible = "rockchip,rk3288-dw-mshc";
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
 			 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 12/13] ARM64: dts: rockchip: replace to "max-frequency" instead of "clock-freq-min-max"
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (10 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 11/13] ARM: dts: rockchip: replace to "max-frequency" " Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-09 14:37   ` Heiko Stuebner
  2016-11-03  6:21 ` [PATCH 13/13] Documentation: synopsys-dw-mshc: remove the unused properties Jaehoon Chung
  2016-11-09 18:55 ` [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Heiko Stuebner
  13 siblings, 1 reply; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

In drivers/mmc/core/host.c, there is "max-freqeuncy" property.
It should be same behavior, So Use the "max-frequency" instead of
"clock-freq-min-max".

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 +-
 arch/arm64/boot/dts/rockchip/rk3368.dtsi               | 6 +++---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi               | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
index 5797933..0acf8a2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
@@ -347,7 +347,7 @@
 &sdmmc {
 	bus-width = <4>;
 	clock-frequency = <50000000>;
-	clock-freq-min-max = <400000 50000000>;
+	max-frequency = <50000000>;
 	cap-sd-highspeed;
 	card-detect-delay = <200>;
 	keep-power-in-suspend;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
index 0fcb214..79e7c88 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
@@ -231,7 +231,7 @@
 	sdmmc: dwmmc@ff0c0000 {
 		compatible = "rockchip,rk3368-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x0 0xff0c0000 0x0 0x4000>;
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
 			 <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -243,7 +243,7 @@
 	sdio0: dwmmc@ff0d0000 {
 		compatible = "rockchip,rk3368-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x0 0xff0d0000 0x0 0x4000>;
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_SDIO0>, <&cru SCLK_SDIO0>,
 			 <&cru SCLK_SDIO0_DRV>, <&cru SCLK_SDIO0_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
@@ -255,7 +255,7 @@
 	emmc: dwmmc@ff0f0000 {
 		compatible = "rockchip,rk3368-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x0 0xff0f0000 0x0 0x4000>;
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
 			 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index b65c193..b1c011d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -235,7 +235,7 @@
 			     "rockchip,rk3288-dw-mshc";
 		reg = <0x0 0xfe310000 0x0 0x4000>;
 		interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH 0>;
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
 			 <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
@@ -248,7 +248,7 @@
 			     "rockchip,rk3288-dw-mshc";
 		reg = <0x0 0xfe320000 0x0 0x4000>;
 		interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>;
-		clock-freq-min-max = <400000 150000000>;
+		max-frequency = <150000000>;
 		clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
 			 <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
 		clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 13/13] Documentation: synopsys-dw-mshc: remove the unused properties
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (11 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 12/13] ARM64: " Jaehoon Chung
@ 2016-11-03  6:21 ` Jaehoon Chung
  2016-11-10 18:47   ` Rob Herring
  2016-11-09 18:55 ` [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Heiko Stuebner
  13 siblings, 1 reply; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  6:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, krzk, heiko, shawn.lin,
	Jaehoon Chung

"support-highspeed" was the obsoleted property.
And "broken-cd" is not synopsys specific property.
It can be referred to mmc.txt binding Documentation.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
index 21c8251..3dd2849 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
@@ -68,11 +68,6 @@ Optional properties:
 * card-detect-delay: Delay in milli-seconds before detecting card after card
   insert event. The default value is 0.
 
-* supports-highspeed (DEPRECATED): Enables support for high speed cards (up to 50MHz)
-			   (use "cap-mmc-highspeed" or "cap-sd-highspeed" instead)
-
-* broken-cd: as documented in mmc core bindings.
-
 * vmmc-supply: The phandle to the regulator to use for vmmc.  If this is
   specified we'll defer probe until we can find this regulator.
 
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property
  2016-11-03  6:21 ` [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property Jaehoon Chung
@ 2016-11-03  8:20   ` Heiko Stübner
  2016-11-03  8:42     ` Jaehoon Chung
  0 siblings, 1 reply; 26+ messages in thread
From: Heiko Stübner @ 2016-11-03  8:20 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, krzk,
	shawn.lin

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property
  2016-11-03  8:20   ` Heiko Stübner
@ 2016-11-03  8:42     ` Jaehoon Chung
  0 siblings, 0 replies; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-03  8:42 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, krzk,
	shawn.lin

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
> 
> 
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max"
  2016-11-03  6:21 ` [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max" Jaehoon Chung
@ 2016-11-03 18:41   ` Krzysztof Kozlowski
  2016-11-04 10:21     ` Jaehoon Chung
  0 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-03 18:41 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, krzk,
	heiko, shawn.lin

On Thu, Nov 03, 2016 at 03:21:32PM +0900, Jaehoon Chung wrote:
> In drivers/mmc/core/host.c, there is "max-frequency" property.
> It should be same behavior. So Use the "max-frequency" instead of
> "clock-freq-min-max".
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  arch/arm/boot/dts/exynos3250-artik5-eval.dts | 2 +-
>  arch/arm/boot/dts/exynos3250-artik5.dtsi     | 2 +-
>  arch/arm/boot/dts/exynos3250-monk.dts        | 2 +-
>  arch/arm/boot/dts/exynos3250-rinato.dts      | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)

This looks totally independent to rest of patches so it can be applied
separately without any functional impact (except lack of minimum
frequency). Is that correct?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max"
  2016-11-03 18:41   ` Krzysztof Kozlowski
@ 2016-11-04 10:21     ` Jaehoon Chung
  2016-11-04 11:19       ` Heiko Stuebner
  0 siblings, 1 reply; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-04 10:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, heiko,
	shawn.lin

On 11/04/2016 03:41 AM, Krzysztof Kozlowski wrote:
> On Thu, Nov 03, 2016 at 03:21:32PM +0900, Jaehoon Chung wrote:
>> In drivers/mmc/core/host.c, there is "max-frequency" property.
>> It should be same behavior. So Use the "max-frequency" instead of
>> "clock-freq-min-max".
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> ---
>>  arch/arm/boot/dts/exynos3250-artik5-eval.dts | 2 +-
>>  arch/arm/boot/dts/exynos3250-artik5.dtsi     | 2 +-
>>  arch/arm/boot/dts/exynos3250-monk.dts        | 2 +-
>>  arch/arm/boot/dts/exynos3250-rinato.dts      | 2 +-
>>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> This looks totally independent to rest of patches so it can be applied
> separately without any functional impact (except lack of minimum
> frequency). Is that correct?

You're right. I will split the patches. And will resend.
Thanks!

Best Regards,
Jaehoon Chung

> 
> Best regards,
> Krzysztof
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max"
  2016-11-04 10:21     ` Jaehoon Chung
@ 2016-11-04 11:19       ` Heiko Stuebner
  2016-11-04 15:04         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 26+ messages in thread
From: Heiko Stuebner @ 2016-11-04 11:19 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: Krzysztof Kozlowski, linux-mmc, devicetree, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, linux-rockchip, ulf.hansson,
	robh+dt, shawn.lin

Hi Jaehoon,

Am Freitag, 4. November 2016, 19:21:30 CET schrieb Jaehoon Chung:
> On 11/04/2016 03:41 AM, Krzysztof Kozlowski wrote:
> > On Thu, Nov 03, 2016 at 03:21:32PM +0900, Jaehoon Chung wrote:
> >> In drivers/mmc/core/host.c, there is "max-frequency" property.
> >> It should be same behavior. So Use the "max-frequency" instead of
> >> "clock-freq-min-max".
> >> 
> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> >> ---
> >> 
> >>  arch/arm/boot/dts/exynos3250-artik5-eval.dts | 2 +-
> >>  arch/arm/boot/dts/exynos3250-artik5.dtsi     | 2 +-
> >>  arch/arm/boot/dts/exynos3250-monk.dts        | 2 +-
> >>  arch/arm/boot/dts/exynos3250-rinato.dts      | 2 +-
> >>  4 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > This looks totally independent to rest of patches so it can be applied
> > separately without any functional impact (except lack of minimum
> > frequency). Is that correct?
> 
> You're right. I will split the patches. And will resend.
> Thanks!

I think what Krzysztof was asking was just if he can simply pick up this patch 
alone, as it does not require any of the previous changes.

Same is true for the Rockchip patches I guess, so we could just take them 
individually into samsung/rockchip dts branches.


Heiko

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max"
  2016-11-04 11:19       ` Heiko Stuebner
@ 2016-11-04 15:04         ` Krzysztof Kozlowski
  2016-11-07  0:38           ` Jaehoon Chung
  0 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-04 15:04 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Jaehoon Chung, Krzysztof Kozlowski, linux-mmc, devicetree,
	linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, shawn.lin

On Fri, Nov 04, 2016 at 12:19:49PM +0100, Heiko Stuebner wrote:
> Hi Jaehoon,
> 
> Am Freitag, 4. November 2016, 19:21:30 CET schrieb Jaehoon Chung:
> > On 11/04/2016 03:41 AM, Krzysztof Kozlowski wrote:
> > > On Thu, Nov 03, 2016 at 03:21:32PM +0900, Jaehoon Chung wrote:
> > >> In drivers/mmc/core/host.c, there is "max-frequency" property.
> > >> It should be same behavior. So Use the "max-frequency" instead of
> > >> "clock-freq-min-max".
> > >> 
> > >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> > >> ---
> > >> 
> > >>  arch/arm/boot/dts/exynos3250-artik5-eval.dts | 2 +-
> > >>  arch/arm/boot/dts/exynos3250-artik5.dtsi     | 2 +-
> > >>  arch/arm/boot/dts/exynos3250-monk.dts        | 2 +-
> > >>  arch/arm/boot/dts/exynos3250-rinato.dts      | 2 +-
> > >>  4 files changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > This looks totally independent to rest of patches so it can be applied
> > > separately without any functional impact (except lack of minimum
> > > frequency). Is that correct?
> > 
> > You're right. I will split the patches. And will resend.
> > Thanks!
> 
> I think what Krzysztof was asking was just if he can simply pick up this patch 
> alone, as it does not require any of the previous changes.
> 
> Same is true for the Rockchip patches I guess, so we could just take them 
> individually into samsung/rockchip dts branches.

Yes, I wanted to get exactly this information. I couldn't find it in
cover letter.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max"
  2016-11-04 15:04         ` Krzysztof Kozlowski
@ 2016-11-07  0:38           ` Jaehoon Chung
  2016-11-09 20:10             ` Krzysztof Kozlowski
  0 siblings, 1 reply; 26+ messages in thread
From: Jaehoon Chung @ 2016-11-07  0:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Heiko Stuebner
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt,
	shawn.lin

On 11/05/2016 12:04 AM, Krzysztof Kozlowski wrote:
> On Fri, Nov 04, 2016 at 12:19:49PM +0100, Heiko Stuebner wrote:
>> Hi Jaehoon,
>>
>> Am Freitag, 4. November 2016, 19:21:30 CET schrieb Jaehoon Chung:
>>> On 11/04/2016 03:41 AM, Krzysztof Kozlowski wrote:
>>>> On Thu, Nov 03, 2016 at 03:21:32PM +0900, Jaehoon Chung wrote:
>>>>> In drivers/mmc/core/host.c, there is "max-frequency" property.
>>>>> It should be same behavior. So Use the "max-frequency" instead of
>>>>> "clock-freq-min-max".
>>>>>
>>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>>>> ---
>>>>>
>>>>>  arch/arm/boot/dts/exynos3250-artik5-eval.dts | 2 +-
>>>>>  arch/arm/boot/dts/exynos3250-artik5.dtsi     | 2 +-
>>>>>  arch/arm/boot/dts/exynos3250-monk.dts        | 2 +-
>>>>>  arch/arm/boot/dts/exynos3250-rinato.dts      | 2 +-
>>>>>  4 files changed, 4 insertions(+), 4 deletions(-)
>>>>
>>>> This looks totally independent to rest of patches so it can be applied
>>>> separately without any functional impact (except lack of minimum
>>>> frequency). Is that correct?
>>>
>>> You're right. I will split the patches. And will resend.
>>> Thanks!
>>
>> I think what Krzysztof was asking was just if he can simply pick up this patch 
>> alone, as it does not require any of the previous changes.
>>
>> Same is true for the Rockchip patches I guess, so we could just take them 
>> individually into samsung/rockchip dts branches.
> 
> Yes, I wanted to get exactly this information. I couldn't find it in
> cover letter.

In drivers/mmc/core/host.c, there already is "max-frequency" property.
It's same functionality with "clock-freq-min-max". 
Minimum clock value can be fixed to 100K. because MMC core will check clock value from 400K to 100K.
But max-frequency can be difference.
If we can use "max-frequency" property, we don't need to use "clock-freq-min-max" property anymore.
I will resend the deprecated property instead of removing "clock-freq-min-max".

If you want to pick this, it's possible to pick. Then i will resend the patches without dt patches.

Best Regards,
Jaehoon Chung


> 
> Best regards,
> Krzysztof
> --
> 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
> 
> 
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 11/13] ARM: dts: rockchip: replace to "max-frequency" instead of "clock-freq-min-max"
  2016-11-03  6:21 ` [PATCH 11/13] ARM: dts: rockchip: replace to "max-frequency" " Jaehoon Chung
@ 2016-11-09 14:05   ` Heiko Stuebner
  0 siblings, 0 replies; 26+ messages in thread
From: Heiko Stuebner @ 2016-11-09 14:05 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, krzk,
	shawn.lin

Am Donnerstag, 3. November 2016, 15:21:33 CET schrieb Jaehoon Chung:
> In drivers/mmc/core/host.c, there is "max-frequency" property.
> It should be same behavior. So use the "max-frequency" instead of
> "clock-freq-min-max".
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

looks good, my veyron-pinky and rk3036-kylin still seem to work and hopefully 
I haven't missed any spelling errors in the properties :-), so applied to my 
dts32 branch for 4.10


Thanks
Heiko

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 12/13] ARM64: dts: rockchip: replace to "max-frequency" instead of "clock-freq-min-max"
  2016-11-03  6:21 ` [PATCH 12/13] ARM64: " Jaehoon Chung
@ 2016-11-09 14:37   ` Heiko Stuebner
  0 siblings, 0 replies; 26+ messages in thread
From: Heiko Stuebner @ 2016-11-09 14:37 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, krzk,
	shawn.lin

Am Donnerstag, 3. November 2016, 15:21:34 CET schrieb Jaehoon Chung:
> In drivers/mmc/core/host.c, there is "max-freqeuncy" property.
> It should be same behavior, So Use the "max-frequency" instead of
> "clock-freq-min-max".
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

applied to my dts64 branch for 4.10


Thanks
Heiko

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller
  2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
                   ` (12 preceding siblings ...)
  2016-11-03  6:21 ` [PATCH 13/13] Documentation: synopsys-dw-mshc: remove the unused properties Jaehoon Chung
@ 2016-11-09 18:55 ` Heiko Stuebner
  13 siblings, 0 replies; 26+ messages in thread
From: Heiko Stuebner @ 2016-11-09 18:55 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, robh+dt, krzk,
	shawn.lin

Am Donnerstag, 3. November 2016, 15:21:22 CET schrieb Jaehoon Chung:
> This patchset is modified the some minor fixing and cleaning code.
> If needs to split the patches, i will re-send the patches.
> 
> * Major changes
> - Use the cookie enum values like sdhci controller.
> - Remove the unnecessary codes and use stop_abort() by default.
> - Remove the obsoleted property "supports-highspeed"
> - Remove the "clock-freq-min-max" property. Instead, use "max-frequency"
> - Minimum clock value is set to 100K by default.
> 
> Jaehoon Chung (13):
>   mmc: dw_mmc: display the real register value on debugfs
>   mmc: dw_mmc: fix the debug message for checking card's present
>   mmc: dw_mmc: change the DW_MCI_FREQ_MIN from 400K to 100K
>   mmc: dw_mmc: use the hold register when send stop command
>   mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default
>   mmc: core: move the cookie's enum values from sdhci.h to mmc.h
>   mmc: dw_mmc: use the cookie's enum values for post/pre_req()
>   mmc: dw_mmc: remove the unnecessary mmc_data structure

patches 1-8 on rk3036, rk3288, rk3368 and rk3399 Rockchip platforms
Tested-by: Heiko Stuebner <heiko@sntech.de>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max"
  2016-11-07  0:38           ` Jaehoon Chung
@ 2016-11-09 20:10             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-09 20:10 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: Krzysztof Kozlowski, Heiko Stuebner, linux-mmc, devicetree,
	linux-kernel, linux-arm-kernel, linux-samsung-soc,
	linux-rockchip, ulf.hansson, robh+dt, shawn.lin

On Mon, Nov 07, 2016 at 09:38:15AM +0900, Jaehoon Chung wrote:
> On 11/05/2016 12:04 AM, Krzysztof Kozlowski wrote:
> > On Fri, Nov 04, 2016 at 12:19:49PM +0100, Heiko Stuebner wrote:
> >> Hi Jaehoon,
> >>
> >> Am Freitag, 4. November 2016, 19:21:30 CET schrieb Jaehoon Chung:
> >>> On 11/04/2016 03:41 AM, Krzysztof Kozlowski wrote:
> >>>> On Thu, Nov 03, 2016 at 03:21:32PM +0900, Jaehoon Chung wrote:
> >>>>> In drivers/mmc/core/host.c, there is "max-frequency" property.
> >>>>> It should be same behavior. So Use the "max-frequency" instead of
> >>>>> "clock-freq-min-max".
> >>>>>
> >>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> >>>>> ---
> >>>>>
> >>>>>  arch/arm/boot/dts/exynos3250-artik5-eval.dts | 2 +-
> >>>>>  arch/arm/boot/dts/exynos3250-artik5.dtsi     | 2 +-
> >>>>>  arch/arm/boot/dts/exynos3250-monk.dts        | 2 +-
> >>>>>  arch/arm/boot/dts/exynos3250-rinato.dts      | 2 +-
> >>>>>  4 files changed, 4 insertions(+), 4 deletions(-)
> >>>>
> >>>> This looks totally independent to rest of patches so it can be applied
> >>>> separately without any functional impact (except lack of minimum
> >>>> frequency). Is that correct?
> >>>
> >>> You're right. I will split the patches. And will resend.
> >>> Thanks!
> >>
> >> I think what Krzysztof was asking was just if he can simply pick up this patch 
> >> alone, as it does not require any of the previous changes.
> >>
> >> Same is true for the Rockchip patches I guess, so we could just take them 
> >> individually into samsung/rockchip dts branches.
> > 
> > Yes, I wanted to get exactly this information. I couldn't find it in
> > cover letter.
> 
> In drivers/mmc/core/host.c, there already is "max-frequency" property.
> It's same functionality with "clock-freq-min-max". 
> Minimum clock value can be fixed to 100K. because MMC core will check clock value from 400K to 100K.
> But max-frequency can be difference.
> If we can use "max-frequency" property, we don't need to use "clock-freq-min-max" property anymore.
> I will resend the deprecated property instead of removing "clock-freq-min-max".
> 
> If you want to pick this, it's possible to pick. Then i will resend the patches without dt patches.

Thanks, applied.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 13/13] Documentation: synopsys-dw-mshc: remove the unused properties
  2016-11-03  6:21 ` [PATCH 13/13] Documentation: synopsys-dw-mshc: remove the unused properties Jaehoon Chung
@ 2016-11-10 18:47   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2016-11-10 18:47 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-rockchip, ulf.hansson, krzk, heiko,
	shawn.lin

On Thu, Nov 03, 2016 at 03:21:35PM +0900, Jaehoon Chung wrote:
> "support-highspeed" was the obsoleted property.
> And "broken-cd" is not synopsys specific property.
> It can be referred to mmc.txt binding Documentation.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 -----
>  1 file changed, 5 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-11-10 18:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03  6:21 [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Jaehoon Chung
2016-11-03  6:21 ` [PATCH 01/13] mmc: dw_mmc: display the real register value on debugfs Jaehoon Chung
2016-11-03  6:21 ` [PATCH 02/13] mmc: dw_mmc: fix the debug message for checking card's present Jaehoon Chung
2016-11-03  6:21 ` [PATCH 03/13] mmc: dw_mmc: change the DW_MCI_FREQ_MIN from 400K to 100K Jaehoon Chung
2016-11-03  6:21 ` [PATCH 04/13] mmc: dw_mmc: use the hold register when send stop command Jaehoon Chung
2016-11-03  6:21 ` [PATCH 05/13] mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default Jaehoon Chung
2016-11-03  6:21 ` [PATCH 06/13] mmc: core: move the cookie's enum values from sdhci.h to mmc.h Jaehoon Chung
2016-11-03  6:21 ` [PATCH 07/13] mmc: dw_mmc: use the cookie's enum values for post/pre_req() Jaehoon Chung
2016-11-03  6:21 ` [PATCH 08/13] mmc: dw_mmc: remove the unnecessary mmc_data structure Jaehoon Chung
2016-11-03  6:21 ` [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property Jaehoon Chung
2016-11-03  8:20   ` Heiko Stübner
2016-11-03  8:42     ` Jaehoon Chung
2016-11-03  6:21 ` [PATCH 10/13] ARM: dts: exynos: replace to "max-frequecy" instead of "clock-freq-min-max" Jaehoon Chung
2016-11-03 18:41   ` Krzysztof Kozlowski
2016-11-04 10:21     ` Jaehoon Chung
2016-11-04 11:19       ` Heiko Stuebner
2016-11-04 15:04         ` Krzysztof Kozlowski
2016-11-07  0:38           ` Jaehoon Chung
2016-11-09 20:10             ` Krzysztof Kozlowski
2016-11-03  6:21 ` [PATCH 11/13] ARM: dts: rockchip: replace to "max-frequency" " Jaehoon Chung
2016-11-09 14:05   ` Heiko Stuebner
2016-11-03  6:21 ` [PATCH 12/13] ARM64: " Jaehoon Chung
2016-11-09 14:37   ` Heiko Stuebner
2016-11-03  6:21 ` [PATCH 13/13] Documentation: synopsys-dw-mshc: remove the unused properties Jaehoon Chung
2016-11-10 18:47   ` Rob Herring
2016-11-09 18:55 ` [PATCH 00/13] mmc: dw_mmc: cleans the codes for dwmmc controller Heiko Stuebner

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).