Skip to contentSkip to conversation

Powerpc: Fix the warining message from the return value of function get_property

PATCH New Zang Roy-r61911 2 participants 7 messages Oct 18, 2006 – Nov 14, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Powerpc: Fix the warining message from the return value of function get_property

The following patch fixes the warning message from the return value of function get_property().
Add const constrain for the return value of function get_property()

--

arch/powerpc/sysdev/tsi108_dev.c +2 -2
index 11de090..97f37ef 100644
@@ -48,7 +48,7 @@ phys_addr_t get_csrbase(void)
 	tsi = of_find_node_by_type(NULL, "tsi-bridge");
 	if (tsi) {
 		unsigned int size;
-		void *prop = get_property(tsi, "reg", &size);
+		const void *prop = get_property(tsi, "reg", &size);
 		tsi108_csr_base = of_translate_address(tsi, prop);
 		of_node_put(tsi);
 	};
@@ -79,7 +79,7 @@ static int __init tsi108_eth_of_init(voi
 		hw_info tsi_eth_data;
 		unsigned int *id;
 		unsigned int *phy_id;
-		void *mac_addr;
+		const void *mac_addr;
 		phandle *ph;
 
 		memset(r, 0, sizeof(r));
#1 lore raw

PATCH 1/1 Powerpc: Make pci_read_irq_line the default: on mpc7448hpc2 board

The following patch updates the tsi108/9 pci interrupt controller code on mpc7448hpc2 board.

The patch should apply after Ben's patch
http://ozlabs.org/pipermail/linuxppc-dev/2006-October/027287.html

Of course, the mpc7448hpc2 part in that patch should be replaced by this one :-).

---
 arch/powerpc/boot/dts/mpc7448hpc2.dts             |   44 ++++++----
 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |   96 +++++----------------
 arch/powerpc/sysdev/tsi108_pci.c                  |   63 ++++++++++++--
 3 files changed, 108 insertions(+), 95 deletions(-)
arch/powerpc/boot/dts/mpc7448hpc2.dts +28 -16
index d7b985e..3f9454e 100644
@@ -161,29 +161,41 @@
 			interrupt-map = <
 
 				/* IDSEL 0x11 */
-				0800 0 0 1 7400 24 0
-				0800 0 0 2 7400 25 0
-				0800 0 0 3 7400 26 0
-				0800 0 0 4 7400 27 0
+				0800 0 0 1 1180 24 0
+				0800 0 0 2 1180 25 0
+				0800 0 0 3 1180 26 0
+				0800 0 0 4 1180 27 0
 
 				/* IDSEL 0x12 */
-				1000 0 0 1 7400 25 0
-				1000 0 0 2 7400 26 0
-				1000 0 0 3 7400 27 0
-				1000 0 0 4 7400 24 0
+				1000 0 0 1 1180 25 0
+				1000 0 0 2 1180 26 0
+				1000 0 0 3 1180 27 0
+				1000 0 0 4 1180 24 0
 
 				/* IDSEL 0x13 */
-				1800 0 0 1 7400 26 0
-				1800 0 0 2 7400 27 0
-				1800 0 0 3 7400 24 0
-				1800 0 0 4 7400 25 0
+				1800 0 0 1 1180 26 0
+				1800 0 0 2 1180 27 0
+				1800 0 0 3 1180 24 0
+				1800 0 0 4 1180 25 0
 
 				/* IDSEL 0x14 */
-				2000 0 0 1 7400 27 0
-				2000 0 0 2 7400 24 0
-				2000 0 0 3 7400 25 0
-				2000 0 0 4 7400 26 0
+				2000 0 0 1 1180 27 0
+				2000 0 0 2 1180 24 0
+				2000 0 0 3 1180 25 0
+				2000 0 0 4 1180 26 0
 				>;
+			router@1180 {
+				linux,phandle = <1180>;
+				clock-frequency = <0>;
+				interrupt-controller;
+				device_type = "pic-router";
+				#address-cells = <0>;
+				#interrupt-cells = <2>;
+				built-in;
+                	        big-endian;
+				interrupts = <17 2>;
+				interrupt-parent = <7400>;
+			};
 		};
 	};
 
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +24 -72

150 lines not on this page · raw message

arch/powerpc/sysdev/tsi108_pci.c +56 -7

89 lines not on this page · raw message

