Skip to contentSkip to conversation

DVB:Siano drivers - Support big endian platform which uses SPI/I2C

PATCH NAK Doron Cohen 2 participants 2 messages Sep 20, 2011 – Sep 23, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 13/17 DVB:Siano drivers - Support big endian platform which uses SPI/I2C

Hi,
This patch step adds support big endian platform which uses SPI/I2C

Thanks,
Doron Cohen

Quoted 1 line

From 2b77c0b5f69924206b9e09cda42aad56772e9380 Mon Sep 17 00:00:00 2001

From: Doron Cohen <[email protected]>
Date: Tue, 20 Sep 2011 08:31:52 +0300
Subject: [PATCH 17/21] Support big endian platform which uses SPI/I2C (need to switch header byte order)

---
 drivers/media/dvb/siano/smscoreapi.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/media/dvb/siano/smscoreapi.c
index e50e356..459c6e9 100644

drivers/media/dvb/siano/smscoreapi.c +0 -0
@@ -570,8 +570,8 @@ static int smscore_load_firmware_family2(struct

smscore_device_t *coredev,
sms_debug("sending reload command."); SMS_INIT_MSG(msg, MSG_SW_RELOAD_START_REQ,
sizeof(struct SmsMsgHdr_S));
- rc = smscore_sendrequest_and_wait(coredev, msg,
- msg->msgLength,
+ smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
+ rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength,
&coredev->reload_start_done);

if (rc < 0) {
@@ -597,7 +597,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
memcpy(DataMsg->Payload, payload, payload_size);

-
+ smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
rc = smscore_sendrequest_and_wait(coredev, DataMsg,
DataMsg->xMsgHeader.msgLength, &coredev->data_download_done);
@@ -976,6 +976,7 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ,
sizeof(struct SmsMsgHdr_S));

+ smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength,
&coredev->version_ex_done);

@@ -1356,6 +1357,8 @@ void smscore_onresponse(struct smscore_device_t *coredev,
rc = client->onresponse_handler(client->context, cb);

if (rc < 0) {
+ smsendian_handle_rx_message((struct SmsMsgData_S *)phdr);
+
switch (phdr->msgType) {
case MSG_SMS_ISDBT_TUNE_RES:
sms_debug("MSG_SMS_ISDBT_TUNE_RES");

Signature · 1 line
1.7.4.1
#1 lore raw

Em 20-09-2011 07:31, Doron Cohen escreveu:

Quoted 2 lines

Hi,
This patch step adds support big endian platform which uses SPI/I2C

seems ok.

Quoted 60 lines

Thanks,
Doron Cohen

Quoted 1 line

From 2b77c0b5f69924206b9e09cda42aad56772e9380 Mon Sep 17 00:00:00 2001

From: Doron Cohen <[email protected]>
Date: Tue, 20 Sep 2011 08:31:52 +0300
Subject: [PATCH 17/21] Support big endian platform which uses SPI/I2C (need to switch header byte order)

---
 drivers/media/dvb/siano/smscoreapi.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
drivers/media/dvb/siano/smscoreapi.c +2 -2
index e50e356..459c6e9 100644
@@ -570,8 +570,8 @@ static int smscore_load_firmware_family2(struct
 smscore_device_t *coredev,
 		sms_debug("sending reload command.");
 		SMS_INIT_MSG(msg, MSG_SW_RELOAD_START_REQ,
 			     sizeof(struct SmsMsgHdr_S));
-		rc = smscore_sendrequest_and_wait(coredev, msg,
-						  msg->msgLength,
+		smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
+		rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength,
 						  &coredev->reload_start_done);
 
drivers/media/dvb/siano/smscoreapi.c +1 -1
 		if (rc < 0) {				
@@ -597,7 +597,7 @@ static int smscore_load_firmware_family2(struct
 smscore_device_t *coredev,
 		memcpy(DataMsg->Payload, payload, payload_size);
 
 
-	
+		smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
 		rc = smscore_sendrequest_and_wait(coredev, DataMsg,
 				DataMsg->xMsgHeader.msgLength,
drivers/media/dvb/siano/smscoreapi.c +3 -0
 				&coredev->data_download_done);
@@ -976,6 +976,7 @@ static int smscore_detect_mode(struct
 smscore_device_t *coredev)
 	SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ,
 		     sizeof(struct SmsMsgHdr_S));
 
+	smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg);
 	rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength,
 					  &coredev->version_ex_done);
@@ -1356,6 +1357,8 @@ void smscore_onresponse(struct smscore_device_t
 *coredev,
 		rc = client->onresponse_handler(client->context, cb);
 
 	if (rc < 0) {
+		smsendian_handle_rx_message((struct SmsMsgData_S *)phdr);
+
 		switch (phdr->msgType) {
 		case MSG_SMS_ISDBT_TUNE_RES:

sms_debug("MSG_SMS_ISDBT_TUNE_RES");