From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] nios2: reset cfi flash before reading env
Date: Thu, 06 Jan 2011 10:36:27 +0800 [thread overview]
Message-ID: <4D252AAB.6040308@wytron.com.tw> (raw)
In-Reply-To: <20110105081529.C430ED31214@gemini.denx.de>
On 01/05/2011 04:15 PM, Wolfgang Denk wrote:
> Instead of making fixed assumptions about flash type and it's
> properties here you should use generic routines from the CFI driver to
> do the reset.
>
Dear Wolfgang,
env_init() goes before flash_init() in board.c. So we don't know the
flash type and cannot use those generic cfi routines based on flash_info.
I followed this in cfi_flash.c
void __flash_cmd_reset(flash_info_t *info)
{
/*
* We do not yet know what kind of commandset to use, so we issue
* the reset command in both Intel and AMD variants, in the hope
* that AMD flash roms ignore the Intel command.
*/
flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
flash_write_cmd(info, 0, 0, FLASH_CMD_RESET);
}
I am not sure if this thing should be added to generic code, because I
found powerpc skiped flash_init when board_flash_wp_on in board.c.
Best regards,
Thomas
next prev parent reply other threads:[~2011-01-06 2:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 7:17 [U-Boot] [PATCH] nios2: reset cfi flash before reading env Thomas Chou
2011-01-05 8:15 ` Wolfgang Denk
2011-01-06 2:36 ` Thomas Chou [this message]
2011-01-17 21:02 ` Wolfgang Denk
2011-01-18 2:05 ` Thomas Chou
2011-01-18 3:13 ` [U-Boot] [PATCH v2] " Thomas Chou
2011-03-26 14:47 ` Scott McNutt
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=4D252AAB.6040308@wytron.com.tw \
--to=thomas@wytron.com.tw \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox