From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: "Petr Štetiar" <ynezz@true.cz>
Cc: Russell King <linux@arm.linux.org.uk>,
dedekind1@gmail.com, Mika Westerberg <mika.westerberg@iki.fi>,
Hartley Sweeten <hsweeten@visionengravers.com>,
Ryan Mallon <ryan@bluewatersys.com>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] ts72xx: use MTDPART_OFS_RETAIN for mtd partitioning
Date: Sun, 12 Jun 2011 01:02:21 +0400 [thread overview]
Message-ID: <BANLkTik4vJ6y6Y1igb_9HfaJ+ADeZ4xT0g@mail.gmail.com> (raw)
In-Reply-To: <20110611092224.GB16318@ibawizard.net>
[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]
Hello, colleagues,
On 6/11/11, Petr Štetiar <ynezz@true.cz> wrote:
> Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> [2011-06-06 18:04:15]:
>> Instead of specifying a callback for dynamic partitioning, use
>> MTDPART_OFS_RETAIN for reserving a place near the end of flash for
>> RedBoot.
>
> [...]
>
>> - .offset = MTDPART_OFS_APPEND,
>> - .size = 0, /* filled in later */
>> + .offset = MTDPART_OFS_RETAIN,
>> + .size = TS72XX_REDBOOT_PART_SIZE,
>> + /* leave so much for last partition */
>
> thank you for the mtd cleanup work. While testing this patch, I've noticed,
> that the TS72XX_REDBOOT_PART_SIZE is by 16K bigger, then it should be:
>
> Redboot:
>
> RedBoot> fis list
> Name FLASH addr Mem addr Length Entry point
> (reserved) 0x60000000 0x60000000 0x01D04000 0x00000000
> RedBoot 0x61D04000 0x61D04000 0x00040000 0x00000000
> vmlinux 0x61D44000 0x00218000 0x000C0000 0x00218000
> FIS directory 0x61FFC000 0x61FFC000 0x00003000 0x00000000
> RedBoot config 0x61FFF000 0x61FFF000 0x00001000 0x00000000
>
> Linux:
>
> 0x000000000000-0x000000004000 : "TS-BOOTROM"
> 0x000000004000-0x000001d00000 : "Linux"
> 0x000001d00000-0x000002000000 : "RedBoot"
>
> So if I simply read now first 4 bytes from /dev/mtdblock2, there's no 'CRUS'
> or 'SURC' boot HeaderID/signature and it means, that there's no valid
> Redboot
> for ep93xx. The correct value is:
>
> #define TS72XX_REDBOOT_PART_SIZE (SZ_2M + SZ_1M - SZ_16K)
Could you please verify/ack the attached patch?
--
With best wishes
Dmitry
[-- Attachment #2: 0001-ts72xx-correct-partition-sizes.patch --]
[-- Type: text/x-patch, Size: 1133 bytes --]
From 9a7a69043004d2f738e321c2443f81f345bf9b1e Mon Sep 17 00:00:00 2001
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date: Sun, 12 Jun 2011 00:58:38 +0400
Subject: [PATCH] ts72xx: correct partition sizes
Since afe43223d (ts72xx: use MTDPART_OFS_RETAIN for mtd partitioning),
ts72xx uses incorrect size for Linux partition (difference is 16k),
correct that so that users have correct access to RedBoot partition.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
arch/arm/mach-ep93xx/ts72xx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index dea42e2..9510ae0 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -106,7 +106,7 @@ static int ts72xx_nand_device_ready(struct mtd_info *mtd)
static const char *ts72xx_nand_part_probes[] = { "cmdlinepart", NULL };
#define TS72XX_BOOTROM_PART_SIZE (SZ_16K)
-#define TS72XX_REDBOOT_PART_SIZE (SZ_2M + SZ_1M)
+#define TS72XX_REDBOOT_PART_SIZE (SZ_2M + SZ_1M - SZ_16K)
static struct mtd_partition ts72xx_nand_parts[] = {
{
--
1.7.5.3
next prev parent reply other threads:[~2011-06-11 21:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 14:04 [PATCH 0/3] mtd: cleanup plat-nand/ts72xx partitions interface Dmitry Eremin-Solenikov
2011-06-06 14:04 ` [PATCH 1/3] mtd: add a flags for partitions which should just leave smth. after them Dmitry Eremin-Solenikov
2011-06-07 4:20 ` Artem Bityutskiy
2011-06-06 14:04 ` [PATCH 2/3] ts72xx: use MTDPART_OFS_RETAIN for mtd partitioning Dmitry Eremin-Solenikov
2011-06-11 9:22 ` Petr Štetiar
2011-06-11 10:38 ` Petr Štetiar
2011-06-11 21:02 ` Dmitry Eremin-Solenikov [this message]
2011-06-06 14:04 ` [PATCH 3/3] mtd: plat-nand: drop unused fields from platform_nand_data Dmitry Eremin-Solenikov
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=BANLkTik4vJ6y6Y1igb_9HfaJ+ADeZ4xT0g@mail.gmail.com \
--to=dbaryshkov@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=mika.westerberg@iki.fi \
--cc=ryan@bluewatersys.com \
--cc=ynezz@true.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).