devices-db8500.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2010
  3. *
  4. * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
  5. * License terms: GNU General Public License (GPL), version 2.
  6. */
  7. #ifndef __DEVICES_DB8500_H
  8. #define __DEVICES_DB8500_H
  9. #include "devices-common.h"
  10. struct ske_keypad_platform_data;
  11. struct pl022_ssp_controller;
  12. static inline struct platform_device *
  13. db8500_add_ske_keypad(struct ske_keypad_platform_data *pdata)
  14. {
  15. return dbx500_add_platform_device_4k1irq("nmk-ske-keypad", -1,
  16. U8500_SKE_BASE,
  17. IRQ_DB8500_KB, pdata);
  18. }
  19. static inline struct amba_device *
  20. db8500_add_ssp(const char *name, resource_size_t base, int irq,
  21. struct pl022_ssp_controller *pdata)
  22. {
  23. return dbx500_add_amba_device(name, base, irq, pdata, 0);
  24. }
  25. #define db8500_add_i2c0(pdata) \
  26. dbx500_add_i2c(0, U8500_I2C0_BASE, IRQ_DB8500_I2C0, pdata)
  27. #define db8500_add_i2c1(pdata) \
  28. dbx500_add_i2c(1, U8500_I2C1_BASE, IRQ_DB8500_I2C1, pdata)
  29. #define db8500_add_i2c2(pdata) \
  30. dbx500_add_i2c(2, U8500_I2C2_BASE, IRQ_DB8500_I2C2, pdata)
  31. #define db8500_add_i2c3(pdata) \
  32. dbx500_add_i2c(3, U8500_I2C3_BASE, IRQ_DB8500_I2C3, pdata)
  33. #define db8500_add_i2c4(pdata) \
  34. dbx500_add_i2c(4, U8500_I2C4_BASE, IRQ_DB8500_I2C4, pdata)
  35. #define db8500_add_msp0_i2s(pdata) \
  36. dbx500_add_msp_i2s(0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, pdata)
  37. #define db8500_add_msp1_i2s(pdata) \
  38. dbx500_add_msp_i2s(1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, pdata)
  39. #define db8500_add_msp2_i2s(pdata) \
  40. dbx500_add_msp_i2s(2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, pdata)
  41. #define db8500_add_msp3_i2s(pdata) \
  42. dbx500_add_msp_i2s(3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, pdata)
  43. #define db8500_add_msp0_spi(pdata) \
  44. dbx500_add_msp_spi("msp0", U8500_MSP0_BASE, IRQ_DB8500_MSP0, pdata)
  45. #define db8500_add_msp1_spi(pdata) \
  46. dbx500_add_msp_spi("msp1", U8500_MSP1_BASE, IRQ_DB8500_MSP1, pdata)
  47. #define db8500_add_msp2_spi(pdata) \
  48. dbx500_add_msp_spi("msp2", U8500_MSP2_BASE, IRQ_DB8500_MSP2, pdata)
  49. #define db8500_add_msp3_spi(pdata) \
  50. dbx500_add_msp_spi("msp3", U8500_MSP3_BASE, IRQ_DB8500_MSP1, pdata)
  51. #define db8500_add_rtc() \
  52. dbx500_add_rtc(U8500_RTC_BASE, IRQ_DB8500_RTC);
  53. #define db8500_add_usb(rx_cfg, tx_cfg) \
  54. ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg)
  55. #define db8500_add_sdi0(pdata, pid) \
  56. dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata, pid)
  57. #define db8500_add_sdi1(pdata, pid) \
  58. dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata, pid)
  59. #define db8500_add_sdi2(pdata, pid) \
  60. dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata, pid)
  61. #define db8500_add_sdi3(pdata, pid) \
  62. dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata, pid)
  63. #define db8500_add_sdi4(pdata, pid) \
  64. dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata, pid)
  65. #define db8500_add_sdi5(pdata, pid) \
  66. dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata, pid)
  67. #define db8500_add_ssp0(pdata) \
  68. db8500_add_ssp("ssp0", U8500_SSP0_BASE, IRQ_DB8500_SSP0, pdata)
  69. #define db8500_add_ssp1(pdata) \
  70. db8500_add_ssp("ssp1", U8500_SSP1_BASE, IRQ_DB8500_SSP1, pdata)
  71. #define db8500_add_spi0(pdata) \
  72. dbx500_add_spi("spi0", U8500_SPI0_BASE, IRQ_DB8500_SPI0, pdata, 0)
  73. #define db8500_add_spi1(pdata) \
  74. dbx500_add_spi("spi1", U8500_SPI1_BASE, IRQ_DB8500_SPI1, pdata, 0)
  75. #define db8500_add_spi2(pdata) \
  76. dbx500_add_spi("spi2", U8500_SPI2_BASE, IRQ_DB8500_SPI2, pdata, 0)
  77. #define db8500_add_spi3(pdata) \
  78. dbx500_add_spi("spi3", U8500_SPI3_BASE, IRQ_DB8500_SPI3, pdata, 0)
  79. #define db8500_add_uart0(pdata) \
  80. dbx500_add_uart("uart0", U8500_UART0_BASE, IRQ_DB8500_UART0, pdata)
  81. #define db8500_add_uart1(pdata) \
  82. dbx500_add_uart("uart1", U8500_UART1_BASE, IRQ_DB8500_UART1, pdata)
  83. #define db8500_add_uart2(pdata) \
  84. dbx500_add_uart("uart2", U8500_UART2_BASE, IRQ_DB8500_UART2, pdata)
  85. #endif