huangcm
2025-07-03 a76b2fadf6ad4adf86e241e3753a63efe03ef80c
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
/*
*********************************************************************************************************
*                                                AR100 SYSTEM
*                                     AR100 Software System Develop Kits
*                                                   messages
*
*                                    (c) Copyright 2012-2016, Sunny China
*                                             All Rights Reserved
*
* File    : messages.h
* By      : Sunny
* Version : v1.0
* Date    : 2012-4-26
* Descript: the messages for asynchronous cpus communication.
* Update  : date                auther      ver     notes
*           2012-4-26 10:18:39  Sunny       1.0     Create this file.
*********************************************************************************************************
*/
 
 
#ifndef __MESSAGES_H__
#define __MESSAGES_H__
 
/* message attributes(only use 8bit) */
#define MESSAGE_ATTR_SOFTSYN        (1<<0)    /* need use soft syn with another cpu */
#define MESSAGE_ATTR_HARDSYN        (1<<1)    /* need use hard syn with another cpu */
 
/* message send timeout set*/
#define SEND_MSG_TIMEOUT                (100000)    /* send message max timeout, base on ms */
 
typedef struct message {
   unsigned char state;    /* identify the used status of message frame */
   unsigned char attr;    /* message attribute : SYN OR ASYN */
   unsigned char type;    /* message type : DVFS_REQ */
   unsigned char result;    /* message process result */
   unsigned char count;    /* message paras count unit of 4 byte */
   unsigned char reserved1[3];    /* reserved */
   unsigned int reserved2[5];    /* reserved for 8byte align */
   unsigned int *paras;    /* the point of message parameters */
} message_block_t;
 
 
/* the base of messages */
#define MESSAGE_BASE            (0x10)
 
/* standby commands */
#define SSTANDBY_ENTER_REQ          (MESSAGE_BASE + 0x00)    /* request to enter(ac327 to ar100)                 */
#define SSTANDBY_RESTORE_NOTIFY     (MESSAGE_BASE + 0x01)    /* restore finished(ac327 to ar100)                 */
#define ESSTANDBY_ENTER_REQ         (MESSAGE_BASE + 0x06)    /* request to enter       (ac327 to ar100)          */
#define FAKE_POWER_OFF_REQ          (MESSAGE_BASE + 0x09)    /* fake power off request(ac327 to ar100)           */
#define CPUIDLE_ENTER_REQ           (MESSAGE_BASE + 0x0A)    /* request to enter cpuidle (ac327 to ar200)        */
#define CPUIDLE_CFG_REQ             (MESSAGE_BASE + 0x11)    /* request to config      (ac327 to arisc)          */
#define CPU_OP_REQ                  (MESSAGE_BASE + 0x12)    /* cpu operations         (ac327 to arisc)          */
#define SYS_OP_REQ                  (MESSAGE_BASE + 0x14)    /* cpu operations         (ac327 to arisc)          */
#define CLEAR_WAKEUP_SRC_REQ        (MESSAGE_BASE + 0x15)
#define SET_WAKEUP_SRC_REQ          (MESSAGE_BASE + 0x16)
 
//set debug level commands
#define SET_DEBUG_LEVEL_REQ         (MESSAGE_BASE + 0x50)    /* set debug level   (ac327 to ar100)               */
#define MESSAGE_LOOPBACK            (MESSAGE_BASE + 0x51)    /* loopback message  (ac327 to ar100)               */
#define SET_UART_BAUDRATE           (MESSAGE_BASE + 0x52)    /* set uart baudrate (ac327 to ar100)               */
#define SET_DRAM_PARAS              (MESSAGE_BASE + 0x53)    /* config dram parameter (ac327 to ar100)           */
#define SET_DRAM_CRC_PARAS          (MESSAGE_BASE + 0x54)    /* config dram crc parameters (ac327 to ar100)      */
#define SET_IR_PARAS                (MESSAGE_BASE + 0x55)    /* config ir parameter (ac327 to ar100)             */
#define SET_PARAS                   (MESSAGE_BASE + 0x57)    /* set paras (arisc to ac327)                       */
 
#define CRASHDUMP_RESET             (MESSAGE_BASE + 0x85)    /* crashdump (arisc to ac327)                       */
 
/* ar100 initialize state notify commands */
#define AR100_STARTUP_NOTIFY        (MESSAGE_BASE + 0x80)    /* ar100 init state notify(ar100 to ac327)          */
 
#endif    /*__MESSAGES_H__*/