Received: by 10.192.165.156 with SMTP id m28csp682522imm; Thu, 19 Apr 2018 05:58:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx492OoIcIYXvZ9EyKPuQuspP710K1h4+y7LvzkVefPW7cKJcZaMiqwV3lmJyqb5TSERGZ7IF X-Received: by 2002:a17:902:5602:: with SMTP id h2-v6mr2943967pli.115.1524142725979; Thu, 19 Apr 2018 05:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524142725; cv=none; d=google.com; s=arc-20160816; b=b6jYNSkxT97S880OfRVAxIRASyMDklH31UwG5DDh/jY1CJj7uGUyRD04fBBCSyT3CG BbdOivO2wX4FWps0f7BoHE8ZoVuV6jm2chv+gDCfwhqUdQ0yCp142OoC6Na+YJCBHjLl 1YVG/AvWmYrI5yZy8b1CtlegbBIhN5N4eS2ONs9ALt7lcsCxWTqSc0oad3okTLniWjR5 XdBpwADz+yYe4fOr4nTc1qcCvO40ABtpqHKHgA7CGgHzELr7SIyxLyIAdihHOiA9R8Cd 2N86/GB3zfDHoUrgStAtl4SKakHtip7p8pzd5bKFq0U+rb4kT0+Z08IkWZhTg5XwEObS Xv2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=OMw1+a9MY5rR5hFU3AhusYzbI4C77nbtZIXLaJ8h1gY=; b=UEdXULRGPw/vcxJt0/10eoD7vH8KdyNY2YGQ1X/7RpJAK6fRWWcV2tcntIT12K3CIS VwyTbY1SdWdp1LnIg+O5aGCAC25wy0Fy2knbHxfo0geuomhS3Zt0x+W10PAHzwlGf4uY 9YF58zOzkX/39rUut/PUv5RnmtFBKQpsVMqWP9o1T6liCzraonFxsv8Ow5GP4qThTCi+ jfkPWjzYV0k3voBszd58t6PjiVyk/qbtlpuGzpb+QExuHW7zS+4xSKJYJFKZdsmEL3z4 n5W6XYOKt1k/yjo939XC2FagTmSkjCIJPRhRsNZCpl+pd93Pl24Kyktmn9Kx7brQX7mm QHsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=biIcjjAh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si376342pfm.226.2018.04.19.05.58.32; Thu, 19 Apr 2018 05:58:45 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=biIcjjAh; 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 S1753186AbeDSMnF (ORCPT + 99 others); Thu, 19 Apr 2018 08:43:05 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:45893 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbeDSMm6 (ORCPT ); Thu, 19 Apr 2018 08:42:58 -0400 Received: by mail-ot0-f193.google.com with SMTP id w4-v6so5635319ote.12 for ; Thu, 19 Apr 2018 05:42:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OMw1+a9MY5rR5hFU3AhusYzbI4C77nbtZIXLaJ8h1gY=; b=biIcjjAhNiVZctvd34jPNKq7cdt431IhKD0iJJimQ5wkfHDhHmx0qkDta0S+87gmOQ 8GOBbu4D9GresukTX4k1TitRyY3ImkXt3CbqM4uH4GqvWx2KWJ8LyNwASxShV4wirX5q NuzaYR0yoIdkHJiWDgO3le2i82Y4Q0p5u9BtOR+Ohq6nlJ4oRBJR1mLF15xxBtrKgw1V IVbAOL4gtf1xcqsWzdifC+COgUbP6r3vrnPuHEvRwo3Xlsph+P619lEDkKwBeEi8PRPr H00Jjkap4kRZfB6+epj+ZPJlH/AbIj3zpI4L0qKr7EGK7BJsD9za6EYoRDlEoREkYepn YknA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OMw1+a9MY5rR5hFU3AhusYzbI4C77nbtZIXLaJ8h1gY=; b=nIOqyYqieYzySU2UigxJ0wSEm2m3M7sL7o1iM1FGJ356K5hBFmNxyFaEdzMvY3Patf c75bK7rXXCWRiOAVmwubIJaBIjUcFcpP0jKamZvlp2Gnvigi7qWdwVX2svltuyI3lfBA H9eNjHlK/0jg1ehITNkuWmVPUlEa6Kfo6lGE5/0m5bEivrDd5z+Ndq/a6BhN6q/swo+n iPj5kvwMj5wU6U9TKkXpmRKpuVkEQnvIU+0ukZRSAP9xyvPeJLfqF4e5Ks3jL2LaVIMR qrBYCnID88VBoF9IYdVe79jEYJXsKvxMKRQIvG5uHsHBRYx9FuXHTspTf5XY4Zkhaif1 6rWQ== X-Gm-Message-State: ALQs6tAQa25+uH+ajXPE29RdWEkBRq8FmkUkqsvCTb+eAL6WPBLwmom8 GqYRln8VYNUpnHeqvf1+q/Lb9d3kplsemUJFGXXVb7tD X-Received: by 2002:a9d:51c8:: with SMTP id d8-v6mr4108661oth.348.1524141777425; Thu, 19 Apr 2018 05:42:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.201.46.141 with HTTP; Thu, 19 Apr 2018 05:42:56 -0700 (PDT) In-Reply-To: <15d56b6d-6546-0655-563e-4492982c8d78@ti.com> References: <20180418153552.14632-1-brgl@bgdev.pl> <20180418153552.14632-3-brgl@bgdev.pl> <15d56b6d-6546-0655-563e-4492982c8d78@ti.com> From: Bartosz Golaszewski Date: Thu, 19 Apr 2018 14:42:56 +0200 Message-ID: Subject: Re: [PATCH 2/2] memory: aemif: add support for board files To: Sekhar Nori Cc: Bartosz Golaszewski , Kevin Hilman , Santosh Shilimkar , arm-soc , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-19 14:09 GMT+02:00 Sekhar Nori : > 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 Yes, it should. It only worked because we're using a single config entry. Thanks, I'll fix it. Bart