aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2013-01-06 15:48:50 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-09 14:37:09 -0500
commit72a525cbb8037ecf8663720b7087e8e6fc77a49a (patch)
treef4fa7fc864e32a5a83884442fa5cc4c745c9c475 /drivers/ssb
parent79afb22d093993ef50f250f5368b565d0a0b7569 (diff)
ssb: add place for serial flash driver
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb')
-rw-r--r--drivers/ssb/Kconfig5
-rw-r--r--drivers/ssb/Makefile1
-rw-r--r--drivers/ssb/driver_chipcommon_sflash.c18
-rw-r--r--drivers/ssb/driver_mipscore.c3
-rw-r--r--drivers/ssb/ssb_private.h11
5 files changed, 37 insertions, 1 deletions
diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
index ff3c8a21f10d..f7305e2fddcc 100644
--- a/drivers/ssb/Kconfig
+++ b/drivers/ssb/Kconfig
@@ -136,6 +136,11 @@ config SSB_DRIVER_MIPS
136 136
137 If unsure, say N 137 If unsure, say N
138 138
139config SSB_SFLASH
140 bool "SSB serial flash support"
141 depends on SSB_DRIVER_MIPS && BROKEN
142 default y
143
139# Assumption: We are on embedded, if we compile the MIPS core. 144# Assumption: We are on embedded, if we compile the MIPS core.
140config SSB_EMBEDDED 145config SSB_EMBEDDED
141 bool 146 bool
diff --git a/drivers/ssb/Makefile b/drivers/ssb/Makefile
index 9159ba77c388..b1ddc116d387 100644
--- a/drivers/ssb/Makefile
+++ b/drivers/ssb/Makefile
@@ -11,6 +11,7 @@ ssb-$(CONFIG_SSB_SDIOHOST) += sdio.o
11# built-in drivers 11# built-in drivers
12ssb-y += driver_chipcommon.o 12ssb-y += driver_chipcommon.o
13ssb-y += driver_chipcommon_pmu.o 13ssb-y += driver_chipcommon_pmu.o
14ssb-$(CONFIG_SSB_SFLASH) += driver_chipcommon_sflash.o
14ssb-$(CONFIG_SSB_DRIVER_MIPS) += driver_mipscore.o 15ssb-$(CONFIG_SSB_DRIVER_MIPS) += driver_mipscore.o
15ssb-$(CONFIG_SSB_DRIVER_EXTIF) += driver_extif.o 16ssb-$(CONFIG_SSB_DRIVER_EXTIF) += driver_extif.o
16ssb-$(CONFIG_SSB_DRIVER_PCICORE) += driver_pcicore.o 17ssb-$(CONFIG_SSB_DRIVER_PCICORE) += driver_pcicore.o
diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c
new file mode 100644
index 000000000000..866269774e86
--- /dev/null
+++ b/drivers/ssb/driver_chipcommon_sflash.c
@@ -0,0 +1,18 @@
1/*
2 * Sonics Silicon Backplane
3 * ChipCommon serial flash interface
4 *
5 * Licensed under the GNU/GPL. See COPYING for details.
6 */
7
8#include <linux/ssb/ssb.h>
9
10#include "ssb_private.h"
11
12/* Initialize serial flash access */
13int ssb_sflash_init(struct ssb_chipcommon *cc)
14{
15 pr_err("Serial flash support is not implemented yet!\n");
16
17 return -ENOTSUPP;
18}
diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c
index 5bd05b136d22..2a7684c90243 100644
--- a/drivers/ssb/driver_mipscore.c
+++ b/drivers/ssb/driver_mipscore.c
@@ -203,7 +203,8 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
203 switch (bus->chipco.capabilities & SSB_CHIPCO_CAP_FLASHT) { 203 switch (bus->chipco.capabilities & SSB_CHIPCO_CAP_FLASHT) {
204 case SSB_CHIPCO_FLASHT_STSER: 204 case SSB_CHIPCO_FLASHT_STSER:
205 case SSB_CHIPCO_FLASHT_ATSER: 205 case SSB_CHIPCO_FLASHT_ATSER:
206 pr_err("Serial flash not supported\n"); 206 pr_debug("Found serial flash\n");
207 ssb_sflash_init(&bus->chipco);
207 break; 208 break;
208 case SSB_CHIPCO_FLASHT_PARA: 209 case SSB_CHIPCO_FLASHT_PARA:
209 pr_debug("Found parallel flash\n"); 210 pr_debug("Found parallel flash\n");
diff --git a/drivers/ssb/ssb_private.h b/drivers/ssb/ssb_private.h
index 6c10b66c796c..77d942630750 100644
--- a/drivers/ssb/ssb_private.h
+++ b/drivers/ssb/ssb_private.h
@@ -217,6 +217,17 @@ extern u32 ssb_chipco_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt,
217 u32 ticks); 217 u32 ticks);
218extern u32 ssb_chipco_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms); 218extern u32 ssb_chipco_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);
219 219
220/* driver_chipcommon_sflash.c */
221#ifdef CONFIG_SSB_SFLASH
222int ssb_sflash_init(struct ssb_chipcommon *cc);
223#else
224static inline int ssb_sflash_init(struct ssb_chipcommon *cc)
225{
226 pr_err("Serial flash not supported\n");
227 return 0;
228}
229#endif /* CONFIG_SSB_SFLASH */
230
220#ifdef CONFIG_SSB_DRIVER_EXTIF 231#ifdef CONFIG_SSB_DRIVER_EXTIF
221extern u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks); 232extern u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks);
222extern u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms); 233extern u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);