* [PATCH v6 0/3] ahci: add support for hisilicon sata
@ 2014-04-25 8:59 Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Kefeng Wang
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Kefeng Wang @ 2014-04-25 8:59 UTC (permalink / raw)
To: Tejun Heo, Hans de Goede, Maxime Ripard, linux-ide, linux-kernel
Cc: wangkefeng.wang, kefeng.wang, xuwei5
change in v6:
1) type of host_flags changed from unsigned int to unsigned long,
fix the building warning and error.
channge in v5:
1) drop AHCI_HFLAGS(...) from ahci_xgene.c and do use host_flags
in ahci_platform_init_host, it's my carelessness.
changes in v4:
1) add a dynamic host_flags parameter in ahci_platform_init_host
to make it more flexible, modify some driver to use new
way to pass host flags, suggested by Hans
changes in v3:
1) move NO_FBS chunk after YES_FBS, Tejun's suggestion
2) use ata_port_info pointer to avoid struct ata_port_info
on the stack twice
changes in v2:
1) make code more concise according to Hans's advice
Kefeng Wang (3):
ata: ahci: append new hflag AHCI_HFLAG_NO_FBS
libahci_platform: add host_flags parameter in
ahci_platform_init_host()
ahci: add support for Hisilicon sata
.../devicetree/bindings/ata/ahci-platform.txt | 3 ++-
drivers/ata/ahci.h | 1 +
drivers/ata/ahci_da850.c | 3 ++-
drivers/ata/ahci_imx.c | 3 ++-
drivers/ata/ahci_platform.c | 9 ++++++++-
drivers/ata/ahci_st.c | 2 +-
drivers/ata/ahci_sunxi.c | 9 ++++++---
drivers/ata/ahci_xgene.c | 7 +++++--
drivers/ata/libahci.c | 5 +++++
drivers/ata/libahci_platform.c | 5 ++++-
include/linux/ahci_platform.h | 1 +
11 files changed, 37 insertions(+), 11 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v6 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS
2014-04-25 8:59 [PATCH v6 0/3] ahci: add support for hisilicon sata Kefeng Wang
@ 2014-04-25 8:59 ` Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 2/3] libahci_platform: add host_flags parameter in ahci_platform_init_host() Kefeng Wang
` (4 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Kefeng Wang @ 2014-04-25 8:59 UTC (permalink / raw)
To: Tejun Heo, Hans de Goede, Maxime Ripard, linux-ide, linux-kernel
Cc: wangkefeng.wang, kefeng.wang, xuwei5
Append AHCI_HFLAG_NO_FBS to force turning off FBS flag.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
---
drivers/ata/ahci.h | 1 +
drivers/ata/libahci.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index b5eb886..48073ef 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -236,6 +236,7 @@ enum {
port start (wait until
error-handling stage) */
AHCI_HFLAG_MULTI_MSI = (1 << 16), /* multiple PCI MSIs */
+ AHCI_HFLAG_NO_FBS = (1 << 17), /* no FBS */
/* ap->flags bits */
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 6bd4f66..e1cf859 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -457,6 +457,11 @@ void ahci_save_initial_config(struct device *dev,
cap |= HOST_CAP_FBS;
}
+ if ((cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_NO_FBS)) {
+ dev_info(dev, "controller can't do FBS, turning off CAP_FBS\n");
+ cap &= ~HOST_CAP_FBS;
+ }
+
if (force_port_map && port_map != force_port_map) {
dev_info(dev, "forcing port_map 0x%x -> 0x%x\n",
port_map, force_port_map);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v6 2/3] libahci_platform: add host_flags parameter in ahci_platform_init_host()
2014-04-25 8:59 [PATCH v6 0/3] ahci: add support for hisilicon sata Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Kefeng Wang
@ 2014-04-25 8:59 ` Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 3/3] ahci: add support for Hisilicon sata Kefeng Wang
` (3 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Kefeng Wang @ 2014-04-25 8:59 UTC (permalink / raw)
To: Tejun Heo, Hans de Goede, Maxime Ripard, linux-ide, linux-kernel
Cc: wangkefeng.wang, kefeng.wang, xuwei5
Add a dynamic host_flags argument to make ahci_platform_init_host more flexible,
then remove the AHCI_HFLAGS(...) argument from some driver's ata_port_info,
and pass that in as the new argument.
Cc: Hans de Geode <hdegoede@redhat.com>
Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
---
drivers/ata/ahci_da850.c | 3 ++-
drivers/ata/ahci_imx.c | 3 ++-
drivers/ata/ahci_platform.c | 2 +-
drivers/ata/ahci_st.c | 2 +-
drivers/ata/ahci_sunxi.c | 9 ++++++---
drivers/ata/ahci_xgene.c | 7 +++++--
drivers/ata/libahci_platform.c | 5 ++++-
include/linux/ahci_platform.h | 1 +
8 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
index 2c83613..2b77d53 100644
--- a/drivers/ata/ahci_da850.c
+++ b/drivers/ata/ahci_da850.c
@@ -85,7 +85,8 @@ static int ahci_da850_probe(struct platform_device *pdev)
da850_sata_init(dev, pwrdn_reg, hpriv->mmio);
- rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info, 0, 0);
+ rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info,
+ 0, 0, 0);
if (rc)
goto disable_resources;
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 497c7ab..e7e44a7 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -267,7 +267,8 @@ static int imx_ahci_probe(struct platform_device *pdev)
reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000;
writel(reg_val, hpriv->mmio + HOST_TIMER1MS);
- ret = ahci_platform_init_host(pdev, hpriv, &ahci_imx_port_info, 0, 0);
+ ret = ahci_platform_init_host(pdev, hpriv, &ahci_imx_port_info,
+ 0, 0, 0);
if (ret)
imx_sata_disable(hpriv);
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index ef67e79..a476a1f 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -55,7 +55,7 @@ static int ahci_probe(struct platform_device *pdev)
goto disable_resources;
}
- rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0);
+ rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0, 0);
if (rc)
goto pdata_exit;
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index 6332222..2595598 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -166,7 +166,7 @@ static int st_ahci_probe(struct platform_device *pdev)
if (err)
return err;
- err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, 0, 0);
+ err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, 0, 0, 0);
if (err) {
ahci_platform_disable_resources(hpriv);
return err;
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index 42d3f64..02002f1 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -157,8 +157,6 @@ static void ahci_sunxi_start_engine(struct ata_port *ap)
}
static const struct ata_port_info ahci_sunxi_port_info = {
- AHCI_HFLAGS(AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
- AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ),
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
@@ -169,6 +167,7 @@ static int ahci_sunxi_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
+ unsigned long hflags;
int rc;
hpriv = ahci_platform_get_resources(pdev);
@@ -185,7 +184,11 @@ static int ahci_sunxi_probe(struct platform_device *pdev)
if (rc)
goto disable_resources;
- rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info, 0, 0);
+ hflags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
+ AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ;
+
+ rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info,
+ hflags, 0, 0);
if (rc)
goto disable_resources;
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 77c89bf..042a9bb 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -303,7 +303,6 @@ static struct ata_port_operations xgene_ahci_ops = {
};
static const struct ata_port_info xgene_ahci_port_info = {
- AHCI_HFLAGS(AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ),
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
@@ -382,6 +381,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
struct ahci_host_priv *hpriv;
struct xgene_ahci_context *ctx;
struct resource *res;
+ unsigned long hflags;
int rc;
hpriv = ahci_platform_get_resources(pdev);
@@ -450,7 +450,10 @@ static int xgene_ahci_probe(struct platform_device *pdev)
goto disable_resources;
}
- rc = ahci_platform_init_host(pdev, hpriv, &xgene_ahci_port_info, 0, 0);
+ hflags = AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ;
+
+ rc = ahci_platform_init_host(pdev, hpriv, &xgene_ahci_port_info,
+ hflags, 0, 0);
if (rc)
goto disable_resources;
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 7cb3a85..3a5b4ed 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -283,6 +283,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_get_resources);
* @pdev: platform device pointer for the host
* @hpriv: ahci-host private data for the host
* @pi_template: template for the ata_port_info to use
+ * @host_flags: ahci host flags used in ahci_host_priv
* @force_port_map: param passed to ahci_save_initial_config
* @mask_port_map: param passed to ahci_save_initial_config
*
@@ -296,6 +297,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_get_resources);
int ahci_platform_init_host(struct platform_device *pdev,
struct ahci_host_priv *hpriv,
const struct ata_port_info *pi_template,
+ unsigned long host_flags,
unsigned int force_port_map,
unsigned int mask_port_map)
{
@@ -312,7 +314,8 @@ int ahci_platform_init_host(struct platform_device *pdev,
}
/* prepare host */
- hpriv->flags |= (unsigned long)pi.private_data;
+ pi.private_data = (void *)host_flags;
+ hpriv->flags |= host_flags;
ahci_save_initial_config(dev, hpriv, force_port_map, mask_port_map);
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h
index 1f16d50..6dfd51a 100644
--- a/include/linux/ahci_platform.h
+++ b/include/linux/ahci_platform.h
@@ -44,6 +44,7 @@ struct ahci_host_priv *ahci_platform_get_resources(
int ahci_platform_init_host(struct platform_device *pdev,
struct ahci_host_priv *hpriv,
const struct ata_port_info *pi_template,
+ unsigned long host_flags,
unsigned int force_port_map,
unsigned int mask_port_map);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v6 3/3] ahci: add support for Hisilicon sata
2014-04-25 8:59 [PATCH v6 0/3] ahci: add support for hisilicon sata Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 2/3] libahci_platform: add host_flags parameter in ahci_platform_init_host() Kefeng Wang
@ 2014-04-25 8:59 ` Kefeng Wang
2014-05-13 19:04 ` Tejun Heo
2014-04-25 10:14 ` [PATCH v6 0/3] ahci: add support for hisilicon sata Hans de Goede
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Kefeng Wang @ 2014-04-25 8:59 UTC (permalink / raw)
To: Tejun Heo, Hans de Goede, Maxime Ripard, linux-ide, linux-kernel
Cc: wangkefeng.wang, kefeng.wang, xuwei5
The hip04 SoC of hisilicon has an AHCI compliant SATA controller,
and it is compliant with the ahci 1.3 and sata 3.0 specification.
There is a wrong bit in HOST_CAP of hip04 sata controller, which
enable unsupported feature of FBS, use AHCI_HFLAG_NO_FBS hflag to
disable it.
Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
---
.../devicetree/bindings/ata/ahci-platform.txt | 3 ++-
drivers/ata/ahci_platform.c | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt
index 48b285f..aab1d70 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.txt
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -7,7 +7,8 @@ Required properties:
- compatible : compatible list, one of "snps,spear-ahci",
"snps,exynos5440-ahci", "ibm,476gtr-ahci",
"allwinner,sun4i-a10-ahci", "fsl,imx53-ahci"
- "fsl,imx6q-ahci" or "snps,dwc-ahci"
+ "fsl,imx6q-ahci", "snps,dwc-ahci" or
+ "hisilicon,hisi-ahci"
- interrupts : <interrupt mapping for SATA IRQ>
- reg : <registers mapping>
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index a476a1f..ebe505c 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/device.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/libata.h>
#include <linux/ahci_platform.h>
@@ -33,6 +34,7 @@ static int ahci_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct ahci_platform_data *pdata = dev_get_platdata(dev);
struct ahci_host_priv *hpriv;
+ unsigned long hflags = 0;
int rc;
hpriv = ahci_platform_get_resources(pdev);
@@ -55,7 +57,11 @@ static int ahci_probe(struct platform_device *pdev)
goto disable_resources;
}
- rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0, 0);
+ if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
+ hflags |= AHCI_HFLAG_NO_FBS;
+
+ rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
+ hflags, 0, 0);
if (rc)
goto pdata_exit;
@@ -76,6 +82,7 @@ static const struct of_device_id ahci_of_match[] = {
{ .compatible = "snps,exynos5440-ahci", },
{ .compatible = "ibm,476gtr-ahci", },
{ .compatible = "snps,dwc-ahci", },
+ { .compatible = "hisilicon,hisi-ahci", },
{},
};
MODULE_DEVICE_TABLE(of, ahci_of_match);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v6 0/3] ahci: add support for hisilicon sata
2014-04-25 8:59 [PATCH v6 0/3] ahci: add support for hisilicon sata Kefeng Wang
` (2 preceding siblings ...)
2014-04-25 8:59 ` [PATCH v6 3/3] ahci: add support for Hisilicon sata Kefeng Wang
@ 2014-04-25 10:14 ` Hans de Goede
2014-05-05 12:05 ` kefeng.wang
2014-05-14 17:07 ` Tejun Heo
5 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2014-04-25 10:14 UTC (permalink / raw)
To: Kefeng Wang, Tejun Heo, Maxime Ripard, linux-ide, linux-kernel
Cc: wangkefeng.wang, xuwei5
Hi,
On 04/25/2014 10:59 AM, Kefeng Wang wrote:
> change in v6:
> 1) type of host_flags changed from unsigned int to unsigned long,
> fix the building warning and error.
>
> channge in v5:
> 1) drop AHCI_HFLAGS(...) from ahci_xgene.c and do use host_flags
> in ahci_platform_init_host, it's my carelessness.
>
> changes in v4:
> 1) add a dynamic host_flags parameter in ahci_platform_init_host
> to make it more flexible, modify some driver to use new
> way to pass host flags, suggested by Hans
>
> changes in v3:
> 1) move NO_FBS chunk after YES_FBS, Tejun's suggestion
> 2) use ata_port_info pointer to avoid struct ata_port_info
> on the stack twice
>
> changes in v2:
> 1) make code more concise according to Hans's advice
>
> Kefeng Wang (3):
> ata: ahci: append new hflag AHCI_HFLAG_NO_FBS
> libahci_platform: add host_flags parameter in
> ahci_platform_init_host()
> ahci: add support for Hisilicon sata
Thanks, looks good:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
>
> .../devicetree/bindings/ata/ahci-platform.txt | 3 ++-
> drivers/ata/ahci.h | 1 +
> drivers/ata/ahci_da850.c | 3 ++-
> drivers/ata/ahci_imx.c | 3 ++-
> drivers/ata/ahci_platform.c | 9 ++++++++-
> drivers/ata/ahci_st.c | 2 +-
> drivers/ata/ahci_sunxi.c | 9 ++++++---
> drivers/ata/ahci_xgene.c | 7 +++++--
> drivers/ata/libahci.c | 5 +++++
> drivers/ata/libahci_platform.c | 5 ++++-
> include/linux/ahci_platform.h | 1 +
> 11 files changed, 37 insertions(+), 11 deletions(-)
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 0/3] ahci: add support for hisilicon sata
2014-04-25 8:59 [PATCH v6 0/3] ahci: add support for hisilicon sata Kefeng Wang
` (3 preceding siblings ...)
2014-04-25 10:14 ` [PATCH v6 0/3] ahci: add support for hisilicon sata Hans de Goede
@ 2014-05-05 12:05 ` kefeng.wang
2014-05-14 17:07 ` Tejun Heo
5 siblings, 0 replies; 14+ messages in thread
From: kefeng.wang @ 2014-05-05 12:05 UTC (permalink / raw)
To: Tejun Heo, Maxime Ripard, linux-ide, linux-kernel
Cc: Kefeng Wang, Hans de Goede, xuwei5
Hi Tejun, ping...
On 2014-4-25 16:59, Kefeng Wang wrote:
> change in v6:
> 1) type of host_flags changed from unsigned int to unsigned long,
> fix the building warning and error.
>
> channge in v5:
> 1) drop AHCI_HFLAGS(...) from ahci_xgene.c and do use host_flags
> in ahci_platform_init_host, it's my carelessness.
>
> changes in v4:
> 1) add a dynamic host_flags parameter in ahci_platform_init_host
> to make it more flexible, modify some driver to use new
> way to pass host flags, suggested by Hans
>
> changes in v3:
> 1) move NO_FBS chunk after YES_FBS, Tejun's suggestion
> 2) use ata_port_info pointer to avoid struct ata_port_info
> on the stack twice
>
> changes in v2:
> 1) make code more concise according to Hans's advice
>
> Kefeng Wang (3):
> ata: ahci: append new hflag AHCI_HFLAG_NO_FBS
> libahci_platform: add host_flags parameter in
> ahci_platform_init_host()
> ahci: add support for Hisilicon sata
>
> .../devicetree/bindings/ata/ahci-platform.txt | 3 ++-
> drivers/ata/ahci.h | 1 +
> drivers/ata/ahci_da850.c | 3 ++-
> drivers/ata/ahci_imx.c | 3 ++-
> drivers/ata/ahci_platform.c | 9 ++++++++-
> drivers/ata/ahci_st.c | 2 +-
> drivers/ata/ahci_sunxi.c | 9 ++++++---
> drivers/ata/ahci_xgene.c | 7 +++++--
> drivers/ata/libahci.c | 5 +++++
> drivers/ata/libahci_platform.c | 5 ++++-
> include/linux/ahci_platform.h | 1 +
> 11 files changed, 37 insertions(+), 11 deletions(-)
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 3/3] ahci: add support for Hisilicon sata
2014-04-25 8:59 ` [PATCH v6 3/3] ahci: add support for Hisilicon sata Kefeng Wang
@ 2014-05-13 19:04 ` Tejun Heo
2014-05-14 6:12 ` kefeng.wang
0 siblings, 1 reply; 14+ messages in thread
From: Tejun Heo @ 2014-05-13 19:04 UTC (permalink / raw)
To: Kefeng Wang
Cc: Hans de Goede, Maxime Ripard, linux-ide, linux-kernel,
wangkefeng.wang, xuwei5
On Fri, Apr 25, 2014 at 04:59:11PM +0800, Kefeng Wang wrote:
> The hip04 SoC of hisilicon has an AHCI compliant SATA controller,
> and it is compliant with the ahci 1.3 and sata 3.0 specification.
>
> There is a wrong bit in HOST_CAP of hip04 sata controller, which
> enable unsupported feature of FBS, use AHCI_HFLAG_NO_FBS hflag to
> disable it.
>
> Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
Doesn't apply to libata/for-3.16. Please refresh.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 3/3] ahci: add support for Hisilicon sata
2014-05-13 19:04 ` Tejun Heo
@ 2014-05-14 6:12 ` kefeng.wang
0 siblings, 0 replies; 14+ messages in thread
From: kefeng.wang @ 2014-05-14 6:12 UTC (permalink / raw)
To: Tejun Heo
Cc: Hans de Goede, Maxime Ripard, linux-ide, linux-kernel,
wangkefeng.wang, xuwei5
On 2014-5-14 3:04, Tejun Heo wrote:
> On Fri, Apr 25, 2014 at 04:59:11PM +0800, Kefeng Wang wrote:
>> The hip04 SoC of hisilicon has an AHCI compliant SATA controller,
>> and it is compliant with the ahci 1.3 and sata 3.0 specification.
>>
>> There is a wrong bit in HOST_CAP of hip04 sata controller, which
>> enable unsupported feature of FBS, use AHCI_HFLAG_NO_FBS hflag to
>> disable it.
>>
>> Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
>
> Doesn't apply to libata/for-3.16. Please refresh.
Send new patches, rebased onto libata/for-3.16, based on commit: 58eb8cd565af.
Is this OK, if not, please let me know, thanks.
>
> Thanks.
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 0/3] ahci: add support for hisilicon sata
2014-04-25 8:59 [PATCH v6 0/3] ahci: add support for hisilicon sata Kefeng Wang
` (4 preceding siblings ...)
2014-05-05 12:05 ` kefeng.wang
@ 2014-05-14 17:07 ` Tejun Heo
2014-06-10 9:51 ` [PATCH] ahci: disable ncq feature " kefeng.wang
5 siblings, 1 reply; 14+ messages in thread
From: Tejun Heo @ 2014-05-14 17:07 UTC (permalink / raw)
To: Kefeng Wang
Cc: Hans de Goede, Maxime Ripard, linux-ide, linux-kernel,
wangkefeng.wang, xuwei5
Applied to libata/for-3.16.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] ahci: disable ncq feature for hisilicon sata
2014-05-14 17:07 ` Tejun Heo
@ 2014-06-10 9:51 ` kefeng.wang
2014-06-10 10:07 ` kefeng.wang
2014-06-24 20:56 ` Tejun Heo
0 siblings, 2 replies; 14+ messages in thread
From: kefeng.wang @ 2014-06-10 9:51 UTC (permalink / raw)
To: Tejun Heo
Cc: Hans de Goede, Zhangfei Gao, linux-ide, linux-kernel,
wangkefeng.wang, xuwei5
NCQ feature is unsupported on hisilicon sata controller, so disable it.
This version of IP is used by hip04 and hix5hd2 soc.
Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
---
drivers/ata/ahci_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index ebe505c..0cfda8b 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -58,7 +58,7 @@ static int ahci_probe(struct platform_device *pdev)
}
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
- hflags |= AHCI_HFLAG_NO_FBS;
+ hflags = AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
hflags, 0, 0);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] ahci: disable ncq feature for hisilicon sata
2014-06-10 9:51 ` [PATCH] ahci: disable ncq feature " kefeng.wang
@ 2014-06-10 10:07 ` kefeng.wang
2014-06-10 13:56 ` Hans de Goede
2014-06-24 20:56 ` Tejun Heo
1 sibling, 1 reply; 14+ messages in thread
From: kefeng.wang @ 2014-06-10 10:07 UTC (permalink / raw)
To: Tejun Heo
Cc: Hans de Goede, Zhangfei Gao, linux-ide, linux-kernel,
wangkefeng.wang, xuwei5
Hi Tejun,
I have a question, the hip04 and hix5hd2 soc use the old version of IP, but they
also have a new version of IP which support FBS and NCQ, and now the new one is
used by a new soc. How can I distinguish them, use "hisilicon,hisi-ahci-vX" or just
add "generic-ahci" string for the IP which is conformant with spec and has
no special customization and issue? Any advices, thanks.
Regards,
Kefeng
On 2014-6-10 17:51, kefeng.wang wrote:
> NCQ feature is unsupported on hisilicon sata controller, so disable it.
> This version of IP is used by hip04 and hix5hd2 soc.
>
> Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
> ---
> drivers/ata/ahci_platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index ebe505c..0cfda8b 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -58,7 +58,7 @@ static int ahci_probe(struct platform_device *pdev)
> }
>
> if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
> - hflags |= AHCI_HFLAG_NO_FBS;
> + hflags = AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
>
> rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
> hflags, 0, 0);
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] ahci: disable ncq feature for hisilicon sata
2014-06-10 10:07 ` kefeng.wang
@ 2014-06-10 13:56 ` Hans de Goede
2014-06-24 7:11 ` kefeng.wang
0 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2014-06-10 13:56 UTC (permalink / raw)
To: kefeng.wang, Tejun Heo
Cc: Zhangfei Gao, linux-ide, linux-kernel, wangkefeng.wang, xuwei5
Hi Kefeng,
On 06/10/2014 12:07 PM, kefeng.wang wrote:
> Hi Tejun,
>
> I have a question, the hip04 and hix5hd2 soc use the old version of IP, but they
> also have a new version of IP which support FBS and NCQ, and now the new one is
> used by a new soc. How can I distinguish them, use "hisilicon,hisi-ahci-vX" or just
> add "generic-ahci" string for the IP which is conformant with spec and has
> no special customization and issue? Any advices, thanks.
Please use "hisilicon,hisi-ahci-vX", this way it will be easier to add any
special behavior in case this turns out to be necessary later.
Regards,
Hans
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] ahci: disable ncq feature for hisilicon sata
2014-06-10 13:56 ` Hans de Goede
@ 2014-06-24 7:11 ` kefeng.wang
0 siblings, 0 replies; 14+ messages in thread
From: kefeng.wang @ 2014-06-24 7:11 UTC (permalink / raw)
To: Tejun Heo
Cc: Hans de Goede, Zhangfei Gao, linux-ide, linux-kernel,
wangkefeng.wang, xuwei5
On 2014-6-10 21:56, Hans de Goede wrote:
> Hi Kefeng,
>
> On 06/10/2014 12:07 PM, kefeng.wang wrote:
>> Hi Tejun,
>>
>> I have a question, the hip04 and hix5hd2 soc use the old version of IP, but they
>> also have a new version of IP which support FBS and NCQ, and now the new one is
>> used by a new soc. How can I distinguish them, use "hisilicon,hisi-ahci-vX" or just
>> add "generic-ahci" string for the IP which is conformant with spec and has
>> no special customization and issue? Any advices, thanks.
>
> Please use "hisilicon,hisi-ahci-vX", this way it will be easier to add any
> special behavior in case this turns out to be necessary later.
OK, thanks for your guidance. If necessary, we will use hisi-ahci-vX for hisi's IP.
Hi Tejun, could you merger this patch please? thanks.
Regards,
Kefeng
>
> Regards,
>
> Hans
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] ahci: disable ncq feature for hisilicon sata
2014-06-10 9:51 ` [PATCH] ahci: disable ncq feature " kefeng.wang
2014-06-10 10:07 ` kefeng.wang
@ 2014-06-24 20:56 ` Tejun Heo
1 sibling, 0 replies; 14+ messages in thread
From: Tejun Heo @ 2014-06-24 20:56 UTC (permalink / raw)
To: kefeng.wang
Cc: Hans de Goede, Zhangfei Gao, linux-ide, linux-kernel,
wangkefeng.wang, xuwei5
>From 72cbaa3d2f563d7b48c9f8aef47ec9aa3a31adf2 Mon Sep 17 00:00:00 2001
From: Kefeng Wang <kefeng.wang@linaro.org>
Date: Tue, 24 Jun 2014 16:54:23 -0400
NCQ feature is unsupported on hisilicon sata controller, so disable
it. This version of IP is used by hip04 and hix5hd2 soc.
tj: "|=" was replaced with "=" for no reason. Restored "|=".
Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org>
Sigend-off-by: Tejun Heo <tj@kernel.org>
---
Patch didn't apply. Applied to libata/for-3.16-fixes manually and
dropped "|=" -> "=" conversion. Why was this done?
Thanks.
drivers/ata/ahci_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index ebe505c..b10d81d 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -58,7 +58,7 @@ static int ahci_probe(struct platform_device *pdev)
}
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
- hflags |= AHCI_HFLAG_NO_FBS;
+ hflags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
hflags, 0, 0);
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-06-24 20:56 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25 8:59 [PATCH v6 0/3] ahci: add support for hisilicon sata Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 2/3] libahci_platform: add host_flags parameter in ahci_platform_init_host() Kefeng Wang
2014-04-25 8:59 ` [PATCH v6 3/3] ahci: add support for Hisilicon sata Kefeng Wang
2014-05-13 19:04 ` Tejun Heo
2014-05-14 6:12 ` kefeng.wang
2014-04-25 10:14 ` [PATCH v6 0/3] ahci: add support for hisilicon sata Hans de Goede
2014-05-05 12:05 ` kefeng.wang
2014-05-14 17:07 ` Tejun Heo
2014-06-10 9:51 ` [PATCH] ahci: disable ncq feature " kefeng.wang
2014-06-10 10:07 ` kefeng.wang
2014-06-10 13:56 ` Hans de Goede
2014-06-24 7:11 ` kefeng.wang
2014-06-24 20:56 ` Tejun Heo
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).