lart.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * linux/arch/arm/mach-sa1100/lart.c
  3. */
  4. #include <linux/init.h>
  5. #include <linux/kernel.h>
  6. #include <linux/tty.h>
  7. #include <mach/hardware.h>
  8. #include <asm/setup.h>
  9. #include <asm/mach-types.h>
  10. #include <asm/page.h>
  11. #include <asm/mach/arch.h>
  12. #include <asm/mach/map.h>
  13. #include <asm/mach/serial_sa1100.h>
  14. #include <mach/mcp.h>
  15. #include "generic.h"
  16. #warning "include/asm/arch-sa1100/ide.h needs fixing for lart"
  17. static struct mcp_plat_data lart_mcp_data = {
  18. .mccr0 = MCCR0_ADM,
  19. .sclk_rate = 11981000,
  20. .codec = "ucb1x00",
  21. };
  22. static void __init lart_init(void)
  23. {
  24. /*
  25. * Setup the PPC unit correctly.
  26. */
  27. PPDR &= ~PPC_RXD4;
  28. PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
  29. PSDR |= PPC_RXD4;
  30. PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
  31. PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
  32. sa11x0_register_mcp(&lart_mcp_data);
  33. }
  34. static struct map_desc lart_io_desc[] __initdata = {
  35. { /* main flash memory */
  36. .virtual = 0xe8000000,
  37. .pfn = __phys_to_pfn(0x00000000),
  38. .length = 0x00400000,
  39. .type = MT_DEVICE
  40. }, { /* main flash, alternative location */
  41. .virtual = 0xec000000,
  42. .pfn = __phys_to_pfn(0x08000000),
  43. .length = 0x00400000,
  44. .type = MT_DEVICE
  45. }
  46. };
  47. static void __init lart_map_io(void)
  48. {
  49. sa1100_map_io();
  50. iotable_init(lart_io_desc, ARRAY_SIZE(lart_io_desc));
  51. sa1100_register_uart(0, 3);
  52. sa1100_register_uart(1, 1);
  53. sa1100_register_uart(2, 2);
  54. GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD);
  55. GPDR |= GPIO_UART_TXD;
  56. GPDR &= ~GPIO_UART_RXD;
  57. PPAR |= PPAR_UPR;
  58. }
  59. MACHINE_START(LART, "LART")
  60. .atag_offset = 0x100,
  61. .map_io = lart_map_io,
  62. .init_irq = sa1100_init_irq,
  63. .init_machine = lart_init,
  64. .timer = &sa1100_timer,
  65. .restart = sa11x0_restart,
  66. MACHINE_END