LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pasemi: Another IOMMU bugfix for 64K PAGE_SIZE
From: Olof Johansson @ 2007-08-17  3:57 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

More fallout from the switch from PAGE_SIZE based IOMMU to the native page
size for the driver. By pure luck it happened to work most of the time, since
we end up invalidating the wrong entries in the TLB.

Signed-off-by: Olof Johansson <olof@lixom.net>


Index: linux-2.6/arch/powerpc/platforms/pasemi/iommu.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pasemi/iommu.c
+++ linux-2.6/arch/powerpc/platforms/pasemi/iommu.c
@@ -93,7 +93,7 @@ static void iobmap_build(struct iommu_ta
 
 	pr_debug("iobmap: build at: %lx, %lx, addr: %lx\n", index, npages, uaddr);
 
-	bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
+	bus_addr = (tbl->it_offset + index) << IOBMAP_PAGE_SHIFT;
 
 	ip = ((u32 *)tbl->it_base) + index;
 
@@ -118,7 +118,7 @@ static void iobmap_free(struct iommu_tab
 
 	pr_debug("iobmap: free at: %lx, %lx\n", index, npages);
 
-	bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
+	bus_addr = (tbl->it_offset + index) << IOBMAP_PAGE_SHIFT;
 
 	ip = ((u32 *)tbl->it_base) + index;
 
@@ -137,7 +137,7 @@ static void iommu_table_iobmap_setup(voi
 	iommu_table_iobmap.it_busno = 0;
 	iommu_table_iobmap.it_offset = 0;
 	/* it_size is in number of entries */
-	iommu_table_iobmap.it_size = 0x80000000 >> PAGE_SHIFT;
+	iommu_table_iobmap.it_size = 0x80000000 >> IOBMAP_PAGE_SHIFT;
 
 	/* Initialize the common IOMMU code */
 	iommu_table_iobmap.it_base = (unsigned long)iob_l2_base;

^ permalink raw reply

* Re: [PATCH 1/2] Add scaled time to taskstats based process accounting
From: Michael Neuling @ 2007-08-17  4:56 UTC (permalink / raw)
  To: balbir; +Cc: Andrew Morton, linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <46C52872.9060408@linux.vnet.ibm.com>

In message <46C52872.9060408@linux.vnet.ibm.com> you wrote:
> Michael Neuling wrote:
> >> I'd also request for you to add a cpu_scaled_run_real_total for use
> >> by delay accounting. cpu_scaled_run_real_total should be similar in
> >> functionality to cpu_run_real_total.
> > 
> > Will do.  Should I add cpu_scaled_run_real_total to the end of the
> > struct taskstat, or next to cpu_run_real_total?
> > 
> 
> Please add it to the end, that helps maintain binary compatibility
> across all versions of taskstats.

OK

> 
> >>>  	/* Note: this timer irq context must be accounted for as well. */
> >>> -	if (user_tick)
> >>> +	if (user_tick) {
> >>>  		account_user_time(p, jiffies_to_cputime(1));
> >>> -	else
> >>> +		account_user_time_scaled(p, jiffies_to_cputime(1));
> >>> +	} else {
> >>>  		account_system_time(p, HARDIRQ_OFFSET, jiffies_to_cputime(1));
> >>> +		account_system_time_scaled(p, jiffies_to_cputime(1));
> >>> +	}
> >> I am a little confused here, scaled accounting and regular accounting
> >> go hand in hand?
> > 
> > We need to account for scaled and normal time in this generic code.
> > All other calls to account_(user|system)_time are in arch code.  
> > 
> 
> So the assumption here is that we ran at full frequency during
> this time, is my understanding correct?

Yes.  

I guess we could keep a per CPU last scaling factor for this case
(similar to what we are storing in the POWERPC paca)

Mikey

^ permalink raw reply

* Please pull from 'fixes-2.6.23' branch
From: Kumar Gala @ 2007-08-17  5:02 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

Please pull from 'fixes-2.6.23' branch of

	master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git fixes-2.6.23

to receive the following updates:

 arch/powerpc/boot/dts/mpc8544ds.dts        |   88 ++++------
 arch/powerpc/boot/dts/mpc8641_hpcn.dts     |  114 ++----------
 arch/powerpc/kernel/traps.c                |    4
 arch/powerpc/platforms/85xx/Kconfig        |    1
 arch/powerpc/platforms/85xx/mpc8544_ds.c   |  214 +-----------------------
 arch/powerpc/platforms/86xx/Kconfig        |    1
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |  224 +------------------------
 arch/powerpc/platforms/Kconfig             |    8
 arch/powerpc/platforms/Makefile            |    3
 arch/powerpc/platforms/fsl_uli1575.c       |  255 +++++++++++++++++++++++++++++
 arch/powerpc/sysdev/rtc_cmos_setup.c       |   15 +
 include/asm-powerpc/reg_booke.h            |   12 +
 12 files changed, 386 insertions(+), 553 deletions(-)

Becky Bruce (1):
      [POWERPC] Fix FSL BookE machine check reporting

Kumar Gala (2):
      [POWERPC] Add interrupt resource for RTC CMOS driver
      [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards

^ permalink raw reply

* [PATCH] [POWERPC] Add interrupt resource for RTC CMOS driver
From: Kumar Gala @ 2007-08-17  5:03 UTC (permalink / raw)
  To: linuxppc-dev

The RTC CMOS driver expects the interrupt to be a resource of the platform
device.  Use a fixed interrupt value of 8 since on PPC if we are using this
its off an i8259 which we ensure has interrupt numbers 0..15.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/sysdev/rtc_cmos_setup.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/sysdev/rtc_cmos_setup.c b/arch/powerpc/sysdev/rtc_cmos_setup.c
index e276048..1d2be7d 100644
--- a/arch/powerpc/sysdev/rtc_cmos_setup.c
+++ b/arch/powerpc/sysdev/rtc_cmos_setup.c
@@ -20,14 +20,16 @@ static int  __init add_rtc(void)
 {
 	struct device_node *np;
 	struct platform_device *pd;
-	struct resource res;
+	struct resource res[2];
 	int ret;

+	memset(&res, 0, sizeof(res));
+
 	np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00");
 	if (!np)
 		return -ENODEV;

-	ret = of_address_to_resource(np, 0, &res);
+	ret = of_address_to_resource(np, 0, &res[0]);
 	of_node_put(np);
 	if (ret)
 		return ret;
@@ -36,11 +38,16 @@ static int  __init add_rtc(void)
 	 * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h.  Verify that the
 	 * address provided by the device node matches.
 	 */
-	if (res.start != RTC_PORT(0))
+	if (res[0].start != RTC_PORT(0))
 		return -EINVAL;

+	res[1].start = 8;
+	res[1].end = 8;
+	res[1].flags = IORESOURCE_IRQ;
+
 	pd = platform_device_register_simple("rtc_cmos", -1,
-					     &res, 1);
+					     &res[0], 2);
+
 	if (IS_ERR(pd))
 		return PTR_ERR(pd);

-- 
1.5.2.2

^ permalink raw reply related

* [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
From: Kumar Gala @ 2007-08-17  5:03 UTC (permalink / raw)
  To: linuxppc-dev

The interrupt routing in the device trees for the ULI M1575 was
inproperly using the interrupt line field as pci function.  Fixed
up the device tree's to actual conform for to specification and
changed the interrupt mapping code so it just uses a static mapping
setup as follows:

PIRQA - IRQ9
PIRQB - IRQ10
PIRQC - IRQ11
PIRQD - IRQ12
USB 1.1 OCHI (1c.0) - IRQ12
USB 1.1 OCHI (1c.1) - IRQ9
USB 1.1 OCHI (1c.2) - IRQ10
USB 1.1 ECHI (1c.3) - IRQ11
LAN (1b.0) - IRQ6
AC97 (1d.0) - IRQ6
Modem (1d.1) - IRQ6
HD Audio (1d.2) - IRQ6
SATA (1f.1) - IRQ5
SMB (1e.1) - IRQ7
PMU (1e.2) - IRQ7
PATA (1f.0) - IRQ14/15

Took the oppurtunity to refactor the code into a single file so we
don't have to duplicate these fixes on the two current boards in the
tree and several forth coming boards that will also need the code.

Fixed RTC support that requires a dummy memory read on the P2P bridge
to unlock the RTC and setup the default of the RTC alarm registers to
match with a basic x86 style CMOS RTC.

Moved code that poked ISA registers to a FIXUP_FINAL quirk to ensure
the PCI IO space has been setup properly before we start poking ISA
registers at random locations.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/boot/dts/mpc8544ds.dts        |   88 ++++------
 arch/powerpc/boot/dts/mpc8641_hpcn.dts     |  114 +++----------
 arch/powerpc/platforms/85xx/Kconfig        |    1 +
 arch/powerpc/platforms/85xx/mpc8544_ds.c   |  214 ++----------------------
 arch/powerpc/platforms/86xx/Kconfig        |    1 +
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |  224 ++-----------------------
 arch/powerpc/platforms/Kconfig             |    8 +
 arch/powerpc/platforms/Makefile            |    3 +
 arch/powerpc/platforms/fsl_uli1575.c       |  255 ++++++++++++++++++++++++++++
 9 files changed, 363 insertions(+), 545 deletions(-)
 create mode 100644 arch/powerpc/platforms/fsl_uli1575.c

diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 4680e20..3e79bf0 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -44,8 +44,18 @@
 		#size-cells = <1>;
 		#interrupt-cells = <2>;
 		device_type = "soc";
-		ranges = <0 e0000000 00100000>;
-		reg = <e0000000 00100000>;	// CCSRBAR 1M
+
+
+		ranges = <00001000 e0001000 000ff000
+			  80000000 80000000 20000000
+			  a0000000 a0000000 10000000
+			  b0000000 b0000000 00100000
+			  c0000000 c0000000 20000000
+			  b0100000 b0100000 00100000
+			  e1000000 e1000000 00010000
+			  e1010000 e1010000 00010000
+			  e1020000 e1020000 00010000>;
+		reg = <e0000000 00001000>;	// CCSRBAR 1M
 		bus-frequency = <0>;		// Filled out by uboot.

 		memory-controller@2000 {
@@ -161,8 +171,8 @@
 			interrupt-parent = <&mpic>;
 			interrupts = <18 2>;
 			bus-range = <0 ff>;
-			ranges = <02000000 0 80000000 80000000 0 10000000
-				  01000000 0 00000000 e2000000 0 00800000>;
+			ranges = <02000000 0 c0000000 c0000000 0 20000000
+				  01000000 0 00000000 e1000000 0 00010000>;
 			clock-frequency = <3f940aa>;
 			#interrupt-cells = <1>;
 			#size-cells = <2>;
@@ -178,8 +188,8 @@
 			#address-cells = <3>;
 			reg = <9000 1000>;
 			bus-range = <0 ff>;
-			ranges = <02000000 0 90000000 90000000 0 10000000
-				  01000000 0 00000000 e3000000 0 00800000>;
+			ranges = <02000000 0 80000000 80000000 0 20000000
+				  01000000 0 00000000 e1010000 0 00010000>;
 			clock-frequency = <1fca055>;
 			interrupt-parent = <&mpic>;
 			interrupts = <1a 2>;
@@ -202,7 +212,7 @@
 			reg = <a000 1000>;
 			bus-range = <0 ff>;
 			ranges = <02000000 0 a0000000 a0000000 0 10000000
-				  01000000 0 00000000 e2800000 0 00800000>;
+				  01000000 0 00000000 e1020000 0 00010000>;
 			clock-frequency = <1fca055>;
 			interrupt-parent = <&mpic>;
 			interrupts = <19 2>;
@@ -224,49 +234,29 @@
 			#address-cells = <3>;
 			reg = <b000 1000>;
 			bus-range = <0 ff>;
-			ranges = <02000000 0 b0000000 b0000000 0 10000000
-				  01000000 0 00000000 e3800000 0 00800000>;
+			ranges = <02000000 0 b0000000 b0000000 0 00100000
+				  01000000 0 00000000 b0100000 0 00100000>;
 			clock-frequency = <1fca055>;
 			interrupt-parent = <&mpic>;
 			interrupts = <1b 2>;
-			interrupt-map-mask = <f800 0 0 7>;
+			interrupt-map-mask = <fb00 0 0 0>;
 			interrupt-map = <
-
-				// IDSEL 0x1a
-				d000 0 0 1 &i8259 6 2
-				d000 0 0 2 &i8259 3 2
-				d000 0 0 3 &i8259 4 2
-				d000 0 0 4 &i8259 5 2
-
-				// IDSEL 0x1b
-				d800 0 0 1 &i8259 5 2
-				d800 0 0 2 &i8259 0 0
-				d800 0 0 3 &i8259 0 0
-				d800 0 0 4 &i8259 0 0
-
 				// IDSEL 0x1c  USB
-				e000 0 0 1 &i8259 9 2
-				e000 0 0 2 &i8259 a 2
-				e000 0 0 3 &i8259 c 2
-				e000 0 0 4 &i8259 7 2
+				e000 0 0 0 &i8259 c 2
+				e100 0 0 0 &i8259 9 2
+				e200 0 0 0 &i8259 a 2
+				e300 0 0 0 &i8259 b 2

 				// IDSEL 0x1d  Audio
-				e800 0 0 1 &i8259 9 2
-				e800 0 0 2 &i8259 a 2
-				e800 0 0 3 &i8259 b 2
-				e800 0 0 4 &i8259 0 0
+				e800 0 0 0 &i8259 6 2

 				// IDSEL 0x1e Legacy
-				f000 0 0 1 &i8259 c 2
-				f000 0 0 2 &i8259 0 0
-				f000 0 0 3 &i8259 0 0
-				f000 0 0 4 &i8259 0 0
+				f000 0 0 0 &i8259 7 2
+				f100 0 0 0 &i8259 7 2

 				// IDSEL 0x1f IDE/SATA
-				f800 0 0 1 &i8259 6 2
-				f800 0 0 2 &i8259 0 0
-				f800 0 0 3 &i8259 0 0
-				f800 0 0 4 &i8259 0 0
+				f800 0 0 0 &i8259 e 2
+				f900 0 0 0 &i8259 5 2
 			>;
 			uli1575@0 {
 				reg = <0 0 0 0 0>;
@@ -274,10 +264,10 @@
 				#address-cells = <3>;
 				ranges = <02000000 0 b0000000
 					  02000000 0 b0000000
-					  0 10000000
+					  0 00100000
 					  01000000 0 00000000
 					  01000000 0 00000000
-					  0 00080000>;
+					  0 00100000>;

 				pci_bridge@0 {
 					reg = <0 0 0 0 0>;
@@ -285,10 +275,10 @@
 					#address-cells = <3>;
 					ranges = <02000000 0 b0000000
 						  02000000 0 b0000000
-						  0 20000000
+						  0 00100000
 						  01000000 0 00000000
 						  01000000 0 00000000
-						  0 00100000>;
+						  0 00100000>;

 					isa@1e {
 						device_type = "isa";
@@ -296,7 +286,8 @@
 						#size-cells = <1>;
 						#address-cells = <2>;
 						reg = <f000 0 0 0 0>;
-						ranges = <1 0 01000000 0 0
+						ranges = <1 0
+							  01000000 0 0
 							  00001000>;
 						interrupt-parent = <&i8259>;

@@ -312,8 +303,7 @@
 							built-in;
 							compatible = "chrp,iic";
 							interrupts = <9 2>;
-							interrupt-parent =
-								<&mpic>;
+							interrupt-parent = <&mpic>;
 						};

 						i8042@60 {
@@ -321,8 +311,7 @@
 							#address-cells = <1>;
 							reg = <1 60 1 1 64 1>;
 							interrupts = <1 3 c 3>;
-							interrupt-parent =
-								<&i8259>;
+							interrupt-parent = <&i8259>;

 							keyboard@0 {
 								reg = <0>;
@@ -336,8 +325,7 @@
 						};

 						rtc@70 {
-							compatible =
-								"pnpPNP,b00";
+							compatible = "pnpPNP,b00";
 							reg = <1 70 2>;
 						};

diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 5d82709..b0166e5 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -224,98 +224,36 @@
 			clock-frequency = <1fca055>;
 			interrupt-parent = <&mpic>;
 			interrupts = <18 2>;
-			interrupt-map-mask = <f800 0 0 7>;
+			interrupt-map-mask = <fb00 0 0 0>;
 			interrupt-map = <
 				/* IDSEL 0x11 */
-				8800 0 0 1 &i8259 3 2
-				8800 0 0 2 &i8259 4 2
-				8800 0 0 3 &i8259 5 2
-				8800 0 0 4 &i8259 6 2
+				8800 0 0 1 &i8259 9 2
+				8800 0 0 2 &i8259 a 2
+				8800 0 0 3 &i8259 b 2
+				8800 0 0 4 &i8259 c 2

 				/* IDSEL 0x12 */
-				9000 0 0 1 &i8259 4 2
-				9000 0 0 2 &i8259 5 2
-				9000 0 0 3 &i8259 6 2
-				9000 0 0 4 &i8259 3 2
-
-				/* IDSEL 0x13 */
-				9800 0 0 1 &i8259 0 0
-				9800 0 0 2 &i8259 0 0
-				9800 0 0 3 &i8259 0 0
-				9800 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x14 */
-				a000 0 0 1 &i8259 0 0
-				a000 0 0 2 &i8259 0 0
-				a000 0 0 3 &i8259 0 0
-				a000 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x15 */
-				a800 0 0 1 &i8259 0 0
-				a800 0 0 2 &i8259 0 0
-				a800 0 0 3 &i8259 0 0
-				a800 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x16 */
-				b000 0 0 1 &i8259 0 0
-				b000 0 0 2 &i8259 0 0
-				b000 0 0 3 &i8259 0 0
-				b000 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x17 */
-				b800 0 0 1 &i8259 0 0
-				b800 0 0 2 &i8259 0 0
-				b800 0 0 3 &i8259 0 0
-				b800 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x18 */
-				c000 0 0 1 &i8259 0 0
-				c000 0 0 2 &i8259 0 0
-				c000 0 0 3 &i8259 0 0
-				c000 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x19 */
-				c800 0 0 1 &i8259 0 0
-				c800 0 0 2 &i8259 0 0
-				c800 0 0 3 &i8259 0 0
-				c800 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x1a */
-				d000 0 0 1 &i8259 6 2
-				d000 0 0 2 &i8259 3 2
-				d000 0 0 3 &i8259 4 2
-				d000 0 0 4 &i8259 5 2
-
-
-				/* IDSEL 0x1b */
-				d800 0 0 1 &i8259 5 2
-				d800 0 0 2 &i8259 0 0
-				d800 0 0 3 &i8259 0 0
-				d800 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x1c */
-				e000 0 0 1 &i8259 9 2
-				e000 0 0 2 &i8259 a 2
-				e000 0 0 3 &i8259 c 2
-				e000 0 0 4 &i8259 7 2
-
-				/* IDSEL 0x1d */
-				e800 0 0 1 &i8259 9 2
-				e800 0 0 2 &i8259 a 2
-				e800 0 0 3 &i8259 b 2
-				e800 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x1e */
-				f000 0 0 1 &i8259 c 2
-				f000 0 0 2 &i8259 0 0
-				f000 0 0 3 &i8259 0 0
-				f000 0 0 4 &i8259 0 0
-
-				/* IDSEL 0x1f */
-				f800 0 0 1 &i8259 6 2
-				f800 0 0 2 &i8259 0 0
-				f800 0 0 3 &i8259 0 0
-				f800 0 0 4 &i8259 0 0
+				9000 0 0 1 &i8259 a 2
+				9000 0 0 2 &i8259 b 2
+				9000 0 0 3 &i8259 c 2
+				9000 0 0 4 &i8259 9 2
+
+				// IDSEL 0x1c  USB
+				e000 0 0 0 &i8259 c 2
+				e100 0 0 0 &i8259 9 2
+				e200 0 0 0 &i8259 a 2
+				e300 0 0 0 &i8259 b 2
+
+				// IDSEL 0x1d  Audio
+				e800 0 0 0 &i8259 6 2
+
+				// IDSEL 0x1e Legacy
+				f000 0 0 0 &i8259 7 2
+				f100 0 0 0 &i8259 7 2
+
+				// IDSEL 0x1f IDE/SATA
+				f800 0 0 0 &i8259 e 2
+				f900 0 0 0 &i8259 5 2
 				>;
 			uli1575@0 {
 				reg = <0 0 0 0 0>;
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index f581840..f620171 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -33,6 +33,7 @@ config MPC8544_DS
 	bool "Freescale MPC8544 DS"
 	select PPC_I8259
 	select DEFAULT_UIMAGE
+	select FSL_ULI1575
 	help
 	  This option enables support for the MPC8544 DS board

diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index 4905f6f..0f834d8 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -114,211 +114,25 @@ void __init mpc8544_ds_pic_init(void)
 }

 #ifdef CONFIG_PCI
-enum pirq { PIRQA = 8, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH };
+extern int uses_fsl_uli_m1575;
+extern int uli_exclude_device(struct pci_controller *hose,
+				u_char bus, u_char devfn);

-/*
- * Value in  table -- IRQ number
- */
-const unsigned char uli1575_irq_route_table[16] = {
-	0,		/* 0: Reserved */
-	0x8,
-	0,		/* 2: Reserved */
-	0x2,
-	0x4,
-	0x5,
-	0x7,
-	0x6,
-	0,		/* 8: Reserved */
-	0x1,
-	0x3,
-	0x9,
-	0xb,
-	0,		/* 13: Reserved */
-	0xd,
-	0xf,
-};
-
-static int __devinit
-get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin)
-{
-	struct of_irq oirq;
-	u32 laddr[3];
-	struct device_node *hosenode = hose ? hose->arch_data : NULL;
-
-	if (!hosenode)
-		return -EINVAL;
-
-	laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8);
-	laddr[1] = laddr[2] = 0;
-	of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
-	DBG("mpc8544_ds: pci irq addr %x, slot %d, pin %d, irq %d\n",
-	    laddr[0], slot, pin, oirq.specifier[0]);
-	return oirq.specifier[0];
-}
-
-/*8259*/
-static void __devinit quirk_uli1575(struct pci_dev *dev)
-{
-	unsigned short temp;
-	struct pci_controller *hose = pci_bus_to_host(dev->bus);
-	unsigned char irq2pin[16];
-	unsigned long pirq_map_word = 0;
-	u32 irq;
-	int i;
-
-	/*
-	 * ULI1575 interrupts route setup
-	 */
-	memset(irq2pin, 0, 16);	/* Initialize default value 0 */
-
-	irq2pin[6]=PIRQA+3;	/* enabled mapping for IRQ6 to PIRQD, used by SATA */
-
-	/*
-	 * PIRQE -> PIRQF mapping set manually
-	 *
-	 * IRQ pin   IRQ#
-	 * PIRQE ---- 9
-	 * PIRQF ---- 10
-	 * PIRQG ---- 11
-	 * PIRQH ---- 12
-	 */
-	for (i = 0; i < 4; i++)
-		irq2pin[i + 9] = PIRQE + i;
-
-	/* Set IRQ-PIRQ Mapping to ULI1575 */
-	for (i = 0; i < 16; i++)
-		if (irq2pin[i])
-			pirq_map_word |= (uli1575_irq_route_table[i] & 0xf)
-			    << ((irq2pin[i] - PIRQA) * 4);
-
-	pirq_map_word |= 1<<26;	/* disable INTx in EP mode*/
-
-	/* ULI1575 IRQ mapping conf register default value is 0xb9317542 */
-	DBG("Setup ULI1575 IRQ mapping configuration register value = 0x%x\n",
-		(int)pirq_map_word);
-	pci_write_config_dword(dev, 0x48, pirq_map_word);
-
-#define ULI1575_SET_DEV_IRQ(slot, pin, reg)				\
-	do {								\
-		int irq;						\
-		irq = get_pci_irq_from_of(hose, slot, pin);		\
-		if (irq > 0 && irq < 16) 				\
-			pci_write_config_byte(dev, reg, irq2pin[irq]);	\
-		else							\
-			printk(KERN_WARNING "ULI1575 device"		\
-				"(slot %d, pin %d) irq %d is invalid.\n", \
-				slot, pin, irq);			\
-	} while(0)
-
-	/* USB 1.1 OHCI controller 1, slot 28, pin 1 */
-	ULI1575_SET_DEV_IRQ(28, 1, 0x86);
-
-	/* USB 1.1 OHCI controller 2, slot 28, pin 2 */
-	ULI1575_SET_DEV_IRQ(28, 2, 0x87);
-
-	/* USB 1.1 OHCI controller 3, slot 28, pin 3 */
-	ULI1575_SET_DEV_IRQ(28, 3, 0x88);
-
-	/* USB 2.0 controller, slot 28, pin 4 */
-	irq = get_pci_irq_from_of(hose, 28, 4);
-	if (irq >= 0 && irq <= 15)
-		pci_write_config_dword(dev, 0x74, uli1575_irq_route_table[irq]);
-
-	/* Audio controller, slot 29, pin 1 */
-	ULI1575_SET_DEV_IRQ(29, 1, 0x8a);
-
-	/* Modem controller, slot 29, pin 2 */
-	ULI1575_SET_DEV_IRQ(29, 2, 0x8b);
-
-	/* HD audio controller, slot 29, pin 3 */
-	ULI1575_SET_DEV_IRQ(29, 3, 0x8c);
-
-	/* SMB interrupt: slot 30, pin 1 */
-	ULI1575_SET_DEV_IRQ(30, 1, 0x8e);
-
-	/* PMU ACPI SCI interrupt: slot 30, pin 2 */
-	ULI1575_SET_DEV_IRQ(30, 2, 0x8f);
-
-	/* Serial ATA interrupt: slot 31, pin 1 */
-	ULI1575_SET_DEV_IRQ(31, 1, 0x8d);
-
-	/* Primary PATA IDE IRQ: 14
-	 * Secondary PATA IDE IRQ: 15
-	 */
-	pci_write_config_byte(dev, 0x44, 0x30 | uli1575_irq_route_table[14]);
-	pci_write_config_byte(dev, 0x75, uli1575_irq_route_table[15]);
-
-	/* Set IRQ14 and IRQ15 to legacy IRQs */
-	pci_read_config_word(dev, 0x46, &temp);
-	temp |= 0xc000;
-	pci_write_config_word(dev, 0x46, temp);
-
-	/* Set i8259 interrupt trigger
-	 * IRQ 3:  Level
-	 * IRQ 4:  Level
-	 * IRQ 5:  Level
-	 * IRQ 6:  Level
-	 * IRQ 7:  Level
-	 * IRQ 9:  Level
-	 * IRQ 10: Level
-	 * IRQ 11: Level
-	 * IRQ 12: Level
-	 * IRQ 14: Edge
-	 * IRQ 15: Edge
-	 */
-	outb(0xfa, 0x4d0);
-	outb(0x1e, 0x4d1);
-
-#undef ULI1575_SET_DEV_IRQ
-}
-
-/* SATA */
-static void __devinit quirk_uli5288(struct pci_dev *dev)
+static int mpc85xx_exclude_device(struct pci_controller *hose,
+				   u_char bus, u_char devfn)
 {
-	unsigned char c;
-
-	pci_read_config_byte(dev, 0x83, &c);
-	c |= 0x80;		/* read/write lock */
-	pci_write_config_byte(dev, 0x83, c);
-
-	pci_write_config_byte(dev, 0x09, 0x01);	/* Base class code: storage */
-	pci_write_config_byte(dev, 0x0a, 0x06);	/* IDE disk */
+	struct device_node* node;
+	struct resource rsrc;

-	pci_read_config_byte(dev, 0x83, &c);
-	c &= 0x7f;
-	pci_write_config_byte(dev, 0x83, c);
-
-	pci_read_config_byte(dev, 0x84, &c);
-	c |= 0x01;				/* emulated PATA mode enabled */
-	pci_write_config_byte(dev, 0x84, c);
-}
+	node = (struct device_node *)hose->arch_data;
+	of_address_to_resource(node, 0, &rsrc);

-/* PATA */
-static void __devinit quirk_uli5229(struct pci_dev *dev)
-{
-	unsigned short temp;
-	pci_write_config_word(dev, 0x04, 0x0405);	/* MEM IO MSI */
-	pci_read_config_word(dev, 0x4a, &temp);
-	temp |= 0x1000;				/* Enable Native IRQ 14/15 */
-	pci_write_config_word(dev, 0x4a, temp);
-}
+	if ((rsrc.start & 0xfffff) == 0xb000) {
+		return uli_exclude_device(hose, bus, devfn);
+	}

-/*Bridge*/
-static void __devinit early_uli5249(struct pci_dev *dev)
-{
-	unsigned char temp;
-	pci_write_config_word(dev, 0x04, 0x0007);	/* mem access */
-	pci_read_config_byte(dev, 0x7c, &temp);
-	pci_write_config_byte(dev, 0x7c, 0x80);	/* R/W lock control */
-	pci_write_config_byte(dev, 0x09, 0x01);	/* set as pci-pci bridge */
-	pci_write_config_byte(dev, 0x7c, temp);	/* restore pci bus debug control */
-	dev->class |= 0x1;
+	return PCIBIOS_SUCCESSFUL;
 }
-
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
 #endif	/* CONFIG_PCI */

 /*
@@ -342,6 +156,8 @@ static void __init mpc8544_ds_setup_arch(void)
 		else
 			fsl_add_bridge(np, 0);
 	}
+	uses_fsl_uli_m1575 = 1;
+	ppc_md.pci_exclude_device = mpc85xx_exclude_device;
 #endif

 	printk("MPC8544 DS board from Freescale Semiconductor\n");
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 343b76d..685b2fb 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -7,6 +7,7 @@ config MPC8641_HPCN
 	bool "Freescale MPC8641 HPCN"
 	select PPC_I8259
 	select DEFAULT_UIMAGE
+	select FSL_ULI1575
 	help
 	  This option enables support for the MPC8641 HPCN board.

diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index e9eaa07..56b27ca 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -107,220 +107,25 @@ mpc86xx_hpcn_init_irq(void)
 }

 #ifdef CONFIG_PCI
+extern int uses_fsl_uli_m1575;
+extern int uli_exclude_device(struct pci_controller *hose,
+				u_char bus, u_char devfn);

-enum pirq{PIRQA = 8, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH};
-const unsigned char uli1575_irq_route_table[16] = {
-	0, 	/* 0: Reserved */
-	0x8, 	/* 1: 0b1000 */
-	0, 	/* 2: Reserved */
-	0x2,	/* 3: 0b0010 */
-	0x4,	/* 4: 0b0100 */
-	0x5, 	/* 5: 0b0101 */
-	0x7,	/* 6: 0b0111 */
-	0x6,	/* 7: 0b0110 */
-	0, 	/* 8: Reserved */
-	0x1,	/* 9: 0b0001 */
-	0x3,	/* 10: 0b0011 */
-	0x9,	/* 11: 0b1001 */
-	0xb,	/* 12: 0b1011 */
-	0, 	/* 13: Reserved */
-	0xd,	/* 14, 0b1101 */
-	0xf,	/* 15, 0b1111 */
-};
-
-static int __devinit
-get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin)
-{
-	struct of_irq oirq;
-	u32 laddr[3];
-	struct device_node *hosenode = hose ? hose->arch_data : NULL;
-
-	if (!hosenode) return -EINVAL;
-
-	laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8);
-	laddr[1] = laddr[2] = 0;
-	of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
-	DBG("mpc86xx_hpcn: pci irq addr %x, slot %d, pin %d, irq %d\n",
-			laddr[0], slot, pin, oirq.specifier[0]);
-	return oirq.specifier[0];
-}
-
-static void __devinit quirk_uli1575(struct pci_dev *dev)
-{
-	unsigned short temp;
-	struct pci_controller *hose = pci_bus_to_host(dev->bus);
-	unsigned char irq2pin[16], c;
-	unsigned long pirq_map_word = 0;
-	u32 irq;
-	int i;
-
-	/*
-	 * ULI1575 interrupts route setup
-	 */
-	memset(irq2pin, 0, 16); /* Initialize default value 0 */
-
-	/*
-	 * PIRQA -> PIRQD mapping read from OF-tree
-	 *
-	 * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
-	 *                PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
-	 */
-	for (i = 0; i < 4; i++){
-		irq = get_pci_irq_from_of(hose, 17, i + 1);
-		if (irq > 0 && irq < 16)
-			irq2pin[irq] = PIRQA + i;
-		else
-			printk(KERN_WARNING "ULI1575 device"
-			    "(slot %d, pin %d) irq %d is invalid.\n",
-			    17, i, irq);
-	}
-
-	/*
-	 * PIRQE -> PIRQF mapping set manually
-	 *
-	 * IRQ pin   IRQ#
-	 * PIRQE ---- 9
-	 * PIRQF ---- 10
-	 * PIRQG ---- 11
-	 * PIRQH ---- 12
-	 */
-	for (i = 0; i < 4; i++) irq2pin[i + 9] = PIRQE + i;
-
-	/* Set IRQ-PIRQ Mapping to ULI1575 */
-	for (i = 0; i < 16; i++)
-		if (irq2pin[i])
-			pirq_map_word |= (uli1575_irq_route_table[i] & 0xf)
-				<< ((irq2pin[i] - PIRQA) * 4);
-
-	/* ULI1575 IRQ mapping conf register default value is 0xb9317542 */
-	DBG("Setup ULI1575 IRQ mapping configuration register value = 0x%x\n",
-			pirq_map_word);
-	pci_write_config_dword(dev, 0x48, pirq_map_word);
-
-#define ULI1575_SET_DEV_IRQ(slot, pin, reg) 				\
-	do { 								\
-		int irq; 						\
-		irq = get_pci_irq_from_of(hose, slot, pin); 		\
-		if (irq > 0 && irq < 16) 				\
-			pci_write_config_byte(dev, reg, irq2pin[irq]); 	\
-		else							\
-			printk(KERN_WARNING "ULI1575 device"		\
-			    "(slot %d, pin %d) irq %d is invalid.\n",	\
-			    slot, pin, irq);				\
-	} while(0)
-
-	/* USB 1.1 OHCI controller 1, slot 28, pin 1 */
-	ULI1575_SET_DEV_IRQ(28, 1, 0x86);
-
-	/* USB 1.1 OHCI controller 2, slot 28, pin 2 */
-	ULI1575_SET_DEV_IRQ(28, 2, 0x87);
-
-	/* USB 1.1 OHCI controller 3, slot 28, pin 3 */
-	ULI1575_SET_DEV_IRQ(28, 3, 0x88);
-
-	/* USB 2.0 controller, slot 28, pin 4 */
-	irq = get_pci_irq_from_of(hose, 28, 4);
-	if (irq >= 0 && irq <=15)
-		pci_write_config_dword(dev, 0x74, uli1575_irq_route_table[irq]);
-
-	/* Audio controller, slot 29, pin 1 */
-	ULI1575_SET_DEV_IRQ(29, 1, 0x8a);
-
-	/* Modem controller, slot 29, pin 2 */
-	ULI1575_SET_DEV_IRQ(29, 2, 0x8b);
-
-	/* HD audio controller, slot 29, pin 3 */
-	ULI1575_SET_DEV_IRQ(29, 3, 0x8c);
-
-	/* SMB interrupt: slot 30, pin 1 */
-	ULI1575_SET_DEV_IRQ(30, 1, 0x8e);
-
-	/* PMU ACPI SCI interrupt: slot 30, pin 2 */
-	ULI1575_SET_DEV_IRQ(30, 2, 0x8f);
-
-	/* Serial ATA interrupt: slot 31, pin 1 */
-	ULI1575_SET_DEV_IRQ(31, 1, 0x8d);
-
-	/* Primary PATA IDE IRQ: 14
-	 * Secondary PATA IDE IRQ: 15
-	 */
-	pci_write_config_byte(dev, 0x44, 0x30 | uli1575_irq_route_table[14]);
-	pci_write_config_byte(dev, 0x75, uli1575_irq_route_table[15]);
-
-	/* Set IRQ14 and IRQ15 to legacy IRQs */
-	pci_read_config_word(dev, 0x46, &temp);
-	temp |= 0xc000;
-	pci_write_config_word(dev, 0x46, temp);
-
-	/* Set i8259 interrupt trigger
-	 * IRQ 3:  Level
-	 * IRQ 4:  Level
-	 * IRQ 5:  Level
-	 * IRQ 6:  Level
-	 * IRQ 7:  Level
-	 * IRQ 9:  Level
-	 * IRQ 10: Level
-	 * IRQ 11: Level
-	 * IRQ 12: Level
-	 * IRQ 14: Edge
-	 * IRQ 15: Edge
-	 */
-	outb(0xfa, 0x4d0);
-	outb(0x1e, 0x4d1);
-
-#undef ULI1575_SET_DEV_IRQ
-
-	/* Disable the HD interface and enable the AC97 interface. */
-	pci_read_config_byte(dev, 0xb8, &c);
-	c &= 0x7f;
-	pci_write_config_byte(dev, 0xb8, c);
-}
-
-static void __devinit quirk_uli5288(struct pci_dev *dev)
+static int mpc86xx_exclude_device(struct pci_controller *hose,
+				   u_char bus, u_char devfn)
 {
-	unsigned char c;
+	struct device_node* node;
+	struct resource rsrc;

-	pci_read_config_byte(dev,0x83,&c);
-	c |= 0x80;
-	pci_write_config_byte(dev, 0x83, c);
+	node = (struct device_node *)hose->arch_data;
+	of_address_to_resource(node, 0, &rsrc);

-	pci_write_config_byte(dev, 0x09, 0x01);
-	pci_write_config_byte(dev, 0x0a, 0x06);
-
-	pci_read_config_byte(dev,0x83,&c);
-	c &= 0x7f;
-	pci_write_config_byte(dev, 0x83, c);
-
-	pci_read_config_byte(dev,0x84,&c);
-	c |= 0x01;
-	pci_write_config_byte(dev, 0x84, c);
-}
-
-static void __devinit quirk_uli5229(struct pci_dev *dev)
-{
-	unsigned short temp;
-	pci_write_config_word(dev, 0x04, 0x0405);
-	dev->class &= ~0x5;
-	pci_read_config_word(dev, 0x4a, &temp);
-	temp |= 0x1000;
-	pci_write_config_word(dev, 0x4a, temp);
-}
+	if ((rsrc.start & 0xfffff) == 0x8000) {
+		return uli_exclude_device(hose, bus, devfn);
+	}

-static void __devinit early_uli5249(struct pci_dev *dev)
-{
-	unsigned char temp;
-	pci_write_config_word(dev, 0x04, 0x0007);
-	pci_read_config_byte(dev, 0x7c, &temp);
-	pci_write_config_byte(dev, 0x7c, 0x80);
-	pci_write_config_byte(dev, 0x09, 0x01);
-	pci_write_config_byte(dev, 0x7c, temp);
-	dev->class |= 0x1;
+	return PCIBIOS_SUCCESSFUL;
 }
-
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
 #endif /* CONFIG_PCI */


@@ -353,6 +158,9 @@ mpc86xx_hpcn_setup_arch(void)
 		else
 			fsl_add_bridge(np, 0);
 	}
+	uses_fsl_uli_m1575 = 1;
+	ppc_md.pci_exclude_device = mpc86xx_exclude_device;
+
 #endif

 	printk("MPC86xx HPCN board from Freescale Semiconductor\n");
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 932538a..cfc2497 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -282,4 +282,12 @@ config AXON_RAM
 	  minor numbers are available in /proc/devices, /proc/partitions or
 	  in /sys/block/axonram?/dev.

+config FSL_ULI1575
+	bool
+	default n
+	help
+	  Supports for the ULI1575 PCIe south bridge that exists on some
+	  Freescale reference boards. The boards all use the ULI in pretty
+	  much the same way.
+
 endmenu
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index d6e041a..d44e832 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -1,3 +1,6 @@
+
+obj-$(CONFIG_FSL_ULI1575)	+= fsl_uli1575.o
+
 ifeq ($(CONFIG_PPC_MERGE),y)
 obj-$(CONFIG_PPC_PMAC)		+= powermac/
 else
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
new file mode 100644
index 0000000..af2321f
--- /dev/null
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -0,0 +1,255 @@
+/*
+ * ULI M1575 setup code - specific to Freescale boards
+ *
+ * Copyright 2007 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/interrupt.h>
+#include <linux/mc146818rtc.h>
+
+#include <asm/system.h>
+#include <asm/pci-bridge.h>
+
+#define ULI_PIRQA	0x08
+#define ULI_PIRQB	0x09
+#define ULI_PIRQC	0x0a
+#define ULI_PIRQD	0x0b
+#define ULI_PIRQE	0x0c
+#define ULI_PIRQF	0x0d
+#define ULI_PIRQG	0x0e
+
+#define ULI_8259_NONE	0x00
+#define ULI_8259_IRQ1	0x08
+#define ULI_8259_IRQ3	0x02
+#define ULI_8259_IRQ4	0x04
+#define ULI_8259_IRQ5	0x05
+#define ULI_8259_IRQ6	0x07
+#define ULI_8259_IRQ7	0x06
+#define ULI_8259_IRQ9	0x01
+#define ULI_8259_IRQ10	0x03
+#define ULI_8259_IRQ11	0x09
+#define ULI_8259_IRQ12	0x0b
+#define ULI_8259_IRQ14	0x0d
+#define ULI_8259_IRQ15	0x0f
+
+u8 uli_pirq_to_irq[8] = {
+	ULI_8259_IRQ9,		/* PIRQA */
+	ULI_8259_IRQ10,		/* PIRQB */
+	ULI_8259_IRQ11,		/* PIRQC */
+	ULI_8259_IRQ12,		/* PIRQD */
+	ULI_8259_IRQ5,		/* PIRQE */
+	ULI_8259_IRQ6,		/* PIRQF */
+	ULI_8259_IRQ7,		/* PIRQG */
+	ULI_8259_NONE,		/* PIRQH */
+};
+
+/* set in board code if you want this quirks to do something */
+int uses_fsl_uli_m1575;
+
+/* Bridge */
+static void __devinit early_uli5249(struct pci_dev *dev)
+{
+	unsigned char temp;
+
+	if (!uses_fsl_uli_m1575)
+		return;
+
+	pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO |
+		 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
+
+	/* read/write lock */
+	pci_read_config_byte(dev, 0x7c, &temp);
+	pci_write_config_byte(dev, 0x7c, 0x80);
+
+	/* set as P2P bridge */
+	pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01);
+	dev->class |= 0x1;
+
+	/* restore lock */
+	pci_write_config_byte(dev, 0x7c, temp);
+}
+
+
+static void __devinit quirk_uli1575(struct pci_dev *dev)
+{
+	int i;
+
+	if (!uses_fsl_uli_m1575)
+		return;
+
+	/*
+	 * ULI1575 interrupts route setup
+	 */
+
+	/* ULI1575 IRQ mapping conf register maps PIRQx to IRQn */
+	for (i = 0; i < 4; i++) {
+		u8 val = uli_pirq_to_irq[i*2] | (uli_pirq_to_irq[i*2+1] << 4);
+		pci_write_config_byte(dev, 0x48 + i, val);
+	}
+
+	/* USB 1.1 OHCI controller 1: dev 28, func 0 - IRQ12 */
+	pci_write_config_byte(dev, 0x86, ULI_PIRQD);
+
+	/* USB 1.1 OHCI controller 2: dev 28, func 1 - IRQ9 */
+	pci_write_config_byte(dev, 0x87, ULI_PIRQA);
+
+	/* USB 1.1 OHCI controller 3: dev 28, func 2 - IRQ10 */
+	pci_write_config_byte(dev, 0x88, ULI_PIRQB);
+
+	/* Lan controller: dev 27, func 0 - IRQ6 */
+	pci_write_config_byte(dev, 0x89, ULI_PIRQF);
+
+	/* AC97 Audio controller: dev 29, func 0 - IRQ6 */
+	pci_write_config_byte(dev, 0x8a, ULI_PIRQF);
+
+	/* Modem controller: dev 29, func 1 - IRQ6 */
+	pci_write_config_byte(dev, 0x8b, ULI_PIRQF);
+
+	/* HD Audio controller: dev 29, func 2 - IRQ6 */
+	pci_write_config_byte(dev, 0x8c, ULI_PIRQF);
+
+	/* SATA controller: dev 31, func 1 - IRQ5 */
+	pci_write_config_byte(dev, 0x8d, ULI_PIRQE);
+
+	/* SMB interrupt: dev 30, func 1 - IRQ7 */
+	pci_write_config_byte(dev, 0x8e, ULI_PIRQG);
+
+	/* PMU ACPI SCI interrupt: dev 30, func 2 - IRQ7 */
+	pci_write_config_byte(dev, 0x8f, ULI_PIRQG);
+
+	/* USB 2.0 controller: dev 28, func 3 */
+	pci_write_config_byte(dev, 0x74, ULI_8259_IRQ11);
+
+	/* Primary PATA IDE IRQ: 14
+	 * Secondary PATA IDE IRQ: 15
+	 */
+	pci_write_config_byte(dev, 0x44, 0x30 | ULI_8259_IRQ14);
+	pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15);
+}
+
+static void __devinit quirk_final_uli1575(struct pci_dev *dev)
+{
+	/* Set i8259 interrupt trigger
+	 * IRQ 3:  Level
+	 * IRQ 4:  Level
+	 * IRQ 5:  Level
+	 * IRQ 6:  Level
+	 * IRQ 7:  Level
+	 * IRQ 9:  Level
+	 * IRQ 10: Level
+	 * IRQ 11: Level
+	 * IRQ 12: Level
+	 * IRQ 14: Edge
+	 * IRQ 15: Edge
+	 */
+	if (!uses_fsl_uli_m1575)
+		return;
+
+	outb(0xfa, 0x4d0);
+	outb(0x1e, 0x4d1);
+
+	/* setup RTC */
+	CMOS_WRITE(RTC_SET, RTC_CONTROL);
+	CMOS_WRITE(RTC_24H, RTC_CONTROL);
+
+	/* ensure month, date, and week alarm fields are ignored */
+	CMOS_WRITE(0, RTC_VALID);
+
+	outb_p(0x7c, 0x72);
+	outb_p(RTC_ALARM_DONT_CARE, 0x73);
+
+	outb_p(0x7d, 0x72);
+	outb_p(RTC_ALARM_DONT_CARE, 0x73);
+}
+
+/* SATA */
+static void __devinit quirk_uli5288(struct pci_dev *dev)
+{
+	unsigned char c;
+	unsigned int d;
+
+	if (!uses_fsl_uli_m1575)
+		return;
+
+	/* read/write lock */
+	pci_read_config_byte(dev, 0x83, &c);
+	pci_write_config_byte(dev, 0x83, c|0x80);
+
+	pci_read_config_dword(dev, PCI_CLASS_REVISION, &d);
+	d = (d & 0xff) | (PCI_CLASS_STORAGE_SATA_AHCI << 8);
+	pci_write_config_dword(dev, PCI_CLASS_REVISION, d);
+
+	/* restore lock */
+	pci_write_config_byte(dev, 0x83, c);
+
+	/* disable emulated PATA mode enabled */
+	pci_read_config_byte(dev, 0x84, &c);
+	pci_write_config_byte(dev, 0x84, c & ~0x01);
+}
+
+/* PATA */
+static void __devinit quirk_uli5229(struct pci_dev *dev)
+{
+	unsigned short temp;
+
+	if (!uses_fsl_uli_m1575)
+		return;
+
+	pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE |
+		PCI_COMMAND_MASTER | PCI_COMMAND_IO);
+
+	/* Enable Native IRQ 14/15 */
+	pci_read_config_word(dev, 0x4a, &temp);
+	pci_write_config_word(dev, 0x4a, temp | 0x1000);
+}
+
+/* We have to do a dummy read on the P2P for the RTC to work, WTF */
+static void __devinit quirk_final_uli5249(struct pci_dev *dev)
+{
+	int i;
+	u8 *dummy;
+	struct pci_bus *bus = dev->bus;
+
+	for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
+		if ((bus->resource[i]) &&
+			(bus->resource[i]->flags & IORESOURCE_MEM)) {
+			dummy = ioremap(bus->resource[i]->start, 0x4);
+			if (dummy) {
+				in_8(dummy);
+				iounmap(dummy);
+			}
+			break;
+		}
+	}
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575);
+
+int uli_exclude_device(struct pci_controller *hose,
+			u_char bus, u_char devfn)
+{
+	if (bus == (hose->first_busno + 2)) {
+		/* exclude Modem controller */
+		if ((PCI_SLOT(devfn) == 29) && (PCI_FUNC(devfn) == 1))
+			return PCIBIOS_DEVICE_NOT_FOUND;
+
+		/* exclude HD Audio controller */
+		if ((PCI_SLOT(devfn) == 29) && (PCI_FUNC(devfn) == 2))
+			return PCIBIOS_DEVICE_NOT_FOUND;
+	}
+
+	return PCIBIOS_SUCCESSFUL;
+}
-- 
1.5.2.2

