summaryrefslogtreecommitdiff
path: root/packages/linux/linux-ezx/old/ezx_pxamci_debug.patch
blob: a4648bc8cc6562eb4ab1469f8c3deaf1ab754661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Add some debugging code to MMC/SD code 

diff -Nru --exclude-from=/sunbeam/home/laforge/scripts/dontdiff linux-2.6.16.5/drivers/mmc/mmc.c linux-2.6.16.5-exz/drivers/mmc/mmc.c
--- linux-2.6.16.5/drivers/mmc/mmc.c	2006-04-12 22:27:57.000000000 +0200
+++ linux-2.6.16.5-exz/drivers/mmc/mmc.c	2006-04-17 01:40:57.000000000 +0200
@@ -28,7 +28,7 @@
 #include "mmc.h"
 
 #ifdef CONFIG_MMC_DEBUG
-#define DBG(x...)	printk(KERN_DEBUG x)
+#define DBG(x...)	printk(KERN_ERR x)
 #else
 #define DBG(x...)	do { } while (0)
 #endif
@@ -77,7 +77,7 @@
 {
 	struct mmc_command *cmd = mrq->cmd;
 	int err = mrq->cmd->error;
-	DBG("MMC: req done (%02x): %d: %08x %08x %08x %08x\n", cmd->opcode,
+	DBG("MMC: req done (%04x): %d: %08x %08x %08x %08x\n", cmd->opcode,
 	    err, cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]);
 
 	if (err && cmd->retries) {
@@ -1024,8 +1024,11 @@
 		mmc_power_up(host);
 		mmc_idle_cards(host);
 
+		printk("trying SD\n");
 		err = mmc_send_app_op_cond(host, 0, &ocr);
 
+		printk("send_app_op_cond, err: %d\n", err);
+
 		/*
 		 * If we fail to detect any SD cards then try
 		 * searching for MMC cards.
@@ -1033,6 +1036,7 @@
 		if (err != MMC_ERR_NONE) {
 			host->mode = MMC_MODE_MMC;
 
+			printk("trying MMC\n");
 			err = mmc_send_op_cond(host, 0, &ocr);
 			if (err != MMC_ERR_NONE)
 				return;
diff -Nru --exclude-from=/sunbeam/home/laforge/scripts/dontdiff linux-2.6.16.5/drivers/mmc/pxamci.c linux-2.6.16.5-exz/drivers/mmc/pxamci.c
--- linux-2.6.16.5/drivers/mmc/pxamci.c	2006-04-12 22:27:57.000000000 +0200
+++ linux-2.6.16.5-exz/drivers/mmc/pxamci.c	2006-04-17 02:04:52.000000000 +0200
@@ -38,7 +38,7 @@
 #include "pxamci.h"
 
 #ifdef CONFIG_MMC_DEBUG
-#define DBG(x...)	printk(KERN_DEBUG x)
+#define DBG(x...)	printk(KERN_ERR x)
 #else
 #define DBG(x...)	do { } while (0)
 #endif
@@ -229,10 +229,13 @@
 	 * discard the upper 8 bits of the first 16-bit word.
 	 */
 	v = readl(host->base + MMC_RES) & 0xffff;
+	printk("v=0x%04x\n", v);
 	for (i = 0; i < 4; i++) {
 		u32 w1 = readl(host->base + MMC_RES) & 0xffff;
 		u32 w2 = readl(host->base + MMC_RES) & 0xffff;
 		cmd->resp[i] = v << 24 | w1 << 8 | w2 >> 8;
+		printk("w1=0x%04x\n", w1);
+		printk("w2=0x%04x\n", w2);
 		v = w2;
 	}