mmc.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. *
  3. * arch/arm/mach-u300/mmc.c
  4. *
  5. *
  6. * Copyright (C) 2009 ST-Ericsson SA
  7. * License terms: GNU General Public License (GPL) version 2
  8. *
  9. * Author: Linus Walleij <linus.walleij@stericsson.com>
  10. * Author: Johan Lundin
  11. * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
  12. */
  13. #include <linux/device.h>
  14. #include <linux/amba/bus.h>
  15. #include <linux/mmc/host.h>
  16. #include <linux/dmaengine.h>
  17. #include <linux/amba/mmci.h>
  18. #include <linux/slab.h>
  19. #include <mach/coh901318.h>
  20. #include <mach/dma_channels.h>
  21. #include "u300-gpio.h"
  22. #include "mmc.h"
  23. static struct mmci_platform_data mmc0_plat_data = {
  24. /*
  25. * Do not set ocr_mask or voltage translation function,
  26. * we have a regulator we can control instead.
  27. */
  28. /* Nominally 2.85V on our platform */
  29. .f_max = 24000000,
  30. .gpio_wp = -1,
  31. .gpio_cd = U300_GPIO_PIN_MMC_CD,
  32. .cd_invert = true,
  33. .capabilities = MMC_CAP_MMC_HIGHSPEED |
  34. MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
  35. #ifdef CONFIG_COH901318
  36. .dma_filter = coh901318_filter_id,
  37. .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX,
  38. /* Don't specify a TX channel, this RX channel is bidirectional */
  39. #endif
  40. };
  41. int __devinit mmc_init(struct amba_device *adev)
  42. {
  43. struct device *mmcsd_device = &adev->dev;
  44. int ret = 0;
  45. mmcsd_device->platform_data = &mmc0_plat_data;
  46. return ret;
  47. }