mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 06:23:18 +02:00
Add 'const' keyword to chip write and other function prototypes
Corresponding to flashrom svn r1789. Inspired by and mostly based on a patch Signed-off-by: Mark Marshall <mark.marshall@omicron.at> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:

committed by
Stefan Tauner

parent
20da4aa82c
commit
f20b7beff0
10
spi25.c
10
spi25.c
@ -876,8 +876,7 @@ int spi_byte_program(struct flashctx *flash, unsigned int addr,
|
||||
return result;
|
||||
}
|
||||
|
||||
int spi_nbyte_program(struct flashctx *flash, unsigned int addr, uint8_t *bytes,
|
||||
unsigned int len)
|
||||
int spi_nbyte_program(struct flashctx *flash, unsigned int addr, const uint8_t *bytes, unsigned int len)
|
||||
{
|
||||
int result;
|
||||
/* FIXME: Switch to malloc based on len unless that kills speed. */
|
||||
@ -983,7 +982,7 @@ int spi_read_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start,
|
||||
* FIXME: Use the chunk code from Michael Karcher instead.
|
||||
* Each page is written separately in chunks with a maximum size of chunksize.
|
||||
*/
|
||||
int spi_write_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start,
|
||||
int spi_write_chunked(struct flashctx *flash, const uint8_t *buf, unsigned int start,
|
||||
unsigned int len, unsigned int chunksize)
|
||||
{
|
||||
int rc = 0;
|
||||
@ -1032,8 +1031,7 @@ int spi_write_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start,
|
||||
* (e.g. due to size constraints in IT87* for over 512 kB)
|
||||
*/
|
||||
/* real chunksize is 1, logical chunksize is 1 */
|
||||
int spi_chip_write_1(struct flashctx *flash, uint8_t *buf, unsigned int start,
|
||||
unsigned int len)
|
||||
int spi_chip_write_1(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
|
||||
{
|
||||
unsigned int i;
|
||||
int result = 0;
|
||||
@ -1049,7 +1047,7 @@ int spi_chip_write_1(struct flashctx *flash, uint8_t *buf, unsigned int start,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int default_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len)
|
||||
int default_spi_write_aai(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
|
||||
{
|
||||
uint32_t pos = start;
|
||||
int result;
|
||||
|
Reference in New Issue
Block a user