From: Rohit <h.rohit@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Flex-OneNAND driver
Date: Thu, 16 Oct 2008 13:13:56 +0530 [thread overview]
Message-ID: <48F6F0BC.9040700@samsung.com> (raw)
In-Reply-To: <9c9fda240809251827n7c5e5d3v4a700a9a8687d8b4@mail.gmail.com>
Hi Kyungmin,
Thank you for the comments.
Kyungmin Park wrote:
>> diff --git a/common/env_onenand.c b/common/env_onenand.c
>> --- a/common/env_onenand.c
>> +++ b/common/env_onenand.c
>> @@ -58,11 +58,14 @@
>>
>> void env_relocate_spec(void)
>> {
>> + struct onenand_chip *this = &onenand_chip;
>> unsigned long env_addr;
>> int use_default = 0;
>> size_t retlen;
>>
>> env_addr = CONFIG_ENV_ADDR;
>> + if (FLEXONENAND(this))
>> + env_addr = CONFIG_ENV_ADDR_FLEX;
>>
>
> Umm do you have more fancy method to determine the environment address
> whatever it's OneNAND or not.
>
We can just double CONFIG_ENV_ADDR for Flex-OneNAND, so
CONFIG_ENV_ADDR_FLEX is not needed.
Otherwise, we can just set env_addr to 1 block size as bootloader
is always limited to block 0.
>> int saveenv(void)
>> {
>> + struct onenand_chip *this = &onenand_chip;
>> unsigned long env_addr = CONFIG_ENV_ADDR;
>> struct erase_info instr = {
>> .callback = NULL,
>> @@ -96,6 +100,12 @@
>> size_t retlen;
>>
>> instr.len = CONFIG_ENV_SIZE;
>> + if (FLEXONENAND(this)) {
>> + env_addr = CONFIG_ENV_ADDR_FLEX;
>> + instr.len = CONFIG_ENV_SIZE_FLEX;
>> + instr.len <<= onenand_mtd.eraseregions[0].numblocks == 1 ?
>> + 1 : 0;
>> + }
>>
>
> Ditto.
>
I don't get alternative than to use CONFIG_ENV_SIZE_FLEX to store size
of environment variables
partition. Can you please elaborate.
Regards,
Rohit
next prev parent reply other threads:[~2008-10-16 7:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 13:38 [U-Boot] [PATCH] Flex-OneNAND driver apgmoorthy
2008-09-26 1:27 ` Kyungmin Park
2008-10-16 7:43 ` Rohit [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-22 6:28 apgmoorthy
2008-10-14 11:30 ` Wolfgang Denk
2008-10-14 15:37 ` Scott Wood
2008-10-22 23:09 ` Scott Wood
2008-10-24 13:50 ` Rohit
2008-10-27 18:04 ` Scott Wood
2008-10-28 4:53 ` Kyungmin Park
2008-10-28 15:51 ` Scott Wood
2008-11-03 7:35 ` Rohit
2008-11-06 3:29 ` Amit Kumar Sharma
2008-11-06 17:11 ` Scott Wood
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=48F6F0BC.9040700@samsung.com \
--to=h.rohit@samsung.com \
--cc=u-boot@lists.denx.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.