Skip to content

Commit

Permalink
[POWERPC] cpm2: CPM2 interrupt controller fix
Browse files Browse the repository at this point in the history
This contains important fixes for the CPM2 PIC code. Eliminated
CPM_IRQ_OFFSET, pulling the respective interrupt numbers from the interrupt
mapping. Updated devicetree files to reflect that. Changed direct
IC-related IO accesses to the IO accessors. Fixed all the sense values to
keep coherency with ipic. In the current code, CPM2 stuff will have no IRQs
and hence could be hardly usable.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Vitaly Bordug authored and Paul Mackerras committed Feb 7, 2007
1 parent c19cdcb commit 73844ec
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 88 deletions.
47 changes: 27 additions & 20 deletions arch/powerpc/boot/dts/mpc8272ads.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
reg = <00000000 4000000 f4500000 00000020>;
};

chosen {
name = "chosen";
linux,platform = <0>;
interrupt-controller = <10c00>;
linux,phandle = <400>;
};

soc8272@f0000000 {
#address-cells = <1>;
#size-cells = <1>;
Expand All @@ -71,15 +78,15 @@
ethernet-phy@0 {
linux,phandle = <2452000>;
interrupt-parent = <10c00>;
interrupts = <19 1>;
interrupts = <17 4>;
reg = <0>;
bitbang = [ 12 12 13 02 02 01 ];
device_type = "ethernet-phy";
};
ethernet-phy@1 {
linux,phandle = <2452001>;
interrupt-parent = <10c00>;
interrupts = <19 1>;
interrupts = <17 4>;
bitbang = [ 12 12 13 02 02 01 ];
reg = <3>;
device_type = "ethernet-phy";
Expand All @@ -90,7 +97,7 @@
#address-cells = <1>;
#size-cells = <0>;
device_type = "network";
device-id = <2>;
device-id = <1>;
compatible = "fs_enet";
model = "FCC";
reg = <11300 20 8400 100 11380 30>;
Expand All @@ -104,7 +111,7 @@

ethernet@25000 {
device_type = "network";
device-id = <3>;
device-id = <2>;
compatible = "fs_enet";
model = "FCC";
reg = <11320 20 8500 100 113b0 30>;
Expand Down Expand Up @@ -133,7 +140,7 @@
device_type = "serial";
compatible = "cpm_uart";
model = "SCC";
device-id = <2>;
device-id = <1>;
reg = <11a00 20 8000 100>;
current-speed = <1c200>;
interrupts = <28 2>;
Expand All @@ -147,7 +154,7 @@
device_type = "serial";
compatible = "cpm_uart";
model = "SCC";
device-id = <5>;
device-id = <4>;
reg = <11a60 20 8300 100>;
current-speed = <1c200>;
interrupts = <2b 2>;
Expand Down Expand Up @@ -181,24 +188,24 @@
interrupt-map = <

/* IDSEL 0x16 */
b000 0 0 1 f8200000 40 0
b000 0 0 2 f8200000 41 0
b000 0 0 3 f8200000 42 0
b000 0 0 4 f8200000 43 0
b000 0 0 1 f8200000 40 8
b000 0 0 2 f8200000 41 8
b000 0 0 3 f8200000 42 8
b000 0 0 4 f8200000 43 8

/* IDSEL 0x17 */
b800 0 0 1 f8200000 43 0
b800 0 0 2 f8200000 40 0
b800 0 0 3 f8200000 41 0
b800 0 0 4 f8200000 42 0
b800 0 0 1 f8200000 43 8
b800 0 0 2 f8200000 40 8
b800 0 0 3 f8200000 41 8
b800 0 0 4 f8200000 42 8

/* IDSEL 0x18 */
c000 0 0 1 f8200000 42 0
c000 0 0 2 f8200000 43 0
c000 0 0 3 f8200000 40 0
c000 0 0 4 f8200000 41 0>;
c000 0 0 1 f8200000 42 8
c000 0 0 2 f8200000 43 8
c000 0 0 3 f8200000 40 8
c000 0 0 4 f8200000 41 8>;
interrupt-parent = <10c00>;
interrupts = <14 3>;
interrupts = <14 8>;
bus-range = <0 0>;
ranges = <02000000 0 80000000 80000000 0 40000000
01000000 0 00000000 f6000000 0 02000000>;
Expand All @@ -210,7 +217,7 @@
model = "SEC2";
compatible = "talitos";
reg = <30000 10000>;
interrupts = <b 0>;
interrupts = <b 2>;
interrupt-parent = <10c00>;
num-channels = <4>;
channel-fifo-len = <18>;
Expand Down
10 changes: 5 additions & 5 deletions arch/powerpc/boot/dts/mpc8560ads.dts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
a800 0 0 4 40000 31 1>;

interrupt-parent = <40000>;
interrupts = <42 0>;
interrupts = <8 0>;
bus-range = <0 0>;
ranges = <02000000 0 80000000 80000000 0 20000000
01000000 0 00000000 e2000000 0 01000000>;
Expand Down Expand Up @@ -250,7 +250,7 @@
rx-clock = <1>;
tx-clock = <1>;
current-speed = <1c200>;
interrupts = <64 1>;
interrupts = <28 8>;
interrupt-parent = <90c00>;
};

Expand All @@ -264,7 +264,7 @@
rx-clock = <2>;
tx-clock = <2>;
current-speed = <1c200>;
interrupts = <65 1>;
interrupts = <29 8>;
interrupt-parent = <90c00>;
};

Expand All @@ -278,7 +278,7 @@
clock-setup = <ff00ffff 250000>;
rx-clock = <15>;
tx-clock = <16>;
interrupts = <5d 1>;
interrupts = <21 8>;
interrupt-parent = <90c00>;
phy-handle = <2452002>;
};
Expand All @@ -293,7 +293,7 @@
clock-setup = <ffff00ff 3700>;
rx-clock = <17>;
tx-clock = <18>;
interrupts = <5e 1>;
interrupts = <22 8>;
interrupt-parent = <90c00>;
phy-handle = <2452003>;
};
Expand Down
Loading

0 comments on commit 73844ec

Please sign in to comment.