summaryrefslogtreecommitdiff
path: root/plat/sun50iw1p1/scp/arisc_i.h
blob: f44ffc182d493abdb2b566b3c1b9b7410cadc63b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
 *  arch/arm/mach-sun6i/arisc/arisc_i.h
 *
 * Copyright (c) 2012 Allwinner.
 * 2012-10-01 Written by superm (superm@allwinnertech.com).
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * 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.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __ARISC_I_H__
#define __ARISC_I_H__

//#include <asm/atomic.h>
//#include <asm/barrier.h>
//#include <asm/memory.h>
//#include <linux/arisc/arisc.h>
//#include <linux/sysfs.h>
//#include <linux/device.h>
//#include <linux/gpio.h>
//#include <linux/pinctrl/consumer.h>
//#include <linux/module.h>
//#include <linux/platform_device.h>
//#include <linux/delay.h>
//#include <linux/clk.h>
//#include <linux/arisc/arisc-notifier.h>
//#include <linux/of_address.h>
//#include <linux/of_irq.h>
//#include <linux/of_platform.h>

#include "./include/arisc_includes.h"

#define DRV_NAME    "sunxi-arisc"
#define DEV_NAME    "sunxi-arisc"

#if defined CONFIG_ARCH_SUN8IW1P1
#define DRV_VERSION "1.00"
#elif defined CONFIG_ARCH_SUN8IW3P1
#define DRV_VERSION "1.01"
#elif defined CONFIG_ARCH_SUN8IW5P1
#define DRV_VERSION "1.02"
#elif defined CONFIG_ARCH_SUN8IW6P1
#define DRV_VERSION "1.03"
#elif defined CONFIG_ARCH_SUN8IW7P1
#define DRV_VERSION "1.04"
#elif defined CONFIG_ARCH_SUN8IW9P1
#define DRV_VERSION "1.05"
#elif defined CONFIG_ARCH_SUN50IW1P1
#define DRV_VERSION "1.10"
#elif defined CONFIG_ARCH_SUN9IW1P1
#define DRV_VERSION "2.00"
#else
#error "please select a platform\n"
#endif

extern unsigned int arisc_debug_dram_crc_en;
extern unsigned int arisc_debug_dram_crc_srcaddr;
extern unsigned int arisc_debug_dram_crc_len;
extern unsigned int arisc_debug_dram_crc_error;
extern unsigned int arisc_debug_dram_crc_total_count;
extern unsigned int arisc_debug_dram_crc_error_count;
extern volatile const unsigned int arisc_debug_level;
extern struct standby_info_para arisc_powchk_back;

//local functions
extern int arisc_config_dram_paras(void);
extern int arisc_sysconfig_ir_paras(void);
extern int arisc_config_pmu_paras(void);
extern int arisc_suspend_flag_query(void);
#if (defined CONFIG_ARCH_SUN8IW7P1)
extern void arisc_power_off(void);
#endif
#endif  //__ARISC_I_H__