[ar71xx] cosmetic changes in the ag71xx driver
[openwrt.git] / target / linux / brcm63xx / patches / 001-bcm963xx.patch
index f85ceb9..4dae0ac 100644 (file)
-diff -urN linux-2.6.19/arch/mips/Kconfig linux-2.6.19.new/arch/mips/Kconfig
---- linux-2.6.19/arch/mips/Kconfig     2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/arch/mips/Kconfig 2006-12-16 18:46:31.000000000 +0100
-@@ -4,6 +4,10 @@
-       # Horrible source of confusion.  Die, die, die ...
-       select EMBEDDED
-+config CFE
-+       bool
-+       # Common Firmware Environment
-+
- mainmenu "Linux/MIPS Kernel Configuration"
- menu "Machine selection"
-@@ -15,6 +15,18 @@
-       prompt "System type"
-       default SGI_IP22
-+config BCM963XX 
-+      bool "Support for Broadcom BCM963xx SoC"
-+      select SYS_SUPPORTS_32BIT_KERNEL
-+      select SYS_SUPPORTS_BIG_ENDIAN
-+      select SYS_HAS_CPU_MIPS32_R1
-+      select HW_HAS_PCI
-+      select DMA_NONCOHERENT
-+      select IRQ_CPU
-+      select CFE
-+      help
-+       This is a fmaily of boards based on the Broadcom MIPS32
-+
- config MACH_ALCHEMY
-       bool "Alchemy processor based machines"
-diff -urN linux-2.6.19/arch/mips/Makefile linux-2.6.19.new/arch/mips/Makefile
---- linux-2.6.19/arch/mips/Makefile    2006-12-16 17:36:29.000000000 +0100
-+++ linux-2.6.19.new/arch/mips/Makefile        2006-12-16 18:46:31.000000000 +0100
-@@ -158,6 +158,19 @@
- #
- #
-+# Broadcom BCM963xx SoC
-+#
-+core-$(CONFIG_BCM963XX)       += arch/mips/bcm963xx/
-+cflags-$(CONFIG_BCM963XX)             += -Iinclude/asm-mips/mach-bcm963xx
-+load-$(CONFIG_BCM963XX)       += 0xffffffff80010000
+Index: linux-2.6.24.7/arch/mips/Kconfig
+===================================================================
+--- linux-2.6.24.7.orig/arch/mips/Kconfig
++++ linux-2.6.24.7/arch/mips/Kconfig
+@@ -67,6 +67,17 @@ config BCM47XX
+       help
+        Support for BCM47XX based boards
++config BCM963XX
++       bool "Support for Broadcom BCM963xx SoC"
++       select SYS_SUPPORTS_32BIT_KERNEL
++       select SYS_SUPPORTS_BIG_ENDIAN
++       select SYS_HAS_CPU_MIPS32_R1
++       select HW_HAS_PCI
++       select DMA_NONCOHERENT
++       select IRQ_CPU
++       help
++         This is a fmaily of boards based on the Broadcom MIPS32
 +
 +
