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

MIPS: BCM63XX: expose the HSSPI clock

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6178/

authored by

Jonas Gorski and committed by
Ralf Baechle
0ebe8aae 597ce172

+24
+24
arch/mips/bcm63xx/clk.c
··· 226 226 }; 227 227 228 228 /* 229 + * HSSPI clock 230 + */ 231 + static void hsspi_set(struct clk *clk, int enable) 232 + { 233 + u32 mask; 234 + 235 + if (BCMCPU_IS_6328()) 236 + mask = CKCTL_6328_HSSPI_EN; 237 + else if (BCMCPU_IS_6362()) 238 + mask = CKCTL_6362_HSSPI_EN; 239 + else 240 + return; 241 + 242 + bcm_hwclock_set(mask, enable); 243 + } 244 + 245 + static struct clk clk_hsspi = { 246 + .set = hsspi_set, 247 + }; 248 + 249 + 250 + /* 229 251 * XTM clock 230 252 */ 231 253 static void xtm_set(struct clk *clk, int enable) ··· 368 346 return &clk_usbd; 369 347 if (!strcmp(id, "spi")) 370 348 return &clk_spi; 349 + if (!strcmp(id, "hsspi")) 350 + return &clk_hsspi; 371 351 if (!strcmp(id, "xtm")) 372 352 return &clk_xtm; 373 353 if (!strcmp(id, "periph"))