smemc.c (08d3df8c81537089fc8f21006b56f2f6fb23c6f8) | smemc.c (fd13f8117f7a2d4054bf420ec1428e918a24a480) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Static Memory Controller 4 */ 5 6#include <linux/module.h> 7#include <linux/kernel.h> 8#include <linux/init.h> 9#include <linux/io.h> 10#include <linux/syscore_ops.h> 11#include <linux/soc/pxa/cpu.h> 12 13#include <mach/smemc.h> | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Static Memory Controller 4 */ 5 6#include <linux/module.h> 7#include <linux/kernel.h> 8#include <linux/init.h> 9#include <linux/io.h> 10#include <linux/syscore_ops.h> 11#include <linux/soc/pxa/cpu.h> 12 13#include <mach/smemc.h> |
14#include <linux/soc/pxa/smemc.h> |
|
14 15#ifdef CONFIG_PM 16static unsigned long msc[2]; 17static unsigned long sxcnfg, memclkcfg; 18static unsigned long csadrcfg[4]; 19 20static int pxa3xx_smemc_suspend(void) 21{ --- 43 unchanged lines hidden (view full) --- 65 66 register_syscore_ops(&smemc_syscore_ops); 67 } 68 69 return 0; 70} 71subsys_initcall(smemc_init); 72#endif | 15 16#ifdef CONFIG_PM 17static unsigned long msc[2]; 18static unsigned long sxcnfg, memclkcfg; 19static unsigned long csadrcfg[4]; 20 21static int pxa3xx_smemc_suspend(void) 22{ --- 43 unchanged lines hidden (view full) --- 66 67 register_syscore_ops(&smemc_syscore_ops); 68 } 69 70 return 0; 71} 72subsys_initcall(smemc_init); 73#endif |
74 75static const unsigned int df_clkdiv[4] = { 1, 2, 4, 1 }; 76unsigned int pxa3xx_smemc_get_memclkdiv(void) 77{ 78 unsigned long memclkcfg = __raw_readl(MEMCLKCFG); 79 80 return df_clkdiv[(memclkcfg >> 16) & 0x3]; 81} |
|