devices-common.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2009-2010 Pengutronix
  3. * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
  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 <linux/kernel.h>
  10. #include <linux/platform_device.h>
  11. #include <linux/init.h>
  12. struct platform_device *mxs_add_platform_device_dmamask(
  13. const char *name, int id,
  14. const struct resource *res, unsigned int num_resources,
  15. const void *data, size_t size_data, u64 dmamask);
  16. static inline struct platform_device *mxs_add_platform_device(
  17. const char *name, int id,
  18. const struct resource *res, unsigned int num_resources,
  19. const void *data, size_t size_data)
  20. {
  21. return mxs_add_platform_device_dmamask(
  22. name, id, res, num_resources, data, size_data, 0);
  23. }
  24. /* duart */
  25. struct mxs_duart_data {
  26. resource_size_t iobase;
  27. resource_size_t iosize;
  28. resource_size_t irq;
  29. };
  30. struct platform_device *__init mxs_add_duart(
  31. const struct mxs_duart_data *data);