platform-mxsfb.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2011 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU General Public License version 2 as published by the
  6. * Free Software Foundation.
  7. */
  8. #include <asm/sizes.h>
  9. #include <mach/mx23.h>
  10. #include <mach/mx28.h>
  11. #include <mach/devices-common.h>
  12. #include <mach/mxsfb.h>
  13. #ifdef CONFIG_SOC_IMX23
  14. struct platform_device *__init mx23_add_mxsfb(
  15. const struct mxsfb_platform_data *pdata)
  16. {
  17. struct resource res[] = {
  18. {
  19. .start = MX23_LCDIF_BASE_ADDR,
  20. .end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1,
  21. .flags = IORESOURCE_MEM,
  22. },
  23. };
  24. return mxs_add_platform_device_dmamask("imx23-fb", -1,
  25. res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
  26. }
  27. #endif /* ifdef CONFIG_SOC_IMX23 */
  28. #ifdef CONFIG_SOC_IMX28
  29. struct platform_device *__init mx28_add_mxsfb(
  30. const struct mxsfb_platform_data *pdata)
  31. {
  32. struct resource res[] = {
  33. {
  34. .start = MX28_LCDIF_BASE_ADDR,
  35. .end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1,
  36. .flags = IORESOURCE_MEM,
  37. },
  38. };
  39. return mxs_add_platform_device_dmamask("imx28-fb", -1,
  40. res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
  41. }
  42. #endif /* ifdef CONFIG_SOC_IMX28 */