[U-Boot] [PATCH] add missing PCS3 for MCF5445x

Liew Tsi Chung-R5AAHP r5aahp at freescale.com
Tue Mar 30 19:26:13 CEST 2010


Acked. 


Best Regards,
TsiChung


-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
On Behalf Of Wolfgang Wegner
Sent: Tuesday, March 30, 2010 12:21 PM
To: u-boot at lists.denx.de
Cc: Wolfgang Wegner
Subject: [U-Boot] [PATCH] add missing PCS3 for MCF5445x

This patch adds the code for handling PCS3 (DSPI chip select 3) in
cpu_init.c and m5445x.h

Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
---
 cpu/mcf5445x/cpu_init.c   |    7 +++++++
 include/asm-m68k/m5445x.h |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/cpu/mcf5445x/cpu_init.c b/cpu/mcf5445x/cpu_init.c index
2389019..fdcd185 100644
--- a/cpu/mcf5445x/cpu_init.c
+++ b/cpu/mcf5445x/cpu_init.c
@@ -258,6 +258,10 @@ int cfspi_claim_bus(uint bus, uint cs)
 		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS2_PCS2;
 		gpio->par_dspi |= GPIO_PAR_DSPI_PCS2_PCS2;
 		break;
+	case 3:
+		gpio->par_dma &= GPIO_PAR_DMA_DACK0_UNMASK;
+		gpio->par_dma |= GPIO_PAR_DMA_DACK0_PCS3;
+		break;
 	case 5:
 		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS5_PCS5;
 		gpio->par_dspi |= GPIO_PAR_DSPI_PCS5_PCS5; @@ -284,6
+288,9 @@ void cfspi_release_bus(uint bus, uint cs)
 	case 2:
 		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS2_PCS2;
 		break;
+	case 3:
+		gpio->par_dma &= GPIO_PAR_DMA_DACK0_UNMASK;
+		break;
 	case 5:
 		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS5_PCS5;
 		break;
diff --git a/include/asm-m68k/m5445x.h b/include/asm-m68k/m5445x.h index
dfddde6..c575b8f 100644
--- a/include/asm-m68k/m5445x.h
+++ b/include/asm-m68k/m5445x.h
@@ -314,6 +314,7 @@
 #define GPIO_PAR_DMA_DREQ1_GPIO		(0x00)
 #define GPIO_PAR_DMA_DACK0_UNMASK	(0xF3)
 #define GPIO_PAR_DMA_DACK0_DACK1	(0x0C)
+#define GPIO_PAR_DMA_DACK0_PCS3		(0x08)
 #define GPIO_PAR_DMA_DACK0_ULPI_DIR	(0x04)
 #define GPIO_PAR_DMA_DACK0_GPIO		(0x00)
 #define GPIO_PAR_DMA_DREQ0_DREQ0	(0x01)
--
1.5.6.5

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot



More information about the U-Boot mailing list