[flashrom] Re: SFDP with Winbond chip

2019-08-22 Thread Angel Pons
Hi Bercik,

Thanks for your report.

On Thu, Aug 22, 2019 at 5:45 PM ro_beri  wrote:
>
> Hi to all team members.
>
> chip: Winbond 25Q128BFVS0
> programmer: ch341a
> device: Intel NUC5PPYH
> os: Debian Stretch
> kernel: 4.9.168-1+deb9u5 (2019-08-11)
>

That chip should be supported, but looks like SFDP probing is done first,
so you get that message about an unsupported chip. Then probing for the
"W25Q128.V" runs and finds your chip fine. In the end, you end up with two
detected chip definitions: the SFDP definition, and the W25Q128.V definition.

For now, you can tell flashrom to use the W25Q128.V definition adding the
following command-line switch:
 -c "W25Q128.V"

Nevertheless, this looks like a bug that was introduced in a recent change:
 https://review.coreboot.org/c/flashrom/+/33931
The SFDP-capable entry used to be at the end of flashchips.c, so as to be
probed last. However, the sorting done in that change moved it upwards,
before the Winbond entries. Hence the error.

> Flashrom builded with procedure:
> # apt install pciutils pciutils-dev libpci-dev zlib1g-dev libpci3 libftdi-dev 
> libusb-dev
> # git clone https://github.com/flashrom/flashrom.git flashrom_git
> # cd flashrom_git; make; cp flashrom ../
>
> Some parts of build log:
> # Replacing all version templates with v1.1-rc1-69-g188127e.
> # Checking for a C compiler... found.
> # Target arch is x86
> # Target OS is Linux
> # Checking for libpci headers... found.
> # Checking version of pci_get_dev... new version (including PCI domain 
> parameter).
> # Checking if libpci is present and sufficient... yes.
> # Checking for libusb-1.0 headers... found.
> # Checking if libusb-1.0 is usable... yes.
> # Checking for FTDI support... found.
> # Checking for FT232H support in libftdi... found.
> # Checking if Linux MTD headers are present... yes.
> # Checking if Linux SPI headers are present... yes.
> # Checking for utsname support... found.
> # Checking for clock_gettime support... found.
>
> log from "flashrom -p ch341a_spi -VV" in attachment.
>
> Regards
> Bercik

Best regards,

Angel Pons
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] SFDP with Winbond chip

2019-08-22 Thread ro_beri
Hi to all team members.
 
chip: Winbond 25Q128BFVS0
programmer: ch341a
device: Intel NUC5PPYH
os: Debian Stretch
kernel: 4.9.168-1+deb9u5 (2019-08-11)
Flashrom builded with procedure:
# apt install pciutils pciutils-dev libpci-dev zlib1g-dev libpci3 libftdi-dev 
libusb-dev
# git clone https://github.com/flashrom/flashrom.git flashrom_git
# cd flashrom_git; make; cp flashrom ../
Some parts of build log:
# Replacing all version templates with v1.1-rc1-69-g188127e.
# Checking for a C compiler... found.
# Target arch is x86
# Target OS is Linux
# Checking for libpci headers... found.
# Checking version of pci_get_dev... new version (including PCI domain 
parameter).
# Checking if libpci is present and sufficient... yes.
# Checking for libusb-1.0 headers... found.
# Checking if libusb-1.0 is usable... yes.
# Checking for FTDI support... found.
# Checking for FT232H support in libftdi... found.
# Checking if Linux MTD headers are present... yes.
# Checking if Linux SPI headers are present... yes.
# Checking for utsname support... found.
# Checking for clock_gettime support... found.
 
log from "flashrom -p ch341a_spi -VV" in attachment.
 
Regards
Bercikflashrom v1.1-rc1-69-g188127e on Linux 4.9.0-9-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

flashrom was built with libpci 3.5.2, GCC 6.3.0 20170516, little endian
Command line (3 args): ./flashrom -p ch341a_spi -VV
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Initializing ch341a_spi programmer
Device revision is 3.0.4
The following protocols are supported: SPI.
Probing for AMIC A25L010, 128 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L016, 2048 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L020, 256 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L032, 4096 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L040, 512 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L05PT, 64 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L05PU, 64 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L080, 1024 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L10PT, 128 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L10PU, 128 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L16PT, 2048 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L16PU, 2048 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L20PT, 256 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L20PU, 256 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L40PT, 512 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L40PU, 512 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L512, 64 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25L80P, 1024 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25LQ032/A25LQ32A, 4096 kB: probe_spi_rdid_generic: id1 0xef, 
id2 0x4018
Probing for AMIC A25LQ16, 2048 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for AMIC A25LQ64, 8192 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for Atmel AT25DF021, 256 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF021A, 256 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF041A, 512 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF081, 1024 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF081A, 1024 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF161, 2048 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF321, 4096 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF321A, 4096 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DF641(A), 8192 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DL081, 1024 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DL161, 2048 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25DQ161, 2048 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25F1024(A), 128 kB: probe_spi_at25f: id1 0x60, id2 0x60
Probing for Atmel AT25F2048, 256 kB: probe_spi_at25f: id1 0x60, id2 0x60
Probing for Atmel AT25F4096, 512 kB: probe_spi_at25f: id1 0x60, id2 0x60
Probing for Atmel AT25F512, 64 kB: probe_spi_at25f: id1 0x60, id2 0x60
Probing for Atmel AT25F512A, 64 kB: probe_spi_at25f: id1 0x60, id2 0x60
Probing for Atmel AT25F512B, 64 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4018
Probing for Atmel AT25FS010, 128 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25FS040, 512 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for Atmel AT25SF041, 512 kB: probe_spi_rdid_generic: id1 0xef, id2 
0x4018
Probing for