From: Marek Vasut <marek.vasut@gmail.com>
To: Olof Johansson <olof@lixom.net>
Cc: Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Wolfram Sang <wsa@the-dreams.de>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Simon Horman <horms+renesas@verge.net.au>,
Marek Vasut <marek.vasut+renesas@gmail.com>
Subject: Re: [PATCH] ARM: dts: rmobile: Drop MTD partitioning from DT
Date: Sun, 22 Jul 2018 00:11:33 +0200 [thread overview]
Message-ID: <5842740e-e652-aa51-ec2b-51f37a011a07@gmail.com> (raw)
In-Reply-To: <CAOesGMhVbSGmkkF-Va6zwOB4xXxj=HpccKeFYgVLO4D86Vo4ow@mail.gmail.com>
On 07/22/2018 12:01 AM, Olof Johansson wrote:
> On Sat, Jul 21, 2018 at 2:54 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> On 07/21/2018 11:47 PM, Olof Johansson wrote:
>>> Hi,
>>
>> Hi,
>>
>>> On Wed, May 30, 2018 at 3:11 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
>>>> Drop the MTD partitioning from DT, since it does not describe HW
>>>> and to give way to a more flexible kernel command line partition
>>>> passing.
>>>>
>>>> To retain the original partitioning, assure you have enabled
>>>> CONFIG_MTD_CMDLINE_PARTS in your kernel config and add the
>>>> following to your kernel command line:
>>>>
>>>> lager: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>> stout: mtdparts=spi0.0:512k(loader),256k(uboot),256k(uboot-env),-(flash)
>>>> koelsch: mtdparts=spi0.0:512k(loader),5632k(user),-(flash)
>>>> porter: mtdparts=spi0.0:256k(loader_prg),4m(user_prg),-(flash_fs)
>>>> wheat: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>> gose: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>> alt: mtdparts=spi0.0:256k(loader),256k(system),-(user)
>>>> silk: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>
>>> Having to specify on command line is such a nasty hack. I wish we
>>> could remove that, and at the very least not add it for anything new.
>>
>> Do you have a better suggestion ?
>
> Yes, keep it in DT.
See below
>>> You end up with user space tools trying to parse the kernel command
>>> line to figure out what's on the flash, and other really bad habits.
>>> :(
>>
>> You should just read /proc/mtd , see
>> http://www.linux-mtd.infradead.org/doc/general.html
>
> Sure, I know that but not everybody does, and they do it in bad ways
> if given the opportunity.
That's what the documentation is for. I assume whoever is using MTD is
also capable of reading the documentation and thus avoiding such basic
mistakes.
>>> I'd strongly advice you to keep this in the board files, unless you
>>> have an actual real motivation for changing it. This patch does not
>>> provide one.
>>
>> Partitioning is not hardware description, it should not be in DT.
>
> Read my reply again. It's part of _platform_ description, and belongs in DT.
I can repartition the flash whichever way I want for my purposes, just
like I can repartition a harddrive. We don't have harddrive partitioning
in the DT, why should we have flash partitioning there ? How do those
differ ?
--
Best regards,
Marek Vasut
WARNING: multiple messages have this Message-ID (diff)
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: rmobile: Drop MTD partitioning from DT
Date: Sun, 22 Jul 2018 00:11:33 +0200 [thread overview]
Message-ID: <5842740e-e652-aa51-ec2b-51f37a011a07@gmail.com> (raw)
In-Reply-To: <CAOesGMhVbSGmkkF-Va6zwOB4xXxj=HpccKeFYgVLO4D86Vo4ow@mail.gmail.com>
On 07/22/2018 12:01 AM, Olof Johansson wrote:
> On Sat, Jul 21, 2018 at 2:54 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> On 07/21/2018 11:47 PM, Olof Johansson wrote:
>>> Hi,
>>
>> Hi,
>>
>>> On Wed, May 30, 2018 at 3:11 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
>>>> Drop the MTD partitioning from DT, since it does not describe HW
>>>> and to give way to a more flexible kernel command line partition
>>>> passing.
>>>>
>>>> To retain the original partitioning, assure you have enabled
>>>> CONFIG_MTD_CMDLINE_PARTS in your kernel config and add the
>>>> following to your kernel command line:
>>>>
>>>> lager: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>> stout: mtdparts=spi0.0:512k(loader),256k(uboot),256k(uboot-env),-(flash)
>>>> koelsch: mtdparts=spi0.0:512k(loader),5632k(user),-(flash)
>>>> porter: mtdparts=spi0.0:256k(loader_prg),4m(user_prg),-(flash_fs)
>>>> wheat: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>> gose: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>> alt: mtdparts=spi0.0:256k(loader),256k(system),-(user)
>>>> silk: mtdparts=spi0.0:256k(loader),4m(user),-(flash)
>>>
>>> Having to specify on command line is such a nasty hack. I wish we
>>> could remove that, and at the very least not add it for anything new.
>>
>> Do you have a better suggestion ?
>
> Yes, keep it in DT.
See below
>>> You end up with user space tools trying to parse the kernel command
>>> line to figure out what's on the flash, and other really bad habits.
>>> :(
>>
>> You should just read /proc/mtd , see
>> http://www.linux-mtd.infradead.org/doc/general.html
>
> Sure, I know that but not everybody does, and they do it in bad ways
> if given the opportunity.
That's what the documentation is for. I assume whoever is using MTD is
also capable of reading the documentation and thus avoiding such basic
mistakes.
>>> I'd strongly advice you to keep this in the board files, unless you
>>> have an actual real motivation for changing it. This patch does not
>>> provide one.
>>
>> Partitioning is not hardware description, it should not be in DT.
>
> Read my reply again. It's part of _platform_ description, and belongs in DT.
I can repartition the flash whichever way I want for my purposes, just
like I can repartition a harddrive. We don't have harddrive partitioning
in the DT, why should we have flash partitioning there ? How do those
differ ?
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2018-07-21 23:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 10:11 [PATCH] ARM: dts: rmobile: Drop MTD partitioning from DT Marek Vasut
2018-05-30 10:11 ` Marek Vasut
2018-05-31 11:39 ` Simon Horman
2018-05-31 11:39 ` Simon Horman
2018-07-21 21:47 ` Olof Johansson
2018-07-21 21:47 ` Olof Johansson
2018-07-21 21:54 ` Marek Vasut
2018-07-21 21:54 ` Marek Vasut
2018-07-21 22:01 ` Olof Johansson
2018-07-21 22:01 ` Olof Johansson
2018-07-21 22:11 ` Marek Vasut [this message]
2018-07-21 22:11 ` Marek Vasut
2018-07-21 22:23 ` Olof Johansson
2018-07-21 22:23 ` Olof Johansson
2018-07-22 10:10 ` Marek Vasut
2018-07-22 10:10 ` Marek Vasut
2018-07-22 16:17 ` Olof Johansson
2018-07-22 16:17 ` Olof Johansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5842740e-e652-aa51-ec2b-51f37a011a07@gmail.com \
--to=marek.vasut@gmail.com \
--cc=geert+renesas@glider.be \
--cc=horms+renesas@verge.net.au \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=olof@lixom.net \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.