[U-Boot-Users] [PATCH] CFI driver AMD Command Set Top boot geometry reversal, etc. [Updated]
Tolunay Orkun
listmember at orkun.us
Fri Nov 10 16:47:03 CET 2006
Stefan,
Stefan Roese wrote:
> Hi Tolunay,
>
> On Friday 10 November 2006 00:46, Tolunay Orkun wrote:
>
>> This patch (replaces patch submitted via DNX#2006110942000016):
>>
>> * Adds support for AMD command set Top Boot flash geometry reversal
>> * Adds support for reading JEDEC Manufacturer ID and Device ID
>> * Adds support for displaying command set, manufacturer id and
>> device ids (flinfo)
>> * Makes flinfo output to be consistent when CFG_FLASH_EMPTY_INFO defined
>> * Removes outdated change history (refer to git log instead)
>>
>
> I tied you patch one a board with a ST M29W160ET FLASH, that couldn't be
> handled by the "old" CFI driver, because of the geometry reversal. I had
> hoped your patch would have solved this issue. Unfortunately not:
>
> => fli
>
> Bank # 1: CFI conformant FLASH (16 x 16) Size: 2 MB in 35 Sectors
> AMD Standard command set, Manufacturer ID: 0x05, Device ID: 0x56
> Erase timeout: 8192 ms, write timeout: 1 ms
>
> Sector Start Addresses:
> FFE00000 FFE04000 FFE06000 FFE08000 FFE10000
> FFE20000 E FFE30000 E FFE40000 E FFE50000 E FFE60000 E
> FFE70000 E FFE80000 E FFE90000 E FFEA0000 E FFEB0000 E
> FFEC0000 E FFED0000 E FFEE0000 E FFEF0000 E FFF00000 E
> FFF10000 E FFF20000 E FFF30000 E FFF40000 E FFF50000 E
> FFF60000 E FFF70000 E FFF80000 E FFF90000 E FFFA0000
> RO
> FFFB0000 RO FFFC0000 RO FFFD0000 RO FFFE0000 RO FFFF0000
> RO
>
>
> As you may notice, even the ID's are not correct (0020 and 22c4 are correct)
> and the geometry is not correct (bottom instead of top).
>
The DeviceID detection seems still broken for AMD at this moment. I
might be reading the actual data or possibly wrong offsets. The
Manufacturer ID should be 0x20 and Device Id should be displayed as 0xC4
(I might add code to get that 0x22 but if a word/byte device is in byte
mode 0x22 part is not available)
I need your help. Can you compile cfi_flash.c with DEBUG and capture the
output as U-Boot boots. Also, the output of following commands please.
mw.w ffe00555 00aa
mw.w ffe002aa 0055
mw.w ffe00555 0090
md ffe00000
mw.w ffe00000 00f0
Even if detection is right we might fail sometimes with CFI version 1.0
which your ST part is according to datasheet. But in your case if we can
identify the device id as 0xC4 it would be designated as top boot
(because msb is set) and it would work. The bottom boot version of the
device would have device id 0x49 [By the way device ids have odd parity
according to MTD code]
We might need to add specific device IDs to the driver as exceptions for
some CFI 1.0 cases. Linux driver did not have a good solution for this
either. But for your case as soon as device id algorithm is fixed it
should work fine.
More information about the U-Boot
mailing list