* [PATCH v2 1/8] mmc: omap: Enable Auto CMD12
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
@ 2012-03-16 13:38 ` Venkatraman S
2012-03-16 13:51 ` Felipe Balbi
2012-03-16 13:38 ` [PATCH v2 2/8] mmc: omap: add DDR support to omap_hsmmc Venkatraman S
` (7 subsequent siblings)
8 siblings, 1 reply; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:38 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S
From: Balaji T K <balajitk@ti.com>
Enable Auto-CMD12 for multi block read/write on HSMMC
Tested on OMAP4430, OMAP3430 and OMAP2430 SDP
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index f29e1a2..a9ffd70 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -85,6 +85,7 @@
#define BRR_ENABLE (1 << 5)
#define DTO_ENABLE (1 << 20)
#define INIT_STREAM (1 << 1)
+#define ACEN_ACMD12 (1 << 2)
#define DP_SELECT (1 << 21)
#define DDIR (1 << 4)
#define DMA_EN 0x1
@@ -115,6 +116,7 @@
#define OMAP_MMC_MAX_CLOCK 52000000
#define DRIVER_NAME "omap_hsmmc"
+#define AUTO_CMD12 (1 << 0) /* Auto CMD12 support */
/*
* One controller can have multiple slots, like on some omap boards using
* omap.c controller driver. Luckily this is not currently done on any known
@@ -175,6 +177,7 @@ struct omap_hsmmc_host {
int reqs_blocked;
int use_reg;
int req_in_progress;
+ unsigned int flags;
struct omap_hsmmc_next next_data;
struct omap_mmc_platform_data *pdata;
@@ -766,6 +769,8 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd,
cmdtype = 0x3;
cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
+ if ((host->flags & AUTO_CMD12) && mmc_op_multi(cmd->opcode))
+ cmdreg |= ACEN_ACMD12;
if (data) {
cmdreg |= DP_SELECT | MSBS | BCE;
@@ -837,11 +842,15 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data)
else
data->bytes_xfered = 0;
- if (!data->stop) {
+ if (data->stop && ((!(host->flags & AUTO_CMD12)) || data->error)) {
+ omap_hsmmc_start_command(host, data->stop, NULL);
+ }
+ else {
+ if (data->stop)
+ data->stop->resp[0] = OMAP_HSMMC_READ(host->base,
+ RSP76);
omap_hsmmc_request_done(host, data->mrq);
- return;
}
- omap_hsmmc_start_command(host, data->stop, NULL);
}
/*
@@ -1826,6 +1835,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
host->mapbase = res->start;
host->base = ioremap(host->mapbase, SZ_4K);
host->power_mode = MMC_POWER_OFF;
+ host->flags = AUTO_CMD12;
host->next_data.cookie = 1;
platform_set_drvdata(pdev, host);
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v2 1/8] mmc: omap: Enable Auto CMD12
2012-03-16 13:38 ` [PATCH v2 1/8] mmc: omap: Enable Auto CMD12 Venkatraman S
@ 2012-03-16 13:51 ` Felipe Balbi
2012-03-16 14:26 ` S, Venkatraman
0 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2012-03-16 13:51 UTC (permalink / raw)
To: Venkatraman S; +Cc: linux-mmc, linux-omap, cjb, balajitk, balbi
[-- Attachment #1: Type: text/plain, Size: 2186 bytes --]
On Fri, Mar 16, 2012 at 07:08:57PM +0530, Venkatraman S wrote:
> From: Balaji T K <balajitk@ti.com>
>
> Enable Auto-CMD12 for multi block read/write on HSMMC
> Tested on OMAP4430, OMAP3430 and OMAP2430 SDP
>
> Signed-off-by: Balaji T K <balajitk@ti.com>
> Signed-off-by: Venkatraman S <svenkatr@ti.com>
> ---
> drivers/mmc/host/omap_hsmmc.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index f29e1a2..a9ffd70 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -85,6 +85,7 @@
> #define BRR_ENABLE (1 << 5)
> #define DTO_ENABLE (1 << 20)
> #define INIT_STREAM (1 << 1)
> +#define ACEN_ACMD12 (1 << 2)
> #define DP_SELECT (1 << 21)
> #define DDIR (1 << 4)
> #define DMA_EN 0x1
> @@ -115,6 +116,7 @@
> #define OMAP_MMC_MAX_CLOCK 52000000
> #define DRIVER_NAME "omap_hsmmc"
>
> +#define AUTO_CMD12 (1 << 0) /* Auto CMD12 support */
> /*
> * One controller can have multiple slots, like on some omap boards using
> * omap.c controller driver. Luckily this is not currently done on any known
> @@ -175,6 +177,7 @@ struct omap_hsmmc_host {
> int reqs_blocked;
> int use_reg;
> int req_in_progress;
> + unsigned int flags;
> struct omap_hsmmc_next next_data;
>
> struct omap_mmc_platform_data *pdata;
> @@ -766,6 +769,8 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd,
> cmdtype = 0x3;
>
> cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
> + if ((host->flags & AUTO_CMD12) && mmc_op_multi(cmd->opcode))
> + cmdreg |= ACEN_ACMD12;
>
> if (data) {
> cmdreg |= DP_SELECT | MSBS | BCE;
> @@ -837,11 +842,15 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data)
> else
> data->bytes_xfered = 0;
>
> - if (!data->stop) {
> + if (data->stop && ((!(host->flags & AUTO_CMD12)) || data->error)) {
> + omap_hsmmc_start_command(host, data->stop, NULL);
> + }
> + else {
while adding the braces, you broke the coding style. Please fix.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v2 1/8] mmc: omap: Enable Auto CMD12
2012-03-16 13:51 ` Felipe Balbi
@ 2012-03-16 14:26 ` S, Venkatraman
0 siblings, 0 replies; 17+ messages in thread
From: S, Venkatraman @ 2012-03-16 14:26 UTC (permalink / raw)
To: balbi; +Cc: linux-mmc, linux-omap, cjb, balajitk
On Fri, Mar 16, 2012 at 7:21 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Fri, Mar 16, 2012 at 07:08:57PM +0530, Venkatraman S wrote:
>> From: Balaji T K <balajitk@ti.com>
>>
>> Enable Auto-CMD12 for multi block read/write on HSMMC
>> Tested on OMAP4430, OMAP3430 and OMAP2430 SDP
>>
>> Signed-off-by: Balaji T K <balajitk@ti.com>
>> Signed-off-by: Venkatraman S <svenkatr@ti.com>
>> ---
>> drivers/mmc/host/omap_hsmmc.c | 16 +++++++++++++---
>> 1 file changed, 13 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
>> index f29e1a2..a9ffd70 100644
>> --- a/drivers/mmc/host/omap_hsmmc.c
>> +++ b/drivers/mmc/host/omap_hsmmc.c
>> @@ -85,6 +85,7 @@
>> #define BRR_ENABLE (1 << 5)
>> #define DTO_ENABLE (1 << 20)
>> #define INIT_STREAM (1 << 1)
>> +#define ACEN_ACMD12 (1 << 2)
>> #define DP_SELECT (1 << 21)
>> #define DDIR (1 << 4)
>> #define DMA_EN 0x1
>> @@ -115,6 +116,7 @@
>> #define OMAP_MMC_MAX_CLOCK 52000000
>> #define DRIVER_NAME "omap_hsmmc"
>>
>> +#define AUTO_CMD12 (1 << 0) /* Auto CMD12 support */
>> /*
>> * One controller can have multiple slots, like on some omap boards using
>> * omap.c controller driver. Luckily this is not currently done on any known
>> @@ -175,6 +177,7 @@ struct omap_hsmmc_host {
>> int reqs_blocked;
>> int use_reg;
>> int req_in_progress;
>> + unsigned int flags;
>> struct omap_hsmmc_next next_data;
>>
>> struct omap_mmc_platform_data *pdata;
>> @@ -766,6 +769,8 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd,
>> cmdtype = 0x3;
>>
>> cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
>> + if ((host->flags & AUTO_CMD12) && mmc_op_multi(cmd->opcode))
>> + cmdreg |= ACEN_ACMD12;
>>
>> if (data) {
>> cmdreg |= DP_SELECT | MSBS | BCE;
>> @@ -837,11 +842,15 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data)
>> else
>> data->bytes_xfered = 0;
>>
>> - if (!data->stop) {
>> + if (data->stop && ((!(host->flags & AUTO_CMD12)) || data->error)) {
>> + omap_hsmmc_start_command(host, data->stop, NULL);
>> + }
>> + else {
>
> while adding the braces, you broke the coding style. Please fix.
>
Oops - now fixed (and pushed out).
From 00ae42358249e879698029201e3cbb9ea155305e Mon Sep 17 00:00:00 2001
From: Balaji T K <balajitk@ti.com>
Date: Fri, 24 Feb 2012 21:14:31 +0530
Subject: [PATCH] mmc: omap: Enable Auto CMD12
Enable Auto-CMD12 for multi block read/write on HSMMC
Tested on OMAP4430, OMAP3430 and OMAP2430 SDP
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index f29e1a2..729ac72 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -85,6 +85,7 @@
#define BRR_ENABLE (1 << 5)
#define DTO_ENABLE (1 << 20)
#define INIT_STREAM (1 << 1)
+#define ACEN_ACMD12 (1 << 2)
#define DP_SELECT (1 << 21)
#define DDIR (1 << 4)
#define DMA_EN 0x1
@@ -115,6 +116,7 @@
#define OMAP_MMC_MAX_CLOCK 52000000
#define DRIVER_NAME "omap_hsmmc"
+#define AUTO_CMD12 (1 << 0) /* Auto CMD12 support */
/*
* One controller can have multiple slots, like on some omap boards using
* omap.c controller driver. Luckily this is not currently done on any known
@@ -175,6 +177,7 @@ struct omap_hsmmc_host {
int reqs_blocked;
int use_reg;
int req_in_progress;
+ unsigned int flags;
struct omap_hsmmc_next next_data;
struct omap_mmc_platform_data *pdata;
@@ -766,6 +769,8 @@ omap_hsmmc_start_command(struct omap_hsmmc_host
*host, struct mmc_command *cmd,
cmdtype = 0x3;
cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
+ if ((host->flags & AUTO_CMD12) && mmc_op_multi(cmd->opcode))
+ cmdreg |= ACEN_ACMD12;
if (data) {
cmdreg |= DP_SELECT | MSBS | BCE;
@@ -837,11 +842,14 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host
*host, struct mmc_data *data)
else
data->bytes_xfered = 0;
- if (!data->stop) {
+ if (data->stop && ((!(host->flags & AUTO_CMD12)) || data->error)) {
+ omap_hsmmc_start_command(host, data->stop, NULL);
+ } else {
+ if (data->stop)
+ data->stop->resp[0] = OMAP_HSMMC_READ(host->base,
+ RSP76);
omap_hsmmc_request_done(host, data->mrq);
- return;
}
- omap_hsmmc_start_command(host, data->stop, NULL);
}
/*
@@ -1826,6 +1834,7 @@ static int __init omap_hsmmc_probe(struct
platform_device *pdev)
host->mapbase = res->start;
host->base = ioremap(host->mapbase, SZ_4K);
host->power_mode = MMC_POWER_OFF;
+ host->flags = AUTO_CMD12;
host->next_data.cookie = 1;
platform_set_drvdata(pdev, host);
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 2/8] mmc: omap: add DDR support to omap_hsmmc
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
2012-03-16 13:38 ` [PATCH v2 1/8] mmc: omap: Enable Auto CMD12 Venkatraman S
@ 2012-03-16 13:38 ` Venkatraman S
2012-03-16 13:38 ` [PATCH v2 3/8] mmc: omap: use runtime put sync in probe error patch Venkatraman S
` (6 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:38 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S
From: Balaji T K <balajitk@ti.com>
Add Dual data rate support for omap_hsmmc
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index a9ffd70..d682c5e 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -92,6 +92,7 @@
#define MSBS (1 << 5)
#define BCE (1 << 1)
#define FOUR_BIT (1 << 1)
+#define DDR (1 << 19)
#define DW8 (1 << 5)
#define CC 0x1
#define TC 0x02
@@ -523,6 +524,10 @@ static void omap_hsmmc_set_bus_width(struct omap_hsmmc_host *host)
u32 con;
con = OMAP_HSMMC_READ(host->base, CON);
+ if (ios->timing == MMC_TIMING_UHS_DDR50)
+ con |= DDR; /* configure in DDR mode */
+ else
+ con &= ~DDR;
switch (ios->bus_width) {
case MMC_BUS_WIDTH_8:
OMAP_HSMMC_WRITE(host->base, CON, con | DW8);
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v2 3/8] mmc: omap: use runtime put sync in probe error patch
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
2012-03-16 13:38 ` [PATCH v2 1/8] mmc: omap: Enable Auto CMD12 Venkatraman S
2012-03-16 13:38 ` [PATCH v2 2/8] mmc: omap: add DDR support to omap_hsmmc Venkatraman S
@ 2012-03-16 13:38 ` Venkatraman S
2012-03-16 13:39 ` [PATCH v2 4/8] mmc: omap: context save after enabling runtime pm Venkatraman S
` (5 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:38 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S, stable
From: Balaji T K <balajitk@ti.com>
pm_runtime_put_sync instead of autosuspend pm runtime API
because iounmap(host->base) follows immediately.
Reported-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Cc: stable <stable@vger.kernel.org>
---
drivers/mmc/host/omap_hsmmc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index d682c5e..baa06f9 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2013,8 +2013,7 @@ err_reg:
err_irq_cd_init:
free_irq(host->irq, host);
err_irq:
- pm_runtime_mark_last_busy(host->dev);
- pm_runtime_put_autosuspend(host->dev);
+ pm_runtime_put_sync(host->dev);
pm_runtime_disable(host->dev);
clk_put(host->fclk);
if (host->got_dbclk) {
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v2 4/8] mmc: omap: context save after enabling runtime pm
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
` (2 preceding siblings ...)
2012-03-16 13:38 ` [PATCH v2 3/8] mmc: omap: use runtime put sync in probe error patch Venkatraman S
@ 2012-03-16 13:39 ` Venkatraman S
2012-03-16 13:39 ` [PATCH v2 5/8] mmc: host: omap_hsmmc: trivial cleanups Venkatraman S
` (4 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:39 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S, stable
From: Balaji T K <balajitk@ti.com>
call context save api after enabling runtime pm
to make sure register access in context save api happens with clk enabled.
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Cc: stable <stable@vger.kernel.org>
---
drivers/mmc/host/omap_hsmmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index baa06f9..2822442 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1870,8 +1870,6 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
goto err1;
}
- omap_hsmmc_context_save(host);
-
if (host->pdata->controller_flags & OMAP_HSMMC_BROKEN_MULTIBLOCK_READ) {
dev_info(&pdev->dev, "multiblock reads disabled due to 35xx erratum 2.1.1.128; MMC read performance may suffer\n");
mmc->caps2 |= MMC_CAP2_NO_MULTI_READ;
@@ -1882,6 +1880,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
pm_runtime_set_autosuspend_delay(host->dev, MMC_AUTOSUSPEND_DELAY);
pm_runtime_use_autosuspend(host->dev);
+ omap_hsmmc_context_save(host);
+
if (cpu_is_omap2430()) {
host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
/*
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v2 5/8] mmc: host: omap_hsmmc: trivial cleanups
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
` (3 preceding siblings ...)
2012-03-16 13:39 ` [PATCH v2 4/8] mmc: omap: context save after enabling runtime pm Venkatraman S
@ 2012-03-16 13:39 ` Venkatraman S
2012-03-19 5:57 ` Hebbar, Gururaja
2012-03-16 13:39 ` [PATCH v2 6/8] mmc: host: omap_hsmmc: make it behave well as a module Venkatraman S
` (3 subsequent siblings)
8 siblings, 1 reply; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:39 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S
From: Felipe Balbi <balbi@ti.com>
a bunch of non-functional cleanups to the omap_hsmmc
driver.
It basically decreases indentation level, drop unneded
dereferences and drop unneded accesses to the platform_device
structure.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 147 ++++++++++++++++++++---------------------
1 file changed, 70 insertions(+), 77 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 2822442..c16c552 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2036,30 +2036,28 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
struct resource *res;
- if (host) {
- pm_runtime_get_sync(host->dev);
- mmc_remove_host(host->mmc);
- if (host->use_reg)
- omap_hsmmc_reg_put(host);
- if (host->pdata->cleanup)
- host->pdata->cleanup(&pdev->dev);
- free_irq(host->irq, host);
- if (mmc_slot(host).card_detect_irq)
- free_irq(mmc_slot(host).card_detect_irq, host);
-
- pm_runtime_put_sync(host->dev);
- pm_runtime_disable(host->dev);
- clk_put(host->fclk);
- if (host->got_dbclk) {
- clk_disable(host->dbclk);
- clk_put(host->dbclk);
- }
+ pm_runtime_get_sync(host->dev);
+ mmc_remove_host(host->mmc);
+ if (host->use_reg)
+ omap_hsmmc_reg_put(host);
+ if (host->pdata->cleanup)
+ host->pdata->cleanup(&pdev->dev);
+ free_irq(host->irq, host);
+ if (mmc_slot(host).card_detect_irq)
+ free_irq(mmc_slot(host).card_detect_irq, host);
- mmc_free_host(host->mmc);
- iounmap(host->base);
- omap_hsmmc_gpio_free(pdev->dev.platform_data);
+ pm_runtime_put_sync(host->dev);
+ pm_runtime_disable(host->dev);
+ clk_put(host->fclk);
+ if (host->got_dbclk) {
+ clk_disable(host->dbclk);
+ clk_put(host->dbclk);
}
+ mmc_free_host(host->mmc);
+ iounmap(host->base);
+ omap_hsmmc_gpio_free(pdev->dev.platform_data);
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, resource_size(res));
@@ -2072,49 +2070,45 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
static int omap_hsmmc_suspend(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
- struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
+ struct omap_hsmmc_host *host = dev_get_drvdata(dev);
- if (host && host->suspended)
+ if (!host)
return 0;
- if (host) {
- pm_runtime_get_sync(host->dev);
- host->suspended = 1;
- if (host->pdata->suspend) {
- ret = host->pdata->suspend(&pdev->dev,
- host->slot_id);
- if (ret) {
- dev_dbg(mmc_dev(host->mmc),
- "Unable to handle MMC board"
- " level suspend\n");
- host->suspended = 0;
- return ret;
- }
- }
- ret = mmc_suspend_host(host->mmc);
+ if (host && host->suspended)
+ return 0;
+ pm_runtime_get_sync(host->dev);
+ host->suspended = 1;
+ if (host->pdata->suspend) {
+ ret = host->pdata->suspend(dev, host->slot_id);
if (ret) {
+ dev_dbg(dev, "Unable to handle MMC board"
+ " level suspend\n");
host->suspended = 0;
- if (host->pdata->resume) {
- ret = host->pdata->resume(&pdev->dev,
- host->slot_id);
- if (ret)
- dev_dbg(mmc_dev(host->mmc),
- "Unmask interrupt failed\n");
- }
- goto err;
+ return ret;
}
+ }
+ ret = mmc_suspend_host(host->mmc);
- if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) {
- omap_hsmmc_disable_irq(host);
- OMAP_HSMMC_WRITE(host->base, HCTL,
- OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
+ if (ret) {
+ host->suspended = 0;
+ if (host->pdata->resume) {
+ ret = host->pdata->resume(dev, host->slot_id);
+ if (ret)
+ dev_dbg(dev, "Unmask interrupt failed\n");
}
- if (host->got_dbclk)
- clk_disable(host->dbclk);
+ goto err;
+ }
+ if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) {
+ omap_hsmmc_disable_irq(host);
+ OMAP_HSMMC_WRITE(host->base, HCTL,
+ OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
}
+
+ if (host->got_dbclk)
+ clk_disable(host->dbclk);
err:
pm_runtime_put_sync(host->dev);
return ret;
@@ -2124,38 +2118,37 @@ err:
static int omap_hsmmc_resume(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
- struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
+ struct omap_hsmmc_host *host = dev_get_drvdata(dev);
+
+ if (!host)
+ return 0;
if (host && !host->suspended)
return 0;
- if (host) {
- pm_runtime_get_sync(host->dev);
+ pm_runtime_get_sync(host->dev);
- if (host->got_dbclk)
- clk_enable(host->dbclk);
+ if (host->got_dbclk)
+ clk_enable(host->dbclk);
- if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
- omap_hsmmc_conf_bus_power(host);
+ if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
+ omap_hsmmc_conf_bus_power(host);
- if (host->pdata->resume) {
- ret = host->pdata->resume(&pdev->dev, host->slot_id);
- if (ret)
- dev_dbg(mmc_dev(host->mmc),
- "Unmask interrupt failed\n");
- }
+ if (host->pdata->resume) {
+ ret = host->pdata->resume(dev, host->slot_id);
+ if (ret)
+ dev_dbg(dev, "Unmask interrupt failed\n");
+ }
- omap_hsmmc_protect_card(host);
+ omap_hsmmc_protect_card(host);
- /* Notify the core to resume the host */
- ret = mmc_resume_host(host->mmc);
- if (ret == 0)
- host->suspended = 0;
+ /* Notify the core to resume the host */
+ ret = mmc_resume_host(host->mmc);
+ if (ret == 0)
+ host->suspended = 0;
- pm_runtime_mark_last_busy(host->dev);
- pm_runtime_put_autosuspend(host->dev);
- }
+ pm_runtime_mark_last_busy(host->dev);
+ pm_runtime_put_autosuspend(host->dev);
return ret;
@@ -2172,7 +2165,7 @@ static int omap_hsmmc_runtime_suspend(struct device *dev)
host = platform_get_drvdata(to_platform_device(dev));
omap_hsmmc_context_save(host);
- dev_dbg(mmc_dev(host->mmc), "disabled\n");
+ dev_dbg(dev, "disabled\n");
return 0;
}
@@ -2183,7 +2176,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
host = platform_get_drvdata(to_platform_device(dev));
omap_hsmmc_context_restore(host);
- dev_dbg(mmc_dev(host->mmc), "enabled\n");
+ dev_dbg(dev, "enabled\n");
return 0;
}
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* RE: [PATCH v2 5/8] mmc: host: omap_hsmmc: trivial cleanups
2012-03-16 13:39 ` [PATCH v2 5/8] mmc: host: omap_hsmmc: trivial cleanups Venkatraman S
@ 2012-03-19 5:57 ` Hebbar, Gururaja
2012-03-19 10:25 ` S, Venkatraman
0 siblings, 1 reply; 17+ messages in thread
From: Hebbar, Gururaja @ 2012-03-19 5:57 UTC (permalink / raw)
To: S, Venkatraman, linux-mmc@vger.kernel.org,
linux-omap@vger.kernel.org
Cc: cjb@laptop.org, Krishnamoorthy, Balaji T, Balbi, Felipe
On Fri, Mar 16, 2012 at 19:09:01, S, Venkatraman wrote:
> From: Felipe Balbi <balbi@ti.com>
>
> a bunch of non-functional cleanups to the omap_hsmmc
> driver.
>
> It basically decreases indentation level, drop unneeded
s/unneeded/unneeded. Better to use unnecessary
> dereferences and drop unneded accesses to the platform_device
Same as above
> structure.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Venkatraman S <svenkatr@ti.com>
> ---
..snip..
..snip..
> }
> --
> 1.7.10.rc0.41.gfa678
>
> --
> 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
>
Regards,
Gururaja
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 5/8] mmc: host: omap_hsmmc: trivial cleanups
2012-03-19 5:57 ` Hebbar, Gururaja
@ 2012-03-19 10:25 ` S, Venkatraman
0 siblings, 0 replies; 17+ messages in thread
From: S, Venkatraman @ 2012-03-19 10:25 UTC (permalink / raw)
To: Hebbar, Gururaja
Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
cjb@laptop.org, Krishnamoorthy, Balaji T, Balbi, Felipe
On Mon, Mar 19, 2012 at 11:27 AM, Hebbar, Gururaja
<gururaja.hebbar@ti.com> wrote:
> On Fri, Mar 16, 2012 at 19:09:01, S, Venkatraman wrote:
>> From: Felipe Balbi <balbi@ti.com>
>>
>> a bunch of non-functional cleanups to the omap_hsmmc
>> driver.
>>
>> It basically decreases indentation level, drop unneeded
>
> s/unneeded/unneeded. Better to use unnecessary
>
>> dereferences and drop unneded accesses to the platform_device
>
> Same as above
>
Thanks. Now updated as below (and pushed out to the same branch)..
>From 7174f9a831a8fcd224bf6dc1c2895e40fa252e84 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <balbi@ti.com>
Date: Wed, 14 Mar 2012 11:18:27 +0200
Subject: [PATCH] mmc: host: omap_hsmmc: trivial cleanups
a bunch of non-functional cleanups to the omap_hsmmc
driver.
It basically decreases indentation level, drop unneeded
dereferences and drop unnecessary accesses to the platform_device
structure.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 147 ++++++++++++++++++++---------------------
1 file changed, 70 insertions(+), 77 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 925d2be..cafd879 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2055,30 +2055,28 @@ static int omap_hsmmc_remove(struct
platform_device *pdev)
struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
struct resource *res;
- if (host) {
- pm_runtime_get_sync(host->dev);
- mmc_remove_host(host->mmc);
- if (host->use_reg)
- omap_hsmmc_reg_put(host);
- if (host->pdata->cleanup)
- host->pdata->cleanup(&pdev->dev);
- free_irq(host->irq, host);
- if (mmc_slot(host).card_detect_irq)
- free_irq(mmc_slot(host).card_detect_irq, host);
-
- pm_runtime_put_sync(host->dev);
- pm_runtime_disable(host->dev);
- clk_put(host->fclk);
- if (host->got_dbclk) {
- clk_disable(host->dbclk);
- clk_put(host->dbclk);
- }
+ pm_runtime_get_sync(host->dev);
+ mmc_remove_host(host->mmc);
+ if (host->use_reg)
+ omap_hsmmc_reg_put(host);
+ if (host->pdata->cleanup)
+ host->pdata->cleanup(&pdev->dev);
+ free_irq(host->irq, host);
+ if (mmc_slot(host).card_detect_irq)
+ free_irq(mmc_slot(host).card_detect_irq, host);
- mmc_free_host(host->mmc);
- iounmap(host->base);
- omap_hsmmc_gpio_free(pdev->dev.platform_data);
+ pm_runtime_put_sync(host->dev);
+ pm_runtime_disable(host->dev);
+ clk_put(host->fclk);
+ if (host->got_dbclk) {
+ clk_disable(host->dbclk);
+ clk_put(host->dbclk);
}
+ mmc_free_host(host->mmc);
+ iounmap(host->base);
+ omap_hsmmc_gpio_free(pdev->dev.platform_data);
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, resource_size(res));
@@ -2091,49 +2089,45 @@ static int omap_hsmmc_remove(struct
platform_device *pdev)
static int omap_hsmmc_suspend(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
- struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
+ struct omap_hsmmc_host *host = dev_get_drvdata(dev);
- if (host && host->suspended)
+ if (!host)
return 0;
- if (host) {
- pm_runtime_get_sync(host->dev);
- host->suspended = 1;
- if (host->pdata->suspend) {
- ret = host->pdata->suspend(&pdev->dev,
- host->slot_id);
- if (ret) {
- dev_dbg(mmc_dev(host->mmc),
- "Unable to handle MMC board"
- " level suspend\n");
- host->suspended = 0;
- return ret;
- }
- }
- ret = mmc_suspend_host(host->mmc);
+ if (host && host->suspended)
+ return 0;
+ pm_runtime_get_sync(host->dev);
+ host->suspended = 1;
+ if (host->pdata->suspend) {
+ ret = host->pdata->suspend(dev, host->slot_id);
if (ret) {
+ dev_dbg(dev, "Unable to handle MMC board"
+ " level suspend\n");
host->suspended = 0;
- if (host->pdata->resume) {
- ret = host->pdata->resume(&pdev->dev,
- host->slot_id);
- if (ret)
- dev_dbg(mmc_dev(host->mmc),
- "Unmask interrupt failed\n");
- }
- goto err;
+ return ret;
}
+ }
+ ret = mmc_suspend_host(host->mmc);
- if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) {
- omap_hsmmc_disable_irq(host);
- OMAP_HSMMC_WRITE(host->base, HCTL,
- OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
+ if (ret) {
+ host->suspended = 0;
+ if (host->pdata->resume) {
+ ret = host->pdata->resume(dev, host->slot_id);
+ if (ret)
+ dev_dbg(dev, "Unmask interrupt failed\n");
}
- if (host->got_dbclk)
- clk_disable(host->dbclk);
+ goto err;
+ }
+ if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) {
+ omap_hsmmc_disable_irq(host);
+ OMAP_HSMMC_WRITE(host->base, HCTL,
+ OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
}
+
+ if (host->got_dbclk)
+ clk_disable(host->dbclk);
err:
pm_runtime_put_sync(host->dev);
return ret;
@@ -2143,38 +2137,37 @@ err:
static int omap_hsmmc_resume(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
- struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
+ struct omap_hsmmc_host *host = dev_get_drvdata(dev);
+
+ if (!host)
+ return 0;
if (host && !host->suspended)
return 0;
- if (host) {
- pm_runtime_get_sync(host->dev);
+ pm_runtime_get_sync(host->dev);
- if (host->got_dbclk)
- clk_enable(host->dbclk);
+ if (host->got_dbclk)
+ clk_enable(host->dbclk);
- if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
- omap_hsmmc_conf_bus_power(host);
+ if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
+ omap_hsmmc_conf_bus_power(host);
- if (host->pdata->resume) {
- ret = host->pdata->resume(&pdev->dev, host->slot_id);
- if (ret)
- dev_dbg(mmc_dev(host->mmc),
- "Unmask interrupt failed\n");
- }
+ if (host->pdata->resume) {
+ ret = host->pdata->resume(dev, host->slot_id);
+ if (ret)
+ dev_dbg(dev, "Unmask interrupt failed\n");
+ }
- omap_hsmmc_protect_card(host);
+ omap_hsmmc_protect_card(host);
- /* Notify the core to resume the host */
- ret = mmc_resume_host(host->mmc);
- if (ret == 0)
- host->suspended = 0;
+ /* Notify the core to resume the host */
+ ret = mmc_resume_host(host->mmc);
+ if (ret == 0)
+ host->suspended = 0;
- pm_runtime_mark_last_busy(host->dev);
- pm_runtime_put_autosuspend(host->dev);
- }
+ pm_runtime_mark_last_busy(host->dev);
+ pm_runtime_put_autosuspend(host->dev);
return ret;
@@ -2191,7 +2184,7 @@ static int omap_hsmmc_runtime_suspend(struct device *dev)
host = platform_get_drvdata(to_platform_device(dev));
omap_hsmmc_context_save(host);
- dev_dbg(mmc_dev(host->mmc), "disabled\n");
+ dev_dbg(dev, "disabled\n");
return 0;
}
@@ -2202,7 +2195,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
host = platform_get_drvdata(to_platform_device(dev));
omap_hsmmc_context_restore(host);
- dev_dbg(mmc_dev(host->mmc), "enabled\n");
+ dev_dbg(dev, "enabled\n");
return 0;
}
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 6/8] mmc: host: omap_hsmmc: make it behave well as a module
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
` (4 preceding siblings ...)
2012-03-16 13:39 ` [PATCH v2 5/8] mmc: host: omap_hsmmc: trivial cleanups Venkatraman S
@ 2012-03-16 13:39 ` Venkatraman S
2012-03-16 13:39 ` [PATCH v2 7/8] mmc: host: omap_hsmmc: convert to module_platform_driver Venkatraman S
` (2 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:39 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S
From: Felipe Balbi <balbi@ti.com>
if we put probe() on __init section, that will never
work for multiple module insertions/removals.
In order to make it work properly, move probe to
__devinit section and use platform_driver_register()
instead of platform_driver_probe().
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index c16c552..bcb8c5d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1779,7 +1779,7 @@ static inline struct omap_mmc_platform_data
}
#endif
-static int __init omap_hsmmc_probe(struct platform_device *pdev)
+static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
{
struct omap_mmc_platform_data *pdata = pdev->dev.platform_data;
struct mmc_host *mmc;
@@ -2031,7 +2031,7 @@ err:
return ret;
}
-static int omap_hsmmc_remove(struct platform_device *pdev)
+static int __devexit omap_hsmmc_remove(struct platform_device *pdev)
{
struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
struct resource *res;
@@ -2189,7 +2189,8 @@ static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
};
static struct platform_driver omap_hsmmc_driver = {
- .remove = omap_hsmmc_remove,
+ .probe = omap_hsmmc_probe,
+ .remove = __devexit_p(omap_hsmmc_remove),
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
@@ -2201,7 +2202,7 @@ static struct platform_driver omap_hsmmc_driver = {
static int __init omap_hsmmc_init(void)
{
/* Register the MMC driver */
- return platform_driver_probe(&omap_hsmmc_driver, omap_hsmmc_probe);
+ return platform_driver_register(&omap_hsmmc_driver);
}
static void __exit omap_hsmmc_cleanup(void)
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v2 7/8] mmc: host: omap_hsmmc: convert to module_platform_driver
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
` (5 preceding siblings ...)
2012-03-16 13:39 ` [PATCH v2 6/8] mmc: host: omap_hsmmc: make it behave well as a module Venkatraman S
@ 2012-03-16 13:39 ` Venkatraman S
2012-03-16 13:39 ` [PATCH v2 8/8] mmc: omap4: hsmmc: fix module re-insertion Venkatraman S
2012-04-01 4:40 ` [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Chris Ball
8 siblings, 0 replies; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:39 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S
From: Felipe Balbi <balbi@ti.com>
this will delete some boilerplate code, no functional
changes.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index bcb8c5d..6411f9a 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2199,21 +2199,7 @@ static struct platform_driver omap_hsmmc_driver = {
},
};
-static int __init omap_hsmmc_init(void)
-{
- /* Register the MMC driver */
- return platform_driver_register(&omap_hsmmc_driver);
-}
-
-static void __exit omap_hsmmc_cleanup(void)
-{
- /* Unregister MMC driver */
- platform_driver_unregister(&omap_hsmmc_driver);
-}
-
-module_init(omap_hsmmc_init);
-module_exit(omap_hsmmc_cleanup);
-
+module_platform_driver(omap_hsmmc_driver);
MODULE_DESCRIPTION("OMAP High Speed Multimedia Card driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRIVER_NAME);
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v2 8/8] mmc: omap4: hsmmc: fix module re-insertion
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
` (6 preceding siblings ...)
2012-03-16 13:39 ` [PATCH v2 7/8] mmc: host: omap_hsmmc: convert to module_platform_driver Venkatraman S
@ 2012-03-16 13:39 ` Venkatraman S
2012-04-01 4:40 ` [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Chris Ball
8 siblings, 0 replies; 17+ messages in thread
From: Venkatraman S @ 2012-03-16 13:39 UTC (permalink / raw)
To: linux-mmc, linux-omap; +Cc: cjb, balajitk, balbi, Venkatraman S
From: Balaji T K <balajitk@ti.com>
OMAP4 and OMAP3 HSMMC IP registers differ by 0x100 offset.
Addng the offset to platform_device resource structure
increments the start address for every insmod operation.
MMC command fails on re-insertion as module due to incorrect register base.
Fix this by updating the ioremap base address only.
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 6411f9a..6bef2a8 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1812,8 +1812,6 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
if (res == NULL || irq < 0)
return -ENXIO;
- res->start += pdata->reg_offset;
- res->end += pdata->reg_offset;
res = request_mem_region(res->start, resource_size(res), pdev->name);
if (res == NULL)
return -EBUSY;
@@ -1837,7 +1835,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
host->dma_ch = -1;
host->irq = irq;
host->slot_id = 0;
- host->mapbase = res->start;
+ host->mapbase = res->start + pdata->reg_offset;
host->base = ioremap(host->mapbase, SZ_4K);
host->power_mode = MMC_POWER_OFF;
host->flags = AUTO_CMD12;
--
1.7.10.rc0.41.gfa678
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window
2012-03-16 13:38 [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Venkatraman S
` (7 preceding siblings ...)
2012-03-16 13:39 ` [PATCH v2 8/8] mmc: omap4: hsmmc: fix module re-insertion Venkatraman S
@ 2012-04-01 4:40 ` Chris Ball
2012-04-02 7:52 ` S, Venkatraman
8 siblings, 1 reply; 17+ messages in thread
From: Chris Ball @ 2012-04-01 4:40 UTC (permalink / raw)
To: Venkatraman S; +Cc: linux-mmc, linux-omap, balajitk, balbi
Hi,
On Fri, Mar 16 2012, Venkatraman S wrote:
> Chris,
> Here are a group of fixes posted by Felipe and Balaji for the
> OMAP hsmmc driver in the past few days.
> I've rebased them to the lastest mmc-next and posted them
> here again. These have also been tested on OMAP4 development platform.
>
> Please feel to apply directly or pull if that's convenient.
>
> Changes since yesterday (v1):-
> Fixed formatting issues as suggested by Felipe
> Marked some patches for stable.
>
> The following changes since commit 5f0390f10c0e9c9c504cdbf4af802252628a2490:
>
> mmc: omap_hsmmc: Avoid a regulator voltage change with dt (2012-03-14 11:33:20 -0400)
>
> are available in the git repository at:
>
> git://github.com/svenkatr/linux.git omap-mmc-pending-for-3.4
>
> for you to fetch changes up to 8d54766b608915035b47616ea564e4e9b4dda29c:
>
> mmc: omap4: hsmmc: fix module re-insertion (2012-03-16 11:38:41 +0530)
I've just rebased mmc-next on top of 3.4-rc1, and now there are many
conflicts against your tree -- please could you resend patches 3-8
against that base? I'll take them for 3.4, and will take patches 1-2
for 3.5.
Thanks!
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window
2012-04-01 4:40 ` [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window Chris Ball
@ 2012-04-02 7:52 ` S, Venkatraman
2012-04-02 9:50 ` Chris Ball
0 siblings, 1 reply; 17+ messages in thread
From: S, Venkatraman @ 2012-04-02 7:52 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-mmc, linux-omap, balajitk, balbi
On Sun, Apr 1, 2012 at 10:10 AM, Chris Ball <cjb@laptop.org> wrote:
> Hi,
>
> On Fri, Mar 16 2012, Venkatraman S wrote:
>> Chris,
>> Here are a group of fixes posted by Felipe and Balaji for the
>> OMAP hsmmc driver in the past few days.
>> I've rebased them to the lastest mmc-next and posted them
>> here again. These have also been tested on OMAP4 development platform.
>>
>> Please feel to apply directly or pull if that's convenient.
>>
>> Changes since yesterday (v1):-
>> Fixed formatting issues as suggested by Felipe
>> Marked some patches for stable.
>>
>> The following changes since commit 5f0390f10c0e9c9c504cdbf4af802252628a2490:
>>
>> mmc: omap_hsmmc: Avoid a regulator voltage change with dt (2012-03-14 11:33:20 -0400)
>>
>> are available in the git repository at:
>>
>> git://github.com/svenkatr/linux.git omap-mmc-pending-for-3.4
>>
>> for you to fetch changes up to 8d54766b608915035b47616ea564e4e9b4dda29c:
>>
>> mmc: omap4: hsmmc: fix module re-insertion (2012-03-16 11:38:41 +0530)
>
> I've just rebased mmc-next on top of 3.4-rc1, and now there are many
> conflicts against your tree -- please could you resend patches 3-8
> against that base? I'll take them for 3.4, and will take patches 1-2
> for 3.5.
>
I've rebased patches 3-8 into a new branch (See below).
I'll send you 1-2 on top of 3.4-rc2 once it's out. Is it Ok ?
==============
The following changes since commit a4dfa827bb5b9a984d4000ffb80134b9495e4d8a:
mmc: sdio: Use empty system suspend/resume callbacks at the bus
level (2012-04-01 00:35:06 -0400)
are available in the git repository at:
git://github.com/svenkatr/linux.git omap-mmc-fixes-3.4
for you to fetch changes up to 80f833a2f77b8d6464209c0bb00a39ad835356a0:
mmc: omap4: hsmmc: fix module re-insertion (2012-04-02 12:26:47 +0530)
----------------------------------------------------------------
Balaji T K (3):
mmc: omap: use runtime put sync in probe error patch
mmc: omap: context save after enabling runtime pm
mmc: omap4: hsmmc: fix module re-insertion
Felipe Balbi (3):
mmc: host: omap_hsmmc: trivial cleanups
mmc: host: omap_hsmmc: make it behave well as a module
mmc: host: omap_hsmmc: convert to module_platform_driver
drivers/mmc/host/omap_hsmmc.c | 181
+++++++++++++++++++++--------------------------
1 file changed, 79 insertions(+), 102 deletions(-)
Regards,
Venkat.
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 0/8][git pull] mmc: omap: Assorted fixes for 3.4 merge window
2012-04-02 7:52 ` S, Venkatraman
@ 2012-04-02 9:50 ` Chris Ball
0 siblings, 0 replies; 17+ messages in thread
From: Chris Ball @ 2012-04-02 9:50 UTC (permalink / raw)
To: S, Venkatraman; +Cc: linux-mmc, linux-omap, balajitk, balbi
Hi,
On Mon, Apr 02 2012, S, Venkatraman wrote:
> I've rebased patches 3-8 into a new branch (See below).
> I'll send you 1-2 on top of 3.4-rc2 once it's out. Is it Ok ?
Yes, thanks.
> > ==============
> The following changes since commit a4dfa827bb5b9a984d4000ffb80134b9495e4d8a:
>
> mmc: sdio: Use empty system suspend/resume callbacks at the bus
> level (2012-04-01 00:35:06 -0400)
>
> are available in the git repository at:
>
> git://github.com/svenkatr/linux.git omap-mmc-fixes-3.4
>
> for you to fetch changes up to 80f833a2f77b8d6464209c0bb00a39ad835356a0:
>
> mmc: omap4: hsmmc: fix module re-insertion (2012-04-02 12:26:47 +0530)
>
> ----------------------------------------------------------------
> Balaji T K (3):
> mmc: omap: use runtime put sync in probe error patch
> mmc: omap: context save after enabling runtime pm
> mmc: omap4: hsmmc: fix module re-insertion
>
> Felipe Balbi (3):
> mmc: host: omap_hsmmc: trivial cleanups
> mmc: host: omap_hsmmc: make it behave well as a module
> mmc: host: omap_hsmmc: convert to module_platform_driver
Pushed to mmc-next for 3.4, and I normalized the commit message first
lines to:
mmc: omap_hsmmc: description
Thanks very much,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 17+ messages in thread