bfin_serial_5xx.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright 2008-2009 Analog Devices Inc.
  3. *
  4. * Licensed under the GPL-2 or later.
  5. */
  6. #include <asm/dma.h>
  7. #include <asm/portmux.h>
  8. #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
  9. # define CONFIG_SERIAL_BFIN_CTSRTS
  10. # ifndef CONFIG_UART0_CTS_PIN
  11. # define CONFIG_UART0_CTS_PIN -1
  12. # endif
  13. # ifndef CONFIG_UART0_RTS_PIN
  14. # define CONFIG_UART0_RTS_PIN -1
  15. # endif
  16. # ifndef CONFIG_UART1_CTS_PIN
  17. # define CONFIG_UART1_CTS_PIN -1
  18. # endif
  19. # ifndef CONFIG_UART1_RTS_PIN
  20. # define CONFIG_UART1_RTS_PIN -1
  21. # endif
  22. #endif
  23. struct bfin_serial_res {
  24. unsigned long uart_base_addr;
  25. int uart_irq;
  26. int uart_status_irq;
  27. #ifdef CONFIG_SERIAL_BFIN_DMA
  28. unsigned int uart_tx_dma_channel;
  29. unsigned int uart_rx_dma_channel;
  30. #endif
  31. #ifdef CONFIG_SERIAL_BFIN_CTSRTS
  32. int uart_cts_pin;
  33. int uart_rts_pin;
  34. #endif
  35. };
  36. struct bfin_serial_res bfin_serial_resource[] = {
  37. #ifdef CONFIG_SERIAL_BFIN_UART0
  38. {
  39. 0xFFC00400,
  40. IRQ_UART0_RX,
  41. IRQ_UART0_ERROR,
  42. #ifdef CONFIG_SERIAL_BFIN_DMA
  43. CH_UART0_TX,
  44. CH_UART0_RX,
  45. #endif
  46. #ifdef CONFIG_SERIAL_BFIN_CTSRTS
  47. CONFIG_UART0_CTS_PIN,
  48. CONFIG_UART0_RTS_PIN,
  49. #endif
  50. },
  51. #endif
  52. #ifdef CONFIG_SERIAL_BFIN_UART1
  53. {
  54. 0xFFC02000,
  55. IRQ_UART1_RX,
  56. IRQ_UART1_ERROR,
  57. #ifdef CONFIG_SERIAL_BFIN_DMA
  58. CH_UART1_TX,
  59. CH_UART1_RX,
  60. #endif
  61. #ifdef CONFIG_SERIAL_BFIN_CTSRTS
  62. CONFIG_UART1_CTS_PIN,
  63. CONFIG_UART1_RTS_PIN,
  64. #endif
  65. },
  66. #endif
  67. #ifdef CONFIG_SERIAL_BFIN_UART2
  68. {
  69. 0xFFC02100,
  70. IRQ_UART2_RX,
  71. #ifdef CONFIG_SERIAL_BFIN_DMA
  72. CH_UART2_TX,
  73. CH_UART2_RX,
  74. #endif
  75. #ifdef CONFIG_BFIN_UART2_CTSRTS
  76. CONFIG_UART2_CTS_PIN,
  77. CONFIG_UART2_RTS_PIN,
  78. #endif
  79. },
  80. #endif
  81. };
  82. #define DRIVER_NAME "bfin-uart"
  83. #include <asm/bfin_serial.h>