mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
rk29: add ddr.h
This commit is contained in:
27
arch/arm/mach-rk29/include/mach/ddr.h
Normal file
27
arch/arm/mach-rk29/include/mach/ddr.h
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user