From: lamikr <lamikr@cc.jyu.fi>
To: OMAP-Linux <linux-omap-open-source@linux.omap.com>
Subject: Re: [PATCH] fix MMC response types
Date: Thu, 30 Mar 2006 02:29:04 +0300 [thread overview]
Message-ID: <442B1840.6060801@cc.jyu.fi> (raw)
In-Reply-To: <4429A3A6.5000503@indt.org.br>
[-- Attachment #1: Type: text/plain, Size: 797 bytes --]
So there are planned to do somekind of MMC/SD code merge with the
mainline and has it already happened in the current driver version in
linux-omap.git?
Just to confuse a little bit more... I have a small patch I received
from another ipaq h6300 (omap1510 based) developer. As I do not know
anything from the mmc/sd layer, all I can say is that with this patch me
and the Deniz (patch author) were able to boot from the SD card to iPAQ
h6300. (I tested with 512 mb kingston)
Without this patch we were only able to boot from the MMC cards. Deniz
(said that he is not 100 % sure whether all of the changes are actually
needed
or would only a subset be enought.
Hopefully this patch is not needed anymore after your updates, but here
it is anyway just in case that somebody finds it usefull.
Mika
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sd_fixes.diff --]
[-- Type: text/x-patch; name="sd_fixes.diff", Size: 2422 bytes --]
diff -Naur orig/mmc.c fixed/mmc.c
--- orig/mmc.c 2006-03-18 10:22:19.000000000 +0200
+++ fixed/mmc.c 2006-03-18 10:30:32.000000000 +0200
@@ -964,7 +964,7 @@
mmc_decode_scr(card);
}
- mmc_deselect_cards(host);
+ //mmc_deselect_cards(host);
}
static unsigned int mmc_calculate_clock(struct mmc_host *host)
diff -Naur orig/omap.c fixed/omap.c
--- orig/omap.c 2006-03-18 10:22:10.000000000 +0200
+++ fixed/omap.c 2006-03-18 10:42:48.000000000 +0200
@@ -2,7 +2,7 @@
* linux/drivers/media/mmc/omap.c
*
* Copyright (C) 2004 Nokia Corporation
- * Written by Tuukka Tikkanen and Juha Yrjölä <juha.yrjola@nokia.com>
+ * Written by Tuukka Tikkanen and Juha Yrjölä <juha.yrjola@nokia.com>
* Misc hacks here and there by Tony Lindgren <tony@atomide.com>
* Other hacks (DMA, SD, etc) by David Brownell
*
@@ -231,6 +231,9 @@
if (host->data && !(host->data->flags & MMC_DATA_WRITE))
cmdreg |= 1 << 15;
+ if (cmd->opcode==0)
+ cmdreg |= 1 << 7;
+
clk_enable(host->fclk);
OMAP_MMC_WRITE(host->base, CTO, 200);
@@ -890,7 +893,7 @@
reg &= ~(1 << 5);
OMAP_MMC_WRITE(host->base, SDIO, reg);
/* Set maximum timeout */
- OMAP_MMC_WRITE(host->base, CTO, 0xff);
+ OMAP_MMC_WRITE(host->base, CTO, 0xfd);
}
static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req)
@@ -901,7 +904,7 @@
/* Convert ns to clock cycles by assuming 20MHz frequency
* 1 cycle at 20MHz = 500 ns
*/
- timeout = req->data->timeout_clks + req->data->timeout_ns / 500;
+ timeout = (req->data->timeout_clks * 10) + (req->data->timeout_ns*10) / 500;
/* Some cards require more time to do at least the first read operation */
timeout = timeout << 4;
@@ -986,7 +989,7 @@
mmc_omap_sg_to_buf(host);
host->dma_in_use = 0;
}
- mod_timer(&host->xfer_timer, jiffies + msecs_to_jiffies(500));
+ mod_timer(&host->xfer_timer, jiffies + msecs_to_jiffies(1500));
pr_debug("MMC%d: %s %s %s, DTO %d cycles + %d ns, "
"%d blocks of %d bytes, %d segments\n",
@@ -1164,7 +1167,7 @@
case MMC_POWER_UP:
case MMC_POWER_ON:
mmc_omap_power(host, 1);
- dsor |= 1<<11;
+ dsor = (120 | (1 << 11));
break;
}
@@ -1484,4 +1487,4 @@
MODULE_DESCRIPTION("OMAP Multimedia Card driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS(DRIVER_NAME);
-MODULE_AUTHOR("Juha Yrjölä");
+MODULE_AUTHOR("Juha Yrjölä");
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2006-03-29 23:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 20:37 [PATCH] fix MMC response types andrzej zaborowski
2006-03-27 12:46 ` Carlos Aguiar
2006-03-27 20:04 ` andrzej zaborowski
2006-03-28 20:59 ` Carlos Aguiar
2006-03-29 23:29 ` lamikr [this message]
2006-03-31 17:35 ` lamikr
-- strict thread matches above, loose matches on Subject: below --
2006-03-27 12:56 Carlos Aguiar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=442B1840.6060801@cc.jyu.fi \
--to=lamikr@cc.jyu.fi \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox