dslinux/linux-2.6.x/drivers/mmc scsd_s.S

amadeus dslinux_amadeus at user.in-berlin.de
Mon Sep 4 22:04:47 CEST 2006


Update of /cvsroot/dslinux/dslinux/linux-2.6.x/drivers/mmc
In directory antilope:/tmp/cvs-serv654/linux-2.6.x/drivers/mmc

Modified Files:
	scsd_s.S 
Log Message:
Improve detection of Supercard SD/SDlite/CF

Index: scsd_s.S
===================================================================
RCS file: /cvsroot/dslinux/dslinux/linux-2.6.x/drivers/mmc/scsd_s.S,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- scsd_s.S	3 Sep 2006 20:23:09 -0000	1.7
+++ scsd_s.S	4 Sep 2006 20:04:45 -0000	1.8
@@ -27,8 +27,6 @@
 #define SC_SDL_DOWRITE	0x09440000
 	/* SC lite: write 0 before write command */
 
-#define REG_SCCF_LBA1	0x09060000	@ 1st byte of sector address (CF)
-
 /*****************************************************************************/
 
 	@ Test if the card is present.
@@ -43,19 +41,20 @@
 	ldr	r3, =SC_SD_CMD
 	ldrh	r1, [r3]
 	@ store opposite of requested value in SC_SD_CMD (in RAM)
-	mov	r0, #-1
+	mov	r0, #-2
 	strh	r0, [r3]
 	@ now switch to IO mode (save old value @SC_LOCK in R2)
 	sc_set_io
-	@ store opposite of requested value in SC_SD_CMD (in IO)
-	ldr	r3, =SC_SD_CMD
-	mov	r0, #-1
-	strh	r0, [r3]
 	@ now read SC_SD_CMD (in IO)
+	ldr	r3, =SC_SD_CMD
 	ldrh	r0, [r3]
 	tst	r0, #0x300		@ both bits must be 0
-	moveq	r0, #1
-	movne	r0, #0
+	movne	r0, #0			@ failure code
+	bne	scsd_detect_exit
+	tst	r0, #0x001		@ bit must be 1
+	movne	r0, #1			@ success code
+	moveq	r0, #0			@ failure code
+scsd_detect_exit:
 	@ switch back to RAM (restore old value @SC_LOCK from R2)
 	sc_set_ram
 	@ restore RAM contents




More information about the dslinux-commit mailing list