From patchwork Sun Oct 9 08:57:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tang yuantian X-Patchwork-Id: 9368411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2EB0160487 for ; Sun, 9 Oct 2016 09:13:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BA9B28F7F for ; Sun, 9 Oct 2016 09:13:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF68728F82; Sun, 9 Oct 2016 09:13:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4546628F7F for ; Sun, 9 Oct 2016 09:13:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1btA7q-00027t-4S; Sun, 09 Oct 2016 09:10:30 +0000 Received: from mail-co1nam03on0070.outbound.protection.outlook.com ([104.47.40.70] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1btA7l-0001KG-EI for linux-arm-kernel@lists.infradead.org; Sun, 09 Oct 2016 09:10:26 +0000 Received: from BN3PR0301CA0058.namprd03.prod.outlook.com (10.160.152.154) by BLUPR0301MB2004.namprd03.prod.outlook.com (10.164.22.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Sun, 9 Oct 2016 09:10:03 +0000 Received: from BL2FFO11FD009.protection.gbl (2a01:111:f400:7c09::187) by BN3PR0301CA0058.outlook.office365.com (2a01:111:e400:401e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11 via Frontend Transport; Sun, 9 Oct 2016 09:10:03 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=fail action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD009.mail.protection.outlook.com (10.173.161.15) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Sun, 9 Oct 2016 09:09:58 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u9999tP8018693; Sun, 9 Oct 2016 02:09:56 -0700 From: To: Subject: [PATCH] ahci: qoriq: added ls1046a platform support Date: Sun, 9 Oct 2016 16:57:40 +0800 Message-ID: <1476003460-1005-1-git-send-email-yuantian.tang@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131204778032268523; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5003940100001)(47776003)(77096005)(2876002)(11100500001)(104016004)(2906002)(92566002)(81156014)(81166006)(19580405001)(19580395003)(8676002)(305945005)(356003)(8666005)(7846002)(86152002)(86362001)(586003)(4326007)(6916009)(68736007)(33646002)(36756003)(6666003)(8936002)(50986999)(97736004)(50226002)(626004)(110136003)(105606002)(189998001)(5660300001)(87936001)(2351001)(106466001)(85426001)(229853001)(48376002)(50466002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB2004; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD009; 1:3ESiT4AmI8JgC/22WMBs2LtbULAKZvgW4R5ZDrFWZsJdxZdVXl6H1IU54jUyzUok3h3Bd2hkXADrQuOoQxkFX6LYoNAwaC7plLhttew8jsVtmDNp/OJt/qnEill2V/AIYWMJTlRlftReGjN/rh0XQFCeOEIOuMoAkAIXToUpJx6wCTDA3kTA7+ZtPet/EuIrWyGhXhzoJyPGnUbc8hCLbPNxKVhNvVHk7XiSyrRsXfyh5LnQVv2ILUeKl8/wJegi5ti66WZjOXEZYnNR/vCPe9hDuLScmclGncPp7L2a0rICZw51JHKlYDKWOFOzVr9R2vkFAr4Td7LdND49A25iKJcmbK+PPMZOQQl8R6GlTXaNKEcKOck4ANHIXz1c6190I2EHkXrpAtKMqYJphL92+6FeCz167c/5tZOZKEV287ZHkI4HksVQ6SY3PJHz5UKdjWGE9loOcOPkMtLbyhyXAiPhIMS5Ec71hf8w3sISRZCVYc+I4u2CdfJkWrSqqOuck+GDmN1d/zrSuH53pBZitUu2k/6bSI3SHcQUmmcVvXyjEtx0LB12bTy4IlGCwlbb2z8Q7qY3nsDyTmsKoTgvlchJIYAmfIx2OsSb0sO+vmJUdt54fyeSMtDx3JEaFSj0NegTqEnSJTI/FMaXliAI4cdRiINmapGnDrilyMEUFQx3pS6k01Ddzr690CWNVomfIaKy0Mv+5j5WC6JFznaPlQOjcTRvA9CilpnGDv9jkuI= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: cafcdc1a-1a84-4198-238a-08d3f0240de7 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB2004; 2:aqFqZY6T6ETWhEgTvDz5vgpZ67JAoSym/JsKRMWXNHTVu80dVhLiCmhej1/1CArrV1orlJjXrmX2l2Jsmplc1xD+2usojXAOrW5UaaXlFYpUwcX34pqGKfmJM+n1idKx0hrrUSnkyz5C/UJoyztuZBI9/MXdJMYrncHF3bru449KNxUzkIyMNvj177YDhhu1WnchuMGTEcLHEJnHQaAKIQ==; 3:strL+hxp9yUwWA8kIIWGg5j8pvwuYyKBuVwyUQ9PEDvwEhlA2Ysbo6+z8MVzIPoXlUroAIoudMQMtj+BRNJJX15maJUc5tH/7M3vLVhUptWoSZlvP4QQ2smD6hxpWxqTOEkgey77b8MbQsSFoqnuCBg9YgxNuMoTI9ivG2UdYQiiOUdqJLA80pvsp/47D/jE/3fGYLiQq83K+gERzLVWSQ/pY+PDyK/2cRI7Icb1LM03Ow0dUZgwqGp6VwBklIas; 25:u8pctbZaNH3j2Eszzv+rIMDPObbBYF9zJtzM3Q1pdoOojR7angSbpdzSyGkAVqR94WyO3HafuQmwpz8FIC30nLAYTBWSqeWlpTs+DIFmhhmdm7H9Hkkpgv7ffu5sUG8hKLtf5LH0xdb0Uo1Wc8D336/0RF0aBGABQhb3k2WTHeqiPLaPWNCBvB3faA/EtQ4IZ6I7xFlILoB8DEdFxup06xFHIa842TNmbmmb0JSAbiHJQA5aOttWeNEk1uZ04Zvqx2u3cU826iibQksJF43kCoWVXtCI/qOSa1pGAxuVXKCphDlSWZrEE0PgnoZGdbXpk8CnU6q38xhuF7XPzrn7gRPUUDZ4hBIv3Dh0hq1zdlxDquUx4lkt4mz/xLPIU5FiQgJuNnxtNx4Wo3JoXPvPYs8Qb4mS8nszHRLMGRhfZfk= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB2004; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB2004; 31:Al4XwFz/U/htnvrdR7XxOgRH6ky7XBTyp9XePtZEcO64WK6Ux8KyWzQInGxNX5dQVxEcwG5htih4TbiwBoO984nltL/SPdFGX6yKQx7mrpGE0hgIH8+Vqy/T6bd1nMysqWzAEAaLIeLc/1+ZwbrH+E/MvAmVM1bN5GL/V//6IzLyzsYGn2obs/Hk5UByvtE5qxJAOBtywZOccEVYiCwUfe9mKoY0O2iDoWl1H6osXjj2QDU8Nnomyokggwv2V8n6; 4:7jLfw+972nM2kUlQh1ONkvepEXek7iPEi3ZdBvpd+hlgemQreG66LMQuOzAWm+F0hhmdYh0Fll+xD/97NavEDL5u8BpiElA6bf53/iBBowZbdiFE3NEsqlqN/jyeBKudML1wWs3neNTnU8HhCF3aCYv5GNIXGNPtY5OMeIx/jkItDDHOgglXDmhCsOTI+nEwR5OdbEwMmJMXtRC92N4dFH4/pMOANJ4CDQThw+ZNOb7qi5qlxiuooX0MS2x24QG8QXDr8gF0q8a8m8udVEF+zleHiDptuEuG0H4becIRdjeoB07oAlqwAHxrtTbsIY/HxhG/PrufY48VqW1iehgFuQD+0c4qUJKItLAqWhdGBk5xsHO/2bvQQKj8fPCIR+v5pflq1/iPjV5j/yh3ramXjyCwgiw/tE3eMt9SBatNH7Hib60Rhw6f0u2D1XmnqfO+oi2TMDn8Mb6DYUJIs5JV+oLAa/0ZkO+BArtJINrjzMOzuciew4DcoQbmkU3MV5K+TlhtHnMOur1JVXqpgJYE0JTc4MwVLObQuKMoDBU7mTP4oV7s5OHANEn95+XmQg9l X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13015025)(13023025)(5005006)(8121501046)(13024025)(13018025)(13017025)(3002001)(10201501046)(6055026); SRVR:BLUPR0301MB2004; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR0301MB2004; X-Forefront-PRVS: 00909363D5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB2004; 23:KVRn/EHY7pPHELe665/RFm1qDucfm5GZj2Ykq05?= =?us-ascii?Q?SUZuSEiywvYpXy9qxkUJFxIYn05Q9YSFIKlWln962lA+oaTVB6TBZL7DG31l?= =?us-ascii?Q?xY0hEiFMJpYzBzYu36Q5k41jsy7VjNQuGVBfiffMRSN0D6D5aveBEFbsvs28?= =?us-ascii?Q?N5KTiCKvstLdgac+vIgEjo76KFoTKnJIevghJD9g1wibMlb8OZTCv2o8+r7c?= =?us-ascii?Q?okJw3BYYFgv2aBLrbB+SczeO4JkwwNB9par5hPAGOtKWH0kwGgAKKqZoTlHA?= =?us-ascii?Q?pd7wt7fUG5rxjEHW8m0NzhxKwJY6rnQHELa9WZjTQ0wjylFxyVbXDC2B7XWB?= =?us-ascii?Q?LR57mc27KDUNmbqvRpG8GBD0gDkJnfCOGJyMSnKOdziXcP6omlRZswAtk/Wa?= =?us-ascii?Q?hOic/mLVQ/n+yA1q6Vzq3qeuBWsX4yaaVUamDjdfGiFYp9spNk70y3fzggtO?= =?us-ascii?Q?MDvtcFhoxVIYl22UFGD8IiOLGYi5PjhjFGA11ILoew5jBKVkdufGWvHIm4fN?= =?us-ascii?Q?AlHYiV/1x7ZKEH5qaGV7g47JkQ42qP6lCMSFZpuCroZAjZMKkyHmWQNQnIb4?= =?us-ascii?Q?iGgh/hC8I4aDT3GTvH8S/LZPTouegDN5ei4SLp8poBeV/n481eujhnN+gVCc?= =?us-ascii?Q?Dt+jzC4zgsUZXOGzM3uRSd7jUKlnB0tbLtdld80gs5D2eT17hKeSdGKDqY4+?= =?us-ascii?Q?vMWAXTlFY1K66VsY8/yPCQ+m7oQXySyIvdh6d3saOxvfYaHqCDeGmZnk7QLF?= =?us-ascii?Q?JvDSr9j/Z1NDqCUYe5einCNG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 24:ccnTOnzGgsbk48encqGCbLCQS91qoMKcNyZW+lEQOLSLrXea65nFLze0Db2x+Ys7bp8/NfaG1uop038Rc0CIOPSopPu/ztG2yj9oUTM2+0c=; 7:JqeMa0L1LpVHP+4v5G7D7Im1zBcrQ981C27wOw6PFAPBHFfCaTz4aonSaFHCBPP5ZlwyE+0bgoNU3s+kklnwzCy7jfg018W+0erJ/PjiN07aSzSLdL3/iAG6USEp7NAEYjpU51ohs34gO6ZzlJxSkWsW6aqwdivBeNYDMkNxjJm+K/8U6mMj5dm1Ie6oFm2eKqLjk51j6CzObpAqgeBEENPbEvxh0txN7fnfCy5c43W+WN1daQcmGF80oj1DxZxcKC4KO1FBF8lEPAaZ6sVY9e+nGrcnqYYPJ+Ssj4OKD8REFi9WwRGEYyxxug7PM1sY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2016 09:09:58.0788 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB2004 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161009_021025_686718_57E99D57 X-CRM114-Status: GOOD ( 15.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tang Yuantian Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tang Yuantian Ls1046a is a new introduced soc which supports ATA3.0. Signed-off-by: Tang Yuantian --- drivers/ata/ahci_qoriq.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index 1eba8df..9884c8c 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c @@ -46,11 +46,13 @@ #define LS1021A_AXICC_ADDR 0xC0 #define SATA_ECC_DISABLE 0x00020000 +#define LS1046A_SATA_ECC_DIS 0x80000000 enum ahci_qoriq_type { AHCI_LS1021A, AHCI_LS1043A, AHCI_LS2080A, + AHCI_LS1046A, }; struct ahci_qoriq_priv { @@ -63,6 +65,7 @@ static const struct of_device_id ahci_qoriq_of_match[] = { { .compatible = "fsl,ls1021a-ahci", .data = (void *)AHCI_LS1021A}, { .compatible = "fsl,ls1043a-ahci", .data = (void *)AHCI_LS1043A}, { .compatible = "fsl,ls2080a-ahci", .data = (void *)AHCI_LS2080A}, + { .compatible = "fsl,ls1046a-ahci", .data = (void *)AHCI_LS1046A}, {}, }; MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match); @@ -175,6 +178,13 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv) writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC); break; + + case AHCI_LS1046A: + writel(LS1046A_SATA_ECC_DIS, qpriv->ecc_addr); + writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1); + writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS); + writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC); + break; } return 0; @@ -204,9 +214,9 @@ static int ahci_qoriq_probe(struct platform_device *pdev) qoriq_priv->type = (enum ahci_qoriq_type)of_id->data; - if (qoriq_priv->type == AHCI_LS1021A) { - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "sata-ecc"); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, + "sata-ecc"); + if (res) { qoriq_priv->ecc_addr = devm_ioremap_resource(dev, res); if (IS_ERR(qoriq_priv->ecc_addr)) return PTR_ERR(qoriq_priv->ecc_addr);