From 9d9bd44734a5deb0a3761cf450bcd25f3ad5744d Mon Sep 17 00:00:00 2001
From: Steve Markgraf <steve@steve-m.de>
Date: Mon, 17 Jan 2011 23:26:06 +0100
Subject: [PATCH] for testing: add TX support for gta0x devices

Signed-off-by: Steve Markgraf <steve@steve-m.de>
---
 .../firmware/board/common/rffe_gta0x_triband.c     |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/target/firmware/board/common/rffe_gta0x_triband.c b/src/target/firmware/board/common/rffe_gta0x_triband.c
index a21cc61..d3bb4b6 100644
--- a/src/target/firmware/board/common/rffe_gta0x_triband.c
+++ b/src/target/firmware/board/common/rffe_gta0x_triband.c
@@ -33,7 +33,7 @@ void rffe_mode(enum gsm_band band, int tx)
 
 	/* First we mask off all bits from the state cache */
 	tspact &= ~PA_ENABLE;
-	tspact |=  GSM_TXEN;	/* low-active */
+	tspact &= ~GSM_TXEN;
 	tspact |= ASM_VC1 | ASM_VC2 | ASM_VC3; /* low-active */
 
 	switch (band) {
@@ -52,7 +52,21 @@ void rffe_mode(enum gsm_band band, int tx)
 #ifdef CONFIG_TX_ENABLE
 	/* Then we selectively set the bits on, if required */
 	if (tx) {
-		// TODO: Implement tx
+		switch (band) {
+		case GSM_BAND_850:
+		case GSM_BAND_900:
+			tspact &= ~ASM_VC3;
+			break;
+		case GSM_BAND_1800:
+		case GSM_BAND_1900:
+			tspact &= ~ASM_VC1;
+			tspact |= ASM_VC2;
+			tspact |= GSM_TXEN;
+			break;
+		default:
+			break;
+		}
+		tspact |= PA_ENABLE;
 	}
 #endif /* TRANSMIT_SUPPORT */
 
-- 
1.7.1

