|
@@ -183,3 +183,132 @@ typedef enum {
|
|
|
SMEM_SMSM_SHARED_STATE,
|
|
|
SMEM_SMSM_INT_INFO,
|
|
|
SMEM_SMSM_SLEEP_DELAY,
|
|
|
+ SMEM_SMSM_LIMIT_SLEEP,
|
|
|
+ SMEM_SLEEP_POWER_COLLAPSE_DISABLED,
|
|
|
+ SMEM_KEYPAD_KEYS_PRESSED,
|
|
|
+ SMEM_KEYPAD_STATE_UPDATED,
|
|
|
+ SMEM_KEYPAD_STATE_IDX,
|
|
|
+ SMEM_GPIO_INT,
|
|
|
+ SMEM_MDDI_LCD_IDX,
|
|
|
+ SMEM_MDDI_HOST_DRIVER_STATE,
|
|
|
+ SMEM_MDDI_LCD_DISP_STATE,
|
|
|
+ SMEM_LCD_CUR_PANEL,
|
|
|
+ SMEM_MARM_BOOT_SEGMENT_INFO,
|
|
|
+ SMEM_AARM_BOOT_SEGMENT_INFO,
|
|
|
+ SMEM_SLEEP_STATIC,
|
|
|
+ SMEM_SCORPION_FREQUENCY,
|
|
|
+ SMEM_SMD_PROFILES,
|
|
|
+ SMEM_TSSC_BUSY,
|
|
|
+ SMEM_HS_SUSPEND_FILTER_INFO,
|
|
|
+ SMEM_BATT_INFO,
|
|
|
+ SMEM_APPS_BOOT_MODE,
|
|
|
+ SMEM_VERSION_FIRST,
|
|
|
+ SMEM_VERSION_LAST = SMEM_VERSION_FIRST + 24,
|
|
|
+ SMEM_OSS_RRCASN1_BUF1,
|
|
|
+ SMEM_OSS_RRCASN1_BUF2,
|
|
|
+ SMEM_ID_VENDOR0,
|
|
|
+ SMEM_ID_VENDOR1,
|
|
|
+ SMEM_ID_VENDOR2,
|
|
|
+ SMEM_HW_SW_BUILD_ID,
|
|
|
+ SMEM_SMD_BLOCK_PORT_BASE_ID,
|
|
|
+ SMEM_SMD_BLOCK_PORT_PROC0_HEAP = SMEM_SMD_BLOCK_PORT_BASE_ID + SMEM_NUM_SMD_CHANNELS,
|
|
|
+ SMEM_SMD_BLOCK_PORT_PROC1_HEAP = SMEM_SMD_BLOCK_PORT_PROC0_HEAP + SMEM_NUM_SMD_CHANNELS,
|
|
|
+ SMEM_I2C_MUTEX = SMEM_SMD_BLOCK_PORT_PROC1_HEAP + SMEM_NUM_SMD_CHANNELS,
|
|
|
+ SMEM_SCLK_CONVERSION,
|
|
|
+ SMEM_SMD_SMSM_INTR_MUX,
|
|
|
+ SMEM_SMSM_CPU_INTR_MASK,
|
|
|
+ SMEM_APPS_DEM_SLAVE_DATA,
|
|
|
+ SMEM_QDSP6_DEM_SLAVE_DATA,
|
|
|
+ SMEM_CLKREGIM_BSP,
|
|
|
+ SMEM_CLKREGIM_SOURCES,
|
|
|
+ SMEM_SMD_FIFO_BASE_ID,
|
|
|
+ SMEM_USABLE_RAM_PARTITION_TABLE = SMEM_SMD_FIFO_BASE_ID + SMEM_NUM_SMD_CHANNELS,
|
|
|
+ SMEM_POWER_ON_STATUS_INFO,
|
|
|
+ SMEM_DAL_AREA,
|
|
|
+ SMEM_SMEM_LOG_POWER_IDX,
|
|
|
+ SMEM_SMEM_LOG_POWER_WRAP,
|
|
|
+ SMEM_SMEM_LOG_POWER_EVENTS,
|
|
|
+ SMEM_ERR_CRASH_LOG,
|
|
|
+ SMEM_ERR_F3_TRACE_LOG,
|
|
|
+ SMEM_NUM_ITEMS,
|
|
|
+} smem_mem_type;
|
|
|
+
|
|
|
+
|
|
|
+#define SMD_SS_CLOSED 0x00000000
|
|
|
+#define SMD_SS_OPENING 0x00000001
|
|
|
+#define SMD_SS_OPENED 0x00000002
|
|
|
+#define SMD_SS_FLUSHING 0x00000003
|
|
|
+#define SMD_SS_CLOSING 0x00000004
|
|
|
+#define SMD_SS_RESET 0x00000005
|
|
|
+#define SMD_SS_RESET_OPENING 0x00000006
|
|
|
+
|
|
|
+#define SMD_BUF_SIZE 8192
|
|
|
+#define SMD_CHANNELS 64
|
|
|
+
|
|
|
+#define SMD_HEADER_SIZE 20
|
|
|
+
|
|
|
+struct smd_alloc_elm {
|
|
|
+ char name[20];
|
|
|
+ uint32_t cid;
|
|
|
+ uint32_t ctype;
|
|
|
+ uint32_t ref_count;
|
|
|
+};
|
|
|
+
|
|
|
+struct smd_half_channel {
|
|
|
+ unsigned state;
|
|
|
+ unsigned char fDSR;
|
|
|
+ unsigned char fCTS;
|
|
|
+ unsigned char fCD;
|
|
|
+ unsigned char fRI;
|
|
|
+ unsigned char fHEAD;
|
|
|
+ unsigned char fTAIL;
|
|
|
+ unsigned char fSTATE;
|
|
|
+ unsigned char fUNUSED;
|
|
|
+ unsigned tail;
|
|
|
+ unsigned head;
|
|
|
+} __attribute__(( aligned(4), packed ));
|
|
|
+
|
|
|
+/* Only used on SMD package v3 on msm7201a */
|
|
|
+struct smd_shared_v1 {
|
|
|
+ struct smd_half_channel ch0;
|
|
|
+ unsigned char data0[SMD_BUF_SIZE];
|
|
|
+ struct smd_half_channel ch1;
|
|
|
+ unsigned char data1[SMD_BUF_SIZE];
|
|
|
+};
|
|
|
+
|
|
|
+/* Used on SMD package v4 */
|
|
|
+struct smd_shared_v2 {
|
|
|
+ struct smd_half_channel ch0;
|
|
|
+ struct smd_half_channel ch1;
|
|
|
+};
|
|
|
+
|
|
|
+struct smd_channel {
|
|
|
+ volatile struct smd_half_channel *send;
|
|
|
+ volatile struct smd_half_channel *recv;
|
|
|
+ unsigned char *send_data;
|
|
|
+ unsigned char *recv_data;
|
|
|
+
|
|
|
+ unsigned fifo_mask;
|
|
|
+ unsigned fifo_size;
|
|
|
+ unsigned current_packet;
|
|
|
+ unsigned n;
|
|
|
+
|
|
|
+ struct list_head ch_list;
|
|
|
+
|
|
|
+ void *priv;
|
|
|
+ void (*notify)(void *priv, unsigned flags);
|
|
|
+
|
|
|
+ int (*read)(struct smd_channel *ch, void *data, int len);
|
|
|
+ int (*write)(struct smd_channel *ch, const void *data, int len);
|
|
|
+ int (*read_avail)(struct smd_channel *ch);
|
|
|
+ int (*write_avail)(struct smd_channel *ch);
|
|
|
+
|
|
|
+ void (*update_state)(struct smd_channel *ch);
|
|
|
+ unsigned last_state;
|
|
|
+ void (*notify_other_cpu)(void);
|
|
|
+ unsigned type;
|
|
|
+
|
|
|
+ char name[32];
|
|
|
+ struct platform_device pdev;
|
|
|
+};
|
|
|
+
|