All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Kletschke <lists@ku-gbr.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] cfi_flash.c bug regarding intel k3 devices
Date: Thu, 12 May 2005 16:45:11 +0200	[thread overview]
Message-ID: <20050512144510.GA4397@synertronixx3> (raw)
In-Reply-To: <20050512142803.GA4333@synertronixx3>

Stop!

Damn, also the flinfo format Problem still exists in 1.1.2!
For example:
http://sourceforge.net/mailarchive/message.php?msg_id=11432237

--- u-boot-1.1.2/drivers/cfi_flash.c    2004-12-18 23:35:45.000000000 +0100
+++ u-boot-1.1.2-imx1/drivers/cfi_flash.c       2005-05-12 15:59:06.000000000 +0200
@@ -111,6 +111,9 @@
 #define AMD_ADDR_START                 0x555
 #define AMD_ADDR_ACK                   0x2AA

+#define INTEL_CMD_UNLOCK_START         0x60
+#define INTEL_CMD_UNLOCK_ACK           0xD0
+
 #define FLASH_OFFSET_CFI               0x55
 #define FLASH_OFFSET_CFI_RESP          0x10
 #define FLASH_OFFSET_PRIMARY_VENDOR    0x13
@@ -180,6 +183,7 @@
 static void flash_make_cmd (flash_info_t * info, uchar cmd, void *cmdbuf);
 static void flash_write_cmd (flash_info_t * info, flash_sect_t sect, uint offset, uchar cmd);
 static void flash_unlock_seq (flash_info_t * info, flash_sect_t sect);
+static void flash_unlock_seq_intelk3 (flash_info_t * info, flash_sect_t sect);
 static int flash_isequal (flash_info_t * info, flash_sect_t sect, uint offset, uchar cmd);
 static int flash_isset (flash_info_t * info, flash_sect_t sect, uint offset, uchar cmd);
 static int flash_toggle (flash_info_t * info, flash_sect_t sect, uint offset, uchar cmd);
@@ -239,7 +243,6 @@
 }
 #endif

-
 /*-----------------------------------------------------------------------
  * read a character at a port width address
  */
@@ -397,6 +400,7 @@
                        switch (info->vendor) {
                        case CFI_CMDSET_INTEL_STANDARD:
                        case CFI_CMDSET_INTEL_EXTENDED:
+                               flash_unlock_seq_intelk3 (info, sect);
                                flash_write_cmd (info, sect, 0, FLASH_CMD_CLEAR_STATUS);
                                flash_write_cmd (info, sect, 0, FLASH_CMD_BLOCK_ERASE);
                                flash_write_cmd (info, sect, 0, FLASH_CMD_ERASE_CONFIRM);
@@ -483,7 +487,7 @@
                if ((i % 5) == 0)
                        printf ("\n   ");
                printf (" %08lX%s",
-                       info->start[i], info->protect[i] ? " (RO)  " : "     ");
+                       info->start[i], info->protect[i] ? " (RO)  " : "       ");
 #endif
        }
        putc ('\n');
@@ -858,6 +862,12 @@
        flash_write_cmd (info, sect, AMD_ADDR_ACK, AMD_CMD_UNLOCK_ACK);
 }

+static void flash_unlock_seq_intelk3 (flash_info_t * info, flash_sect_t sect)
+{
+       flash_write_cmd (info, sect, 0, INTEL_CMD_UNLOCK_START);
+       flash_write_cmd (info, sect, 0, INTEL_CMD_UNLOCK_ACK);
+}
+
 /*-----------------------------------------------------------------------
  */
 static int flash_isequal (flash_info_t * info, flash_sect_t sect, uint offset, uchar cmd)

Konsti

-- 
GPG KeyID EF62FCEF
Fingerprint: 13C9 B16B 9844 EC15 CC2E  A080 1E69 3FDA EF62 FCEF

  reply	other threads:[~2005-05-12 14:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 14:28 [U-Boot-Users] cfi_flash.c bug regarding intel k3 devices Konstantin Kletschke
2005-05-12 14:45 ` Konstantin Kletschke [this message]
2005-10-08 23:18   ` Wolfgang Denk
2005-05-12 16:15 ` Tolunay Orkun
2005-05-12 19:56   ` Konstantin Kletschke
2005-05-12 22:13     ` Tolunay Orkun
2005-05-12 22:24       ` Konstantin Kletschke

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=20050512144510.GA4397@synertronixx3 \
    --to=lists@ku-gbr.de \
    --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.