SPI flash layer: remove unused function spi_flash_free()
We don't ever free memory in coreboot, hence drop spi_flash_free() and spi_free_slave() Change-Id: I0ca3f78574ceb4516e7d33c06ab1a58abfb3b0ec Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/1273 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
0067188739
commit
5f3aca39d3
|
@ -297,12 +297,5 @@ err_manufacturer_probe:
|
||||||
err_read_id:
|
err_read_id:
|
||||||
spi_release_bus(spi);
|
spi_release_bus(spi);
|
||||||
err_claim_bus:
|
err_claim_bus:
|
||||||
spi_free_slave(spi);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void spi_flash_free(struct spi_flash *flash)
|
|
||||||
{
|
|
||||||
spi_free_slave(flash->spi);
|
|
||||||
free(flash);
|
|
||||||
}
|
|
||||||
|
|
|
@ -83,13 +83,6 @@ void spi_init(void);
|
||||||
struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
|
struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
|
||||||
unsigned int max_hz, unsigned int mode);
|
unsigned int max_hz, unsigned int mode);
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
|
||||||
* Free any memory associated with a SPI slave.
|
|
||||||
*
|
|
||||||
* slave: The SPI slave
|
|
||||||
*/
|
|
||||||
void spi_free_slave(struct spi_slave *slave);
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Claim the bus and prepare it for communication with a given slave.
|
* Claim the bus and prepare it for communication with a given slave.
|
||||||
*
|
*
|
||||||
|
|
|
@ -68,7 +68,6 @@ struct spi_flash {
|
||||||
|
|
||||||
struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
|
struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
|
||||||
unsigned int max_hz, unsigned int spi_mode);
|
unsigned int max_hz, unsigned int spi_mode);
|
||||||
void spi_flash_free(struct spi_flash *flash);
|
|
||||||
|
|
||||||
static inline int spi_flash_read(struct spi_flash *flash, u32 offset,
|
static inline int spi_flash_read(struct spi_flash *flash, u32 offset,
|
||||||
size_t len, void *buf)
|
size_t len, void *buf)
|
||||||
|
|
|
@ -280,12 +280,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
|
||||||
return slave;
|
return slave;
|
||||||
}
|
}
|
||||||
|
|
||||||
void spi_free_slave(struct spi_slave *_slave)
|
|
||||||
{
|
|
||||||
ich_spi_slave *slave = (ich_spi_slave *)_slave;
|
|
||||||
free(slave);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if this device ID matches one of supported Intel PCH devices.
|
* Check if this device ID matches one of supported Intel PCH devices.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue