devices-common.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include <linux/amba/bus.h>
  13. struct platform_device *mxs_add_platform_device_dmamask(
  14. const char *name, int id,
  15. const struct resource *res, unsigned int num_resources,
  16. const void *data, size_t size_data, u64 dmamask);
  17. static inline struct platform_device *mxs_add_platform_device(
  18. const char *name, int id,
  19. const struct resource *res, unsigned int num_resources,
  20. const void *data, size_t size_data)
  21. {
  22. return mxs_add_platform_device_dmamask(
  23. name, id, res, num_resources, data, size_data, 0);
  24. }
  25. int __init mxs_add_amba_device(const struct amba_device *dev);
  26. /* duart */
  27. int __init mxs_add_duart(const struct amba_device *dev);
  28. /* fec */
  29. #include <linux/fec.h>
  30. struct mxs_fec_data {
  31. int id;
  32. resource_size_t iobase;
  33. resource_size_t iosize;
  34. resource_size_t irq;
  35. };
  36. struct platform_device *__init mxs_add_fec(
  37. const struct mxs_fec_data *data,
  38. const struct fec_platform_data *pdata);