Commit a66a41e7 authored by Yuri Tikhonov's avatar Yuri Tikhonov

RT80404. SF2 SPI: rename and clean-up the driver

There's no compatibility with A2F SPI now, so give the appropriate
names to constants, and funtions.
Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
parent 8b81ffa1
......@@ -30,7 +30,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(SOC).a
COBJS-$(CONFIG_CMD_SOMTEST) += cmd_somtest.o
COBJS-$(CONFIG_CMD_A2F_SPI_TEST) += cmd_spitest.o
COBJS-$(CONFIG_CMD_M2S_SPI_TEST) += cmd_spitest.o
COBJS-$(CONFIG_ARMCORTEXM3_SOC_INIT) += soc.o
COBJS := clock.o cpu.o envm.o wdt.o $(COBJS-y)
......
......@@ -23,7 +23,7 @@
#include <string.h>
#include "envm.h"
extern void a2f_spi_test(unsigned int bus, unsigned int cmd);
extern void m2s_spi_test(unsigned int bus, unsigned int cmd);
/*
* Run SPI test
......@@ -40,7 +40,7 @@ int do_spitest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (argc < 3) {
printf("%s: bus number and command must be specified\n",
(char *) argv[0]);
goto Done;
goto done;
}
/*
......@@ -49,16 +49,16 @@ int do_spitest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
bus = simple_strtoul(argv[1], NULL, 16);
if (bus != 0 && bus != 1 && bus != 2) {
printf("%s: bus number must be 0, 1 or 2\n", (char *) argv[0]);
goto Done;
goto done;
}
cmd = simple_strtoul(argv[2], NULL, 16);
/*
* Call the SPI driver in order to run actual test
*/
a2f_spi_test(bus, cmd);
m2s_spi_test(bus, cmd);
Done:
done:
return ret;
}
......
......@@ -27,7 +27,7 @@ LIB := $(obj)libspi.a
COBJS-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o
COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o
COBJS-$(CONFIG_A2F_SPI) += a2f_spi.o
COBJS-$(CONFIG_M2S_SPI) += m2s_spi.o
COBJS-$(CONFIG_BFIN_SPI) += bfin_spi.o
COBJS-$(CONFIG_CF_SPI) += cf_spi.o
COBJS-$(CONFIG_DAVINCI_SPI) += davinci_spi.o
......
......@@ -138,7 +138,7 @@
* Configure the SPI contoler device driver
* FIFO Size is 64K, but leave 5 bytes for cmd[] + addr[]
*/
#define CONFIG_A2F_SPI 1
#define CONFIG_M2S_SPI 1
#define CONFIG_SPI_MAX_XF_LEN 65530
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment