From patchwork Wed Jan 4 10:36:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 89805 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp8424902qgi; Wed, 4 Jan 2017 02:36:55 -0800 (PST) X-Received: by 10.99.121.69 with SMTP id u66mr120575015pgc.96.1483526215126; Wed, 04 Jan 2017 02:36:55 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si44556003plj.268.2017.01.04.02.36.53; Wed, 04 Jan 2017 02:36:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935048AbdADKg1 (ORCPT + 25 others); Wed, 4 Jan 2017 05:36:27 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36510 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757074AbdADKgV (ORCPT ); Wed, 4 Jan 2017 05:36:21 -0500 Received: by mail-wm0-f45.google.com with SMTP id c85so219359268wmi.1 for ; Wed, 04 Jan 2017 02:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eXzne2Oq1+7qLQs3v59oulpoQVc3ZyQF6u9pnC+kViA=; b=BIU+7Qk7YcZ8/5aSHiyMA1DgEMGmzeMfHHu8+Gis3P3nmIqAyDr9AgclU/XpRID3Vp BTf46aD+AEcswiRvqIhDDT4hM6nwPh4G8oL7/oPjEhrXOMGGt0fe56ni5/JXzvcbPX/j NBK2+lWiBS0vxTlxfNhsyeLyGwCvRjaw2sTFFiElWxRS+/cFVhyq2pdlGbGKZoa8c+98 HGV+9pBL7VN3rmRxX0Lad+SeEutkIWmgE6UgDWVSz6HD1peO2xBbQ2orskVMdPmVN8Qt 9OVfx8Y1+8SqXf/rp9DWAksQMQ+MYPWaK9BMtniWPv8cyydN6ZmOJHTCFJQfg3Es6E3G MmwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eXzne2Oq1+7qLQs3v59oulpoQVc3ZyQF6u9pnC+kViA=; b=QUEJH/QhLtR2bTXu5QuO9oAhv5Qq2SpknGOW5bOl/uGOrqVSJc3Z5CvB1g4pJhCI4C uIPPtljKOJLjb9KEMuOYs4tGEEBqBBBzoE8OSIYoLOqRjGisYi6kH6FwXlDTU+p31Vwy 5UAbUA1bT/fRv18lqOmfpy/psN95gT5ecF6QvOHfCwOETl9ukk2RgfOWtpC1BfAP0D4t wuKus5BiAY1VDWCbmCdvzQ2NRONiatP/3XA++zM6FjJJIFkR1lh9kIIz3ntsS4q3cUTW +cojI0KwAE2EwK/RQVgNsYRRj2XHfI/XcTYqacz3abAJR+FK0rvSmNWTLdIjbfV9y5yj X57Q== X-Gm-Message-State: AIkVDXLezQSltYcHs91ql72aoiZipbyy69+gNMbglIJ5G+476Vfwdk/CP1ymcRT3wR5ywePQ X-Received: by 10.28.51.141 with SMTP id z135mr53318826wmz.109.1483526179625; Wed, 04 Jan 2017 02:36:19 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id k11sm93887812wmf.24.2017.01.04.02.36.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Jan 2017 02:36:19 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Santosh Shilimkar Cc: arm-soc , LKML , Bartosz Golaszewski Subject: [PATCH 2/2] ARM: da850: add the nand dev_id to the clock lookup table Date: Wed, 4 Jan 2017 11:36:07 +0100 Message-Id: <1483526167-24209-3-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1483526167-24209-1-git-send-email-bgolaszewski@baylibre.com> References: <1483526167-24209-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The aemif driver can now access struct of_dev_auxdata (using platform data). Add the device id to the clock lookup table for the nand clock and create a separate lookup table for aemif subnodes. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/da850.c | 10 +--------- arch/arm/mach-davinci/da8xx-dt.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 10 deletions(-) -- 2.9.3 diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 55f6e11..7475f02 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -557,15 +557,7 @@ static struct clk_lookup da850_clks[] = { CLK("da830-mmc.0", NULL, &mmcsd0_clk), CLK("da830-mmc.1", NULL, &mmcsd1_clk), CLK("ti-aemif", NULL, &aemif_clk), - /* - * The only user of this clock is davinci_nand and it get's it through - * con_id. The nand node itself is created from within the aemif - * driver to guarantee that it's probed after the aemif timing - * parameters are configured. of_dev_auxdata is not accessible from - * the aemif driver and can't be passed to of_platform_populate(). For - * that reason we're leaving the dev_id here as NULL. - */ - CLK(NULL, "aemif", &aemif_nand_clk), + CLK("davinci-nand.0", "aemif", &aemif_nand_clk), CLK("ohci-da8xx", "usb11", &usb11_clk), CLK("musb-da8xx", "usb20", &usb20_clk), CLK("spi_davinci.0", NULL, &spi0_clk), diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 9ee44da..06205fe 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -18,6 +19,15 @@ #include "cp_intc.h" #include +static struct of_dev_auxdata da850_aemif_auxdata_lookup[] = { + OF_DEV_AUXDATA("ti,davinci-nand", 0x62000000, "davinci-nand.0", NULL), + {} +}; + +static struct aemif_platform_data aemif_data = { + .dev_lookup = da850_aemif_auxdata_lookup, +}; + static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL), OF_DEV_AUXDATA("ti,davinci-i2c", 0x01e28000, "i2c_davinci.2", NULL), @@ -37,7 +47,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,davinci-dm6467-emac", 0x01e20000, "davinci_emac.1", NULL), OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL), - OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL), + OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", &aemif_data), OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL), OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL), OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),