aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/devices/piranha/piranha.c
diff options
context:
space:
mode:
Diffstat (limited to 'samsung-ipc/devices/piranha/piranha.c')
-rw-r--r--samsung-ipc/devices/piranha/piranha.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/samsung-ipc/devices/piranha/piranha.c b/samsung-ipc/devices/piranha/piranha.c
index 44af920..3ec4e5c 100644
--- a/samsung-ipc/devices/piranha/piranha.c
+++ b/samsung-ipc/devices/piranha/piranha.c
@@ -26,9 +26,9 @@
#include <samsung-ipc.h>
#include <ipc.h>
-#include "xmm6260.h"
-#include "xmm6260_mipi.h"
-#include "xmm6260_sec_modem.h"
+#include "xmm626.h"
+#include "xmm626_mipi.h"
+#include "xmm626_sec_modem.h"
#include "piranha.h"
int piranha_boot(struct ipc_client *client)
@@ -58,21 +58,21 @@ int piranha_boot(struct ipc_client *client)
}
ipc_client_log(client, "Mapped modem image data to memory");
- modem_boot_fd = open(XMM6260_SEC_MODEM_BOOT0_DEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
+ modem_boot_fd = open(XMM626_SEC_MODEM_BOOT0_DEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (modem_boot_fd < 0) {
ipc_client_log(client, "Opening modem boot device failed");
goto error;
}
ipc_client_log(client, "Opened modem boot device");
- rc = xmm6260_sec_modem_power(modem_boot_fd, 0);
+ rc = xmm626_sec_modem_power(modem_boot_fd, 0);
if (rc < 0) {
ipc_client_log(client, "Turning the modem off failed");
goto error;
}
ipc_client_log(client, "Turned the modem off");
- rc = xmm6260_sec_modem_power(modem_boot_fd, 1);
+ rc = xmm626_sec_modem_power(modem_boot_fd, 1);
if (rc < 0) {
ipc_client_log(client, "Turning the modem on failed");
goto error;
@@ -81,16 +81,16 @@ int piranha_boot(struct ipc_client *client)
p = (unsigned char *) modem_image_data + PIRANHA_PSI_OFFSET;
- rc = xmm6260_mipi_psi_send(client, modem_boot_fd, (void *) p, PIRANHA_PSI_SIZE);
+ rc = xmm626_mipi_psi_send(client, modem_boot_fd, (void *) p, PIRANHA_PSI_SIZE);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI PSI failed");
+ ipc_client_log(client, "Sending XMM626 MIPI PSI failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI PSI");
+ ipc_client_log(client, "Sent XMM626 MIPI PSI");
close(modem_boot_fd);
- modem_boot_fd = open(XMM6260_SEC_MODEM_BOOT1_DEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
+ modem_boot_fd = open(XMM626_SEC_MODEM_BOOT1_DEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (modem_boot_fd < 0) {
ipc_client_log(client, "Opening modem boot device failed");
goto error;
@@ -99,58 +99,58 @@ int piranha_boot(struct ipc_client *client)
p = (unsigned char *) modem_image_data + PIRANHA_EBL_OFFSET;
- rc = xmm6260_mipi_ebl_send(client, modem_boot_fd, (void *) p, PIRANHA_EBL_SIZE);
+ rc = xmm626_mipi_ebl_send(client, modem_boot_fd, (void *) p, PIRANHA_EBL_SIZE);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI EBL failed");
+ ipc_client_log(client, "Sending XMM626 MIPI EBL failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI EBL");
+ ipc_client_log(client, "Sent XMM626 MIPI EBL");
- rc = xmm6260_mipi_port_config_send(client, modem_boot_fd);
+ rc = xmm626_mipi_port_config_send(client, modem_boot_fd);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI port config failed");
+ ipc_client_log(client, "Sending XMM626 MIPI port config failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI port config");
+ ipc_client_log(client, "Sent XMM626 MIPI port config");
p = (unsigned char *) modem_image_data + PIRANHA_SEC_START_OFFSET;
- rc = xmm6260_mipi_sec_start_send(client, modem_boot_fd, (void *) p, PIRANHA_SEC_START_SIZE);
+ rc = xmm626_mipi_sec_start_send(client, modem_boot_fd, (void *) p, PIRANHA_SEC_START_SIZE);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI SEC start failed");
+ ipc_client_log(client, "Sending XMM626 MIPI SEC start failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI SEC start");
+ ipc_client_log(client, "Sent XMM626 MIPI SEC start");
p = (unsigned char *) modem_image_data + PIRANHA_FIRMWARE_OFFSET;
- rc = xmm6260_mipi_firmware_send(client, modem_boot_fd, (void *) p, PIRANHA_FIRMWARE_SIZE);
+ rc = xmm626_mipi_firmware_send(client, modem_boot_fd, (void *) p, PIRANHA_FIRMWARE_SIZE);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI firmware failed");
+ ipc_client_log(client, "Sending XMM626 MIPI firmware failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI firmware");
+ ipc_client_log(client, "Sent XMM626 MIPI firmware");
- rc = xmm6260_mipi_nv_data_send(client, modem_boot_fd);
+ rc = xmm626_mipi_nv_data_send(client, modem_boot_fd);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI nv_data failed");
+ ipc_client_log(client, "Sending XMM626 MIPI nv_data failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI nv_data");
+ ipc_client_log(client, "Sent XMM626 MIPI nv_data");
- rc = xmm6260_mipi_sec_end_send(client, modem_boot_fd);
+ rc = xmm626_mipi_sec_end_send(client, modem_boot_fd);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI SEC end failed");
+ ipc_client_log(client, "Sending XMM626 MIPI SEC end failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI SEC end");
+ ipc_client_log(client, "Sent XMM626 MIPI SEC end");
- rc = xmm6260_mipi_hw_reset_send(client, modem_boot_fd);
+ rc = xmm626_mipi_hw_reset_send(client, modem_boot_fd);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI HW reset failed");
+ ipc_client_log(client, "Sending XMM626 MIPI HW reset failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI HW reset");
+ ipc_client_log(client, "Sent XMM626 MIPI HW reset");
rc = 0;
goto complete;
@@ -180,7 +180,7 @@ int piranha_open(void *data, int type)
transport_data = (struct piranha_transport_data *) data;
- transport_data->fd = xmm6260_sec_modem_open(type);
+ transport_data->fd = xmm626_sec_modem_open(type);
if (transport_data->fd < 0)
return -1;
@@ -196,7 +196,7 @@ int piranha_close(void *data)
transport_data = (struct piranha_transport_data *) data;
- xmm6260_sec_modem_close(transport_data->fd);
+ xmm626_sec_modem_close(transport_data->fd);
transport_data->fd = -1;
return 0;
@@ -212,7 +212,7 @@ int piranha_read(void *data, void *buffer, size_t length)
transport_data = (struct piranha_transport_data *) data;
- rc = xmm6260_sec_modem_read(transport_data->fd, buffer, length);
+ rc = xmm626_sec_modem_read(transport_data->fd, buffer, length);
return rc;
}
@@ -227,7 +227,7 @@ int piranha_write(void *data, const void *buffer, size_t length)
transport_data = (struct piranha_transport_data *) data;
- rc = xmm6260_sec_modem_write(transport_data->fd, buffer, length);
+ rc = xmm626_sec_modem_write(transport_data->fd, buffer, length);
return rc;
}
@@ -242,7 +242,7 @@ int piranha_poll(void *data, struct timeval *timeout)
transport_data = (struct piranha_transport_data *) data;
- rc = xmm6260_sec_modem_poll(transport_data->fd, timeout);
+ rc = xmm626_sec_modem_poll(transport_data->fd, timeout);
return rc;
}
@@ -257,11 +257,11 @@ int piranha_power_off(void *data)
int fd;
int rc;
- fd = open(XMM6260_SEC_MODEM_BOOT0_DEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
+ fd = open(XMM626_SEC_MODEM_BOOT0_DEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (fd < 0)
return -1;
- rc = xmm6260_sec_modem_power(fd, 0);
+ rc = xmm626_sec_modem_power(fd, 0);
close(fd);
@@ -295,14 +295,14 @@ int piranha_data_destroy(void *transport_data, void *power_data,
struct ipc_client_ops piranha_fmt_ops = {
.boot = piranha_boot,
- .send = xmm6260_sec_modem_fmt_send,
- .recv = xmm6260_sec_modem_fmt_recv,
+ .send = xmm626_sec_modem_fmt_send,
+ .recv = xmm626_sec_modem_fmt_recv,
};
struct ipc_client_ops piranha_rfs_ops = {
.boot = NULL,
- .send = xmm6260_sec_modem_rfs_send,
- .recv = xmm6260_sec_modem_rfs_recv,
+ .send = xmm626_sec_modem_rfs_send,
+ .recv = xmm626_sec_modem_rfs_recv,
};
struct ipc_client_handlers piranha_handlers = {
@@ -323,18 +323,18 @@ struct ipc_client_handlers piranha_handlers = {
};
struct ipc_client_gprs_specs piranha_gprs_specs = {
- .gprs_get_iface = xmm6260_sec_modem_gprs_get_iface,
- .gprs_get_capabilities = xmm6260_sec_modem_gprs_get_capabilities,
+ .gprs_get_iface = xmm626_sec_modem_gprs_get_iface,
+ .gprs_get_capabilities = xmm626_sec_modem_gprs_get_capabilities,
};
struct ipc_client_nv_data_specs piranha_nv_data_specs = {
- .nv_data_path = XMM6260_NV_DATA_PATH,
- .nv_data_md5_path = XMM6260_NV_DATA_MD5_PATH,
- .nv_data_backup_path = XMM6260_NV_DATA_BACKUP_PATH,
- .nv_data_backup_md5_path = XMM6260_NV_DATA_BACKUP_MD5_PATH,
- .nv_data_secret = XMM6260_NV_DATA_SECRET,
- .nv_data_size = XMM6260_NV_DATA_SIZE,
- .nv_data_chunk_size = XMM6260_NV_DATA_CHUNK_SIZE,
+ .nv_data_path = XMM626_NV_DATA_PATH,
+ .nv_data_md5_path = XMM626_NV_DATA_MD5_PATH,
+ .nv_data_backup_path = XMM626_NV_DATA_BACKUP_PATH,
+ .nv_data_backup_md5_path = XMM626_NV_DATA_BACKUP_MD5_PATH,
+ .nv_data_secret = XMM626_NV_DATA_SECRET,
+ .nv_data_size = XMM626_NV_DATA_SIZE,
+ .nv_data_chunk_size = XMM626_NV_DATA_CHUNK_SIZE,
};
// vim:ts=4:sw=4:expandtab