switch-coreboot/src
Kyösti Mälkki 77d1280d0c SPI flash: Fix alignment checks in Page Program commands
There are two separate restrictions to take into account:

  Page Program command must not cross address boundaries defined by the
  flash part's page size.

  Total number of bytes for any command sent to flash part is restricted
  by the SPI controller capabilities.

Consider

  CONTROLLER_PAGE_LIMIT=64, page_size=256, offset=62, len=4.
  This write would be split at offset 64 for no reason.

Consider

  CONTROLLER_PAGE_LIMIT=40, page_size=256, offset=254, len=4.
  This write would not be split at page boundary as required.

We do not really hit the second case. Nevertheless, CONTROLLER_PAGE_LIMIT
is a misnomer for the maximum payload length supported by the SPI controller
and is removed in a followup.

Change-Id: I727f2e7de86a91b6a509460ff1f374acd006a0bc
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/6162
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2014-07-14 19:42:27 +02:00
..
arch arch: Trivial - drop trailing blank lines at EOF 2014-07-08 13:52:34 +02:00
console src/console/post.c: Sanitize headers from preprocessor abuse 2014-06-27 04:23:40 +02:00
cpu src: Make use of 'CEIL_DIV(a, b)' macro across tree 2014-07-11 08:39:07 +02:00
device YABEL: Initialize global biosmem pointer for VBE 2014-07-11 09:23:18 +02:00
drivers SPI flash: Fix alignment checks in Page Program commands 2014-07-14 19:42:27 +02:00
ec spi: Change spi_xfer to work in units of bytes instead of bits. 2014-07-05 11:36:20 +02:00
include include/stdlib.h: Extend common macro collection 2014-07-10 20:50:16 +02:00
lib lib: Trivial - drop trailing blank lines at EOF 2014-07-08 13:52:15 +02:00
mainboard libpayload: find source of input characters 2014-07-12 20:19:14 +02:00
northbridge src: Make use of 'CEIL_DIV(a, b)' macro across tree 2014-07-11 08:39:07 +02:00
soc soc: Trivial - drop trailing blank lines at EOF 2014-07-08 13:52:54 +02:00
southbridge libpayload: find source of input characters 2014-07-12 20:19:14 +02:00
superio superio: Trivial - drop trailing blank lines at EOF 2014-07-08 13:39:24 +02:00
vendorcode vendorcode/amd/agesa/f15tn: Fix erratum #712 2014-07-11 05:50:23 +02:00
Kconfig AGESA S3: Fix ACPISCRATCH in CBMEM 2014-06-25 06:23:07 +02:00