[U-Boot-Users] [PATCH] Add S3C2410 MMC/SD support

Haavard Skinnemoen hskinnemoen at gmail.com
Sat Feb 17 00:48:31 CET 2007


On 2/17/07, Harald Welte <laforge at openmoko.org> wrote:
> This patch adds MMC/SD support to the S3C2410 SoC code in u-boot

> +               /* FIXME fill in the correct size (is set to 32MByte) */
> +               mmc_dev.blksz = 512;
> +               mmc_dev.lba = 0x10000;

So...what happens if the card really isn't exactly 32 MB?

> Index: u-boot/include/asm-arm/arch-s3c24x0/mmc.h
> ===================================================================
> --- /dev/null   1970-01-01 00:00:00.000000000 +0000
> +++ u-boot/include/asm-arm/arch-s3c24x0/mmc.h   2007-02-16 23:42:19.000000000 +0100
> @@ -0,0 +1,112 @@
> +/*
> + *  linux/drivers/mmc/mmc_pxa.h

This looks like it's been copied from pxa with few modifications ;)

I wonder if we could perhaps create a common header file for the mmc
protocol definitions instead of duplicating them all over the place?
This file consists entirely of constants and data structures from the
MMC spec, and isn't really arch-specific at all.

I have a patch that adds support for the mmc controller on the
AT32AP7000 chip, and which adds the exact same definitions all over
again to the AVR32 include directory. The same driver should work on
several AT91 chips, which means that we need to add them to the
at91rm9200 and at91sam926x directories too.

Or we could just move everything to a common file and be done with it...

Haavard




More information about the U-Boot mailing list