^ permalink raw reply related

* [PATCH] serial: Add pci ids for PA Semi PWRficient onchip uarts
From: Olof Johansson @ 2007-08-17  4:09 UTC (permalink / raw)
  To: akpm; +Cc: linuxppc-dev, linux-kernel, Alan Cox

Add PCI IDs for the onchip UARTs on PA Semi PWRficient.

Signed-off-by: Olof Johansson <olof@lixom.net>


Index: linux-2.6/drivers/serial/8250_pci.c
===================================================================
--- linux-2.6.orig/drivers/serial/8250_pci.c
+++ linux-2.6/drivers/serial/8250_pci.c
@@ -984,6 +984,7 @@ enum pci_board_num_t {
 	pbn_exar_XR17C152,
 	pbn_exar_XR17C154,
 	pbn_exar_XR17C158,
+	pbn_pasemi_1682M,
 };
 
 /*
@@ -1511,6 +1512,14 @@ static struct pciserial_board pci_boards
 		.base_baud	= 921600,
 		.uart_offset	= 0x200,
 	},
+	/*
+	 * PA Semi PWRficient PA6T-1682M on-chip UART
+	 */
+	[pbn_pasemi_1682M] = {
+		.flags		= FL_BASE0,
+		.num_ports	= 1,
+		.base_baud	= 8333333,
+	},
 };
 
 /*
@@ -2402,6 +2411,13 @@ static struct pci_device_id serial_pci_t
 		PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
 		0, 0, pbn_b2_8_921600 },
 	/*
+	 * PA Semi PA6T-1682M on-chip UART
+	 */
+	{	PCI_VENDOR_ID_PASEMI, 0xa004,
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+		pbn_pasemi_1682M },
+
+	/*
 	 * These entries match devices with class COMMUNICATION_SERIAL,
 	 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
 	 */

