aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/devices/maguro/maguro.c
diff options
context:
space:
mode:
Diffstat (limited to 'samsung-ipc/devices/maguro/maguro.c')
-rw-r--r--samsung-ipc/devices/maguro/maguro.c104
1 files changed, 52 insertions, 52 deletions
diff --git a/samsung-ipc/devices/maguro/maguro.c b/samsung-ipc/devices/maguro/maguro.c
index f157883..7bb59af 100644
--- a/samsung-ipc/devices/maguro/maguro.c
+++ b/samsung-ipc/devices/maguro/maguro.c
@@ -28,9 +28,9 @@
#include <ipc.h>
#include <utils.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 "maguro.h"
int maguro_boot(struct ipc_client *client)
@@ -61,21 +61,21 @@ int maguro_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;
@@ -84,16 +84,16 @@ int maguro_boot(struct ipc_client *client)
p = (unsigned char *) modem_image_data + MAGURO_PSI_OFFSET;
- rc = xmm6260_mipi_psi_send(client, modem_boot_fd, (void *) p, MAGURO_PSI_SIZE);
+ rc = xmm626_mipi_psi_send(client, modem_boot_fd, (void *) p, MAGURO_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;
@@ -102,44 +102,44 @@ int maguro_boot(struct ipc_client *client)
p = (unsigned char *) modem_image_data + MAGURO_EBL_OFFSET;
- rc = xmm6260_mipi_ebl_send(client, modem_boot_fd, (void *) p, MAGURO_EBL_SIZE);
+ rc = xmm626_mipi_ebl_send(client, modem_boot_fd, (void *) p, MAGURO_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 + MAGURO_SEC_START_OFFSET;
- rc = xmm6260_mipi_sec_start_send(client, modem_boot_fd, (void *) p, MAGURO_SEC_START_SIZE);
+ rc = xmm626_mipi_sec_start_send(client, modem_boot_fd, (void *) p, MAGURO_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 + MAGURO_FIRMWARE_OFFSET;
- rc = xmm6260_mipi_firmware_send(client, modem_boot_fd, (void *) p, MAGURO_FIRMWARE_SIZE);
+ rc = xmm626_mipi_firmware_send(client, modem_boot_fd, (void *) p, MAGURO_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");
mps_data = file_data_read(MAGURO_MPS_DATA_DEVICE, MAGURO_MPS_DATA_SIZE, MAGURO_MPS_DATA_SIZE, 0);
if (mps_data == NULL) {
@@ -148,35 +148,35 @@ int maguro_boot(struct ipc_client *client)
}
ipc_client_log(client, "Read MPS data");
- rc = xmm6260_mipi_mps_data_send(client, modem_boot_fd, mps_data, MAGURO_MPS_DATA_SIZE);
+ rc = xmm626_mipi_mps_data_send(client, modem_boot_fd, mps_data, MAGURO_MPS_DATA_SIZE);
if (rc < 0) {
- ipc_client_log(client, "Sending XMM6260 MIPI MPS data failed");
+ ipc_client_log(client, "Sending XMM626 MIPI MPS data failed");
goto error;
}
- ipc_client_log(client, "Sent XMM6260 MIPI MPS data");
+ ipc_client_log(client, "Sent XMM626 MIPI MPS 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 = xmm6260_sec_modem_status_online_wait(modem_boot_fd);
+ rc = xmm626_sec_modem_status_online_wait(modem_boot_fd);
if (rc < 0) {
ipc_client_log(client, "Waiting for online status failed");
goto error;
}
ipc_client_log(client, "Waited for online status");
- rc = xmm6260_sec_modem_boot_power(modem_boot_fd, 0);
+ rc = xmm626_sec_modem_boot_power(modem_boot_fd, 0);
if (rc < 0) {
ipc_client_log(client, "Turning modem boot off failed");
goto error;
@@ -214,7 +214,7 @@ int maguro_open(void *data, int type)
transport_data = (struct maguro_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;
@@ -230,7 +230,7 @@ int maguro_close(void *data)
transport_data = (struct maguro_transport_data *) data;
- xmm6260_sec_modem_close(transport_data->fd);
+ xmm626_sec_modem_close(transport_data->fd);
transport_data->fd = -1;
return 0;
@@ -246,7 +246,7 @@ int maguro_read(void *data, void *buffer, size_t length)
transport_data = (struct maguro_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;
}
@@ -261,7 +261,7 @@ int maguro_write(void *data, const void *buffer, size_t length)
transport_data = (struct maguro_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;
}
@@ -276,7 +276,7 @@ int maguro_poll(void *data, struct timeval *timeout)
transport_data = (struct maguro_transport_data *) data;
- rc = xmm6260_sec_modem_poll(transport_data->fd, timeout);
+ rc = xmm626_sec_modem_poll(transport_data->fd, timeout);
return rc;
}
@@ -291,11 +291,11 @@ int maguro_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);
@@ -329,14 +329,14 @@ int maguro_data_destroy(void *transport_data, void *power_data,
struct ipc_client_ops maguro_fmt_ops = {
.boot = maguro_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 maguro_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 maguro_handlers = {
@@ -357,8 +357,8 @@ struct ipc_client_handlers maguro_handlers = {
};
struct ipc_client_gprs_specs maguro_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 maguro_nv_data_specs = {
@@ -366,9 +366,9 @@ struct ipc_client_nv_data_specs maguro_nv_data_specs = {
.nv_data_md5_path = MAGURO_NV_DATA_MD5_PATH,
.nv_data_backup_path = MAGURO_NV_DATA_BACKUP_PATH,
.nv_data_backup_md5_path = MAGURO_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_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