Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rafał Miłecki and committed by
John W. Linville
72a525cb 79afb22d

+37 -1
+5
drivers/ssb/Kconfig
··· 136 136 137 137 If unsure, say N 138 138 139 + config SSB_SFLASH 140 + bool "SSB serial flash support" 141 + depends on SSB_DRIVER_MIPS && BROKEN 142 + default y 143 + 139 144 # Assumption: We are on embedded, if we compile the MIPS core. 140 145 config SSB_EMBEDDED 141 146 bool
+1
drivers/ssb/Makefile
··· 11 11 # built-in drivers 12 12 ssb-y += driver_chipcommon.o 13 13 ssb-y += driver_chipcommon_pmu.o 14 + ssb-$(CONFIG_SSB_SFLASH) += driver_chipcommon_sflash.o 14 15 ssb-$(CONFIG_SSB_DRIVER_MIPS) += driver_mipscore.o 15 16 ssb-$(CONFIG_SSB_DRIVER_EXTIF) += driver_extif.o 16 17 ssb-$(CONFIG_SSB_DRIVER_PCICORE) += driver_pcicore.o
+18
drivers/ssb/driver_chipcommon_sflash.c
··· 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 */ 13 + int ssb_sflash_init(struct ssb_chipcommon *cc) 14 + { 15 + pr_err("Serial flash support is not implemented yet!\n"); 16 + 17 + return -ENOTSUPP; 18 + }
+2 -1
drivers/ssb/driver_mipscore.c
··· 203 203 switch (bus->chipco.capabilities & SSB_CHIPCO_CAP_FLASHT) { 204 204 case SSB_CHIPCO_FLASHT_STSER: 205 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 208 break; 208 209 case SSB_CHIPCO_FLASHT_PARA: 209 210 pr_debug("Found parallel flash\n");
+11
drivers/ssb/ssb_private.h
··· 217 217 u32 ticks); 218 218 extern 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 222 + int ssb_sflash_init(struct ssb_chipcommon *cc); 223 + #else 224 + static 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 231 #ifdef CONFIG_SSB_DRIVER_EXTIF 221 232 extern u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks); 222 233 extern u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);