cpm_uart_cpm2.h 922 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * linux/drivers/serial/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. /* the CPM address */
  20. #define CPM_ADDR CPM_MAP_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 = CPMFCR_GBL | CPMFCR_EB;
  28. sup->scc_genscc.scc_tfcr = CPMFCR_GBL | CPMFCR_EB;
  29. }
  30. static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
  31. {
  32. up->smc_rfcr = CPMFCR_GBL | CPMFCR_EB;
  33. up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB;
  34. }
  35. #define DPRAM_BASE ((unsigned char *)&cpm2_immr->im_dprambase[0])
  36. #endif