serial.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1999 by Ralf Baechle
  7. * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  8. */
  9. #ifndef _ASM_SERIAL_H
  10. #define _ASM_SERIAL_H
  11. #include <linux/config.h>
  12. /*
  13. * This assumes you have a 1.8432 MHz clock for your UART.
  14. *
  15. * It'd be nice if someone built a serial card with a 24.576 MHz
  16. * clock, since the 16550A is capable of handling a top speed of 1.5
  17. * megabits/second; but this requires the faster clock.
  18. */
  19. #define BASE_BAUD (1843200 / 16)
  20. /* Standard COM flags (except for COM4, because of the 8514 problem) */
  21. #ifdef CONFIG_SERIAL_DETECT_IRQ
  22. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
  23. #define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
  24. #else
  25. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
  26. #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
  27. #endif
  28. #ifdef CONFIG_SERIAL_MANY_PORTS
  29. #define FOURPORT_FLAGS ASYNC_FOURPORT
  30. #define ACCENT_FLAGS 0
  31. #define BOCA_FLAGS 0
  32. #define HUB6_FLAGS 0
  33. #define RS_TABLE_SIZE 64
  34. #else
  35. #define RS_TABLE_SIZE
  36. #endif
  37. /*
  38. * The following define the access methods for the HUB6 card. All
  39. * access is through two ports for all 24 possible chips. The card is
  40. * selected through the high 2 bits, the port on that card with the
  41. * "middle" 3 bits, and the register on that port with the bottom
  42. * 3 bits.
  43. *
  44. * While the access port and interrupt is configurable, the default
  45. * port locations are 0x302 for the port control register, and 0x303
  46. * for the data read/write register. Normally, the interrupt is at irq3
  47. * but can be anything from 3 to 7 inclusive. Note that using 3 will
  48. * require disabling com2.
  49. */
  50. #define C_P(card,port) (((card)<<6|(port)<<3) + 1)
  51. #ifdef CONFIG_MACH_JAZZ
  52. #include <asm/jazz.h>
  53. #ifndef CONFIG_OLIVETTI_M700
  54. /* Some Jazz machines seem to have an 8MHz crystal clock but I don't know
  55. exactly which ones ... XXX */
  56. #define JAZZ_BASE_BAUD ( 8000000 / 16 ) /* ( 3072000 / 16) */
  57. #else
  58. /* but the M700 isn't such a strange beast */
  59. #define JAZZ_BASE_BAUD BASE_BAUD
  60. #endif
  61. #define _JAZZ_SERIAL_INIT(int, base) \
  62. { .baud_base = JAZZ_BASE_BAUD, .irq = int, .flags = STD_COM_FLAGS, \
  63. .iomem_base = (u8 *) base, .iomem_reg_shift = 0, \
  64. .io_type = SERIAL_IO_MEM }
  65. #define JAZZ_SERIAL_PORT_DEFNS \
  66. _JAZZ_SERIAL_INIT(JAZZ_SERIAL1_IRQ, JAZZ_SERIAL1_BASE), \
  67. _JAZZ_SERIAL_INIT(JAZZ_SERIAL2_IRQ, JAZZ_SERIAL2_BASE),
  68. #else
  69. #define JAZZ_SERIAL_PORT_DEFNS
  70. #endif
  71. #ifdef CONFIG_MIPS_COBALT
  72. #include <asm/cobalt/cobalt.h>
  73. #define COBALT_BASE_BAUD (18432000 / 16)
  74. #define COBALT_SERIAL_PORT_DEFNS \
  75. /* UART CLK PORT IRQ FLAGS */ \
  76. { 0, COBALT_BASE_BAUD, 0xc800000, COBALT_SERIAL_IRQ, STD_COM_FLAGS }, /* ttyS0 */
  77. #else
  78. #define COBALT_SERIAL_PORT_DEFNS
  79. #endif
  80. /*
  81. * Both Galileo boards have the same UART mappings.
  82. */
  83. #if defined (CONFIG_MIPS_EV96100) || defined (CONFIG_MIPS_EV64120)
  84. #include <asm/galileo-boards/ev96100.h>
  85. #include <asm/galileo-boards/ev96100int.h>
  86. #define EV96100_SERIAL_PORT_DEFNS \
  87. { .baud_base = EV96100_BASE_BAUD, .irq = EV96100INT_UART_0, \
  88. .flags = STD_COM_FLAGS, \
  89. .iomem_base = EV96100_UART0_REGS_BASE, .iomem_reg_shift = 2, \
  90. .io_type = SERIAL_IO_MEM }, \
  91. { .baud_base = EV96100_BASE_BAUD, .irq = EV96100INT_UART_0, \
  92. .flags = STD_COM_FLAGS, \
  93. .iomem_base = EV96100_UART1_REGS_BASE, .iomem_reg_shift = 2, \
  94. .io_type = SERIAL_IO_MEM },
  95. #else
  96. #define EV96100_SERIAL_PORT_DEFNS
  97. #endif
  98. #ifdef CONFIG_MIPS_ITE8172
  99. #include <asm/it8172/it8172.h>
  100. #include <asm/it8172/it8172_int.h>
  101. #include <asm/it8712.h>
  102. #define ITE_SERIAL_PORT_DEFNS \
  103. { .baud_base = BASE_BAUD, .port = (IT8172_PCI_IO_BASE + IT_UART_BASE), \
  104. .irq = IT8172_UART_IRQ, .flags = STD_COM_FLAGS, .type = 0x3 }, \
  105. { .baud_base = (24000000/(16*13)), .port = (IT8172_PCI_IO_BASE + IT8712_UART1_PORT), \
  106. .irq = IT8172_SERIRQ_4, .flags = STD_COM_FLAGS, .type = 0x3 }, \
  107. /* Smart Card Reader 0 */ \
  108. { .baud_base = BASE_BAUD, .port = (IT8172_PCI_IO_BASE + IT_SCR0_BASE), \
  109. .irq = IT8172_SCR0_IRQ, .flags = STD_COM_FLAGS, .type = 0x3 }, \
  110. /* Smart Card Reader 1 */ \
  111. { .baud_base = BASE_BAUD, .port = (IT8172_PCI_IO_BASE + IT_SCR1_BASE), \
  112. .irq = IT8172_SCR1_IRQ, .flags = STD_COM_FLAGS, .type = 0x3 },
  113. #else
  114. #define ITE_SERIAL_PORT_DEFNS
  115. #endif
  116. #ifdef CONFIG_MIPS_IVR
  117. #include <asm/it8172/it8172.h>
  118. #include <asm/it8172/it8172_int.h>
  119. #define IVR_SERIAL_PORT_DEFNS \
  120. { .baud_base = BASE_BAUD, .port = (IT8172_PCI_IO_BASE + IT_UART_BASE), \
  121. .irq = IT8172_UART_IRQ, .flags = STD_COM_FLAGS, .type = 0x3 }, \
  122. /* Smart Card Reader 1 */ \
  123. { .baud_base = BASE_BAUD, .port = (IT8172_PCI_IO_BASE + IT_SCR1_BASE), \
  124. .irq = IT8172_SCR1_IRQ, .flags = STD_COM_FLAGS, .type = 0x3 },
  125. #else
  126. #define IVR_SERIAL_PORT_DEFNS
  127. #endif
  128. #ifdef CONFIG_TOSHIBA_JMR3927
  129. #include <asm/jmr3927/jmr3927.h>
  130. #define TXX927_SERIAL_PORT_DEFNS \
  131. { .baud_base = JMR3927_BASE_BAUD, .port = UART0_ADDR, .irq = UART0_INT, \
  132. .flags = UART0_FLAGS, .type = 1 }, \
  133. { .baud_base = JMR3927_BASE_BAUD, .port = UART1_ADDR, .irq = UART1_INT, \
  134. .flags = UART1_FLAGS, .type = 1 },
  135. #else
  136. #define TXX927_SERIAL_PORT_DEFNS
  137. #endif
  138. #ifdef CONFIG_SERIAL_AU1X00
  139. #include <asm/mach-au1x00/au1000.h>
  140. #ifdef CONFIG_SOC_AU1000
  141. #define AU1000_SERIAL_PORT_DEFNS \
  142. { .baud_base = 0, .port = UART0_ADDR, \
  143. .iomem_base = (unsigned char *)UART0_ADDR, \
  144. .irq = AU1000_UART0_INT, .flags = STD_COM_FLAGS, \
  145. .iomem_reg_shift = 2 }, \
  146. { .baud_base = 0, .port = UART1_ADDR, \
  147. .iomem_base = (unsigned char *)UART1_ADDR, \
  148. .irq = AU1000_UART1_INT, .flags = STD_COM_FLAGS, \
  149. .iomem_reg_shift = 2 }, \
  150. { .baud_base = 0, .port = UART2_ADDR, \
  151. .iomem_base = (unsigned char *)UART2_ADDR, \
  152. .irq = AU1000_UART2_INT, .flags = STD_COM_FLAGS, \
  153. .iomem_reg_shift = 2 }, \
  154. { .baud_base = 0, .port = UART3_ADDR, \
  155. .iomem_base = (unsigned char *)UART3_ADDR, \
  156. .irq = AU1000_UART3_INT, .flags = STD_COM_FLAGS, \
  157. .iomem_reg_shift = 2 },
  158. #endif
  159. #ifdef CONFIG_SOC_AU1500
  160. #define AU1000_SERIAL_PORT_DEFNS \
  161. { .baud_base = 0, .port = UART0_ADDR, \
  162. .iomem_base = (unsigned char *)UART0_ADDR, \
  163. .irq = AU1500_UART0_INT, .flags = STD_COM_FLAGS, \
  164. .iomem_reg_shift = 2 }, \
  165. { .baud_base = 0, .port = UART3_ADDR, \
  166. .iomem_base = (unsigned char *)UART3_ADDR, \
  167. .irq = AU1500_UART3_INT, .flags = STD_COM_FLAGS, \
  168. .iomem_reg_shift = 2 },
  169. #endif
  170. #ifdef CONFIG_SOC_AU1100
  171. #define AU1000_SERIAL_PORT_DEFNS \
  172. { .baud_base = 0, .port = UART0_ADDR, \
  173. .iomem_base = (unsigned char *)UART0_ADDR, \
  174. .irq = AU1100_UART0_INT, .flags = STD_COM_FLAGS, \
  175. .iomem_reg_shift = 2 }, \
  176. { .baud_base = 0, .port = UART1_ADDR, \
  177. .iomem_base = (unsigned char *)UART1_ADDR, \
  178. .irq = AU1100_UART1_INT, .flags = STD_COM_FLAGS, \
  179. .iomem_reg_shift = 2 }, \
  180. { .baud_base = 0, .port = UART3_ADDR, \
  181. .iomem_base = (unsigned char *)UART3_ADDR, \
  182. .irq = AU1100_UART3_INT, .flags = STD_COM_FLAGS, \
  183. .iomem_reg_shift = 2 },
  184. #endif
  185. #ifdef CONFIG_SOC_AU1550
  186. #define AU1000_SERIAL_PORT_DEFNS \
  187. { .baud_base = 0, .port = UART0_ADDR, \
  188. .iomem_base = (unsigned char *)UART0_ADDR, \
  189. .irq = AU1550_UART0_INT, .flags = STD_COM_FLAGS, \
  190. .iomem_reg_shift = 2 }, \
  191. { .baud_base = 0, .port = UART1_ADDR, \
  192. .iomem_base = (unsigned char *)UART1_ADDR, \
  193. .irq = AU1550_UART1_INT, .flags = STD_COM_FLAGS, \
  194. .iomem_reg_shift = 2 }, \
  195. { .baud_base = 0, .port = UART3_ADDR, \
  196. .iomem_base = (unsigned char *)UART3_ADDR, \
  197. .irq = AU1550_UART3_INT, .flags = STD_COM_FLAGS,\
  198. .iomem_reg_shift = 2 },
  199. #endif
  200. #ifdef CONFIG_SOC_AU1200
  201. #define AU1000_SERIAL_PORT_DEFNS \
  202. { .baud_base = 0, .port = UART0_ADDR, \
  203. .iomem_base = (unsigned char *)UART0_ADDR, \
  204. .irq = AU1200_UART0_INT, .flags = STD_COM_FLAGS, \
  205. .iomem_reg_shift = 2 }, \
  206. { .baud_base = 0, .port = UART1_ADDR, \
  207. .iomem_base = (unsigned char *)UART1_ADDR, \
  208. .irq = AU1200_UART1_INT, .flags = STD_COM_FLAGS, \
  209. .iomem_reg_shift = 2 },
  210. #endif
  211. #else
  212. #define AU1000_SERIAL_PORT_DEFNS
  213. #endif
  214. #ifdef CONFIG_HAVE_STD_PC_SERIAL_PORT
  215. #define STD_SERIAL_PORT_DEFNS \
  216. /* UART CLK PORT IRQ FLAGS */ \
  217. { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
  218. { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
  219. { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
  220. { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
  221. #ifdef CONFIG_SERIAL_MANY_PORTS
  222. #define EXTRA_SERIAL_PORT_DEFNS \
  223. { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \
  224. { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \
  225. { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \
  226. { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \
  227. { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \
  228. { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \
  229. { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \
  230. { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \
  231. { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \
  232. { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \
  233. { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \
  234. { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \
  235. { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \
  236. { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \
  237. { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \
  238. { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \
  239. { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \
  240. { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \
  241. { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \
  242. { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \
  243. { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \
  244. { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \
  245. { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \
  246. { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \
  247. { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \
  248. { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \
  249. { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \
  250. { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */
  251. #else /* CONFIG_SERIAL_MANY_PORTS */
  252. #define EXTRA_SERIAL_PORT_DEFNS
  253. #endif /* CONFIG_SERIAL_MANY_PORTS */
  254. #else /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */
  255. #define STD_SERIAL_PORT_DEFNS
  256. #define EXTRA_SERIAL_PORT_DEFNS
  257. #endif /* CONFIG_HAVE_STD_PC_SERIAL_PORTS */
  258. /* You can have up to four HUB6's in the system, but I've only
  259. * included two cards here for a total of twelve ports.
  260. */
  261. #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS))
  262. #define HUB6_SERIAL_PORT_DFNS \
  263. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \
  264. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \
  265. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \
  266. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \
  267. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \
  268. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \
  269. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \
  270. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \
  271. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \
  272. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \
  273. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \
  274. { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */
  275. #else
  276. #define HUB6_SERIAL_PORT_DFNS
  277. #endif
  278. #ifdef CONFIG_MOMENCO_JAGUAR_ATX
  279. /* Ordinary NS16552 duart with a 20MHz crystal. */
  280. #define JAGUAR_ATX_UART_CLK 20000000
  281. #define JAGUAR_ATX_BASE_BAUD (JAGUAR_ATX_UART_CLK / 16)
  282. #define JAGUAR_ATX_SERIAL1_IRQ 6
  283. #define JAGUAR_ATX_SERIAL1_BASE 0xfd000023L
  284. #define _JAGUAR_ATX_SERIAL_INIT(int, base) \
  285. { baud_base: JAGUAR_ATX_BASE_BAUD, irq: int, \
  286. flags: (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
  287. iomem_base: (u8 *) base, iomem_reg_shift: 2, \
  288. io_type: SERIAL_IO_MEM }
  289. #define MOMENCO_JAGUAR_ATX_SERIAL_PORT_DEFNS \
  290. _JAGUAR_ATX_SERIAL_INIT(JAGUAR_ATX_SERIAL1_IRQ, JAGUAR_ATX_SERIAL1_BASE)
  291. #else
  292. #define MOMENCO_JAGUAR_ATX_SERIAL_PORT_DEFNS
  293. #endif
  294. #ifdef CONFIG_MOMENCO_OCELOT_3
  295. #define OCELOT_3_BASE_BAUD ( 20000000 / 16 )
  296. #define OCELOT_3_SERIAL_IRQ 6
  297. #define OCELOT_3_SERIAL_BASE (signed)0xfd000020
  298. #define _OCELOT_3_SERIAL_INIT(int, base) \
  299. { baud_base: OCELOT_3_BASE_BAUD, irq: int, \
  300. flags: STD_COM_FLAGS, \
  301. iomem_base: (u8 *) base, iomem_reg_shift: 2, \
  302. io_type: SERIAL_IO_MEM }
  303. #define MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \
  304. _OCELOT_3_SERIAL_INIT(OCELOT_3_SERIAL_IRQ, OCELOT_3_SERIAL_BASE)
  305. #else
  306. #define MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS
  307. #endif
  308. #ifdef CONFIG_MOMENCO_OCELOT
  309. /* Ordinary NS16552 duart with a 20MHz crystal. */
  310. #define OCELOT_BASE_BAUD ( 20000000 / 16 )
  311. #define OCELOT_SERIAL1_IRQ 4
  312. #define OCELOT_SERIAL1_BASE 0xe0001020
  313. #define _OCELOT_SERIAL_INIT(int, base) \
  314. { .baud_base = OCELOT_BASE_BAUD, .irq = int, .flags = STD_COM_FLAGS, \
  315. .iomem_base = (u8 *) base, .iomem_reg_shift = 2, \
  316. .io_type = SERIAL_IO_MEM }
  317. #define MOMENCO_OCELOT_SERIAL_PORT_DEFNS \
  318. _OCELOT_SERIAL_INIT(OCELOT_SERIAL1_IRQ, OCELOT_SERIAL1_BASE)
  319. #else
  320. #define MOMENCO_OCELOT_SERIAL_PORT_DEFNS
  321. #endif
  322. #ifdef CONFIG_MOMENCO_OCELOT_G
  323. /* Ordinary NS16552 duart with a 20MHz crystal. */
  324. #define OCELOT_G_BASE_BAUD ( 20000000 / 16 )
  325. #define OCELOT_G_SERIAL1_IRQ 4
  326. #if 0
  327. #define OCELOT_G_SERIAL1_BASE 0xe0001020
  328. #else
  329. #define OCELOT_G_SERIAL1_BASE 0xfd000020
  330. #endif
  331. #define _OCELOT_G_SERIAL_INIT(int, base) \
  332. { .baud_base = OCELOT_G_BASE_BAUD, .irq = int, .flags = STD_COM_FLAGS,\
  333. .iomem_base = (u8 *) base, .iomem_reg_shift = 2, \
  334. .io_type = SERIAL_IO_MEM }
  335. #define MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS \
  336. _OCELOT_G_SERIAL_INIT(OCELOT_G_SERIAL1_IRQ, OCELOT_G_SERIAL1_BASE)
  337. #else
  338. #define MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS
  339. #endif
  340. #ifdef CONFIG_MOMENCO_OCELOT_C
  341. /* Ordinary NS16552 duart with a 20MHz crystal. */
  342. #define OCELOT_C_BASE_BAUD ( 20000000 / 16 )
  343. #define OCELOT_C_SERIAL1_IRQ 80
  344. #define OCELOT_C_SERIAL1_BASE 0xfd000020
  345. #define OCELOT_C_SERIAL2_IRQ 81
  346. #define OCELOT_C_SERIAL2_BASE 0xfd000000
  347. #define _OCELOT_C_SERIAL_INIT(int, base) \
  348. { .baud_base = OCELOT_C_BASE_BAUD, \
  349. .irq = (int), \
  350. .flags = STD_COM_FLAGS, \
  351. .iomem_base = (u8 *) base, \
  352. .iomem_reg_shift = 2, \
  353. .io_type = SERIAL_IO_MEM \
  354. }
  355. #define MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \
  356. _OCELOT_C_SERIAL_INIT(OCELOT_C_SERIAL1_IRQ, OCELOT_C_SERIAL1_BASE), \
  357. _OCELOT_C_SERIAL_INIT(OCELOT_C_SERIAL2_IRQ, OCELOT_C_SERIAL2_BASE)
  358. #else
  359. #define MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS
  360. #endif
  361. #ifdef CONFIG_DDB5477
  362. #include <asm/ddb5xxx/ddb5477.h>
  363. #define DDB5477_SERIAL_PORT_DEFNS \
  364. { .baud_base = BASE_BAUD, .irq = VRC5477_IRQ_UART0, \
  365. .flags = STD_COM_FLAGS, .iomem_base = (u8*)0xbfa04200, \
  366. .iomem_reg_shift = 3, .io_type = SERIAL_IO_MEM}, \
  367. { .baud_base = BASE_BAUD, .irq = VRC5477_IRQ_UART1, \
  368. .flags = STD_COM_FLAGS, .iomem_base = (u8*)0xbfa04240, \
  369. .iomem_reg_shift = 3, .io_type = SERIAL_IO_MEM},
  370. #else
  371. #define DDB5477_SERIAL_PORT_DEFNS
  372. #endif
  373. #ifdef CONFIG_SGI_IP32
  374. /*
  375. * The IP32 (SGI O2) has standard serial ports (UART 16550A) mapped in memory
  376. * They are initialized in ip32_setup
  377. */
  378. #define IP32_SERIAL_PORT_DEFNS \
  379. {},{},
  380. #else
  381. #define IP32_SERIAL_PORT_DEFNS
  382. #endif /* CONFIG_SGI_IP32 */
  383. #define SERIAL_PORT_DFNS \
  384. COBALT_SERIAL_PORT_DEFNS \
  385. DDB5477_SERIAL_PORT_DEFNS \
  386. EV96100_SERIAL_PORT_DEFNS \
  387. EXTRA_SERIAL_PORT_DEFNS \
  388. HUB6_SERIAL_PORT_DFNS \
  389. IP32_SERIAL_PORT_DEFNS \
  390. ITE_SERIAL_PORT_DEFNS \
  391. IVR_SERIAL_PORT_DEFNS \
  392. JAZZ_SERIAL_PORT_DEFNS \
  393. STD_SERIAL_PORT_DEFNS \
  394. MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS \
  395. MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \
  396. MOMENCO_OCELOT_SERIAL_PORT_DEFNS \
  397. MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \
  398. TXX927_SERIAL_PORT_DEFNS \
  399. AU1000_SERIAL_PORT_DEFNS
  400. #endif /* _ASM_SERIAL_H */