dev-fimd0.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* linux/arch/arm/plat-s5p/dev-fimd0.c
  2. *
  3. * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com
  5. *
  6. * Core file for Samsung Display Controller (FIMD) driver
  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/kernel.h>
  13. #include <linux/string.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/fb.h>
  16. #include <linux/gfp.h>
  17. #include <linux/dma-mapping.h>
  18. #include <mach/irqs.h>
  19. #include <mach/map.h>
  20. #include <plat/fb.h>
  21. #include <plat/devs.h>
  22. #include <plat/cpu.h>
  23. static struct resource s5p_fimd0_resource[] = {
  24. [0] = {
  25. .start = S5P_PA_FIMD0,
  26. .end = S5P_PA_FIMD0 + SZ_32K - 1,
  27. .flags = IORESOURCE_MEM,
  28. },
  29. [1] = {
  30. .start = IRQ_FIMD0_VSYNC,
  31. .end = IRQ_FIMD0_VSYNC,
  32. .flags = IORESOURCE_IRQ,
  33. },
  34. [2] = {
  35. .start = IRQ_FIMD0_FIFO,
  36. .end = IRQ_FIMD0_FIFO,
  37. .flags = IORESOURCE_IRQ,
  38. },
  39. [3] = {
  40. .start = IRQ_FIMD0_SYSTEM,
  41. .end = IRQ_FIMD0_SYSTEM,
  42. .flags = IORESOURCE_IRQ,
  43. },
  44. };
  45. static u64 fimd0_dmamask = DMA_BIT_MASK(32);
  46. struct platform_device s5p_device_fimd0 = {
  47. .name = "s5p-fb",
  48. .id = 0,
  49. .num_resources = ARRAY_SIZE(s5p_fimd0_resource),
  50. .resource = s5p_fimd0_resource,
  51. .dev = {
  52. .dma_mask = &fimd0_dmamask,
  53. .coherent_dma_mask = DMA_BIT_MASK(32),
  54. },
  55. };
  56. void __init s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd)
  57. {
  58. s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),
  59. &s5p_device_fimd0);
  60. }