cpm_uart_cpm1.h 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * linux/drivers/serial/cpm_uart_cpm1.h
  3. *
  4. * Driver for CPM (SCC/SMC) serial ports
  5. *
  6. * definitions for cpm1
  7. *
  8. */
  9. #ifndef CPM_UART_CPM1_H
  10. #define CPM_UART_CPM1_H
  11. #include <asm/commproc.h>
  12. /* defines for IRQs */
  13. #define SMC1_IRQ (CPM_IRQ_OFFSET + CPMVEC_SMC1)
  14. #define SMC2_IRQ (CPM_IRQ_OFFSET + CPMVEC_SMC2)
  15. #define SCC1_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC1)
  16. #define SCC2_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC2)
  17. #define SCC3_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC3)
  18. #define SCC4_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC4)
  19. /* the CPM address */
  20. #define CPM_ADDR IMAP_ADDR
  21. static inline void cpm_set_brg(int brg, int baud)
  22. {
  23. cpm_setbrg(brg, baud);
  24. }
  25. static inline void cpm_set_scc_fcr(volatile scc_uart_t * sup)
  26. {
  27. sup->scc_genscc.scc_rfcr = SMC_EB;
  28. sup->scc_genscc.scc_tfcr = SMC_EB;
  29. }
  30. static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
  31. {
  32. up->smc_rfcr = SMC_EB;
  33. up->smc_tfcr = SMC_EB;
  34. }
  35. #define DPRAM_BASE ((unsigned char *)&cpmp->cp_dpmem[0])
  36. #endif