ar7.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. diff -Nur linux-2.6.34.orig/arch/mips/ar7/prom.c linux-2.6.34/arch/mips/ar7/prom.c
  2. --- linux-2.6.34.orig/arch/mips/ar7/prom.c 2010-05-16 23:17:36.000000000 +0200
  3. +++ linux-2.6.34/arch/mips/ar7/prom.c 2010-05-28 15:52:26.960965976 +0200
  4. @@ -206,6 +206,14 @@
  5. if (strstr(arcs_cmdline, "console="))
  6. return;
  7. +#ifdef CONFIG_KGDB
  8. + if (!strstr(prom_getcmdline(), "nokgdb")) {
  9. + strcat(prom_getcmdline(), " console=kgdb");
  10. + kgdb_enabled = 1;
  11. + return;
  12. + }
  13. +#endif
  14. +
  15. s = prom_getenv("modetty0");
  16. if (s) {
  17. baud = simple_strtoul(s, &p, 10);
  18. diff -Nur linux-2.6.34.orig/arch/mips/Kconfig linux-2.6.34/arch/mips/Kconfig
  19. --- linux-2.6.34.orig/arch/mips/Kconfig 2010-05-16 23:17:36.000000000 +0200
  20. +++ linux-2.6.34/arch/mips/Kconfig 2010-05-28 15:52:27.142223192 +0200
  21. @@ -34,7 +34,6 @@
  22. select CEVT_R4K
  23. select CSRC_R4K
  24. select IRQ_CPU
  25. - select NO_EXCEPT_FILL
  26. select SWAP_IO_SPACE
  27. select SYS_HAS_CPU_MIPS32_R1
  28. select SYS_HAS_EARLY_PRINTK
  29. diff -Nur linux-2.6.34.orig/drivers/mtd/ar7part.c linux-2.6.34/drivers/mtd/ar7part.c
  30. --- linux-2.6.34.orig/drivers/mtd/ar7part.c 2010-05-16 23:17:36.000000000 +0200
  31. +++ linux-2.6.34/drivers/mtd/ar7part.c 2010-05-28 15:52:27.232223555 +0200
  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.34.orig/drivers/mtd/maps/physmap.c linux-2.6.34/drivers/mtd/maps/physmap.c
  59. --- linux-2.6.34.orig/drivers/mtd/maps/physmap.c 2010-05-16 23:17:36.000000000 +0200
  60. +++ linux-2.6.34/drivers/mtd/maps/physmap.c 2010-05-28 15:52:27.281073432 +0200
  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.34.orig/drivers/serial/8250.c linux-2.6.34/drivers/serial/8250.c
  70. --- linux-2.6.34.orig/drivers/serial/8250.c 2010-05-16 23:17:36.000000000 +0200
  71. +++ linux-2.6.34/drivers/serial/8250.c 2010-05-28 15:52:27.330968429 +0200
  72. @@ -2746,7 +2746,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. }