omap24xx: Support booting userland from MMC card

SVN-Revision: 22531
This commit is contained in:
Michael Büsch 2010-08-08 16:38:39 +00:00
parent 975ba9a88d
commit d9c0e977a4
3 changed files with 74 additions and 6 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
ARCH:=arm
BOARD:=omap24xx
BOARDNAME:=TI OMAP-24xx
FEATURES:=jffs2
FEATURES:=squashfs jffs2
LINUX_VERSION:=2.6.35

View file

@ -75,7 +75,7 @@ CONFIG_CBUS_RETU_WDT=y
CONFIG_CBUS_TAHVO=y
CONFIG_CBUS_TAHVO_USER=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CMDLINE="root=1f03 rootfstype=jffs2 console=ttyS2,115200 console=tty0"
CONFIG_CMDLINE="root=/dev/mmcblk0p1 rootfstype=ext3,ext2,squashfs,jffs2 console=tty0 console=ttyS2,115200n8"
CONFIG_CMDLINE_FORCE=y
CONFIG_COMMON_CLKDEV=y
CONFIG_COMPAT_BRK=y
@ -152,7 +152,7 @@ CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_XIP=y
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_POSIX_ACL=y
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_EXT3_FS_XATTR=y
@ -283,7 +283,7 @@ CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IR_CORE=m
# CONFIG_ISDN is not set
CONFIG_JBD=m
CONFIG_JBD=y
CONFIG_JFFS2_LZO=y
CONFIG_JFFS2_ZLIB=y
CONFIG_KALLSYMS=y
@ -325,6 +325,7 @@ CONFIG_MACH_OMAP2_TUSB6010=y
# CONFIG_MACH_OMAP_GENERIC is not set
# CONFIG_MACH_OMAP_H4 is not set
CONFIG_MACVLAN=m
CONFIG_MAC_PARTITION=y
# CONFIG_MAX1363 is not set
CONFIG_MEDIA_ATTACH=y
CONFIG_MEDIA_SUPPORT=m
@ -344,6 +345,8 @@ CONFIG_MENELAUS=y
CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_OMAP=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SPI=y
CONFIG_MMC_UNSAFE_RESUME=y
CONFIG_MODULE_FORCE_LOAD=y
@ -360,6 +363,8 @@ CONFIG_MTD_ONENAND_OMAP2=y
CONFIG_MTD_ONENAND_OTP=y
# CONFIG_MTD_ONENAND_SIM is not set
# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
# CONFIG_MTD_ROOTFS_ROOT_DEV is not set
# CONFIG_MTD_ROOTFS_SPLIT is not set
CONFIG_NAMESPACES=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NETDEV_10000=y
@ -389,7 +394,6 @@ CONFIG_OMAP_RESET_CLOCKS=y
CONFIG_OMAP_WATCHDOG=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_PARTITION_ADVANCED is not set
# CONFIG_PCI_SYSCALL is not set
CONFIG_PERF_USE_VMALLOC=y
# CONFIG_PLAT_SPEAR is not set
@ -423,7 +427,7 @@ CONFIG_SCHED_DEBUG=y
CONFIG_SCSI=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_SCSI_MOD=y
CONFIG_SDIO_UART=m
# CONFIG_SDIO_UART is not set
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_TSL2563=m
# CONFIG_SERIAL_8250_EXTENDED is not set

View file

@ -0,0 +1,64 @@
---
drivers/mmc/core/core.c | 5 +++--
drivers/mmc/host/omap.c | 7 +++++--
include/linux/mmc/host.h | 2 ++
3 files changed, 10 insertions(+), 4 deletions(-)
--- linux-2.6.35.orig/drivers/mmc/host/omap.c
+++ linux-2.6.35/drivers/mmc/host/omap.c
@@ -387,7 +387,7 @@ mmc_omap_start_command(struct mmc_omap_h
mod_timer(&host->cmd_abort_timer, jiffies + HZ/2);
- OMAP_MMC_WRITE(host, CTO, 200);
+// OMAP_MMC_WRITE(host, CTO, 200);
OMAP_MMC_WRITE(host, ARGL, cmd->arg & 0xffff);
OMAP_MMC_WRITE(host, ARGH, cmd->arg >> 16);
OMAP_MMC_WRITE(host, IE,
@@ -1455,6 +1455,7 @@ static int __init mmc_omap_probe(struct
host->dma_ch = -1;
host->irq = irq;
+ host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
host->phys_base = host->mem_res->start;
host->virt_base = ioremap(res->start, res->end - res->start + 1);
if (!host->virt_base)
@@ -1494,7 +1495,9 @@ static int __init mmc_omap_probe(struct
}
}
- host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
+ /* Make sure the detect workqueue was run at least once. */
+ printk(KERN_INFO "OMAP-mmc: waiting for cards...\n");
+ mmc_flush_scheduled_work();
return 0;
--- linux-2.6.35.orig/drivers/mmc/core/core.c
+++ linux-2.6.35/drivers/mmc/core/core.c
@@ -73,12 +73,13 @@ static int mmc_schedule_delayed_work(str
}
/*
- * Internal function. Flush all scheduled work from the MMC work queue.
+ * Flush all scheduled work from the MMC work queue.
*/
-static void mmc_flush_scheduled_work(void)
+void mmc_flush_scheduled_work(void)
{
flush_workqueue(workqueue);
}
+EXPORT_SYMBOL(mmc_flush_scheduled_work);
/**
* mmc_request_done - finish processing an MMC request
--- linux-2.6.35.orig/include/linux/mmc/host.h
+++ linux-2.6.35/include/linux/mmc/host.h
@@ -264,5 +264,7 @@ static inline void mmc_set_disable_delay
host->disable_delay = disable_delay;
}
+void mmc_flush_scheduled_work(void);
+
#endif