aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-02-06 06:08:37 -0500
committerPaul Mackerras <paulus@samba.org>2008-02-06 06:08:37 -0500
commitb370b08274a25cf1e2015fb7ce65c43173c8156f (patch)
tree0c8f990148da4ca1275ac5471c93c519754f4aec
parent75e89b02e338d0db27f8e5d66642c7e2ae49c326 (diff)
parent7e25867fe8d705bcf707ef52004b669eb795d06d (diff)
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.25
-rw-r--r--arch/powerpc/boot/dts/adder875-redboot.dts1
-rw-r--r--arch/powerpc/boot/dts/adder875-uboot.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc8315erdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds.dts12
-rw-r--r--arch/powerpc/boot/dts/mpc885ads.dts1
-rw-r--r--arch/powerpc/boot/dts/storcenter.dts12
-rw-r--r--arch/powerpc/configs/mpc83xx_defconfig10
-rw-r--r--arch/powerpc/kernel/cputable.c10
-rw-r--r--arch/powerpc/kernel/pmc.c2
-rw-r--r--arch/powerpc/oprofile/Makefile2
-rw-r--r--arch/powerpc/oprofile/common.c6
-rw-r--r--arch/powerpc/oprofile/op_model_fsl_emb.c (renamed from arch/powerpc/oprofile/op_model_fsl_booke.c)28
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c2
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h2
-rw-r--r--arch/powerpc/platforms/83xx/usb.c17
-rw-r--r--arch/powerpc/platforms/8xx/adder875.c6
-rw-r--r--arch/powerpc/platforms/8xx/ep88xc.c1
-rw-r--r--arch/powerpc/platforms/Kconfig1
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype4
-rw-r--r--arch/powerpc/platforms/embedded6xx/storcenter.c25
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c2
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c10
-rw-r--r--drivers/net/Kconfig4
-rw-r--r--drivers/net/cpmac.c55
-rw-r--r--include/asm-powerpc/cputable.h2
-rw-r--r--include/asm-powerpc/oprofile_impl.h2
-rw-r--r--include/asm-powerpc/reg.h4
-rw-r--r--include/asm-powerpc/reg_booke.h62
-rw-r--r--include/asm-powerpc/reg_fsl_emb.h72
31 files changed, 190 insertions, 174 deletions
diff --git a/arch/powerpc/boot/dts/adder875-redboot.dts b/arch/powerpc/boot/dts/adder875-redboot.dts
index 930bfb3894eb..28e9cd3d7a21 100644
--- a/arch/powerpc/boot/dts/adder875-redboot.dts
+++ b/arch/powerpc/boot/dts/adder875-redboot.dts
@@ -151,6 +151,7 @@
151 compatible = "fsl,mpc875-brg", 151 compatible = "fsl,mpc875-brg",
152 "fsl,cpm1-brg", 152 "fsl,cpm1-brg",
153 "fsl,cpm-brg"; 153 "fsl,cpm-brg";
154 clock-frequency = <50000000>;
154 reg = <0x9f0 0x10>; 155 reg = <0x9f0 0x10>;
155 }; 156 };
156 157
diff --git a/arch/powerpc/boot/dts/adder875-uboot.dts b/arch/powerpc/boot/dts/adder875-uboot.dts
index 0197242dacfb..54fb60ec03e5 100644
--- a/arch/powerpc/boot/dts/adder875-uboot.dts
+++ b/arch/powerpc/boot/dts/adder875-uboot.dts
@@ -150,6 +150,7 @@
150 compatible = "fsl,mpc875-brg", 150 compatible = "fsl,mpc875-brg",
151 "fsl,cpm1-brg", 151 "fsl,cpm1-brg",
152 "fsl,cpm-brg"; 152 "fsl,cpm-brg";
153 clock-frequency = <50000000>;
153 reg = <0x9f0 0x10>; 154 reg = <0x9f0 0x10>;
154 }; 155 };
155 156
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 2d6653fe72ff..e1f0dca8ac39 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -118,6 +118,10 @@
118 interrupts = <14 0x8>; 118 interrupts = <14 0x8>;
119 interrupt-parent = <&ipic>; 119 interrupt-parent = <&ipic>;
120 dfsrr; 120 dfsrr;
121 rtc@68 {
122 compatible = "dallas,ds1339";
123 reg = <0x68>;
124 };
121 }; 125 };
122 126
123 i2c@3100 { 127 i2c@3100 {
diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
index b582032ba3d6..d7a1ececa30f 100644
--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
@@ -96,7 +96,7 @@
96 #address-cells = <1>; 96 #address-cells = <1>;
97 #size-cells = <1>; 97 #size-cells = <1>;
98 device_type = "soc"; 98 device_type = "soc";
99 compatible = "simple-bus"; 99 compatible = "fsl,mpc8315-immr", "simple-bus";
100 ranges = <0 0xe0000000 0x00100000>; 100 ranges = <0 0xe0000000 0x00100000>;
101 reg = <0xe0000000 0x00000200>; 101 reg = <0xe0000000 0x00000200>;
102 bus-frequency = <0>; 102 bus-frequency = <0>;
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index 7480edae85ed..0199c5c548d8 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -332,7 +332,7 @@
332 0xc000 0x0 0x0 0x3 &ipic 23 0x8 332 0xc000 0x0 0x0 0x3 &ipic 23 0x8
333 0xc000 0x0 0x0 0x4 &ipic 20 0x8>; 333 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
334 interrupt-parent = <&ipic>; 334 interrupt-parent = <&ipic>;
335 interrupts = <66 0x8>; 335 interrupts = <67 0x8>;
336 bus-range = <0 0>; 336 bus-range = <0 0>;
337 ranges = <0x02000000 0x0 0xb0000000 0xb0000000 0x0 0x10000000 337 ranges = <0x02000000 0x0 0xb0000000 0xb0000000 0x0 0x10000000
338 0x42000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000 338 0x42000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
index 813c259abbe5..db37214aee37 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -42,6 +42,18 @@
42 bus-frequency = <0>; 42 bus-frequency = <0>;
43 clock-frequency = <0>; 43 clock-frequency = <0>;
44 }; 44 };
45
46 PowerPC,8572@1 {
47 device_type = "cpu";
48 reg = <1>;
49 d-cache-line-size = <20>; // 32 bytes
50 i-cache-line-size = <20>; // 32 bytes
51 d-cache-size = <8000>; // L1, 32K
52 i-cache-size = <8000>; // L1, 32K
53 timebase-frequency = <0>;
54 bus-frequency = <0>;
55 clock-frequency = <0>;
56 };
45 }; 57 };
46 58
47 memory { 59 memory {
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index 8848e637293e..d84a012c2aaf 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -166,6 +166,7 @@
166 compatible = "fsl,mpc885-brg", 166 compatible = "fsl,mpc885-brg",
167 "fsl,cpm1-brg", 167 "fsl,cpm1-brg",
168 "fsl,cpm-brg"; 168 "fsl,cpm-brg";
169 clock-frequency = <0>;
169 reg = <9f0 10>; 170 reg = <9f0 10>;
170 }; 171 };
171 172
diff --git a/arch/powerpc/boot/dts/storcenter.dts b/arch/powerpc/boot/dts/storcenter.dts
index 2204874ac5f3..5893816c0bce 100644
--- a/arch/powerpc/boot/dts/storcenter.dts
+++ b/arch/powerpc/boot/dts/storcenter.dts
@@ -15,7 +15,7 @@
15 15
16/ { 16/ {
17 model = "StorCenter"; 17 model = "StorCenter";
18 compatible = "storcenter"; 18 compatible = "iomega,storcenter";
19 #address-cells = <1>; 19 #address-cells = <1>;
20 #size-cells = <1>; 20 #size-cells = <1>;
21 21
@@ -62,12 +62,12 @@
62 #size-cells = <0>; 62 #size-cells = <0>;
63 compatible = "fsl-i2c"; 63 compatible = "fsl-i2c";
64 reg = <0x3000 0x100>; 64 reg = <0x3000 0x100>;
65 interrupts = <5 2>; 65 interrupts = <17 2>;
66 interrupt-parent = <&mpic>; 66 interrupt-parent = <&mpic>;
67 67
68 rtc@68 { 68 rtc@68 {
69 compatible = "dallas,ds1337"; 69 compatible = "dallas,ds1337";
70 reg = <68>; 70 reg = <0x68>;
71 }; 71 };
72 }; 72 };
73 73
@@ -78,7 +78,7 @@
78 reg = <0x4500 0x20>; 78 reg = <0x4500 0x20>;
79 clock-frequency = <97553800>; /* Hz */ 79 clock-frequency = <97553800>; /* Hz */
80 current-speed = <115200>; 80 current-speed = <115200>;
81 interrupts = <9 2>; 81 interrupts = <25 2>;
82 interrupt-parent = <&mpic>; 82 interrupt-parent = <&mpic>;
83 }; 83 };
84 84
@@ -89,7 +89,7 @@
89 reg = <0x4600 0x20>; 89 reg = <0x4600 0x20>;
90 clock-frequency = <97553800>; /* Hz */ 90 clock-frequency = <97553800>; /* Hz */
91 current-speed = <9600>; 91 current-speed = <9600>;
92 interrupts = <10 2>; 92 interrupts = <26 2>;
93 interrupt-parent = <&mpic>; 93 interrupt-parent = <&mpic>;
94 }; 94 };
95 95
@@ -136,6 +136,6 @@
136 }; 136 };
137 137
138 chosen { 138 chosen {
139 linux,stdout-path = "/soc/serial@4500"; 139 linux,stdout-path = &serial0;
140 }; 140 };
141}; 141};
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 31bdbf3f7566..a9807f083bc4 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -186,7 +186,7 @@ CONFIG_PREEMPT_NONE=y
186# CONFIG_PREEMPT is not set 186# CONFIG_PREEMPT is not set
187CONFIG_BINFMT_ELF=y 187CONFIG_BINFMT_ELF=y
188# CONFIG_BINFMT_MISC is not set 188# CONFIG_BINFMT_MISC is not set
189# CONFIG_MATH_EMULATION is not set 189CONFIG_MATH_EMULATION=y
190CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 190CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
191CONFIG_ARCH_FLATMEM_ENABLE=y 191CONFIG_ARCH_FLATMEM_ENABLE=y
192CONFIG_ARCH_POPULATES_NODE_MAP=y 192CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -416,14 +416,14 @@ CONFIG_PHYLIB=y
416# MII PHY device drivers 416# MII PHY device drivers
417# 417#
418CONFIG_MARVELL_PHY=y 418CONFIG_MARVELL_PHY=y
419# CONFIG_DAVICOM_PHY is not set 419CONFIG_DAVICOM_PHY=y
420# CONFIG_QSEMI_PHY is not set 420# CONFIG_QSEMI_PHY is not set
421# CONFIG_LXT_PHY is not set 421# CONFIG_LXT_PHY is not set
422# CONFIG_CICADA_PHY is not set 422# CONFIG_CICADA_PHY is not set
423# CONFIG_VITESSE_PHY is not set 423CONFIG_VITESSE_PHY=y
424# CONFIG_SMSC_PHY is not set 424# CONFIG_SMSC_PHY is not set
425# CONFIG_BROADCOM_PHY is not set 425# CONFIG_BROADCOM_PHY is not set
426# CONFIG_ICPLUS_PHY is not set 426CONFIG_ICPLUS_PHY=y
427# CONFIG_FIXED_PHY is not set 427# CONFIG_FIXED_PHY is not set
428# CONFIG_MDIO_BITBANG is not set 428# CONFIG_MDIO_BITBANG is not set
429CONFIG_NET_ETHERNET=y 429CONFIG_NET_ETHERNET=y
@@ -436,7 +436,7 @@ CONFIG_MII=y
436CONFIG_NETDEV_1000=y 436CONFIG_NETDEV_1000=y
437CONFIG_GIANFAR=y 437CONFIG_GIANFAR=y
438# CONFIG_GFAR_NAPI is not set 438# CONFIG_GFAR_NAPI is not set
439# CONFIG_UCC_GETH is not set 439CONFIG_UCC_GETH=y
440CONFIG_NETDEV_10000=y 440CONFIG_NETDEV_10000=y
441 441
442# 442#
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index a4c2771b5e62..2a8f5cc5184f 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -959,6 +959,9 @@ static struct cpu_spec __initdata cpu_specs[] = {
959 .icache_bsize = 32, 959 .icache_bsize = 32,
960 .dcache_bsize = 32, 960 .dcache_bsize = 32,
961 .cpu_setup = __setup_cpu_603, 961 .cpu_setup = __setup_cpu_603,
962 .num_pmcs = 4,
963 .oprofile_cpu_type = "ppc/e300",
964 .oprofile_type = PPC_OPROFILE_FSL_EMB,
962 .platform = "ppc603", 965 .platform = "ppc603",
963 }, 966 },
964 { /* e300c4 (e300c1, plus one IU) */ 967 { /* e300c4 (e300c1, plus one IU) */
@@ -971,6 +974,9 @@ static struct cpu_spec __initdata cpu_specs[] = {
971 .dcache_bsize = 32, 974 .dcache_bsize = 32,
972 .cpu_setup = __setup_cpu_603, 975 .cpu_setup = __setup_cpu_603,
973 .machine_check = machine_check_generic, 976 .machine_check = machine_check_generic,
977 .num_pmcs = 4,
978 .oprofile_cpu_type = "ppc/e300",
979 .oprofile_type = PPC_OPROFILE_FSL_EMB,
974 .platform = "ppc603", 980 .platform = "ppc603",
975 }, 981 },
976 { /* default match, we assume split I/D cache & TB (non-601)... */ 982 { /* default match, we assume split I/D cache & TB (non-601)... */
@@ -1435,7 +1441,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1435 .dcache_bsize = 32, 1441 .dcache_bsize = 32,
1436 .num_pmcs = 4, 1442 .num_pmcs = 4,
1437 .oprofile_cpu_type = "ppc/e500", 1443 .oprofile_cpu_type = "ppc/e500",
1438 .oprofile_type = PPC_OPROFILE_BOOKE, 1444 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1439 .machine_check = machine_check_e500, 1445 .machine_check = machine_check_e500,
1440 .platform = "ppc8540", 1446 .platform = "ppc8540",
1441 }, 1447 },
@@ -1453,7 +1459,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1453 .dcache_bsize = 32, 1459 .dcache_bsize = 32,
1454 .num_pmcs = 4, 1460 .num_pmcs = 4,
1455 .oprofile_cpu_type = "ppc/e500", 1461 .oprofile_cpu_type = "ppc/e500",
1456 .oprofile_type = PPC_OPROFILE_BOOKE, 1462 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1457 .machine_check = machine_check_e500, 1463 .machine_check = machine_check_e500,
1458 .platform = "ppc8548", 1464 .platform = "ppc8548",
1459 }, 1465 },
diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c
index ea04e0ab3f2f..0516e2d3e02e 100644
--- a/arch/powerpc/kernel/pmc.c
+++ b/arch/powerpc/kernel/pmc.c
@@ -26,7 +26,7 @@
26 26
27static void dummy_perf(struct pt_regs *regs) 27static void dummy_perf(struct pt_regs *regs)
28{ 28{
29#if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200) 29#if defined(CONFIG_FSL_EMB_PERFMON)
30 mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE); 30 mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
31#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx) 31#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
32 if (cur_cpu_spec->pmc_type == PPC_PMC_IBM) 32 if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
diff --git a/arch/powerpc/oprofile/Makefile b/arch/powerpc/oprofile/Makefile
index c5f64c3bd668..2ef6b0dddd8c 100644
--- a/arch/powerpc/oprofile/Makefile
+++ b/arch/powerpc/oprofile/Makefile
@@ -15,5 +15,5 @@ oprofile-$(CONFIG_OPROFILE_CELL) += op_model_cell.o \
15 cell/spu_profiler.o cell/vma_map.o \ 15 cell/spu_profiler.o cell/vma_map.o \
16 cell/spu_task_sync.o 16 cell/spu_task_sync.o
17oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o op_model_pa6t.o 17oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o op_model_pa6t.o
18oprofile-$(CONFIG_FSL_BOOKE) += op_model_fsl_booke.o 18oprofile-$(CONFIG_FSL_EMB_PERFMON) += op_model_fsl_emb.o
19oprofile-$(CONFIG_6xx) += op_model_7450.o 19oprofile-$(CONFIG_6xx) += op_model_7450.o
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c
index a28cce1d6c24..4908dc98f9ca 100644
--- a/arch/powerpc/oprofile/common.c
+++ b/arch/powerpc/oprofile/common.c
@@ -202,9 +202,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
202 model = &op_model_7450; 202 model = &op_model_7450;
203 break; 203 break;
204#endif 204#endif
205#ifdef CONFIG_FSL_BOOKE 205#if defined(CONFIG_FSL_EMB_PERFMON)
206 case PPC_OPROFILE_BOOKE: 206 case PPC_OPROFILE_FSL_EMB:
207 model = &op_model_fsl_booke; 207 model = &op_model_fsl_emb;
208 break; 208 break;
209#endif 209#endif
210 default: 210 default:
diff --git a/arch/powerpc/oprofile/op_model_fsl_booke.c b/arch/powerpc/oprofile/op_model_fsl_emb.c
index 183a28bb1812..91596f6ba1f4 100644
--- a/arch/powerpc/oprofile/op_model_fsl_booke.c
+++ b/arch/powerpc/oprofile/op_model_fsl_emb.c
@@ -1,7 +1,5 @@
1/* 1/*
2 * arch/powerpc/oprofile/op_model_fsl_booke.c 2 * Freescale Embedded oprofile support, based on ppc64 oprofile support
3 *
4 * Freescale Book-E oprofile support, based on ppc64 oprofile support
5 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM 3 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
6 * 4 *
7 * Copyright (c) 2004 Freescale Semiconductor, Inc 5 * Copyright (c) 2004 Freescale Semiconductor, Inc
@@ -22,7 +20,7 @@
22#include <asm/system.h> 20#include <asm/system.h>
23#include <asm/processor.h> 21#include <asm/processor.h>
24#include <asm/cputable.h> 22#include <asm/cputable.h>
25#include <asm/reg_booke.h> 23#include <asm/reg_fsl_emb.h>
26#include <asm/page.h> 24#include <asm/page.h>
27#include <asm/pmc.h> 25#include <asm/pmc.h>
28#include <asm/oprofile_impl.h> 26#include <asm/oprofile_impl.h>
@@ -244,7 +242,7 @@ static void dump_pmcs(void)
244 mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3)); 242 mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3));
245} 243}
246 244
247static int fsl_booke_cpu_setup(struct op_counter_config *ctr) 245static int fsl_emb_cpu_setup(struct op_counter_config *ctr)
248{ 246{
249 int i; 247 int i;
250 248
@@ -262,7 +260,7 @@ static int fsl_booke_cpu_setup(struct op_counter_config *ctr)
262 return 0; 260 return 0;
263} 261}
264 262
265static int fsl_booke_reg_setup(struct op_counter_config *ctr, 263static int fsl_emb_reg_setup(struct op_counter_config *ctr,
266 struct op_system_config *sys, 264 struct op_system_config *sys,
267 int num_ctrs) 265 int num_ctrs)
268{ 266{
@@ -281,7 +279,7 @@ static int fsl_booke_reg_setup(struct op_counter_config *ctr,
281 return 0; 279 return 0;
282} 280}
283 281
284static int fsl_booke_start(struct op_counter_config *ctr) 282static int fsl_emb_start(struct op_counter_config *ctr)
285{ 283{
286 int i; 284 int i;
287 285
@@ -315,7 +313,7 @@ static int fsl_booke_start(struct op_counter_config *ctr)
315 return 0; 313 return 0;
316} 314}
317 315
318static void fsl_booke_stop(void) 316static void fsl_emb_stop(void)
319{ 317{
320 /* freeze counters */ 318 /* freeze counters */
321 pmc_stop_ctrs(); 319 pmc_stop_ctrs();
@@ -329,7 +327,7 @@ static void fsl_booke_stop(void)
329} 327}
330 328
331 329
332static void fsl_booke_handle_interrupt(struct pt_regs *regs, 330static void fsl_emb_handle_interrupt(struct pt_regs *regs,
333 struct op_counter_config *ctr) 331 struct op_counter_config *ctr)
334{ 332{
335 unsigned long pc; 333 unsigned long pc;
@@ -362,10 +360,10 @@ static void fsl_booke_handle_interrupt(struct pt_regs *regs,
362 pmc_start_ctrs(1); 360 pmc_start_ctrs(1);
363} 361}
364 362
365struct op_powerpc_model op_model_fsl_booke = { 363struct op_powerpc_model op_model_fsl_emb = {
366 .reg_setup = fsl_booke_reg_setup, 364 .reg_setup = fsl_emb_reg_setup,
367 .cpu_setup = fsl_booke_cpu_setup, 365 .cpu_setup = fsl_emb_cpu_setup,
368 .start = fsl_booke_start, 366 .start = fsl_emb_start,
369 .stop = fsl_booke_stop, 367 .stop = fsl_emb_stop,
370 .handle_interrupt = fsl_booke_handle_interrupt, 368 .handle_interrupt = fsl_emb_handle_interrupt,
371}; 369};
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index 9f0fd88b2b1f..e7f706b624fe 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -101,7 +101,7 @@ static void __init mpc832x_rdb_setup_arch(void)
101#ifdef CONFIG_QUICC_ENGINE 101#ifdef CONFIG_QUICC_ENGINE
102 qe_reset(); 102 qe_reset();
103 103
104 if ((np = of_find_node_by_name(np, "par_io")) != NULL) { 104 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
105 par_io_init(np); 105 par_io_init(np);
106 of_node_put(np); 106 of_node_put(np);
107 107
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 88bb748aff0d..68065e62fc3d 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -14,6 +14,8 @@
14#define MPC83XX_SCCR_USB_DRCM_11 0x00300000 14#define MPC83XX_SCCR_USB_DRCM_11 0x00300000
15#define MPC83XX_SCCR_USB_DRCM_01 0x00100000 15#define MPC83XX_SCCR_USB_DRCM_01 0x00100000
16#define MPC83XX_SCCR_USB_DRCM_10 0x00200000 16#define MPC83XX_SCCR_USB_DRCM_10 0x00200000
17#define MPC8315_SCCR_USB_MASK 0x00c00000
18#define MPC8315_SCCR_USB_DRCM_11 0x00c00000
17#define MPC837X_SCCR_USB_DRCM_11 0x00c00000 19#define MPC837X_SCCR_USB_DRCM_11 0x00c00000
18 20
19/* system i/o configuration register low */ 21/* system i/o configuration register low */
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 681230a30acd..471fdd8f4108 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -104,6 +104,7 @@ int mpc831x_usb_cfg(void)
104 u32 temp; 104 u32 temp;
105 void __iomem *immap, *usb_regs; 105 void __iomem *immap, *usb_regs;
106 struct device_node *np = NULL; 106 struct device_node *np = NULL;
107 struct device_node *immr_node = NULL;
107 const void *prop; 108 const void *prop;
108 struct resource res; 109 struct resource res;
109 int ret = 0; 110 int ret = 0;
@@ -124,10 +125,15 @@ int mpc831x_usb_cfg(void)
124 } 125 }
125 126
126 /* Configure clock */ 127 /* Configure clock */
127 temp = in_be32(immap + MPC83XX_SCCR_OFFS); 128 immr_node = of_get_parent(np);
128 temp &= ~MPC83XX_SCCR_USB_MASK; 129 if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
129 temp |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */ 130 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
130 out_be32(immap + MPC83XX_SCCR_OFFS, temp); 131 MPC8315_SCCR_USB_MASK,
132 MPC8315_SCCR_USB_DRCM_11);
133 else
134 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
135 MPC83XX_SCCR_USB_MASK,
136 MPC83XX_SCCR_USB_DRCM_11);
131 137
132 /* Configure pin mux for ULPI. There is no pin mux for UTMI */ 138 /* Configure pin mux for ULPI. There is no pin mux for UTMI */
133 if (prop && !strcmp(prop, "ulpi")) { 139 if (prop && !strcmp(prop, "ulpi")) {
@@ -144,6 +150,9 @@ int mpc831x_usb_cfg(void)
144 150
145 iounmap(immap); 151 iounmap(immap);
146 152
153 if (immr_node)
154 of_node_put(immr_node);
155
147 /* Map USB SOC space */ 156 /* Map USB SOC space */
148 ret = of_address_to_resource(np, 0, &res); 157 ret = of_address_to_resource(np, 0, &res);
149 if (ret) { 158 if (ret) {
diff --git a/arch/powerpc/platforms/8xx/adder875.c b/arch/powerpc/platforms/8xx/adder875.c
index c6bc0783c3b0..82363e98f50e 100644
--- a/arch/powerpc/platforms/8xx/adder875.c
+++ b/arch/powerpc/platforms/8xx/adder875.c
@@ -15,12 +15,12 @@
15 15
16#include <asm/time.h> 16#include <asm/time.h>
17#include <asm/machdep.h> 17#include <asm/machdep.h>
18#include <asm/commproc.h> 18#include <asm/cpm1.h>
19#include <asm/fs_pd.h> 19#include <asm/fs_pd.h>
20#include <asm/udbg.h> 20#include <asm/udbg.h>
21#include <asm/prom.h> 21#include <asm/prom.h>
22 22
23#include <sysdev/commproc.h> 23#include "mpc8xx.h"
24 24
25struct cpm_pin { 25struct cpm_pin {
26 int port, pin, flags; 26 int port, pin, flags;
@@ -108,7 +108,7 @@ define_machine(adder875) {
108 .name = "Adder MPC875", 108 .name = "Adder MPC875",
109 .probe = adder875_probe, 109 .probe = adder875_probe,
110 .setup_arch = adder875_setup, 110 .setup_arch = adder875_setup,
111 .init_IRQ = m8xx_pic_init, 111 .init_IRQ = mpc8xx_pics_init,
112 .get_irq = mpc8xx_get_irq, 112 .get_irq = mpc8xx_get_irq,
113 .restart = mpc8xx_restart, 113 .restart = mpc8xx_restart,
114 .calibrate_decr = generic_calibrate_decr, 114 .calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c
index a8dffa005775..7d9ac6040d63 100644
--- a/arch/powerpc/platforms/8xx/ep88xc.c
+++ b/arch/powerpc/platforms/8xx/ep88xc.c
@@ -15,7 +15,6 @@
15#include <asm/machdep.h> 15#include <asm/machdep.h>
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/udbg.h> 17#include <asm/udbg.h>
18#include <asm/commproc.h>
19#include <asm/cpm1.h> 18#include <asm/cpm1.h>
20 19
21#include "mpc8xx.h" 20#include "mpc8xx.h"
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index fdce10c4f074..045b8c80eeaf 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -24,6 +24,7 @@ config PPC_83xx
24 select MPC83xx 24 select MPC83xx
25 select IPIC 25 select IPIC
26 select WANT_DEVICE_TREE 26 select WANT_DEVICE_TREE
27 select FSL_EMB_PERFMON
27 28
28config PPC_86xx 29config PPC_86xx
29 bool "Freescale 86xx" 30 bool "Freescale 86xx"
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 7fc41104d53e..eea2e7049fed 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -94,6 +94,7 @@ config 8xx
94 bool 94 bool
95 95
96config E500 96config E500
97 select FSL_EMB_PERFMON
97 bool 98 bool
98 99
99config PPC_FPU 100config PPC_FPU
@@ -115,6 +116,9 @@ config FSL_BOOKE
115 depends on E200 || E500 116 depends on E200 || E500
116 default y 117 default y
117 118
119config FSL_EMB_PERFMON
120 bool
121
118config PTE_64BIT 122config PTE_64BIT
119 bool 123 bool
120 depends on 44x || E500 124 depends on 44x || E500
diff --git a/arch/powerpc/platforms/embedded6xx/storcenter.c b/arch/powerpc/platforms/embedded6xx/storcenter.c
index e12e9d298716..8864e4884980 100644
--- a/arch/powerpc/platforms/embedded6xx/storcenter.c
+++ b/arch/powerpc/platforms/embedded6xx/storcenter.c
@@ -132,33 +132,18 @@ static void __init storcenter_init_IRQ(void)
132 132
133 paddr = (phys_addr_t)of_translate_address(dnp, prop); 133 paddr = (phys_addr_t)of_translate_address(dnp, prop);
134 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET, 134 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
135 4, 32, " EPIC "); 135 16, 32, " OpenPIC ");
136 136
137 of_node_put(dnp); 137 of_node_put(dnp);
138 138
139 BUG_ON(mpic == NULL); 139 BUG_ON(mpic == NULL);
140 140
141 /* PCI IRQs */
142 /* 141 /*
143 * 2.6.12 patch: 142 * 16 Serial Interrupts followed by 16 Internal Interrupts.
144 * openpic_set_sources(0, 5, OpenPIC_Addr + 0x10200); 143 * I2C is the second internal, so it is at 17, 0x11020.
145 * openpic_set_sources(5, 2, OpenPIC_Addr + 0x11120);
146 * first_irq, num_irqs, __iomem first_ISR
147 * o_ss: i, src: 0, fdf50200
148 * o_ss: i, src: 1, fdf50220
149 * o_ss: i, src: 2, fdf50240
150 * o_ss: i, src: 3, fdf50260
151 * o_ss: i, src: 4, fdf50280
152 * o_ss: i, src: 5, fdf51120
153 * o_ss: i, src: 6, fdf51140
154 */ 144 */
155 mpic_assign_isu(mpic, 0, paddr + 0x10200); 145 mpic_assign_isu(mpic, 0, paddr + 0x10200);
156 mpic_assign_isu(mpic, 1, paddr + 0x10220); 146 mpic_assign_isu(mpic, 1, paddr + 0x11000);
157 mpic_assign_isu(mpic, 2, paddr + 0x10240);
158 mpic_assign_isu(mpic, 3, paddr + 0x10260);
159 mpic_assign_isu(mpic, 4, paddr + 0x10280);
160 mpic_assign_isu(mpic, 5, paddr + 0x11120);
161 mpic_assign_isu(mpic, 6, paddr + 0x11140);
162 147
163 mpic_init(mpic); 148 mpic_init(mpic);
164} 149}
@@ -178,7 +163,7 @@ static int __init storcenter_probe(void)
178{ 163{
179 unsigned long root = of_get_flat_dt_root(); 164 unsigned long root = of_get_flat_dt_root();
180 165
181 return of_flat_dt_is_compatible(root, "storcenter"); 166 return of_flat_dt_is_compatible(root, "iomega,storcenter");
182} 167}
183 168
184define_machine(storcenter){ 169define_machine(storcenter){
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index e48b20e934ca..2c5388ce902a 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1342,7 +1342,7 @@ static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
1342 if (ret) 1342 if (ret)
1343 goto unreg; 1343 goto unreg;
1344 1344
1345 ret = platform_device_register(pdev); 1345 ret = platform_device_add(pdev);
1346 if (ret) 1346 if (ret)
1347 goto unreg; 1347 goto unreg;
1348 1348
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 5ef844da9355..6efbd5e5bb1b 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -66,7 +66,7 @@ phys_addr_t get_qe_base(void)
66{ 66{
67 struct device_node *qe; 67 struct device_node *qe;
68 unsigned int size; 68 unsigned int size;
69 const void *prop; 69 const u32 *prop;
70 70
71 if (qebase != -1) 71 if (qebase != -1)
72 return qebase; 72 return qebase;
@@ -79,7 +79,8 @@ phys_addr_t get_qe_base(void)
79 } 79 }
80 80
81 prop = of_get_property(qe, "reg", &size); 81 prop = of_get_property(qe, "reg", &size);
82 qebase = of_translate_address(qe, prop); 82 if (prop && size >= sizeof(*prop))
83 qebase = of_translate_address(qe, prop);
83 of_node_put(qe); 84 of_node_put(qe);
84 85
85 return qebase; 86 return qebase;
@@ -172,10 +173,9 @@ unsigned int get_brg_clk(void)
172 } 173 }
173 174
174 prop = of_get_property(qe, "brg-frequency", &size); 175 prop = of_get_property(qe, "brg-frequency", &size);
175 if (!prop || size != sizeof(*prop)) 176 if (prop && size == sizeof(*prop))
176 return brg_clk; 177 brg_clk = *prop;
177 178
178 brg_clk = *prop;
179 of_node_put(qe); 179 of_node_put(qe);
180 180
181 return brg_clk; 181 return brg_clk;
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 7d170cd381c3..9cc25fd80b60 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1737,10 +1737,8 @@ config SC92031
1737 1737
1738config CPMAC 1738config CPMAC
1739 tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)" 1739 tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
1740 depends on NET_ETHERNET && EXPERIMENTAL && AR7 1740 depends on NET_ETHERNET && EXPERIMENTAL && AR7 && BROKEN
1741 select PHYLIB 1741 select PHYLIB
1742 select FIXED_PHY
1743 select FIXED_MII_100_FDX
1744 help 1742 help
1745 TI AR7 CPMAC Ethernet support 1743 TI AR7 CPMAC Ethernet support
1746 1744
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 6ccebb830ff9..c85194f2cd2d 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -845,15 +845,6 @@ static void cpmac_adjust_link(struct net_device *dev)
845 spin_unlock(&priv->lock); 845 spin_unlock(&priv->lock);
846} 846}
847 847
848static int cpmac_link_update(struct net_device *dev,
849 struct fixed_phy_status *status)
850{
851 status->link = 1;
852 status->speed = 100;
853 status->duplex = 1;
854 return 0;
855}
856
857static int cpmac_open(struct net_device *dev) 848static int cpmac_open(struct net_device *dev)
858{ 849{
859 int i, size, res; 850 int i, size, res;
@@ -996,11 +987,11 @@ static int external_switch;
996static int __devinit cpmac_probe(struct platform_device *pdev) 987static int __devinit cpmac_probe(struct platform_device *pdev)
997{ 988{
998 int rc, phy_id, i; 989 int rc, phy_id, i;
990 int mdio_bus_id = cpmac_mii.id;
999 struct resource *mem; 991 struct resource *mem;
1000 struct cpmac_priv *priv; 992 struct cpmac_priv *priv;
1001 struct net_device *dev; 993 struct net_device *dev;
1002 struct plat_cpmac_data *pdata; 994 struct plat_cpmac_data *pdata;
1003 struct fixed_info *fixed_phy;
1004 DECLARE_MAC_BUF(mac); 995 DECLARE_MAC_BUF(mac);
1005 996
1006 pdata = pdev->dev.platform_data; 997 pdata = pdev->dev.platform_data;
@@ -1014,9 +1005,23 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1014 } 1005 }
1015 1006
1016 if (phy_id == PHY_MAX_ADDR) { 1007 if (phy_id == PHY_MAX_ADDR) {
1017 if (external_switch || dumb_switch) 1008 if (external_switch || dumb_switch) {
1009 struct fixed_phy_status status = {};
1010
1011 mdio_bus_id = 0;
1012
1013 /*
1014 * FIXME: this should be in the platform code!
1015 * Since there is not platform code at all (that is,
1016 * no mainline users of that driver), place it here
1017 * for now.
1018 */
1018 phy_id = 0; 1019 phy_id = 0;
1019 else { 1020 status.link = 1;
1021 status.duplex = 1;
1022 status.speed = 100;
1023 fixed_phy_add(PHY_POLL, phy_id, &status);
1024 } else {
1020 printk(KERN_ERR "cpmac: no PHY present\n"); 1025 printk(KERN_ERR "cpmac: no PHY present\n");
1021 return -ENODEV; 1026 return -ENODEV;
1022 } 1027 }
@@ -1060,32 +1065,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1060 priv->msg_enable = netif_msg_init(debug_level, 0xff); 1065 priv->msg_enable = netif_msg_init(debug_level, 0xff);
1061 memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr)); 1066 memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
1062 1067
1063 if (phy_id == 31) { 1068 snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
1064 snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, cpmac_mii.id,
1065 phy_id);
1066 } else {
1067 /* Let's try to get a free fixed phy... */
1068 for (i = 0; i < MAX_PHY_AMNT; i++) {
1069 fixed_phy = fixed_mdio_get_phydev(i);
1070 if (!fixed_phy)
1071 continue;
1072 if (!fixed_phy->phydev->attached_dev) {
1073 strncpy(priv->phy_name,
1074 fixed_phy->phydev->dev.bus_id,
1075 BUS_ID_SIZE);
1076 fixed_mdio_set_link_update(fixed_phy->phydev,
1077 &cpmac_link_update);
1078 goto phy_found;
1079 }
1080 }
1081 if (netif_msg_drv(priv))
1082 printk(KERN_ERR "%s: Could not find fixed PHY\n",
1083 dev->name);
1084 rc = -ENODEV;
1085 goto fail;
1086 }
1087 1069
1088phy_found:
1089 priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0, 1070 priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
1090 PHY_INTERFACE_MODE_MII); 1071 PHY_INTERFACE_MODE_MII);
1091 if (IS_ERR(priv->phy)) { 1072 if (IS_ERR(priv->phy)) {
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 528ef183c221..1e79673b7316 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -46,7 +46,7 @@ enum powerpc_oprofile_type {
46 PPC_OPROFILE_RS64 = 1, 46 PPC_OPROFILE_RS64 = 1,
47 PPC_OPROFILE_POWER4 = 2, 47 PPC_OPROFILE_POWER4 = 2,
48 PPC_OPROFILE_G4 = 3, 48 PPC_OPROFILE_G4 = 3,
49 PPC_OPROFILE_BOOKE = 4, 49 PPC_OPROFILE_FSL_EMB = 4,
50 PPC_OPROFILE_CELL = 5, 50 PPC_OPROFILE_CELL = 5,
51 PPC_OPROFILE_PA6T = 6, 51 PPC_OPROFILE_PA6T = 6,
52}; 52};
diff --git a/include/asm-powerpc/oprofile_impl.h b/include/asm-powerpc/oprofile_impl.h
index 938fefb4c4bc..95035c602ba6 100644
--- a/include/asm-powerpc/oprofile_impl.h
+++ b/include/asm-powerpc/oprofile_impl.h
@@ -54,7 +54,7 @@ struct op_powerpc_model {
54 int num_counters; 54 int num_counters;
55}; 55};
56 56
57extern struct op_powerpc_model op_model_fsl_booke; 57extern struct op_powerpc_model op_model_fsl_emb;
58extern struct op_powerpc_model op_model_rs64; 58extern struct op_powerpc_model op_model_rs64;
59extern struct op_powerpc_model op_model_power4; 59extern struct op_powerpc_model op_model_power4;
60extern struct op_powerpc_model op_model_7450; 60extern struct op_powerpc_model op_model_7450;
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index 2408a29507e5..0d6238987df8 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -18,6 +18,10 @@
18#include <asm/reg_booke.h> 18#include <asm/reg_booke.h>
19#endif /* CONFIG_BOOKE || CONFIG_40x */ 19#endif /* CONFIG_BOOKE || CONFIG_40x */
20 20
21#ifdef CONFIG_FSL_EMB_PERFMON
22#include <asm/reg_fsl_emb.h>
23#endif
24
21#ifdef CONFIG_8xx 25#ifdef CONFIG_8xx
22#include <asm/reg_8xx.h> 26#include <asm/reg_8xx.h>
23#endif /* CONFIG_8xx */ 27#endif /* CONFIG_8xx */
diff --git a/include/asm-powerpc/reg_booke.h b/include/asm-powerpc/reg_booke.h
index 0405ef479814..cf54a3f31753 100644
--- a/include/asm-powerpc/reg_booke.h
+++ b/include/asm-powerpc/reg_booke.h
@@ -9,68 +9,6 @@
9#ifndef __ASM_POWERPC_REG_BOOKE_H__ 9#ifndef __ASM_POWERPC_REG_BOOKE_H__
10#define __ASM_POWERPC_REG_BOOKE_H__ 10#define __ASM_POWERPC_REG_BOOKE_H__
11 11
12#ifndef __ASSEMBLY__
13/* Performance Monitor Registers */
14#define mfpmr(rn) ({unsigned int rval; \
15 asm volatile("mfpmr %0," __stringify(rn) \
16 : "=r" (rval)); rval;})
17#define mtpmr(rn, v) asm volatile("mtpmr " __stringify(rn) ",%0" : : "r" (v))
18#endif /* __ASSEMBLY__ */
19
20/* Freescale Book E Performance Monitor APU Registers */
21#define PMRN_PMC0 0x010 /* Performance Monitor Counter 0 */
22#define PMRN_PMC1 0x011 /* Performance Monitor Counter 1 */
23#define PMRN_PMC2 0x012 /* Performance Monitor Counter 1 */
24#define PMRN_PMC3 0x013 /* Performance Monitor Counter 1 */
25#define PMRN_PMLCA0 0x090 /* PM Local Control A0 */
26#define PMRN_PMLCA1 0x091 /* PM Local Control A1 */
27#define PMRN_PMLCA2 0x092 /* PM Local Control A2 */
28#define PMRN_PMLCA3 0x093 /* PM Local Control A3 */
29
30#define PMLCA_FC 0x80000000 /* Freeze Counter */
31#define PMLCA_FCS 0x40000000 /* Freeze in Supervisor */
32#define PMLCA_FCU 0x20000000 /* Freeze in User */
33#define PMLCA_FCM1 0x10000000 /* Freeze when PMM==1 */
34#define PMLCA_FCM0 0x08000000 /* Freeze when PMM==0 */
35#define PMLCA_CE 0x04000000 /* Condition Enable */
36
37#define PMLCA_EVENT_MASK 0x007f0000 /* Event field */
38#define PMLCA_EVENT_SHIFT 16
39
40#define PMRN_PMLCB0 0x110 /* PM Local Control B0 */
41#define PMRN_PMLCB1 0x111 /* PM Local Control B1 */
42#define PMRN_PMLCB2 0x112 /* PM Local Control B2 */
43#define PMRN_PMLCB3 0x113 /* PM Local Control B3 */
44
45#define PMLCB_THRESHMUL_MASK 0x0700 /* Threshhold Multiple Field */
46#define PMLCB_THRESHMUL_SHIFT 8
47
48#define PMLCB_THRESHOLD_MASK 0x003f /* Threshold Field */
49#define PMLCB_THRESHOLD_SHIFT 0
50
51#define PMRN_PMGC0 0x190 /* PM Global Control 0 */
52
53#define PMGC0_FAC 0x80000000 /* Freeze all Counters */
54#define PMGC0_PMIE 0x40000000 /* Interrupt Enable */
55#define PMGC0_FCECE 0x20000000 /* Freeze countes on
56 Enabled Condition or
57 Event */
58
59#define PMRN_UPMC0 0x000 /* User Performance Monitor Counter 0 */
60#define PMRN_UPMC1 0x001 /* User Performance Monitor Counter 1 */
61#define PMRN_UPMC2 0x002 /* User Performance Monitor Counter 1 */
62#define PMRN_UPMC3 0x003 /* User Performance Monitor Counter 1 */
63#define PMRN_UPMLCA0 0x080 /* User PM Local Control A0 */
64#define PMRN_UPMLCA1 0x081 /* User PM Local Control A1 */
65#define PMRN_UPMLCA2 0x082 /* User PM Local Control A2 */
66#define PMRN_UPMLCA3 0x083 /* User PM Local Control A3 */
67#define PMRN_UPMLCB0 0x100 /* User PM Local Control B0 */
68#define PMRN_UPMLCB1 0x101 /* User PM Local Control B1 */
69#define PMRN_UPMLCB2 0x102 /* User PM Local Control B2 */
70#define PMRN_UPMLCB3 0x103 /* User PM Local Control B3 */
71#define PMRN_UPMGC0 0x180 /* User PM Global Control 0 */
72
73
74/* Machine State Register (MSR) Fields */ 12/* Machine State Register (MSR) Fields */
75#define MSR_UCLE (1<<26) /* User-mode cache lock enable */ 13#define MSR_UCLE (1<<26) /* User-mode cache lock enable */
76#define MSR_SPE (1<<25) /* Enable SPE */ 14#define MSR_SPE (1<<25) /* Enable SPE */
diff --git a/include/asm-powerpc/reg_fsl_emb.h b/include/asm-powerpc/reg_fsl_emb.h
new file mode 100644
index 000000000000..1e180a594589
--- /dev/null
+++ b/include/asm-powerpc/reg_fsl_emb.h
@@ -0,0 +1,72 @@
1/*
2 * Contains register definitions for the Freescale Embedded Performance
3 * Monitor.
4 */
5#ifdef __KERNEL__
6#ifndef __ASM_POWERPC_REG_FSL_EMB_H__
7#define __ASM_POWERPC_REG_FSL_EMB_H__
8
9#ifndef __ASSEMBLY__
10/* Performance Monitor Registers */
11#define mfpmr(rn) ({unsigned int rval; \
12 asm volatile("mfpmr %0," __stringify(rn) \
13 : "=r" (rval)); rval;})
14#define mtpmr(rn, v) asm volatile("mtpmr " __stringify(rn) ",%0" : : "r" (v))
15#endif /* __ASSEMBLY__ */
16
17/* Freescale Book E Performance Monitor APU Registers */
18#define PMRN_PMC0 0x010 /* Performance Monitor Counter 0 */
19#define PMRN_PMC1 0x011 /* Performance Monitor Counter 1 */
20#define PMRN_PMC2 0x012 /* Performance Monitor Counter 1 */
21#define PMRN_PMC3 0x013 /* Performance Monitor Counter 1 */
22#define PMRN_PMLCA0 0x090 /* PM Local Control A0 */
23#define PMRN_PMLCA1 0x091 /* PM Local Control A1 */
24#define PMRN_PMLCA2 0x092 /* PM Local Control A2 */
25#define PMRN_PMLCA3 0x093 /* PM Local Control A3 */
26
27#define PMLCA_FC 0x80000000 /* Freeze Counter */
28#define PMLCA_FCS 0x40000000 /* Freeze in Supervisor */
29#define PMLCA_FCU 0x20000000 /* Freeze in User */
30#define PMLCA_FCM1 0x10000000 /* Freeze when PMM==1 */
31#define PMLCA_FCM0 0x08000000 /* Freeze when PMM==0 */
32#define PMLCA_CE 0x04000000 /* Condition Enable */
33
34#define PMLCA_EVENT_MASK 0x007f0000 /* Event field */
35#define PMLCA_EVENT_SHIFT 16
36
37#define PMRN_PMLCB0 0x110 /* PM Local Control B0 */
38#define PMRN_PMLCB1 0x111 /* PM Local Control B1 */
39#define PMRN_PMLCB2 0x112 /* PM Local Control B2 */
40#define PMRN_PMLCB3 0x113 /* PM Local Control B3 */
41
42#define PMLCB_THRESHMUL_MASK 0x0700 /* Threshhold Multiple Field */
43#define PMLCB_THRESHMUL_SHIFT 8
44
45#define PMLCB_THRESHOLD_MASK 0x003f /* Threshold Field */
46#define PMLCB_THRESHOLD_SHIFT 0
47
48#define PMRN_PMGC0 0x190 /* PM Global Control 0 */
49
50#define PMGC0_FAC 0x80000000 /* Freeze all Counters */
51#define PMGC0_PMIE 0x40000000 /* Interrupt Enable */
52#define PMGC0_FCECE 0x20000000 /* Freeze countes on
53 Enabled Condition or
54 Event */
55
56#define PMRN_UPMC0 0x000 /* User Performance Monitor Counter 0 */
57#define PMRN_UPMC1 0x001 /* User Performance Monitor Counter 1 */
58#define PMRN_UPMC2 0x002 /* User Performance Monitor Counter 1 */
59#define PMRN_UPMC3 0x003 /* User Performance Monitor Counter 1 */
60#define PMRN_UPMLCA0 0x080 /* User PM Local Control A0 */
61#define PMRN_UPMLCA1 0x081 /* User PM Local Control A1 */
62#define PMRN_UPMLCA2 0x082 /* User PM Local Control A2 */
63#define PMRN_UPMLCA3 0x083 /* User PM Local Control A3 */
64#define PMRN_UPMLCB0 0x100 /* User PM Local Control B0 */
65#define PMRN_UPMLCB1 0x101 /* User PM Local Control B1 */
66#define PMRN_UPMLCB2 0x102 /* User PM Local Control B2 */
67#define PMRN_UPMLCB3 0x103 /* User PM Local Control B3 */
68#define PMRN_UPMGC0 0x180 /* User PM Global Control 0 */
69
70
71#endif /* __ASM_POWERPC_REG_FSL_EMB_H__ */
72#endif /* __KERNEL__ */