Subject: a patch for SA1111 bus master DMA

From: Kunihiko IMAI <[email-masked]>
Date: Tue, 20 Jun 2000 13:57:47 +0900

Hello,

I made a patch for SA1111 bus master DMA.  But I wonder that this code
should be placed here.  Or should be defined another macro?

Thanks.
_._. __._  _.. .  .___ ._. _____ _... ._ _._  _.._. .____  .__. ... .  _._

                                                             Kunihiko IMAI

--- linux-2.4.0-test1-ac19-rmk1-np1/arch/arm/kernel/hw-sa1100.c.ORIG	Mon Jun 19 14:25:36 2000
+++ linux-2.4.0-test1-ac19-rmk1-np1/arch/arm/kernel/hw-sa1100.c	Tue Jun 20 13:10:41 2000
@@ -112,6 +112,34 @@
    * any other SA-1111 functional blocks must be enabled separately
    * using the SKPCR.
    */
+
+  {
+  /*
+   * SA1111 DMA bus master setup 
+   */
+	int cas;
+
+	/* SA1111 side */
+	switch ( (MDCNFG>>12) & 0x03 ) {
+	case 0x02:
+		cas = 0; break;
+	case 0x03:
+		cas = 1; break;
+	default:
+		cas = 1; break;
+	}
+	SMCR = 1		/* 1: memory is SDRAM */
+		| ( 1 << 1 )	/* 1:MBGNT is enable */
+		| ( ((MDCNFG >> 4) & 0x07) << 2 )	/* row address lines */
+		| ( cas << 5 );	/* CAS ratency */
+
+	/* SA1110 side */
+	GPDR |= 1<<21;
+	GPDR &= ~(1<<22);
+	GAFR |= ( (1<<21) | (1<<22) );
+
+	TUCR |= (1<<10);
+  }
 }
 
 #endif
@@ -129,6 +157,10 @@
 				"hasn't been configured in the kernel\n" );
 #endif
 		}
+	} else if ( machine_is_xp860() ) {
+#ifdef CONFIG_SA1111
+		sa1111_init();
+#endif
 	}
 }

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]