drivers/spi: Sanitize headers from preprocessor abuse

Continuing on from the rational given in:

a173a62 Remove guarding #includes by CONFIG_FOO combinations

Change-Id: I35c636ee7c0b106323b3e4b90629f7262750f8bd
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6114
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Edward O'Callaghan
2014-06-26 15:02:40 +10:00
parent 0017c6ee87
commit c4561e24bb
12 changed files with 21 additions and 7 deletions

View File

@@ -12,6 +12,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* at25dfxx-specific commands */

View File

@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* A25L-specific commands */

View File

@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* EN25Q128-specific commands */

View File

@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* GD25Pxx-specific commands */

View File

@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* MX25xx-specific commands */

View File

@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* S25FLxx-specific commands */

View File

@@ -7,14 +7,13 @@
* Licensed under the GPL-2 or later.
*/
#include <cpu/x86/smm.h>
#include <delay.h>
#include <stdlib.h>
#include <string.h>
#include <spi-generic.h>
#include <spi_flash.h>
#include <delay.h>
#ifdef __SMM__
#include <cpu/x86/smm.h>
#endif
#include "spi_flash_internal.h"
#include <timer.h>

View File

@@ -4,6 +4,9 @@
* Copyright (C) 2008 Atmel Corporation
*/
#ifndef SPI_FLASH_INTERNAL_H
#define SPI_FLASH_INTERNAL_H
/* Common parameters -- kind of high, but they should only occur when there
* is a problem (and well your system already is broken), so err on the side
* of caution in case we're dealing with slower SPI buses and/or processors.
@@ -83,3 +86,5 @@ struct spi_flash *spi_flash_probe_gigadevice(struct spi_slave *spi,
u8 *idcode);
struct spi_flash *spi_flash_probe_adesto(struct spi_slave *spi, u8 *idcode);
struct spi_flash *spi_fram_probe_ramtron(struct spi_slave *spi, u8 *idcode);
#endif /* SPI_FLASH_INTERNAL_H */

View File

@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
#define CMD_SST_WREN 0x06 /* Write Enable */

View File

@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* M25Pxx-specific commands */

View File

@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <spi_flash.h>
#include "spi_flash_internal.h"
/* M25Pxx-specific commands */