aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/devices
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2011-08-24 17:24:42 +0200
committerSimon Busch <morphis@gravedo.de>2011-08-24 17:24:42 +0200
commitb6ae4aed46ab885604526471417be1a0da72a221 (patch)
tree2d30a8c9ec62cb131274b487fc4dd885025ce3d8 /samsung-ipc/devices
parentf74d8e2c179065bd8712b113b65957c617ad6c54 (diff)
downloadexternal_libsamsung-ipc-b6ae4aed46ab885604526471417be1a0da72a221.zip
external_libsamsung-ipc-b6ae4aed46ab885604526471417be1a0da72a221.tar.gz
external_libsamsung-ipc-b6ae4aed46ab885604526471417be1a0da72a221.tar.bz2
Move all source code into samsung-ipc directory
Diffstat (limited to 'samsung-ipc/devices')
-rw-r--r--samsung-ipc/devices/crespo/ipc.h45
-rw-r--r--samsung-ipc/devices/crespo/modem_ctl.h44
-rw-r--r--samsung-ipc/devices/crespo/nv_data.h37
-rw-r--r--samsung-ipc/devices/h1/ipc.h44
4 files changed, 170 insertions, 0 deletions
diff --git a/samsung-ipc/devices/crespo/ipc.h b/samsung-ipc/devices/crespo/ipc.h
new file mode 100644
index 0000000..7001d2a
--- /dev/null
+++ b/samsung-ipc/devices/crespo/ipc.h
@@ -0,0 +1,45 @@
+/**
+ * This file is part of libsamsung-ipc.
+ *
+ * Copyright (C) 2011 Paul Kocialkowski <contact@paulk.fr>
+ *
+ * libsamsung-ipc 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * libsamsung-ipc 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 libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __CRESPO_IPC_H__
+#define __CRESPO_IPC_H__
+
+#define BOOTCORE_VERSION 0xf0
+#define PSI_MAGIC 0x30
+#define PSI_DATA_LEN 0x5000
+#define RADIO_IMG_SIZE 0xd80000
+
+struct samsung_rfs_msg
+{
+ uint32_t offset;
+ uint32_t size;
+};
+
+struct samsung_rfs_cfrm
+{
+ uint8_t confirmation;
+ struct samsung_rfs_msg msg;
+};
+
+void *mtd_read(char *mtd_name, int size, int block_size);
+void *file_read(char *file_name, int size, int block_size);
+void wake_lock(char *lock_name, int size);
+void wake_unlock(char *lock_name, int size);
+#endif
diff --git a/samsung-ipc/devices/crespo/modem_ctl.h b/samsung-ipc/devices/crespo/modem_ctl.h
new file mode 100644
index 0000000..7c23165
--- /dev/null
+++ b/samsung-ipc/devices/crespo/modem_ctl.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Google, Inc.
+ * Copyright (C) 2010 Samsung Electronics.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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.
+ *
+ */
+
+#ifndef __MODEM_CONTROL_H__
+#define __MODEM_CONTROL_H__
+
+#define IOCTL_MODEM_RAMDUMP _IO('o', 0x19)
+#define IOCTL_MODEM_RESET _IO('o', 0x20)
+#define IOCTL_MODEM_START _IO('o', 0x21)
+#define IOCTL_MODEM_OFF _IO('o', 0x22)
+
+#define IOCTL_MODEM_SEND _IO('o', 0x23)
+#define IOCTL_MODEM_RECV _IO('o', 0x24)
+
+struct modem_io {
+ uint32_t size;
+ uint32_t id;
+ uint32_t cmd;
+ void *data;
+};
+
+/* platform data */
+struct modemctl_data {
+ const char *name;
+ unsigned gpio_phone_active;
+ unsigned gpio_pda_active;
+ unsigned gpio_cp_reset;
+ unsigned gpio_phone_on;
+ bool is_cdma_modem; /* 1:CDMA Modem */
+};
+
+#endif
diff --git a/samsung-ipc/devices/crespo/nv_data.h b/samsung-ipc/devices/crespo/nv_data.h
new file mode 100644
index 0000000..bc17416
--- /dev/null
+++ b/samsung-ipc/devices/crespo/nv_data.h
@@ -0,0 +1,37 @@
+/**
+ * This file is part of libsamsung-ipc.
+ *
+ * Copyright (C) 2011 Paul Kocialkowski <contact@paulk.fr>
+ *
+ * libsamsung-ipc 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * libsamsung-ipc 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 libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __CRESPO_NV_DATA_H__
+#define __CRESPO_NV_DATA__
+
+#define NV_DATA_MD5_SECRET "Samsung_Android_RIL"
+#define NV_DATA_SIZE 0x200000
+
+#define MD5_STRING_SIZE MD5_DIGEST_LENGTH * 2 + 1
+
+void md5hash2string(char *out, uint8_t *in);
+void nv_data_generate(void);
+void nv_data_md5_compute(void *data_p, int size, void *hash);
+void nv_data_backup_create(void);
+void nv_data_backup_restore(void);
+void nv_data_check(void);
+void nv_data_md5_check(void);
+
+#endif
diff --git a/samsung-ipc/devices/h1/ipc.h b/samsung-ipc/devices/h1/ipc.h
new file mode 100644
index 0000000..1bbc951
--- /dev/null
+++ b/samsung-ipc/devices/h1/ipc.h
@@ -0,0 +1,44 @@
+/**
+ * This file is part of libsamsung-ipc.
+ *
+ * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
+ *
+ * libsamsung-ipc 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * libsamsung-ipc 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 libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <radio.h>
+
+#define DPRAM_TTY "/dev/dpram0"
+
+#define IOCTL_PHONE_ON 0x68d0
+#define IOCTL_PHONE_OFF 0x68d1
+#define IOCTL_PHONE_GETSTATUS 0x68d2
+#define IOCTL_PHONE_RESET 0x68d3
+#define IOCTL_PHONE_RAMDUMP 0x68d4
+#define IOCTL_PHONE_BOOTTYPE 0x68d5
+#define IOCTL_MEM_RW 0x68d6
+#define IOCTL_WAKEUP 0x68d7
+#define IOCTL_SILENT_RESET 0x68d8
+
+#define FRAME_START 0x7f
+#define FRAME_END 0x7e
+
+struct hdlc_header {
+ unsigned short length;
+ unsigned char unknown;
+
+ struct ipc_header ipc;
+} __attribute__((__packed__));
+