rk29: add ddr.h
author黄涛 <huangtao@rock-chips.com>
Tue, 22 Mar 2011 04:05:50 +0000 (12:05 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 22 Mar 2011 04:51:35 +0000 (12:51 +0800)
arch/arm/mach-rk29/include/mach/ddr.h [new file with mode: 0644]
arch/arm/mach-rk29/include/mach/sram.h
arch/arm/mach-rk29/pm.c

diff --git a/arch/arm/mach-rk29/include/mach/ddr.h b/arch/arm/mach-rk29/include/mach/ddr.h
new file mode 100644 (file)
index 0000000..0616bde
--- /dev/null
@@ -0,0 +1,27 @@
+/* arch/arm/mach-rk29/include/mach/ddr.h
+ *
+ * Copyright (C) 2011 ROCKCHIP, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __ARCH_ARM_MACH_RK29_DDR_H
+#define __ARCH_ARM_MACH_RK29_DDR_H
+
+#include <linux/types.h>
+#include <mach/sram.h>
+
+void __sramfunc ddr_suspend(void);
+void __sramfunc ddr_resume(void);
+void __sramlocalfunc delayus(uint32_t us);
+void __sramfunc ddr_change_freq(uint32_t nMHz);
+
+#endif
index a7f91498420c6e5a2ce8691b218ee7ad994128ad..27d403c62e4397ec416565d3edb980f4e68073d0 100644 (file)
@@ -7,6 +7,8 @@
  * Author: Rickard Andersson <rickard.andersson@stericsson.com>
  */
 
+#ifndef __ARCH_ARM_MACH_RK29_SRAM_H
+#define __ARCH_ARM_MACH_RK29_SRAM_H
 #ifdef CONFIG_ARCH_RK29
 
 /* Tag variables with this */
@@ -34,4 +36,5 @@ static inline unsigned long ddr_save_sp(unsigned long new_sp)
 #define DDR_RESTORE_SP(save_sp)                do { ddr_save_sp(save_sp); } while (0)
 
 #endif
+#endif
 
index db339c485cdfba9d83cc249a058917a875695187..84c5b9866fb424092162a87511281e5d793988d2 100755 (executable)
@@ -24,6 +24,7 @@
 #include <mach/system.h>
 #include <mach/sram.h>
 #include <mach/gpio.h>
+#include <mach/ddr.h>
 
 #define cru_readl(offset)      readl(RK29_CRU_BASE + offset)
 #define cru_writel(v, offset)  do { writel(v, RK29_CRU_BASE + offset); readl(RK29_CRU_BASE + offset); } while (0)
@@ -44,11 +45,6 @@ static inline void delay_300us(void)
        LOOP(300 * LOOPS_PER_USEC);
 }
 
-extern void ddr_suspend(void);
-extern void ddr_resume(void);
-extern void delayus(uint32_t us);
-extern void ddr_change_freq(uint32_t nMHz);
-
 #ifdef DEBUG
 static void/* inline*/ __sramfunc printch(char byte)
 {