cpm_uart_cpm1.h 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * linux/drivers/serial/cpm_uart/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. static inline void cpm_set_brg(int brg, int baud)
  20. {
  21. cpm_setbrg(brg, baud);
  22. }
  23. static inline void cpm_set_scc_fcr(volatile scc_uart_t * sup)
  24. {
  25. sup->scc_genscc.scc_rfcr = SMC_EB;
  26. sup->scc_genscc.scc_tfcr = SMC_EB;
  27. }
  28. static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
  29. {
  30. up->smc_rfcr = SMC_EB;
  31. up->smc_tfcr = SMC_EB;
  32. }
  33. #define DPRAM_BASE ((unsigned char *)&cpmp->cp_dpmem[0])
  34. #endif