pq2ads.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * PQ2ADS platform support
  3. *
  4. * Author: Kumar Gala <galak@kernel.crashing.org>
  5. * Derived from: est8260_setup.c by Allen Curtis
  6. *
  7. * Copyright 2004 Freescale Semiconductor, Inc.
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the
  11. * Free Software Foundation; either version 2 of the License, or (at your
  12. * option) any later version.
  13. */
  14. #include <linux/init.h>
  15. #include <asm/io.h>
  16. #include <asm/mpc8260.h>
  17. #include <asm/cpm2.h>
  18. #include <asm/immap_cpm2.h>
  19. void __init
  20. m82xx_board_setup(void)
  21. {
  22. cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
  23. u32 *bcsr = ioremap(BCSR_ADDR+4, sizeof(u32));
  24. /* Enable the 2nd UART port */
  25. clrbits32(bcsr, BCSR1_RS232_EN2);
  26. #ifdef CONFIG_SERIAL_CPM_SCC1
  27. clrbits32((u32*)&immap->im_scc[0].scc_sccm, UART_SCCM_TX | UART_SCCM_RX);
  28. clrbits32((u32*)&immap->im_scc[0].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
  29. #endif
  30. #ifdef CONFIG_SERIAL_CPM_SCC2
  31. clrbits32((u32*)&immap->im_scc[1].scc_sccm, UART_SCCM_TX | UART_SCCM_RX);
  32. clrbits32((u32*)&immap->im_scc[1].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
  33. #endif
  34. #ifdef CONFIG_SERIAL_CPM_SCC3
  35. clrbits32((u32*)&immap->im_scc[2].scc_sccm, UART_SCCM_TX | UART_SCCM_RX);
  36. clrbits32((u32*)&immap->im_scc[2].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
  37. #endif
  38. #ifdef CONFIG_SERIAL_CPM_SCC4
  39. clrbits32((u32*)&immap->im_scc[3].scc_sccm, UART_SCCM_TX | UART_SCCM_RX);
  40. clrbits32((u32*)&immap->im_scc[3].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
  41. #endif
  42. iounmap(bcsr);
  43. iounmap(immap);
  44. }