-+
-+#
-+# Common Firmware Environment
-+#
-+core-$(CONFIG_CFE)             += arch/mips/cfe/
-+
-+#
- # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
- #
- core-$(CONFIG_MACH_JAZZ)      += arch/mips/jazz/
-diff -urN linux-2.6.19/arch/mips/kernel/cpu-probe.c linux-2.6.19.new/arch/mips/kernel/cpu-probe.c
---- linux-2.6.19/arch/mips/kernel/cpu-probe.c  2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/arch/mips/kernel/cpu-probe.c      2006-12-16 18:46:31.000000000 +0100
-@@ -590,6 +590,28 @@
-               return;
- }
-+static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
-+{
-+       decode_configs(c);
-+       switch (c->processor_id & 0xff00) {
-+       case PRID_IMP_BCM6338:
-+               c->cputype = CPU_BCM6338;
-+               break;
-+       case PRID_IMP_BCM6345:
-+               c->cputype = CPU_BCM6345;
-+               break;
-+       case PRID_IMP_BCM6348:
-+               c->cputype = CPU_BCM6348;
-+               break;
+ config MIPS_COBALT
+       bool "Cobalt Server"
+       select CEVT_R4K
+Index: linux-2.6.24.7/arch/mips/kernel/cpu-probe.c
+===================================================================
+--- linux-2.6.24.7.orig/arch/mips/kernel/cpu-probe.c
++++ linux-2.6.24.7/arch/mips/kernel/cpu-probe.c
+@@ -796,6 +796,18 @@ static inline void cpu_probe_broadcom(st
+       case PRID_IMP_BCM4710:
+               c->cputype = CPU_BCM4710;
+               break;
++//    case PRID_IMP_BCM6338:
++//            c->cputype = CPU_BCM6338;
++//            break;
++      case PRID_IMP_BCM6345:
++              c->cputype = CPU_BCM6345;
++              break;
++      case PRID_IMP_BCM6348:
++              c->cputype = CPU_BCM6348;
++              break;
 +      case PRID_IMP_BCM6358:
 +              c->cputype = CPU_BCM6358;
 +              break;
 +      case PRID_IMP_BCM6358:
 +              c->cputype = CPU_BCM6358;
 +              break;
-+       default:
-+               c->cputype = CPU_UNKNOWN;
-+               break;
-+       }
-+}
-+
- static inline void cpu_probe_mips(struct cpuinfo_mips *c)
- {
-       decode_configs(c);
-@@ -724,6 +743,9 @@
-       case PRID_COMP_LEGACY:
-               cpu_probe_legacy(c);
+       default:
+               c->cputype = CPU_UNKNOWN;
                break;
                break;
-+        case PRID_COMP_BROADCOM:
-+                cpu_probe_broadcom(c);
-+                break;
-       case PRID_COMP_MIPS:
-               cpu_probe_mips(c);
-               break;
-diff -urN linux-2.6.19/arch/mips/kernel/proc.c linux-2.6.19.new/arch/mips/kernel/proc.c
---- linux-2.6.19/arch/mips/kernel/proc.c       2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/arch/mips/kernel/proc.c   2006-12-16 18:46:31.000000000 +0100
-@@ -84,6 +84,10 @@
-       [CPU_VR4181A]   = "NEC VR4181A",
-       [CPU_SR71000]   = "Sandcraft SR71000",
-       [CPU_PR4450]    = "Philips PR4450",
-+      [CPU_BCM6338]   = "BCM6338",
-+      [CPU_BCM6345]   = "BCM6345",
-+      [CPU_BCM6348]   = "BCM6348",
-+      [CPU_BCM6358]   = "BCM6358",
- };
-diff -urN linux-2.6.19/arch/mips/mm/c-r4k.c linux-2.6.19.new/arch/mips/mm/c-r4k.c
---- linux-2.6.19/arch/mips/mm/c-r4k.c  2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/arch/mips/mm/c-r4k.c      2006-12-16 18:46:31.000000000 +0100
-@@ -852,6 +852,13 @@
+@@ -878,6 +890,10 @@ static __init const char *cpu_to_name(st
+       case CPU_SR71000:       name = "Sandcraft SR71000"; break;
+       case CPU_BCM3302:       name = "Broadcom BCM3302"; break;
+       case CPU_BCM4710:       name = "Broadcom BCM4710"; break;
++      case CPU_BCM6338:       name = "Broadcom BCM6338"; break;
++      case CPU_BCM6345:       name = "Broadcom BCM6345"; break;
++      case CPU_BCM6348:       name = "Broadcom BCM6348"; break;
++      case CPU_BCM6358:       name = "Broadcom BCM6358"; break;
+       case CPU_PR4450:        name = "Philips PR4450"; break;
+       case CPU_LOONGSON2:     name = "ICT Loongson-2"; break;
+       default:
+Index: linux-2.6.24.7/arch/mips/Makefile
+===================================================================
+--- linux-2.6.24.7.orig/arch/mips/Makefile
++++ linux-2.6.24.7/arch/mips/Makefile
+@@ -543,6 +543,10 @@ core-$(CONFIG_BCM47XX)            += arch/mips/bcm
+ cflags-$(CONFIG_BCM47XX)      += -Iinclude/asm-mips/mach-bcm47xx
+ load-$(CONFIG_BCM47XX)                := 0xffffffff80001000
++core-$(CONFIG_BCM963XX)               += arch/mips/bcm963xx/
++cflags-$(CONFIG_BCM963XX)     += -Iinclude/asm-mips/mach-bcm963xx
++load-$(CONFIG_BCM963XX)               := 0xffffffff8001000
++
+ #
+ # SNI RM
+ #
+Index: linux-2.6.24.7/arch/mips/mm/c-r4k.c
+===================================================================
+--- linux-2.6.24.7.orig/arch/mips/mm/c-r4k.c
++++ linux-2.6.24.7/arch/mips/mm/c-r4k.c
+@@ -878,6 +878,13 @@ static void __init probe_pcache(void)
                if (!(config & MIPS_CONF_M))
                        panic("Don't know how to probe P-caches on this cpu.");
  
                if (!(config & MIPS_CONF_M))
                        panic("Don't know how to probe P-caches on this cpu.");
  
@@ -127,96 +87,67 @@ diff -urN linux-2.6.19/arch/mips/mm/c-r4k.c linux-2.6.19.new/arch/mips/mm/c-r4k.
                /*
                 * So we seem to be a MIPS32 or MIPS64 CPU
                 * So let's probe the I-cache ...
                /*
                 * So we seem to be a MIPS32 or MIPS64 CPU
                 * So let's probe the I-cache ...
-diff -urN linux-2.6.19/arch/mips/mm/tlbex.c linux-2.6.19.new/arch/mips/mm/tlbex.c
---- linux-2.6.19/arch/mips/mm/tlbex.c  2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/arch/mips/mm/tlbex.c      2006-12-16 18:46:31.000000000 +0100
-@@ -892,6 +892,10 @@
-       case CPU_4KSC:
-       case CPU_20KC:
+Index: linux-2.6.24.7/arch/mips/mm/tlbex.c
+===================================================================
+--- linux-2.6.24.7.orig/arch/mips/mm/tlbex.c
++++ linux-2.6.24.7/arch/mips/mm/tlbex.c
+@@ -909,6 +909,10 @@ static __init void build_tlb_write_entry
        case CPU_25KF:
        case CPU_25KF:
-+      case CPU_BCM6338:
+       case CPU_BCM3302:
+       case CPU_BCM4710:
++//    case CPU_BCM6338:
 +      case CPU_BCM6345:
 +      case CPU_BCM6348:
 +      case CPU_BCM6358:
 +      case CPU_BCM6345:
 +      case CPU_BCM6348:
 +      case CPU_BCM6358:
-               tlbw(p);
-               break;
-diff -urN linux-2.6.19/arch/mips/pci/Makefile linux-2.6.19.new/arch/mips/pci/Makefile
---- linux-2.6.19/arch/mips/pci/Makefile        2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/arch/mips/pci/Makefile    2006-12-16 18:48:18.000000000 +0100
-@@ -16,6 +16,7 @@
- obj-$(CONFIG_PCI_VR41XX)      += ops-vr41xx.o pci-vr41xx.o
- obj-$(CONFIG_NEC_CMBVR4133)   += fixup-vr4133.o
- obj-$(CONFIG_MARKEINS)                += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
+       case CPU_LOONGSON2:
+               if (m4kc_tlbp_war())
+                       i_nop(p);
+Index: linux-2.6.24.7/arch/mips/pci/Makefile
+===================================================================
+--- linux-2.6.24.7.orig/arch/mips/pci/Makefile
++++ linux-2.6.24.7/arch/mips/pci/Makefile
+@@ -48,3 +48,4 @@ obj-$(CONFIG_TOSHIBA_RBTX4938)       += fixup-
+ obj-$(CONFIG_VICTOR_MPC30X)   += fixup-mpc30x.o
+ obj-$(CONFIG_ZAO_CAPCELLA)    += fixup-capcella.o
+ obj-$(CONFIG_WR_PPMC)         += fixup-wrppmc.o
 +obj-$(CONFIG_BCM963XX)                += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o
 +obj-$(CONFIG_BCM963XX)                += fixup-bcm96348.o pci-bcm96348.o ops-bcm96348.o
+Index: linux-2.6.24.7/include/asm-mips/bootinfo.h
+===================================================================
+--- linux-2.6.24.7.orig/include/asm-mips/bootinfo.h
++++ linux-2.6.24.7/include/asm-mips/bootinfo.h
+@@ -197,6 +197,10 @@
+  */
+ #define MACH_GROUP_BRCM               23      /* Broadcom                     */
+ #define  MACH_BCM47XX         1       /* Broadcom BCM47XX             */
++#define  MACH_BCM96338          2
++#define  MACH_BCM96345          3
++#define  MACH_BCM96348          4
++#define  MACH_BCM96358          5
  
  
- #
- # These are still pretty much in the old state, watch, go blind.
-diff -urN linux-2.6.19/include/asm-mips/bootinfo.h linux-2.6.19.new/include/asm-mips/bootinfo.h
---- linux-2.6.19/include/asm-mips/bootinfo.h   2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/include/asm-mips/bootinfo.h       2006-12-16 18:46:31.000000000 +0100
-@@ -213,6 +213,15 @@
- #define MACH_GROUP_NEC_EMMA2RH 25     /* NEC EMMA2RH (was 23)         */
- #define  MACH_NEC_MARKEINS    0       /* NEC EMMA2RH Mark-eins        */
-+/*
-+ * Valid machtype for group BRCM
-+ */
-+#define MACH_GROUP_BRCM        23      /* Broadcom boards              */
-+#define MACH_BCM96338          0
-+#define MACH_BCM96345          1
-+#define MACH_BCM96348          2
-+#define MACH_BCM96358         3
-+
  #define CL_SIZE                       COMMAND_LINE_SIZE
  
  #define CL_SIZE                       COMMAND_LINE_SIZE
  
- const char *get_system_type(void);
-diff -urN linux-2.6.19/include/asm-mips/cpu.h linux-2.6.19.new/include/asm-mips/cpu.h
---- linux-2.6.19/include/asm-mips/cpu.h        2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/include/asm-mips/cpu.h    2006-12-16 18:46:31.000000000 +0100
-@@ -103,6 +103,14 @@
+Index: linux-2.6.24.7/include/asm-mips/cpu.h
+===================================================================
+--- linux-2.6.24.7.orig/include/asm-mips/cpu.h
++++ linux-2.6.24.7/include/asm-mips/cpu.h
+@@ -111,6 +111,10 @@
  
  
- #define PRID_IMP_SR71000        0x0400
+ #define PRID_IMP_BCM4710      0x4000
+ #define PRID_IMP_BCM3302      0x9000
++//#define PRID_IMP_BCM6338        0x9000
++#define PRID_IMP_BCM6345        0x8000
++#define PRID_IMP_BCM6348        0x9100
++#define PRID_IMP_BCM6358        0xA000
  
  
-+/* These are the PRID's for when 23:16 == PRID_COMP_BROADCOM
-+ */
-+
-+#define PRID_IMP_BCM6338              0x9000
-+#define PRID_IMP_BCM6345              0x8000
-+#define PRID_IMP_BCM6348              0x9100
-+#define PRID_IMP_BCM6358              0xA000
-+
  /*
   * Definitions for 7:0 on legacy processors
  /*
   * Definitions for 7:0 on legacy processors
-  */
-@@ -200,7 +207,11 @@
- #define CPU_SB1A              62
- #define CPU_74K                       63
- #define CPU_R14000            64
--#define CPU_LAST              64
-+#define CPU_BCM6338             65
-+#define CPU_BCM6345             66
-+#define CPU_BCM6348             67
-+#define CPU_BCM6358            68     
-+#define CPU_LAST              68
- /*
-  * ISA Level encodings
-diff -urN linux-2.6.19/include/asm-mips/module.h linux-2.6.19.new/include/asm-mips/module.h
---- linux-2.6.19/include/asm-mips/module.h     2006-11-29 22:57:37.000000000 +0100
-+++ linux-2.6.19.new/include/asm-mips/module.h 2006-12-16 19:03:22.000000000 +0100
-@@ -112,6 +112,14 @@
- #define MODULE_PROC_FAMILY "RM9000 "
- #elif defined CONFIG_CPU_SB1
- #define MODULE_PROC_FAMILY "SB1 "
-+#elif defined CONFIG_CPU_BCM6338
-+#define MODULE_PROC_FAMILY "BCM6338 "
-+#elif defined CONFIG_CPU_BCM6345
-+#define MODULE_PROC_FAMILY "BCM6345 "
-+#elif defined CONFIG_CPU_BCM6348
-+#define MODULE_PROC_FAMILY "BCM6348 "
-+#elif defined CONFIG_CPU_BCM6358
-+#define MODULE_PROC_FAMILY "BCM6358 "
- #else
- #error MODULE_PROC_FAMILY undefined for your processor configuration
- #endif
+@@ -196,7 +200,8 @@ enum cpu_type_enum {
+        */
+       CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_74K, CPU_AU1000,
+       CPU_AU1100, CPU_AU1200, CPU_AU1500, CPU_AU1550, CPU_PR4450,
+-      CPU_BCM3302, CPU_BCM4710,
++      CPU_BCM3302, CPU_BCM4710, CPU_BCM6338, CPU_BCM6345, CPU_BCM6348,
++      CPU_BCM6358,
+       /*
+        * MIPS64 class processors
This page took 0.031493 seconds and 4 git commands to generate.