Received: by 10.192.165.148 with SMTP id m20csp455569imm; Wed, 25 Apr 2018 02:16:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49mLbLHEsqJhfVg51RySQ63AP8pwMCKleFVfaEKyxHq0174PcfC1u4UzAfqTdVw0TpiIdN3 X-Received: by 2002:a17:902:584:: with SMTP id f4-v6mr28174583plf.290.1524647780171; Wed, 25 Apr 2018 02:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524647780; cv=none; d=google.com; s=arc-20160816; b=lwvZo9sHuSTSmtUpIGQrR8+AggQBTbEa2/6IbLXkddFsYJCywxMqL019oxWKyGNVrC XHFsIYhKnc0ycg1eFKcvztqiOMseugvcd+bfn7Ovdz6t3ecuB+CpKSrrqZqtooQFSyUV /woi2lXSEsx6L4sqkS18SHmnwqp9aOwx6d+nCd9TgTtVOy/RWgg+vlAM6/lMSuUUy6+6 snDWLhJzSJJmzV5RmMNLmtdUJRLehuWgMlwEo3vZ7i8oR54jaHsqcL6V+qaMPEt4diiS TACmz6A44mzpEdRCd2vQYbtShALHT8hqshq6gkETUF9zHyRjn2PNBa9Dd3o9glRFnPfN w0Ng== 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=jKatkEFKuGP4tIaxC295mPNO+NwTqFDI+uvsqwPNILA=; b=dI/7ufE4HLz5PT9jV/sTEeB/uPpj/FEwFCWMKM9Sp1oanmJDL3+U4plQSM3QSmpOPR g7yC6Nf8fsZ7e2jfl9yR5TRyzZV0AX01jCiFW4LaULgvuIByXkDZThIz2WF8Bai484LE VMfB+IY/5ZWGja1OPTs0HKaBdCyjBfCxdojE0cvsM8uxGZQXx8LRcPVNjOy1emZpGQes q/nBkJ0z+ifpHKI+cBR/LxDIWaOzlk9HO6f59yhBDUTeL+7QVV9L/u3A1K+aDcafRJ5q OBCHb+1TptFAEiAbdYjYJ93JpVLzjEYUgEPsEn1yo29/GaxINB3x8R3d2J3OAeyaFRiv Tjiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=w1p7Pfrz; 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 d29si2446150pfb.232.2018.04.25.02.16.05; Wed, 25 Apr 2018 02:16:20 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=w1p7Pfrz; 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 S1751928AbeDYJO5 (ORCPT + 99 others); Wed, 25 Apr 2018 05:14:57 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:54698 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751247AbeDYJOw (ORCPT ); Wed, 25 Apr 2018 05:14:52 -0400 Received: by mail-it0-f65.google.com with SMTP id h143-v6so19117621ita.4 for ; Wed, 25 Apr 2018 02:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jKatkEFKuGP4tIaxC295mPNO+NwTqFDI+uvsqwPNILA=; b=w1p7Pfrzw8o1Um3gZUdF7i32IdO8vTv7+TXK+wM/jZKYwhr8zK1wA9L3orfeoddXlz CFm5FYpLOsz3Qn8Ieue4kTvXPqzVaMXVvKpspQJ6PdaS5L/GKxPf+jtcAQ/8/4rUw+CM AB707IwngV2SV7s9zOUd/gaPMjGm7acl5sTgBbj72n3skmM6ddOCvPBItgaS/7WNgpvB l5s7KTOuj8EZZw2U/gT+BKuWOGRDALO/rxJk6E9D0Bpsb4idPC38eWCXnyJYEE/oBjvb MlAGa0DZRfzZiVjRs4vgvjIZZJEr4zae1F4Ert2rzv6R+W+Pt+agyUE9QO00DHDXEU8s mzFQ== 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=jKatkEFKuGP4tIaxC295mPNO+NwTqFDI+uvsqwPNILA=; b=sW2Tzow8vzKBUxLkamHnf2yZtEHkbCiskqIIVZRh4hrNZC7MYDIkseCADgX7aHPW6G tr6GPhDtQshjMsdudQbrZqhGtcEsLO6L7VWB/Vt41mspTmRBgIV028J90WEIQZh3CDr2 1Cn1KfPeqqaKAJx78N1B0C3U3CDAObkwpuoQ+pVPQnFJOSHr0OpDEstnSlFSGdEyDf65 fA3tXcpNMqpYVJmGJQFjde8ZSqv3tt57AEruSJNfaklUBp2CvGVzuBR4RJfkZ/S4pbTT FeVRtf5YuRSSb4ReBQ27Av6iKGe1SEOA32QJ5L7oOftw9POTOmbKlnIW1kKZE6Z9wE7e e0vQ== X-Gm-Message-State: ALQs6tBqrY3egkcfPWbhXJuHydFP01p8WY2LjitnblhttK2biG8e3eQA MylXzjr0SMDYNTg8aOaWUgRFW1dJPjw8ACwYD6oEsg== X-Received: by 2002:a24:b310:: with SMTP id e16-v6mr19123228itf.58.1524647692099; Wed, 25 Apr 2018 02:14:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.1 with HTTP; Wed, 25 Apr 2018 02:14:51 -0700 (PDT) In-Reply-To: References: <20180417102917.7794-1-brgl@bgdev.pl> <20180417102917.7794-4-brgl@bgdev.pl> From: Bartosz Golaszewski Date: Wed, 25 Apr 2018 11:14:51 +0200 Message-ID: Subject: Re: [RESEND PATCH v2 3/4] ARM: davinci: add aemif & nand support to da850-lcdk in legacy mode To: Sekhar Nori Cc: Kevin Hilman , Russell King , Santosh Shilimkar , Linux ARM , Linux Kernel Mailing List , Bartosz Golaszewski 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-17 16:09 GMT+02:00 Sekhar Nori : > On Tuesday 17 April 2018 03:59 PM, Bartosz Golaszewski wrote: >> From: Bartosz Golaszewski >> >> We now have support for aemif & nand from board files. As an example >> add support for nand to da850-lcdk in legacy mode. > > Hawkboard is a separate board of its own, although closely related to > LCDK. Lets refer to it as hawkboard itself, instead of "LCDK in legacy > mode". So: > > ARM: davinci: omapl138-hawk: ... > >> >> Signed-off-by: Bartosz Golaszewski >> --- >> arch/arm/mach-davinci/board-omapl138-hawk.c | 132 ++++++++++++++++++++ >> 1 file changed, 132 insertions(+) >> >> diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c >> index 6c997c59a3cd..9c3de56b54e4 100644 >> --- a/arch/arm/mach-davinci/board-omapl138-hawk.c >> +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c >> @@ -16,6 +16,11 @@ >> #include >> #include >> #include >> +#include >> +#include >> +#include >> +#include >> +#include >> #include >> >> #include >> @@ -162,6 +167,129 @@ static __init void omapl138_hawk_mmc_init(void) >> gpiod_remove_lookup_table(&mmc_gpios_table); >> } >> >> +static struct mtd_partition omapl138_hawk_nandflash_partition[] = { >> + { >> + .name = "u-boot env", >> + .offset = 0, >> + .size = SZ_128K, >> + .mask_flags = MTD_WRITEABLE, >> + }, >> + { >> + .name = "u-boot", >> + .offset = MTDPART_OFS_APPEND, >> + .size = SZ_128K, > > Can you make it 512K as it is in da850-lcdk.dts ? > >> + .mask_flags = MTD_WRITEABLE, >> + }, >> + { >> + .name = "free space", >> + .offset = MTDPART_OFS_APPEND, >> + .size = MTDPART_SIZ_FULL, >> + .mask_flags = 0, >> + }, >> +}; > >> +static struct aemif_abus_data omapl138_hawk_aemif_abus_data[] = { >> + { >> + .cs = 3, >> + } >> +}; >> + >> +static struct platform_device omapl138_hawk_aemif_devices[] = { >> + { >> + .name = "davinci_nand", >> + .id = 1, > > Is there a reason for .id to be set to 1 here? Ideally it should be -1, > I think since there is a single NAND on the board. > The davinci nand driver uses pdev->id as the chipselect number. I guess this should be in the platform data. I'll send a patch for that. > Note that I sent a patch dropping AEMIF clock acquisition from DaVinci > NAND driver. > >> + .dev = { >> + .platform_data = &omapl138_hawk_nandflash_data, >> + }, >> + .resource = omapl138_hawk_nandflash_resource, >> + .num_resources = ARRAY_SIZE(omapl138_hawk_nandflash_resource), >> + .id = 0, > > This should have resulted in a double init warning? > It should, strange it didn't - at least for me. Thanks, Bart