shannon.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * linux/arch/arm/mach-sa1100/shannon.c
  3. */
  4. #include <linux/config.h>
  5. #include <linux/init.h>
  6. #include <linux/device.h>
  7. #include <linux/kernel.h>
  8. #include <linux/tty.h>
  9. #include <linux/mtd/mtd.h>
  10. #include <linux/mtd/partitions.h>
  11. #include <asm/hardware.h>
  12. #include <asm/mach-types.h>
  13. #include <asm/setup.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/mach/flash.h>
  16. #include <asm/mach/map.h>
  17. #include <asm/mach/serial_sa1100.h>
  18. #include <asm/arch/shannon.h>
  19. #include "generic.h"
  20. static struct mtd_partition shannon_partitions[] = {
  21. {
  22. .name = "BLOB boot loader",
  23. .offset = 0,
  24. .size = 0x20000
  25. },
  26. {
  27. .name = "kernel",
  28. .offset = MTDPART_OFS_APPEND,
  29. .size = 0xe0000
  30. },
  31. {
  32. .name = "initrd",
  33. .offset = MTDPART_OFS_APPEND,
  34. .size = MTDPART_SIZ_FULL
  35. }
  36. };
  37. static struct flash_platform_data shannon_flash_data = {
  38. .map_name = "cfi_probe",
  39. .parts = shannon_partitions,
  40. .nr_parts = ARRAY_SIZE(shannon_partitions),
  41. };
  42. static struct resource shannon_flash_resource = {
  43. .start = SA1100_CS0_PHYS,
  44. .end = SA1100_CS0_PHYS + SZ_4M - 1,
  45. .flags = IORESOURCE_MEM,
  46. };
  47. static void __init shannon_init(void)
  48. {
  49. sa11x0_set_flash_data(&shannon_flash_data, &shannon_flash_resource, 1);
  50. }
  51. static void __init shannon_map_io(void)
  52. {
  53. sa1100_map_io();
  54. sa1100_register_uart(0, 3);
  55. sa1100_register_uart(1, 1);
  56. Ser1SDCR0 |= SDCR0_SUS;
  57. GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD);
  58. GPDR |= GPIO_UART_TXD | SHANNON_GPIO_CODEC_RESET;
  59. GPDR &= ~GPIO_UART_RXD;
  60. PPAR |= PPAR_UPR;
  61. /* reset the codec */
  62. GPCR = SHANNON_GPIO_CODEC_RESET;
  63. GPSR = SHANNON_GPIO_CODEC_RESET;
  64. }
  65. MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)")
  66. .phys_ram = 0xc0000000,
  67. .phys_io = 0x80000000,
  68. .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
  69. .boot_params = 0xc0000100,
  70. .map_io = shannon_map_io,
  71. .init_irq = sa1100_init_irq,
  72. .timer = &sa1100_timer,
  73. .init_machine = shannon_init,
  74. MACHINE_END