From patchwork Tue Sep 9 20:37:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 4872841 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 CF36D9F32F for ; Tue, 9 Sep 2014 20:40:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3A3E20179 for ; Tue, 9 Sep 2014 20:40: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 D660E20172 for ; Tue, 9 Sep 2014 20:40: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 1XRSAh-0007CG-Dd; Tue, 09 Sep 2014 20:37:51 +0000 Received: from mail-bl2on0132.outbound.protection.outlook.com ([65.55.169.132] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRSAe-00078d-9n for linux-arm-kernel@lists.infradead.org; Tue, 09 Sep 2014 20:37:50 +0000 Received: from BY1PR0201CA0012.namprd02.prod.outlook.com (25.160.191.150) by BY2PR02MB044.namprd02.prod.outlook.com (10.242.44.27) with Microsoft SMTP Server (TLS) id 15.0.1024.12; Tue, 9 Sep 2014 20:37:24 +0000 Received: from BN1AFFO11FD030.protection.gbl (2a01:111:f400:7c10::102) by BY1PR0201CA0012.outlook.office365.com (2a01:111:e400:4814::22) with Microsoft SMTP Server (TLS) id 15.0.1024.12 via Frontend Transport; Tue, 9 Sep 2014 20:37:23 +0000 Received: from atltwp01.amd.com (165.204.84.221) by BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server id 15.0.1019.14 via Frontend Transport; Tue, 9 Sep 2014 20:37:23 +0000 X-WSS-ID: 0NBNIM8-07-36G-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 atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2F1EBCAE67F; Tue, 9 Sep 2014 15:37:19 -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; Tue, 9 Sep 2014 15:37:23 -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; Tue, 9 Sep 2014 16:37:20 -0400 From: To: , Subject: [PATCH] ata: ahci_platform: Add ACPI support for AMD Seattle SATA controller Date: Tue, 9 Sep 2014 15:37:15 -0500 Message-ID: <1410295035-14471-1-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019018)(6009001)(428002)(199003)(189002)(77096002)(21056001)(77156001)(48376002)(50226001)(50466002)(99396002)(4396001)(53416004)(33646002)(76482001)(77982001)(46102001)(79102001)(50986999)(90102001)(95666004)(62966002)(102836001)(104166001)(87286001)(19580395003)(74502001)(84676001)(229853001)(101416001)(105586002)(107046002)(106466001)(81342001)(80022001)(44976005)(64706001)(36756003)(47776003)(97736003)(89996001)(20776003)(81542001)(87936001)(74662001)(93916002)(19580405001)(83322001)(92726001)(83072002)(85306004)(85852003)(86152002)(88136002)(86362001)(68736004)(92566001)(31966008); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR02MB044; H:atltwp01.amd.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 0329B15C8A Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; X-OriginatorOrg: amd4.onmicrosoft.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140909_133748_558968_0655C47B X-CRM114-Status: GOOD ( 13.95 ) X-Spam-Score: -1.8 (-) Cc: linux-ide@vger.kernel.org, Suravee Suthikulpanit , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org 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=-4.4 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 support for non-PCI SATA contoller in ahci_platform driver. It adds ACPI matching table in ahci_platform to support 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 } }) } Since ATA driver should not require PCI support for ATA_ACPI, this patch also removes dependency in the driver/ata/Kconfig. Signed-off-by: Suravee Suthikulpanit Acked-by: Hans de Goede --- 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, }, };