shannon.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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/mcp.h>
  19. #include <asm/arch/shannon.h>
  20. #include "generic.h"
  21. static struct mtd_partition shannon_partitions[] = {
  22. {
  23. .name = "BLOB boot loader",
  24. .offset = 0,
  25. .size = 0x20000
  26. },
  27. {
  28. .name = "kernel",
  29. .offset = MTDPART_OFS_APPEND,
  30. .size = 0xe0000
  31. },
  32. {
  33. .name = "initrd",
  34. .offset = MTDPART_OFS_APPEND,
  35. .size = MTDPART_SIZ_FULL
  36. }
  37. };
  38. static struct flash_platform_data shannon_flash_data = {
  39. .map_name = "cfi_probe",
  40. .parts = shannon_partitions,
  41. .nr_parts = ARRAY_SIZE(shannon_partitions),
  42. };
  43. static struct resource shannon_flash_resource = {
  44. .start = SA1100_CS0_PHYS,
  45. .end = SA1100_CS0_PHYS + SZ_4M - 1,
  46. .flags = IORESOURCE_MEM,
  47. };
  48. static struct mcp_plat_data shannon_mcp_data = {
  49. .mccr0 = MCCR0_ADM,
  50. .sclk_rate = 11981000,
  51. };
  52. static void __init shannon_init(void)
  53. {
  54. sa11x0_set_flash_data(&shannon_flash_data, &shannon_flash_resource, 1);
  55. sa11x0_set_mcp_data(&shannon_mcp_data);
  56. }
  57. static void __init shannon_map_io(void)
  58. {
  59. sa1100_map_io();
  60. sa1100_register_uart(0, 3);
  61. sa1100_register_uart(1, 1);
  62. Ser1SDCR0 |= SDCR0_SUS;
  63. GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD);
  64. GPDR |= GPIO_UART_TXD | SHANNON_GPIO_CODEC_RESET;
  65. GPDR &= ~GPIO_UART_RXD;
  66. PPAR |= PPAR_UPR;
  67. /* reset the codec */
  68. GPCR = SHANNON_GPIO_CODEC_RESET;
  69. GPSR = SHANNON_GPIO_CODEC_RESET;
  70. }
  71. MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)")
  72. .phys_ram = 0xc0000000,
  73. .phys_io = 0x80000000,
  74. .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
  75. .boot_params = 0xc0000100,
  76. .map_io = shannon_map_io,
  77. .init_irq = sa1100_init_irq,
  78. .timer = &sa1100_timer,
  79. .init_machine = shannon_init,
  80. MACHINE_END