Received: by 10.192.165.156 with SMTP id m28csp636177imm; Thu, 19 Apr 2018 05:11:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx48S4Xy/SttENj8hMauwEvkVu3mTFHYT0IRfoJSoKTp7nBKwD/ZG7GwsadJI4whCnfglfx0r X-Received: by 10.99.121.76 with SMTP id u73mr5013148pgc.380.1524139907793; Thu, 19 Apr 2018 05:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524139907; cv=none; d=google.com; s=arc-20160816; b=HukKBi7hQ7HCyjITvvcJs8QWHFrP3JSGHS3qc7+y5rvbca6FQqpZGtHDsDIaE0fJVO 5RyuYsnBClEid/ifppbOZN0gc7WTGOxRUE5ZTO4lc8LhY+bYW9IBsLl04AO9plBxePqw cyiYn26JPlwGE2BFD4aToxATsXCp6ZpEEGwcwux5v85yik5I363OVKn0NdxReLtIuCN0 ThEfkf0C4Es46fOYy331uNczr+bA47xKMRtPNB4lGn3IPZEoVQVJg8xpcB+Z9vm8LGzt TG1d80KCoyoTvBho8pJFQpINnZPU1bZ1+paYG1VRPANObQyMxcg0ptDOSuBboqeJKUGs mSbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=2i0PVWhexEg3/719NDmT2duUHlea9678PjzjUwtl0rQ=; b=aN3MgArhvMEy2wvR/3a2DGOtUvGz+uujzb7/EmvOMSt5cTr4B8y/eQZAmUDgpdL/4Z ZXENlvjUZ6byBgNfpCwmZHKhsFqdQ5yuiPjSEp+YD4M8MNOEqKOk78vkxfPeicFp8avc WW+E5sK6oI6GodMxlnm05rybXuJEoYkWil3QlmPOpz+9gXknbK0XAgfDd25+bEdSU5ZE kMBbxGEDVLroaTDrY1fYKArrpTC6NzNZxNvYIEn1+NBrOlJUCD6hjts6RB57QVzN9Y5T 0Fa/1SJp5b30Z3fuWZA4arR+iPwVdGQVwzrW4rhqFw6t9LPE/AObvAsbNYZxrY5cgO/g /kVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=tc6JdFaQ; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si3314520plo.28.2018.04.19.05.11.33; Thu, 19 Apr 2018 05:11:47 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=tc6JdFaQ; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752739AbeDSMJs (ORCPT + 99 others); Thu, 19 Apr 2018 08:09:48 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:41064 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbeDSMJq (ORCPT ); Thu, 19 Apr 2018 08:09:46 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3JC9UFu025819; Thu, 19 Apr 2018 07:09:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524139770; bh=b4vRGtn52yWOiwFDr/4e2FbhZMHy6a+p14lTUP7EUVc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=tc6JdFaQPydKvhQF/paY2Ofdkf5rMn+MF0kksq4Ano86pN/NmHPqUxBo+tXF2uRSn 5UXcC48MqEEone4TgY4xRdTErOcmEs0qbVraraHeTLNKGx5Wgdzv/i0QO1oKFvf02p SQ9CsYNEtYHIJlh2tlo0plA2wdouIWHycyQ3gvhI= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3JC9UYW016264; Thu, 19 Apr 2018 07:09:30 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 19 Apr 2018 07:09:30 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 19 Apr 2018 07:09:30 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3JC9RhX028025; Thu, 19 Apr 2018 07:09:28 -0500 Subject: Re: [PATCH 2/2] memory: aemif: add support for board files To: Bartosz Golaszewski , Kevin Hilman , Santosh Shilimkar CC: , , Bartosz Golaszewski References: <20180418153552.14632-1-brgl@bgdev.pl> <20180418153552.14632-3-brgl@bgdev.pl> From: Sekhar Nori Message-ID: <15d56b6d-6546-0655-563e-4492982c8d78@ti.com> Date: Thu, 19 Apr 2018 17:39:26 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180418153552.14632-3-brgl@bgdev.pl> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 18 April 2018 09:05 PM, Bartosz Golaszewski wrote: > @@ -373,15 +372,23 @@ static int aemif_probe(struct platform_device *pdev) > goto error; > } > > - /* > - * For every controller device node, there is a cs device node that > - * describe the bus configuration parameters. This functions iterate > - * over these nodes and update the cs data array. > - */ > - for_each_available_child_of_node(np, child_np) { > - ret = of_aemif_parse_abus_config(pdev, child_np); > - if (ret < 0) > - goto error; > + if (np) { > + /* > + * For every controller device node, there is a cs device node > + * that describe the bus configuration parameters. This > + * functions iterate over these nodes and update the cs data > + * array. > + */ > + for_each_available_child_of_node(np, child_np) { > + ret = of_aemif_parse_abus_config(pdev, child_np); > + if (ret < 0) > + goto error; > + } > + } else if (pdata && pdata->num_abus_data > 0) { > + for (i = 0; i < pdata->num_abus_data; i++, aemif->num_cs++) { > + aemif->cs_data[i].cs = pdata->abus_data->cs; Since abus_data is an array, shouldn't it be pdata->abus_data[i].cs ? Thanks, Sekhar