dev-hsmmc2.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* linux/arch/arm/plat-s3c/dev-hsmmc2.c
  2. *
  3. * Copyright (c) 2009 Samsung Electronics
  4. * Copyright (c) 2009 Maurus Cuelenaere
  5. *
  6. * Based on arch/arm/plat-s3c/dev-hsmmc1.c
  7. * original file Copyright (c) 2008 Simtec Electronics
  8. *
  9. * S3C series device definition for hsmmc device 2
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. */
  15. #include <linux/kernel.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/mmc/host.h>
  18. #include <mach/map.h>
  19. #include <plat/sdhci.h>
  20. #include <plat/devs.h>
  21. #define S3C_SZ_HSMMC (0x1000)
  22. static struct resource s3c_hsmmc2_resource[] = {
  23. [0] = {
  24. .start = S3C_PA_HSMMC2,
  25. .end = S3C_PA_HSMMC2 + S3C_SZ_HSMMC - 1,
  26. .flags = IORESOURCE_MEM,
  27. },
  28. [1] = {
  29. .start = IRQ_HSMMC2,
  30. .end = IRQ_HSMMC2,
  31. .flags = IORESOURCE_IRQ,
  32. }
  33. };
  34. static u64 s3c_device_hsmmc2_dmamask = 0xffffffffUL;
  35. struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata = {
  36. .max_width = 4,
  37. .host_caps = (MMC_CAP_4_BIT_DATA |
  38. MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
  39. .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL,
  40. };
  41. struct platform_device s3c_device_hsmmc2 = {
  42. .name = "s3c-sdhci",
  43. .id = 2,
  44. .num_resources = ARRAY_SIZE(s3c_hsmmc2_resource),
  45. .resource = s3c_hsmmc2_resource,
  46. .dev = {
  47. .dma_mask = &s3c_device_hsmmc2_dmamask,
  48. .coherent_dma_mask = 0xffffffffUL,
  49. .platform_data = &s3c_hsmmc2_def_platdata,
  50. },
  51. };
  52. void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd)
  53. {
  54. s3c_sdhci_set_platdata(pd, &s3c_hsmmc2_def_platdata);
  55. }