All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH  13/17]DVB:Siano drivers - Support big endian platform which uses SPI/I2C
@ 2011-09-20 10:31 Doron Cohen
  2011-09-23 22:45 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Doron Cohen @ 2011-09-20 10:31 UTC (permalink / raw)
  To: linux-media

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

Thanks,
Doron Cohen

>From 2b77c0b5f69924206b9e09cda42aad56772e9380 Mon Sep 17 00:00:00 2001
From: Doron Cohen <doronc@siano-ms.com>
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(-)

diff --git a/drivers/media/dvb/siano/smscoreapi.c
b/drivers/media/dvb/siano/smscoreapi.c
index e50e356..459c6e9 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -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");
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-23 22:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20 10:31 [PATCH 13/17]DVB:Siano drivers - Support big endian platform which uses SPI/I2C Doron Cohen
2011-09-23 22:45 ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.