dev-ohci.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* linux/arch/arm/mach-exynos/dev-ohci.c
  2. *
  3. * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com
  5. *
  6. * EXYNOS - OHCI support
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/dma-mapping.h>
  13. #include <linux/platform_device.h>
  14. #include <mach/irqs.h>
  15. #include <mach/map.h>
  16. #include <mach/ohci.h>
  17. #include <plat/devs.h>
  18. #include <plat/usb-phy.h>
  19. static struct resource exynos4_ohci_resource[] = {
  20. [0] = DEFINE_RES_MEM(EXYNOS4_PA_OHCI, SZ_256),
  21. [1] = DEFINE_RES_IRQ(IRQ_USB_HOST),
  22. };
  23. static u64 exynos4_ohci_dma_mask = DMA_BIT_MASK(32);
  24. struct platform_device exynos4_device_ohci = {
  25. .name = "exynos-ohci",
  26. .id = -1,
  27. .num_resources = ARRAY_SIZE(exynos4_ohci_resource),
  28. .resource = exynos4_ohci_resource,
  29. .dev = {
  30. .dma_mask = &exynos4_ohci_dma_mask,
  31. .coherent_dma_mask = DMA_BIT_MASK(32),
  32. }
  33. };
  34. void __init exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd)
  35. {
  36. struct exynos4_ohci_platdata *npd;
  37. npd = s3c_set_platdata(pd, sizeof(struct exynos4_ohci_platdata),
  38. &exynos4_device_ohci);
  39. if (!npd->phy_init)
  40. npd->phy_init = s5p_usb_phy_init;
  41. if (!npd->phy_exit)
  42. npd->phy_exit = s5p_usb_phy_exit;
  43. }