cpm_uart_cpm1.h 989 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #ifndef CONFIG_PPC_CPM_NEW_BINDING
  14. #define SMC1_IRQ (CPM_IRQ_OFFSET + CPMVEC_SMC1)
  15. #define SMC2_IRQ (CPM_IRQ_OFFSET + CPMVEC_SMC2)
  16. #define SCC1_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC1)
  17. #define SCC2_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC2)
  18. #define SCC3_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC3)
  19. #define SCC4_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC4)
  20. #endif
  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(scc_uart_t __iomem * sup)
  26. {
  27. out_8(&sup->scc_genscc.scc_rfcr, SMC_EB);
  28. out_8(&sup->scc_genscc.scc_tfcr, SMC_EB);
  29. }
  30. static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up)
  31. {
  32. out_8(&up->smc_rfcr, SMC_EB);
  33. out_8(&up->smc_tfcr, SMC_EB);
  34. }
  35. #define DPRAM_BASE ((u8 __iomem __force *)cpm_dpram_addr(0))
  36. #endif