From patchwork Tue Dec 8 00:16:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loc Ho X-Patchwork-Id: 7793031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B2F85BEEE1 for ; Tue, 8 Dec 2015 00:18:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D5DF620570 for ; Tue, 8 Dec 2015 00:18:52 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 169102056E for ; Tue, 8 Dec 2015 00:18:52 +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 1a65xm-00079s-7T; Tue, 08 Dec 2015 00:17:02 +0000 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a65xZ-0006ye-DC for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2015 00:16:51 +0000 Received: by pacej9 with SMTP id ej9so2051238pac.2 for ; Mon, 07 Dec 2015 16:16:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WozVPtNROKeQxNsNg5YSKdFmRRfjOARVBmTBxLWuIcY=; b=kLf+1waDfZgznQfg/kaWtWLL9SicvyVsmOdBuoxv+To/SyBPAPUQ/PNEXK8nZSn/F0 hmcork+fGBYLW0ziogF4gHG5cRMBYMxIKgVvmZOkHRtwDIGY+sjQAbNJLgSPQBWMo4Qm 3NfocZ8kKG2laImhnRYeF7BrIITd8e56Naaa8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WozVPtNROKeQxNsNg5YSKdFmRRfjOARVBmTBxLWuIcY=; b=kxIe+tIv9n4QXOD6Jv6db2r0lgGSLIvwaHnxCSF8Eu1n09XTFZn4gCERBH3K4uEG/F Gu4ySQUvA1Uct3k9GKa0PIMlp3OL+QkUOCE0xGFb7WsIHR5NchXvTZhHsJ7W5RZRr9iy 5dWLi4Km/ZAg0zKRgFWCVE26VoB5Zk98/w4fLNv5iJ48HepayCdr3dMJDOpxbq+eBKiZ uBDwbxmchPSuU1oxDF3ZG7UwaWdI5LE3Ug5ZEZheOhnJRonvUDFlXOoTFxxBoOyTbykk rNZhll5+2RfZwnxDjm4k9Up18QwWgcMP4n5c2R9g38lGOivsVYUsBw/mZJ5LCZbp/j/I Jiew== X-Gm-Message-State: ALoCoQkEz3e0Jd//UuYT2NGa+xZEpYJ1RSMB1gLU4xtASm1EZpV2DyhQM1lCimMD/THOrg4BfmJ4FNhHhiMbE7AIOw39Tj80Gw== X-Received: by 10.66.234.133 with SMTP id ue5mr843538pac.56.1449533787236; Mon, 07 Dec 2015 16:16:27 -0800 (PST) Received: from localhost.localdomain ([198.137.200.11]) by smtp.gmail.com with ESMTPSA id k85sm370585pfb.59.2015.12.07.16.16.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2015 16:16:25 -0800 (PST) From: Loc Ho To: wsa@the-dreams.de, Ken.Xue@amd.com, Jeff.Wu@amd.com, rjw@rjwysocki.net, mika.westerberg@linux.intel.com, lenb@kernel.org Subject: [PATCH 1/2] acpi:apd: Add APM X-Gene ACPI I2C device support Date: Mon, 7 Dec 2015 17:16:13 -0700 Message-Id: <1449533774-22672-2-git-send-email-lho@apm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1449533774-22672-1-git-send-email-lho@apm.com> References: <1449533774-22672-1-git-send-email-lho@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151207_161649_670966_F5EB66DA X-CRM114-Status: GOOD ( 14.27 ) X-Spam-Score: -2.7 (--) 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: jcm@redhat.com, patches@apm.com, linux-acpi@vger.kernel.org, Loc Ho , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org MIME-Version: 1.0 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Add APM X-Gene ACPI I2C device support by hooks into existent ACPI apd driver. To fully enable support, require another patch to add the X-Gene ACPI node into the DW I2C driver. Signed-off-by: Loc Ho --- drivers/acpi/acpi_apd.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index a450e7a..6a9cb8d 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -51,7 +51,7 @@ struct apd_private_data { const struct apd_device_desc *dev_desc; }; -#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE +#if defined(CONFIG_X86_AMD_PLATFORM_DEVICE) || defined(CONFIG_ARM64) #define APD_ADDR(desc) ((unsigned long)&desc) static int acpi_apd_setup(struct apd_private_data *pdata) @@ -76,6 +76,11 @@ static struct apd_device_desc cz_i2c_desc = { .fixed_clk_rate = 133000000, }; +static struct apd_device_desc xgene_i2c_desc = { + .setup = acpi_apd_setup, + .fixed_clk_rate = 100000000, +}; + static struct apd_device_desc cz_uart_desc = { .setup = acpi_apd_setup, .fixed_clk_rate = 48000000, @@ -135,6 +140,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = { { "AMD0010", APD_ADDR(cz_i2c_desc) }, { "AMD0020", APD_ADDR(cz_uart_desc) }, { "AMD0030", }, + { "APMC0D0F", APD_ADDR(xgene_i2c_desc) }, { } };