1 /* linux/arch/arm/plat-s3c/dev-hsmmc1.c
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
7 * S3C series device definition for hsmmc device 1
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/mmc/host.h>
19 #include <plat/sdhci.h>
20 #include <plat/devs.h>
23 #define S3C_SZ_HSMMC (0x1000)
25 static struct resource s3c_hsmmc1_resource[] = {
27 .start = S3C_PA_HSMMC1,
28 .end = S3C_PA_HSMMC1 + S3C_SZ_HSMMC - 1,
29 .flags = IORESOURCE_MEM,
34 .flags = IORESOURCE_IRQ,
38 static u64 s3c_device_hsmmc1_dmamask = 0xffffffffUL;
40 struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata = {
42 .host_caps = (MMC_CAP_4_BIT_DATA |
43 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
44 .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL,
47 struct platform_device s3c_device_hsmmc1 = {
50 .num_resources = ARRAY_SIZE(s3c_hsmmc1_resource),
51 .resource = s3c_hsmmc1_resource,
53 .dma_mask = &s3c_device_hsmmc1_dmamask,
54 .coherent_dma_mask = 0xffffffffUL,
55 .platform_data = &s3c_hsmmc1_def_platdata,
59 void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd)
61 struct s3c_sdhci_platdata *set = &s3c_hsmmc1_def_platdata;
63 set->cd_type = pd->cd_type;
64 set->ext_cd_init = pd->ext_cd_init;
65 set->ext_cd_cleanup = pd->ext_cd_cleanup;
66 set->ext_cd_gpio = pd->ext_cd_gpio;
67 set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert;
70 set->max_width = pd->max_width;
72 set->cfg_gpio = pd->cfg_gpio;
74 set->cfg_card = pd->cfg_card;
76 set->host_caps |= pd->host_caps;
78 set->clk_type = pd->clk_type;