Index: linux-2.6.24/arch/arm/mach-s3c2440/mach-g500.c
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2440/mach-g500.c	2008-01-28 11:38:57.000000000 +0100
+++ linux-2.6.24/arch/arm/mach-s3c2440/mach-g500.c	2008-01-28 11:41:30.000000000 +0100
@@ -28,8 +28,10 @@
 
 #include <asm/arch/regs-lcd.h>
 #include <asm/arch/regs-irq.h>
+#include <asm/arch/regs-gpio.h>
 #include <asm/arch/fb.h>
 #include <asm/arch/ts.h>
+#include <asm/arch/mci.h>
 
 #include <asm/plat-s3c/regs-serial.h>
 #include <asm/plat-s3c/nand.h>
@@ -42,6 +44,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mmc/host.h>
 
 static struct map_desc g500_iodesc[] __initdata = {
 	/* nothing */
@@ -172,6 +175,25 @@
 	.oversampling_shift = 5,
 };
 
+static void s3c2410_mmc_set_setpower(unsigned char power_mode, unsigned short vdd)
+{
+	s3c2410_gpio_cfgpin(S3C2410_GPA17, S3C2410_GPIO_OUTPUT);
+	switch (power_mode) {
+	case MMC_POWER_OFF:
+		s3c2410_gpio_setpin(S3C2410_GPA17, 1);
+		break;
+	case MMC_POWER_ON:
+		s3c2410_gpio_setpin(S3C2410_GPA17, 0);
+		break;
+	}
+}
+
+static struct s3c24xx_mci_pdata g500_mmc_cfg = {
+ .gpio_detect  = S3C2410_GPF6,
+ .set_power  = s3c2410_mmc_set_setpower,
+ .ocr_avail  = MMC_VDD_32_33,
+};
+
 static struct platform_device *g500_devices[] __initdata = {
 	&s3c_device_usb,
 	&s3c_device_lcd,
@@ -181,11 +203,13 @@
 	&s3c_device_nand,
 	&s3c_device_usbgadget,
 	&s3c_device_ts,
+	&s3c_device_sdi,
 };
 
 static void __init g500_map_io(void)
 {
 	s3c_device_nand.dev.platform_data = &g500_nand_info;
+	s3c_device_sdi.dev.platform_data = &g500_mmc_cfg;
 	s3c24xx_init_io(g500_iodesc, ARRAY_SIZE(g500_iodesc));
 	s3c24xx_init_clocks(0);
 	s3c24xx_init_uarts(g500_uartcfgs, ARRAY_SIZE(g500_uartcfgs));