^ permalink raw reply

* Re: [PATCH] fix compile warning in arch/powerpc/kernel/sysfs.c
From: Michael Neuling @ 2007-08-17  5:25 UTC (permalink / raw)
  To: paulus, linuxppc-dev
In-Reply-To: <7816.1187322013@neuling.org>

It seems I missed a long discussion about this warning... Please ignore.

Mikey

In message <7816.1187322013@neuling.org> you wrote:
> This fixes the following warning:
> arch/powerpc/kernel/sysfs.c:388: warning: ignoring return value of
> 'sysfs_create_group', declared with attribute warn_unused_result
> 
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
>  arch/powerpc/kernel/sysfs.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6-ozlabs/arch/powerpc/kernel/sysfs.c
> ===================================================================
> --- linux-2.6-ozlabs.orig/arch/powerpc/kernel/sysfs.c
> +++ linux-2.6-ozlabs/arch/powerpc/kernel/sysfs.c
> @@ -378,14 +378,18 @@ EXPORT_SYMBOL_GPL(cpu_add_sysdev_attr);
>  
>  int cpu_add_sysdev_attr_group(struct attribute_group *attrs)
>  {
> -	int cpu;
> +	int cpu, err;
>  	struct sys_device *sysdev;
>  
>  	mutex_lock(&cpu_mutex);
>  
>  	for_each_possible_cpu(cpu) {
>  		sysdev = get_cpu_sysdev(cpu);
> -		sysfs_create_group(&sysdev->kobj, attrs);
> +		err = sysfs_create_group(&sysdev->kobj, attrs);
> +		if (err) {
> +			mutex_unlock(&cpu_mutex);
> +			return err;
> +		}
>  	}
>  
>  	mutex_unlock(&cpu_mutex);
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 

^ permalink raw reply

* Re: [PATCH] powerpc: add setclrbits macros
From: Geert Uytterhoeven @ 2007-08-17  6:44 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus
In-Reply-To: <11873041991712-git-send-email-timur@freescale.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 3214 bytes --]