Signature · 1 line
1.4.0
#2 lore raw

Re: [PATCH] Powerpc: Make pci_read_irq_line the default: on mpc7448hpc2 board

Quoted 9 lines · On Fri, 2006-10-27 at 19:51, Zang Roy-r61911 wrote:

The following patch updates the tsi108/9 pci interrupt controller code on mpc7448hpc2 board.

The patch should apply after Ben's patch
http://ozlabs.org/pipermail/linuxppc-dev/2006-October/027287.html

Of course, the mpc7448hpc2 part in that patch should be replaced by this one :-).

Missed the following line :-)

Quoted 5 lines
---
 arch/powerpc/boot/dts/mpc7448hpc2.dts             |   44 ++++++----
 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |   96 +++++----------------
 arch/powerpc/sysdev/tsi108_pci.c                  |   63 ++++++++++++--
 3 files changed, 108 insertions(+), 95 deletions(-)
#3 lore raw

PATCH 1/1 Powerpc: Make pci_read_irq_line the default: on mpc7448hpc2 board

This patch targets the current powerpc git tree.

The following patch adds a tsi108/9 pci interrupt controller host. On mpc7448hpc2 board, pci_irq_fixup function is removed, which makes the pci_read_irq_line be the default pci irq fixup.

---
 arch/powerpc/boot/dts/mpc7448hpc2.dts             |   44 +++++++---
 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |   90 ++++++---------------
 arch/powerpc/sysdev/tsi108_pci.c                  |   63 +++++++++++++--
 3 files changed, 108 insertions(+), 89 deletions(-)
arch/powerpc/boot/dts/mpc7448hpc2.dts +28 -16
index d7b985e..3f9454e 100644
@@ -161,29 +161,41 @@
 			interrupt-map = <
 
 				/* IDSEL 0x11 */
-				0800 0 0 1 7400 24 0
-				0800 0 0 2 7400 25 0
-				0800 0 0 3 7400 26 0
-				0800 0 0 4 7400 27 0
+				0800 0 0 1 1180 24 0
+				0800 0 0 2 1180 25 0
+				0800 0 0 3 1180 26 0
+				0800 0 0 4 1180 27 0
 
 				/* IDSEL 0x12 */
-				1000 0 0 1 7400 25 0
-				1000 0 0 2 7400 26 0
-				1000 0 0 3 7400 27 0
-				1000 0 0 4 7400 24 0
+				1000 0 0 1 1180 25 0
+				1000 0 0 2 1180 26 0
+				1000 0 0 3 1180 27 0
+				1000 0 0 4 1180 24 0
 
 				/* IDSEL 0x13 */
-				1800 0 0 1 7400 26 0
-				1800 0 0 2 7400 27 0
-				1800 0 0 3 7400 24 0
-				1800 0 0 4 7400 25 0
+				1800 0 0 1 1180 26 0
+				1800 0 0 2 1180 27 0
+				1800 0 0 3 1180 24 0
+				1800 0 0 4 1180 25 0
 
 				/* IDSEL 0x14 */
-				2000 0 0 1 7400 27 0
-				2000 0 0 2 7400 24 0
-				2000 0 0 3 7400 25 0
-				2000 0 0 4 7400 26 0
+				2000 0 0 1 1180 27 0
+				2000 0 0 2 1180 24 0
+				2000 0 0 3 1180 25 0
+				2000 0 0 4 1180 26 0
 				>;
+			router@1180 {
+				linux,phandle = <1180>;
+				clock-frequency = <0>;
+				interrupt-controller;
+				device_type = "pic-router";
+				#address-cells = <0>;
+				#interrupt-cells = <2>;
+				built-in;
+                	        big-endian;
+				interrupts = <17 2>;
+				interrupt-parent = <7400>;
+			};
 		};
 	};
 
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +24 -66

144 lines not on this page · raw message

arch/powerpc/sysdev/tsi108_pci.c +56 -7

89 lines not on this page · raw message

Signature · 1 line
1.4.0
#4 lore raw

Re: [PATCH] Powerpc: Make pci_read_irq_line the default: on mpc7448hpc2 board

Good. Same comments as with Vitaly though :-)

arch/powerpc/sysdev/tsi108_pci.c static struct irq_chip tsi108_pci_irq = · line 416

