From patchwork Fri Jan 13 10:00:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9514961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 034DA60762 for ; Fri, 13 Jan 2017 10:01:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA71028604 for ; Fri, 13 Jan 2017 10:01:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE05A28607; Fri, 13 Jan 2017 10:01:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 845D928604 for ; Fri, 13 Jan 2017 10:01:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cRyfm-00040W-Qq; Fri, 13 Jan 2017 10:01:27 +0000 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cRyfP-0003OP-S2 for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2017 10:01:06 +0000 Received: by mail-wm0-x229.google.com with SMTP id c85so57744033wmi.1 for ; Fri, 13 Jan 2017 02:00:43 -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=dVjfbEskF+r51lOIcm8cjFs4QZw7whkXXZxtBm6DtWj8C3ebmEWg+eSZnQAM7ytsei w7PjWMQU/chQ4rDVXO8BRQXtrhaurJ7Mxsgp7zgq+Qsa2ZgI2eNbm4VweosCk8Bmc9cd D47E9E+R4+BNJNGoK6CkH6d5XgLczUaNhMHK2go7K41TIP951Hzqb/DlzzoT/F92+pOD aPE7X5gX9rvJKjMUI7jVtK5Plbp6woGEQaSQPGhUUnppp/N0o+y4XM/falFpGpwCdhnT FMsHbhrMMgbKu1AUll+zMuQjgY53Ce1ZtqhPlonBeK1cNOrj40hNQAbcC5GInJrxId9S LErQ== 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=HmN0uO51dDj+9CIoYhKZfrZMs90a5F/xPlWsbTijIX4i/3xm6GJsK1xaOPVBj/QXP+ t5BpCtSx27aXDRdz3rjcn3JuU5UIm+4/wv2xpKkFPBWa4DEP5ReJ4thlYFeynea3D8+y 5QhzBaWJjq0S7sZUXmdAl/1xSsvgsn1wPE9OuqpDuqHLT5zW63JcwRxzdG6BQ9VlF30K L1gFDez40a0HGdLN4uCqBSz+/RGuHhrXO7pH3fHXq87RCfYyZ1bu50QAUo3eoBQy1om5 sd4Uv+BH2T7N5kiB653EGgCB6xVRzK9mzGWPxH9RjDKg+uDM8LmEQxHR1ahlD/Kap12E 8gFQ== X-Gm-Message-State: AIkVDXIzqU9E2gfYTbHLT8slMh1zttEDOS7KkJlfcEy13HbGbBk2B0rZOljBjaW/NIUCGeOB X-Received: by 10.28.54.195 with SMTP id y64mr1447499wmh.10.1484301642274; Fri, 13 Jan 2017 02:00:42 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id y145sm3138842wmc.17.2017.01.13.02.00.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 02:00:41 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Santosh Shilimkar , Greg Kroah-Hartman Subject: [PATCH RESEND 2/2] ARM: da850: add the nand dev_id to the clock lookup table Date: Fri, 13 Jan 2017 11:00:26 +0100 Message-Id: <1484301626-30345-3-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484301626-30345-1-git-send-email-bgolaszewski@baylibre.com> References: <1484301626-30345-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170113_020104_060934_C6D51C79 X-CRM114-Status: GOOD ( 14.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , LKML , arm-soc MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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),