On Thu, 16 Aug 2007, Timur Tabi wrote:
> This patch adds the setclrbits_xxx() macros, which are used to set and clear
> multiple bits in a single read-modify-write operation.  Specify the bits
> to set in the 'set' parameter and the bits to clear in the 'clear' parameter.
> These macros can also be used to set a multiple-bit bit pattern using a mask,
> by specifying the mask in the 'clear' parameter and the new bit pattern in the
> 'set' parameter.  There are big-endian and little-endian versions for 8, 16,
> 32, and 64 bits.

Sorry for nitpicking again, but since the clear is done before the set (cfr.
the expanded functionality), perhaps they should be changed to
clrsetbits_X(addr, clear, set)?

> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> 
> Changed the macros from setmaskedbits_xxx to setclrbits_xxx and added a comment
> indicating the expanded functionality.
> 
>  include/asm-powerpc/io.h |   27 +++++++++++++++++++++++++++
>  1 files changed, 27 insertions(+), 0 deletions(-)
> 
> diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
> index bb8d965..58c8b96 100644
> --- a/include/asm-powerpc/io.h
> +++ b/include/asm-powerpc/io.h
> @@ -734,6 +734,33 @@ static inline void * bus_to_virt(unsigned long address)
>  #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) |  (_v))
>  #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v))
>  
> +/* Set and clear bits in one shot.  These macros can be used to clear and
> + * set multiple bits in a register using a single read-modify-write.  These
> + * macros can also be used to set a multiple-bit bit pattern using a mask,
> + * by specifying the mask in the 'clear' parameter and the new bit pattern
> + * in the 'set' parameter.
> + */
> +
> +#ifdef __powerpc64__
> +#define setclrbits_be64(addr, set, clear) \
> +	out_be64((addr), (in_be64(addr) & ~(clear)) | (set))
> +#define setclrbits_le64(addr, set, clear) \
> +	out_le64((addr), (in_le64(addr) & ~(clear)) | (set))
> +#endif
> +
> +#define setclrbits_be32(addr, set, clear) \
> +	out_be32((addr), (in_be32(addr) & ~(clear)) | (set))
> +#define setclrbits_be16(addr, set, clear) \
> +	out_be16((addr), (in_be16(addr) & ~(clear)) | (set))
> +
> +#define setclrbits_le32(addr, set, clear) \
> +	out_le32((addr), (in_le32(addr) & ~(clear)) | (set))
> +#define setclrbits_le16(addr, set, clear) \
> +	out_le16((addr), (in_le16(addr) & ~(clear)) | (set))
> +
> +#define setclrbits_8(addr, set, clear) \
> +	out_8((addr), (in_8(addr) & ~(clear)) | (set))
> +
>  #endif /* __KERNEL__ */
>  
>  #endif /* _ASM_POWERPC_IO_H */
> -- 
> 1.5.2.4
> 

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply

