Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1086902/?format=api
{ "id": 1086902, "url": "http://patchwork.ozlabs.org/api/patches/1086902/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20190417101050.41541-2-peng.ma@nxp.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20190417101050.41541-2-peng.ma@nxp.com>", "list_archive_url": null, "date": "2019-04-17T10:10:50", "name": "[U-Boot,v3,2/2] scsi: ceva: Clean up the driver code", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "83e2aebdf2f295df2196321202f5cb45a137ad00", "submitter": { "id": 74390, "url": "http://patchwork.ozlabs.org/api/people/74390/?format=api", "name": "Peng Ma", "email": "peng.ma@nxp.com" }, "delegate": { "id": 2467, "url": "http://patchwork.ozlabs.org/api/users/2467/?format=api", "username": "prabhu_kush", "first_name": "Prabhakar", "last_name": "Kushwaha", "email": "prabhakar@freescale.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20190417101050.41541-2-peng.ma@nxp.com/mbox/", "series": [ { "id": 103267, "url": "http://patchwork.ozlabs.org/api/series/103267/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=103267", "date": "2019-04-17T10:10:49", "name": "[U-Boot,v3,1/2] ARM: dts: Freescale: Add ecc addr for sata node", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/103267/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1086902/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1086902/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=nxp.com" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 44kdVh07Tqz9s3l\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 17 Apr 2019 20:18:35 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 067EDC21E1A; Wed, 17 Apr 2019 10:18:13 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id A90F7C21E15;\n\tWed, 17 Apr 2019 10:17:58 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 5C5B7C21DB5; Wed, 17 Apr 2019 10:17:57 +0000 (UTC)", "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n\tby lists.denx.de (Postfix) with ESMTPS id EFA4DC21C6A\n\tfor <u-boot@lists.denx.de>; Wed, 17 Apr 2019 10:17:56 +0000 (UTC)", "from inva021.nxp.com (localhost [127.0.0.1])\n\tby inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 65E7C2000AF;\n\tWed, 17 Apr 2019 12:17:56 +0200 (CEST)", "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n\t[165.114.16.14])\n\tby inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4361720004E;\n\tWed, 17 Apr 2019 12:17:51 +0200 (CEST)", "from titan.ap.freescale.net (TITAN.ap.freescale.net\n\t[10.192.208.233])\n\tby invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E2131402C1;\n\tWed, 17 Apr 2019 18:17:44 +0800 (SGT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0", "From": "Peng Ma <peng.ma@nxp.com>", "To": "albert.u.boot@aribaud.net, sjg@chromium.org, fabio.estevam@nxp.com,\n\tyork.sun@nxp.com, prabhakar.kushwaha@nxp.com", "Date": "Wed, 17 Apr 2019 10:10:50 +0000", "Message-Id": "<20190417101050.41541-2-peng.ma@nxp.com>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<20190417101050.41541-1-peng.ma@nxp.com>", "References": "<20190417101050.41541-1-peng.ma@nxp.com>", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Cc": "Peng Ma <peng.ma@nxp.com>, u-boot@lists.denx.de, yinbo.zhu@nxp.com,\n\tandy.tang@nxp.com, michal.simek@xilinx.com", "Subject": "[U-Boot] [v3 2/2] scsi: ceva: Clean up the driver code", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "Distinguish the ecc val by chassis version and move the ecc addr to dts.\nAdd ls1028a soc support.\n\nSigned-off-by: Peng Ma <peng.ma@nxp.com>\nReviewed-by: Michal Simek <michal.simek@xilinx.com>\n---\nchanged for v3:\n\t- Add Reviewed-by.\n\n drivers/ata/sata_ceva.c | 50 +++++++++++++++++++++++++++++++----------------\n 1 files changed, 33 insertions(+), 17 deletions(-)", "diff": "diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c\nindex 8887be9..2d49630 100644\n--- a/drivers/ata/sata_ceva.c\n+++ b/drivers/ata/sata_ceva.c\n@@ -8,6 +8,7 @@\n #include <ahci.h>\n #include <scsi.h>\n #include <asm/io.h>\n+#include <linux/ioport.h>\n \n /* Vendor Specific Register Offsets */\n #define AHCI_VEND_PCFG 0xA4\n@@ -88,20 +89,16 @@\n #define LS1021_CEVA_PHY4_CFG\t0x064a080b\n #define LS1021_CEVA_PHY5_CFG\t0x2aa86470\n \n-/* for ls1088a */\n-#define LS1088_ECC_DIS_ADDR_CH2\t0x100520\n-#define LS1088_ECC_DIS_VAL_CH2\t0x40000000\n-\n-/* ecc addr-val pair */\n-#define ECC_DIS_ADDR_CH2\t0x20140520\n+/* ecc val pair */\n+#define ECC_DIS_VAL_CH1\t\t0x00020000\n #define ECC_DIS_VAL_CH2\t\t0x80000000\n-#define SATA_ECC_REG_ADDR\t0x20220520\n-#define SATA_ECC_DISABLE\t0x00020000\n+#define ECC_DIS_VAL_CH3\t\t0x40000000\n \n enum ceva_soc {\n \tCEVA_1V84,\n \tCEVA_LS1012A,\n \tCEVA_LS1021A,\n+\tCEVA_LS1028A,\n \tCEVA_LS1043A,\n \tCEVA_LS1046A,\n \tCEVA_LS1088A,\n@@ -110,12 +107,14 @@ enum ceva_soc {\n \n struct ceva_sata_priv {\n \tulong base;\n+\tulong ecc_base;\n \tenum ceva_soc soc;\n \tulong flag;\n };\n \n static int ceva_init_sata(struct ceva_sata_priv *priv)\n {\n+\tulong ecc_addr = priv->ecc_base;\n \tulong base = priv->base;\n \tulong tmp;\n \n@@ -132,38 +131,42 @@ static int ceva_init_sata(struct ceva_sata_priv *priv)\n \t\tbreak;\n \n \tcase CEVA_LS1021A:\n-\t\twritel(SATA_ECC_DISABLE, SATA_ECC_REG_ADDR);\n+\t\tif (!ecc_addr)\n+\t\t\treturn -EINVAL;\n+\t\twritel(ECC_DIS_VAL_CH1, ecc_addr);\n \t\twritel(CEVA_PHY1_CFG, base + AHCI_VEND_PPCFG);\n \t\twritel(LS1021_CEVA_PHY2_CFG, base + AHCI_VEND_PP2C);\n \t\twritel(LS1021_CEVA_PHY3_CFG, base + AHCI_VEND_PP3C);\n \t\twritel(LS1021_CEVA_PHY4_CFG, base + AHCI_VEND_PP4C);\n \t\twritel(LS1021_CEVA_PHY5_CFG, base + AHCI_VEND_PP5C);\n \t\twritel(CEVA_TRANS_CFG, base + AHCI_VEND_PTC);\n-\t\tif (priv->flag & FLAG_COHERENT)\n-\t\t\twritel(CEVA_AXICC_CFG, base + LS1021_AHCI_VEND_AXICC);\n \t\tbreak;\n \n \tcase CEVA_LS1012A:\n \tcase CEVA_LS1043A:\n \tcase CEVA_LS1046A:\n-\t\twritel(ECC_DIS_VAL_CH2, ECC_DIS_ADDR_CH2);\n+\t\tif (!ecc_addr)\n+\t\t\treturn -EINVAL;\n+\t\twritel(ECC_DIS_VAL_CH2, ecc_addr);\n \t\t/* fallthrough */\n \tcase CEVA_LS2080A:\n \t\twritel(CEVA_PHY1_CFG, base + AHCI_VEND_PPCFG);\n \t\twritel(CEVA_TRANS_CFG, base + AHCI_VEND_PTC);\n-\t\tif (priv->flag & FLAG_COHERENT)\n-\t\t\twritel(CEVA_AXICC_CFG, base + AHCI_VEND_AXICC);\n \t\tbreak;\n \n+\tcase CEVA_LS1028A:\n \tcase CEVA_LS1088A:\n-\t\twritel(LS1088_ECC_DIS_VAL_CH2, LS1088_ECC_DIS_ADDR_CH2);\n+\t\tif (!ecc_addr)\n+\t\t\treturn -EINVAL;\n+\t\twritel(ECC_DIS_VAL_CH3, ecc_addr);\n \t\twritel(CEVA_PHY1_CFG, base + AHCI_VEND_PPCFG);\n \t\twritel(CEVA_TRANS_CFG, base + AHCI_VEND_PTC);\n-\t\tif (priv->flag & FLAG_COHERENT)\n-\t\t\twritel(CEVA_AXICC_CFG, base + AHCI_VEND_AXICC);\n \t\tbreak;\n \t}\n \n+\tif (priv->flag & FLAG_COHERENT)\n+\t\twritel(CEVA_AXICC_CFG, base + AHCI_VEND_AXICC);\n+\n \treturn 0;\n }\n \n@@ -187,6 +190,7 @@ static const struct udevice_id sata_ceva_ids[] = {\n \t{ .compatible = \"ceva,ahci-1v84\", .data = CEVA_1V84 },\n \t{ .compatible = \"fsl,ls1012a-ahci\", .data = CEVA_LS1012A },\n \t{ .compatible = \"fsl,ls1021a-ahci\", .data = CEVA_LS1021A },\n+\t{ .compatible = \"fsl,ls1028a-ahci\", .data = CEVA_LS1028A },\n \t{ .compatible = \"fsl,ls1043a-ahci\", .data = CEVA_LS1043A },\n \t{ .compatible = \"fsl,ls1046a-ahci\", .data = CEVA_LS1046A },\n \t{ .compatible = \"fsl,ls1088a-ahci\", .data = CEVA_LS1088A },\n@@ -197,6 +201,8 @@ static const struct udevice_id sata_ceva_ids[] = {\n static int sata_ceva_ofdata_to_platdata(struct udevice *dev)\n {\n \tstruct ceva_sata_priv *priv = dev_get_priv(dev);\n+\tstruct resource res_regs;\n+\tint ret;\n \n \tif (dev_read_bool(dev, \"dma-coherent\"))\n \t\tpriv->flag |= FLAG_COHERENT;\n@@ -205,8 +211,18 @@ static int sata_ceva_ofdata_to_platdata(struct udevice *dev)\n \tif (priv->base == FDT_ADDR_T_NONE)\n \t\treturn -EINVAL;\n \n+\tret = dev_read_resource_byname(dev, \"ecc-addr\", &res_regs);\n+\tif (ret)\n+\t\tpriv->ecc_base = 0;\n+\telse\n+\t\tpriv->ecc_base = res_regs.start;\n+\n \tpriv->soc = dev_get_driver_data(dev);\n \n+\tdebug(\"ccsr-sata-base %lx\\t ecc-base %lx\\n\",\n+\t priv->base,\n+\t priv->ecc_base);\n+\n \treturn 0;\n }\n \n", "prefixes": [ "U-Boot", "v3", "2/2" ] }