Commit e7d43f1f authored by Mamta Shukla's avatar Mamta Shukla

Enable FPGA-FLASH mode to identify SPI Flash chip correctly

The SPI connection to the FLASH has 3 different configuration: FPGA-FLASH, GENNUM-FLASH, GENNUM-FPGA
to program the FPGA  from the FEC ,GENNUM-FGPA mode is needed, but to use the MTD driver
FPGA-FLASH mode is required.
Hence, enforce bootsel(GPIO) to FPGA-FLASH mode after firmware is loaded in GENNUM-FPGA mode and before
initiating SPI communication & initializing the FPGA through spec_fpga_init(spec_gn412x) , to identify
flash chip id from spi-ocores and m25p80 driver.
Signed-off-by: Mamta Shukla's avatarMamta Shukla <>
Suggested-by: Federico Vaga's avatarFederico Vaga <>
parent 00fa08a6
......@@ -562,7 +562,6 @@ static const char *spec_fw_name_init_get(struct spec_gn412x *spec_gn412x)
static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
enum spec_fpga_select sel;
int err;
dev_dbg(&spec_gn412x->pdev->dev, "Writing firmware '%s'\n", name);
......@@ -575,7 +574,6 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
sel = spec_bootsel_get(spec_gn412x);
spec_bootsel_set(spec_gn412x, SPEC_FPGA_SELECT_GN4124_FPGA);
......@@ -585,13 +583,13 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
if (err)
goto out;
spec_bootsel_set(spec_gn412x, SPEC_FPGA_SELECT_FPGA_FLASH);
err = spec_fpga_init(spec_gn412x);
if (err)
"FPGA incorrectly programmed %d\n", err);
spec_bootsel_set(spec_gn412x, sel);
return err;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment