summaryrefslogtreecommitdiff
path: root/src/drivers/spi
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi')
-rw-r--r--src/drivers/spi/adesto.c1
-rw-r--r--src/drivers/spi/amic.c1
-rw-r--r--src/drivers/spi/eon.c1
-rw-r--r--src/drivers/spi/gigadevice.c1
-rw-r--r--src/drivers/spi/macronix.c1
-rw-r--r--src/drivers/spi/spansion.c1
-rw-r--r--src/drivers/spi/spi_flash.c7
-rw-r--r--src/drivers/spi/spi_flash_internal.h5
-rw-r--r--src/drivers/spi/sst.c1
-rw-r--r--src/drivers/spi/stmicro.c1
-rw-r--r--src/drivers/spi/winbond.c1
11 files changed, 17 insertions, 4 deletions
diff --git a/src/drivers/spi/adesto.c b/src/drivers/spi/adesto.c
index 50e58839a1..0fba3e6677 100644
--- a/src/drivers/spi/adesto.c
+++ b/src/drivers/spi/adesto.c
@@ -12,6 +12,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* at25dfxx-specific commands */
diff --git a/src/drivers/spi/amic.c b/src/drivers/spi/amic.c
index 63a68a5309..87ef95166a 100644
--- a/src/drivers/spi/amic.c
+++ b/src/drivers/spi/amic.c
@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* A25L-specific commands */
diff --git a/src/drivers/spi/eon.c b/src/drivers/spi/eon.c
index 5a74b846f6..85567eb0d6 100644
--- a/src/drivers/spi/eon.c
+++ b/src/drivers/spi/eon.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* EN25Q128-specific commands */
diff --git a/src/drivers/spi/gigadevice.c b/src/drivers/spi/gigadevice.c
index 783d321566..d9d4e17f57 100644
--- a/src/drivers/spi/gigadevice.c
+++ b/src/drivers/spi/gigadevice.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* GD25Pxx-specific commands */
diff --git a/src/drivers/spi/macronix.c b/src/drivers/spi/macronix.c
index 6e910f6b91..8a6601b6ec 100644
--- a/src/drivers/spi/macronix.c
+++ b/src/drivers/spi/macronix.c
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* MX25xx-specific commands */
diff --git a/src/drivers/spi/spansion.c b/src/drivers/spi/spansion.c
index 6dd6df921a..fc96e40260 100644
--- a/src/drivers/spi/spansion.c
+++ b/src/drivers/spi/spansion.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* S25FLxx-specific commands */
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index f3a5906a00..626d5069b0 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -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>
diff --git a/src/drivers/spi/spi_flash_internal.h b/src/drivers/spi/spi_flash_internal.h
index e69694870e..6f184848b6 100644
--- a/src/drivers/spi/spi_flash_internal.h
+++ b/src/drivers/spi/spi_flash_internal.h
@@ -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 */
diff --git a/src/drivers/spi/sst.c b/src/drivers/spi/sst.c
index 3cf6c509bf..d81888a709 100644
--- a/src/drivers/spi/sst.c
+++ b/src/drivers/spi/sst.c
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
#define CMD_SST_WREN 0x06 /* Write Enable */
diff --git a/src/drivers/spi/stmicro.c b/src/drivers/spi/stmicro.c
index bc7969d138..40bce31983 100644
--- a/src/drivers/spi/stmicro.c
+++ b/src/drivers/spi/stmicro.c
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* M25Pxx-specific commands */
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c
index 7ddd312616..37fd0e5112 100644
--- a/src/drivers/spi/winbond.c
+++ b/src/drivers/spi/winbond.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <spi_flash.h>
+
#include "spi_flash_internal.h"
/* M25Pxx-specific commands */