mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
Make the presence of Linux SPI headers mandatory for linux_spi
This solution is copied from ft2232_spi and is equally hacky. Thanks to M.K. for investigating the history of <linux/spi/spidev.h>, which led to a hopefully more robust check. Corresponding to flashrom svn r1517. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
@ -17,6 +17,8 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if CONFIG_LINUX_SPI == 1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@ -24,6 +26,7 @@
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "flash.h"
|
||||
@ -176,3 +179,5 @@ static int linux_spi_write_256(struct flashctx *flash, uint8_t *buf,
|
||||
return spi_write_chunked(flash, buf, start, len,
|
||||
((unsigned int)getpagesize()) - 4);
|
||||
}
|
||||
|
||||
#endif // CONFIG_LINUX_SPI == 1
|
||||
|
Reference in New Issue
Block a user