//#include "api_flash.h"\r
#include "rknand_base.h"\r
#include <linux/clk.h>\r
-#include <linux/cpufreq.h>\r
\r
#define DRIVER_NAME "rk29xxnand"\r
\r
return 0;\r
}\r
\r
-#ifdef CONFIG_CPU_FREQ\r
-static int rknand_cpufreq_transition(struct notifier_block *nb, unsigned long val, void *data)\r
-{\r
- if(val == CPUFREQ_POSTCHANGE)\r
- rknand_nand_timing_cfg();\r
- return 0;\r
-}\r
-\r
-static inline int rknand_cpufreq_register(void)\r
-{\r
- nandc_freq_transition.notifier_call = rknand_cpufreq_transition;\r
- return cpufreq_register_notifier(&nandc_freq_transition, CPUFREQ_TRANSITION_NOTIFIER);\r
-}\r
-\r
-static inline void rknand_cpufreq_deregister(void)\r
-{\r
- cpufreq_unregister_notifier(&nandc_freq_transition, CPUFREQ_TRANSITION_NOTIFIER);\r
-}\r
-#else\r
-static inline int rknand_cpufreq_register(void)\r
-{\r
- return 0;\r
-}\r
-\r
-static inline void rknand_cpufreq_deregister(void)\r
-{\r
-}\r
-#endif\r
-\r
static int rknand_info_init(struct rknand_info *nand_info)\r
{\r
struct mtd_info *mtd = &rknand_mtd;\r
\r
nandc_clk = clk_get(NULL, "nandc");\r
clk_enable(nandc_clk);\r
- rknand_cpufreq_register();\r
rknand_nand_timing_cfg();\r
\r
return 0;\r