* [PATCH 0/4] mmc: dw_mmc: cleanup codes
@ 2014-09-05 5:14 Jaehoon Chung
2014-09-05 5:14 ` [PATCH 1/4] mmc: dw_mmc: modify the variable type Jaehoon Chung
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jaehoon Chung @ 2014-09-05 5:14 UTC (permalink / raw)
To: linux-mmc; +Cc: Chris Ball, Ulf Hansson, tgih.jun, Jaehoon Chung
This patch-set fixed the wrong variable type and remove the unused codes.
Jaehoon Chung (4):
mmc: dw_mmc: modify the variable type
mmc: dw_mmc: remove the blk-settings structure
mmc: dw_mmc: remove the unused quirk.
mmc: dw_mmc: fixed wrong condtion checking.
drivers/mmc/host/dw_mmc-exynos.c | 5 ++---
drivers/mmc/host/dw_mmc.c | 15 ++++-----------
drivers/mmc/host/dw_mmc.h | 4 ++--
include/linux/mmc/dw_mmc.h | 15 ++-------------
4 files changed, 10 insertions(+), 29 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] mmc: dw_mmc: modify the variable type
2014-09-05 5:14 [PATCH 0/4] mmc: dw_mmc: cleanup codes Jaehoon Chung
@ 2014-09-05 5:14 ` Jaehoon Chung
2014-09-05 5:14 ` [PATCH 2/4] mmc: dw_mmc: remove the blk-settings structure Jaehoon Chung
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2014-09-05 5:14 UTC (permalink / raw)
To: linux-mmc; +Cc: Chris Ball, Ulf Hansson, tgih.jun, Jaehoon Chung
Fixed wrong variable type.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/host/dw_mmc-exynos.c | 2 +-
drivers/mmc/host/dw_mmc.c | 2 +-
drivers/mmc/host/dw_mmc.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 0fbc53a..aee39bc 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -385,7 +385,7 @@ static int dw_mci_exynos_execute_tuning(struct dw_mci_slot *slot, u32 opcode,
}
/* Common capabilities of Exynos4/Exynos5 SoC */
-static unsigned long exynos_dwmmc_caps[4] = {
+static unsigned int exynos_dwmmc_caps[4] = {
MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA | MMC_CAP_CMD23,
MMC_CAP_CMD23,
MMC_CAP_CMD23,
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 835e913..b8e0ca8 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2202,7 +2202,7 @@ static struct dw_mci_of_slot_quirks {
static int dw_mci_of_get_slot_quirks(struct device *dev, u8 slot)
{
struct device_node *np = dw_mci_of_find_slot_node(dev, slot);
- int quirks = 0;
+ unsigned int quirks = 0;
int idx;
/* get quirks */
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 01b99e8..4096f2b 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -220,7 +220,7 @@ struct dw_mci_slot {
struct mmc_host *mmc;
struct dw_mci *host;
- int quirks;
+ unsigned int quirks;
u32 ctype;
@@ -257,7 +257,7 @@ struct dw_mci_tuning_data {
* is optional as well.
*/
struct dw_mci_drv_data {
- unsigned long *caps;
+ unsigned int *caps;
int (*init)(struct dw_mci *host);
int (*setup_clock)(struct dw_mci *host);
void (*prepare_command)(struct dw_mci *host, u32 *cmdr);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] mmc: dw_mmc: remove the blk-settings structure
2014-09-05 5:14 [PATCH 0/4] mmc: dw_mmc: cleanup codes Jaehoon Chung
2014-09-05 5:14 ` [PATCH 1/4] mmc: dw_mmc: modify the variable type Jaehoon Chung
@ 2014-09-05 5:14 ` Jaehoon Chung
2014-09-05 5:14 ` [PATCH 3/4] mmc: dw_mmc: remove the unused quirk Jaehoon Chung
2014-09-05 5:15 ` [PATCH 4/4] mmc: dw_mmc: fixed wrong condtion checking Jaehoon Chung
3 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2014-09-05 5:14 UTC (permalink / raw)
To: linux-mmc; +Cc: Chris Ball, Ulf Hansson, tgih.jun, Jaehoon Chung
It don't use anywhere. So it's meaningless.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 13 +++----------
include/linux/mmc/dw_mmc.h | 9 ---------
2 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index b8e0ca8..0d31a8c 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2287,27 +2287,20 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
if (ret)
goto err_host_allocated;
- if (host->pdata->blk_settings) {
- mmc->max_segs = host->pdata->blk_settings->max_segs;
- mmc->max_blk_size = host->pdata->blk_settings->max_blk_size;
- mmc->max_blk_count = host->pdata->blk_settings->max_blk_count;
- mmc->max_req_size = host->pdata->blk_settings->max_req_size;
- mmc->max_seg_size = host->pdata->blk_settings->max_seg_size;
- } else {
+
+ if (IS_ENABLED(CONFIG_MMC_DW_IDMAC)) {
/* Useful defaults if platform data is unset. */
-#ifdef CONFIG_MMC_DW_IDMAC
mmc->max_segs = host->ring_size;
mmc->max_blk_size = 65536;
mmc->max_blk_count = host->ring_size;
mmc->max_seg_size = 0x1000;
mmc->max_req_size = mmc->max_seg_size * mmc->max_blk_count;
-#else
+ } else {
mmc->max_segs = 64;
mmc->max_blk_size = 65536; /* BLKSIZ is 16 bits */
mmc->max_blk_count = 512;
mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
mmc->max_seg_size = mmc->max_req_size;
-#endif /* CONFIG_MMC_DW_IDMAC */
}
if (dw_mci_get_cd(mmc))
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 0013669..6dcc1c1 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -224,14 +224,6 @@ struct dw_mci_dma_ops {
struct dma_pdata;
-struct block_settings {
- unsigned short max_segs; /* see blk_queue_max_segments */
- unsigned int max_blk_size; /* maximum size of one mmc block */
- unsigned int max_blk_count; /* maximum number of blocks in one req*/
- unsigned int max_req_size; /* maximum number of bytes in one req*/
- unsigned int max_seg_size; /* see blk_queue_max_segment_size */
-};
-
/* Board platform data */
struct dw_mci_board {
u32 num_slots;
@@ -254,7 +246,6 @@ struct dw_mci_board {
struct dw_mci_dma_ops *dma_ops;
struct dma_pdata *data;
- struct block_settings *blk_settings;
};
#endif /* LINUX_MMC_DW_MMC_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] mmc: dw_mmc: remove the unused quirk.
2014-09-05 5:14 [PATCH 0/4] mmc: dw_mmc: cleanup codes Jaehoon Chung
2014-09-05 5:14 ` [PATCH 1/4] mmc: dw_mmc: modify the variable type Jaehoon Chung
2014-09-05 5:14 ` [PATCH 2/4] mmc: dw_mmc: remove the blk-settings structure Jaehoon Chung
@ 2014-09-05 5:14 ` Jaehoon Chung
2014-09-05 5:15 ` [PATCH 4/4] mmc: dw_mmc: fixed wrong condtion checking Jaehoon Chung
3 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2014-09-05 5:14 UTC (permalink / raw)
To: linux-mmc; +Cc: Chris Ball, Ulf Hansson, tgih.jun, Jaehoon Chung
DW_MCI_QUIRK_HIGHSPEED don't use.
If we need to set the highspeed mode by force, we can use to set
cap-mms/sd-highspeed into dt-file.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
include/linux/mmc/dw_mmc.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 6dcc1c1..2796d9c 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -211,12 +211,10 @@ struct dw_mci_dma_ops {
#define DW_MCI_QUIRK_IDMAC_DTO BIT(0)
/* delay needed between retries on some 2.11a implementations */
#define DW_MCI_QUIRK_RETRY_DELAY BIT(1)
-/* High Speed Capable - Supports HS cards (up to 50MHz) */
-#define DW_MCI_QUIRK_HIGHSPEED BIT(2)
/* Unreliable card detection */
-#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
+#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(2)
/* No write protect */
-#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4)
+#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(3)
/* Slot level quirks */
/* This slot has no write protect */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] mmc: dw_mmc: fixed wrong condtion checking.
2014-09-05 5:14 [PATCH 0/4] mmc: dw_mmc: cleanup codes Jaehoon Chung
` (2 preceding siblings ...)
2014-09-05 5:14 ` [PATCH 3/4] mmc: dw_mmc: remove the unused quirk Jaehoon Chung
@ 2014-09-05 5:15 ` Jaehoon Chung
3 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2014-09-05 5:15 UTC (permalink / raw)
To: linux-mmc; +Cc: Chris Ball, Ulf Hansson, tgih.jun, Jaehoon Chung
DDR mode can use with 4bit or 8bit buswidth.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/host/dw_mmc-exynos.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index aee39bc..0884df6 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -190,8 +190,7 @@ static void dw_mci_exynos_set_ios(struct dw_mci *host, struct mmc_ios *ios)
if (ios->timing == MMC_TIMING_MMC_DDR52) {
mci_writel(host, CLKSEL, priv->ddr_timing);
/* Should be double rate for DDR mode */
- if (ios->bus_width == MMC_BUS_WIDTH_8)
- wanted <<= 1;
+ wanted <<= 1;
} else {
mci_writel(host, CLKSEL, priv->sdr_timing);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-05 5:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 5:14 [PATCH 0/4] mmc: dw_mmc: cleanup codes Jaehoon Chung
2014-09-05 5:14 ` [PATCH 1/4] mmc: dw_mmc: modify the variable type Jaehoon Chung
2014-09-05 5:14 ` [PATCH 2/4] mmc: dw_mmc: remove the blk-settings structure Jaehoon Chung
2014-09-05 5:14 ` [PATCH 3/4] mmc: dw_mmc: remove the unused quirk Jaehoon Chung
2014-09-05 5:15 ` [PATCH 4/4] mmc: dw_mmc: fixed wrong condtion checking Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.