From patchwork Tue Sep 16 00:47:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 4914411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9EBF79F32F for ; Tue, 16 Sep 2014 02:33:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9151220222 for ; Tue, 16 Sep 2014 02:36:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5901D20272 for ; Tue, 16 Sep 2014 02:36:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTiaa-0002q4-TL; Tue, 16 Sep 2014 02:33:56 +0000 Received: from mail-bn1bn0109.outbound.protection.outlook.com ([157.56.110.109] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTiaX-0002nY-F9 for linux-arm-kernel@lists.infradead.org; Tue, 16 Sep 2014 02:33:54 +0000 Received: from BLUPR02MB018.namprd02.prod.outlook.com (10.242.191.25) by BLUPR02MB501.namprd02.prod.outlook.com (10.141.82.13) with Microsoft SMTP Server (TLS) id 15.0.1029.13; Tue, 16 Sep 2014 02:33:31 +0000 Received: from BY1PR0201CA0008.namprd02.prod.outlook.com (25.160.191.146) by BLUPR02MB018.namprd02.prod.outlook.com (10.242.191.25) with Microsoft SMTP Server (TLS) id 15.0.1029.13; Tue, 16 Sep 2014 02:33:30 +0000 Received: from BN1BFFO11FD025.protection.gbl (2a01:111:f400:7c10::1:124) by BY1PR0201CA0008.outlook.office365.com (2a01:111:e400:4814::18) with Microsoft SMTP Server (TLS) id 15.0.1029.13 via Frontend Transport; Tue, 16 Sep 2014 02:33:29 +0000 Received: from atltwp02.amd.com (165.204.84.222) by BN1BFFO11FD025.mail.protection.outlook.com (10.58.144.88) with Microsoft SMTP Server id 15.0.1019.14 via Frontend Transport; Tue, 16 Sep 2014 02:33:28 +0000 X-WSS-ID: 0NBZ33N-08-TSU-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 26375BD88E4; Mon, 15 Sep 2014 21:33:22 -0500 (CDT) Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 15 Sep 2014 21:33:34 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server id 14.3.195.1; Mon, 15 Sep 2014 22:33:25 -0400 From: To: , , , Subject: [PATCH 1/4] ata: ahci_platform: Add ACPI support for AMD Seattle SATA controller Date: Mon, 15 Sep 2014 19:47:23 -0500 Message-ID: <1410828446-28502-2-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1410828446-28502-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1410828446-28502-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(85852003)(62966002)(20776003)(77096002)(106466001)(87286001)(87936001)(86152002)(89996001)(31966008)(83322001)(229853001)(53416004)(76176999)(85306004)(105586002)(2201001)(33646002)(101416001)(86362001)(97736003)(44976005)(48376002)(68736004)(93916002)(99396002)(90102001)(50226001)(50986999)(102836001)(92566001)(36756003)(92726001)(47776003)(104166001)(21056001)(88136002)(83072002)(77156001)(107046002)(84676001)(4396001)(76482001)(19580405001)(19580395003)(74662003)(74502003)(81342003)(81542003)(80022003)(79102003)(95666004)(77982003)(46102003)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR02MB018; H:atltwp02.amd.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:;UriScan:; X-Forefront-PRVS: 03361FCC43 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:; X-OriginatorOrg: amd4.onmicrosoft.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140915_193353_653274_7C6FC6B7 X-CRM114-Status: GOOD ( 13.70 ) X-Spam-Score: -0.2 (/) Cc: mark.rutland@arm.com, arnd@arndb.de, graeme.gregory@linaro.org, marc.zyngier@arm.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, astone@redhat.com, grant.likely@linaro.org, hanjun.guo@linaro.org, Suravee Suthikulpanit , Sudeep.Holla@arm.com, olof@lixom.net, jason@lakedaemon.net X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Suravee Suthikulpanit This patch adds ACPI match table in ahci_platform. The table includes the acpi_device_id to match AMD Seattle SATA controller with following asl structure in DSDT: Device (SATA0) { Name(_HID, "AMDI0600") // Seattle AHSATA Name (_CCA, 1) // Cache-coherent controller Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0xE0300000, 0x00010000) Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 387 } }) } Also, since ATA driver should not require PCI support for ATA_ACPI, this patch removes dependency in the driver/ata/Kconfig. --- drivers/ata/Kconfig | 2 +- drivers/ata/ahci_platform.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index e1b9278..f2e6c9e 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -48,7 +48,7 @@ config ATA_VERBOSE_ERROR config ATA_ACPI bool "ATA ACPI Support" - depends on ACPI && PCI + depends on ACPI default y help This option adds support for ATA-related ACPI objects. diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index f61ddb9..3499bab 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -20,6 +20,9 @@ #include #include #include +#ifdef CONFIG_ATA_ACPI +#include +#endif #include "ahci.h" static const struct ata_port_info ahci_port_info = { @@ -87,6 +90,13 @@ static const struct of_device_id ahci_of_match[] = { }; MODULE_DEVICE_TABLE(of, ahci_of_match); +#ifdef CONFIG_ATA_ACPI +static const struct acpi_device_id ahci_acpi_match[] = { + { "AMDI0600", 0 }, /* AMD Seattle AHCI */ + { }, +}; +#endif + static struct platform_driver ahci_driver = { .probe = ahci_probe, .remove = ata_platform_remove_one, @@ -94,6 +104,9 @@ static struct platform_driver ahci_driver = { .name = "ahci", .owner = THIS_MODULE, .of_match_table = ahci_of_match, +#ifdef CONFIG_ATA_ACPI + .acpi_match_table = ACPI_PTR(ahci_acpi_match), +#endif .pm = &ahci_pm_ops, }, };