Blackfin: bfin_spi: use same gpio cs define as Linux
authorMike Frysinger <vapier@gentoo.org>
Mon, 20 Sep 2010 21:54:09 +0000 (17:54 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 21 Sep 2010 22:22:14 +0000 (18:22 -0400)
Linux uses an offset of 8 to switch from hardware cs to a gpio cs,
so have u-boot use the same value.  Also make sure it is public
for boards to access.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/include/asm/config-pre.h
drivers/spi/bfin_spi.c

index 4531519..4ce67d4 100644 (file)
@@ -71,6 +71,9 @@ static inline const char *get_bfin_boot_mode(int bfin_boot)
 # define BFIN_BOOT_SPI_SSEL 1
 #endif
 
+/* Define to get a GPIO CS with the Blackfin SPI controller */
+#define MAX_CTRL_CS 8
+
 /* There is no Blackfin/NetBSD port */
 #undef CONFIG_BOOTM_NETBSD
 
index e0ad029..556b97a 100644 (file)
@@ -35,8 +35,6 @@ MAKE_SPI_FUNC(SPI_BAUD, 0x14)
 
 #define to_bfin_spi_slave(s) container_of(s, struct bfin_spi_slave, slave)
 
-#define MAX_CTRL_CS 7
-
 #define gpio_cs(cs) ((cs) - MAX_CTRL_CS)
 #ifdef CONFIG_BFIN_SPI_GPIO_CS
 # define is_gpio_cs(cs) ((cs) > MAX_CTRL_CS)