[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62a4e5ac-40c2-7fb2-60eb-e465c665270f@gmail.com>
Date: Tue, 25 Feb 2020 18:46:44 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Ulf Hansson <ulf.hansson@...aro.org>, Jens Axboe <axboe@...nel.dk>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
David Heidelberg <david@...t.cz>,
Peter Geis <pgwipeout@...il.com>,
Stephen Warren <swarren@...dotorg.org>,
Nicolas Chauvet <kwizart@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Billy Laws <blaws05@...il.com>,
linux-tegra <linux-tegra@...r.kernel.org>,
linux-block <linux-block@...r.kernel.org>,
Andrey Danin <danindrey@...l.ru>,
Gilles Grandou <gilles@...ndou.net>,
Ryan Grachek <ryan@...ted.us>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/3] mmc: block: Add mmc_bdev_to_card() helper
25.02.2020 17:53, Ulf Hansson пишет:
> On Tue, 25 Feb 2020 at 00:22, Dmitry Osipenko <digetx@...il.com> wrote:
>>
>> NVIDIA Tegra Partition Table takes into account MMC card's BOOT_SIZE_MULT
>> parameter, and thus, the partition parser needs to retrieve that EXT_CSD
>> value from the block device. This patch introduces new helper which takes
>> block device for the input argument and returns corresponding MMC card.
>
> Rather than returning the card, why not return the value you are
> looking for instead? That sound more straightforward, but also allows
> mmc core code to stay closer to the mmc core.
Please take a look at patch #3, in particular see the
tegra_partition_table_emmc_boot_offset(). We already need more than just
the BOOT_SIZE_MULT from the struct mmc_card, in the the v2 of this
series we will probably need even a bit more.
I'll adjust the commit's message of this patch in v2, saying that more
than BOOT_SIZE_MULT is needed from the struct mmc_card. Are you okay
with this variant?
----
BTW, do you have any idea how partition table scanning of MMC's boot0/1
partitions potentially could be implemented?
It's not uncommon for Tegra devices that partition table could reside in
one of the MMC's boot partitions (Nexus 7 is one example). For now I
don't see how the scanning could be implemented easily because all
boot0/boot1/main partitions are very separated from each other in the
kernel's MMC_BLOCK.
One potential hack that comes into my mind is that the boot0/1
partitions could be always registered before the main MMC partition and
then they always will be scanned first, i.e. before the main partition.
This will allow to read out partition table from the boot partitions and
stash it for the main.
Powered by blists - more mailing lists