* [PATCH 0/3] Remove need for include/asm-ppc
From: Kumar Gala @ 2007-08-17  7:11 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

This patch series removes the need for include/asm-ppc in the ARCH=powerpc
build for ppc32.  They exist in the following git tree:

  master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.24

posting here for everyone else to see.

- k

^ permalink raw reply

* [PATCH 1/3] [POWERPC] Remove old includes from arch/ppc
From: Kumar Gala @ 2007-08-17  7:12 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0708170157140.15311@blarg.am.freescale.net>

Remove includes of files that existed in arch/ppc that we dont need in
arch/powerpc anymore.  The following includes were removed:

 <asm/amigappc.h>
 <asm/bootinfo.h>
 <asm/ppcboot.h>
 <asm/ppc_sys.h>
 <asm/residual.h>

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/kernel/setup_32.c               |    2 --
 arch/powerpc/platforms/52xx/lite5200.c       |    1 -
 arch/powerpc/platforms/82xx/mpc82xx.c        |    1 -
 arch/powerpc/platforms/82xx/mpc82xx_ads.c    |    1 -
 arch/powerpc/platforms/82xx/pq2ads.h         |    1 -
 arch/powerpc/platforms/83xx/mpc832x_mds.c    |    1 -
 arch/powerpc/platforms/83xx/mpc834x_itx.c    |    1 -
 arch/powerpc/platforms/83xx/mpc834x_mds.c    |    1 -
 arch/powerpc/platforms/83xx/mpc836x_mds.c    |    1 -
 arch/powerpc/platforms/85xx/mpc85xx_cds.c    |    1 -
 arch/powerpc/platforms/85xx/mpc85xx_mds.c    |    1 -
 arch/powerpc/platforms/8xx/m8xx_setup.c      |    4 ++--
 arch/powerpc/platforms/8xx/mpc86xads.h       |    1 -
 arch/powerpc/platforms/8xx/mpc86xads_setup.c |    1 -
 arch/powerpc/platforms/8xx/mpc885ads.h       |    1 -
 arch/powerpc/platforms/8xx/mpc885ads_setup.c |    1 -
 arch/powerpc/platforms/chrp/smp.c            |    1 -
 arch/powerpc/platforms/embedded6xx/ls_uart.c |    1 -
 arch/powerpc/platforms/powermac/bootx_init.c |    1 -
 19 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 7ec6ba5..a288a5f 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -18,13 +18,11 @@
 #include <linux/cpu.h>
 #include <linux/console.h>

