[coreboot-gerrit] Change in coreboot[master]: soc/intel/common/block: Add Intel common FAST_SPI code
Barnali Sarkar (Code Review)
gerrit at coreboot.org
Thu Apr 20 13:56:52 CEST 2017
Barnali Sarkar has posted comments on this change. ( https://review.coreboot.org/18557 )
Change subject: soc/intel/common/block: Add Intel common FAST_SPI code
......................................................................
Patch Set 27:
(4 comments)
https://review.coreboot.org/#/c/18557/25/src/soc/intel/common/block/fast_spi/fast_spi.c
File src/soc/intel/common/block/fast_spi/fast_spi.c:
PS25, Line 21: #include "fast_spi_def.h"
> Move the local include below the standard path ones (<file.h>).
ok
Line 360: flash->name = "FAST_SPI Hardware Sequencer";
> Really, spi_flash_programmer_probe() should be a spi controller function. S
As I understood from your comment, you are saying that, in spi-generic.h, the struct spi_ctrlr will have another attribute of a function pointer .probe as below -
struct spi_ctrlr {
int (*claim_bus)(const struct spi_slave *slave);
void (*release_bus)(const struct spi_slave *slave);
int (*setup)(const struct spi_slave *slave);
int (*xfer)(const struct spi_slave *slave, const void *dout,
size_t bytesout, void *din, size_t bytesin);
int (*xfer_vector)(const struct spi_slave *slave,
struct spi_op vectors[], size_t count);
void (*probe)(struct spi_slave *slave, int force);
};
So, somewhere in the code we need to assign the .probe=fast_spi_flash_programmer_probe();
And call the spi_ctrlr->probe(slave, force) from inside spi_flash_probe() function of src/drivers/spi/spi_flash.c
Is this what you meant?
If so, we can do that. During that, we have change this spi_flash_programmer_probe() function name to fast_spi_flash_programmer_probe(). If we do only the name change of this function now, it will break the flow.
So, now, we dont have anything to change here. Right?
https://review.coreboot.org/#/c/18557/27/src/soc/intel/common/block/fast_spi/fast_spi.c
File src/soc/intel/common/block/fast_spi/fast_spi.c:
PS27, Line 104: _
> Remove the leading '_' now that there is a single variant which takes ctx.
ok
https://review.coreboot.org/#/c/18557/27/src/soc/intel/common/block/include/intelblocks/fast_spi.h
File src/soc/intel/common/block/include/intelblocks/fast_spi.h:
Line 27: unsigned int fast_spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len);
> Declaration should be removed.
will remove
--
To view, visit https://review.coreboot.org/18557
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I046e3b30c8efb172851dd17f49565c9ec4cb38cb
Gerrit-PatchSet: 27
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Barnali Sarkar <barnali.sarkar at intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra at intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Balaji Manigandan <balaji.manigandan at intel.com>
Gerrit-Reviewer: Barnali Sarkar <barnali.sarkar at intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams at intel.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Pratikkumar Prajapati <pratikkumar.v.prajapati at intel.corp-partner.google.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik at intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik at intel.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: Yes
More information about the coreboot-gerrit
mailing list