[coreboot-gerrit] Change in coreboot[master]: soc/intel/common/block: Add Intel common FAST_SPI code
Furquan Shaikh (Code Review)
gerrit at coreboot.org
Tue Apr 25 07:47:08 CEST 2017
Furquan Shaikh 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 30:
(6 comments)
https://review.coreboot.org/#/c/18557/30/src/soc/intel/common/block/fast_spi/fast_spi.c
File src/soc/intel/common/block/fast_spi/fast_spi.c:
PS30, Line 75: -
space around -
https://review.coreboot.org/#/c/18557/28/src/soc/intel/common/block/fast_spi/fast_spi_flash.c
File src/soc/intel/common/block/fast_spi/fast_spi_flash.c:
PS28, Line 101: static size_t fill_xfer_fifo(struct fast_spi_flash_ctx *ctx, const void *data,
: size_t len)
: {
: len = min(len, SPIBAR_FDATA_FIFO_SIZE);
:
: /* YES! memcpy() works. FDATAn does not require 32-bit accesses. */
: memcpy((void *)(ctx->mmio_base + SPIBAR_FDATA(0)), data, len);
: return len;
: }
:
: /* Drain FDATAn FIFO after a read transaction populates data. */
: static size_t drain_xfer_fifo(struct fast_spi_flash_ctx *ctx, void *dest,
: size_t len)
: {
: len = min(len, SPIBAR_FDATA_FIFO_SIZE);
:
: /* YES! memcpy() works. FDATAn does not require 32-bit accesses. */
:
> It doesn't matter in practice because get_xfler_len() does the sizing.
Right. In that case, we can just skip the min(..) as well.
https://review.coreboot.org/#/c/18557/30/src/soc/intel/common/block/fast_spi/fast_spi_flash.c
File src/soc/intel/common/block/fast_spi/fast_spi_flash.c:
PS30, Line 51: _get_fast_spi_flash_ctx
It would be better to use consistent naming conventions: _fast_spi_flash_get_ctx
PS30, Line 58: bar
assert if bar is 0.
PS30, Line 91: read_fast_spi_flash_sfdp_param
fast_spi_flash_read_sfdp_param
PS30, Line 325: 0x04
Should this be fixed? :)
--
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: 30
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