From: Txema Lopez <tlopez@aotek.es>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Problem with the cfi flash driver with a x8/x16 flash configuredin x8 mode.
Date: Thu, 12 Jan 2006 15:03:15 +0100 [thread overview]
Message-ID: <43C661A3.7020707@aotek.es> (raw)
Hi all,
Does anybody test the cfi flash driver (cfi_flash.c) with a x8/x16
flash configured in x8 mode ? I'm trying to port U-Boot for a Lite5200B
with a S29GL128N flash (CFI compliant) using the cfi flash driver.
U-Boot detects the flash correctly but It's unable to erase or write the
flash. In my case the following patch fix the bug but I'm not completly
sure If It's only a bug with my configuration. Any suggestions? Could
anybody test the patch in other architecture?
My configuration for the cfi driver is:
#define CFG_MAX_FLASH_BANKS 2 /* max num of memory banks */
#define CFG_MAX_FLASH_SECT 128 /* max num of sects on one chip */
#undef CONFIG_FLASH_16BIT /* Flash is 8-bit */
#define CFG_FLASH_CFI_DRIVER
#define CFG_FLASH_CFI
#define CFG_FLASH_BANKS_LIST {CFG_CS1_START,CFG_CS0_START}
And the patch:
--- ../tmp/u-boot/drivers/cfi_flash.c 2006-01-12 12:22:08.000000000 +0100
+++ drivers/cfi_flash.c 2006-01-12 13:35:11.000000000 +0100
@@ -107,9 +107,19 @@
#define AMD_STATUS_TOGGLE 0x40
#define AMD_STATUS_ERROR 0x20
+
+#if 0
#define AMD_ADDR_ERASE_START 0x555
#define AMD_ADDR_START 0x555
#define AMD_ADDR_ACK 0x2AA
+#else
+int amd_addr_erase_start = 0x555;
+int amd_addr_start = 0x555;
+int amd_addr_ack = 0x2AA;
+#define AMD_ADDR_ERASE_START amd_addr_erase_start
+#define AMD_ADDR_START amd_addr_start
+#define AMD_ADDR_ACK amd_addr_ack
+#endif
#define FLASH_OFFSET_CFI 0x55
#define FLASH_OFFSET_CFI_RESP 0x10
@@ -1111,6 +1121,9 @@ ulong flash_get_size (ulong base, int ba
info->flash_id = FLASH_MAN_CFI;
if ((info->interface == FLASH_CFI_X8X16) && (info->chipwidth ==
FLASH_CFI_BY8)) {
info->portwidth >>= 1; /* XXX - Need to test on x8/x16
in parallel. */
+ amd_addr_erase_start = 0xAAA;
+ amd_addr_start = 0xAAA;
+ amd_addr_ack = 0x555;
}
}
Best regards,
Jose Maria Lopez.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tlopez.vcf
Type: text/x-vcard
Size: 427 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060112/364022d7/attachment.vcf
reply other threads:[~2006-01-12 14:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=43C661A3.7020707@aotek.es \
--to=tlopez@aotek.es \
--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