ar7.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. diff -Nur linux-2.6.36.orig/arch/mips/Kconfig linux-2.6.36/arch/mips/Kconfig
  2. --- linux-2.6.36.orig/arch/mips/Kconfig 2010-10-20 22:30:22.000000000 +0200
  3. +++ linux-2.6.36/arch/mips/Kconfig 2010-12-16 21:02:19.000000000 +0100
  4. @@ -46,7 +46,6 @@
  5. select CEVT_R4K
  6. select CSRC_R4K
  7. select IRQ_CPU
  8. - select NO_EXCEPT_FILL
  9. select SWAP_IO_SPACE
  10. select SYS_HAS_CPU_MIPS32_R1
  11. select SYS_HAS_EARLY_PRINTK
  12. diff -Nur linux-2.6.36.orig/arch/mips/ar7/prom.c linux-2.6.36/arch/mips/ar7/prom.c
  13. --- linux-2.6.36.orig/arch/mips/ar7/prom.c 2010-10-20 22:30:22.000000000 +0200
  14. +++ linux-2.6.36/arch/mips/ar7/prom.c 2010-12-16 21:02:19.000000000 +0100
  15. @@ -206,6 +206,14 @@
  16. if (strstr(arcs_cmdline, "console="))
  17. return;
  18. +#ifdef CONFIG_KGDB
  19. + if (!strstr(prom_getcmdline(), "nokgdb")) {
  20. + strcat(prom_getcmdline(), " console=kgdb");
  21. + kgdb_enabled = 1;
  22. + return;
  23. + }
  24. +#endif
  25. +
  26. s = prom_getenv("modetty0");
  27. if (s) {
  28. baud = simple_strtoul(s, &p, 10);
  29. diff -Nur linux-2.6.36.orig/drivers/mtd/ar7part.c linux-2.6.36/drivers/mtd/ar7part.c
  30. --- linux-2.6.36.orig/drivers/mtd/ar7part.c 2010-10-20 22:30:22.000000000 +0200
  31. +++ linux-2.6.36/drivers/mtd/ar7part.c 2010-12-16 21:02:19.000000000 +0100
  32. @@ -28,7 +28,7 @@
  33. #include <linux/bootmem.h>
  34. #include <linux/magic.h>
  35. -#define AR7_PARTS 4
  36. +#define AR7_PARTS 5
  37. #define ROOT_OFFSET 0xe0000
  38. #define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42)
  39. @@ -122,14 +122,19 @@
  40. ar7_parts[2].name = "linux";
  41. ar7_parts[2].offset = pre_size;
  42. - ar7_parts[2].size = master->size - pre_size - post_size;
  43. + ar7_parts[2].size = master->size - pre_size - post_size - 2*master->erasesize;
  44. ar7_parts[2].mask_flags = 0;
  45. ar7_parts[3].name = "rootfs";
  46. ar7_parts[3].offset = root_offset;
  47. - ar7_parts[3].size = master->size - root_offset - post_size;
  48. + ar7_parts[3].size = master->size - root_offset - post_size - 2*master->erasesize;
  49. ar7_parts[3].mask_flags = 0;
  50. + ar7_parts[4].name = "cfgfs";
  51. + ar7_parts[4].offset = master->size - 2*master->erasesize;
  52. + ar7_parts[4].size = 2*master->erasesize;
  53. + ar7_parts[4].mask_flags = 0;
  54. +
  55. *pparts = ar7_parts;
  56. return AR7_PARTS;
  57. }
  58. diff -Nur linux-2.6.36.orig/drivers/mtd/maps/physmap.c linux-2.6.36/drivers/mtd/maps/physmap.c
  59. --- linux-2.6.36.orig/drivers/mtd/maps/physmap.c 2010-10-20 22:30:22.000000000 +0200
  60. +++ linux-2.6.36/drivers/mtd/maps/physmap.c 2010-12-16 21:02:19.000000000 +0100
  61. @@ -79,7 +79,7 @@
  62. "map_rom",
  63. NULL };
  64. #ifdef CONFIG_MTD_PARTITIONS
  65. -static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
  66. +static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", "ar7part", NULL };
  67. #endif
  68. static int physmap_flash_probe(struct platform_device *dev)
  69. diff -Nur linux-2.6.36.orig/drivers/serial/8250.c linux-2.6.36/drivers/serial/8250.c
  70. --- linux-2.6.36.orig/drivers/serial/8250.c 2010-10-20 22:30:22.000000000 +0200
  71. +++ linux-2.6.36/drivers/serial/8250.c 2010-12-16 21:02:19.000000000 +0100
  72. @@ -2761,7 +2761,11 @@
  73. {
  74. struct uart_8250_port *up = (struct uart_8250_port *)port;
  75. +#ifdef CONFIG_AR7
  76. + wait_for_xmitr(up, BOTH_EMPTY);
  77. +#else
  78. wait_for_xmitr(up, UART_LSR_THRE);
  79. +#endif
  80. serial_out(up, UART_TX, ch);
  81. }