Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754710AbcJIKh3 (ORCPT ); Sun, 9 Oct 2016 06:37:29 -0400 Received: from mail-sn1nam01on0050.outbound.protection.outlook.com ([104.47.32.50]:38592 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753578AbcJIKh2 (ORCPT ); Sun, 9 Oct 2016 06:37:28 -0400 X-Greylist: delayed 4657 seconds by postgrey-1.27 at vger.kernel.org; Sun, 09 Oct 2016 06:36:45 EDT 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; From: To: CC: , , Tang Yuantian , Tang Yuantian Subject: [PATCH] ahci: qoriq: added ls1046a platform support Date: Sun, 9 Oct 2016 16:51:04 +0800 Message-ID: <1476003064-47306-1-git-send-email-yuantian.tang@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131204774088591472;(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)(81166006)(68736007)(81156014)(5660300001)(8676002)(305945005)(189998001)(7846002)(8936002)(47776003)(110136003)(2876002)(92566002)(11100500001)(2906002)(229853001)(50466002)(2351001)(48376002)(4326007)(8666005)(50226002)(356003)(586003)(106466001)(626004)(86152002)(5003940100001)(6666003)(85426001)(87936001)(50986999)(104016004)(97736004)(36756003)(86362001)(33646002)(19580395003)(105606002)(77096005)(19580405001)(6916009)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB2444;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD040;1:mmhx/kHUC3XAa1jTwog4lE+URxZpXRb0UZCziS6mw/IkyANVDF7Q9f2TK5YRA5ugKUGzvrImlIWkY6WpH2BXhfTPgniZW7HHAlJTwegA1ulW6S81AlIR6DgAoGkTgH25g/frLsRzRskeNrdN9IMlDcDHuKcLjwOCfRqmQiBLFjCvTa1HZGqOx1Xshe5u00ghbE7cMD4zlB4wk36U3EFFdQuqsaryK1/sPWV2XnhnDn5naRPKLJ7k9sCzpBjH4+7CTFBX7shp5/saKKSO+IEC8dck4oWd6Zm4umowvRmDbS3WKvMHCjnzTSfMPXzlUlXbSS2aIkQeOHooP9lxXL+fOMeDtcTW570zRDnKb++O3Ab55VvfTrBKp/IjWC4PLCMOxMM0eEGE/7pFa1LAnlvOBDNzm/odtEnKPCCADiiwpTUMuCaqdE4n7OPHv7nvNmKKesNhn2M8IZ3uqmn/hUn2/NNh3zc3VBIRr1Y07taXM/QuDX9EYy+5Ruc9n5KRjKsJNwY1eFQj1eOuH0YUFJqTENhzmCyDr3LeDkn+NE1VZQHSL8oOctFEnA/bczlxXzHCWb/jkZGc+piu47MRlVEPJiz9RU0PSnL+pCrYxalb9ct051Xu8kgXfht/66QsWJ/SvImXVRMvBfEIdnuVHJKd7dUfAKtg5iYLS53PnBa7+renUBNDBIZ5Y8cqfuRpQAgvc6npv9GtZ30gyB/9NUCQMCYXRIzHJG7lUtlPUtMHpio= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b3fbfef6-d6b2-4fe9-05ae-08d3f02322d5 X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2444;2:6k5UAVIF+FWNAG9ga4k7fJjZGwGqaqS7SAkczbi2hW9DllcI59ND2oyBpYfZzcJq5EkRHYCPdMBep1Z+FpzlBM/A8zPe8+JWDQxFvI8IMTYc6AcolG4JtiHSHgOyssJKhI07dtyLD8M4NkTG6jP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v6bdw/HxGHlhd2doiry5hYmZYcw2yNjctvGgQrB9DRuftUJXn6xwHqckjwhqx9okQ== X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2444;31:P4kIlKyvTWef/ZHArZd1iD6glHIpPFHfC2r3HukQEkARThN2q73Knbb4VSw8FUSBX+U61R1yGxoy9vo9AjdrJzs0A6oyBrE+7qjSjn8CaAlYkrt2Omma9h2L1WrqEMvnMXOoFtjryCD9IOJht+7fKSPmG0duyLeX/4H8NdGUe7ou0gBat0Q+a90IGkwPbGCGrvxtJq1PZfJWQQ7r5K6ox7yXsi1+6BCQatABQ3WvNX02iC94QOgHqLuISqQqprNY;4:61f0ZT2NR0h2T0DvklRvhbYNDLhpdrIZkc2pmCv0Yyd/qBIqQnQ9WfcX1wnQnYmh7RBlgzslgkvOc8b+fHxKXKyZN+Hw2xdJ42fWsU+mavm6G52LAZnT/0gEMIaYSJwN+Tml4RYgoTH0aLs8LBDbF5AeTvqM94g9ZB/rYg/e7vwGEnrWSfnP39qLJ4xdvDlOhDDZcL7p0t7t1wYKc/nqoK79OxXzEDH5jIa9aXQIaJe7SbG8KRrkY0k2USeeWppnMRCnW4wL1tdX20AenCkmfsfsdtM681900gHGDD67hhKPFFc48IjeAyC2I39oto78cUybSTAbcMzL0FRLZ3SwipwAr2mxlUdv1DMgobmeI5B9uaNCFlT+4skgBI5MhR+o9vgeEK84tY3/6R0hH9iazyGRNeqNwQl31tJuIg0NoNtp/EH1yom25X/v52Jd87G7uAb0lcY7T0D+HKDjTJttKn6hQIQ8D0OOe0Qt8+XLPF1ZA4uwRsARaMmtIVxdcyww+syP/cHLXdfOH+xPQUFbfYo0QPGc7Wm+TW9mgr3jSDFz187077fvamzcdNdLwrdT 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)(5005006)(13023025)(8121501046)(13018025)(13017025)(13024025)(13015025)(10201501046)(3002001)(6055026);SRVR:DM5PR03MB2444;BCL:0;PCL:0;RULEID:(400006);SRVR:DM5PR03MB2444; X-Forefront-PRVS: 00909363D5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2444;23:ddRg/Q/AOthBVAZA3Rt7MEKFGqm9RlvZoRA0eNSRn?= =?us-ascii?Q?dhdKx2VqfKuATT1n3PCbEjN76fB0CQtjThkIET3x/QVpiXrKlZFZq5UCkw/i?= =?us-ascii?Q?H0FEW8ft0Y7m1+jA5wtim17d8qRulauGzVEjPUXr9IWKWSoXG3G3SGHzbnAo?= =?us-ascii?Q?W+fD7YPEAy/vlHkBJtY9NJhcbms/EhH1eUKFAujBH9lKhp06O0pgt2v/LXGN?= =?us-ascii?Q?6DmJaY9Qfy8YhWBC3kaw9043ScuFFzZ9KZ6fwSr3e07uFE4LzPTl23cDBLcx?= =?us-ascii?Q?83FGNRxzUM9tfc4sXjCJuDbKHRKPfBD3gcpqy2AL2LcvIOiA9GVNTdCPdBqZ?= =?us-ascii?Q?6n7rvWC+iCuKVj529dCwAWGlVQCslSe3uEg/V+VY6/8wyNJEo7BhwFo5mfTz?= =?us-ascii?Q?Na4esOVbUaU2jES1+GWSMAV6zbMlwWrdlaXNLbCXfdFrqRkh3LRHfWluCeka?= =?us-ascii?Q?xdkktns8iHnJzVRqiojE+R6YrkVUTVGAQA7Urz8wrogWBafBburh/DUCx9y0?= =?us-ascii?Q?YlQTPxYrTp3boiFFPeyj8YnyPh2dwIx6MrcJ+KgBkne/sR23YTnQAa8m8a3c?= =?us-ascii?Q?NixQBaQhF9uSanllrr8vje3riSfBHkBYAc1sNLoj1779IPa1TrkluaOBrhbm?= =?us-ascii?Q?RPeem56t5AS6+kfZrppt87npYuKQ2MNkvFS9wUmcpVJqNNpcD7mgiOxkb07Y?= =?us-ascii?Q?wGYMfzDcr/8TzFXrsWPaT0LWyX4TGUx5Xu/6dL7J1OihrKZ8ZhZcK4bvAERY?= =?us-ascii?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vRraLR4GVUvv8QInj4wIXcfN7DxEAI;24:HsLT4xU3ewKStkuKFNJX8Xa+y49fGojo/Ii5qneyswjTBWOasg1yzBPAyrGTY0y3kwT5wfJeDuLcUFcchcJW62nmdu28TS2hyO+Y5RiKQIM=;7:7Kko1CplzjXHs+SXT1mW9tCXleaI+PJuz8hr/boitNaooP63o5WjuvUtrMsx0XRV7//Po5yn+uzRr01+xjr/cE4LFv0vnYmLwnXDIPr28enoxIs0GyzDxAYXqycUbteN1/HO8TsIrzzJ2VVnuMYmHlyUA+7bXsNKAlIoTDfwbpgPvaZb4h9rYNJYYPdNYfih49djTPS5OK4jJZhhmNK3Ou9BP59w16YgrgFtlHddahJnsQNQQlAeoj/Z4RxA8PI+v13LjR4w0Gi5NEfkwSGHRhTBDdZek1wixw9pKVHo3LqPJCRgi7cSg4CeZq0zO67C4OmW+GgFTPKyrm1Qg6iMkg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2016 09:03:23.6955 (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: DM5PR03MB2444 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2053 Lines: 64 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); -- 2.1.0.27.g96db324