Quoted 12 lines
arch/powerpc/sysdev/tsi108_pci.c +12 -0
+static void pci_irq_host_unmap(struct irq_host *h, unsigned int virq)
+{
+	/* Make sure irq is masked in hardware */
+	
+	tsi108_pci_int_mask(virq);
+
+	/* remove chip and handler */
+	set_irq_chip_and_handler(virq, NULL, NULL);
+
+	/* Make sure it's completed */
+	synchronize_irq(virq);
+}

You probably don't need that... the generic code should do the above just fine unless something is wrong in which case we should fix it.

arch/powerpc/sysdev/tsi108_pci.c static struct irq_chip tsi108_pci_irq = · line 421

Quoted 4 lines
arch/powerpc/sysdev/tsi108_pci.c +4 -0
+static int pci_irq_host_match(struct irq_host *h, struct device_node *node)
+{
+	return pci_irq_node == NULL || pci_irq_node == node;
+}

You probably don't want the NULL test here.

Cheers,
Ben.

#5 lore raw

Re: [PATCH] Powerpc: Make pci_read_irq_line the default: onmpc7448hpc2 board

Quoted 2 lines · Benjamin Herrenschmidt

Good. Same comments as with Vitaly though :-)

Sorry, I do not noticed your previous comment on Vitaly :-). Roy

#6 lore raw

PATCH 1/1 Powerpc: Make pci_read_irq_line the default: on mpc7448hpc2 board

In reply to Zang Roy-r61911

This patch targets the current powerpc git tree.

The following patch adds a tsi108/9 pci interrupt controller host. On mpc7448hpc2 board, pci_irq_fixup function is removed, which makes the pci_read_irq_line be the default pci irq fixup.

---
 arch/powerpc/boot/dts/mpc7448hpc2.dts             |   44 +++++++---
 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |   90 ++++++---------------
 arch/powerpc/sysdev/tsi108_pci.c                  |   50 ++++++++++--
 3 files changed, 95 insertions(+), 89 deletions(-)
arch/powerpc/boot/dts/mpc7448hpc2.dts +28 -16
index d7b985e..3f9454e 100644
@@ -161,29 +161,41 @@
 			interrupt-map = <
 
 				/* IDSEL 0x11 */
-				0800 0 0 1 7400 24 0
-				0800 0 0 2 7400 25 0
-				0800 0 0 3 7400 26 0
-				0800 0 0 4 7400 27 0
+				0800 0 0 1 1180 24 0
+				0800 0 0 2 1180 25 0
+				0800 0 0 3 1180 26 0
+				0800 0 0 4 1180 27 0
 
 				/* IDSEL 0x12 */
-				1000 0 0 1 7400 25 0
-				1000 0 0 2 7400 26 0
-				1000 0 0 3 7400 27 0
-				1000 0 0 4 7400 24 0
+				1000 0 0 1 1180 25 0
+				1000 0 0 2 1180 26 0
+				1000 0 0 3 1180 27 0
+				1000 0 0 4 1180 24 0
 
 				/* IDSEL 0x13 */
-				1800 0 0 1 7400 26 0
-				1800 0 0 2 7400 27 0
-				1800 0 0 3 7400 24 0
-				1800 0 0 4 7400 25 0
+				1800 0 0 1 1180 26 0
+				1800 0 0 2 1180 27 0
+				1800 0 0 3 1180 24 0
+				1800 0 0 4 1180 25 0
 
 				/* IDSEL 0x14 */
-				2000 0 0 1 7400 27 0
-				2000 0 0 2 7400 24 0
-				2000 0 0 3 7400 25 0
-				2000 0 0 4 7400 26 0
+				2000 0 0 1 1180 27 0
+				2000 0 0 2 1180 24 0
+				2000 0 0 3 1180 25 0
+				2000 0 0 4 1180 26 0
 				>;
+			router@1180 {
+				linux,phandle = <1180>;
+				clock-frequency = <0>;
+				interrupt-controller;
+				device_type = "pic-router";
+				#address-cells = <0>;
+				#interrupt-cells = <2>;
+				built-in;
+                	        big-endian;
+				interrupts = <17 2>;
+				interrupt-parent = <7400>;
+			};
 		};
 	};
 
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +24 -66

144 lines not on this page · raw message

arch/powerpc/sysdev/tsi108_pci.c +43 -7

76 lines not on this page · raw message

Signature · 1 line
1.4.0