cpm_uart_cpm2.h 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * linux/drivers/serial/cpm_uart/cpm_uart_cpm2.h
  3. *
  4. * Driver for CPM (SCC/SMC) serial ports
  5. *
  6. * definitions for cpm2
  7. *
  8. */
  9. #ifndef CPM_UART_CPM2_H
  10. #define CPM_UART_CPM2_H
  11. #include <asm/cpm2.h>
  12. /* defines for IRQs */
  13. #define SMC1_IRQ SIU_INT_SMC1
  14. #define SMC2_IRQ SIU_INT_SMC2
  15. #define SCC1_IRQ SIU_INT_SCC1
  16. #define SCC2_IRQ SIU_INT_SCC2
  17. #define SCC3_IRQ SIU_INT_SCC3
  18. #define SCC4_IRQ SIU_INT_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 = CPMFCR_GBL | CPMFCR_EB;
  26. sup->scc_genscc.scc_tfcr = CPMFCR_GBL | CPMFCR_EB;
  27. }
  28. static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
  29. {
  30. up->smc_rfcr = CPMFCR_GBL | CPMFCR_EB;
  31. up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB;
  32. }
  33. #define DPRAM_BASE ((unsigned char *)cpm_dpram_addr(0))
  34. #endif