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: "Suthikulpanit, Suravee" X-Patchwork-Id: 37152 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 34D3A20566 for ; Tue, 9 Sep 2014 20:37:36 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id p10sf8872739pdj.8 for ; Tue, 09 Sep 2014 13:37:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=4jk1tEA4uC+rDrU4k0DwQpGVPIZD2qA5x+8R8LrvR9s=; b=bmqujMx9WbP8bTM4JF0pvO3te/wB4u/A8X7bDFF4ssWmTei4zpZcMLUFM1JzcGfG3v jhynJ9bcm0d/UK6QBkSwMQymPkOBMpaK3ZjIEKv5fbtPVU0t9oCAk4jJv/AID2GdJYWO 5vfNbXRCELdcWtjs+XELiJ4iFJTyrb5ikG3UVSgYy6PJlIMZfSpJQumr96wVzu/yJ5eY 1JCNxkLVLdiSu7Icot/acz16ipsJo8Kzor4Wetumf/rqGnnsstnPqYrbsAzYEZmr8foC GEYBt0RIE5Eqh2RPmEMuD0dUUKicD6F/kQNk3aYLZYbtJnNEBQzxngNUwIIvOurnpAHx pv8A== X-Gm-Message-State: ALoCoQmtve5hoAUoUnNzOcGbXcYnNDTZNeg+IfJz3ufhHoJWW0I8lRbjulghS8iyOUxwQ4+Suk+f X-Received: by 10.68.219.226 with SMTP id pr2mr14259166pbc.4.1410295055474; Tue, 09 Sep 2014 13:37:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.210 with SMTP id l76ls953824qgd.19.gmail; Tue, 09 Sep 2014 13:37:35 -0700 (PDT) X-Received: by 10.52.87.144 with SMTP id ay16mr11353012vdb.43.1410295055150; Tue, 09 Sep 2014 13:37:35 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id h9si6226473vdk.39.2014.09.09.13.37.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 13:37:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hy4so2989833vcb.1 for ; Tue, 09 Sep 2014 13:37:34 -0700 (PDT) X-Received: by 10.52.146.161 with SMTP id td1mr2137248vdb.8.1410295054925; Tue, 09 Sep 2014 13:37:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp339902vcb; Tue, 9 Sep 2014 13:37:34 -0700 (PDT) X-Received: by 10.66.222.199 with SMTP id qo7mr18005290pac.134.1410295053929; Tue, 09 Sep 2014 13:37:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nj12si223756pdb.178.2014.09.09.13.37.33 for ; Tue, 09 Sep 2014 13:37:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577AbaIIUh3 (ORCPT + 27 others); Tue, 9 Sep 2014 16:37:29 -0400 Received: from mail-by2on0141.outbound.protection.outlook.com ([207.46.100.141]:3811 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752341AbaIIUh0 (ORCPT ); Tue, 9 Sep 2014 16:37:26 -0400 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: , CC: , , , , Suravee Suthikulpanit 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) X-OriginatorOrg: amd4.onmicrosoft.com Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: suravee.suthikulpanit@amd.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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, }, };