platform-imx27-coda.c 922 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) 2012 Vista Silicon
  3. * Javier Martin <javier.martin@vista-silicon.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it under
  6. * the terms of the GNU General Public License version 2 as published by the
  7. * Free Software Foundation.
  8. */
  9. #include "../hardware.h"
  10. #include "devices-common.h"
  11. #ifdef CONFIG_SOC_IMX27
  12. const struct imx_imx27_coda_data imx27_coda_data __initconst = {
  13. .iobase = MX27_VPU_BASE_ADDR,
  14. .iosize = SZ_512,
  15. .irq = MX27_INT_VPU,
  16. };
  17. #endif
  18. struct platform_device *__init imx_add_imx27_coda(
  19. const struct imx_imx27_coda_data *data)
  20. {
  21. struct resource res[] = {
  22. {
  23. .start = data->iobase,
  24. .end = data->iobase + data->iosize - 1,
  25. .flags = IORESOURCE_MEM,
  26. }, {
  27. .start = data->irq,
  28. .end = data->irq,
  29. .flags = IORESOURCE_IRQ,
  30. },
  31. };
  32. return imx_add_platform_device_dmamask("coda-imx27", 0, res, 2, NULL,
  33. 0, DMA_BIT_MASK(32));
  34. }