amba-duart.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (C) 2009-2010 Pengutronix
  3. * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
  4. *
  5. * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify it under
  8. * the terms of the GNU General Public License version 2 as published by the
  9. * Free Software Foundation.
  10. */
  11. #include <asm/irq.h>
  12. #include <mach/mx23.h>
  13. #include <mach/mx28.h>
  14. #include <mach/devices-common.h>
  15. #define MXS_AMBA_DUART_DEVICE(name, soc) \
  16. const struct amba_device name##_device __initconst = { \
  17. .dev = { \
  18. .init_name = "duart", \
  19. }, \
  20. .res = { \
  21. .start = soc ## _DUART_BASE_ADDR, \
  22. .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \
  23. .flags = IORESOURCE_MEM, \
  24. }, \
  25. .irq = {soc ## _INT_DUART}, \
  26. }
  27. #ifdef CONFIG_SOC_IMX23
  28. MXS_AMBA_DUART_DEVICE(mx23_duart, MX23);
  29. #endif
  30. #ifdef CONFIG_SOC_IMX28
  31. MXS_AMBA_DUART_DEVICE(mx28_duart, MX28);
  32. #endif
  33. int __init mxs_add_duart(const struct amba_device *dev)
  34. {
  35. return mxs_add_amba_device(dev);
  36. }