-#include <asm/residual.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/processor.h>
 #include <asm/pgtable.h>
 #include <asm/setup.h>
-#include <asm/amigappc.h>
 #include <asm/smp.h>
 #include <asm/elf.h>
 #include <asm/cputable.h>
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 84bd3da..ce3f695 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -35,7 +35,6 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/ipic.h>
-#include <asm/bootinfo.h>
 #include <asm/irq.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c
index cc9900d..c706871 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx.c
@@ -36,7 +36,6 @@
 #include <asm/time.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
-#include <asm/bootinfo.h>
 #include <asm/pci-bridge.h>
 #include <asm/mpc8260.h>
 #include <asm/irq.h>
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 2d1b05b..c0a0c56 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -37,7 +37,6 @@
 #include <asm/time.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
-#include <asm/bootinfo.h>
 #include <asm/pci-bridge.h>
 #include <asm/mpc8260.h>
 #include <asm/irq.h>
diff --git a/arch/powerpc/platforms/82xx/pq2ads.h b/arch/powerpc/platforms/82xx/pq2ads.h
index 5b5cca6..6f749b7 100644
--- a/arch/powerpc/platforms/82xx/pq2ads.h
+++ b/arch/powerpc/platforms/82xx/pq2ads.h
@@ -23,7 +23,6 @@
 #define __MACH_ADS8260_DEFS

 #include <linux/seq_file.h>
-#include <asm/ppcboot.h>

 /* For our show_cpuinfo hooks. */
 #define CPUINFO_VENDOR		"Freescale Semiconductor"
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 2c8e641..61e3f1c 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -32,7 +32,6 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/ipic.h>
-#include <asm/bootinfo.h>
 #include <asm/irq.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 47ba544..6d06645 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -30,7 +30,6 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/ipic.h>
-#include <asm/bootinfo.h>
 #include <asm/irq.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 4c9ff9c..f8aba9a 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -30,7 +30,6 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/ipic.h>
-#include <asm/bootinfo.h>
 #include <asm/irq.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index 84b5893..69970b9 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -38,7 +38,6 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/ipic.h>
-#include <asm/bootinfo.h>
 #include <asm/irq.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 6a171e9..0402334 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -35,7 +35,6 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/ipic.h>
-#include <asm/bootinfo.h>
 #include <asm/pci-bridge.h>
 #include <asm/mpc85xx.h>
 #include <asm/irq.h>
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index be25ecd..53830c9 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -38,7 +38,6 @@
 #include <asm/time.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
-#include <asm/bootinfo.h>
 #include <asm/pci-bridge.h>
 #include <asm/mpc85xx.h>
 #include <asm/irq.h>
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index f169355..f00c8d1 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -36,13 +36,11 @@

 #include <asm/mmu.h>
 #include <asm/reg.h>
-#include <asm/residual.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/mpc8xx.h>
 #include <asm/8xx_immap.h>
 #include <asm/machdep.h>
-#include <asm/bootinfo.h>
 #include <asm/time.h>
 #include <asm/prom.h>
 #include <asm/fs_pd.h>
@@ -55,7 +53,9 @@ struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops;
 #endif

 void m8xx_calibrate_decr(void);
+#ifdef CONFIG_8xx_WDT
 extern void m8xx_wdt_handler_install(bd_t *bp);
+#endif
 extern int cpm_pic_init(void);
 extern int cpm_get_irq(void);

diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h
index 59bad2f..dd10cd2 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads.h
+++ b/arch/powerpc/platforms/8xx/mpc86xads.h
@@ -15,7 +15,6 @@
 #ifndef __ASM_MPC86XADS_H__
 #define __ASM_MPC86XADS_H__

-#include <asm/ppcboot.h>
 #include <sysdev/fsl_soc.h>

 /* U-Boot maps BCSR to 0xff080000 */
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
index d881647..8f64f48 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -31,7 +31,6 @@
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/time.h>
-#include <asm/ppcboot.h>
 #include <asm/mpc8xx.h>
 #include <asm/8xx_immap.h>
 #include <asm/commproc.h>
diff --git a/arch/powerpc/platforms/8xx/mpc885ads.h b/arch/powerpc/platforms/8xx/mpc885ads.h
index 7c31aec..14db124 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads.h
+++ b/arch/powerpc/platforms/8xx/mpc885ads.h
@@ -15,7 +15,6 @@
 #ifndef __ASM_MPC885ADS_H__
 #define __ASM_MPC885ADS_H__

-#include <asm/ppcboot.h>
 #include <sysdev/fsl_soc.h>

 /* U-Boot maps BCSR to 0xff080000 */
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index bd5ff7a..d3da385 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -32,7 +32,6 @@
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/time.h>
-#include <asm/ppcboot.h>
 #include <asm/mpc8xx.h>
 #include <asm/8xx_immap.h>
 #include <asm/commproc.h>
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
index a137d13..10a4a4d 100644
--- a/arch/powerpc/platforms/chrp/smp.c
+++ b/arch/powerpc/platforms/chrp/smp.c
@@ -26,7 +26,6 @@
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
-#include <asm/residual.h>
 #include <asm/time.h>
 #include <asm/machdep.h>
 #include <asm/mpic.h>
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c
index d0bee9f..f7a4def 100644
--- a/arch/powerpc/platforms/embedded6xx/ls_uart.c
+++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c
@@ -5,7 +5,6 @@
 #include <linux/serial_8250.h>
 #include <asm/io.h>
 #include <asm/mpc10x.h>
-#include <asm/ppc_sys.h>
 #include <asm/prom.h>
 #include <asm/termbits.h>

diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c
index 9d73d02..cf66091 100644
--- a/arch/powerpc/platforms/powermac/bootx_init.c
+++ b/arch/powerpc/platforms/powermac/bootx_init.c
@@ -17,7 +17,6 @@
 #include <asm/prom.h>
 #include <asm/page.h>
 #include <asm/bootx.h>
-#include <asm/bootinfo.h>
 #include <asm/btext.h>
 #include <asm/io.h>

-- 
1.5.2.2

^ permalink raw reply related

* [PATCH 2/3] [POWERPC] Copy over headers from arch/ppc to arch/powerpc that we need
From: Kumar Gala @ 2007-08-17  7:14 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0708170212210.15311@blarg.am.freescale.net>

To build arch/powerpc without including asm-ppc/ we need these files
in asm-powerpc/

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 include/asm-powerpc/8xx_immap.h   |  564 +++++++++++++++++
 include/asm-powerpc/commproc.h    |  692 ++++++++++++++++++++
 include/asm-powerpc/cpm2.h        | 1248 +++++++++++++++++++++++++++++++++++++
 include/asm-powerpc/gg2.h         |   61 ++
 include/asm-powerpc/highmem.h     |  135 ++++
 include/asm-powerpc/hydra.h       |  102 +++
 include/asm-powerpc/immap_cpm2.h  |  648 +++++++++++++++++++
 include/asm-powerpc/kgdb.h        |   57 ++
 include/asm-powerpc/m8260_pci.h   |  187 ++++++
 include/asm-powerpc/mpc10x.h      |  180 ++++++
 include/asm-powerpc/mpc52xx_psc.h |  191 ++++++
 11 files changed, 4065 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-powerpc/8xx_immap.h
 create mode 100644 include/asm-powerpc/commproc.h
 create mode 100644 include/asm-powerpc/cpm2.h
 create mode 100644 include/asm-powerpc/gg2.h
 create mode 100644 include/asm-powerpc/highmem.h
 create mode 100644 include/asm-powerpc/hydra.h
 create mode 100644 include/asm-powerpc/immap_cpm2.h
 create mode 100644 include/asm-powerpc/kgdb.h
 create mode 100644 include/asm-powerpc/m8260_pci.h
 create mode 100644 include/asm-powerpc/mpc10x.h
 create mode 100644 include/asm-powerpc/mpc52xx_psc.h

[patch removed since I was just copying the asm-ppc variants to
asm-powerpc]

- k

^ permalink raw reply

* [PATCH 3/3] [POWERPC] Stop include asm-ppc when building ARCH=powerpc for ppc32
From: Kumar Gala @ 2007-08-17  7:15 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0708170213040.15311@blarg.am.freescale.net>

We no longer have any dependancies on include/asm-ppc so we can get ride
of the makefile hacks to include it in the build process.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/Makefile |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6c1e36c..83a39a2 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -63,8 +63,7 @@ endif

 LDFLAGS_vmlinux	:= -Bstatic

-# The -Iarch/$(ARCH)/include is temporary while we are merging
-CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include
+CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
 AFLAGS-$(CONFIG_PPC32)	:= -Iarch/$(ARCH)
 CFLAGS-$(CONFIG_PPC64)	:= -mminimal-toc -mtraceback=none  -mcall-aixdesc
 CFLAGS-$(CONFIG_PPC32)	:= -Iarch/$(ARCH) -ffixed-r2 -mmultiple
@@ -72,9 +71,6 @@ CPPFLAGS	+= $(CPPFLAGS-y)
 AFLAGS		+= $(AFLAGS-y)
 CFLAGS		+= -msoft-float -pipe $(CFLAGS-y)
 CPP		= $(CC) -E $(CFLAGS)
-# Temporary hack until we have migrated to asm-powerpc
-LINUXINCLUDE-$(CONFIG_PPC32)	:= -Iarch/$(ARCH)/include
-LINUXINCLUDE    += $(LINUXINCLUDE-y)

 CHECKFLAGS	+= -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__

@@ -172,18 +168,15 @@ install:
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)

-archmrproper:
-	$(Q)rm -rf arch/$(ARCH)/include
-
 archprepare: checkbin

