diff options
Diffstat (limited to 'plat/sun50iw1p1/scp/include')
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_cfgs.h | 74 | ||||
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_dbgs.h | 66 | ||||
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_hwmsgbox.h | 77 | ||||
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_hwspinlock.h | 63 | ||||
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_includes.h | 91 | ||||
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_message_manager.h | 73 | ||||
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_messages.h | 81 | ||||
-rw-r--r-- | plat/sun50iw1p1/scp/include/arisc_para.h | 192 |
8 files changed, 0 insertions, 717 deletions
diff --git a/plat/sun50iw1p1/scp/include/arisc_cfgs.h b/plat/sun50iw1p1/scp/include/arisc_cfgs.h deleted file mode 100644 index 32234ba..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_cfgs.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * arch/arm/mach-sunxi/arisc/include/arisc_cfgs.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_CFGS_H -#define __ARISC_CFGS_H - -/* arisc software version number */ -#if defined CONFIG_ARCH_SUN8IW1P1 -#define ARISC_VERSIONS (100) -#elif defined CONFIG_ARCH_SUN8IW3P1 -#define ARISC_VERSIONS (101) -#elif defined CONFIG_ARCH_SUN8IW5P1 -#define ARISC_VERSIONS (102) -#elif defined CONFIG_ARCH_SUN8IW6P1 -#define ARISC_VERSIONS (103) -#elif defined CONFIG_ARCH_SUN8IW7P1 -#define ARISC_VERSIONS (104) -#elif defined CONFIG_ARCH_SUN8IW9P1 -#define ARISC_VERSIONS (105) -#elif defined CONFIG_ARCH_SUN50IW1P1 -#define ARISC_VERSIONS (110) -#elif defined CONFIG_ARCH_SUN9IW1P1 -#define ARISC_VERSIONS (200) -#else -#error "please select a platform\n" -#endif - -/* debugger system */ -#define ARISC_DEBUG_ON -#define ARISC_DEBUG_LEVEL (3) /* debug level */ - -/* the max number of cached message frame */ -#define ARISC_MESSAGE_CACHED_MAX (4) - -/* spinlock max timeout, base on ms */ -#define ARISC_SPINLOCK_TIMEOUT (100) - -/* send message max timeout, base on ms */ -#define ARISC_SEND_MSG_TIMEOUT (4000) - -/* hwmsgbox channels configure */ -#define ARISC_HWMSGBOX_ARISC_ASYN_TX_CH (0) -#define ARISC_HWMSGBOX_ARISC_ASYN_RX_CH (1) -#define ARISC_HWMSGBOX_ARISC_SYN_TX_CH (2) -#define ARISC_HWMSGBOX_ARISC_SYN_RX_CH (3) -#define ARISC_HWMSGBOX_AC327_SYN_TX_CH (4) -#define ARISC_HWMSGBOX_AC327_SYN_RX_CH (5) - -/* dvfs config */ -#define ARISC_DVFS_VF_TABLE_MAX (16) -/* ir config */ -#define ARISC_IR_KEY_SUP_NUM (8) /* the number of IR remote support */ - -#define ARISC_DEV_CLKSRC_NUM (4) /* the number of dev clocksource support */ - -#endif /* __ARISC_CFGS_H */ diff --git a/plat/sun50iw1p1/scp/include/arisc_dbgs.h b/plat/sun50iw1p1/scp/include/arisc_dbgs.h deleted file mode 100644 index 79ca603..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_dbgs.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * arch/arm/mach-sunxi/arisc/include/arisc_dbgs.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_DBGS_H -#define __ARISC_DBGS_H - -/* - * debug level define, - * level 0 : dump debug information--none; - * level 1 : dump debug information--error; - * level 2 : dump debug information--error+warning; - * level 3 : dump debug information--error+warning+information; - * extern void printk(const char *, ...); - */ -#ifdef ARISC_DEBUG_ON -/* debug levels */ -#define DEBUG_LEVEL_INF ((uint32_t)1 << 0) -#define DEBUG_LEVEL_LOG ((uint32_t)1 << 1) -#define DEBUG_LEVEL_WRN ((uint32_t)1 << 2) -#define DEBUG_LEVEL_ERR ((uint32_t)1 << 3) - -#define ARISC_INF(...) \ - if(DEBUG_LEVEL_INF & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP] :" __VA_ARGS__); - -#define ARISC_LOG(...) \ - if(DEBUG_LEVEL_LOG & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP] :" __VA_ARGS__); - -#define ARISC_WRN(...) \ - if(DEBUG_LEVEL_WRN & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP WARING] :" __VA_ARGS__); - -#define ARISC_ERR(...) \ - if(DEBUG_LEVEL_ERR & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP ERROR] :" __VA_ARGS__); - -#else /* ARISC_DEBUG_ON */ -#define ARISC_INF(...) -#define ARISC_WRN(...) -#define ARISC_ERR(...) -#define ARISC_LOG(...) -#endif /* ARISC_DEBUG_ON */ - -/* report error information id */ -#define ERR_NMI_INT_TIMEOUT (0x1) - -#endif /* __ARISC_DBGS_H */ diff --git a/plat/sun50iw1p1/scp/include/arisc_hwmsgbox.h b/plat/sun50iw1p1/scp/include/arisc_hwmsgbox.h deleted file mode 100644 index 4bab7bc..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_hwmsgbox.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * arch/arm/mach-sunxi/arisc/include/arisc_hwmsgbox.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_HWMSGBOX_H -#define __ARISC_HWMSGBOX_H - -//the number of hardware message queue. -#define AW_HWMSG_QUEUE_NUMBER (8) - -//the user of hardware message queue. -typedef enum aw_hwmsg_queue_user -{ - AW_HWMSG_QUEUE_USER_ARISC, //arisc - AW_HWMSG_QUEUE_USER_AC327, //cpu0 -} aw_hwmsg_queue_user_e; - -/** - * initialize hwmsgbox. - * @para: none. - * - * returns: OK if initialize hwmsgbox succeeded, others if failed. - */ -int arisc_hwmsgbox_init(void); - -/** - * exit hwmsgbox. - * @para: none. - * - * returns: OK if exit hwmsgbox succeeded, others if failed. - */ -int arisc_hwmsgbox_exit(void); - -/** - * send one message to another processor by hwmsgbox. - * @pmessage: the pointer of sended message frame. - * @timeout: the wait time limit when message fifo is full, - * it is valid only when parameter mode = SEND_MESSAGE_WAIT_TIMEOUT. - * - * returns: OK if send message succeeded, other if failed. - */ -int arisc_hwmsgbox_send_message(struct arisc_message *pmessage, unsigned int timeout); - -/** - * Description: query message of hwmsgbox by hand, mainly for. - * @para: none. - * - * returns: the point of message, NULL if timeout. - */ -struct arisc_message *arisc_hwmsgbox_query_message(void); - -int arisc_hwmsgbox_enable_receiver_int(int queue, int user); -int arisc_hwmsgbox_disable_receiver_int(int queue, int user); - -int arisc_hwmsgbox_feedback_message(struct arisc_message *pmessage, unsigned int timeout); - -int arisc_hwmsgbox_standby_resume(void); -int arisc_hwmsgbox_standby_suspend(void); - -#endif /* __ARISC_HWMSGBOX_H */ diff --git a/plat/sun50iw1p1/scp/include/arisc_hwspinlock.h b/plat/sun50iw1p1/scp/include/arisc_hwspinlock.h deleted file mode 100644 index 2b34276..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_hwspinlock.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * arch/arm/mach-sunxi/arisc/include/arisc_hwspinlock.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_HW_SPINLOCK_H -#define __ARISC_HW_SPINLOCK_H - -/* the max number of hardware spinlock */ -#define ARISC_HW_SPINLOCK_NUM (32) - -/** - * initialize hwspinlock. - * @para: none. - * - * returns: OK if initialize hwspinlock succeeded, others if failed. - */ -int arisc_hwspinlock_init(void); - -/** - * exit hwspinlock. - * @para: none. - * - * returns: OK if exit hwspinlock succeeded, others if failed. - */ -int arisc_hwspinlock_exit(void); - -/** - * lock an hwspinlock with timeout limit. - * @hwid : an hwspinlock id which we want to lock. - * - * returns: OK if lock hwspinlock succeeded, other if failed. - */ -int arisc_hwspin_lock(int hwid); - -/** - * unlock a specific hwspinlock. - * @hwid : an hwspinlock id which we want to unlock. - * - * returns: OK if unlock hwspinlock succeeded, other if failed. - */ -int arisc_hwspin_unlock(int hwid); - -int arisc_hwspinlock_standby_suspend(void); -int arisc_hwspinlock_standby_resume(void); - -#endif /* __ARISC_HW_SPINLOCK_H */ diff --git a/plat/sun50iw1p1/scp/include/arisc_includes.h b/plat/sun50iw1p1/scp/include/arisc_includes.h deleted file mode 100644 index c32970f..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_includes.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * arch/arm/mach-sunxi/arisc/include/arisc_includes.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_INCLUDES_H -#define __ARISC_INCLUDES_H - -//#include <linux/kernel.h> -//#include <linux/module.h> -//#include <linux/string.h> -//#include <linux/spinlock.h> -//#include <linux/err.h> -//#include <linux/io.h> -//#include <linux/slab.h> -//#include <linux/semaphore.h> -//#include <linux/interrupt.h> -//#include <linux/jiffies.h> -//#include <linux/delay.h> -//#include <linux/arisc/hwmsgbox.h> -//#include <linux/arisc/hwspinlock.h> -#define CONFIG_ARCH_SUN50IW1P1 - -#include <arch_helpers.h> -#include <platform.h> -#include <platform_def.h> -#include <bakery_lock.h> -#include <mmio.h> -#include <debug.h> -#include <stdint.h> -#include <stdio.h> -#include <string.h> -#include <assert.h> -#include <errno.h> -#include <psci.h> -#include <bakery_lock.h> -#include <spinlock.h> -#include <arisc.h> - -#include "../../sunxi_private.h" -#include "../../sunxi_cpu_ops.h" -#include "../../sunxi_def.h" -#include "../../mhu.h" -#include "../../scpi.h" - -/* configure and debugger */ -#include "../arisc_i.h" -#include "./arisc_cfgs.h" -#include "./arisc_dbgs.h" -#include "./arisc_para.h" - -/* messages define */ -#include "./arisc_messages.h" -#include "./arisc_message_manager.h" - -/* driver headers */ -#include "./arisc_hwmsgbox.h" -#include "./arisc_hwspinlock.h" - -#define readl(x) mmio_read_32((x)) -#define writel(v, a) mmio_write_32((a), (v)) - -/* global functions */ -extern int arisc_axp_int_notify(struct arisc_message *pmessage); -extern int arisc_audio_perdone_notify(struct arisc_message *pmessage); -extern int arisc_dvfs_cfg_vf_table(void); -extern int arisc_query_set_standby_info(struct standby_info_para *para, arisc_rw_type_e op); -extern int arisc_sysconfig_sstpower_paras(void); -extern int arisc_report_error_info(struct arisc_message *pmessage); - -/* global vars */ -extern unsigned long arisc_sram_a2_base; -extern struct dts_cfg dts_cfg; - -#endif /* __ARISC_INCLUDES_H */ diff --git a/plat/sun50iw1p1/scp/include/arisc_message_manager.h b/plat/sun50iw1p1/scp/include/arisc_message_manager.h deleted file mode 100644 index 5b80596..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_message_manager.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * arch/arm/mach-sunxi/arisc/include/arisc_message_manager.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_MESSAGE_MANAGER_H -#define __ARISC_MESSAGE_MANAGER_H - -/** - * initialize message manager. - * @para: none. - * - * returns: OK if initialize succeeded, others if failed. - */ -int arisc_message_manager_init(void *addr, uint32_t size); - -/** - * exit message manager. - * para: none. - * - * returns: OK if exit succeeded, others if failed. - */ -int arisc_message_manager_exit(void); - -/** - * allocate one message frame. mainly use for send message by message-box, - * the message frame allocate form messages pool shared memory area. - * @para: none. - * - * returns: the pointer of allocated message frame, NULL if failed; - */ -struct arisc_message *arisc_message_allocate(unsigned int msg_attr); - -/** - * free one message frame. mainly use for process message finished, - * free it to messages pool or add to free message queue. - * @pmessage: the pointer of free message frame. - * - * returns: none. - */ -void arisc_message_free(struct arisc_message *pmessage); - -/** - * notify system that one message coming. - * @pmessage : the pointer of coming message frame. - * - * returns: OK if notify succeeded, other if failed. - */ -int arisc_message_coming_notify(struct arisc_message *pmessage); - -int arisc_semaphore_used_num_query(void); - -struct arisc_message *arisc_message_map_to_cpux(uint32_t addr); -uint32_t arisc_message_map_to_cpus(struct arisc_message *message); -int arisc_message_valid(struct arisc_message *pmessage); - -#endif /* __MESSAGE_MANAGER_H */ diff --git a/plat/sun50iw1p1/scp/include/arisc_messages.h b/plat/sun50iw1p1/scp/include/arisc_messages.h deleted file mode 100644 index 98c47b1..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_messages.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * arch/arm/mach-sunxi/arisc/include/arisc_messages.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_MESSAGES_H__ -#define __ARISC_MESSAGES_H__ - -#include <arisc.h> - -/* message states */ -#define ARISC_MESSAGE_FREED (0x0) /* freed state */ -#define ARISC_MESSAGE_ALLOCATED (0x1) /* allocated state */ -#define ARISC_MESSAGE_INITIALIZED (0x2) /* initialized state */ -#define ARISC_MESSAGE_RECEIVED (0x3) /* received state */ -#define ARISC_MESSAGE_PROCESSING (0x4) /* processing state */ -#define ARISC_MESSAGE_PROCESSED (0x5) /* processed state */ -#define ARISC_MESSAGE_FEEDBACKED (0x6) /* feedback state */ - -/* call back struct */ -typedef struct arisc_msg_cb -{ - arisc_cb_t handler; - void *arg; -} arisc_msg_cb_t; - -#ifdef CONFIG_ARCH_SUN50IW1P1 -/* - * the structure of message frame, - * this structure will transfer between arisc and ac327. - * sizeof(struct message) : 128Byte. - */ -typedef struct arisc_message -{ - volatile unsigned char state; /* identify the used status of message frame */ - volatile unsigned char attr; /* message attribute : SYN OR ASYN */ - volatile unsigned char type; /* message type : DVFS_REQ */ - volatile unsigned char result; /* message process result */ - volatile unsigned char reserved[4]; /* reserved for 8byte align */ - volatile struct arisc_message *next; /* pointer of next message frame */ - volatile struct arisc_msg_cb cb; /* the callback function and arg of message */ - volatile void *private; /* message private data */ - volatile unsigned int paras[22]; /* the parameters of message */ -} arisc_message_t; -#else -/* - * the structure of message frame, - * this structure will transfer between arisc and ac327. - * sizeof(struct message) : 64Byte. - */ -typedef struct arisc_message -{ - volatile unsigned char state; /* identify the used status of message frame */ - volatile unsigned char attr; /* message attribute : SYN OR ASYN */ - volatile unsigned char type; /* message type : DVFS_REQ */ - volatile unsigned char result; /* message process result */ - volatile struct arisc_message *next; /* pointer of next message frame */ - volatile struct arisc_msg_cb cb; /* the callback function and arg of message */ - volatile void *private; /* message private data */ - volatile unsigned int paras[11]; /* the parameters of message */ -} arisc_message_t; -#endif - -#endif /* __ARISC_MESSAGES_H */ diff --git a/plat/sun50iw1p1/scp/include/arisc_para.h b/plat/sun50iw1p1/scp/include/arisc_para.h deleted file mode 100644 index 1943759..0000000 --- a/plat/sun50iw1p1/scp/include/arisc_para.h +++ /dev/null @@ -1,192 +0,0 @@ -#ifndef __ARISC_PARA_H__ -#define __ARISC_PARA_H__ - -#define ARISC_MACHINE_PAD 0 -#define ARISC_MACHINE_HOMLET 1 - -/* arisc parameter size: 128byte */ -/* - * machine: machine id, pad = 0, homlet = 1; - * message_pool_phys: message pool physical address; - * message_pool_size: message pool size; - */ -#define SERVICES_DVFS_USED (1<<0) - -/* FIXME: if you modify this struct, you should - * sync this change with linux source, - * by superm at 2015-05-15. - */ -typedef enum power_dm -{ - DM_CPUA = 0, /* 0 */ - DM_CPUB, /* 1 */ - DM_DRAM, /* 2 */ - DM_GPU, /* 3 */ - DM_SYS, /* 4 */ - DM_VPU, /* 5 */ - DM_CPUS, /* 6 */ - DM_DRAMPLL, /* 7 */ - DM_ADC, /* 8 */ - DM_PL, /* 9 */ - DM_PM, /* 10 */ - DM_IO, /* 11 */ - DM_CPVDD, /* 12 */ - DM_LDOIN, /* 13 */ - DM_PLL, /* 14 */ - DM_LPDDR, /* 15 */ - DM_TEST, /* 16 */ - DM_RES1, /* 17 */ - DM_RES2, /* 18 */ - DM_RES3, /* 19 */ - DM_MAX, /* 20 */ -} power_dm_e; - -typedef struct mem_cfg -{ - uintptr_t base; - size_t size; -} mem_cfg_t; - -typedef struct dev_cfg -{ - uintptr_t base; - size_t size; - uint32_t irq; - int status; -} dev_cfg_t; - -typedef struct cir_cfg -{ - uintptr_t base; - size_t size; - uint32_t irq; - uint32_t power_key_code; - uint32_t addr_code; - int status; -} cir_cfg_t; - -typedef struct pmu_cfg -{ - uint32_t pmu_bat_shutdown_ltf; - uint32_t pmu_bat_shutdown_htf; - uint32_t pmu_pwroff_vol; - uint32_t power_start; -} pmu_cfg_t; - -typedef struct power_cfg -{ - uint32_t powchk_used; - uint32_t power_reg; - uint32_t system_power; -} power_cfg_t; - -typedef struct image_cfg -{ - uintptr_t base; - size_t size; -} image_cfg_t; - -typedef struct space_cfg -{ - uintptr_t sram_dst; - uintptr_t sram_offset; - size_t sram_size; - uintptr_t dram_dst; - uintptr_t dram_offset; - size_t dram_size; - uintptr_t para_dst; - uintptr_t para_offset; - size_t para_size; - uintptr_t msgpool_dst; - uintptr_t msgpool_offset; - size_t msgpool_size; - uintptr_t standby_dst; - uintptr_t standby_offset; - size_t standby_size; -} space_cfg_t; - -typedef struct dram_para -{ - //normal configuration - uint32_t dram_clk; - uint32_t dram_type; //dram_type DDR2: 2 DDR3: 3 LPDDR2: 6 DDR3L: 31 - uint32_t dram_zq; - uint32_t dram_odt_en; - - //control configuration - uint32_t dram_para1; - uint32_t dram_para2; - - //timing configuration - uint32_t dram_mr0; - uint32_t dram_mr1; - uint32_t dram_mr2; - uint32_t dram_mr3; - uint32_t dram_tpr0; - uint32_t dram_tpr1; - uint32_t dram_tpr2; - uint32_t dram_tpr3; - uint32_t dram_tpr4; - uint32_t dram_tpr5; - uint32_t dram_tpr6; - - //reserved for future use - uint32_t dram_tpr7; - uint32_t dram_tpr8; - uint32_t dram_tpr9; - uint32_t dram_tpr10; - uint32_t dram_tpr11; - uint32_t dram_tpr12; - uint32_t dram_tpr13; - -}dram_para_t; - -typedef struct arisc_freq_voltage -{ - uint32_t freq; //cpu frequency - uint32_t voltage; //voltage for the frequency - uint32_t axi_div; //the divide ratio of axi bus -} arisc_freq_voltage_t; - -typedef struct dts_cfg -{ - struct dram_para dram_para; - struct arisc_freq_voltage vf[ARISC_DVFS_VF_TABLE_MAX]; - struct space_cfg space; - struct image_cfg image; - struct mem_cfg prcm; - struct mem_cfg cpuscfg; - struct dev_cfg msgbox; - struct dev_cfg hwspinlock; - struct dev_cfg s_uart; - struct dev_cfg s_rsb; - struct dev_cfg s_jtag; - struct cir_cfg s_cir; - struct pmu_cfg pmu; - struct power_cfg power; -} dts_cfg_t; - -typedef struct arisc_para -{ - uint32_t message_pool_phys; - uint32_t message_pool_size; - uint32_t standby_base; - uint32_t standby_size; - uint32_t power_key_code; - uint32_t addr_code; - uint32_t suart_status; - uint32_t pmu_bat_shutdown_ltf; - uint32_t pmu_bat_shutdown_htf; - uint32_t pmu_pwroff_vol; - uint32_t power_start; - uint32_t powchk_used; - uint32_t power_reg; - uint32_t system_power; - struct dram_para dram_para; - struct arisc_freq_voltage vf[ARISC_DVFS_VF_TABLE_MAX]; - uint32_t power_regu_tree[DM_MAX]; -} arisc_para_t; - -#define ARISC_PARA_SIZE (sizeof(struct arisc_para)) - -#endif /* __ARISC_PARA_H__ */ |