* [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
@ 2014-02-14 5:45 ` Nishanth Menon
0 siblings, 0 replies; 20+ messages in thread
From: Nishanth Menon @ 2014-02-14 5:45 UTC (permalink / raw)
To: Tony Lindgren, Balaji T K, Chris Ball
Cc: linux-mmc, linux-omap, linux-kernel, linux-doc, linux-arm-kernel,
devicetree, Felipe Balbi, Nishanth Menon
When device is booted using devicetree, platforms impacted by Erratum
2.1.1.128 is not detected easily in the mmc driver. This erratum
indicates that the module cannot do multi-block transfers. Platforms
such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
this.
Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
driver to determine if driver needs to implement quirks associated
with the specific module version (primarily because the IP revision
information is not sufficient for the same).
Signed-off-by: Nishanth Menon <nm@ti.com>
---
Changes since v1:
- new compatible flag as suggested by Tony which contains
the relevant controller flag to work around the erratum
V1: https://patchwork.kernel.org/patch/3514851/
.../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 1 +
drivers/mmc/host/omap_hsmmc.c | 26 +++++++++++++++++---
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index 8c8908a..ce80561 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -10,6 +10,7 @@ Required properties:
- compatible:
Should be "ti,omap2-hsmmc", for OMAP2 controllers
Should be "ti,omap3-hsmmc", for OMAP3 controllers
+ Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0
Should be "ti,omap4-hsmmc", for OMAP4 controllers
- ti,hwmods: Must be "mmc<n>", n is controller instance starting 1
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 575f9cc..390f421 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -192,6 +192,11 @@ struct omap_hsmmc_host {
struct omap_mmc_platform_data *pdata;
};
+struct omap_mmc_of_data {
+ u32 reg_offset;
+ u8 controller_flags;
+};
+
static int omap_hsmmc_card_detect(struct device *dev, int slot)
{
struct omap_hsmmc_host *host = dev_get_drvdata(dev);
@@ -1678,18 +1683,29 @@ static void omap_hsmmc_debugfs(struct mmc_host *mmc)
#endif
#ifdef CONFIG_OF
-static u16 omap4_reg_offset = 0x100;
+static const struct omap_mmc_of_data omap3_pre_es3_mmc_of_data = {
+ /* See 35xx errata 2.1.1.128 in SPRZ278F */
+ .controller_flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
+};
+
+static const struct omap_mmc_of_data omap4_mmc_of_data = {
+ .reg_offset = 0x100,
+};
static const struct of_device_id omap_mmc_of_match[] = {
{
.compatible = "ti,omap2-hsmmc",
},
{
+ .compatible = "ti,omap3-pre-es3-hsmmc",
+ .data = &omap3_pre_es3_mmc_of_data,
+ },
+ {
.compatible = "ti,omap3-hsmmc",
},
{
.compatible = "ti,omap4-hsmmc",
- .data = &omap4_reg_offset,
+ .data = &omap4_mmc_of_data,
},
{},
};
@@ -1759,6 +1775,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
dma_cap_mask_t mask;
unsigned tx_req, rx_req;
struct pinctrl *pinctrl;
+ const struct omap_mmc_of_data *data;
match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
if (match) {
@@ -1768,8 +1785,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
return PTR_ERR(pdata);
if (match->data) {
- const u16 *offsetp = match->data;
- pdata->reg_offset = *offsetp;
+ data = match->data;
+ pdata->reg_offset = data->reg_offset;
+ pdata->controller_flags |= data->controller_flags;
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
@ 2014-02-14 5:45 ` Nishanth Menon
0 siblings, 0 replies; 20+ messages in thread
From: Nishanth Menon @ 2014-02-14 5:45 UTC (permalink / raw)
To: linux-arm-kernel
When device is booted using devicetree, platforms impacted by Erratum
2.1.1.128 is not detected easily in the mmc driver. This erratum
indicates that the module cannot do multi-block transfers. Platforms
such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
this.
Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
driver to determine if driver needs to implement quirks associated
with the specific module version (primarily because the IP revision
information is not sufficient for the same).
Signed-off-by: Nishanth Menon <nm@ti.com>
---
Changes since v1:
- new compatible flag as suggested by Tony which contains
the relevant controller flag to work around the erratum
V1: https://patchwork.kernel.org/patch/3514851/
.../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 1 +
drivers/mmc/host/omap_hsmmc.c | 26 +++++++++++++++++---
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index 8c8908a..ce80561 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -10,6 +10,7 @@ Required properties:
- compatible:
Should be "ti,omap2-hsmmc", for OMAP2 controllers
Should be "ti,omap3-hsmmc", for OMAP3 controllers
+ Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0
Should be "ti,omap4-hsmmc", for OMAP4 controllers
- ti,hwmods: Must be "mmc<n>", n is controller instance starting 1
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 575f9cc..390f421 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -192,6 +192,11 @@ struct omap_hsmmc_host {
struct omap_mmc_platform_data *pdata;
};
+struct omap_mmc_of_data {
+ u32 reg_offset;
+ u8 controller_flags;
+};
+
static int omap_hsmmc_card_detect(struct device *dev, int slot)
{
struct omap_hsmmc_host *host = dev_get_drvdata(dev);
@@ -1678,18 +1683,29 @@ static void omap_hsmmc_debugfs(struct mmc_host *mmc)
#endif
#ifdef CONFIG_OF
-static u16 omap4_reg_offset = 0x100;
+static const struct omap_mmc_of_data omap3_pre_es3_mmc_of_data = {
+ /* See 35xx errata 2.1.1.128 in SPRZ278F */
+ .controller_flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
+};
+
+static const struct omap_mmc_of_data omap4_mmc_of_data = {
+ .reg_offset = 0x100,
+};
static const struct of_device_id omap_mmc_of_match[] = {
{
.compatible = "ti,omap2-hsmmc",
},
{
+ .compatible = "ti,omap3-pre-es3-hsmmc",
+ .data = &omap3_pre_es3_mmc_of_data,
+ },
+ {
.compatible = "ti,omap3-hsmmc",
},
{
.compatible = "ti,omap4-hsmmc",
- .data = &omap4_reg_offset,
+ .data = &omap4_mmc_of_data,
},
{},
};
@@ -1759,6 +1775,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
dma_cap_mask_t mask;
unsigned tx_req, rx_req;
struct pinctrl *pinctrl;
+ const struct omap_mmc_of_data *data;
match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
if (match) {
@@ -1768,8 +1785,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
return PTR_ERR(pdata);
if (match->data) {
- const u16 *offsetp = match->data;
- pdata->reg_offset = *offsetp;
+ data = match->data;
+ pdata->reg_offset = data->reg_offset;
+ pdata->controller_flags |= data->controller_flags;
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
2014-02-14 5:45 ` Nishanth Menon
@ 2014-02-14 16:31 ` Tony Lindgren
-1 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-02-14 16:31 UTC (permalink / raw)
To: Nishanth Menon
Cc: Balaji T K, Chris Ball, linux-mmc, linux-omap, linux-kernel,
linux-doc, linux-arm-kernel, devicetree, Felipe Balbi
* Nishanth Menon <nm@ti.com> [140213 21:48]:
> When device is booted using devicetree, platforms impacted by Erratum
> 2.1.1.128 is not detected easily in the mmc driver. This erratum
> indicates that the module cannot do multi-block transfers. Platforms
> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
> this.
>
> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
> driver to determine if driver needs to implement quirks associated
> with the specific module version (primarily because the IP revision
> information is not sufficient for the same).
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
Looks good to me, would be good to get this into the -rc cycle
as LDP is one of the automated boot testing boards for us.
If you guys want me to pick up both of the patches let me know,
otherwise feel free to add my ack.
Regards,
Tony
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
@ 2014-02-14 16:31 ` Tony Lindgren
0 siblings, 0 replies; 20+ messages in thread
From: Tony Lindgren @ 2014-02-14 16:31 UTC (permalink / raw)
To: linux-arm-kernel
* Nishanth Menon <nm@ti.com> [140213 21:48]:
> When device is booted using devicetree, platforms impacted by Erratum
> 2.1.1.128 is not detected easily in the mmc driver. This erratum
> indicates that the module cannot do multi-block transfers. Platforms
> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
> this.
>
> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
> driver to determine if driver needs to implement quirks associated
> with the specific module version (primarily because the IP revision
> information is not sufficient for the same).
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
Looks good to me, would be good to get this into the -rc cycle
as LDP is one of the automated boot testing boards for us.
If you guys want me to pick up both of the patches let me know,
otherwise feel free to add my ack.
Regards,
Tony
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
2014-02-14 16:31 ` Tony Lindgren
(?)
@ 2014-02-28 15:09 ` Nishanth Menon
-1 siblings, 0 replies; 20+ messages in thread
From: Nishanth Menon @ 2014-02-28 15:09 UTC (permalink / raw)
To: Tony Lindgren, Chris Ball
Cc: devicetree, Balaji T K, linux-doc, linux-mmc, linux-kernel,
Felipe Balbi, linux-omap, linux-arm-kernel
On 02/14/2014 10:31 AM, Tony Lindgren wrote:
> * Nishanth Menon <nm@ti.com> [140213 21:48]:
>> When device is booted using devicetree, platforms impacted by Erratum
>> 2.1.1.128 is not detected easily in the mmc driver. This erratum
>> indicates that the module cannot do multi-block transfers. Platforms
>> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
>> this.
>>
>> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
>> driver to determine if driver needs to implement quirks associated
>> with the specific module version (primarily because the IP revision
>> information is not sufficient for the same).
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>
> Looks good to me, would be good to get this into the -rc cycle
> as LDP is one of the automated boot testing boards for us.
>
> If you guys want me to pick up both of the patches let me know,
> otherwise feel free to add my ack.
>
Chris,
would you be picking up the series that fixes LDP dt boot behavior or
should Tony pick it up?
https://patchwork.kernel.org/patch/3650061/
https://patchwork.kernel.org/patch/3650031/
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
@ 2014-02-28 15:09 ` Nishanth Menon
0 siblings, 0 replies; 20+ messages in thread
From: Nishanth Menon @ 2014-02-28 15:09 UTC (permalink / raw)
To: Tony Lindgren, Chris Ball
Cc: Balaji T K, linux-mmc, linux-omap, linux-kernel, linux-doc,
linux-arm-kernel, devicetree, Felipe Balbi
On 02/14/2014 10:31 AM, Tony Lindgren wrote:
> * Nishanth Menon <nm@ti.com> [140213 21:48]:
>> When device is booted using devicetree, platforms impacted by Erratum
>> 2.1.1.128 is not detected easily in the mmc driver. This erratum
>> indicates that the module cannot do multi-block transfers. Platforms
>> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
>> this.
>>
>> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
>> driver to determine if driver needs to implement quirks associated
>> with the specific module version (primarily because the IP revision
>> information is not sufficient for the same).
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>
> Looks good to me, would be good to get this into the -rc cycle
> as LDP is one of the automated boot testing boards for us.
>
> If you guys want me to pick up both of the patches let me know,
> otherwise feel free to add my ack.
>
Chris,
would you be picking up the series that fixes LDP dt boot behavior or
should Tony pick it up?
https://patchwork.kernel.org/patch/3650061/
https://patchwork.kernel.org/patch/3650031/
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
@ 2014-02-28 15:09 ` Nishanth Menon
0 siblings, 0 replies; 20+ messages in thread
From: Nishanth Menon @ 2014-02-28 15:09 UTC (permalink / raw)
To: linux-arm-kernel
On 02/14/2014 10:31 AM, Tony Lindgren wrote:
> * Nishanth Menon <nm@ti.com> [140213 21:48]:
>> When device is booted using devicetree, platforms impacted by Erratum
>> 2.1.1.128 is not detected easily in the mmc driver. This erratum
>> indicates that the module cannot do multi-block transfers. Platforms
>> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
>> this.
>>
>> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
>> driver to determine if driver needs to implement quirks associated
>> with the specific module version (primarily because the IP revision
>> information is not sufficient for the same).
>>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>
> Looks good to me, would be good to get this into the -rc cycle
> as LDP is one of the automated boot testing boards for us.
>
> If you guys want me to pick up both of the patches let me know,
> otherwise feel free to add my ack.
>
Chris,
would you be picking up the series that fixes LDP dt boot behavior or
should Tony pick it up?
https://patchwork.kernel.org/patch/3650061/
https://patchwork.kernel.org/patch/3650031/
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
2014-02-14 5:45 ` Nishanth Menon
(?)
@ 2014-02-18 14:36 ` Balaji T K
-1 siblings, 0 replies; 20+ messages in thread
From: Balaji T K @ 2014-02-18 14:36 UTC (permalink / raw)
To: Nishanth Menon
Cc: devicetree, linux-doc, Tony Lindgren, linux-mmc, Chris Ball,
Felipe Balbi, linux-kernel, linux-omap, linux-arm-kernel
On Friday 14 February 2014 11:15 AM, Nishanth Menon wrote:
> When device is booted using devicetree, platforms impacted by Erratum
> 2.1.1.128 is not detected easily in the mmc driver. This erratum
> indicates that the module cannot do multi-block transfers. Platforms
> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
> this.
>
> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
> driver to determine if driver needs to implement quirks associated
> with the specific module version (primarily because the IP revision
> information is not sufficient for the same).
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
looks good to me
Acked-by: Balaji T K <balajitk@ti.com>
> ---
> Changes since v1:
> - new compatible flag as suggested by Tony which contains
> the relevant controller flag to work around the erratum
>
> V1: https://patchwork.kernel.org/patch/3514851/
>
> .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 1 +
> drivers/mmc/host/omap_hsmmc.c | 26 +++++++++++++++++---
> 2 files changed, 23 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> index 8c8908a..ce80561 100644
> --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> @@ -10,6 +10,7 @@ Required properties:
> - compatible:
> Should be "ti,omap2-hsmmc", for OMAP2 controllers
> Should be "ti,omap3-hsmmc", for OMAP3 controllers
> + Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0
> Should be "ti,omap4-hsmmc", for OMAP4 controllers
> - ti,hwmods: Must be "mmc<n>", n is controller instance starting 1
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 575f9cc..390f421 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -192,6 +192,11 @@ struct omap_hsmmc_host {
> struct omap_mmc_platform_data *pdata;
> };
>
> +struct omap_mmc_of_data {
> + u32 reg_offset;
> + u8 controller_flags;
> +};
> +
> static int omap_hsmmc_card_detect(struct device *dev, int slot)
> {
> struct omap_hsmmc_host *host = dev_get_drvdata(dev);
> @@ -1678,18 +1683,29 @@ static void omap_hsmmc_debugfs(struct mmc_host *mmc)
> #endif
>
> #ifdef CONFIG_OF
> -static u16 omap4_reg_offset = 0x100;
> +static const struct omap_mmc_of_data omap3_pre_es3_mmc_of_data = {
> + /* See 35xx errata 2.1.1.128 in SPRZ278F */
> + .controller_flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
> +};
> +
> +static const struct omap_mmc_of_data omap4_mmc_of_data = {
> + .reg_offset = 0x100,
> +};
>
> static const struct of_device_id omap_mmc_of_match[] = {
> {
> .compatible = "ti,omap2-hsmmc",
> },
> {
> + .compatible = "ti,omap3-pre-es3-hsmmc",
> + .data = &omap3_pre_es3_mmc_of_data,
> + },
> + {
> .compatible = "ti,omap3-hsmmc",
> },
> {
> .compatible = "ti,omap4-hsmmc",
> - .data = &omap4_reg_offset,
> + .data = &omap4_mmc_of_data,
> },
> {},
> };
> @@ -1759,6 +1775,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> dma_cap_mask_t mask;
> unsigned tx_req, rx_req;
> struct pinctrl *pinctrl;
> + const struct omap_mmc_of_data *data;
>
> match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
> if (match) {
> @@ -1768,8 +1785,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> return PTR_ERR(pdata);
>
> if (match->data) {
> - const u16 *offsetp = match->data;
> - pdata->reg_offset = *offsetp;
> + data = match->data;
> + pdata->reg_offset = data->reg_offset;
> + pdata->controller_flags |= data->controller_flags;
> }
> }
>
>
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
@ 2014-02-18 14:36 ` Balaji T K
0 siblings, 0 replies; 20+ messages in thread
From: Balaji T K @ 2014-02-18 14:36 UTC (permalink / raw)
To: Nishanth Menon
Cc: Tony Lindgren, Chris Ball, linux-mmc, linux-omap, linux-kernel,
linux-doc, linux-arm-kernel, devicetree, Felipe Balbi
On Friday 14 February 2014 11:15 AM, Nishanth Menon wrote:
> When device is booted using devicetree, platforms impacted by Erratum
> 2.1.1.128 is not detected easily in the mmc driver. This erratum
> indicates that the module cannot do multi-block transfers. Platforms
> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
> this.
>
> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
> driver to determine if driver needs to implement quirks associated
> with the specific module version (primarily because the IP revision
> information is not sufficient for the same).
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
looks good to me
Acked-by: Balaji T K <balajitk@ti.com>
> ---
> Changes since v1:
> - new compatible flag as suggested by Tony which contains
> the relevant controller flag to work around the erratum
>
> V1: https://patchwork.kernel.org/patch/3514851/
>
> .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 1 +
> drivers/mmc/host/omap_hsmmc.c | 26 +++++++++++++++++---
> 2 files changed, 23 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> index 8c8908a..ce80561 100644
> --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> @@ -10,6 +10,7 @@ Required properties:
> - compatible:
> Should be "ti,omap2-hsmmc", for OMAP2 controllers
> Should be "ti,omap3-hsmmc", for OMAP3 controllers
> + Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0
> Should be "ti,omap4-hsmmc", for OMAP4 controllers
> - ti,hwmods: Must be "mmc<n>", n is controller instance starting 1
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 575f9cc..390f421 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -192,6 +192,11 @@ struct omap_hsmmc_host {
> struct omap_mmc_platform_data *pdata;
> };
>
> +struct omap_mmc_of_data {
> + u32 reg_offset;
> + u8 controller_flags;
> +};
> +
> static int omap_hsmmc_card_detect(struct device *dev, int slot)
> {
> struct omap_hsmmc_host *host = dev_get_drvdata(dev);
> @@ -1678,18 +1683,29 @@ static void omap_hsmmc_debugfs(struct mmc_host *mmc)
> #endif
>
> #ifdef CONFIG_OF
> -static u16 omap4_reg_offset = 0x100;
> +static const struct omap_mmc_of_data omap3_pre_es3_mmc_of_data = {
> + /* See 35xx errata 2.1.1.128 in SPRZ278F */
> + .controller_flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
> +};
> +
> +static const struct omap_mmc_of_data omap4_mmc_of_data = {
> + .reg_offset = 0x100,
> +};
>
> static const struct of_device_id omap_mmc_of_match[] = {
> {
> .compatible = "ti,omap2-hsmmc",
> },
> {
> + .compatible = "ti,omap3-pre-es3-hsmmc",
> + .data = &omap3_pre_es3_mmc_of_data,
> + },
> + {
> .compatible = "ti,omap3-hsmmc",
> },
> {
> .compatible = "ti,omap4-hsmmc",
> - .data = &omap4_reg_offset,
> + .data = &omap4_mmc_of_data,
> },
> {},
> };
> @@ -1759,6 +1775,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> dma_cap_mask_t mask;
> unsigned tx_req, rx_req;
> struct pinctrl *pinctrl;
> + const struct omap_mmc_of_data *data;
>
> match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
> if (match) {
> @@ -1768,8 +1785,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> return PTR_ERR(pdata);
>
> if (match->data) {
> - const u16 *offsetp = match->data;
> - pdata->reg_offset = *offsetp;
> + data = match->data;
> + pdata->reg_offset = data->reg_offset;
> + pdata->controller_flags |= data->controller_flags;
> }
> }
>
>
^ permalink raw reply [flat|nested] 20+ messages in thread* [PATCH V2 1/2] mmc: omap_hsmmc: Add support for quirky omap3 hsmmc controller
@ 2014-02-18 14:36 ` Balaji T K
0 siblings, 0 replies; 20+ messages in thread
From: Balaji T K @ 2014-02-18 14:36 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 14 February 2014 11:15 AM, Nishanth Menon wrote:
> When device is booted using devicetree, platforms impacted by Erratum
> 2.1.1.128 is not detected easily in the mmc driver. This erratum
> indicates that the module cannot do multi-block transfers. Platforms
> such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
> this.
>
> Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
> driver to determine if driver needs to implement quirks associated
> with the specific module version (primarily because the IP revision
> information is not sufficient for the same).
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
looks good to me
Acked-by: Balaji T K <balajitk@ti.com>
> ---
> Changes since v1:
> - new compatible flag as suggested by Tony which contains
> the relevant controller flag to work around the erratum
>
> V1: https://patchwork.kernel.org/patch/3514851/
>
> .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 1 +
> drivers/mmc/host/omap_hsmmc.c | 26 +++++++++++++++++---
> 2 files changed, 23 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> index 8c8908a..ce80561 100644
> --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> @@ -10,6 +10,7 @@ Required properties:
> - compatible:
> Should be "ti,omap2-hsmmc", for OMAP2 controllers
> Should be "ti,omap3-hsmmc", for OMAP3 controllers
> + Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0
> Should be "ti,omap4-hsmmc", for OMAP4 controllers
> - ti,hwmods: Must be "mmc<n>", n is controller instance starting 1
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 575f9cc..390f421 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -192,6 +192,11 @@ struct omap_hsmmc_host {
> struct omap_mmc_platform_data *pdata;
> };
>
> +struct omap_mmc_of_data {
> + u32 reg_offset;
> + u8 controller_flags;
> +};
> +
> static int omap_hsmmc_card_detect(struct device *dev, int slot)
> {
> struct omap_hsmmc_host *host = dev_get_drvdata(dev);
> @@ -1678,18 +1683,29 @@ static void omap_hsmmc_debugfs(struct mmc_host *mmc)
> #endif
>
> #ifdef CONFIG_OF
> -static u16 omap4_reg_offset = 0x100;
> +static const struct omap_mmc_of_data omap3_pre_es3_mmc_of_data = {
> + /* See 35xx errata 2.1.1.128 in SPRZ278F */
> + .controller_flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
> +};
> +
> +static const struct omap_mmc_of_data omap4_mmc_of_data = {
> + .reg_offset = 0x100,
> +};
>
> static const struct of_device_id omap_mmc_of_match[] = {
> {
> .compatible = "ti,omap2-hsmmc",
> },
> {
> + .compatible = "ti,omap3-pre-es3-hsmmc",
> + .data = &omap3_pre_es3_mmc_of_data,
> + },
> + {
> .compatible = "ti,omap3-hsmmc",
> },
> {
> .compatible = "ti,omap4-hsmmc",
> - .data = &omap4_reg_offset,
> + .data = &omap4_mmc_of_data,
> },
> {},
> };
> @@ -1759,6 +1775,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> dma_cap_mask_t mask;
> unsigned tx_req, rx_req;
> struct pinctrl *pinctrl;
> + const struct omap_mmc_of_data *data;
>
> match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
> if (match) {
> @@ -1768,8 +1785,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> return PTR_ERR(pdata);
>
> if (match->data) {
> - const u16 *offsetp = match->data;
> - pdata->reg_offset = *offsetp;
> + data = match->data;
> + pdata->reg_offset = data->reg_offset;
> + pdata->controller_flags |= data->controller_flags;
> }
> }
>
>
^ permalink raw reply [flat|nested] 20+ messages in thread