aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/device/xmm6260/modem_prj.h
diff options
context:
space:
mode:
Diffstat (limited to 'samsung-ipc/device/xmm6260/modem_prj.h')
-rw-r--r--samsung-ipc/device/xmm6260/modem_prj.h145
1 files changed, 124 insertions, 21 deletions
diff --git a/samsung-ipc/device/xmm6260/modem_prj.h b/samsung-ipc/device/xmm6260/modem_prj.h
index df4c37d..99f6087 100644
--- a/samsung-ipc/device/xmm6260/modem_prj.h
+++ b/samsung-ipc/device/xmm6260/modem_prj.h
@@ -13,14 +13,26 @@
*
*/
+#include <stdbool.h>
+#include <stdint.h>
+#include <linux/types.h>
+
+#define u8 uint8_t
+#define u16 uint16_t
+#define u32 uint32_t
+#define u64 uint64_t
+
#ifndef __MODEM_PRJ_H__
#define __MODEM_PRJ_H__
-#include <stdint.h>
+#define MAX_CPINFO_SIZE 512
#define MAX_LINK_DEVTYPE 3
-#define MAX_RAW_DEVS 32
-#define MAX_NUM_IO_DEV (MAX_RAW_DEVS + 4)
+
+#define MAX_FMT_DEVS 10
+#define MAX_RAW_DEVS 32
+#define MAX_RFS_DEVS 10
+#define MAX_NUM_IO_DEV (MAX_FMT_DEVS + MAX_RAW_DEVS + MAX_RFS_DEVS)
#define IOCTL_MODEM_ON _IO('o', 0x19)
#define IOCTL_MODEM_OFF _IO('o', 0x20)
@@ -33,7 +45,7 @@
#define IOCTL_MODEM_PROTOCOL_RESUME _IO('o', 0x26)
#define IOCTL_MODEM_STATUS _IO('o', 0x27)
-#define IOCTL_MODEM_GOTA_START _IO('o', 0x28)
+#define IOCTL_MODEM_DL_START _IO('o', 0x28)
#define IOCTL_MODEM_FW_UPDATE _IO('o', 0x29)
#define IOCTL_MODEM_NET_SUSPEND _IO('o', 0x30)
@@ -72,10 +84,76 @@
#define PSD_DATA_CHID_BEGIN 0x2A
#define PSD_DATA_CHID_END 0x38
+#define PS_DATA_CH_0 10
+#define PS_DATA_CH_LAST 24
+
#define IP6VERSION 6
#define SOURCE_MAC_ADDR {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC}
+/* Debugging features */
+#define MAX_MIF_LOG_PATH_LEN 128
+#define MAX_MIF_LOG_FILE_SIZE 0x800000 /* 8 MB */
+
+#define MAX_MIF_EVT_BUFF_SIZE 256
+#define MAX_MIF_TIME_LEN 32
+#define MAX_MIF_NAME_LEN 16
+#define MAX_MIF_STR_LEN 127
+#define MAX_MIF_LOG_LEN 128
+
+enum mif_event_id {
+ MIF_IRQ_EVT = 0,
+ MIF_LNK_RX_EVT,
+ MIF_MUX_RX_EVT,
+ MIF_IOD_RX_EVT,
+ MIF_IOD_TX_EVT,
+ MIF_MUX_TX_EVT,
+ MIF_LNK_TX_EVT,
+ MAX_MIF_EVT
+};
+
+struct dpram_queue_status {
+ unsigned in;
+ unsigned out;
+};
+
+struct dpram_queue_status_pair {
+ struct dpram_queue_status txq;
+ struct dpram_queue_status rxq;
+};
+
+struct dpram_irq_buff {
+ unsigned magic;
+ unsigned access;
+ struct dpram_queue_status_pair qsp[MAX_IPC_DEV];
+ unsigned int2ap;
+ unsigned int2cp;
+};
+
+struct mif_event_buff {
+ char time[MAX_MIF_TIME_LEN];
+
+ struct timeval tv;
+ enum mif_event_id evt;
+
+ char mc[MAX_MIF_NAME_LEN];
+
+ char iod[MAX_MIF_NAME_LEN];
+
+ char ld[MAX_MIF_NAME_LEN];
+ enum modem_link link_type;
+
+ unsigned rcvd;
+ unsigned len;
+ union {
+ u8 data[MAX_MIF_LOG_LEN];
+ struct dpram_irq_buff dpram_irqb;
+ };
+};
+
+#define MIF_LOG_DIR "/sdcard"
+#define MIF_LOG_LV_FILE "/data/.mif_log_level"
+
/* Does modem ctl structure will use state ? or status defined below ?*/
enum modem_state {
STATE_OFFLINE,
@@ -85,6 +163,8 @@ enum modem_state {
STATE_ONLINE,
STATE_NV_REBUILDING, /* <= rebuilding start */
STATE_LOADER_DONE,
+ STATE_SIM_ATTACH,
+ STATE_SIM_DETACH,
};
enum com_state {
@@ -95,6 +175,25 @@ enum com_state {
COM_CRASH,
};
+enum link_mode {
+ LINK_MODE_INVALID = 0,
+ LINK_MODE_IPC,
+ LINK_MODE_BOOT,
+ LINK_MODE_DLOAD,
+ LINK_MODE_ULOAD,
+};
+
+struct sim_state {
+ bool online; /* SIM is online? */
+ bool changed; /* online is changed? */
+};
+
+#define HDLC_START 0x7F
+#define HDLC_END 0x7E
+#define SIZE_OF_HDLC_START 1
+#define SIZE_OF_HDLC_END 1
+#define MAX_LINK_PADDING_SIZE 3
+
struct header_data {
char hdr[HDLC_HEADER_MAX_SIZE];
unsigned len;
@@ -102,26 +201,30 @@ struct header_data {
char start; /*hdlc start header 0x7F*/
};
-struct sipc4_hdlc_fmt_hdr {
- uint16_t len;
- uint8_t control;
+struct fmt_hdr {
+ u16 len;
+ u8 control;
} __attribute__((packed));
-struct sipc4_fmt_hdr {
- uint16_t len;
- uint8_t msg_seq;
- uint8_t ack_seq;
- uint8_t main_cmd;
- uint8_t sub_cmd;
- uint8_t cmd_type;
+struct raw_hdr {
+ u32 len;
+ u8 channel;
+ u8 control;
} __attribute__((packed));
-//Link control
+struct rfs_hdr {
+ u32 len;
+ u8 cmd;
+ u8 id;
+} __attribute__((packed));
-#define IOCTL_LINK_CONTROL_ENABLE _IO('o', 0x30)
-#define IOCTL_LINK_CONTROL_ACTIVE _IO('o', 0x31)
-#define IOCTL_LINK_GET_HOSTWAKE _IO('o', 0x32)
-#define IOCTL_LINK_CONNECTED _IO('o', 0x33)
-#define IOCTL_LINK_SET_BIAS_CLEAR _IO('o', 0x34)
+struct sipc_fmt_hdr {
+ u16 len;
+ u8 msg_seq;
+ u8 ack_seq;
+ u8 main_cmd;
+ u8 sub_cmd;
+ u8 cmd_type;
+} __attribute__((packed));
-#endif //__MODEM_PRJ_H__
+#endif