-ifeq ($(CONFIG_PPC32),y)
-# Temporary hack until we have migrated to asm-powerpc
-include/asm: arch/$(ARCH)/include/asm
-arch/$(ARCH)/include/asm: FORCE
-	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
-	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm
-endif
+#ifeq ($(CONFIG_PPC32),y)
+## Temporary hack until we have migrated to asm-powerpc
+#include/asm: arch/$(ARCH)/include/asm
+#arch/$(ARCH)/include/asm: FORCE
+#	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
+#	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm
+#endif

 # Use the file '.tmp_gas_check' for binutils tests, as gas won't output
 # to stdout and these checks are run even on install targets.
-- 
1.5.2.2

^ permalink raw reply related

* Please pull from 'for-2.6.24' branch
From: Kumar Gala @ 2007-08-17  7:17 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

Paul,

Please pull from 'for-2.6.24' branch of

	master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.24

It would be good to get these changes in ASAP as a baseline for other work
that might need to move other files over to asm-powerpc or other clean
ups.

to receive the following updates:

 arch/powerpc/Makefile                        |   23
 arch/powerpc/kernel/setup_32.c               |    2
 arch/powerpc/platforms/52xx/lite5200.c       |    1
 arch/powerpc/platforms/82xx/mpc82xx.c        |    1
 arch/powerpc/platforms/82xx/mpc82xx_ads.c    |    1
 arch/powerpc/platforms/82xx/pq2ads.h         |    1
 arch/powerpc/platforms/83xx/mpc832x_mds.c    |    1
 arch/powerpc/platforms/83xx/mpc834x_itx.c    |    1
 arch/powerpc/platforms/83xx/mpc834x_mds.c    |    1
 arch/powerpc/platforms/83xx/mpc836x_mds.c    |    1
 arch/powerpc/platforms/85xx/mpc85xx_cds.c    |    1
 arch/powerpc/platforms/85xx/mpc85xx_mds.c    |    1
 arch/powerpc/platforms/8xx/m8xx_setup.c      |    4
 arch/powerpc/platforms/8xx/mpc86xads.h       |    1
 arch/powerpc/platforms/8xx/mpc86xads_setup.c |    1
 arch/powerpc/platforms/8xx/mpc885ads.h       |    1
 arch/powerpc/platforms/8xx/mpc885ads_setup.c |    1
 arch/powerpc/platforms/chrp/smp.c            |    1
 arch/powerpc/platforms/embedded6xx/ls_uart.c |    1
 arch/powerpc/platforms/powermac/bootx_init.c |    1
 include/asm-powerpc/8xx_immap.h              |  564 ++++++++++++
 include/asm-powerpc/commproc.h               |  692 ++++++++++++++
 include/asm-powerpc/cpm2.h                   | 1248 +++++++++++++++++++++++++++
 include/asm-powerpc/gg2.h                    |   61 +
 include/asm-powerpc/highmem.h                |  135 ++
 include/asm-powerpc/hydra.h                  |  102 ++
 include/asm-powerpc/immap_cpm2.h             |  648 ++++++++++++++
 include/asm-powerpc/kgdb.h                   |   57 +
 include/asm-powerpc/m8260_pci.h              |  187 ++++
 include/asm-powerpc/mpc10x.h                 |  180 +++
 include/asm-powerpc/mpc52xx_psc.h            |  191 ++++
 31 files changed, 4075 insertions(+), 36 deletions(-)

Kumar Gala (3):
      [POWERPC] Remove old includes from arch/ppc
      [POWERPC] Copy over headers from arch/ppc to arch/powerpc that we need
      [POWERPC] Stop include asm-ppc when building ARCH=powerpc for ppc32

^ permalink raw reply

* Patches for ppc?
From: Johan Borkhuis @ 2007-08-17  7:43 UTC (permalink / raw)
  To: Linuxppc-dev

Hello,

I am working with a PPC-kernel, and came across a problem with the PCI 
initialisation. On this mailing list I see a lot of patches, but they 
are all for the PowerPC architecture. Are patches for the PPC 
architecture still processed?

I know that the ppc-architecture is being phased out, but for the moment 
I am stuck with it, as the board I am working with is not supported in 
the powerpc architecture.

Kind regards,
    Johan Borkhuis

^ permalink raw reply

* Re: Patches for ppc?
From: Kumar Gala @ 2007-08-17  8:00 UTC (permalink / raw)
  To: Johan Borkhuis; +Cc: Linuxppc-dev
In-Reply-To: <46C5519E.6010300@dutchspace.nl>


On Aug 17, 2007, at 2:43 AM, Johan Borkhuis wrote:

> Hello,
>
> I am working with a PPC-kernel, and came across a problem with the PCI
> initialisation. On this mailing list I see a lot of patches, but they
> are all for the PowerPC architecture. Are patches for the PPC
> architecture still processed?
>
> I know that the ppc-architecture is being phased out, but for the  
> moment
> I am stuck with it, as the board I am working with is not supported in
> the powerpc architecture.

If it fixes a bug we'll take patches to arch/ppc.

- k

^ permalink raw reply

* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
From: Paul Mackerras @ 2007-08-17  8:07 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0708170003210.21006@blarg.am.freescale.net>

Kumar Gala writes:

> The interrupt routing in the device trees for the ULI M1575 was
> inproperly using the interrupt line field as pci function.  Fixed
> up the device tree's to actual conform for to specification and
> changed the interrupt mapping code so it just uses a static mapping
> setup as follows:

This is a big patch to be going in post -rc3.  Is it really fixing a
regression or a serious bug?

Paul.

^ permalink raw reply

* Re: [PATCH 3/3] [POWERPC] Stop include asm-ppc when building ARCH=powerpc for ppc32
From: Stephen Rothwell @ 2007-08-17  8:13 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <Pine.LNX.4.64.0708170215360.15311@blarg.am.freescale.net>

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

On Fri, 17 Aug 2007 02:15:54 -0500 (CDT) Kumar Gala <galak@kernel.crashing.org> wrote:
>
> @@ -172,18 +168,15 @@ install:
>  archclean:
>  	$(Q)$(MAKE) $(clean)=$(boot)
> 
> -archmrproper:
> -	$(Q)rm -rf arch/$(ARCH)/include
> -
>  archprepare: checkbin
> 
> -ifeq ($(CONFIG_PPC32),y)
> -# Temporary hack until we have migrated to asm-powerpc
> -include/asm: arch/$(ARCH)/include/asm
> -arch/$(ARCH)/include/asm: FORCE
> -	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
> -	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm
> -endif
> +#ifeq ($(CONFIG_PPC32),y)
> +## Temporary hack until we have migrated to asm-powerpc
> +#include/asm: arch/$(ARCH)/include/asm
> +#arch/$(ARCH)/include/asm: FORCE
> +#	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
> +#	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm
> +#endif

Why not just remove it?  git will preserve it if we find a use for it.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* RE: some question about linux kernel in embed system
From: Pedro Luis D. L. @ 2007-08-17  8:42 UTC (permalink / raw)
  To: linuxppc-embedded

DQoNCg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KPiBEYXRlOiBG
cmksIDE3IEF1ZyAyMDA3IDE2OjE1OjUzICswODAwDQo+IEZyb206IGxpbUB0YWljb20uY29tLmNu
DQo+IFRvOiBjYXJjYWRpekBob3RtYWlsLmNvbQ0KPiBTdWJqZWN0OiBSZTogUkU6IHNvbWUgcXVl
c3Rpb24gYWJvdXQgbGludXgga2VybmVsIGluIGVtYmVkIHN5c3RlbQ0KPiANCj4gdGhhbmtzICEN
Cj4gaG93IHRvIHBhc3MgdGhlIGNvbnNvbGUgcGFyYW1ldGVyID8gd2hlcmUgaXMgdGhlc2U/DQo+
IHdoZW4gSSBtYWtlIG1lbnVjb25maWcsIHRoZXJlIGlzIENvbnNvbGUgZHJpdmVycyBvcHRpb24s
IGFuZCBpIGNob29zZSBzb21ldGhpbmcgYXQgZGlzY3JldGlvbi4gYnV0IHRoZSBrZXJuZWwgaXMg
bm90IGdvIG9uIQ0KPiBJIG5lZWQgeW91ciBoZWxwICENCj4gVGhpcyBpcyBteSBtc246IGxpbS5s
aXZlQG1zbi5jb20NCg0KWW91IHNob3VsZCBtb2RpZnkgdGhlICJib290YXJncyIgcGFyYW1ldGVy
IGluIHRoZSB1LWJvb3QgY29uc29sZS4gVS1ib290IHBhc3NlcyB0aGlzIHZhbHVlIHRvIHRoZSBr
ZXJuZWwgYXQgYm9vdCB0aW1lLiBZb3VyICJib290YXJncyIgcGFyYW1ldGVyIHNob3VsZCBpbmNs
dWRlIHNvbWV0aGluZyBsaWtlICJjb25zb2xlPXR0eVMwLDExNTIwMCIgb3Igc2ltaWxpYXIsIHdo
ZXJlIHR0eVMwIHNob3VsZCBiZSB0aGUgY29uc29sZSBkZXZpY2UncyBuYW1lIChpbiBNUEM1MjAw
IGlzLCBmb3IgZXhhbXBsZSwgdHR5UFNDMCkgYW5kIDExNTIwMCBpcyB0aGUgYmF1ZHJhdGUgdXNl
ZCBieSB0aGUgY29uc29sZSB0byBjb21tdW5pY2F0ZSB3aXRoIHlvdXIgaG9zdCBjb21wdXRlci4N
Cg0KUmVnYXJkcywNClBlZHJvLg0KDQo+IA0KPiDlj5Hku7bkurrvvJogUGVkcm8gTHVpcyBELiBM
LiANCj4g5Y+R6YCB5pe26Ze077yaIDIwMDctMDgtMTcgIDE1OjE0OjIyIA0KPiDmlLbku7bkurrv
vJogbGltQHRhaWNvbS5jb20uY24gDQo+IOaKhOmAge+8miANCj4g5Li76aKY77yaIFJFOiBzb21l
IHF1ZXN0aW9uIGFib3V0IGxpbnV4IGtlcm5lbCBpbiBlbWJlZCBzeXN0ZW0gDQo+ICANCj4gPiBE
YXRlOiBGcmksIDE3IEF1ZyAyMDA3IDEwOjU4OjAxICswODAwDQo+ID4gRnJvbTogbGltQHRhaWNv
bS5jb20uY24NCj4gDQo+ID4gaGVsbG8gZXZlcnlvbmUgDQo+ID4gSSBhbSBkb2luZyBzb21lIGVt
YmVkIHN5c3RlbSB3b3Jrcy4NCj4gPiBOb3cgSSB3YW50IHRvIHJlcGxhbnQgdGhlIGxpbnV4LTIu
NC4zMiB0byBteSBvd24gc3lzdGVtLg0KPiA+IEJ1dCB0aGVyZSBhcmUgc29tZSBxdWVzdGlvbnMu
Rmlyc3QgbGV0IG1lIGludHJvZHVjZSBteSBoZWFyZHdhcmU6DQo+ID4gSSB1c2UgcG93ZXJwYytm
bGFzaCtzZHJhbSB0byBidWlsZHVwIGEgbWluaSBzeXN0ZW0sdXNlIHUtYm9vdCAxLjEuNCBhcyBi
b290bG9hZGVyIHRoZW4gSSBuZWVkIHRvIHJlcGxhbnQgdGhlIGtlcm5lbCBvbiBpdCAuDQo+ID4g
VGhlIGxpbnV4LTIuNC4zMiBrZXJuZWwgd2hpY2ggd2FzIG1hZGUgYSB1SW1hZ2UsIGlzIHJ1bm5p
bmcgaW4gdGhpcyBtaW5pIHN5c3RlbSwgdGhlIHF1ZXN0aW9uIGlzIGFwcGVhcjoNCj4gPiAgICAg
SW1hZ2UgTmFtZTogICBMaW51eC0yLjQuMzINCj4gPiAgICBDcmVhdGVkOiAgICAgIDIwMDctMDgt
MTYgIDIxOjMxOjAzIFVUQw0KPiA+ICAgIEltYWdlIFR5cGU6ICAgUG93ZXJQQyBMaW51eCBLZXJu
ZWwgSW1hZ2UgKGd6aXAgY29tcHJlc3NlZCkNCj4gPiAgICBEYXRhIFNpemU6ICAgIDY4NTgwOSBC
eXRlcyA9IDY2OS43IGtCDQo+ID4gICAgTG9hZCBBZGRyZXNzOiAwMDAwMDAwMA0KPiA+ICAgIEVu
dHJ5IFBvaW50OiAgMDAwMDAwMDANCj4gPiAgICBWZXJpZnlpbmcgQ2hlY2tzdW0gLi4uIE9LDQo+
ID4gICAgVW5jb21wcmVzc2luZyBLZXJuZWwgSW1hZ2UgLi4uIE9LDQo+ID4gdGhlbiB0aGUga2Vy
bmVsIGlzIGRlYWQsIEkgZG8gbm90IGtub3cgd2hhdCBpcyBwcm9ibGVtLHBsZWFzZSBnaXZlIG1l
IHNvbWUgY2xldyx0aGFua3MhICAgDQo+IA0KPiBEbyB5b3UgcGFzcyB0aGUgY29uc29sZSBwYXJh
bWV0ZXIgYXQgYm9vdGluZz8gSXTno5cgYSB0eXBpY2FsIHByb2JsZW0sIHlvdXIga2VybmVsIGJv
b3RzIGJ1dCBpdCBkb2VzbuejmCBrbm93IHdoZXJlIHRoZSBjb25zb2xlIGlzLi4uDQo+IA0KPiBS
ZWdhcmRzLA0KPiBQZWRyby4NCj4gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4g7pOfYSBlc3Q/YXF1P1dpbmRvd3MgTGl2
ZSBTcGFjZXMhIEFob3JhIHBvZHLphqkgY3JlYXIgZumGlWlsbWVudGUgdHUgcHJvcGlvIHNpdGlv
IFdlYi4NCj4gaHR0cDovL3NwYWNlcy5saXZlLmNvbS9zaWdudXAuYXNweA0KDQpfX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0K
TGxhbWEgYSB0dXMgYW1pZ29zIGRlIFBDIGEgUEM6IMKhRXMgR1JBVElTIQ0KaHR0cDovL2dldC5s
aXZlLmNvbS9tZXNzZW5nZXIvb3ZlcnZpZXc=

