saa9730_uart.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Carsten Langgaard, carstenl@mips.com
  3. * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
  4. *
  5. * ########################################################################
  6. *
  7. * This program is free software; you can distribute it and/or modify it
  8. * under the terms of the GNU General Public License (Version 2) as
  9. * published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope it will be useful, but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14. * for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  19. *
  20. * ########################################################################
  21. *
  22. * Register definitions for the UART part of the Philips SAA9730 chip.
  23. *
  24. */
  25. #ifndef SAA9730_UART_H
  26. #define SAA9730_UART_H
  27. /* The SAA9730 UART register map, as seen via the PCI bus */
  28. #define SAA9730_UART_REGS_ADDR 0x21800
  29. struct uart_saa9730_regmap {
  30. volatile unsigned char Thr_Rbr;
  31. volatile unsigned char Ier;
  32. volatile unsigned char Iir_Fcr;
  33. volatile unsigned char Lcr;
  34. volatile unsigned char Mcr;
  35. volatile unsigned char Lsr;
  36. volatile unsigned char Msr;
  37. volatile unsigned char Scr;
  38. volatile unsigned char BaudDivLsb;
  39. volatile unsigned char BaudDivMsb;
  40. volatile unsigned char Junk0;
  41. volatile unsigned char Junk1;
  42. volatile unsigned int Config; /* 0x2180c */
  43. volatile unsigned int TxStart; /* 0x21810 */
  44. volatile unsigned int TxLength; /* 0x21814 */
  45. volatile unsigned int TxCounter; /* 0x21818 */
  46. volatile unsigned int RxStart; /* 0x2181c */
  47. volatile unsigned int RxLength; /* 0x21820 */
  48. volatile unsigned int RxCounter; /* 0x21824 */
  49. };
  50. typedef volatile struct uart_saa9730_regmap t_uart_saa9730_regmap;
  51. /*
  52. * Only a subset of the UART control bits are defined here,
  53. * enough to make the serial debug port work.
  54. */
  55. #define SAA9730_LCR_DATA8 0x03
  56. #define SAA9730_MCR_DTR 0x01
  57. #define SAA9730_MCR_RTS 0x02
  58. #define SAA9730_LSR_DR 0x01
  59. #define SAA9730_LSR_THRE 0x20
  60. #endif /* !(SAA9730_UART_H) */