Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
#include <linux/of_platform.h>
#include <linux/of_fdt.h>
#include <asm/cputype.h>
#include <linux/of_platform.h>
#include <linux/of_fdt.h>
#include <asm/cputype.h>
+#ifdef CONFIG_CACHE_L2X0
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/cache-l2x0.h>
#include <linux/rockchip/common.h>
#include <linux/rockchip/pmu.h>
#include "cpu_axi.h"
#include <linux/rockchip/common.h>
#include <linux/rockchip/pmu.h>
#include "cpu_axi.h"
}
early_initcall(rockchip_cpu_axi_init);
}
early_initcall(rockchip_cpu_axi_init);
+#ifdef CONFIG_CACHE_L2X0
static int __init rockchip_pl330_l2_cache_init(void)
{
struct device_node *np;
static int __init rockchip_pl330_l2_cache_init(void)
{
struct device_node *np;
return 0;
}
early_initcall(rockchip_pl330_l2_cache_init);
return 0;
}
early_initcall(rockchip_pl330_l2_cache_init);
struct gen_pool *rockchip_sram_pool = NULL;
struct pie_chunk *rockchip_pie_chunk = NULL;
struct gen_pool *rockchip_sram_pool = NULL;
struct pie_chunk *rockchip_pie_chunk = NULL;
#include <linux/delay.h>
#include <linux/rockchip/cpu.h>
#include <linux/rockchip/iomap.h>
#include <linux/delay.h>
#include <linux/rockchip/cpu.h>
#include <linux/rockchip/iomap.h>
#include <asm/system_info.h>
#include <asm/system_info.h>
#include "efuse.h"
#define efuse_readl(offset) readl_relaxed(RK_EFUSE_VIRT + offset)
#include "efuse.h"
#define efuse_readl(offset) readl_relaxed(RK_EFUSE_VIRT + offset)
return efuse_buf[23+ch];
}
return efuse_buf[23+ch];
}
static void __init rk3288_set_system_serial(void)
{
int i;
static void __init rk3288_set_system_serial(void)
{
int i;
system_serial_low = crc32(0, buf, 8);
system_serial_high = crc32(system_serial_low, buf + 8, 8);
}
system_serial_low = crc32(0, buf, 8);
system_serial_high = crc32(system_serial_low, buf + 8, 8);
}
+#else
+static inline void __init rk3288_set_system_serial(void) {}
+#endif
int rk312x_efuse_readregs(u32 addr, u32 length, u8 *buf)
{
int rk312x_efuse_readregs(u32 addr, u32 length, u8 *buf)
{
log_buf = last_log_vmap(virt_to_phys(buf), 1 << LOG_BUF_PAGE_ORDER);
if (!log_buf) {
log_buf = last_log_vmap(virt_to_phys(buf), 1 << LOG_BUF_PAGE_ORDER);
if (!log_buf) {
- pr_err("failed to map %d pages at 0x%08x\n", 1 << LOG_BUF_PAGE_ORDER, virt_to_phys(buf));
+ pr_err("failed to map %d pages at 0x%08llx\n", 1 << LOG_BUF_PAGE_ORDER,
+ (unsigned long long)virt_to_phys(buf));
memcpy(log_buf, early_log_buf, early_log_size);
memset(log_buf + early_log_size, 0, LOG_BUF_LEN - early_log_size);
memcpy(log_buf, early_log_buf, early_log_size);
memset(log_buf + early_log_size, 0, LOG_BUF_LEN - early_log_size);
- pr_info("0x%08x map to 0x%p and copy to 0x%p, size 0x%x early 0x%x (version 3.0)\n", virt_to_phys(buf), log_buf, last_log_buf, LOG_BUF_LEN, early_log_size);
+ pr_info("0x%08llx map to 0x%p and copy to 0x%p, size 0x%x early 0x%zx (version 3.0)\n", (unsigned long long)virt_to_phys(buf), log_buf, last_log_buf, LOG_BUF_LEN, early_log_size);
entry = proc_create("last_kmsg", S_IRUSR, NULL, &last_log_fops);
if (!entry) {
entry = proc_create("last_kmsg", S_IRUSR, NULL, &last_log_fops);
if (!entry) {
\r
unsigned long rknand_dma_flush_dcache(unsigned long ptr,int size,int dir)\r
{\r
\r
unsigned long rknand_dma_flush_dcache(unsigned long ptr,int size,int dir)\r
{\r
+#ifdef CONFIG_ARM64\r
+ __flush_dcache_area((void *)ptr, size + 63);\r
+#else\r
__cpuc_flush_dcache_area((void*)ptr, size + 63);\r
__cpuc_flush_dcache_area((void*)ptr, size + 63);\r
return ((unsigned long )virt_to_phys((void *)ptr));\r
}\r
EXPORT_SYMBOL(rknand_dma_flush_dcache);\r
return ((unsigned long )virt_to_phys((void *)ptr));\r
}\r
EXPORT_SYMBOL(rknand_dma_flush_dcache);\r
#include <asm/io.h>
#include "pm.h"
#include <asm/io.h>
#include "pm.h"
/*************************dump reg********************************************/
void rkpm_ddr_reg_offset_dump(void __iomem * base_addr,u32 _offset)
/*************************dump reg********************************************/
void rkpm_ddr_reg_offset_dump(void __iomem * base_addr,u32 _offset)
suspend_set_ops(&rockchip_suspend_ops);
return;
}
suspend_set_ops(&rockchip_suspend_ops);
return;
}
static enum rockchip_pm_policy pm_policy;
static BLOCKING_NOTIFIER_HEAD(policy_notifier_list);
static enum rockchip_pm_policy pm_policy;
static BLOCKING_NOTIFIER_HEAD(policy_notifier_list);
#define __MACH_ROCKCHIP_SRAM_H
#include <linux/pie.h>
#define __MACH_ROCKCHIP_SRAM_H
#include <linux/pie.h>
extern char __pie_common_start[];
extern char __pie_common_end[];
extern char __pie_common_start[];
extern char __pie_common_end[];