summaryrefslogtreecommitdiff
path: root/board/st
diff options
context:
space:
mode:
authorMichael Brandt <Michael.Brandt@stericsson.com>2009-10-23 14:14:10 +0200
committerMichael Brandt <Michael.Brandt@stericsson.com>2009-10-23 14:14:10 +0200
commit387ae432fffde2b745d9528918af00c35e84db1a (patch)
tree8b8952ffb1d9ca4022c9e412ae8fb86135a180a2 /board/st
parenteb3f0f68ba384f179bb57ad8d5b0cd095eb4d7a4 (diff)
re-enabled original readblock loop.
Diffstat (limited to 'board/st')
-rwxr-xr-xboard/st/u8500/init_mmc.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/board/st/u8500/init_mmc.c b/board/st/u8500/init_mmc.c
index dc2a7ea4f..02d9f32f7 100755
--- a/board/st/u8500/init_mmc.c
+++ b/board/st/u8500/init_mmc.c
@@ -49,25 +49,21 @@ block_dev_desc_t * mmc_get_dev(int dev)
unsigned long mmc_block_read(int dev, unsigned long blknr,lbaint_t blkcnt,
void *dest)
{
+ unsigned long i;
unsigned long src= blknr;
-
-#if 0
unsigned long rc = 0;
- unsigned long i;
for(i = 0; i < blkcnt; i++)
{
- mmc_readblock (1, (u32) (512 * src), (u32 *)dest, 512, MMCPOLLING);
- rc ++;
+ /* card#, read offset, buffer, blocksize, transfer mode */
+ mmc_readblock(1, (u32) (512 * src), (u32 *)dest, 512,
+ MMCPOLLING);
+ rc++;
src++;
dest += 512;
}
-#endif
- printf("mmc_block_read: dev# %d, blknr %d, blkcnt %d\n",
- dev, blknr, blkcnt);
- /* card#, read offset, buffer, blocksize, transfer mode */
- mmc_readblock (1, (u32) (512 * src), (u32 *)dest, 512, MMCPOLLING);
- return 1;
+
+ return rc;
}
t_mmc_error mmc_fat_read_file (char *filename, u32 address, u32 FileSize)
@@ -329,14 +325,13 @@ static int init_mmc(void)
gpio_base_address -> gpio_dats |= 0x1FFC0000;
gpio_base_address -> gpio_pdis &= ~0x1FFC0000;
-#if 0
#ifdef CONFIG_CMD_FAT
+#if 0
if(init_mmc_fat())
{
printf(" MMC Card not found \n");
}
#endif
-#endif
if (mmc_hw_init() != 0) {
printf("mmc_init: hw init failed\n");
}
@@ -355,6 +350,7 @@ static int init_mmc(void)
if (fat_register_device(&mmc_dev, 1) != 0) {
printf("mmc_init: could not register as FAT device\n");
}
+#endif /* CONFIG_CMD_FAT */
return 0;
}