Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2479320img; Sun, 24 Mar 2019 09:49:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCRP3CUvuExHkjsiIJWKUGTns3z49aXYIp1jWfvrO5LVlvNbP5mUAdj5aaYWILsuxxp7kD X-Received: by 2002:a63:c149:: with SMTP id p9mr18662267pgi.362.1553446159447; Sun, 24 Mar 2019 09:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553446159; cv=none; d=google.com; s=arc-20160816; b=L6Yah22vRxBINvpiM6CLHoeloR1pMYiFQz3LJeLBtWB2G5ipCagMRtBeDnScIa6u3j +lFs592drhGBF2ubZTVyt/x0Q5duqrK3oLze5cz9lW5NOZPJ3LtKI1uVP5Kj7Z3X7bjw s1WN4ecpiPPrmPy4ATQQ6uAQOsmn/QpVHHqUSmX+Hf1Qlq34tlmb4GKnfMMnPi2Kqw/n bKO7zT0b3hJbUntiXWeeV1f4IAGbu8/J1eoB/POQD+KvpOqqvOu7gsYiuuqKy5Ezewz+ E/u9kyGFgXPBNU8l+n6OzgigjArjGIXvNFxhwHSYY1wCWt2mx4ZuuScVAPjp4monz/0Z m45g== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b1U9n/t18wnXKhRjLFYD2gjH0o+xCH9hI2JLlh3jrEQ=; b=u5JoaYi9qlevhu/SF5ipoohs67PEBSkbamZWlRlRp81gc0mNZqTAm3SMMhmR+zibx4 9bfUAPJTC4m/THJeamiAD4cLdydnT+tse6A0ww4KnOOcDX0TCG0EGuWQZVUDP2j/wxG9 IPgOgSJ5hyLzWAqCgQDccb6YBSfV5AfJTQlRrNofMzMZofFxiCCrdZi2B8AixiE/5D0h J0mlEZqSAH4P9azUburvp0gpz27rHCdw9bc6jUyej90d8dtevu+2XZA90Nwwjw1LiXV3 xGR6KTnuYhj4rfpQFP/U7dPkptSMAn8J5xxJTmk3SBrMxZiILTcowBB54rHZrOjYcNCp y+nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jWNlsDmZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6si8100207plm.62.2019.03.24.09.49.04; Sun, 24 Mar 2019 09:49:19 -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=@gmail.com header.s=20161025 header.b=jWNlsDmZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728871AbfCXQs2 (ORCPT + 99 others); Sun, 24 Mar 2019 12:48:28 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46551 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728174AbfCXQs2 (ORCPT ); Sun, 24 Mar 2019 12:48:28 -0400 Received: by mail-lj1-f194.google.com with SMTP id z26so5704039lja.13; Sun, 24 Mar 2019 09:48:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b1U9n/t18wnXKhRjLFYD2gjH0o+xCH9hI2JLlh3jrEQ=; b=jWNlsDmZfw1BhmENeKMJNFMpaoNMtEohfdG1sudB7Tdo64fVoty7f328ILDHh9ICb1 Ux+U58FUO7yQx6lmVeKrebPKHqDKvX8uZnUxNZqsYTHGodj8yDAtNqVNEun4YJg9ZE3I 0CjWQ6iCdVxxIRPL8MSCilpybL5PT59OZa1J11uabZqsSiiz5erKO/y9yoJHvgttJrlD ZpEX3VcOclRn1mLZ/iRF43y5ntEUFhnW07+ek6h0136axxQK568bNmsYgSQQeldDPTYj /Jf2Qs9mqVs/v8RY9Opzj4ucJuqgZopK8UQrZBZ3VCDUJlNgyhkzy3bYMRUupsz9Cc1q JvSA== 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:mime-version:content-transfer-encoding; bh=b1U9n/t18wnXKhRjLFYD2gjH0o+xCH9hI2JLlh3jrEQ=; b=mMUAG7FQKzKd2xw3VSkdIyZijmaAAWZ1fytMLKwPUlPRxcLWBT69j2+ZJW5SM7wdGk wv+HUgJ56d9nIZGtTHpWUH+LJs52d/ShOEVwJ7YTsgtgxqSQB3IXjQXtn7nvDdKBEseC EWNgqoBka41XV4NcES7paITh/GExCWLA0EFQQnVeQMCghBHk1hjcGbGA15nIHJe0sncT j3MyiQrVXIycLKsDI144/sn/F9K32Ujv3H8R5r4lkJkKd7s5SHqnsNvZzqzkGbB2KRJT qtd73vQptsH7bseyCyAK09u0IMpVAnP2nq5j9s6YZ+17yfy22v0Yn3ysrIp/nX6ba7E5 RK5w== X-Gm-Message-State: APjAAAUAHafZ5035ZtmnOurtAcAB6IU1vJaxaJKkJV+qxrjDnZSeGTZ4 kxjXAhLTKXFBFrxQZ/naumU= X-Received: by 2002:a2e:4715:: with SMTP id u21mr10582949lja.156.1553446106051; Sun, 24 Mar 2019 09:48:26 -0700 (PDT) Received: from z50.localnet (109241207190.gdansk.vectranet.pl. [109.241.207.190]) by smtp.gmail.com with ESMTPSA id b15sm3007352ljj.70.2019.03.24.09.48.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 09:48:24 -0700 (PDT) From: Janusz Krzysztofik To: Aaro Koskinen Cc: Boris Brezillon , Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Tony Lindgren , linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik Subject: Re: [PATCH] mtd: rawnand: ams-delta: Drop board specific partition info Date: Sun, 24 Mar 2019 17:48:22 +0100 Message-ID: <2631901.52Nzq63B5o@z50> In-Reply-To: <20190320011630.GB7872@darkstar.musicnaut.iki.fi> References: <20190319223718.26131-1-jmkrzyszt@gmail.com> <20190320011630.GB7872@darkstar.musicnaut.iki.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Aaro, Thanks for your review. On Wednesday, March 20, 2019 2:16:30 AM CET Aaro Koskinen wrote: > On Tue, Mar 19, 2019 at 11:37:18PM +0100, Janusz Krzysztofik wrote: > > After recent modifications, only a hardcoded partition info makes > > the driver device specific. Other than that, the driver uses GPIO > > exclusively and can be used on any hardware. > > > > Drop the partition info and use MTD partition parser with default > > list of partition types instead. > > > > Amstrad Delta users should append the followig partition info to their > ^^^^^^^^ > Should be "following". > > > kernel command line, possibly by embedding it in CONFIG_CMDLINE: > > mtdparts=ams-delta-nand:3584k(Kernel),256k(u-boot),256k(u-boot_params),\ > > 256k(Amstrad_LDR),27m(File_system),768k(PBL_reserved). For their > > convenience, select CONFIG_MTD_CMDLINE_PARTS symbol from that board > > Kconfig automatically if this NAND driver is also selected. > > > > Signed-off-by: Janusz Krzysztofik > > Cc: Tony Lindgren > > Could we move the fixed partition setup to the board file > instead? Otherwise this kind of change is not really nice for the users, > as it will likely break existing setups. The default partition layout > should remain the same. I'm wondering if it would be acceptable to pass partition info from a .dts file. I think that would be a better, more modern approach than adding a new header under include/linux/platform_data. The problem with a device tree based implementation is, I know of no u-boot version supporting both Amstrad Delta and FDT. However, I've already tested two solutions that work for me. One uses CONFIG_ARM_APPENDED_DTB and requires a user to manually append the blob to zImage and (re)generate uImage. I'm not sure how much more user- friendly it looks for you, compared to the command line version I proposed initially. If the above is not acceptable. I can propose still another approach. The blob is automagically built and embedded into the kernel with some assembler glue, then unflattened from the board init_machine(), somehow similar to the way drivers/of/unittest.c does it. Please advise which approach sounds best to you (platform_data, CONFIG_ARM_APPENDED_DTB or unittest like). Thanks, Janusz > > A. >