mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
rk2928: add mach/cpu.h: soc_is_rk2926, soc_is_rk2928g, soc_is_rk2928l
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <mach/fiq.h>
|
||||
#include <mach/loader.h>
|
||||
#include <mach/ddr.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
static void __init rk2928_cpu_axi_init(void)
|
||||
{
|
||||
@@ -109,6 +110,7 @@ void __init rk2928_init_irq(void)
|
||||
rk_fiq_init();
|
||||
#endif
|
||||
rk30_gpio_init();
|
||||
soc_gpio_init();
|
||||
}
|
||||
|
||||
extern void __init rk2928_map_common_io(void);
|
||||
|
||||
28
arch/arm/mach-rk2928/include/mach/cpu.h
Executable file
28
arch/arm/mach-rk2928/include/mach/cpu.h
Executable file
@@ -0,0 +1,28 @@
|
||||
#ifndef __MACH_CPU_H
|
||||
#define __MACH_CPU_H
|
||||
|
||||
#include <mach/io.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#define SOC_RK2928G 0x01
|
||||
#define SOC_RK2928L 0x02
|
||||
#define SOC_RK2926 0x00
|
||||
|
||||
static inline void soc_gpio_init(void)
|
||||
{
|
||||
writel_relaxed(readl_relaxed(RK2928_GPIO3_BASE + 0x04) & (~0x07), RK2928_GPIO3_BASE + 0x04);
|
||||
}
|
||||
static inline int soc_is_rk2928g(void)
|
||||
{
|
||||
return ((readl_relaxed(RK2928_GPIO3_BASE + 0x50) & 0x07) == SOC_RK2928G);
|
||||
}
|
||||
static inline int soc_is_rk2928l(void)
|
||||
{
|
||||
return ((readl_relaxed(RK2928_GPIO3_BASE + 0x50) & 0x07) == SOC_RK2928L);
|
||||
}
|
||||
static inline int soc_is_rk2926(void)
|
||||
{
|
||||
return ((readl_relaxed(RK2928_GPIO3_BASE + 0x50) & 0x07) == SOC_RK2926);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user