aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-07-05 10:46:07 +0200
committerPaul Kocialkowski <contact@paulk.fr>2012-07-05 10:46:07 +0200
commitc691ac240ec65a8b6f739fd3f273c4e5b7e00af7 (patch)
treed03ad236592fa13e026897d00ac6c35173673e50 /samsung-ipc
parent645a8aa548c7777134cfb505f5ea85bc4cbdcf19 (diff)
downloadhardware_replicant_libsamsung-ipc-c691ac240ec65a8b6f739fd3f273c4e5b7e00af7.tar.gz
hardware_replicant_libsamsung-ipc-c691ac240ec65a8b6f739fd3f273c4e5b7e00af7.tar.bz2
hardware_replicant_libsamsung-ipc-c691ac240ec65a8b6f739fd3f273c4e5b7e00af7.zip
XMM6260: Split defines in header files
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc')
-rw-r--r--samsung-ipc/device/xmm6260/fwloader_i9100.c31
-rw-r--r--samsung-ipc/device/xmm6260/fwloader_i9100.h51
-rw-r--r--samsung-ipc/device/xmm6260/fwloader_i9250.c36
-rw-r--r--samsung-ipc/device/xmm6260/fwloader_i9250.h57
-rw-r--r--samsung-ipc/device/xmm6260/xmm6260_ipc.c2
-rw-r--r--samsung-ipc/device/xmm6260/xmm6260_ipc.h2
6 files changed, 112 insertions, 67 deletions
diff --git a/samsung-ipc/device/xmm6260/fwloader_i9100.c b/samsung-ipc/device/xmm6260/fwloader_i9100.c
index 6a26cc3..d42e426 100644
--- a/samsung-ipc/device/xmm6260/fwloader_i9100.c
+++ b/samsung-ipc/device/xmm6260/fwloader_i9100.c
@@ -21,36 +21,7 @@
#include "modemctl_common.h"
#include "ipc_private.h"
-
-/*
- * I9100 specific implementation
- */
-#define RADIO_IMAGE "/dev/block/mmcblk0p8"
-#define NVDATA_IMAGE "/efs/nv_data.bin"
-#define I9100_EHCI_PATH "/sys/devices/platform/s5p-ehci/ehci_power"
-
-#define LINK_POLL_DELAY_US (50 * 1000)
-#define LINK_TIMEOUT_MS 2000
-
-#define XMM_PSI_MAGIC 0x30
-#define PSI_ACK_MAGIC "\x00\xaa"
-
-#define EBL_HDR_ACK_MAGIC "\xcc\xcc"
-#define EBL_IMG_ACK_MAGIC "\x51\xa5"
-
-#define BL_END_MAGIC "\x00\x00"
-#define BL_END_MAGIC_LEN 2
-
-#define BL_RESET_MAGIC "\x01\x10\x11\x00"
-#define BL_RESET_MAGIC_LEN 4
-
-#define SEC_DOWNLOAD_CHUNK 16384
-#define SEC_DOWNLOAD_DELAY_US (500 * 1000)
-
-#define POST_BOOT_TIMEOUT_US (600 * 1000)
-
-#define FW_LOAD_ADDR 0x60300000
-#define NVDATA_LOAD_ADDR 0x60e80000
+#include "fwloader_i9100.h"
/*
* Locations of the firmware components in the Samsung firmware
diff --git a/samsung-ipc/device/xmm6260/fwloader_i9100.h b/samsung-ipc/device/xmm6260/fwloader_i9100.h
new file mode 100644
index 0000000..353bdd0
--- /dev/null
+++ b/samsung-ipc/device/xmm6260/fwloader_i9100.h
@@ -0,0 +1,51 @@
+/*
+ * Firmware loader for Samsung I9100 and I9250
+ * Copyright (C) 2012 Alexander Tarasikov <alexander.tarasikov@gmail.com>
+ *
+ * based on the incomplete C++ implementation which is
+ * Copyright (C) 2012 Sergey Gridasov <grindars@gmail.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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __FWLOADER_I9100_IPC_H__
+#define __FWLOADER_I9100_IPC_H__
+
+#define RADIO_IMAGE "/dev/block/mmcblk0p8"
+#define I9100_EHCI_PATH "/sys/devices/platform/s5p-ehci/ehci_power"
+
+#define LINK_POLL_DELAY_US (50 * 1000)
+#define LINK_TIMEOUT_MS 2000
+
+#define XMM_PSI_MAGIC 0x30
+#define PSI_ACK_MAGIC "\x00\xaa"
+
+#define EBL_HDR_ACK_MAGIC "\xcc\xcc"
+#define EBL_IMG_ACK_MAGIC "\x51\xa5"
+
+#define BL_END_MAGIC "\x00\x00"
+#define BL_END_MAGIC_LEN 2
+
+#define BL_RESET_MAGIC "\x01\x10\x11\x00"
+#define BL_RESET_MAGIC_LEN 4
+
+#define SEC_DOWNLOAD_CHUNK 16384
+#define SEC_DOWNLOAD_DELAY_US (500 * 1000)
+
+#define POST_BOOT_TIMEOUT_US (600 * 1000)
+
+#define FW_LOAD_ADDR 0x60300000
+#define NVDATA_LOAD_ADDR 0x60e80000
+
+#endif
diff --git a/samsung-ipc/device/xmm6260/fwloader_i9250.c b/samsung-ipc/device/xmm6260/fwloader_i9250.c
index 2e0423f..eb74dc2 100644
--- a/samsung-ipc/device/xmm6260/fwloader_i9250.c
+++ b/samsung-ipc/device/xmm6260/fwloader_i9250.c
@@ -21,41 +21,7 @@
#include "modemctl_common.h"
#include "ipc_private.h"
-
-/*
- * i9250 (Galaxy Nexus) board-specific code
- */
-#define I9250_RADIO_IMAGE "/dev/block/platform/omap/omap_hsmmc.0/by-name/radio"
-#define I9250_SECOND_BOOT_DEV "/dev/umts_boot1"
-
-#define I9250_BOOT_LAST_MARKER 0x0030ffff
-#define I9250_BOOT_REPLY_MAX 20
-
-#define I9250_GENERAL_ACK "\x02\x00\x00\x00"
-
-#define I9250_PSI_START_MAGIC "\xff\xf0\x00\x30"
-#define I9250_PSI_CMD_EXEC "\x08\x00\x00\x00"
-#define I9250_PSI_EXEC_DATA "\x00\x00\x00\x00\x02\x00\x02\x00"
-#define I9250_PSI_READY_ACK "\x00\xaa\x00\x00"
-
-#define I9250_EBL_IMG_ACK_MAGIC "\x51\xa5\x00\x00"
-#define I9250_EBL_HDR_ACK_MAGIC "\xcc\xcc\x00\x00"
-
-#define I9250_MPS_IMAGE_PATH "/factory/imei/mps_code.dat"
-#define I9250_MPS_LOAD_ADDR 0x61080000
-#define I9250_MPS_LENGTH 3
-
-#define SEC_DOWNLOAD_CHUNK 0xdfc2
-#define SEC_DOWNLOAD_DELAY_US (500 * 1000)
-
- #define FW_LOAD_ADDR 0x60300000
-#define NVDATA_LOAD_ADDR 0x60e80000
-
-#define BL_END_MAGIC "\x00\x00"
-#define BL_END_MAGIC_LEN 2
-
-#define BL_RESET_MAGIC "\x01\x10\x11\x00"
-#define BL_RESET_MAGIC_LEN 4
+#include "fwloader_i9250.h"
typedef struct {
uint32_t total_size;
diff --git a/samsung-ipc/device/xmm6260/fwloader_i9250.h b/samsung-ipc/device/xmm6260/fwloader_i9250.h
new file mode 100644
index 0000000..0abe4fa
--- /dev/null
+++ b/samsung-ipc/device/xmm6260/fwloader_i9250.h
@@ -0,0 +1,57 @@
+/*
+ * Firmware loader for Samsung I9100 and I9250
+ * Copyright (C) 2012 Alexander Tarasikov <alexander.tarasikov@gmail.com>
+ *
+ * based on the incomplete C++ implementation which is
+ * Copyright (C) 2012 Sergey Gridasov <grindars@gmail.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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __FWLOADER_I9250_IPC_H__
+#define __FWLOADER_I9250_IPC_H__
+
+#define I9250_RADIO_IMAGE "/dev/block/platform/omap/omap_hsmmc.0/by-name/radio"
+#define I9250_SECOND_BOOT_DEV "/dev/umts_boot1"
+
+#define I9250_BOOT_LAST_MARKER 0x0030ffff
+#define I9250_BOOT_REPLY_MAX 20
+
+#define I9250_GENERAL_ACK "\x02\x00\x00\x00"
+
+#define I9250_PSI_START_MAGIC "\xff\xf0\x00\x30"
+#define I9250_PSI_CMD_EXEC "\x08\x00\x00\x00"
+#define I9250_PSI_EXEC_DATA "\x00\x00\x00\x00\x02\x00\x02\x00"
+#define I9250_PSI_READY_ACK "\x00\xaa\x00\x00"
+
+#define I9250_EBL_IMG_ACK_MAGIC "\x51\xa5\x00\x00"
+#define I9250_EBL_HDR_ACK_MAGIC "\xcc\xcc\x00\x00"
+
+#define I9250_MPS_IMAGE_PATH "/factory/imei/mps_code.dat"
+#define I9250_MPS_LOAD_ADDR 0x61080000
+#define I9250_MPS_LENGTH 3
+
+#define SEC_DOWNLOAD_CHUNK 0xdfc2
+#define SEC_DOWNLOAD_DELAY_US (500 * 1000)
+
+ #define FW_LOAD_ADDR 0x60300000
+#define NVDATA_LOAD_ADDR 0x60e80000
+
+#define BL_END_MAGIC "\x00\x00"
+#define BL_END_MAGIC_LEN 2
+
+#define BL_RESET_MAGIC "\x01\x10\x11\x00"
+#define BL_RESET_MAGIC_LEN 4
+
+#endif
diff --git a/samsung-ipc/device/xmm6260/xmm6260_ipc.c b/samsung-ipc/device/xmm6260/xmm6260_ipc.c
index 2c1a0a5..208ce6d 100644
--- a/samsung-ipc/device/xmm6260/xmm6260_ipc.c
+++ b/samsung-ipc/device/xmm6260/xmm6260_ipc.c
@@ -44,8 +44,6 @@
#include "modemctl_common.h"
-#define IPC_MAX_XFER 4096
-
int i9100_modem_bootstrap(struct ipc_client *client)
{
return boot_modem_i9100(client);
diff --git a/samsung-ipc/device/xmm6260/xmm6260_ipc.h b/samsung-ipc/device/xmm6260/xmm6260_ipc.h
index 3c338a6..06c8387 100644
--- a/samsung-ipc/device/xmm6260/xmm6260_ipc.h
+++ b/samsung-ipc/device/xmm6260/xmm6260_ipc.h
@@ -24,6 +24,8 @@
#ifndef __XMM6260_IPC_H__
#define __XMM6260_IPC_H__
+#define IPC_MAX_XFER 4096
+
extern struct ipc_handlers xmm6260_ipc_default_handlers;
struct rfs_hdr {