From patchwork Tue Apr 15 09:15:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Paton X-Patchwork-Id: 3990161 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 3740C9F2BA for ; Tue, 15 Apr 2014 09:18:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EF0420211 for ; Tue, 15 Apr 2014 09:18:05 +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 5C3132020F for ; Tue, 15 Apr 2014 09:18:04 +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 1WZzTB-0000JW-UO; Tue, 15 Apr 2014 09:15:57 +0000 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WZzT8-00009v-Ht for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 09:15:55 +0000 Received: by mail-wi0-f179.google.com with SMTP id z2so5314763wiv.0 for ; Tue, 15 Apr 2014 02:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=FCyFveHAb+GPkSatli6FjIJ7fyE4gj17OjUnWijI1LI=; b=aNAgLM1o46coSX6mPWrb2WZU/rTSNu832V7Ninp6/MGyXWPXq83h1yO+w4ma6vv5LT UcpkE88dqQPa59WcJ17YVMh1vwuxOwufx7vwnEFer1IZ1sbXWU9jDT6wLNOdvufOsT7t mXQcXTn06Jstz0e2shufWdQ6RtTI7Ip1ihMNGxnEHYsJYabYW2YiDcn3AUSevGBzT17z UGUFzH3dFstyK7rXGnsB+pChcpmWO1YcHbhEUMd9YZW1AlxSXLU7TSNEOtq/vkNfiUZd OZicod+HA3tD1opWlNA/hiQZMKZMJnaVGbZUxHeExJgPFg7ytkVGZIgf3TDmupRDp7DG 18OA== X-Received: by 10.194.220.42 with SMTP id pt10mr663270wjc.60.1397553331567; Tue, 15 Apr 2014 02:15:31 -0700 (PDT) Received: from [172.17.255.60] (host81-138-205-228.in-addr.btopenworld.com. [81.138.205.228]) by mx.google.com with ESMTPSA id km2sm28865972wjb.13.2014.04.15.02.15.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Apr 2014 02:15:30 -0700 (PDT) Message-ID: <534CF8A3.3010404@gmail.com> Date: Tue, 15 Apr 2014 10:15:15 +0100 From: Iain Paton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: linux-arm-kernel@lists.infradead.org, Shawn Guo , Sascha Hauer Subject: [RFC PATCH] imx6: imx6duallite/solo i2c4 clock X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140415_021554_814834_00335A2E X-CRM114-Status: GOOD ( 15.21 ) X-Spam-Score: 0.1 (/) Cc: =?ISO-8859-1?Q?Eric_B=E9nard?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 I'm working on a board using the imx6solo that implements i2c4 and while building the devicetree it became clear that the devicetree fragment for i2c4 in imx6dl.dtsi it's missing the necessary clock. Investigating further turned up that the ecspi5 clock in CCM_CCGR1 on the quad/dual is replaced with the i2c4 clock on duallite/solo. Would the following patch be sufficient to allow correct use of this clock? I'm not familiar enough with the clock framework to be sure I'm not missing something here, but have tested this patch on the board and found it to work. The board is element14's RIoTboard http://www.riotboard.org and I have dts mostly ready to submit for it pending resolving this and a couple of other minor things, and assuming Eric doesn't beat me to it. Iain diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index b0e7f9d..2961b16 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -352,7 +352,13 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk[ecspi2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2); clk[ecspi3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4); clk[ecspi4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6); - clk[ecspi5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); + if (cpu_is_imx6dl()) + /* + * ecspi5 is replaced with i2c4 on imx6dl & imx6s + */ + clk[ecspi5] = imx_clk_gate2("i2c4", "ipg_per", base + 0x6c, 8); + else + clk[ecspi5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); clk[enet] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); clk[esai] = imx_clk_gate2("esai", "esai_podf", base + 0x6c, 16); clk[gpt_ipg] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20);