* [PATCH 1/8] powerpc: prpmc2800 - Convert dts file to v1
From: Mark A. Greer @ 2007-12-11 0:37 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
Convert the prpmc2800.dts file to dts-v1. Basically, this means
converting the numeric constants to be 'C'-like (e.g., hexadecimal
numbers start with '0x').
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
arch/powerpc/boot/dts/prpmc2800.dts | 188 +++++++++++++-------------
1 file changed, 96 insertions(+), 92 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 24944ca..15247a4 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -11,6 +11,8 @@
* if it can determine the exact PrPMC type.
*/
+/dts-v1/;
+
/ {
#address-cells = <1>;
#size-cells = <1>;
@@ -25,64 +27,64 @@
PowerPC,7447 {
device_type = "cpu";
reg = <0>;
- clock-frequency = <2bb0b140>; /* Default (733 MHz) */
- bus-frequency = <7f28155>; /* 133.333333 MHz */
- timebase-frequency = <1fca055>; /* 33.333333 MHz */
- i-cache-line-size = <20>;
- d-cache-line-size = <20>;
- i-cache-size = <8000>;
- d-cache-size = <8000>;
+ clock-frequency = <733333333>; /* Default */
+ bus-frequency = <133333333>;
+ timebase-frequency = <33333333>;
+ i-cache-line-size = <0x20>;
+ d-cache-line-size = <0x20>;
+ i-cache-size = <0x8000>;
+ d-cache-size = <0x8000>;
};
};
memory {
device_type = "memory";
- reg = <00000000 20000000>; /* Default (512MB) */
+ reg = <0x00000000 0x20000000>; /* Default (512MB) */
};
mv64x60@f1000000 { /* Marvell Discovery */
#address-cells = <1>;
#size-cells = <1>;
model = "mv64360"; /* Default */
- compatible = "marvell,mv64x60";
- clock-frequency = <7f28155>; /* 133.333333 MHz */
- reg = <f1000000 00010000>;
- virtual-reg = <f1000000>;
- ranges = <88000000 88000000 01000000 /* PCI 0 I/O Space */
- 80000000 80000000 08000000 /* PCI 0 MEM Space */
- a0000000 a0000000 04000000 /* User FLASH */
- 00000000 f1000000 00010000 /* Bridge's regs */
- f2000000 f2000000 00040000>; /* Integrated SRAM */
+ compatible = "marvell,mv64360";
+ clock-frequency = <133333333>;
+ reg = <0xf1000000 0x00010000>;
+ virtual-reg = <0xf1000000>;
+ ranges = <0x88000000 0x88000000 0x01000000 /* PCI 0 I/O Space */
+ 0x80000000 0x80000000 0x08000000 /* PCI 0 MEM Space */
+ 0xa0000000 0xa0000000 0x04000000 /* User FLASH */
+ 0x00000000 0xf1000000 0x00010000 /* Bridge's regs */
+ 0xf2000000 0xf2000000 0x00040000>;/* Integrated SRAM*/
flash@a0000000 {
compatible = "cfi-flash";
- reg = <a0000000 04000000>;
+ reg = <0xa0000000 0x04000000>;
bank-width = <4>;
device-width = <2>;
#address-cells = <1>;
#size-cells = <1>;
fw@0 {
label = "FW Image A";
- reg = <00000000 00100000>;
+ reg = <0x00000000 0x00100000>;
read-only;
};
cfg@100000 {
label = "FW Config Data"; /* RW */
- reg = <00100000 00040000>;
+ reg = <0x00100000 0x00040000>;
};
kernel@140000 {
label = "Kernel Image";
- reg = <00140000 00400000>;
+ reg = <0x00140000 0x00400000>;
read-only;
};
fs@540000 {
label = "Filesystem";
- reg = <00540000 039c0000>;
+ reg = <0x00540000 0x039c0000>;
read-only;
};
fw@3f00000 {
label = "FW Image B";
- reg = <03f00000 00100000>;
+ reg = <0x03f00000 0x00100000>;
read-only;
};
};
@@ -95,26 +97,26 @@
ethernet-phy@1 {
device_type = "ethernet-phy";
compatible = "broadcom,bcm5421";
- interrupts = <4c>; /* GPP 12 */
+ interrupts = <76>; /* GPP 12 */
interrupt-parent = <&/mv64x60/pic>;
reg = <1>;
};
ethernet-phy@3 {
device_type = "ethernet-phy";
compatible = "broadcom,bcm5421";
- interrupts = <4c>; /* GPP 12 */
+ interrupts = <76>; /* GPP 12 */
interrupt-parent = <&/mv64x60/pic>;
reg = <3>;
};
};
ethernet@2000 {
- reg = <2000 2000>;
+ reg = <0x2000 0x2000>;
eth0 {
device_type = "network";
compatible = "marvell,mv64x60-eth";
block-index = <0>;
- interrupts = <20>;
+ interrupts = <32>;
interrupt-parent = <&/mv64x60/pic>;
phy = <&/mv64x60/mdio/ethernet-phy@1>;
local-mac-address = [ 00 00 00 00 00 00 ];
@@ -123,7 +125,7 @@
device_type = "network";
compatible = "marvell,mv64x60-eth";
block-index = <1>;
- interrupts = <21>;
+ interrupts = <33>;
interrupt-parent = <&/mv64x60/pic>;
phy = <&/mv64x60/mdio/ethernet-phy@3>;
local-mac-address = [ 00 00 00 00 00 00 ];
@@ -133,110 +135,110 @@
sdma@4000 {
device_type = "dma";
compatible = "marvell,mv64x60-sdma";
- reg = <4000 c18>;
- virtual-reg = <f1004000>;
+ reg = <0x4000 0xc18>;
+ virtual-reg = <0xf1004000>;
interrupt-base = <0>;
- interrupts = <24>;
+ interrupts = <36>;
interrupt-parent = <&/mv64x60/pic>;
};
sdma@6000 {
device_type = "dma";
compatible = "marvell,mv64x60-sdma";
- reg = <6000 c18>;
- virtual-reg = <f1006000>;
+ reg = <0x6000 0xc18>;
+ virtual-reg = <0xf1006000>;
interrupt-base = <0>;
- interrupts = <26>;
+ interrupts = <38>;
interrupt-parent = <&/mv64x60/pic>;
};
brg@b200 {
compatible = "marvell,mv64x60-brg";
- reg = <b200 8>;
+ reg = <0xb200 0x8>;
clock-src = <8>;
- clock-frequency = <7ed6b40>;
- current-speed = <2580>;
+ clock-frequency = <133000000>;
+ current-speed = <9600>;
bcr = <0>;
};
brg@b208 {
compatible = "marvell,mv64x60-brg";
- reg = <b208 8>;
+ reg = <0xb208 0x8>;
clock-src = <8>;
- clock-frequency = <7ed6b40>;
- current-speed = <2580>;
+ clock-frequency = <133000000>;
+ current-speed = <9600>;
bcr = <0>;
};
cunit@f200 {
- reg = <f200 200>;
+ reg = <0xf200 0x200>;
};
mpscrouting@b400 {
- reg = <b400 c>;
+ reg = <0xb400 0xc>;
};
mpscintr@b800 {
- reg = <b800 100>;
- virtual-reg = <f100b800>;
+ reg = <0xb800 0x100>;
+ virtual-reg = <0xf100b800>;
};
mpsc@8000 {
device_type = "serial";
compatible = "marvell,mpsc";
- reg = <8000 38>;
- virtual-reg = <f1008000>;
+ reg = <0x8000 0x38>;
+ virtual-reg = <0xf1008000>;
sdma = <&/mv64x60/sdma@4000>;
brg = <&/mv64x60/brg@b200>;
cunit = <&/mv64x60/cunit@f200>;
mpscrouting = <&/mv64x60/mpscrouting@b400>;
mpscintr = <&/mv64x60/mpscintr@b800>;
block-index = <0>;
- max_idle = <28>;
+ max_idle = <40>;
chr_1 = <0>;
chr_2 = <0>;
chr_10 = <3>;
mpcr = <0>;
- interrupts = <28>;
+ interrupts = <40>;
interrupt-parent = <&/mv64x60/pic>;
};
mpsc@9000 {
device_type = "serial";
compatible = "marvell,mpsc";
- reg = <9000 38>;
- virtual-reg = <f1009000>;
+ reg = <0x9000 0x38>;
+ virtual-reg = <0xf1009000>;
sdma = <&/mv64x60/sdma@6000>;
brg = <&/mv64x60/brg@b208>;
cunit = <&/mv64x60/cunit@f200>;
mpscrouting = <&/mv64x60/mpscrouting@b400>;
mpscintr = <&/mv64x60/mpscintr@b800>;
block-index = <1>;
- max_idle = <28>;
+ max_idle = <40>;
chr_1 = <0>;
chr_2 = <0>;
chr_10 = <3>;
mpcr = <0>;
- interrupts = <2a>;
+ interrupts = <42>;
interrupt-parent = <&/mv64x60/pic>;
};
wdt@b410 { /* watchdog timer */
compatible = "marvell,mv64x60-wdt";
- reg = <b410 8>;
- timeout = <a>; /* wdt timeout in seconds */
+ reg = <0xb410 0x8>;
+ timeout = <10>; /* wdt timeout in seconds */
};
i2c@c000 {
device_type = "i2c";
compatible = "marvell,mv64x60-i2c";
- reg = <c000 20>;
- virtual-reg = <f100c000>;
+ reg = <0xc000 0x20>;
+ virtual-reg = <0xf100c000>;
freq_m = <8>;
freq_n = <3>;
- timeout = <3e8>; /* 1000 = 1 second */
+ timeout = <1000>; /* 1000 = 1 second */
retries = <1>;
- interrupts = <25>;
+ interrupts = <37>;
interrupt-parent = <&/mv64x60/pic>;
};
@@ -244,18 +246,18 @@
#interrupt-cells = <1>;
#address-cells = <0>;
compatible = "marvell,mv64x60-pic";
- reg = <0000 88>;
+ reg = <0x0000 0x88>;
interrupt-controller;
};
mpp@f000 {
compatible = "marvell,mv64x60-mpp";
- reg = <f000 10>;
+ reg = <0xf000 0x10>;
};
gpp@f100 {
compatible = "marvell,mv64x60-gpp";
- reg = <f100 20>;
+ reg = <0xf100 0x20>;
};
pci@80000000 {
@@ -264,66 +266,68 @@
#interrupt-cells = <1>;
device_type = "pci";
compatible = "marvell,mv64x60-pci";
- reg = <0cf8 8>;
- ranges = <01000000 0 0 88000000 0 01000000
- 02000000 0 80000000 80000000 0 08000000>;
- bus-range = <0 ff>;
- clock-frequency = <3EF1480>;
- interrupt-pci-iack = <0c34>;
+ reg = <0x0cf8 0x8>;
+ ranges = <0x01000000 0x0 0x0
+ 0x88000000 0x0 0x01000000
+ 0x02000000 0x0 0x80000000
+ 0x80000000 0x0 0x08000000>;
+ bus-range = <0x0 0xff>;
+ clock-frequency = <66000000>;
+ interrupt-pci-iack = <0x0c34>;
interrupt-parent = <&/mv64x60/pic>;
- interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <
/* IDSEL 0x0a */
- 5000 0 0 1 &/mv64x60/pic 50
- 5000 0 0 2 &/mv64x60/pic 51
- 5000 0 0 3 &/mv64x60/pic 5b
- 5000 0 0 4 &/mv64x60/pic 5d
+ 0x5000 0 0 1 &/mv64x60/pic 80
+ 0x5000 0 0 2 &/mv64x60/pic 81
+ 0x5000 0 0 3 &/mv64x60/pic 91
+ 0x5000 0 0 4 &/mv64x60/pic 93
/* IDSEL 0x0b */
- 5800 0 0 1 &/mv64x60/pic 5b
- 5800 0 0 2 &/mv64x60/pic 5d
- 5800 0 0 3 &/mv64x60/pic 50
- 5800 0 0 4 &/mv64x60/pic 51
+ 0x5800 0 0 1 &/mv64x60/pic 91
+ 0x5800 0 0 2 &/mv64x60/pic 93
+ 0x5800 0 0 3 &/mv64x60/pic 80
+ 0x5800 0 0 4 &/mv64x60/pic 81
/* IDSEL 0x0c */
- 6000 0 0 1 &/mv64x60/pic 5b
- 6000 0 0 2 &/mv64x60/pic 5d
- 6000 0 0 3 &/mv64x60/pic 50
- 6000 0 0 4 &/mv64x60/pic 51
+ 0x6000 0 0 1 &/mv64x60/pic 91
+ 0x6000 0 0 2 &/mv64x60/pic 93
+ 0x6000 0 0 3 &/mv64x60/pic 80
+ 0x6000 0 0 4 &/mv64x60/pic 81
/* IDSEL 0x0d */
- 6800 0 0 1 &/mv64x60/pic 5d
- 6800 0 0 2 &/mv64x60/pic 50
- 6800 0 0 3 &/mv64x60/pic 51
- 6800 0 0 4 &/mv64x60/pic 5b
+ 0x6800 0 0 1 &/mv64x60/pic 93
+ 0x6800 0 0 2 &/mv64x60/pic 80
+ 0x6800 0 0 3 &/mv64x60/pic 81
+ 0x6800 0 0 4 &/mv64x60/pic 91
>;
};
cpu-error@0070 {
compatible = "marvell,mv64x60-cpu-error";
- reg = <0070 10 0128 28>;
- interrupts = <03>;
+ reg = <0x0070 0x10 0x0128 0x28>;
+ interrupts = <3>;
interrupt-parent = <&/mv64x60/pic>;
};
sram-ctrl@0380 {
compatible = "marvell,mv64x60-sram-ctrl";
- reg = <0380 80>;
- interrupts = <0d>;
+ reg = <0x0380 0x80>;
+ interrupts = <13>;
interrupt-parent = <&/mv64x60/pic>;
};
pci-error@1d40 {
compatible = "marvell,mv64x60-pci-error";
- reg = <1d40 40 0c28 4>;
- interrupts = <0c>;
+ reg = <0x1d40 0x40 0x0c28 0x4>;
+ interrupts = <12>;
interrupt-parent = <&/mv64x60/pic>;
};
mem-ctrl@1400 {
compatible = "marvell,mv64x60-mem-ctrl";
- reg = <1400 60>;
- interrupts = <11>;
+ reg = <0x1400 0x60>;
+ interrupts = <17>;
interrupt-parent = <&/mv64x60/pic>;
};
};
^ permalink raw reply related
* [PATCH 2/8] powerpc: prpmc2800 - Add labels to dts file
From: Mark A. Greer @ 2007-12-11 0:37 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
Add & use labels for dts nodes that are referenced in the prpmc2800.dts
file to improve readability.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
arch/powerpc/boot/dts/prpmc2800.dts | 104 +++++++++++++-------------
1 file changed, 52 insertions(+), 52 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 15247a4..1657ee6 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -94,18 +94,18 @@
#size-cells = <0>;
device_type = "mdio";
compatible = "marvell,mv64x60-mdio";
- ethernet-phy@1 {
+ PHY0: ethernet-phy@1 {
device_type = "ethernet-phy";
compatible = "broadcom,bcm5421";
interrupts = <76>; /* GPP 12 */
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
reg = <1>;
};
- ethernet-phy@3 {
+ PHY1: ethernet-phy@3 {
device_type = "ethernet-phy";
compatible = "broadcom,bcm5421";
interrupts = <76>; /* GPP 12 */
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
reg = <3>;
};
};
@@ -117,8 +117,8 @@
compatible = "marvell,mv64x60-eth";
block-index = <0>;
interrupts = <32>;
- interrupt-parent = <&/mv64x60/pic>;
- phy = <&/mv64x60/mdio/ethernet-phy@1>;
+ interrupt-parent = <&PIC>;
+ phy = <&PHY0>;
local-mac-address = [ 00 00 00 00 00 00 ];
};
eth1 {
@@ -126,33 +126,33 @@
compatible = "marvell,mv64x60-eth";
block-index = <1>;
interrupts = <33>;
- interrupt-parent = <&/mv64x60/pic>;
- phy = <&/mv64x60/mdio/ethernet-phy@3>;
+ interrupt-parent = <&PIC>;
+ phy = <&PHY1>;
local-mac-address = [ 00 00 00 00 00 00 ];
};
};
- sdma@4000 {
+ SDMA0: sdma@4000 {
device_type = "dma";
compatible = "marvell,mv64x60-sdma";
reg = <0x4000 0xc18>;
virtual-reg = <0xf1004000>;
interrupt-base = <0>;
interrupts = <36>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
- sdma@6000 {
+ SDMA1: sdma@6000 {
device_type = "dma";
compatible = "marvell,mv64x60-sdma";
reg = <0x6000 0xc18>;
virtual-reg = <0xf1006000>;
interrupt-base = <0>;
interrupts = <38>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
- brg@b200 {
+ BRG0: brg@b200 {
compatible = "marvell,mv64x60-brg";
reg = <0xb200 0x8>;
clock-src = <8>;
@@ -161,7 +161,7 @@
bcr = <0>;
};
- brg@b208 {
+ BRG1: brg@b208 {
compatible = "marvell,mv64x60-brg";
reg = <0xb208 0x8>;
clock-src = <8>;
@@ -170,15 +170,15 @@
bcr = <0>;
};
- cunit@f200 {
+ CUNIT: cunit@f200 {
reg = <0xf200 0x200>;
};
- mpscrouting@b400 {
+ MPSCROUTING: mpscrouting@b400 {
reg = <0xb400 0xc>;
};
- mpscintr@b800 {
+ MPSCINTR: mpscintr@b800 {
reg = <0xb800 0x100>;
virtual-reg = <0xf100b800>;
};
@@ -188,11 +188,11 @@
compatible = "marvell,mpsc";
reg = <0x8000 0x38>;
virtual-reg = <0xf1008000>;
- sdma = <&/mv64x60/sdma@4000>;
- brg = <&/mv64x60/brg@b200>;
- cunit = <&/mv64x60/cunit@f200>;
- mpscrouting = <&/mv64x60/mpscrouting@b400>;
- mpscintr = <&/mv64x60/mpscintr@b800>;
+ sdma = <&SDMA0>;
+ brg = <&BRG0>;
+ cunit = <&CUNIT>;
+ mpscrouting = <&MPSCROUTING>;
+ mpscintr = <&MPSCINTR>;
block-index = <0>;
max_idle = <40>;
chr_1 = <0>;
@@ -200,7 +200,7 @@
chr_10 = <3>;
mpcr = <0>;
interrupts = <40>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
mpsc@9000 {
@@ -208,11 +208,11 @@
compatible = "marvell,mpsc";
reg = <0x9000 0x38>;
virtual-reg = <0xf1009000>;
- sdma = <&/mv64x60/sdma@6000>;
- brg = <&/mv64x60/brg@b208>;
- cunit = <&/mv64x60/cunit@f200>;
- mpscrouting = <&/mv64x60/mpscrouting@b400>;
- mpscintr = <&/mv64x60/mpscintr@b800>;
+ sdma = <&SDMA1>;
+ brg = <&BRG1>;
+ cunit = <&CUNIT>;
+ mpscrouting = <&MPSCROUTING>;
+ mpscintr = <&MPSCINTR>;
block-index = <1>;
max_idle = <40>;
chr_1 = <0>;
@@ -220,7 +220,7 @@
chr_10 = <3>;
mpcr = <0>;
interrupts = <42>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
wdt@b410 { /* watchdog timer */
@@ -239,10 +239,10 @@
timeout = <1000>; /* 1000 = 1 second */
retries = <1>;
interrupts = <37>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
- pic {
+ PIC: pic {
#interrupt-cells = <1>;
#address-cells = <0>;
compatible = "marvell,mv64x60-pic";
@@ -274,32 +274,32 @@
bus-range = <0x0 0xff>;
clock-frequency = <66000000>;
interrupt-pci-iack = <0x0c34>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <
/* IDSEL 0x0a */
- 0x5000 0 0 1 &/mv64x60/pic 80
- 0x5000 0 0 2 &/mv64x60/pic 81
- 0x5000 0 0 3 &/mv64x60/pic 91
- 0x5000 0 0 4 &/mv64x60/pic 93
+ 0x5000 0 0 1 &PIC 80
+ 0x5000 0 0 2 &PIC 81
+ 0x5000 0 0 3 &PIC 91
+ 0x5000 0 0 4 &PIC 93
/* IDSEL 0x0b */
- 0x5800 0 0 1 &/mv64x60/pic 91
- 0x5800 0 0 2 &/mv64x60/pic 93
- 0x5800 0 0 3 &/mv64x60/pic 80
- 0x5800 0 0 4 &/mv64x60/pic 81
+ 0x5800 0 0 1 &PIC 91
+ 0x5800 0 0 2 &PIC 93
+ 0x5800 0 0 3 &PIC 80
+ 0x5800 0 0 4 &PIC 81
/* IDSEL 0x0c */
- 0x6000 0 0 1 &/mv64x60/pic 91
- 0x6000 0 0 2 &/mv64x60/pic 93
- 0x6000 0 0 3 &/mv64x60/pic 80
- 0x6000 0 0 4 &/mv64x60/pic 81
+ 0x6000 0 0 1 &PIC 91
+ 0x6000 0 0 2 &PIC 93
+ 0x6000 0 0 3 &PIC 80
+ 0x6000 0 0 4 &PIC 81
/* IDSEL 0x0d */
- 0x6800 0 0 1 &/mv64x60/pic 93
- 0x6800 0 0 2 &/mv64x60/pic 80
- 0x6800 0 0 3 &/mv64x60/pic 81
- 0x6800 0 0 4 &/mv64x60/pic 91
+ 0x6800 0 0 1 &PIC 93
+ 0x6800 0 0 2 &PIC 80
+ 0x6800 0 0 3 &PIC 81
+ 0x6800 0 0 4 &PIC 91
>;
};
@@ -307,28 +307,28 @@
compatible = "marvell,mv64x60-cpu-error";
reg = <0x0070 0x10 0x0128 0x28>;
interrupts = <3>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
sram-ctrl@0380 {
compatible = "marvell,mv64x60-sram-ctrl";
reg = <0x0380 0x80>;
interrupts = <13>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
pci-error@1d40 {
compatible = "marvell,mv64x60-pci-error";
reg = <0x1d40 0x40 0x0c28 0x4>;
interrupts = <12>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
mem-ctrl@1400 {
compatible = "marvell,mv64x60-mem-ctrl";
reg = <0x1400 0x60>;
interrupts = <17>;
- interrupt-parent = <&/mv64x60/pic>;
+ interrupt-parent = <&PIC>;
};
};
^ permalink raw reply related
* [PATCH 3/8] powerpc: mv64x60 - Replace marvell, mv64x60 with marvell, mv64360
From: Mark A. Greer @ 2007-12-11 0:38 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
Compatible property names like "marvell,mv64x60..." are not acceptable
so replace them with name like "marvell,mv64360..."
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
arch/powerpc/boot/dts/prpmc2800.dts | 34 +++++++--------
arch/powerpc/platforms/embedded6xx/prpmc2800.c | 4 -
arch/powerpc/sysdev/mv64x60_dev.c | 6 +-
arch/powerpc/sysdev/mv64x60_pci.c | 6 +-
arch/powerpc/sysdev/mv64x60_pic.c | 4 -
5 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 1657ee6..a4a3622 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -93,7 +93,7 @@
#address-cells = <1>;
#size-cells = <0>;
device_type = "mdio";
- compatible = "marvell,mv64x60-mdio";
+ compatible = "marvell,mv64360-mdio";
PHY0: ethernet-phy@1 {
device_type = "ethernet-phy";
compatible = "broadcom,bcm5421";
@@ -114,7 +114,7 @@
reg = <0x2000 0x2000>;
eth0 {
device_type = "network";
- compatible = "marvell,mv64x60-eth";
+ compatible = "marvell,mv64360-eth";
block-index = <0>;
interrupts = <32>;
interrupt-parent = <&PIC>;
@@ -123,7 +123,7 @@
};
eth1 {
device_type = "network";
- compatible = "marvell,mv64x60-eth";
+ compatible = "marvell,mv64360-eth";
block-index = <1>;
interrupts = <33>;
interrupt-parent = <&PIC>;
@@ -134,7 +134,7 @@
SDMA0: sdma@4000 {
device_type = "dma";
- compatible = "marvell,mv64x60-sdma";
+ compatible = "marvell,mv64360-sdma";
reg = <0x4000 0xc18>;
virtual-reg = <0xf1004000>;
interrupt-base = <0>;
@@ -144,7 +144,7 @@
SDMA1: sdma@6000 {
device_type = "dma";
- compatible = "marvell,mv64x60-sdma";
+ compatible = "marvell,mv64360-sdma";
reg = <0x6000 0xc18>;
virtual-reg = <0xf1006000>;
interrupt-base = <0>;
@@ -153,7 +153,7 @@
};
BRG0: brg@b200 {
- compatible = "marvell,mv64x60-brg";
+ compatible = "marvell,mv64360-brg";
reg = <0xb200 0x8>;
clock-src = <8>;
clock-frequency = <133000000>;
@@ -162,7 +162,7 @@
};
BRG1: brg@b208 {
- compatible = "marvell,mv64x60-brg";
+ compatible = "marvell,mv64360-brg";
reg = <0xb208 0x8>;
clock-src = <8>;
clock-frequency = <133000000>;
@@ -224,14 +224,14 @@
};
wdt@b410 { /* watchdog timer */
- compatible = "marvell,mv64x60-wdt";
+ compatible = "marvell,mv64360-wdt";
reg = <0xb410 0x8>;
timeout = <10>; /* wdt timeout in seconds */
};
i2c@c000 {
device_type = "i2c";
- compatible = "marvell,mv64x60-i2c";
+ compatible = "marvell,mv64360-i2c";
reg = <0xc000 0x20>;
virtual-reg = <0xf100c000>;
freq_m = <8>;
@@ -245,18 +245,18 @@
PIC: pic {
#interrupt-cells = <1>;
#address-cells = <0>;
- compatible = "marvell,mv64x60-pic";
+ compatible = "marvell,mv64360-pic";
reg = <0x0000 0x88>;
interrupt-controller;
};
mpp@f000 {
- compatible = "marvell,mv64x60-mpp";
+ compatible = "marvell,mv64360-mpp";
reg = <0xf000 0x10>;
};
gpp@f100 {
- compatible = "marvell,mv64x60-gpp";
+ compatible = "marvell,mv64360-gpp";
reg = <0xf100 0x20>;
};
@@ -265,7 +265,7 @@
#size-cells = <2>;
#interrupt-cells = <1>;
device_type = "pci";
- compatible = "marvell,mv64x60-pci";
+ compatible = "marvell,mv64360-pci";
reg = <0x0cf8 0x8>;
ranges = <0x01000000 0x0 0x0
0x88000000 0x0 0x01000000
@@ -304,28 +304,28 @@
};
cpu-error@0070 {
- compatible = "marvell,mv64x60-cpu-error";
+ compatible = "marvell,mv64360-cpu-error";
reg = <0x0070 0x10 0x0128 0x28>;
interrupts = <3>;
interrupt-parent = <&PIC>;
};
sram-ctrl@0380 {
- compatible = "marvell,mv64x60-sram-ctrl";
+ compatible = "marvell,mv64360-sram-ctrl";
reg = <0x0380 0x80>;
interrupts = <13>;
interrupt-parent = <&PIC>;
};
pci-error@1d40 {
- compatible = "marvell,mv64x60-pci-error";
+ compatible = "marvell,mv64360-pci-error";
reg = <0x1d40 0x40 0x0c28 0x4>;
interrupts = <12>;
interrupt-parent = <&PIC>;
};
mem-ctrl@1400 {
- compatible = "marvell,mv64x60-mem-ctrl";
+ compatible = "marvell,mv64360-mem-ctrl";
reg = <0x1400 0x60>;
interrupts = <17>;
interrupt-parent = <&PIC>;
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
index a01e219..1a1baf9 100644
--- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c
+++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
@@ -50,13 +50,13 @@ static void __init prpmc2800_setup_arch(void)
* ioremap mpp and gpp registers in case they are later
* needed by prpmc2800_reset_board().
*/
- np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-mpp");
+ np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-mpp");
reg = of_get_property(np, "reg", NULL);
paddr = of_translate_address(np, reg);
of_node_put(np);
mv64x60_mpp_reg_base = ioremap(paddr, reg[1]);
- np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-gpp");
+ np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-gpp");
reg = of_get_property(np, "reg", NULL);
paddr = of_translate_address(np, reg);
of_node_put(np);
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 304056c..dca205f 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -457,17 +457,17 @@ static int __init mv64x60_device_setup(void)
goto error;
id = 0;
- for_each_compatible_node(np, "network", "marvell,mv64x60-eth")
+ for_each_compatible_node(np, "network", "marvell,mv64360-eth")
if ((err = mv64x60_eth_device_setup(np, id++)))
goto error;
id = 0;
- for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c")
+ for_each_compatible_node(np, "i2c", "marvell,mv64360-i2c")
if ((err = mv64x60_i2c_device_setup(np, id++)))
goto error;
/* support up to one watchdog timer */
- np = of_find_compatible_node(np, NULL, "marvell,mv64x60-wdt");
+ np = of_find_compatible_node(np, NULL, "marvell,mv64360-wdt");
if (np) {
if ((err = mv64x60_wdt_device_setup(np, id)))
goto error;
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index d21ab8f..1456015 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -86,14 +86,14 @@ static int __init mv64x60_sysfs_init(void)
struct platform_device *pdev;
const unsigned int *prop;
- np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60");
+ np = of_find_compatible_node(NULL, NULL, "marvell,mv64360");
if (!np)
return 0;
prop = of_get_property(np, "hs_reg_valid", NULL);
of_node_put(np);
- pdev = platform_device_register_simple("marvell,mv64x60", 0, NULL, 0);
+ pdev = platform_device_register_simple("marvell,mv64360", 0, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
@@ -166,6 +166,6 @@ void __init mv64x60_pci_init(void)
{
struct device_node *np;
- for_each_compatible_node(np, "pci", "marvell,mv64x60-pci")
+ for_each_compatible_node(np, "pci", "marvell,mv64360-pci")
mv64x60_add_bridge(np);
}
diff --git a/arch/powerpc/sysdev/mv64x60_pic.c b/arch/powerpc/sysdev/mv64x60_pic.c
index 19e6ef2..2aa4ed0 100644
--- a/arch/powerpc/sysdev/mv64x60_pic.c
+++ b/arch/powerpc/sysdev/mv64x60_pic.c
@@ -238,13 +238,13 @@ void __init mv64x60_init_irq(void)
const unsigned int *reg;
unsigned long flags;
- np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-gpp");
+ np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-gpp");
reg = of_get_property(np, "reg", &size);
paddr = of_translate_address(np, reg);
mv64x60_gpp_reg_base = ioremap(paddr, reg[1]);
of_node_put(np);
- np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-pic");
+ np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-pic");
reg = of_get_property(np, "reg", &size);
paddr = of_translate_address(np, reg);
mv64x60_irq_reg_base = ioremap(paddr, reg[1]);
^ permalink raw reply related
* [PATCH 4/8] powerpc: mv64x60 - Update ethernet DTS nodes
From: Mark A. Greer @ 2007-12-11 0:38 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
DTS entries for mv64360 ethernet controllers should use 'reg' property
instead of the 'block-index' property. Also, use 'multiethernet'
instead of 'ethernet' for parent node and use 'ethernet@?' instead of
'eth?' for subnodes.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
arch/powerpc/boot/dts/prpmc2800.dts | 10 +++++-----
arch/powerpc/sysdev/mv64x60_dev.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index a4a3622..1447faa 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -110,21 +110,21 @@
};
};
- ethernet@2000 {
+ multiethernet@2000 {
reg = <0x2000 0x2000>;
- eth0 {
+ ethernet@0 {
device_type = "network";
compatible = "marvell,mv64360-eth";
- block-index = <0>;
+ reg = <0>;
interrupts = <32>;
interrupt-parent = <&PIC>;
phy = <&PHY0>;
local-mac-address = [ 00 00 00 00 00 00 ];
};
- eth1 {
+ ethernet@1 {
device_type = "network";
compatible = "marvell,mv64360-eth";
- block-index = <1>;
+ reg = <1>;
interrupts = <33>;
interrupt-parent = <&PIC>;
phy = <&PHY1>;
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index dca205f..20cd5e3 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -248,7 +248,7 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id)
memset(&pdata, 0, sizeof(pdata));
- prop = of_get_property(np, "block-index", NULL);
+ prop = of_get_property(np, "reg", NULL);
if (!prop)
return -ENODEV;
pdata.port_number = *prop;
^ permalink raw reply related
* [PATCH 5/8] powerpc: MPSC - Update DTS entries
From: Mark A. Greer @ 2007-12-11 0:38 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
MPSC DTS nodes should use 'cell-index' to distinguish between MPSC
controllers (just like all the other DTS files). Also, rename the
compatible property from 'marvell,mpsc' to 'marvell,mv64360-mpsc'
for consistency.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
arch/powerpc/boot/dts/prpmc2800.dts | 8 ++++----
arch/powerpc/boot/mpsc.c | 2 +-
arch/powerpc/boot/serial.c | 2 +-
arch/powerpc/sysdev/mv64x60_dev.c | 8 ++++----
arch/powerpc/sysdev/mv64x60_udbg.c | 4 ++--
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 1447faa..e670e3f 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -185,7 +185,7 @@
mpsc@8000 {
device_type = "serial";
- compatible = "marvell,mpsc";
+ compatible = "marvell,mv64360-mpsc";
reg = <0x8000 0x38>;
virtual-reg = <0xf1008000>;
sdma = <&SDMA0>;
@@ -193,7 +193,7 @@
cunit = <&CUNIT>;
mpscrouting = <&MPSCROUTING>;
mpscintr = <&MPSCINTR>;
- block-index = <0>;
+ cell-index = <0>;
max_idle = <40>;
chr_1 = <0>;
chr_2 = <0>;
@@ -205,7 +205,7 @@
mpsc@9000 {
device_type = "serial";
- compatible = "marvell,mpsc";
+ compatible = "marvell,mv64360-mpsc";
reg = <0x9000 0x38>;
virtual-reg = <0xf1009000>;
sdma = <&SDMA1>;
@@ -213,7 +213,7 @@
cunit = <&CUNIT>;
mpscrouting = <&MPSCROUTING>;
mpscintr = <&MPSCINTR>;
- block-index = <1>;
+ cell-index = <1>;
max_idle = <40>;
chr_1 = <0>;
chr_2 = <0>;
diff --git a/arch/powerpc/boot/mpsc.c b/arch/powerpc/boot/mpsc.c
index 802ea53..425ad88 100644
--- a/arch/powerpc/boot/mpsc.c
+++ b/arch/powerpc/boot/mpsc.c
@@ -141,7 +141,7 @@ int mpsc_console_init(void *devp, struct serial_console_data *scdp)
if (mpscintr_base == NULL)
goto err_out;
- n = getprop(devp, "block-index", &v, sizeof(v));
+ n = getprop(devp, "cell-index", &v, sizeof(v));
if (n != sizeof(v))
goto err_out;
reg_set = (int)v;
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index cafeece..cbcbb20 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -119,7 +119,7 @@ int serial_console_init(void)
if (dt_is_compatible(devp, "ns16550"))
rc = ns16550_console_init(devp, &serial_cd);
- else if (dt_is_compatible(devp, "marvell,mpsc"))
+ else if (dt_is_compatible(devp, "marvell,mv64360-mpsc"))
rc = mpsc_console_init(devp, &serial_cd);
else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") ||
dt_is_compatible(devp, "fsl,cpm1-smc-uart") ||
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 20cd5e3..587c40f 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -127,7 +127,7 @@ static int __init mv64x60_mpsc_device_setup(struct device_node *np, int id)
if (err)
return err;
- prop = of_get_property(np, "block-index", NULL);
+ prop = of_get_property(np, "cell-index", NULL);
if (!prop)
return -ENODEV;
port_number = *(int *)prop;
@@ -452,7 +452,7 @@ static int __init mv64x60_device_setup(void)
int err;
id = 0;
- for_each_compatible_node(np, "serial", "marvell,mpsc")
+ for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc")
if ((err = mv64x60_mpsc_device_setup(np, id++)))
goto error;
@@ -495,10 +495,10 @@ static int __init mv64x60_add_mpsc_console(void)
if (!np)
goto not_mpsc;
- if (!of_device_is_compatible(np, "marvell,mpsc"))
+ if (!of_device_is_compatible(np, "marvell,mv64360-mpsc"))
goto not_mpsc;
- prop = of_get_property(np, "block-index", NULL);
+ prop = of_get_property(np, "cell-index", NULL);
if (!prop)
goto not_mpsc;
diff --git a/arch/powerpc/sysdev/mv64x60_udbg.c b/arch/powerpc/sysdev/mv64x60_udbg.c
index 35c77c7..2792dc8 100644
--- a/arch/powerpc/sysdev/mv64x60_udbg.c
+++ b/arch/powerpc/sysdev/mv64x60_udbg.c
@@ -85,7 +85,7 @@ static void mv64x60_udbg_init(void)
if (!stdout)
return;
- for_each_compatible_node(np, "serial", "marvell,mpsc") {
+ for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") {
if (np == stdout)
break;
}
@@ -94,7 +94,7 @@ static void mv64x60_udbg_init(void)
if (!np)
return;
- block_index = of_get_property(np, "block-index", NULL);
+ block_index = of_get_property(np, "cell-index", NULL);
if (!block_index)
goto error;
^ permalink raw reply related
* [PATCH 6/8] powerpc: mv64x60 - Update i2c DTS properties
From: Mark A. Greer @ 2007-12-11 0:39 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
DTS files should not specify the default timeout value for the
mv64360 i2c controller. Also, remove deprecated 'retries' property.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
FYI, the 'retries' property use and related platform_data will be
removed in a patch that is working its way through the i2c community.
arch/powerpc/boot/dts/prpmc2800.dts | 2 --
arch/powerpc/sysdev/mv64x60_dev.c | 6 +-----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index e670e3f..b608e6c 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -236,8 +236,6 @@
virtual-reg = <0xf100c000>;
freq_m = <8>;
freq_n = <3>;
- timeout = <1000>; /* 1000 = 1 second */
- retries = <1>;
interrupts = <37>;
interrupt-parent = <&PIC>;
};
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 587c40f..e0244d8 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -355,11 +355,7 @@ static int __init mv64x60_i2c_device_setup(struct device_node *np, int id)
return -ENODEV;
pdata.freq_n = *prop;
- prop = of_get_property(np, "timeout", NULL);
- if (prop)
- pdata.timeout = *prop;
- else
- pdata.timeout = 1000; /* 1 second */
+ pdata.timeout = 1000; /* 1 second */
prop = of_get_property(np, "retries", NULL);
if (prop)
^ permalink raw reply related
* [PATCH 7/8] powerpc: mv64x60 - Remove timeout property for WDT
From: Mark A. Greer @ 2007-12-11 0:39 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
Remove support for the DTS timeout property that's currently there for
the watchdog timer on mv64x60 hostbridges. The platform_data remains
and can be modified by platform-specific code when necessary.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
arch/powerpc/boot/dts/prpmc2800.dts | 1 -
arch/powerpc/sysdev/mv64x60_dev.c | 5 +----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index b608e6c..054f028 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -226,7 +226,6 @@
wdt@b410 { /* watchdog timer */
compatible = "marvell,mv64360-wdt";
reg = <0xb410 0x8>;
- timeout = <10>; /* wdt timeout in seconds */
};
i2c@c000 {
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index e0244d8..f998330 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -403,10 +403,7 @@ static int __init mv64x60_wdt_device_setup(struct device_node *np, int id)
memset(&pdata, 0, sizeof(pdata));
- prop = of_get_property(np, "timeout", NULL);
- if (!prop)
- return -ENODEV;
- pdata.timeout = *prop;
+ pdata.timeout = 10; /* Default: 10 seconds */
np = of_get_parent(np);
if (!np)
^ permalink raw reply related
* [PATCH 8/8] powerpc: prpmc2800 - Miscellaneous DTS file fixups
From: Mark A. Greer @ 2007-12-11 0:39 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071211003108.GA4995@mag.az.mvista.com>
From: Mark A. Greer <mgreer@mvista.com>
Remove unnecessary device_type properties and leading zeroes in node names.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
---
arch/powerpc/boot/dts/prpmc2800.dts | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 054f028..6af5a3a 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -133,7 +133,6 @@
};
SDMA0: sdma@4000 {
- device_type = "dma";
compatible = "marvell,mv64360-sdma";
reg = <0x4000 0xc18>;
virtual-reg = <0xf1004000>;
@@ -143,7 +142,6 @@
};
SDMA1: sdma@6000 {
- device_type = "dma";
compatible = "marvell,mv64360-sdma";
reg = <0x6000 0xc18>;
virtual-reg = <0xf1006000>;
@@ -300,14 +298,14 @@
>;
};
- cpu-error@0070 {
+ cpu-error@70 {
compatible = "marvell,mv64360-cpu-error";
reg = <0x0070 0x10 0x0128 0x28>;
interrupts = <3>;
interrupt-parent = <&PIC>;
};
- sram-ctrl@0380 {
+ sram-ctrl@380 {
compatible = "marvell,mv64360-sram-ctrl";
reg = <0x0380 0x80>;
interrupts = <13>;
^ permalink raw reply related
* initrd - console
From: Siva Prasad @ 2007-12-11 1:26 UTC (permalink / raw)
To: linuxppc-dev, linuxppc-embedded
Hi,
I am trying to boot kernel with initrd. However, it hangs in
run_init_process("/sbin/init"). I went into the system calls to see what
it is doing.=20
As part of debugging, I ended up adding a printk statement in
arch/powerpc/kernel/process.c:sys_execve() routine. Noticed that all the
calls are coming here, however nothing is printed on the screen. I think
initrd is executing fine (unless one of you says otherwise). See the
capture below for boot log.
Question 1: how come nothing is printed from ramdisk (userland programs)
to the serial console, while all the kernel printk's are working
perfectly?
Question 2: How important is to have interrupts working for just
printing. I know that interrupts are must to enter input.
Thanks in advance.
Using MPC86xx HPCN machine description
Total memory =3D 1024MB; using 2048kB for hash table (at cfe00000)
Linux version 2.6.19 (sprasad@cider.bivio.net) (gcc version 4.1.1
20060525 (Red Hat 4.1.1-1)) #206 SMP Mon Dec 10 16:32:37 PST 2007
Found initrd at 0xc6000000:0xc62f912a
Found legacy serial port 0 for /soc8641@ff700000/serial@4500
mem=3Dff704500, taddr=3Dff704500, irq=3D1a, clk=3D598500000, speed=3D0
Found MPC86xx PCIE host bridge at 0x00000000ff708000. Firmware bus
number: 0->254
Found MPC86xx PCIE host bridge at 0x00000000ff709000. Firmware bus
number: 0->255
MPC86xx HPCN board from Freescale Semiconductor
Zone PFN ranges:
DMA 0 -> 196608
Normal 196608 -> 196608
HighMem 196608 -> 262144
early_node_map[1] active PFN ranges
0: 0 -> 262144
Built 1 zonelists. Total pages: 260096
Kernel command line: root=3D/dev/ram rw console=3DttyS0,115200
mpic: Setting up MPIC " MPIC " version 1.2 at ff740000, max 2 CPUs
mpic: ISU size: 16, shift: 4, mask: f
mpic: Initializing for 80 sources
PID hash table entries: 4096 (order: 12, 16384 bytes)
generic_calibrate_decr: 7 ppc_tb_freq =3D 150000000.
generic_calibrate_decr: 7 ppc_proc_freq =3D 1649267441.
time_init: decrementer frequency =3D 150.000000 MHz
time_init: processor frequency =3D 1649.267441 MHz
Console: colour dummy device 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1030352k/1048576k available (2740k kernel code, 279760k
reserved, 232k data, 129k bss, 156k init)
Mount-cache hash table entries: 512
mpic: requesting IPIs ...=20
Processor 1 is stuck.
Brought up 1 CPUs
checking if image is initramfs...it isn't (no cpio magic); looks like an
initrd
Freeing initrd memory: 3044k freed
NET: Registered protocol family 16
SIVA sys_execve - filename=3D/sbin/hotplug.
PCI: Probing PCI hardware
SIVA sys_execve - filename=3D/sbin/hotplug.
PCI: 0000:00:00.0: class b20 doesn't match header type 01. Ignoring
class.
SIVA sys_execve - filename=3D/sbin/hotplug.
PCI: Cannot allocate resource region 1 of PCI bridge 1
PCI: Cannot allocate resource region 2 of PCI bridge 1
PCI: Cannot allocate resource region 1 of device 0000:01:00.0
PCI: Cannot allocate resource region 3 of device 0000:01:00.0
PCI: Failed to allocate mem resource #1:4000@0 for 0000:01:00.0
PCI: Failed to allocate mem resource #3:10000@0 for 0000:01:00.0
SIVA sys_execve - filename=3D/sbin/hotplug.
bus mdio_bus: add driver Generic PHY
SIVA sys_execve - filename=3D/sbin/hotplug.
Generic PHY: Registered new driver
SCSI subsystem initialized
bus i2c: add driver i2c_adapter
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
highmem bounce pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
bus pci: add driver pcieport-driver
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing enabled
SIVA sys_execve - filename=3D/sbin/hotplug.
SIVA sys_execve - filename=3D/sbin/hotplug.
bus platform: add driver serial8250
serial8250.0: ttyS0 at MMIO 0xff704500 (irq =3D 26) is a 16550A
bus pci: add driver serial
RAMDISK driver initialized: 16 RAM disks of 131072K size 1024 blocksize
loop: loaded (max 8 devices)
bus mdio_bus: add driver Vitesse VSC8244
Vitesse VSC8244: Registered new driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=3Dxx
bus pci: add driver ALI15x3_IDE
SIVA sys_execve - filename=3D/sbin/hotplug.
bus ide: add driver ide-disk
bus ide: add driver ide-cdrom
bus scsi: add driver sd
bus pci: add driver ahci
bus platform: add driver fsl-i2c
bus i2c: add driver eeprom
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
SIVA sys_execve - filename=3D/sbin/hotplug.
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 156k init
SIVA before run_init_process("/sbin/init").
SIVA sys_execve - filename=3D/sbin/init.
SIVA sys_execve - filename=3D/etc/rc.d/rcS.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/hostname.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/bin/hostname.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/filesystems.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/bin/mount.
SIVA sys_execve - filename=3D/bin/mount.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/mount.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/mount.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/ln.
SIVA sys_execve - filename=3D/bin/mount.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/syslog.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/sbin/syslogd.
SIVA sys_execve - filename=3D/sbin/klogd.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/depmod.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/modules.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/network.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/sbin/ifconfig.
SIVA sys_execve - filename=3D/sbin/route.
SIVA sys_execve - filename=3D/bin/rm.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/sbin/ifconfig.
SIVA sys_execve - filename=3D/sbin/modprobe.
SIVA sys_execve - filename=3D/sbin/modprobe.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/sbin/route.
SIVA sys_execve - filename=3D/bin/sed.
SIVA sys_execve - filename=3D/bin/mv.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/settime.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/bin/touch.
SIVA sys_execve - filename=3D/bin/sleep.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/init.d/inetd.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/bin/echo.
SIVA sys_execve - filename=3D/usr/sbin/inetd.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/etc/rc.d/rc.local.
SIVA sys_execve - filename=3D/usr/bin/[.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
SIVA sys_execve - filename=3D/sbin/getty.
- Siva
^ permalink raw reply
* Re: initrd - console
From: Michael Ellerman @ 2007-12-11 1:34 UTC (permalink / raw)
To: Siva Prasad; +Cc: linuxppc-dev, linuxppc-embedded
In-Reply-To: <D83235F0F3C86D4D889D8B9A0DA8C6D7011A7AFE@corpexc01.corp.networkrobots.com>
[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]
On Mon, 2007-12-10 at 17:26 -0800, Siva Prasad wrote:
> Hi,
>
> I am trying to boot kernel with initrd. However, it hangs in
> run_init_process("/sbin/init"). I went into the system calls to see what
> it is doing.
>
> As part of debugging, I ended up adding a printk statement in
> arch/powerpc/kernel/process.c:sys_execve() routine. Noticed that all the
> calls are coming here, however nothing is printed on the screen. I think
> initrd is executing fine (unless one of you says otherwise). See the
> capture below for boot log.
>
> Question 1: how come nothing is printed from ramdisk (userland programs)
> to the serial console, while all the kernel printk's are working
> perfectly?
Do you have a /dev/console etc. in your initrd?
> Question 2: How important is to have interrupts working for just
> printing. I know that interrupts are must to enter input.
Depends on what your console is, but if it's something simple then you
should be able to write to it without taking interrupts.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* RE: [PATCH] Fix rounding bug in emulation for double floatoperating
From: Liu Yu @ 2007-12-11 1:38 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, David Gibson
In-Reply-To: <AD0028E8-E305-443F-8872-C935D4E18F80@kernel.crashing.org>
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
> Sent: Monday, December 10, 2007 11:01 PM
> To: Liu Yu
> Cc: David Gibson; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH] Fix rounding bug in emulation for double=20
> floatoperating
>=20
>=20
> On Dec 9, 2007, at 11:25 PM, Liu Yu wrote:
> >> -----Original Message-----
> >> From: David Gibson [mailto:david@gibson.dropbear.id.au]
> >> Sent: Monday, December 10, 2007 12:56 PM
> >> To: Liu Yu
> >> Cc: linuxppc-dev@ozlabs.org
> >> Subject: Re: [PATCH] Fix rounding bug in emulation for double=20
> >> floatoperating
> >>
> >>
> >> On Mon, Dec 10, 2007 at 01:00:52PM +0800, Liu Yu wrote:
> >>>
> >>> This patch fixes rounding bug in emulation for double float
> >> operating on PowerPC platform.
> >>>
> >>> When pack double float operand, it need to truncate the
> >> tail due to the limited precision.
> >>> If the truncated part is not zero, the last bit of work bit
> >> (totally 3 bits) need to '|' 1.
> >>>
> >>> This patch is completed in _FP_FRAC_SRS_2(X,N,sz)
> >> (arch/powerpc/math-emu/op-2.h).
> >>> Originally the code leftwards rotates the operand to just=20
> keep the=20
> >>> truncated part, then check whether it is zero. However, the
> >> number it
> >>> rotates is not correct when N is not smaller than
> >> _FP_W_TYPE_SIZE, and it will cause the work bit '|' 1 in=20
> the improper=20
> >> case.
> >>>
> >>> This patch fixes this issue.
> >>>
> >>> Signed-off-by: Liu Yu <b13201@freescale.com>
> >>
> >> Wow someone deciphered the hideous macro hell of the math=20
> emulation=20
> >> code enough to fix a bug. I don't suppose you'd care to fix the=20
> >> millions of warnings that the math-emu code generates...?
> >
> > Oh, I don't like macro define either. But it's really a bug...
>=20
>=20
> how did you find this?
Well, when divide the min positive number by 2, you will get the work
bit "101" which is supposed to be "100".
And the wrong result will influent the succedent rounding operation.
In fact, the similar macro _FP_FRAC_SRS_1 and _FP_FRAC_SRS_4 are
correct. This bug just exists in _FP_FRAC_SRS_2.
>=20
> - k
>=20
^ permalink raw reply
* Re: mmap + segfaults on MPC8349E
From: R. Ebersole (VTI - new) @ 2007-12-11 1:53 UTC (permalink / raw)
To: David Hawkins; +Cc: linuxppc-embedded
In-Reply-To: <475B68AE.5000302@ovro.caltech.edu>
David Hawkins wrote:
> Hi,
Hi.
>
> You haven't really provided enough information.
Sorry about that. I grabbed one of the h/w guys to help out.
>
>> We wrote some simple drivers/modules to mmap() FPGA registers to user
>> space.
>> At the moment, for testing, we reserve the upper x-MB of RAM, and
>> mmap() there, instead.
>
>
> 1. The FPGA is located where? The local bus, or the PCI bus?
> What frequency are you trying to operate at?
On the local bus frequency is 33.0 MHz. (66.0 PCI_CLK_IN). See the
attached .cfg script for memory map.
>
>
> 2. If its on the local bus, do you access it using GPCM or UPM?
> Have you setup either correctly?
> Have you confirmed the bus timing with a logic analyzer?
GPCM.
We have confirmed the timing both in functionality (in the debugger) and
with a logic analyzer (plus oscope for setup and hold times).
We have stand-alone C-code that runs in CodeWarrior that bangs away at
the registers of this device and the hardware runs perfectly using the
.cfg script settings..
>
>
> 3. Have you created a bus functional model of the processor bus
> that you have then run with your FPGA bus in ModelSim to
> confirm that your FPGA performs correctly.
Yes, we have. Also, checked in h/w (see 2 above)
>
>
> 4. Have you tried burst and non-burst access by either using
> DMA, or treating the memory area as cacheable or non-cacheable?
> Have you checked those cases with simulation and then
> with a scope or logic analyzer?
Always non-burst at this point.
>
> 5. Did you try running stand-alone tests in U-Boot, to go for a
> more bare-metal debug approach?
I assume the bare-metal debug approach is using a JTAG debugger
connection and CodeWarrior. We started there and now are trying to
access the same device(s) via linux drivers.
>
> No point in debugging software if you have no idea whether the
> hardware behaves. So confirm that you have tested your hardware
> first.
>
> My board design uses the MPC8349EA, I have an Altera Stratix II
> FPGA on the local bus. I use GPCM to access flash on the local
> bus via the FPGA, and UPM to access FPGA registers. I don't
> have boards yet, but I've got a pretty good handle on how the
> interface should work.
>
> Cheers,
> Dave
>
>
>
--
Sometimes I feel like a red shirt in the Star Trek episode of life.
--
This message contains confidential information and is intended only for the
individual named. If you are not the intended recipient you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system.
^ permalink raw reply
* Re: mmap + segfaults on MPC8349E
From: David Hawkins @ 2007-12-11 2:16 UTC (permalink / raw)
To: R. Ebersole (VTI - new); +Cc: linuxppc-embedded
In-Reply-To: <475DED86.1040409@valleytech.com>
Hi,
>> You haven't really provided enough information.
>
> Sorry about that. I grabbed one of the h/w guys to help out.
No problem. Just wanted to check the basics had been covered.
Sounds like they have.
> On the local bus frequency is 33.0 MHz. (66.0 PCI_CLK_IN). See the
> attached .cfg script for memory map.
It got dropped by the mailer. Don't sweat it.
>> 2. If its on the local bus, do you access it using GPCM or UPM?
>> Have you setup either correctly?
>> Have you confirmed the bus timing with a logic analyzer?
>
> GPCM.
> We have confirmed the timing both in functionality (in the debugger) and
> with a logic analyzer (plus oscope for setup and hold times).
> We have stand-alone C-code that runs in CodeWarrior that bangs away at
> the registers of this device and the hardware runs perfectly using the
> .cfg script settings..
Great.
>> 3. Have you created a bus functional model of the processor bus
>> that you have then run with your FPGA bus in ModelSim to
>> confirm that your FPGA performs correctly.
>
> Yes, we have. Also, checked in h/w (see 2 above)
Nice :)
>> 4. Have you tried burst and non-burst access by either using
>> DMA, or treating the memory area as cacheable or non-cacheable?
>> Have you checked those cases with simulation and then
>> with a scope or logic analyzer?
>
> Always non-burst at this point.
Are you sure?
When I was playing with the Yosemite board, I was having trouble
with a PCI card due to caching ... here's a code snippet from
the mmap routine of a driver:
/* Flags to stop the processor treating PCI memory as
* cacheable (see asm-ppc/pgtable.h)
*
* (thanks to Travis Sawyer from the ppc-embedded list)
*
* I could have used '#ifdef CONFIG_44x', but 40x uses
* these flags too, as do other processors. So just check
* whether the flag exists.
*
* TODO:
* p425 Rubini; use pgprot_noncached()
*
* asm-ppc/pgtable.h defines it as setting these two flags
*
* So, that appears to be the 'portable' way to do it.
*
* drivers/char/mem.c uses pgprot_noncached()
*/
#ifdef pgprot_noncached
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
#endif
In that particular case, I think I wasn't seeing data transferred
to the bus until a cache flush occurred. Its possible that in your
case a burst is triggered to your hardware.
How does your BFM+simulation react to bus bursts?
Can you probe the bus when you trigger the seg-fault to see
if caching is the problem?
I'm not sure that a bus error can cause a segfault. When I
get my boards, I'll generate bus parity errors to see what
kernel routines it triggers. So, chances are this is not
the source of your error.
>> 5. Did you try running stand-alone tests in U-Boot, to go for a
>> more bare-metal debug approach?
>
> I assume the bare-metal debug approach is using a JTAG debugger
> connection and CodeWarrior. We started there and now are trying to
> access the same device(s) via linux drivers.
Yep, sounds good.
Ok, so assuming you come back with the fact that the seg-fault
occurs without bursting. Lets take a look at your driver code.
Cheers,
Dave
^ permalink raw reply
* Re: [PATCH] Fix rounding bug in emulation for double floatoperating
From: Zang Roy-r61911 @ 2007-12-11 3:19 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev list, Liu Yu, David Gibson
In-Reply-To: <AD0028E8-E305-443F-8872-C935D4E18F80@kernel.crashing.org>
On Mon, 2007-12-10 at 23:00, Kumar Gala wrote:
> On Dec 9, 2007, at 11:25 PM, Liu Yu wrote:
> >
> >> -----Original Message-----
> >> From: David Gibson [mailto:david@gibson.dropbear.id.au]
> >> Sent: Monday, December 10, 2007 12:56 PM
> >> To: Liu Yu
> >> Cc: linuxppc-dev@ozlabs.org
> >> Subject: Re: [PATCH] Fix rounding bug in emulation for double
> >> floatoperating
> >>
> >>
> >> On Mon, Dec 10, 2007 at 01:00:52PM +0800, Liu Yu wrote:
> >>>
> >>> This patch fixes rounding bug in emulation for double float
> >> operating on PowerPC platform.
> >>>
> >>> When pack double float operand, it need to truncate the
> >> tail due to the limited precision.
> >>> If the truncated part is not zero, the last bit of work bit
> >> (totally 3 bits) need to '|' 1.
> >>>
> >>> This patch is completed in _FP_FRAC_SRS_2(X,N,sz)
> >> (arch/powerpc/math-emu/op-2.h).
> >>> Originally the code leftwards rotates the operand to just keep the
> >>> truncated part, then check whether it is zero. However, the
> >> number it
> >>> rotates is not correct when N is not smaller than
> >> _FP_W_TYPE_SIZE, and it will cause the work bit '|' 1 in the
> >> improper case.
> >>>
> >>> This patch fixes this issue.
> >>>
> >>> Signed-off-by: Liu Yu <b13201@freescale.com>
> >>
> >> Wow someone deciphered the hideous macro hell of the math
> >> emulation code enough to fix a bug. I don't suppose you'd
> >> care to fix the millions of warnings that the math-emu code
> >> generates...?
> >
> > Oh, I don't like macro define either. But it's really a bug...
>
>
> how did you find this?
>
It supposed to run the following test case on a powerpc platform.
Yu's patch fixes the issue.
Could you help to merge this patch in your tree?
---
#include <stdio.h>
#include <math.h>
#include <bits/nan.h>
#ifdef __SPE__
#include <spe.h>
int
getSPEFSCR()
{
return __builtin_spe_mfspefscr();
}
void
setSPEFSCR(int i)
{
__builtin_spe_mtspefscr(i);
}
#else
int
getSPEFSCR()
{
return 0;
}
void
setSPEFSCR(int i)
{
}
#endif
void
dmul(double d, double d1, double expected)
{
double d2;
int before, after;
before = getSPEFSCR();
d2 = d * d1;
after = getSPEFSCR();
printf("dmul %llx * %llx = %llx expected %llx %s [0x%x 0x%x]\n", d, d1, d2, expected,
(d2 == expected) ? "(PASS)" : "(FAIL)", before, after);
}
void
ddiv(double d, double d1, double expected)
{
register double d2;
int before, after;
before = getSPEFSCR();
d2 = d / d1;
after = getSPEFSCR();
printf("ddiv %llx / %llx = %llx expected %llx %s [0x%x 0x%x]\n", d, d1, d2, expected,
(d2 == expected) ? "(PASS)" : "(FAIL)", before, after);
}
main()
{
const double min_double = 4.9406564584124654e-324L;
printf("\n");
dmul(0.5L, min_double, 0.0L);
dmul(-0.5L, min_double, 0.0L);
dmul(-min_double, -0.5L, 0.0L);
printf("\n");
ddiv(min_double, 2.0L, 0.0L);
}
^ permalink raw reply
* Help:To Add NAND Node in Device Tree
From: ashish @ 2007-12-11 4:00 UTC (permalink / raw)
To: linuxppc-dev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1515 bytes --]
Hi,
I am trying to add Nand Node in Device Tree, for My Board(Some what
similar to MPC8548_CDS).
In Board, Nand is attached to LBC UPM Controller.
Currently My NAND Driver working Fine without NAND Device Node in
Device Tree.
But as Requirement, I have to add NAND Device Node in Device Tree.
Can you give me some basic out lines to carry out this task?
I know that:
1. I have to make some changes in My NAND Driver to Read Device
Tree.
2. Add NAND Node in Device Tree. But Again What property I need
for It.
Thanks in Advance.
With Best Regards
Ashish Yadav
--
eInfochips Business Disclaimer:
This message may contain confidential, proprietary or legally Privileged
information. In case you are not the original intended Recipient of the
message, you must not, directly or indirectly, use, Disclose,distribute,
print, or copy any part of this message and you are requested to delete
it and inform the sender. Any views expressed in this message are those
of the individual sender unless otherwise stated.Nothing contained in
this message shall be construed as an offer or acceptance of any offer
by eInfochips Limited and/or eInfochips Inc(eInfochips) unless sent
with that express intent and with due authority of eInfochips.EInfochips
has taken enough precautions to prevent the spread of viruses. However
the company accepts no liability for any damage caused by any virus
transmitted by this email.
[-- Attachment #2: Type: text/html, Size: 5354 bytes --]
^ permalink raw reply
* Patches added to for-2.6.25 and master branches of powerpc.git
From: Paul Mackerras @ 2007-12-11 5:29 UTC (permalink / raw)
To: linuxppc-dev
Benjamin Herrenschmidt (7):
[POWERPC] Make isa_mem_base common to 32 and 64 bits
[POWERPC] Merge pci_process_bridge_OF_ranges()
[POWERPC] Fix powerpc 32-bit resource fixup for 64-bit resources
[POWERPC] Change 32-bit PCI message about resource allocation
[POWERPC] Remove useless volatiles in udbg_16550.c
[POWERPC] Add of_translate_dma_address
[POWERPC] Early debug forces console log level to max
Cyrill Gorcunov (1):
[POWERPC] CELLEB: Fix possible NULL pointer dereference
David Gibson (3):
[POWERPC] Merge libfdt upstream source
[POWERPC] Use embedded libfdt in the bootwrapper
[POWERPC] Kill flatdevtree.c
David Woodhouse (4):
[POWERPC] Create otheros.bld next to specified output file, not in $object directory
[POWERPC] Find device-tree source file in default directory
[POWERPC] Allow for bootwrapper utilities being in different directory to objects
[POWERPC] Implement 'make bootwrapper_install'
Ishizaki Kou (3):
[POWERPC] cell: Fix undefined reference to mmio_nvram_init
[POWERPC] celleb: Add support for native CBE
[POWERPC] Update celleb_defconfig to add support for native CBE
Jon Loeliger (2):
[POWERPC] Clean out asm/of_{platform, device}.h
[POWERPC] Clean out asm/of_{platform, device}.h from sysdev/
Michael Ellerman (1):
[POWERPC] Add for_each_child_of_node() helper for iterating over child nodes
Michael Hanselmann (1):
[POWERPC] Update smu command definitions
Michael Neuling (1):
[POWERPC] Use SLB size from the device tree
Nathan Lynch (1):
[POWERPC] lparcfg: Remove useless buffer allocation
Olof Johansson (5):
[POWERPC] pasemi: clean up mdio_gpio a bit
[POWERPC] pasemi: Broaden specific references to 1682M
[POWERPC] pasemi: Don't enter powersaving states from elevated astates
[POWERPC] pasemi: Move cpus to hold loop before restart
[POWERPC] pasemi: Fix module information for gpio-mdio
Stephen Neuendorffer (1):
[POWERPC] Improved documentation of device tree 'ranges'
Stephen Rothwell (27):
[POWERPC] Use of_register_driver to implement of_register_platform_driver
[POWERPC] kernel_execve is identical in 32 and 64 bit
[POWERPC] iommu_free_table doesn't need the device_node
[POWERPC] pSeries: Remove dependency on pci_dn bussubno
[POWERPC] Clean up pci-bridge.h
[POWERPC] Consolidate pci_controller
[POWERPC] iSeries: Move find_Device_Node to avoid a forward declaration
[POWERPC] iSeries: Cleanup PCI retry code a little
[POWERPC] iSeries: DeCamelCase pci.c
[POWERPC] iSeries: Remove some dead code from pci.c
[POWERPC] iSeries: Unindent and clean iSeries_pci_final_fixup
[POWERPC] iSeries: Consoldiate PCI IO error check
[POWERPC] iSeries: Remove one layer of IO routines
[POWERPC] iSeries: Remove pci_dn dependency from iSeries_Device_Information
[POWERPC] iSeries: iseries_ds_addr is only used in pci.c
[POWERPC] iSeries: Reduce dependence on pci_dn bussubno
[POWERPC] iSeries: Make pcibios_final_fixup not depend on pci_dn
[POWERPC] Inline pci_setup_pci_controller as it has become trivial
[POWERPC] iSeries: Call iSeries_pcibios_init from setup_arch
[POWERPC] iSeries: hose->buid is always zero for iSeries
[POWERPC] Remove some iSeries platform checks from the PCI code
[POWERPC] Don't special case pci_domain_nr() for iSeries
[POWERPC] pci_controller->arch_data really is a struct device_node *
[POWERPC] iSeries: DeCamelCase vpdinfo.c
[POWERPC] iSeries: Clean up and simplify vdpinfo.c
[POWERPC] iSeries: Merge vpdinfo.c into pci.c
[POWERPC] EEH: Avoid a possible NULL pointer dereference
will schmidt (1):
[POWERPC] Update xmon slb code
^ permalink raw reply
* Re: [PATCH] IB/ehca: Serialize HCA-related hCalls on POWER5
From: Joachim Fenkes @ 2007-12-11 8:38 UTC (permalink / raw)
To: Roland Dreier
Cc: Arnd Bergmann, OF-EWG, LKML, linuxppc-dev, Christoph Raisch,
Marcus Eder, OF-General, Stefan Roscher
In-Reply-To: <adahciq9q86.fsf@cisco.com>
Roland Dreier <rdreier@cisco.com> wrote on 10.12.2007 22:47:37:
> It's a big problem. If you cannot implement FMRs in such a way that
> you can handling having map_phys_fmr being called in a context that
> can't sleep, then I think the only option is to remove your FMR
> support.
That's kind of what I feared you would say =)
> It's an optional device feature, so this should be OK
> (although the iSER driver currently seems to depend on a device
> supporting FMRs, which is probably going to be a problem with iWARP
> support in the future anyway).
I don't feel very well with removing code from the driver that iSER seems
to depend on. Are there plans to fix this in iSER?
In reality, PHYP rarely ever returns H_LONG_BUSY, and we haven't had any
problems with iSER in the field yet. I admit that our FMR code is
dangerous, but I prefer "dangerous but working for the customer" over "not
working for the customer at all".
Maybe we can agree on keeping the status quo until no more ULPs depend on
FMR, then remove FMR from ehca? If so, we'd also let the _irqsave
spinlocks around hCalls stay in place.
Regards,
Joachim
^ permalink raw reply
* LPC burst accesses
From: Kári Davíðsson @ 2007-12-11 9:46 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I am in the process of optimizing read accesses to an FPGA in one of our =
custom mpc5200b boards.
I have attempted to do this in two ways, i.e.
1) With the the general SDMA task. Also used by the AC97 audio codec =
driver.
2) Trought the SCLPC fifo offered in relation with the LP bus.
The documentation on freescales site is somehow very vague and even =
though they talk about
read burst accesses they also seem not to be able to guarantee under =
what conditions
burst accesses are generated/not generated. The result that I am seeing =
is that even though=20
that the DMA task and fifo is working as expected (transfering data from =
the FPGA to memory/fifo)
burst reads are _never_ generated (short burst/long burst).
Is there any enlightened soul out there that might shed a litle light on =
this issue or point me into=20
the right direction where I can find more concrete documentation.
I am using linux 2.6.23 as base for these experiments.
rg
kd
^ permalink raw reply
* Re: Patches added to for-2.6.25 and master branches of powerpc.git
From: Balbir Singh @ 2007-12-11 11:58 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18270.8249.393061.840667@cargo.ozlabs.ibm.com>
On Dec 11, 2007 10:59 AM, Paul Mackerras <paulus@samba.org> wrote:
[snip]
Hi, Paul,
Any chance we could get in "Fake NUMA nodes patch" at
http://lkml.org/lkml/2007/12/7/294?
Should I get it into -mm first? It was acked by Olof at
http://lkml.org/lkml/2007/12/10/247.
Thanks,
Balbir Singh
^ permalink raw reply
* Linux 2.6 from git.xilinx and XUPV2P
From: greenlean @ 2007-12-11 13:32 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
I'm a beginner in Xilinx & Linux world and I'm getting a bit loose. I'm
trying to run linux kernel 2.6 that I downloaded from the xilinx git server
on the PPC405 of the Xilinx university program Virtex II Pro (XUPV2P for the
search engine) board, and I'm using the compiler ELDK 4.1 (I' ve just read
this compiler may cause some error so I'll change it, and try the 4.0
version) and I'm getting a lot of compilation error and warning.
I think this is what I should use, Does anybody if I have to patch this
kernel or if it is still prepatched??
My compiler can find some definitions like TASK_SIZE or CONFIG_KERNEL_START,
now I'm solving it writting the values manually , I google for the error
and make the definition where it's needed, but I don't think this is a good
idea ;). I think this definitions should be defined in the .config file,
because I found the values I wrote on a posted message in this list.
Maybe somebody could guide me a bit through this kernel compilation, or send
me .config file running. I don't know if a revision in the project is a good
way, to put things in situation for beginers.
Thanks, any info would be interesting.
--
View this message in context: http://www.nabble.com/Linux-2.6-from-git.xilinx-and-XUPV2P-tp14274035p14274035.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* Re: LPC burst accesses
From: WITTROCK @ 2007-12-11 13:43 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <DD39B5C3F4963040ADC9768BE7E430CB027FEAA7@is-hdq-exchange.marel.net>
I remember doing something like this a while back. I ended up not
implementing it in my project for other reasons, but here is some
correspondence I had with Freescale:
The question
---------------------------------------------------------------------
I am using the LocalPlus bus and BestComm on a MPC5200B to communicate with
an external FPGA.
I am currently using CS2 as the chip select for the FPGA. If I configure
the chip select 2 configuration register for a 16bit address width and 2
byte bus width then all works well (MBAR + 0x0308 = 0x00003500).
I am now trying to configure CS2 to operate in LargeFlash mode with 2 byte
bus width and 26bit address (MBAR + 0x0308 = 0x00003D00) in order to support
a burst read. I have configured the Chip Select Burst Control Register
(BRE2=1), and ensured that PCI is disabled, however I do not see a burst
read performed on the bus.
Before I investigate any further, should it be possible to use the LP in
LargeFlash mode together with its assosciated FIFO and BestComm to perform a
burst read?
The Reply
Local Plus controller performs burst read from LargeFlash or MostGraphic
memory only if an XLB master (CPU) or SCLPC interface initiates burst
access.
In the case of CPU, you should enable cache for Local Plus memory.
In the case of SCLPC, you should define BPT=8 in the SCLPC Control Register
(MBAR + 0x3C08).
Other configurations doesn't force bursting.
Thank you for your interest in Freescale Semiconductor products and for the
opportunity to serve you.
Should you need to contact us with regard to this message, please see the
notes below.
I hope its of some use.
-WITTROCK
--
View this message in context: http://www.nabble.com/LPC-burst-accesses-tp14270986p14274105.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* [PATCH 2.6.25 1/5] PMU: dont lock_kernel()
From: Johannes Berg @ 2007-12-11 14:21 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20071211142122.966506000@sipsolutions.net>
I see nothing that this lock_kernel() actually protects against
so remove it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/macintosh/via-pmu.c | 3 ---
1 file changed, 3 deletions(-)
--- everything.orig/drivers/macintosh/via-pmu.c 2007-12-04 19:51:41.356950738 +0100
+++ everything/drivers/macintosh/via-pmu.c 2007-12-04 19:54:37.936951768 +0100
@@ -33,7 +33,6 @@
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/cuda.h>
-#include <linux/smp_lock.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/pm.h>
@@ -2547,7 +2546,6 @@ pmu_release(struct inode *inode, struct
struct pmu_private *pp = file->private_data;
unsigned long flags;
- lock_kernel();
if (pp != 0) {
file->private_data = NULL;
spin_lock_irqsave(&all_pvt_lock, flags);
@@ -2561,7 +2559,6 @@ pmu_release(struct inode *inode, struct
kfree(pp);
}
- unlock_kernel();
return 0;
}
--
^ permalink raw reply
* [PATCH 2.6.25 3/5] adb: replace sleep notifier with platform driver suspend/resume hooks
From: Johannes Berg @ 2007-12-11 14:21 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20071211142122.966506000@sipsolutions.net>
This patch replaces the pmu sleep notifier that adb had with
suspend/resume hooks in a new platform driver/device.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/macintosh/adb.c | 96 ++++++++++++++++++++++++++++--------------------
1 file changed, 57 insertions(+), 39 deletions(-)
--- everything.orig/drivers/macintosh/adb.c 2007-12-04 19:51:40.646950955 +0100
+++ everything/drivers/macintosh/adb.c 2007-12-04 19:54:40.186972819 +0100
@@ -89,14 +89,6 @@ static int sleepy_trackpad;
static int autopoll_devs;
int __adb_probe_sync;
-#ifdef CONFIG_PM_SLEEP
-static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when);
-static struct pmu_sleep_notifier adb_sleep_notifier = {
- adb_notify_sleep,
- SLEEP_LEVEL_ADB,
-};
-#endif
-
static int adb_scan_bus(void);
static int do_adb_reset_bus(void);
static void adbdev_init(void);
@@ -281,6 +273,36 @@ adb_reset_bus(void)
return 0;
}
+#ifdef CONFIG_PM
+/*
+ * notify clients before sleep
+ */
+static int adb_suspend(struct platform_device *dev, pm_message_t state)
+{
+ adb_got_sleep = 1;
+ /* We need to get a lock on the probe thread */
+ down(&adb_probe_mutex);
+ /* Stop autopoll */
+ if (adb_controller->autopoll)
+ adb_controller->autopoll(0);
+ blocking_notifier_call_chain(&adb_client_list, ADB_MSG_POWERDOWN, NULL);
+
+ return 0;
+}
+
+/*
+ * reset bus after sleep
+ */
+static int adb_resume(struct platform_device *dev)
+{
+ adb_got_sleep = 0;
+ up(&adb_probe_mutex);
+ adb_reset_bus();
+
+ return 0;
+}
+#endif /* CONFIG_PM */
+
int __init adb_init(void)
{
struct adb_driver *driver;
@@ -313,14 +335,12 @@ int __init adb_init(void)
printk(KERN_WARNING "Warning: no ADB interface detected\n");
adb_controller = NULL;
} else {
-#ifdef CONFIG_PM_SLEEP
- pmu_register_sleep_notifier(&adb_sleep_notifier);
-#endif /* CONFIG_PM */
#ifdef CONFIG_PPC
if (machine_is_compatible("AAPL,PowerBook1998") ||
machine_is_compatible("PowerBook1,1"))
sleepy_trackpad = 1;
#endif /* CONFIG_PPC */
+
init_completion(&adb_probe_task_comp);
adbdev_init();
adb_reset_bus();
@@ -330,33 +350,6 @@ int __init adb_init(void)
__initcall(adb_init);
-#ifdef CONFIG_PM
-/*
- * notify clients before sleep and reset bus afterwards
- */
-void
-adb_notify_sleep(struct pmu_sleep_notifier *self, int when)
-{
- switch (when) {
- case PBOOK_SLEEP_REQUEST:
- adb_got_sleep = 1;
- /* We need to get a lock on the probe thread */
- down(&adb_probe_mutex);
- /* Stop autopoll */
- if (adb_controller->autopoll)
- adb_controller->autopoll(0);
- blocking_notifier_call_chain(&adb_client_list,
- ADB_MSG_POWERDOWN, NULL);
- break;
- case PBOOK_WAKE:
- adb_got_sleep = 0;
- up(&adb_probe_mutex);
- adb_reset_bus();
- break;
- }
-}
-#endif /* CONFIG_PM */
-
static int
do_adb_reset_bus(void)
{
@@ -864,7 +857,29 @@ static const struct file_operations adb_
.release = adb_release,
};
-static void
+static struct platform_driver adb_pfdrv = {
+ .driver = {
+ .name = "adb",
+ },
+#ifdef CONFIG_PM
+ .suspend = adb_suspend,
+ .resume = adb_resume,
+#endif
+};
+
+static struct platform_device adb_pfdev = {
+ .name = "adb",
+};
+
+static int __init
+adb_dummy_probe(struct platform_device *dev)
+{
+ if (dev == &adb_pfdev)
+ return 0;
+ return -ENODEV;
+}
+
+static void __init
adbdev_init(void)
{
if (register_chrdev(ADB_MAJOR, "adb", &adb_fops)) {
@@ -876,4 +891,7 @@ adbdev_init(void)
if (IS_ERR(adb_dev_class))
return;
class_device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
+
+ platform_device_register(&adb_pfdev);
+ platform_driver_probe(&adb_pfdrv, adb_dummy_probe);
}
--
^ permalink raw reply
* [PATCH 2.6.25 4/5] via-pmu: kill sleep notifiers completely
From: Johannes Berg @ 2007-12-11 14:21 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20071211142122.966506000@sipsolutions.net>
This patch kills off the remnants of the ancient sleep notifiers.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/macintosh/via-pmu.c | 71 --------------------------------------------
include/linux/pmu.h | 36 ----------------------
2 files changed, 107 deletions(-)
--- everything.orig/drivers/macintosh/via-pmu.c 2007-12-04 19:54:39.056952311 +0100
+++ everything/drivers/macintosh/via-pmu.c 2007-12-04 19:54:41.886951985 +0100
@@ -174,7 +174,6 @@ static struct proc_dir_entry *proc_pmu_b
int __fake_sleep;
int asleep;
-BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
#ifdef CONFIG_ADB
static int adb_dev_map;
@@ -1719,67 +1718,7 @@ pmu_present(void)
return via != 0;
}
-#ifdef CONFIG_PM_SLEEP
-
-static LIST_HEAD(sleep_notifiers);
-
-int
-pmu_register_sleep_notifier(struct pmu_sleep_notifier *n)
-{
- struct list_head *list;
- struct pmu_sleep_notifier *notifier;
-
- for (list = sleep_notifiers.next; list != &sleep_notifiers;
- list = list->next) {
- notifier = list_entry(list, struct pmu_sleep_notifier, list);
- if (n->priority > notifier->priority)
- break;
- }
- __list_add(&n->list, list->prev, list);
- return 0;
-}
-EXPORT_SYMBOL(pmu_register_sleep_notifier);
-
-int
-pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n)
-{
- if (n->list.next == 0)
- return -ENOENT;
- list_del(&n->list);
- n->list.next = NULL;
- return 0;
-}
-EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
-#endif /* CONFIG_PM_SLEEP */
-
#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
-
-/* Sleep is broadcast last-to-first */
-static void broadcast_sleep(int when)
-{
- struct list_head *list;
- struct pmu_sleep_notifier *notifier;
-
- for (list = sleep_notifiers.prev; list != &sleep_notifiers;
- list = list->prev) {
- notifier = list_entry(list, struct pmu_sleep_notifier, list);
- notifier->notifier_call(notifier, when);
- }
-}
-
-/* Wake is broadcast first-to-last */
-static void broadcast_wake(void)
-{
- struct list_head *list;
- struct pmu_sleep_notifier *notifier;
-
- for (list = sleep_notifiers.next; list != &sleep_notifiers;
- list = list->next) {
- notifier = list_entry(list, struct pmu_sleep_notifier, list);
- notifier->notifier_call(notifier, PBOOK_WAKE);
- }
-}
-
/*
* This struct is used to store config register values for
* PCI devices which may get powered off when we sleep.
@@ -1962,9 +1901,6 @@ pmac_suspend_devices(void)
pm_prepare_console();
- /* Notify old-style device drivers */
- broadcast_sleep(PBOOK_SLEEP_REQUEST);
-
/* Sync the disks. */
/* XXX It would be nice to have some way to ensure that
* nobody is dirtying any new buffers while we wait. That
@@ -1973,12 +1909,9 @@ pmac_suspend_devices(void)
*/
sys_sync();
- broadcast_sleep(PBOOK_SLEEP_NOW);
-
/* Send suspend call to devices, hold the device core's dpm_sem */
ret = device_suspend(PMSG_SUSPEND);
if (ret) {
- broadcast_wake();
printk(KERN_ERR "Driver sleep failed\n");
return -EBUSY;
}
@@ -2019,7 +1952,6 @@ pmac_suspend_devices(void)
local_irq_enable();
preempt_enable();
device_resume();
- broadcast_wake();
printk(KERN_ERR "Driver powerdown failed\n");
return -EBUSY;
}
@@ -2073,9 +2005,6 @@ pmac_wakeup_devices(void)
/* Resume devices */
device_resume();
- /* Notify old style drivers */
- broadcast_wake();
-
pm_restore_console();
return 0;
--- everything.orig/include/linux/pmu.h 2007-12-04 19:51:40.326951823 +0100
+++ everything/include/linux/pmu.h 2007-12-04 19:54:41.896951606 +0100
@@ -159,42 +159,6 @@ extern void pmu_unlock(void);
extern int pmu_present(void);
extern int pmu_get_model(void);
-#ifdef CONFIG_PM
-/*
- * Stuff for putting the powerbook to sleep and waking it again.
- *
- */
-#include <linux/list.h>
-
-struct pmu_sleep_notifier
-{
- void (*notifier_call)(struct pmu_sleep_notifier *self, int when);
- int priority;
- struct list_head list;
-};
-
-/* Code values for calling sleep/wakeup handlers
- */
-#define PBOOK_SLEEP_REQUEST 1
-#define PBOOK_SLEEP_NOW 2
-#define PBOOK_WAKE 3
-
-/* priority levels in notifiers */
-#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */
-#define SLEEP_LEVEL_MEDIABAY 90 /* Media bay driver */
-#define SLEEP_LEVEL_BLOCK 80 /* IDE, SCSI */
-#define SLEEP_LEVEL_NET 70 /* bmac, gmac */
-#define SLEEP_LEVEL_MISC 60 /* Anything else */
-#define SLEEP_LEVEL_USERLAND 55 /* Reserved for apm_emu */
-#define SLEEP_LEVEL_ADB 50 /* ADB (async) */
-#define SLEEP_LEVEL_SOUND 40 /* Sound driver (blocking) */
-
-/* special register notifier functions */
-int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier);
-int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier);
-
-#endif /* CONFIG_PM */
-
#define PMU_MAX_BATTERIES 2
/* values for pmu_power_flags */
--
^ permalink raw reply
* [PATCH 2.6.25 0/5] PMU updates including suspend
From: Johannes Berg @ 2007-12-11 14:21 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Since none of the patches seem to have made it into any git tree so far,
here's a resend of my patch series that removes/replaces the adb suspend
notifiers and makes PMU suspend usable via /sys/power/state.
I have submitted a patch to allow turning off the freezer to Rafael
separately who had only minor comments on the second version which I
fixed in the third version I just sent out.
Please consider these patches for 2.6.25.
johannes
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox