Skip to content
Snippets Groups Projects
Commit cdcdad85 authored by Marek Vasut's avatar Marek Vasut Committed by Jagannadha Sutradharudu Teki
Browse files

spi: altera: Move the config options to the top


Just move the configuration options scattered all over the driver
to the top of the source file. No functional change.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: default avatarPavel Machek <pavel@denx.de>
Reviewed-by: default avatarJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
parent df155672
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
#include <malloc.h> #include <malloc.h>
#include <spi.h> #include <spi.h>
#ifndef CONFIG_ALTERA_SPI_IDLE_VAL
#define CONFIG_ALTERA_SPI_IDLE_VAL 0xff
#endif
#ifndef CONFIG_SYS_ALTERA_SPI_LIST
#define CONFIG_SYS_ALTERA_SPI_LIST { CONFIG_SYS_SPI_BASE }
#endif
struct altera_spi_regs { struct altera_spi_regs {
u32 rxdata; u32 rxdata;
u32 txdata; u32 txdata;
...@@ -35,10 +43,6 @@ struct altera_spi_regs { ...@@ -35,10 +43,6 @@ struct altera_spi_regs {
#define ALTERA_SPI_CONTROL_IE_MSK (1 << 8) #define ALTERA_SPI_CONTROL_IE_MSK (1 << 8)
#define ALTERA_SPI_CONTROL_SSO_MSK (1 << 10) #define ALTERA_SPI_CONTROL_SSO_MSK (1 << 10)
#ifndef CONFIG_SYS_ALTERA_SPI_LIST
#define CONFIG_SYS_ALTERA_SPI_LIST { CONFIG_SYS_SPI_BASE }
#endif
static ulong altera_spi_base_list[] = CONFIG_SYS_ALTERA_SPI_LIST; static ulong altera_spi_base_list[] = CONFIG_SYS_ALTERA_SPI_LIST;
struct altera_spi_slave { struct altera_spi_slave {
...@@ -117,10 +121,6 @@ void spi_release_bus(struct spi_slave *slave) ...@@ -117,10 +121,6 @@ void spi_release_bus(struct spi_slave *slave)
writel(0, &altspi->regs->slave_sel); writel(0, &altspi->regs->slave_sel);
} }
#ifndef CONFIG_ALTERA_SPI_IDLE_VAL
# define CONFIG_ALTERA_SPI_IDLE_VAL 0xff
#endif
int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
void *din, unsigned long flags) void *din, unsigned long flags)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment