lart.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 <asm/hardware.h>
  8. #include <asm/setup.h>
  9. #include <asm/mach-types.h>
  10. #include <asm/mach/arch.h>
  11. #include <asm/mach/map.h>
  12. #include <asm/mach/serial_sa1100.h>
  13. #include <asm/arch/mcp.h>
  14. #include "generic.h"
  15. #warning "include/asm/arch-sa1100/ide.h needs fixing for lart"
  16. static struct mcp_plat_data lart_mcp_data = {
  17. .mccr0 = MCCR0_ADM,
  18. .sclk_rate = 11981000,
  19. };
  20. static void __init lart_init(void)
  21. {
  22. sa11x0_set_mcp_data(&lart_mcp_data);
  23. }
  24. static struct map_desc lart_io_desc[] __initdata = {
  25. { /* main flash memory */
  26. .virtual = 0xe8000000,
  27. .pfn = __phys_to_pfn(0x00000000),
  28. .length = 0x00400000,
  29. .type = MT_DEVICE
  30. }, { /* main flash, alternative location */
  31. .virtual = 0xec000000,
  32. .pfn = __phys_to_pfn(0x08000000),
  33. .length = 0x00400000,
  34. .type = MT_DEVICE
  35. }
  36. };
  37. static void __init lart_map_io(void)
  38. {
  39. sa1100_map_io();
  40. iotable_init(lart_io_desc, ARRAY_SIZE(lart_io_desc));
  41. sa1100_register_uart(0, 3);
  42. sa1100_register_uart(1, 1);
  43. sa1100_register_uart(2, 2);
  44. GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD);
  45. GPDR |= GPIO_UART_TXD;
  46. GPDR &= ~GPIO_UART_RXD;
  47. PPAR |= PPAR_UPR;
  48. }
  49. MACHINE_START(LART, "LART")
  50. .phys_io = 0x80000000,
  51. .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
  52. .boot_params = 0xc0000100,
  53. .map_io = lart_map_io,
  54. .init_irq = sa1100_init_irq,
  55. .init_machine = lart_init,
  56. .timer = &sa1100_timer,
  57. MACHINE_END