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: 7792991 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BB8F79F350 for ; Tue, 8 Dec 2015 00:16:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1651520571 for ; Tue, 8 Dec 2015 00:16:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3412A20585 for ; Tue, 8 Dec 2015 00:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755129AbbLHAQ2 (ORCPT ); Mon, 7 Dec 2015 19:16:28 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33099 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755075AbbLHAQ1 (ORCPT ); Mon, 7 Dec 2015 19:16:27 -0500 Received: by pabur14 with SMTP id ur14so2095369pab.0 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=PMZISRMtB6yodtCqxSoJrGPw6HJ8CRhx2wylQcN+uzBVXYtAqSBfphsVRLcZNWDfJT tISsxikraaUPeoxCgHBnmP5XSelnXoheewAJXvx7Z6llWH7nf5zTYL7U52CaOLXfZPJZ QXkB2Bqj1cakj/XXde2DtTVIeYgaePMIkBKssLvFqqxoBMioEfjf37rEB2TOIMWLHrME WrZp32fxP+eZr2J7pOQpCuUQ05WZHs4TwNWGqp9cuTfn9JJ3a/bzZ5nix7F6cuT8E05R B8drzYwBVzsc6tfvHlLI2VMj+Dc1AhOK2b4sYDX8Nlu58jBLP5FhigLXHoBCBrc5eeEo rz9Q== X-Gm-Message-State: ALoCoQnL0888buHrLy/q+YiqgaCg8m7Ev4bBizyYisQ4dHxgxw0hpJ7sFDfcTcuLwuZltT+8zCBPhn4IISL37bnHTea0BEvQ7g== 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 Cc: linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jcm@redhat.com, patches@apm.com, Loc Ho 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> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 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) }, { } };