^ permalink raw reply

* How to set non standurd baud rate on MPC5200 UART.
From: Syamala Venugopal Reddy @ 2007-08-17  9:00 UTC (permalink / raw)
  To: linuxppc-embedded


[-- Attachment #1.1: Type: text/plain, Size: 2113 bytes --]

  

tried to set non standard baud rate using tty calls.

Code snipped as fallows.

 

baudrate=5;

ret=ioctl(fd, TIOCGSERIAL, &serial_info);

if(ret!=0)

{

   perror("custom baud rate get");

}

serial_info.flags &= ~ASYNC_SPD_MASK;

serial_info.flags |= ASYNC_SPD_CUST;

 

serial_info.custom_divisor=serial_info.baud_base / baudrate;

ret=ioctl(fd, TIOCSSERIAL,&serial_info);

if(ret!=0)

{

        perror("custom baud rate set:");

}

 

This code compiles well but gives error as

"Custom baud rate set: invalid argument" in run time.

 

 

 

 

Is there any thing wrong in this code?

 

Any one worked on MPC52XX, PSC controller provided by Freescale?

 

Does this serial driver (mpc52xx) supports custom baud rates?

 

Even the following code also giving me the same error. (This will just get
the options and set the same options with out modifying)

 

ret=ioctl(fd, TIOCGSERIAL, &serial_info);

ret=ioctl(fd, TIOCSSERIAL,&serial_info);

 

 

Thanks and Regards, 

Venu , 

 



DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return  e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Consulting Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. 

[-- Attachment #1.2: Type: text/html, Size: 11815 bytes --]

[-- Attachment #2: image001.gif --]
[-- Type: image/gif, Size: 1117 bytes --]

^ permalink raw reply

* [PATCH]ppc: fix unalligned PCI BAR-mapping
From: Johan Borkhuis @ 2007-08-17  9:43 UTC (permalink / raw)
  To: Linuxppc-dev

Hello,

The following patch makes sure that all areas referred to through a BAR 
register in a PCI device are aligned on a PAGE_SIZE boundary.
When looking at the result of the PCI initialization, the BAR registers 
are filled with values that make sure the areas are directly adjacent. 
This is a problem when trying to map these memory areas into user space 
(using mmap). Mmap will only map pages, so to access the mapped area the 
user must know the offset of the BAR register within the page.
When comparing this to the i386 architecture, the areas are aligned on 
boundaries.

The following patch makes sure that all BAR areas are aligned on page 
boundaries, by rounding down the address to the next page boundary. BAR 
areas are mapped from the top down, so by just masking with 
~(PAGE_SIZE-1) the address is aligned with the page.

This is the first time I propose a patch for the Linux kernel, so please 
help me if I do something wrong here, or (in case this patch is 
acceptable) how to get this into the kernel tree.

Kind regards,
    Johan Borkhuis

=======================
diff -u linux-org/arch/ppc/syslib/pci_auto.c 
linux/arch/ppc/syslib/pci_auto.c
--- linux-org/arch/ppc/syslib/pci_auto.c    2007-01-14 
02:26:54.000000000 +0100
+++ linux/arch/ppc/syslib/pci_auto.c    2007-08-17 11:19:25.000000000 +0200
@@ -87,7 +87,7 @@
         bar_size = ~(bar_response & addr_mask) + 1;
 
         /* Allocate a base address */
-        bar_value = (*upper_limit - bar_size) & ~(bar_size - 1);
+        bar_value = ((*upper_limit - bar_size) & ~(bar_size - 1)) & 
~(PAGE_SIZE-1);
 
         /* Write it out and update our limit */
         early_write_config_dword(hose,

^ permalink raw reply

* Re: Patches for ppc?
From: David Woodhouse @ 2007-08-17 12:26 UTC (permalink / raw)
  To: Johan Borkhuis; +Cc: Linuxppc-dev
In-Reply-To: <46C5519E.6010300@dutchspace.nl>

On Fri, 2007-08-17 at 09:43 +0200, Johan Borkhuis wrote:
> I am working with a PPC-kernel, and came across a problem with the PCI 
> initialisation. On this mailing list I see a lot of patches, but they 
> are all for the PowerPC architecture. Are patches for the PPC 
> architecture still processed?
> 
> I know that the ppc-architecture is being phased out, but for the moment 
> I am stuck with it, as the board I am working with is not supported in 
> the powerpc architecture. 

If you've having to submit or look for patches, it sounds like it isn't
working with the obsolete arch/ppc either. Time to update, perhaps?

-- 
dwmw2

^ permalink raw reply

* Re: [PATCH 0/3] Remove need for include/asm-ppc
From: Josh Boyer @ 2007-08-17 12:30 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <Pine.LNX.4.64.0708170157140.15311@blarg.am.freescale.net>

On Fri, 17 Aug 2007 02:11:58 -0500 (CDT)
Kumar Gala <galak@kernel.crashing.org> wrote:

> This patch series removes the need for include/asm-ppc in the ARCH=powerpc
> build for ppc32.  They exist in the following git tree:
> 
>   master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.24
> 
> posting here for everyone else to see.

Did you happen to try building 44x with this series applied?  If not,
I'll give it a whirl later today.

josh

^ permalink raw reply

* Re: [PATCH] [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards
From: Kumar Gala @ 2007-08-17 12:50 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18117.22358.723442.148999@cargo.ozlabs.ibm.com>


On Aug 17, 2007, at 3:07 AM, Paul Mackerras wrote:

> Kumar Gala writes:
>
>> The interrupt routing in the device trees for the ULI M1575 was
>> inproperly using the interrupt line field as pci function.  Fixed
>> up the device tree's to actual conform for to specification and
>> changed the interrupt mapping code so it just uses a static mapping
>> setup as follows:
>
> This is a big patch to be going in post -rc3.  Is it really fixing a
> regression or a serious bug?

Its a regression in that the ULI M1575 doesn't really work properly  
on some of these boards in certain situations.

- k

^ permalink raw reply

* Re: [PATCH 3/3] [POWERPC] Stop include asm-ppc when building ARCH=powerpc for ppc32
From: Kumar Gala @ 2007-08-17 12:55 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20070817181352.d29117be.sfr@canb.auug.org.au>


On Aug 17, 2007, at 3:13 AM, Stephen Rothwell wrote:

> On Fri, 17 Aug 2007 02:15:54 -0500 (CDT) Kumar Gala  
> <galak@kernel.crashing.org> wrote:
>>
>> @@ -172,18 +168,15 @@ install:
>>  archclean:
>>  	$(Q)$(MAKE) $(clean)=$(boot)
>>
>> -archmrproper:
>> -	$(Q)rm -rf arch/$(ARCH)/include
>> -
>>  archprepare: checkbin
>>
>> -ifeq ($(CONFIG_PPC32),y)
>> -# Temporary hack until we have migrated to asm-powerpc
>> -include/asm: arch/$(ARCH)/include/asm
>> -arch/$(ARCH)/include/asm: FORCE
>> -	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/ 
>> include; fi
>> -	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/ 
>> include/asm
>> -endif
>> +#ifeq ($(CONFIG_PPC32),y)
>> +## Temporary hack until we have migrated to asm-powerpc
>> +#include/asm: arch/$(ARCH)/include/asm
>> +#arch/$(ARCH)/include/asm: FORCE
>> +#	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$ 
>> (ARCH)/include; fi
>> +#	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/ 
>> include/asm
>> +#endif
>
> Why not just remove it?  git will preserve it if we find a use for it.

oops, that was a debug foobar.. should have been removed.

Now fixed, got to love git-commit --amend.

- k

^ permalink raw reply

* Re: [PATCH 0/3] Remove need for include/asm-ppc
From: Kumar Gala @ 2007-08-17 12:56 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20070817073028.130728a0@zod.rchland.ibm.com>


On Aug 17, 2007, at 7:30 AM, Josh Boyer wrote:

> On Fri, 17 Aug 2007 02:11:58 -0500 (CDT)
> Kumar Gala <galak@kernel.crashing.org> wrote:
>
>> This patch series removes the need for include/asm-ppc in the  
>> ARCH=powerpc
>> build for ppc32.  They exist in the following git tree:
>>
>>   master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git  
>> for-2.6.24
>>
>> posting here for everyone else to see.
>
> Did you happen to try building 44x with this series applied?  If not,
> I'll give it a whirl later today.

I built ebony w/o any issues.

- k

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox