LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [POWERPC] fix non HUGETLB_PAGE build warning
From: Stephen Rothwell @ 2007-08-15  6:33 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

arch/powerpc/mm/mmu_context_64.c: In function 'init_new_context':
arch/powerpc/mm/mmu_context_64.c:31: warning: unused variable 'new_context'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/mm/mmu_context_64.c |    5 ++---
 arch/powerpc/mm/slice.c          |    1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c
index 7a78cdc..901ea76 100644
--- a/arch/powerpc/mm/mmu_context_64.c
+++ b/arch/powerpc/mm/mmu_context_64.c
@@ -28,7 +28,6 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 {
 	int index;
 	int err;
-	int new_context = (mm->context.id == 0);
 
 again:
 	if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL))
@@ -50,19 +49,19 @@ again:
 		return -ENOMEM;
 	}
 
-	mm->context.id = index;
 #ifdef CONFIG_PPC_MM_SLICES
 	/* The old code would re-promote on fork, we don't do that
 	 * when using slices as it could cause problem promoting slices
 	 * that have been forced down to 4K
 	 */
-	if (new_context)
+	if (mm->context.id == 0)
 		slice_set_user_psize(mm, mmu_virtual_psize);
 #else
 	mm->context.user_psize = mmu_virtual_psize;
 	mm->context.sllp = SLB_VSID_USER |
 		mmu_psize_defs[mmu_virtual_psize].sllp;
 #endif
+	mm->context.id = index;
 
 	return 0;
 }
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index d5fd390..319826e 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -551,6 +551,7 @@ EXPORT_SYMBOL_GPL(get_slice_psize);
  *
  * This is also called in init_new_context() to change back the user
  * psize from whatever the parent context had it set to
+ * N.B. This may be called before mm->context.id has been set.
  *
  * This function will only change the content of the {low,high)_slice_psize
  * masks, it will not flush SLBs as this shall be handled lazily by the
-- 
1.5.2.4

^ permalink raw reply related

* Re: [PATCH 2/4] PowerPC 440EPx: Sequoia DTS
From: Stefan Roese @ 2007-08-15  6:39 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20070814184843.GA12438@ru.mvista.com>

On Tuesday 14 August 2007, Valentine Barshak wrote:
> AMCC Sequoia device tree.

Please find some comments below.

> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> ---
>  arch/powerpc/boot/dts/sequoia.dts |  289
> ++++++++++++++++++++++++++++++++++++++ 1 files changed, 289 insertions(+)
>
> diff -ruN linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts
> linux-2.6/arch/powerpc/boot/dts/sequoia.dts ---
> linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts	1970-01-01
> 03:00:00.000000000 +0300 +++
> linux-2.6/arch/powerpc/boot/dts/sequoia.dts	2007-08-14 19:32:56.000000000
> +0400 @@ -0,0 +1,289 @@
> +/*
> + * Device Tree Source for AMCC Sequoia
> + *
> + * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
> + * Copyright (c) 2006, 2007 IBM Corp.
> + *
> + * FIXME: Draft only!
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without
> + * any warranty of any kind, whether express or implied.
> + *
> + */
> +
> +/ {
> +	#address-cells = <2>;
> +	#size-cells = <1>;
> +	model = "amcc,sequoia";
> +	compatible = "amcc,sequoia";
> +	dcr-parent = <&/cpus/PowerPC,440EPx@0>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		PowerPC,440EPx@0 {
> +			device_type = "cpu";
> +			reg = <0>;
> +			clock-frequency = <0>; /* Filled in by zImage */
> +			timebase-frequency = <0>; /* Filled in by zImage */
> +			i-cache-line-size = <20>;
> +			d-cache-line-size = <20>;
> +			i-cache-size = <8000>;
> +			d-cache-size = <8000>;
> +			dcr-controller;
> +			dcr-access-method = "native";
> +		};
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0 0 0>; /* Filled in by zImage */
> +	};
> +
> +	UIC0: interrupt-controller0 {
> +		compatible = "ibm,uic-440epx","ibm,uic";
> +		interrupt-controller;
> +		cell-index = <0>;
> +		dcr-reg = <0c0 009>;
> +		#address-cells = <0>;
> +		#size-cells = <0>;
> +		#interrupt-cells = <2>;
> +	};
> +
> +	UIC1: interrupt-controller1 {
> +		compatible = "ibm,uic-440epx","ibm,uic";
> +		interrupt-controller;
> +		cell-index = <1>;
> +		dcr-reg = <0d0 009>;
> +		#address-cells = <0>;
> +		#size-cells = <0>;
> +		#interrupt-cells = <2>;
> +		interrupts = <1e 4 1f 4>; /* cascade */
> +		interrupt-parent = <&UIC0>;
> +	};
> +
> +	UIC2: interrupt-controller2 {
> +		compatible = "ibm,uic-440epx","ibm,uic";
> +		interrupt-controller;
> +		cell-index = <2>;
> +		dcr-reg = <0e0 009>;
> +		#address-cells = <0>;
> +		#size-cells = <0>;
> +		#interrupt-cells = <2>;
> +		interrupts = <1c 4 1d 4>; /* cascade */
> +		interrupt-parent = <&UIC0>;
> +	};
> +
> +	SDR0: sdr {
> +		compatible = "ibm,sdr-440epx", "ibm,sdr-440ep";
> +		dcr-reg = <00e 002>;
> +	};
> +
> +	CPR0: cpr {
> +		compatible = "ibm,cpr-440epx", "ibm,sdr-440ep";

sdr-440ep? I assume you really mean:

+		compatible = "ibm,cpr-440epx", "ibm,cpr-440ep";

> +		dcr-reg = <00c 002>;
> +	};
> +
> +	plb {
> +		compatible = "ibm,plb-440epx", "ibm,plb4";
> +		#address-cells = <2>;
> +		#size-cells = <1>;
> +		ranges;
> +		clock-frequency = <0>; /* Filled in by zImage */
> +
> +		SDRAM0: sdram {
> +			device_type = "memory-controller";
> +			compatible = "ibm,sdram-44x-ddr2denali";
> +			dcr-reg = <010 2>;
> +		};
> +
> +		DMA0: dma {
> +			compatible = "ibm,dma-440epx", "ibm,dma-4xx";
> +			dcr-reg = <100 027>;
> +		};
> +
> +		MAL0: mcmal {
> +			compatible = "ibm,mcmal-440epx", "ibm,mcmal-440spe", "ibm,mcmal2";
> +			dcr-reg = <180 62>;
> +			num-tx-chans = <4>;
> +			num-rx-chans = <4>;
> +			interrupt-parent = <&MAL0>;
> +			interrupts = <0 1 2 3 4>;
> +			#interrupt-cells = <1>;
> +			#address-cells = <0>;
> +			#size-cells = <0>;
> +			interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
> +					/*RXEOB*/ 1 &UIC0 b 4
> +					/*SERR*/  2 &UIC1 0 4
> +					/*TXDE*/  3 &UIC1 1 4
> +					/*RXDE*/  4 &UIC1 2 4>;
> +			interrupt-map-mask = <ffffffff>;
> +		};
> +
> +		POB0: opb {
> +		  	compatible = "ibm,opb-440epx", "ibm,opb";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			/* Bamboo is oddball in the 44x world and doesn't use the ERPN
> +			 * bits.
> +			 */

Bamboo? And the 440EPx does use the ERPN bits.

> +		  	ranges = <00000000 1 00000000 80000000
> +			          80000000 1 80000000 80000000>;
> +		  	interrupt-parent = <&UIC1>;
> +		  	interrupts = <7 4>;
> +		  	clock-frequency = <0>; /* Filled in by zImage */
> +
> +			EBC0: ebc {
> +				compatible = "ibm,ebc-440epx";
> +				dcr-reg = <012 2>;
> +				#address-cells = <2>;
> +				#size-cells = <1>;
> +				clock-frequency = <0>; /* Filled in by zImage */
> +				interrupts = <5 1>;
> +				interrupt-parent = <&UIC1>;
> +
> +				nor_flash@0,0 {
> +					device_type = "rom";
> +					compatible = "direct-mapped";
> +					probe-type = "CFI";
> +					bank-width = <2>;
> +					partitions = <	0	180000
> +							180000	200000
> +							380000	3aa0000
> +							3e20000	140000
> +							3f60000	40000
> +							3fa0000	60000>;
> +					partition-names = "Kernel", "ramdisk", "file system",
> +								"kozio", "env", "u-boot";
> +					reg = <0 000000 4000000>;
> +				};
> +
> +			};
> +
> +			UART0: serial@ef600300 {
> +		   		device_type = "serial";
> +		   		compatible = "ns16550";
> +		   		reg = <ef600300 8>;
> +		   		virtual-reg = <ef600300>;
> +		   		clock-frequency = <0>; /* Filled in by zImage */
> +		   		current-speed = <1c200>;
> +		   		interrupt-parent = <&UIC0>;
> +		   		interrupts = <0 4>;
> +	   		};
> +
> +			UART1: serial@ef600400 {
> +		   		device_type = "serial";
> +		   		compatible = "ns16550";
> +		   		reg = <ef600400 8>;
> +		   		virtual-reg = <ef600400>;
> +		   		clock-frequency = <0>;
> +		   		current-speed = <0>;
> +		   		interrupt-parent = <&UIC0>;
> +		   		interrupts = <1 4>;
> +	   		};
> +
> +			UART2: serial@ef600500 {
> +		   		device_type = "serial";
> +		   		compatible = "ns16550";
> +		   		reg = <ef600500 8>;
> +		   		virtual-reg = <ef600500>;
> +		   		clock-frequency = <0>;
> +		   		current-speed = <0>;
> +		   		interrupt-parent = <&UIC1>;
> +		   		interrupts = <3 4>;
> +	   		};
> +
> +			UART3: serial@ef600600 {
> +		   		device_type = "serial";
> +		   		compatible = "ns16550";
> +		   		reg = <ef600600 8>;
> +		   		virtual-reg = <ef600600>;
> +		   		clock-frequency = <0>;
> +		   		current-speed = <0>;
> +		   		interrupt-parent = <&UIC1>;
> +		   		interrupts = <4 4>;
> +	   		};
> +
> +			IIC0: i2c@ef600700 {
> +				device_type = "i2c";
> +				compatible = "ibm,iic-440epx", "ibm,iic";
> +				reg = <ef600700 14>;
> +				interrupt-parent = <&UIC0>;
> +				interrupts = <2 4>;
> +			};
> +
> +			IIC1: i2c@ef600800 {
> +				device_type = "i2c";
> +				compatible = "ibm,iic-440epx", "ibm,iic";
> +				reg = <ef600800 14>;
> +				interrupt-parent = <&UIC0>;
> +				interrupts = <7 4>;
> +			};
> +
> +			ZMII0: emac-zmii@ef600d00 {
> +				device_type = "zmii-interface";
> +				compatible = "ibm,zmii-440epx", "ibm,zmii";
> +				reg = <ef600d00 c>;
> +			};
> +
> +			EMAC0: ethernet@ef600e00 {
> +				linux,network-index = <0>;
> +				device_type = "network";
> +				compatible = "ibm,emac-440epx", "ibm,emac-440spe", "ibm,emac4";
> +				interrupt-parent = <&EMAC0>;
> +				interrupts = <0 1>;
> +				#interrupt-cells = <1>;
> +				#address-cells = <0>;
> +				#size-cells = <0>;
> +				interrupt-map = </*Status*/ 0 &UIC0 18 4
> +						/*Wake*/  1 &UIC1 1d 4>;
> +				reg = <ef600e00 70>;
> +				local-mac-address = [000000000000];
> +				mal-device = <&MAL0>;
> +				mal-tx-channel = <0 1>;
> +				mal-rx-channel = <0>;
> +				cell-index = <0>;
> +				max-frame-size = <5dc>;
> +				rx-fifo-size = <1000>;
> +				tx-fifo-size = <800>;
> +				phy-mode = "rmii";
> +				phy-map = <00000000>;
> +				zmii-device = <&ZMII0>;
> +				zmii-channel = <0>;
> +			};
> +
> +			EMAC1: ethernet@ef600f00 {
> +				linux,network-index = <1>;
> +				device_type = "network";
> +				compatible = "ibm,emac-440epx", "ibm,emac-440spe", "ibm,emac4";
> +				interrupt-parent = <&EMAC1>;
> +				interrupts = <0 1>;
> +				#interrupt-cells = <1>;
> +				#address-cells = <0>;
> +				#size-cells = <0>;
> +				interrupt-map = </*Status*/ 0 &UIC0 19 4
> +						/*Wake*/  1 &UIC1 1f 4>;
> +				reg = <ef600f00 70>;
> +				local-mac-address = [000000000000];
> +				mal-device = <&MAL0>;
> +				mal-tx-channel = <2 3>;
> +				mal-rx-channel = <1>;
> +				cell-index = <1>;
> +				max-frame-size = <5dc>;
> +				rx-fifo-size = <1000>;
> +				tx-fifo-size = <800>;
> +				phy-mode = "rmii";
> +				phy-map = <00000000>;
> +				zmii-device = <&ZMII0>;
> +				zmii-channel = <1>;
> +			};
> +		};
> +	};
> +
> +	chosen {
> +		linux,stdout-path = "/plb/opb/serial@ef600300";
> +		bootargs = "console=ttyS0,115200";
> +	};
> +};
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev



Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de
=====================================================================

^ permalink raw reply

* [PATCH] [POWERPC] Use of_get_property in ipmi code
From: Stephen Rothwell @ 2007-08-15  6:42 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev, Corey Minyard


get_property has been renamed to of_get_property.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/char/ipmi/ipmi_si_intf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 96d2f9e..d57083a 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2251,19 +2251,19 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
 		return ret;
 	}
 
-	regsize = get_property(np, "reg-size", &proplen);
+	regsize = of_get_property(np, "reg-size", &proplen);
 	if (regsize && proplen != 4) {
 		dev_warn(&dev->dev, PFX "invalid regsize from OF\n");
 		return -EINVAL;
 	}
 
-	regspacing = get_property(np, "reg-spacing", &proplen);
+	regspacing = of_get_property(np, "reg-spacing", &proplen);
 	if (regspacing && proplen != 4) {
 		dev_warn(&dev->dev, PFX "invalid regspacing from OF\n");
 		return -EINVAL;
 	}
 
-	regshift = get_property(np, "reg-shift", &proplen);
+	regshift = of_get_property(np, "reg-shift", &proplen);
 	if (regshift && proplen != 4) {
 		dev_warn(&dev->dev, PFX "invalid regshift from OF\n");
 		return -EINVAL;
-- 
1.5.2.4

^ permalink raw reply related

* [PATCH] [POWERPC] Remove get_property and device_is_compatible
From: Stephen Rothwell @ 2007-08-15  6:45 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev, David S. Miller

They were only needed for backwards compatibility and all in tree uses
have now been changed.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/asm-powerpc/prom.h |    1 -
 include/asm-ppc/prom.h     |    1 -
 include/linux/of.h         |    1 -
 3 files changed, 0 insertions(+), 3 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 6720837..920b756 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -145,7 +145,6 @@ extern void of_detach_node(struct device_node *);
 extern void finish_device_tree(void);
 extern void unflatten_device_tree(void);
 extern void early_init_devtree(void *);
-#define device_is_compatible(d, c)	of_device_is_compatible((d), (c))
 extern int machine_is_compatible(const char *compat);
 extern void print_properties(struct device_node *node);
 extern int prom_n_intr_cells(struct device_node* np);
diff --git a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h
index 901f7fa..71f4c99 100644
--- a/include/asm-ppc/prom.h
+++ b/include/asm-ppc/prom.h
@@ -35,7 +35,6 @@ extern unsigned long sub_reloc_offset(unsigned long);
 #define machine_is_compatible(x)		0
 #define of_find_compatible_node(f, t, c)	NULL
 #define of_get_property(p, n, l)		NULL
-#define get_property(a, b, c)			of_get_property((a), (b), (c))
 
 #endif /* _PPC_PROM_H */
 #endif /* __KERNEL__ */
diff --git a/include/linux/of.h b/include/linux/of.h
index 47734ff..6df80e9 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -54,7 +54,6 @@ extern int of_device_is_compatible(const struct device_node *device,
 extern const void *of_get_property(const struct device_node *node,
 				const char *name,
 				int *lenp);
-#define get_property(a, b, c)	of_get_property((a), (b), (c))
 extern int of_n_addr_cells(struct device_node *np);
 extern int of_n_size_cells(struct device_node *np);
 
-- 
1.5.2.4

^ permalink raw reply related

* RE: Device Tree tool [was RE: [PATCH] Consolidate XILINX_VIRTEXboardsupport]
From: Michal Simek @ 2007-08-15  6:41 UTC (permalink / raw)
  To: Stephen Neuendorffer; +Cc: microblaze-uclinux, linuxppc-embedded
In-Reply-To: <20070814215438.3C7AA1B7006C@mail148-cpk.bigfish.com>

Hi,

>I've managed to get the first step working: a microblaze system
>advertising of_devices in 2.6 using a flat device tree.  

It's great news.

>Is there a concensus on how microblaze systems should get booted?
>Currently,
>I'm linking the device tree directly into the kernel itself, loading the
>whole
>mess using SystemAce and the start address jumps directly into the
>kernel, which
>is quite a bit different than the way powerpc works.  It's certainly
>simpler:
>maybe too simple.  At the same time, replicating
>the complexity of arch/powerpc with separate boot code may or may not be
>worth it...
>Any thoughts?

Microblaze can be boot via U-BOOT. U-BOOT supports FDT for some PowerPC boards.
I would like to help with this part of bootloader code. 

Do you have any EDK script for generation FDT? 

Best regards,
Michal Simek

^ permalink raw reply

* Re: [PATCH] [POWERPC] Remove get_property and device_is_compatible
From: David Miller @ 2007-08-15  6:48 UTC (permalink / raw)
  To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070815164515.44233b66.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 15 Aug 2007 16:45:15 +1000

> They were only needed for backwards compatibility and all in tree uses
> have now been changed.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

Thanks for doing this Stephen.

^ permalink raw reply

* [PATCH] [POWERPC] tidy up CONFIG_PPC_MM_SLICES code
From: Stephen Rothwell @ 2007-08-15  6:51 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

This removes some of the #ifdefs from .c files.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/mm/hash_utils_64.c  |    6 ------
 arch/powerpc/mm/mmu_context_64.c |    8 +-------
 include/asm-powerpc/page_64.h    |    7 +++++++
 3 files changed, 8 insertions(+), 13 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index f178957..c42741f 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -602,13 +602,7 @@ static void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
 {
 	if (mm->context.user_psize == MMU_PAGE_4K)
 		return;
-#ifdef CONFIG_PPC_MM_SLICES
 	slice_set_user_psize(mm, MMU_PAGE_4K);
-#else /* CONFIG_PPC_MM_SLICES */
-	mm->context.user_psize = MMU_PAGE_4K;
-	mm->context.sllp = SLB_VSID_USER | mmu_psize_defs[MMU_PAGE_4K].sllp;
-#endif /* CONFIG_PPC_MM_SLICES */
-
 #ifdef CONFIG_SPU_BASE
 	spu_flush_all_slbs(mm);
 #endif
diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c
index 901ea76..1db38ba 100644
--- a/arch/powerpc/mm/mmu_context_64.c
+++ b/arch/powerpc/mm/mmu_context_64.c
@@ -49,18 +49,12 @@ again:
 		return -ENOMEM;
 	}
 
-#ifdef CONFIG_PPC_MM_SLICES
 	/* The old code would re-promote on fork, we don't do that
 	 * when using slices as it could cause problem promoting slices
 	 * that have been forced down to 4K
 	 */
-	if (mm->context.id == 0)
+	if (slice_mm_new_context(mm))
 		slice_set_user_psize(mm, mmu_virtual_psize);
-#else
-	mm->context.user_psize = mmu_virtual_psize;
-	mm->context.sllp = SLB_VSID_USER |
-		mmu_psize_defs[mmu_virtual_psize].sllp;
-#endif
 	mm->context.id = index;
 
 	return 0;
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h
index 3448a3d..4ceb113 100644
--- a/include/asm-powerpc/page_64.h
+++ b/include/asm-powerpc/page_64.h
@@ -121,6 +121,7 @@ extern unsigned int get_slice_psize(struct mm_struct *mm,
 
 extern void slice_init_context(struct mm_struct *mm, unsigned int psize);
 extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize);
+#define slice_mm_new_context(mm)	((mm)->context.id == 0)
 
 #define ARCH_HAS_HUGEPAGE_ONLY_RANGE
 extern int is_hugepage_only_range(struct mm_struct *m,
@@ -130,6 +131,12 @@ extern int is_hugepage_only_range(struct mm_struct *m,
 #endif /* __ASSEMBLY__ */
 #else
 #define slice_init()
+#define slice_set_user_psize(mm, psize)		\
+do {						\
+	(mm)->context.user_psize = (psize);	\
+	(mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \
+} while (0)
+#define slice_mm_new_context(mm)	1
 #endif /* CONFIG_PPC_MM_SLICES */
 
 #ifdef CONFIG_HUGETLB_PAGE
-- 
1.5.2.4

^ permalink raw reply related

* [PATCH] [POWERPC] Comment out a currently unused function
From: Stephen Rothwell @ 2007-08-15  6:54 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/macintosh/windfarm_smu_sat.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index 351982b..f449d77 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -380,10 +380,12 @@ static int __init sat_sensors_init(void)
 	return i2c_add_driver(&wf_sat_driver);
 }
 
+#if 0	/* uncomment when module_exit() below is uncommented */
 static void __exit sat_sensors_exit(void)
 {
 	i2c_del_driver(&wf_sat_driver);
 }
+#endif
 
 module_init(sat_sensors_init);
 /*module_exit(sat_sensors_exit); Uncomment when cleanup is implemented */
-- 
1.5.2.4

^ permalink raw reply related

* [patch 03/10] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
From: Geert Uytterhoeven @ 2007-08-15  9:45 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: linux-input, linuxppc-dev, linux-m68k, Dmitry Torokhov,
	linux-kernel
In-Reply-To: <20070815094539.181979221@mail.of.borg>

From: Geert Uytterhoeven <geert@linux-m68k.org>

m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible

drivers/char/keyboard.c: In function 'kbd_keycode':
drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons'

The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on
m68k because it's hidden in the middle of a big #ifdef block.

Move it to <linux/kbd_kern.h>, correct the type of the second parameter, and
include <linux/kbd_kern.h> where needed.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/char/keyboard.c     |    4 ----
 drivers/macintosh/mac_hid.c |    1 +
 include/linux/kbd_kern.h    |    3 +++
 3 files changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -1022,10 +1022,6 @@ static const unsigned short x86_keycodes
 	308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330,
 	332,340,365,342,343,344,345,346,356,270,341,368,369,370,371,372 };
 
-#ifdef CONFIG_MAC_EMUMOUSEBTN
-extern int mac_hid_mouse_emulate_buttons(int, int, int);
-#endif /* CONFIG_MAC_EMUMOUSEBTN */
-
 #ifdef CONFIG_SPARC
 static int sparc_l1_a_state = 0;
 extern void sun_do_break(void);
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -13,6 +13,7 @@
 #include <linux/sysctl.h>
 #include <linux/input.h>
 #include <linux/module.h>
+#include <linux/kbd_kern.h>
 
 
 static struct input_dev *emumousebtn;
--- a/include/linux/kbd_kern.h
+++ b/include/linux/kbd_kern.h
@@ -161,4 +161,7 @@ static inline void con_schedule_flip(str
 	schedule_delayed_work(&t->buf.work, 0);
 }
 
+/* mac_hid.c */
+extern int mac_hid_mouse_emulate_buttons(int, unsigned int, int);
+
 #endif

-- 
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply

* [PATCH] [POWERPC] Fix section mismatch in crash_dump.c
From: Stephen Rothwell @ 2007-08-15 10:53 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

WARNING: vmlinux.o(.text+0x23258): Section mismatch: reference to .init.text:.lmb_reserve (between '.reserve_kdump_trampoline' and '.restore_processor_state')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/crash_dump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 2f6f5a7..ffa91d6 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -25,7 +25,7 @@
 #define DBG(fmt...)
 #endif
 
-void reserve_kdump_trampoline(void)
+void __init reserve_kdump_trampoline(void)
 {
 	lmb_reserve(0, KDUMP_RESERVE_LIMIT);
 }
-- 
1.5.2.4

^ permalink raw reply related

* [PATCH] [POWERPC] Fix section mismatch in dart_iommu.c
From: Stephen Rothwell @ 2007-08-15 10:54 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

These functions are only called from __init functions.

WARNING: vmlinux.o(.text+0x398f4): Section mismatch: reference to .init.text:.lmb_alloc (between '.iommu_init_early_dart' and '.pci_dma_bus_setup_dart')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/sysdev/dart_iommu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index a1d2042..e0e24b0 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -204,7 +204,7 @@ static void dart_free(struct iommu_table *tbl, long index, long npages)
 }
 
 
-static int dart_init(struct device_node *dart_node)
+static int __init dart_init(struct device_node *dart_node)
 {
 	unsigned int i;
 	unsigned long tmp, base, size;
@@ -313,7 +313,7 @@ static void pci_dma_bus_setup_dart(struct pci_bus *bus)
 		PCI_DN(dn)->iommu_table = &iommu_table_dart;
 }
 
-void iommu_init_early_dart(void)
+void __init iommu_init_early_dart(void)
 {
 	struct device_node *dn;
 
-- 
1.5.2.4

^ permalink raw reply related

* [PATCH] [POWERPC] Fix section mismatches in udbg_adb.c
From: Stephen Rothwell @ 2007-08-15 10:55 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

The functions ae only called from __init functions.

WARNING: vmlinux.o(.text+0x45ed0): Section mismatch: reference to .init.text:.btext_find_display (between '.udbg_adb_init_early' and '.udbg_adb_init')
WARNING: vmlinux.o(.text+0x45f9c): Section mismatch: reference to .init.text:.btext_find_display (between '.udbg_adb_init' and '.udbg_adb_getc_poll')
WARNING: vmlinux.o(.text+0x46000): Section mismatch: reference to .init.text:.find_via_pmu (between '.udbg_adb_init' and '.udbg_adb_getc_poll')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/platforms/powermac/udbg_adb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c
index 6124e59..1f60f2a 100644
--- a/arch/powerpc/platforms/powermac/udbg_adb.c
+++ b/arch/powerpc/platforms/powermac/udbg_adb.c
@@ -150,7 +150,7 @@ static void udbg_adb_putc(char c)
 		return udbg_adb_old_putc(c);
 }
 
-void udbg_adb_init_early(void)
+void __init udbg_adb_init_early(void)
 {
 #ifdef CONFIG_BOOTX_TEXT
 	if (btext_find_display(1) == 0) {
@@ -160,7 +160,7 @@ void udbg_adb_init_early(void)
 #endif
 }
 
-int udbg_adb_init(int force_btext)
+int __init udbg_adb_init(int force_btext)
 {
 	struct device_node *np;
 
-- 
1.5.2.4

^ permalink raw reply related

* [PATCH] [POWERPC] Fix section mismatch in pasemi/iommu.c
From: Stephen Rothwell @ 2007-08-15 10:58 UTC (permalink / raw)
  To: paulus; +Cc: Olof Johansson, ppc-dev

These functions are only called by __init functions.

WARNING: vmlinux.o(.text+0x56aa0): Section mismatch: reference to .init.text:.lmb_alloc (between '.iob_init' and '.iommu_init_early_pasemi')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/platforms/pasemi/iommu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index f33b21b..c910ec9 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -187,7 +187,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
 static void pci_dma_bus_setup_null(struct pci_bus *b) { }
 static void pci_dma_dev_setup_null(struct pci_dev *d) { }
 
-int iob_init(struct device_node *dn)
+int __init iob_init(struct device_node *dn)
 {
 	unsigned long tmp;
 	u32 regword;
@@ -233,7 +233,7 @@ int iob_init(struct device_node *dn)
 
 
 /* These are called very early. */
-void iommu_init_early_pasemi(void)
+void __init iommu_init_early_pasemi(void)
 {
 	int iommu_off;
 
-- 
1.5.2.4

^ permalink raw reply related

* [PATCH] [POWERPC] Fix section mismatch in scc_sio.c
From: Stephen Rothwell @ 2007-08-15 11:02 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev, cbe-oss-dev

WARNING: vmlinux.o(.text+0x69d0c): Section mismatch: reference to .init.text:.early_serial_txx9_setup (between '.txx9_serial_init' and '.cpu_affinity_set')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/platforms/celleb/scc_sio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/platforms/celleb/scc_sio.c b/arch/powerpc/platforms/celleb/scc_sio.c
index bcd25f5..d219b60 100644
--- a/arch/powerpc/platforms/celleb/scc_sio.c
+++ b/arch/powerpc/platforms/celleb/scc_sio.c
@@ -39,7 +39,7 @@ static struct {
 	{ 0x800, 1 }	/* 0xFF2800 */
 };
 
-static int txx9_serial_init(void)
+static int __init txx9_serial_init(void)
 {
 	extern int early_serial_txx9_setup(struct uart_port *port);
 	struct device_node *node;
-- 
1.5.2.4

^ permalink raw reply related

* Please pull powerpc.git merge branch
From: Paul Mackerras @ 2007-08-15 11:41 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev

Linus,

Please do

git pull \
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge

to get a few more bug-fixes for powerpc.

Thanks,
Paul.

 arch/powerpc/boot/flatdevtree.c            |   18 ------------------
 arch/powerpc/kernel/Makefile               |    1 +
 arch/powerpc/kernel/misc_32.S              |   12 +++++++++++-
 arch/powerpc/platforms/cell/spu_syscalls.c |    1 +
 arch/powerpc/platforms/ps3/device-init.c   |    2 +-
 arch/ppc/kernel/misc.S                     |   12 +++++++++++-
 6 files changed, 25 insertions(+), 21 deletions(-)

commit 2de69124e86682c3427adb4136e097854841e467
Author: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Date:   Wed Aug 15 02:30:13 2007 +1000

    [POWERPC] ps3: Fix no storage devices found
    
    Fix probing of PS3 storage devices: in the success case, we should set
    `error' to zero, not `result'.
    
    Without this patch no storage devices are found.
    
    Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

commit 55a910a81d0c3014abc20b9efa73c595b3e68339
Author: Roland McGrath <roland@redhat.com>
Date:   Sat Aug 11 09:03:11 2007 +1000

    [POWERPC] Fix for assembler -g
    
    ppc64 does the unusual thing of using #include on a compiler-generated
    assembly file (lparmap.s) from an assembly source file (head_64.S).
    This runs afoul of my recent patch to pass -gdwarf2 to the assembler
    under CONFIG_DEBUG_INFO.  This patch avoids the problem by disabling
    DWARF generation (-g0) when producing lparmap.s.
    
    Signed-off-by: Roland McGrath <roland@redhat.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

commit aa1cf632bd6f998cb4567ccf1a9d2e5daaa9fb44
Author: David Gibson <david@gibson.dropbear.id.au>
Date:   Tue Aug 7 14:20:50 2007 +1000

    [POWERPC] Fix small race in 44x tlbie function
    
    The 440 family of processors don't have a tlbie instruction.  So, we
    implement TLB invalidates by explicitly searching the TLB with tlbsx.,
    then clobbering the relevant entry, if any.  Unfortunately the PID for
    the search needs to be stored in the MMUCR register, which is also
    used by the TLB miss handler.  Interrupts were enabled in _tlbie(), so
    an interrupt between loading the MMUCR and the tlbsx could cause
    incorrect search results, and thus a failure to invalide TLB entries
    which needed to be invalidated.
    
    This fixes the problem in both arch/ppc and arch/powerpc by inhibiting
    interrupts (even critical and debug interrupts) across the relevant
    instructions.
    
    Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
    Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

commit fa6b769a8e981afea869285982640168f76774df
Author: Becky Bruce <becky.bruce@freescale.com>
Date:   Sat May 12 03:49:39 2007 +1000

    [POWERPC] Remove unused code causing a compile warning
    
    AFAICT, nobody is using ft_ordered(), and it causes a build warning
    to be generated.  This patch cleans that up by removing the function
    and the commented-out code that calls it.
    
    Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
    Acked-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

commit ad941fe4b6b83999863f49dfba7b3d2cebc4ced5
Author: Jeremy Kerr <jk@ozlabs.org>
Date:   Mon Aug 13 13:22:44 2007 +1000

    [POWERPC] cell: Fix errno for modular spufs_create with invalid neighbour
    
    At present, spu_create with an invalid neighbo(u)r will return -ENOSYS,
    not -EBADF, but only when spufs.o is built as a module.
    
    This change adds the appropriate errno, making the behaviour the same
    as the built-in case.
    
    Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
    Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

^ permalink raw reply

* [PATCH] powerpc: add setmaskedbits macros
From: Timur Tabi @ 2007-08-15 12:07 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Timur Tabi

This patch adds the setmaskedbits_xxx() macros, which are used to set a
multiple-bit bit pattern in a register.  The macros include a mask, which
zeros the respective bits before applying the value via a bitwise-OR.
There are big-endian and little-endian versions for 8, 16, 32, and 64 bits.

Signed-off-by: Timur Tabi <timur@freescale.com>
---

Fixed the changelog.

 include/asm-powerpc/io.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index bb8d965..ac3defb 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -734,6 +734,19 @@ 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))
 
+#ifdef __powerpc64__
+#define setmaskedbits_be64(a, v, m) out_be64((a), (in_be64(a) & ~(m)) | (v))
+#define setmaskedbits_le64(a, v, m) out_le64((a), (in_le64(a) & ~(m)) | (v))
+#endif
+
+#define setmaskedbits_be32(a, v, m) out_be32((a), (in_be32(a) & ~(m)) | (v))
+#define setmaskedbits_be16(a, v, m) out_be16((a), (in_be16(a) & ~(m)) | (v))
+
+#define setmaskedbits_le32(a, v, m) out_le32((a), (in_le32(a) & ~(m)) | (v))
+#define setmaskedbits_le16(a, v, m) out_le16((a), (in_le16(a) & ~(m)) | (v))
+
+#define setmaskedbits_8(a, v, m) out_8((a), (in_8(a) & ~(m)) | (v))
+
 #endif /* __KERNEL__ */
 
 #endif /* _ASM_POWERPC_IO_H */
-- 
1.5.2.4

^ permalink raw reply related

* Re: [PATCH 2/4] PowerPC 440EPx: Sequoia DTS
From: Valentine Barshak @ 2007-08-15 12:09 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200708150839.21655.sr@denx.de>

Stefan Roese wrote:
> On Tuesday 14 August 2007, Valentine Barshak wrote:
>> AMCC Sequoia device tree.
> 
> Please find some comments below.
> 
>> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
>> ---
>>  arch/powerpc/boot/dts/sequoia.dts |  289
>> ++++++++++++++++++++++++++++++++++++++ 1 files changed, 289 insertions(+)
>>
>> diff -ruN linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts
>> linux-2.6/arch/powerpc/boot/dts/sequoia.dts ---
>> linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts	1970-01-01
>> 03:00:00.000000000 +0300 +++
>> linux-2.6/arch/powerpc/boot/dts/sequoia.dts	2007-08-14 19:32:56.000000000
>> +0400 @@ -0,0 +1,289 @@
>> +/*
>> + * Device Tree Source for AMCC Sequoia
>> + *
>> + * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
>> + * Copyright (c) 2006, 2007 IBM Corp.
>> + *
>> + * FIXME: Draft only!
>> + *
>> + * This file is licensed under the terms of the GNU General Public
>> + * License version 2.  This program is licensed "as is" without
>> + * any warranty of any kind, whether express or implied.
>> + *
>> + */
>> +
>> +/ {
>> +	#address-cells = <2>;
>> +	#size-cells = <1>;
>> +	model = "amcc,sequoia";
>> +	compatible = "amcc,sequoia";
>> +	dcr-parent = <&/cpus/PowerPC,440EPx@0>;
>> +
>> +	cpus {
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		PowerPC,440EPx@0 {
>> +			device_type = "cpu";
>> +			reg = <0>;
>> +			clock-frequency = <0>; /* Filled in by zImage */
>> +			timebase-frequency = <0>; /* Filled in by zImage */
>> +			i-cache-line-size = <20>;
>> +			d-cache-line-size = <20>;
>> +			i-cache-size = <8000>;
>> +			d-cache-size = <8000>;
>> +			dcr-controller;
>> +			dcr-access-method = "native";
>> +		};
>> +	};
>> +
>> +	memory {
>> +		device_type = "memory";
>> +		reg = <0 0 0>; /* Filled in by zImage */
>> +	};
>> +
>> +	UIC0: interrupt-controller0 {
>> +		compatible = "ibm,uic-440epx","ibm,uic";
>> +		interrupt-controller;
>> +		cell-index = <0>;
>> +		dcr-reg = <0c0 009>;
>> +		#address-cells = <0>;
>> +		#size-cells = <0>;
>> +		#interrupt-cells = <2>;
>> +	};
>> +
>> +	UIC1: interrupt-controller1 {
>> +		compatible = "ibm,uic-440epx","ibm,uic";
>> +		interrupt-controller;
>> +		cell-index = <1>;
>> +		dcr-reg = <0d0 009>;
>> +		#address-cells = <0>;
>> +		#size-cells = <0>;
>> +		#interrupt-cells = <2>;
>> +		interrupts = <1e 4 1f 4>; /* cascade */
>> +		interrupt-parent = <&UIC0>;
>> +	};
>> +
>> +	UIC2: interrupt-controller2 {
>> +		compatible = "ibm,uic-440epx","ibm,uic";
>> +		interrupt-controller;
>> +		cell-index = <2>;
>> +		dcr-reg = <0e0 009>;
>> +		#address-cells = <0>;
>> +		#size-cells = <0>;
>> +		#interrupt-cells = <2>;
>> +		interrupts = <1c 4 1d 4>; /* cascade */
>> +		interrupt-parent = <&UIC0>;
>> +	};
>> +
>> +	SDR0: sdr {
>> +		compatible = "ibm,sdr-440epx", "ibm,sdr-440ep";
>> +		dcr-reg = <00e 002>;
>> +	};
>> +
>> +	CPR0: cpr {
>> +		compatible = "ibm,cpr-440epx", "ibm,sdr-440ep";
> 
> sdr-440ep? I assume you really mean:
> 
> +		compatible = "ibm,cpr-440epx", "ibm,cpr-440ep";

Oops, thanks for noticing that.

> 
>> +		dcr-reg = <00c 002>;
>> +	};
>> +
>> +	plb {
>> +		compatible = "ibm,plb-440epx", "ibm,plb4";
>> +		#address-cells = <2>;
>> +		#size-cells = <1>;
>> +		ranges;
>> +		clock-frequency = <0>; /* Filled in by zImage */
>> +
>> +		SDRAM0: sdram {
>> +			device_type = "memory-controller";
>> +			compatible = "ibm,sdram-44x-ddr2denali";
>> +			dcr-reg = <010 2>;
>> +		};
>> +
>> +		DMA0: dma {
>> +			compatible = "ibm,dma-440epx", "ibm,dma-4xx";
>> +			dcr-reg = <100 027>;
>> +		};
>> +
>> +		MAL0: mcmal {
>> +			compatible = "ibm,mcmal-440epx", "ibm,mcmal-440spe", "ibm,mcmal2";
>> +			dcr-reg = <180 62>;
>> +			num-tx-chans = <4>;
>> +			num-rx-chans = <4>;
>> +			interrupt-parent = <&MAL0>;
>> +			interrupts = <0 1 2 3 4>;
>> +			#interrupt-cells = <1>;
>> +			#address-cells = <0>;
>> +			#size-cells = <0>;
>> +			interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
>> +					/*RXEOB*/ 1 &UIC0 b 4
>> +					/*SERR*/  2 &UIC1 0 4
>> +					/*TXDE*/  3 &UIC1 1 4
>> +					/*RXDE*/  4 &UIC1 2 4>;
>> +			interrupt-map-mask = <ffffffff>;
>> +		};
>> +
>> +		POB0: opb {
>> +		  	compatible = "ibm,opb-440epx", "ibm,opb";
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +			/* Bamboo is oddball in the 44x world and doesn't use the ERPN
>> +			 * bits.
>> +			 */
> 
> Bamboo? And the 440EPx does use the ERPN bits.

I'll remove the comment.

> 
>> +		  	ranges = <00000000 1 00000000 80000000
>> +			          80000000 1 80000000 80000000>;
>> +		  	interrupt-parent = <&UIC1>;
>> +		  	interrupts = <7 4>;
>> +		  	clock-frequency = <0>; /* Filled in by zImage */
>> +
>> +			EBC0: ebc {
>> +				compatible = "ibm,ebc-440epx";
>> +				dcr-reg = <012 2>;
>> +				#address-cells = <2>;
>> +				#size-cells = <1>;
>> +				clock-frequency = <0>; /* Filled in by zImage */
>> +				interrupts = <5 1>;
>> +				interrupt-parent = <&UIC1>;
>> +
>> +				nor_flash@0,0 {
>> +					device_type = "rom";
>> +					compatible = "direct-mapped";
>> +					probe-type = "CFI";
>> +					bank-width = <2>;
>> +					partitions = <	0	180000
>> +							180000	200000
>> +							380000	3aa0000
>> +							3e20000	140000
>> +							3f60000	40000
>> +							3fa0000	60000>;
>> +					partition-names = "Kernel", "ramdisk", "file system",
>> +								"kozio", "env", "u-boot";
>> +					reg = <0 000000 4000000>;
>> +				};
>> +
>> +			};
>> +
>> +			UART0: serial@ef600300 {
>> +		   		device_type = "serial";
>> +		   		compatible = "ns16550";
>> +		   		reg = <ef600300 8>;
>> +		   		virtual-reg = <ef600300>;
>> +		   		clock-frequency = <0>; /* Filled in by zImage */
>> +		   		current-speed = <1c200>;
>> +		   		interrupt-parent = <&UIC0>;
>> +		   		interrupts = <0 4>;
>> +	   		};
>> +
>> +			UART1: serial@ef600400 {
>> +		   		device_type = "serial";
>> +		   		compatible = "ns16550";
>> +		   		reg = <ef600400 8>;
>> +		   		virtual-reg = <ef600400>;
>> +		   		clock-frequency = <0>;
>> +		   		current-speed = <0>;
>> +		   		interrupt-parent = <&UIC0>;
>> +		   		interrupts = <1 4>;
>> +	   		};
>> +
>> +			UART2: serial@ef600500 {
>> +		   		device_type = "serial";
>> +		   		compatible = "ns16550";
>> +		   		reg = <ef600500 8>;
>> +		   		virtual-reg = <ef600500>;
>> +		   		clock-frequency = <0>;
>> +		   		current-speed = <0>;
>> +		   		interrupt-parent = <&UIC1>;
>> +		   		interrupts = <3 4>;
>> +	   		};
>> +
>> +			UART3: serial@ef600600 {
>> +		   		device_type = "serial";
>> +		   		compatible = "ns16550";
>> +		   		reg = <ef600600 8>;
>> +		   		virtual-reg = <ef600600>;
>> +		   		clock-frequency = <0>;
>> +		   		current-speed = <0>;
>> +		   		interrupt-parent = <&UIC1>;
>> +		   		interrupts = <4 4>;
>> +	   		};
>> +
>> +			IIC0: i2c@ef600700 {
>> +				device_type = "i2c";
>> +				compatible = "ibm,iic-440epx", "ibm,iic";
>> +				reg = <ef600700 14>;
>> +				interrupt-parent = <&UIC0>;
>> +				interrupts = <2 4>;
>> +			};
>> +
>> +			IIC1: i2c@ef600800 {
>> +				device_type = "i2c";
>> +				compatible = "ibm,iic-440epx", "ibm,iic";
>> +				reg = <ef600800 14>;
>> +				interrupt-parent = <&UIC0>;
>> +				interrupts = <7 4>;
>> +			};
>> +
>> +			ZMII0: emac-zmii@ef600d00 {
>> +				device_type = "zmii-interface";
>> +				compatible = "ibm,zmii-440epx", "ibm,zmii";
>> +				reg = <ef600d00 c>;
>> +			};
>> +
>> +			EMAC0: ethernet@ef600e00 {
>> +				linux,network-index = <0>;
>> +				device_type = "network";
>> +				compatible = "ibm,emac-440epx", "ibm,emac-440spe", "ibm,emac4";
>> +				interrupt-parent = <&EMAC0>;
>> +				interrupts = <0 1>;
>> +				#interrupt-cells = <1>;
>> +				#address-cells = <0>;
>> +				#size-cells = <0>;
>> +				interrupt-map = </*Status*/ 0 &UIC0 18 4
>> +						/*Wake*/  1 &UIC1 1d 4>;
>> +				reg = <ef600e00 70>;
>> +				local-mac-address = [000000000000];
>> +				mal-device = <&MAL0>;
>> +				mal-tx-channel = <0 1>;
>> +				mal-rx-channel = <0>;
>> +				cell-index = <0>;
>> +				max-frame-size = <5dc>;
>> +				rx-fifo-size = <1000>;
>> +				tx-fifo-size = <800>;
>> +				phy-mode = "rmii";
>> +				phy-map = <00000000>;
>> +				zmii-device = <&ZMII0>;
>> +				zmii-channel = <0>;
>> +			};
>> +
>> +			EMAC1: ethernet@ef600f00 {
>> +				linux,network-index = <1>;
>> +				device_type = "network";
>> +				compatible = "ibm,emac-440epx", "ibm,emac-440spe", "ibm,emac4";
>> +				interrupt-parent = <&EMAC1>;
>> +				interrupts = <0 1>;
>> +				#interrupt-cells = <1>;
>> +				#address-cells = <0>;
>> +				#size-cells = <0>;
>> +				interrupt-map = </*Status*/ 0 &UIC0 19 4
>> +						/*Wake*/  1 &UIC1 1f 4>;
>> +				reg = <ef600f00 70>;
>> +				local-mac-address = [000000000000];
>> +				mal-device = <&MAL0>;
>> +				mal-tx-channel = <2 3>;
>> +				mal-rx-channel = <1>;
>> +				cell-index = <1>;
>> +				max-frame-size = <5dc>;
>> +				rx-fifo-size = <1000>;
>> +				tx-fifo-size = <800>;
>> +				phy-mode = "rmii";
>> +				phy-map = <00000000>;
>> +				zmii-device = <&ZMII0>;
>> +				zmii-channel = <1>;
>> +			};
>> +		};
>> +	};
>> +
>> +	chosen {
>> +		linux,stdout-path = "/plb/opb/serial@ef600300";
>> +		bootargs = "console=ttyS0,115200";
>> +	};
>> +};
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 
> 
> 
> Best regards,
> Stefan
> 
> =====================================================================
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de
> =====================================================================

^ permalink raw reply

* Re: [PATCH 1/4] PowerPC 440EPx: Sequoia defconfig
From: Valentine Barshak @ 2007-08-15 12:11 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <20070814142148.40bd7a57@zod.rchland.ibm.com>

Josh Boyer wrote:
> On Tue, 14 Aug 2007 22:45:00 +0400
> Valentine Barshak <vbarshak@ru.mvista.com> wrote:
> 
>> Sequoia defconfig
>>
>> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
>> ---
>>  arch/powerpc/configs/sequoia_defconfig |  783 +++++++++++++++++++++++++++++++++
>>  1 files changed, 783 insertions(+)
>>
>> diff -ruN linux-2.6.orig/arch/powerpc/configs/sequoia_defconfig linux-2.6/arch/powerpc/configs/sequoia_defconfig
>> --- linux-2.6.orig/arch/powerpc/configs/sequoia_defconfig	1970-01-01 03:00:00.000000000 +0300
>> +++ linux-2.6/arch/powerpc/configs/sequoia_defconfig	2007-08-14 17:18:07.000000000 +0400
>> @@ -0,0 +1,783 @@
>> +#
>> +# Automatically generated make config: don't edit
>> +# Linux kernel version: 2.6.23-rc1
>> +# Fri Jul 27 20:46:07 2007
>> +#
>> +# CONFIG_PPC64 is not set
>> +
>> +#
>> +# Processor support
>> +#
>> +# CONFIG_6xx is not set
>> +# CONFIG_PPC_85xx is not set
>> +# CONFIG_PPC_8xx is not set
>> +# CONFIG_40x is not set
>> +CONFIG_44x=y
>> +# CONFIG_E200 is not set
>> +CONFIG_PPC_FPU=y
> 
> ...
> 
>> +CONFIG_MATH_EMULATION=y
> 
> You shouldn't need both FPU and MATH_EMULATION.  Bamboo had the same
> bug in it's defconfig until recently, so you can blame me if you'd
> like :)
> 

OK, I'll correct this one.
Thanks for noticing that :)

> josh
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: [PATCH 3/4] PowerPC 440EPx: Sequoia bootwrapper
From: Valentine Barshak @ 2007-08-15 12:22 UTC (permalink / raw)
  To: Valentine Barshak, linuxppc-dev; +Cc: David Gibson
In-Reply-To: <20070815034622.GB22849@localhost.localdomain>

David Gibson wrote:
> On Tue, Aug 14, 2007 at 10:53:55PM +0400, Valentine Barshak wrote:
>> Bootwrapper code for AMCC 440EPx Sequoia board.
>> The DDR2 Denali controller support has been moved to
>>  arch/powerpc/boot/4xx.c
>> The code also uses 440EP clocking fixups
>> initially provided for 440EP Bamboo.
>>
>> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> 
> [snip]
>> diff -ruN linux-2.6.orig/arch/powerpc/boot/cuboot-sequoia.c linux-2.6/arch/powerpc/boot/cuboot-sequoia.c
>> --- linux-2.6.orig/arch/powerpc/boot/cuboot-sequoia.c	1970-01-01 03:00:00.000000000 +0300
>> +++ linux-2.6/arch/powerpc/boot/cuboot-sequoia.c	2007-08-14 17:25:37.000000000 +0400
>> @@ -0,0 +1,31 @@
>> +/*
>> + * Old U-boot compatibility for Sequoia
>> + *
>> + * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au>
>> + *
>> + * Copyright 2007 David Gibson, IBM Corporatio.
>> + *   Based on cuboot-83xx.c, which is:
>> + * Copyright (c) 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 version 2 as published
>> + * by the Free Software Foundation.
>> + */
>> +
>> +#include "ops.h"
>> +#include "stdio.h"
>> +#include "44x.h"
>> +#include "cuboot.h"
>> +
>> +#define TARGET_4xx
>> +#define TARGET_44x
> 
> Surely you need to be more specific than that to select the correct
> bd_t structure?
> 

Both TARGET_4xx and TARGET_44x should be selected for 44x. Otherwise I 
get wrong bd_t structure (wrong offsets to the eth0/eth1 MAC addresses). 
In the older arch/ppc code it used to be CONFIG_4xx and it was selected 
for CONFIG_40x and CONFIG_44x as well.

>> +#include "ppcboot.h"
>> +
>> +static bd_t bd;
>> +
>> +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
>> +                   unsigned long r6, unsigned long r7)
>> +{
>> +	CUBOOT_INIT();
>> +	sequoia_init(&bd.bi_enetaddr, &bd.bi_enet1addr);
>> +}
>> diff -ruN linux-2.6.orig/arch/powerpc/boot/Makefile linux-2.6/arch/powerpc/boot/Makefile
>> --- linux-2.6.orig/arch/powerpc/boot/Makefile	2007-08-14 17:11:16.000000000 +0400
>> +++ linux-2.6/arch/powerpc/boot/Makefile	2007-08-14 17:25:38.000000000 +0400
>> @@ -44,10 +44,11 @@
>>  src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
>>  		ns16550.c serial.c simple_alloc.c div64.S util.S \
>>  		gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
>> -		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c
>> +		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
>> +		sequoia.c
>>  src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
>>  		cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
>> -		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c
>> +		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-sequoia.c
>>  src-boot := $(src-wlib) $(src-plat) empty.c
>>  
>>  src-boot := $(addprefix $(obj)/, $(src-boot))
>> @@ -143,6 +144,7 @@
>>  image-$(CONFIG_PPC_85xx)		+= cuImage.85xx
>>  image-$(CONFIG_EBONY)			+= treeImage.ebony cuImage.ebony
>>  image-$(CONFIG_BAMBOO)			+= treeImage.bamboo
>> +image-$(CONFIG_SEQUOIA)			+= cuImage.sequoia
>>  endif
>>  
>>  # For 32-bit powermacs, build the COFF and miboot images
>> diff -ruN linux-2.6.orig/arch/powerpc/boot/sequoia.c linux-2.6/arch/powerpc/boot/sequoia.c
>> --- linux-2.6.orig/arch/powerpc/boot/sequoia.c	1970-01-01 03:00:00.000000000 +0300
>> +++ linux-2.6/arch/powerpc/boot/sequoia.c	2007-08-14 20:52:10.000000000 +0400
> 
> Unless another bootloader is expected to come along for Sequoia,
> there's no reason to separate sequoia.c from cuboot-sequoia.c
> 

The previous version of Sequoia series had treeboot-sequoia.c, but I've 
removed it since only u-boot is used now.
I'm not sure if there are any other bootloaders expected, but is it OK 
if I leave 2 separate files just in case? :)

>> @@ -0,0 +1,48 @@
>> +/*;5A
>> + * Valentine Barshak <vbarshak@ru.mvista.com>
>> + * Copyright 2007 MontaVista Software, Inc
>> + *
>> + * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
>> + * Copyright IBM Corporation, 2007
>> + *
>> + * 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; version 2 of the License
>> + */
>> +#include <stdarg.h>
>> +#include <stddef.h>
>> +#include "types.h"
>> +#include "elf.h"
>> +#include "string.h"
>> +#include "stdio.h"
>> +#include "page.h"
>> +#include "ops.h"
>> +#include "dcr.h"
>> +#include "4xx.h"
>> +#include "44x.h"
>> +
>> +extern char _dtb_start[];
>> +extern char _dtb_end[];
>> +
>> +static u8 *sequoia_mac0, *sequoia_mac1;
>> +
>> +
>> +static void sequoia_fixups(void)
>> +{
>> +	unsigned long sysclk = 33333333;
>> +
>> +	ibm440ep_fixup_clocks(sysclk, 11059200);
>> +	ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
>> +	ibm4xx_denali_fixup_memsize();
>> +	dt_fixup_mac_addresses(sequoia_mac0, sequoia_mac1);
>> +}
>> +
>> +void sequoia_init(void *mac0, void *mac1)
>> +{
>> +	platform_ops.fixups = sequoia_fixups;
>> +	platform_ops.exit = ibm44x_dbcr_reset;
>> +	sequoia_mac0 = mac0;
>> +	sequoia_mac1 = mac1;
>> +	ft_init(_dtb_start, 0, 32);
>> +	serial_console_init();
>> +}
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>>
> 

^ permalink raw reply

* Re: [PATCH 4/4] PowerPC 440EPx: Sequoia board support
From: Valentine Barshak @ 2007-08-15 13:53 UTC (permalink / raw)
  To: Valentine Barshak, linuxppc-dev; +Cc: David Gibson
In-Reply-To: <20070815034808.GC22849@localhost.localdomain>

David Gibson wrote:
> On Tue, Aug 14, 2007 at 11:04:09PM +0400, Valentine Barshak wrote:
>> AMCC 440EPx Sequoia board support.
>> The second bit (0x4) in the 440EPx/440GRx PVR value indicates
>> the Security/Kasumi engine absence if set.
>> This bit has been removed from the pvr mask to use a single
>> cputable entry for with/without Security/Kasumi cpu versions.
>>
>>
>> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
>> ---
>>  arch/powerpc/kernel/cputable.c       |   18 +++++++++
>>  arch/powerpc/kernel/head_44x.S       |    2 -
>>  arch/powerpc/platforms/44x/Kconfig   |   17 ++++++++-
>>  arch/powerpc/platforms/44x/Makefile  |    1 
>>  arch/powerpc/platforms/44x/sequoia.c |   66 +++++++++++++++++++++++++++++++++++
>>  5 files changed, 102 insertions(+), 2 deletions(-)
>>
>> diff -ruN linux-2.6.orig/arch/powerpc/kernel/cputable.c linux-2.6/arch/powerpc/kernel/cputable.c
>> --- linux-2.6.orig/arch/powerpc/kernel/cputable.c	2007-08-14 17:11:18.000000000 +0400
>> +++ linux-2.6/arch/powerpc/kernel/cputable.c	2007-08-14 19:37:54.000000000 +0400
>> @@ -1132,6 +1132,24 @@
>>  		.dcache_bsize		= 32,
>>  		.platform		= "ppc440",
>>  	},
>> +	{ /* 440EPX */
>> +		.pvr_mask		= 0xf0000ffb,
>> +		.pvr_value		= 0x200008D0,
>> +		.cpu_name		= "440EPX",
>> +		.cpu_features		= CPU_FTRS_44X,
>> +		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
>> +		.icache_bsize		= 32,
>> +		.dcache_bsize		= 32,
>> +	},
>> +	{ /* 440GRX */
>> +		.pvr_mask		= 0xf0000ffb,
>> +		.pvr_value		= 0x200008D8,
>> +		.cpu_name		= "440GRX",
>> +		.cpu_features		= CPU_FTRS_44X,
>> +		.cpu_user_features	= COMMON_USER_BOOKE,
>> +		.icache_bsize		= 32,
>> +		.dcache_bsize		= 32,
>> +	},
>>  	{	/* 440GP Rev. B */
>>  		.pvr_mask		= 0xf0000fff,
>>  		.pvr_value		= 0x40000440,
>> diff -ruN linux-2.6.orig/arch/powerpc/kernel/head_44x.S linux-2.6/arch/powerpc/kernel/head_44x.S
>> --- linux-2.6.orig/arch/powerpc/kernel/head_44x.S	2007-08-14 17:11:19.000000000 +0400
>> +++ linux-2.6/arch/powerpc/kernel/head_44x.S	2007-08-14 17:18:43.000000000 +0400
>> @@ -217,7 +217,7 @@
>>  	lis	r4,interrupt_base@h	/* IVPR only uses the high 16-bits */
>>  	mtspr	SPRN_IVPR,r4
>>  
>> -#ifdef CONFIG_440EP
>> +#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
> 
> Since we should now be able to support both 440GP and 440EP boards in
> the same kernel, this probably needs to become a feature section.
> 

Thanks for pointing that out.
Talking about this, there appears to be more stuff that would need to 
become feature sections. There're lots of other ifdefs in 
arch/powerpc/kernel/head_44x.S, like ifdef CONFIG_PPC_FPU or ifdef 
CONFIG_440A
Looks like all these things have to be detected dynamically and 
configured properly at runtime since we tend to support more than one 
CPU in the same kernel.
I think this should come as a separate patch, that replaces all these 
ifdefs with the FTR_SECTION stuff.
Thanks,
Valentine.

>>  	/* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */
>>  	mfspr	r2,SPRN_CCR0
>>  	lis	r3,0xffef
>> diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig linux-2.6/arch/powerpc/platforms/44x/Kconfig
>> --- linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig	2007-08-14 17:11:17.000000000 +0400
>> +++ linux-2.6/arch/powerpc/platforms/44x/Kconfig	2007-08-14 20:36:19.000000000 +0400
>> @@ -14,6 +14,14 @@
>>  	help
>>  	  This option enables support for the IBM PPC440GP evaluation board.
>>  
>> +config SEQUOIA
>> +	bool "Sequoia"
>> +	depends on 44x
>> +	default n
>> +	select 440EPX
>> +	help
>> +	  This option enables support for the AMCC PPC440EPX evaluation board.
>> +
>>  #config LUAN
>>  #	bool "Luan"
>>  #	depends on 44x
>> @@ -37,6 +45,13 @@
>>  	select IBM440EP_ERR42
>>  #	select IBM_NEW_EMAC_ZMII
>>  
>> +config 440EPX
>> +	bool
>> +	select PPC_FPU
>> +# Disabled until the new EMAC Driver is merged.
>> +#	select IBM_NEW_EMAC_EMAC4
>> +#	select IBM_NEW_EMAC_ZMII
>> +
>>  config 440GP
>>  	bool
>>  # Disabled until the new EMAC Driver is merged.
>> @@ -50,7 +65,7 @@
>>  
>>  config 440A
>>  	bool
>> -	depends on 440GX
>> +	depends on 440GX || 440EPX
>>  	default y
>>  
>>  # 44x errata/workaround config symbols, selected by the CPU models above
>> diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/Makefile linux-2.6/arch/powerpc/platforms/44x/Makefile
>> --- linux-2.6.orig/arch/powerpc/platforms/44x/Makefile	2007-08-14 17:11:17.000000000 +0400
>> +++ linux-2.6/arch/powerpc/platforms/44x/Makefile	2007-08-14 17:18:43.000000000 +0400
>> @@ -1,3 +1,4 @@
>>  obj-$(CONFIG_44x)	:= misc_44x.o
>>  obj-$(CONFIG_EBONY)	+= ebony.o
>>  obj-$(CONFIG_BAMBOO) += bamboo.o
>> +obj-$(CONFIG_SEQUOIA)	+= sequoia.o
>> diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/sequoia.c linux-2.6/arch/powerpc/platforms/44x/sequoia.c
>> --- linux-2.6.orig/arch/powerpc/platforms/44x/sequoia.c	1970-01-01 03:00:00.000000000 +0300
>> +++ linux-2.6/arch/powerpc/platforms/44x/sequoia.c	2007-08-14 20:12:26.000000000 +0400
>> @@ -0,0 +1,66 @@
>> +/*
>> + * Sequoia board specific routines
>> + *
>> + * Valentine Barshak <vbarshak@ru.mvista.com>
>> + * Copyright 2007 MontaVista Software Inc.
>> + *
>> + * Based on the Bamboo code by
>> + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
>> + * Copyright 2007 IBM Corporation
>> + *
>> + * 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/init.h>
>> +#include <asm/machdep.h>
>> +#include <asm/prom.h>
>> +#include <asm/udbg.h>
>> +#include <asm/time.h>
>> +#include <asm/uic.h>
>> +#include <asm/of_platform.h>
>> +#include "44x.h"
>> +
>> +static struct of_device_id sequoia_of_bus[] = {
>> +	{ .compatible = "ibm,plb", },
>> +	{ .compatible = "ibm,opb", },
>> +	{ .compatible = "ibm,ebc", },
>> +	{},
>> +};
>> +
>> +static int __init sequoia_device_probe(void)
>> +{
>> +	if (!machine_is(sequoia))
>> +		return 0;
>> +
>> +	of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
>> +
>> +	return 0;
>> +}
>> +device_initcall(sequoia_device_probe);
>> +
>> +static int __init sequoia_probe(void)
>> +{
>> +	unsigned long root = of_get_flat_dt_root();
>> +
>> +	if (!of_flat_dt_is_compatible(root, "amcc,sequoia"))
>> +		return 0;
>> +
>> +	return 1;
>> +}
>> +
>> +static void __init sequoia_setup_arch(void)
>> +{
>> +}
>> +
>> +define_machine(sequoia) {
>> +	.name 				= "Sequoia",
>> +	.probe 				= sequoia_probe,
>> +	.setup_arch			= sequoia_setup_arch,
>> +	.progress 			= udbg_progress,
>> +	.init_IRQ 			= uic_init_tree,
>> +	.get_irq 			= uic_get_irq,
>> +	.restart			= ppc44x_reset_system,
>> +	.calibrate_decr			= generic_calibrate_decr,
>> +};
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>>
> 

^ permalink raw reply

* Re: System crash on boot_e500.S
From: mike zheng @ 2007-08-15 13:57 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <1187124014.32650.80.camel@ld0161-tx32>

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

Did you done similar work before? Current 2.6 code need many other files,  I
have following errors when I try to use the head_e500.S from 2.6 code:


/kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/kernel/.entry.o.d
-nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux-gnuspe/3.4.3/include
-D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,-me500     -c
-o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
arch/ppc/kernel/entry.S: Assembler messages:

entry.S:819: Error: unsupported relocation against CSRR0
entry.S:820: Error: unsupported relocation against CSRR1
entry.S:888: Error: unsupported relocation against MCSRR0
entry.S:889: Error: unsupported relocation against MCSRR1
entry.S:909: Error: unsupported relocation against CSRR0
entry.S:911: Error: unsupported relocation against CSRR1



entry.S

819   mtspr CSRR0, r11
820   mtspr CSRR1, r12





On 8/14/07, Jon Loeliger <jdl@freescale.com> wrote:
>
> On Tue, 2007-08-14 at 15:14, mike zheng wrote:
> > Hi All,
> >
> > I am trying to bring up MPC8548 CDS board on 2.4 kernel. I have
> > problem in the head
>
> Ow, it hurts when I do this!
>
> > _e500.S. The "mtspr SRR0, r7; mtspr SRR1 r6" does not work for me. The
> > content of R7 and R6 are not moved to SRR0 and SRR1.  I am using the
> > tool-chain from Freescale for 2.6 kernel.
> >
> > Any idea on this issue?
>
> Maybe use current 2.6 code?
>
> jdl
>
>
>

[-- Attachment #2: Type: text/html, Size: 2369 bytes --]

^ permalink raw reply

* Re: System crash on boot_e500.S on 2.4Kernel
From: mike zheng @ 2007-08-15 13:59 UTC (permalink / raw)
  To: Andy Fleming; +Cc: linuxppc-embedded
In-Reply-To: <36201C92-F117-4273-9FA7-13665CF0C6DB@freescale.com>

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

I use BDI to debug these two instructions. And here are the output of BDI
just before the "rfi". The content of R6, R7 is different from SRR0(SPR26)
and SRR1(SPR27).


cds8548>res run

- TARGET: processing user reset request

- BDI asserts HRESET

- Reset JTAG controller passed

- JTAG exists check passed

- IDCODE is 0x0003901D

- SVR is 0x80390011

- PVR is 0x80210010

- CCSRBAR is 0x0_ff700000

- BDI removes HRESET

- TARGET: Target PVR is 0x80210010

- TARGET: resetting target passed

cds8548>halt

Target CPU : MPC85xx (e500v2 rev.1)

Target state : halted

Debug entry cause : COP halt

Current PC : 0xfff82560

Current CR : 0x88000042

Current MSR : 0x00021200

Current LR : 0xfff8aa4c

Current CCSRBAR : 0x0_e0000000

cds8548>ci

cds8548>bi 0x0000015c

Breakpoint identification is 0

cds8548>go

- TARGET: stopped

cds8548>rd

GPR00: 00000000 0ffabd20 00000200 00000008

GPR04: 00000000 00000001 00000020 00000160

GPR08: 1f8b0808 00000148 0ffabace 0ffe08b0

GPR12: 00000006 764deddb 10000300 007fff00

GPR16: 00000001 ffffffff 007fff25 0ffff9d8

GPR20: 007ffeb0 00000000 0fffaa3c 0ffae490

GPR24: 00000000 00000003 02000040 007fff25

GPR28: 007fff00 0ffab3b8 0fcd6000 007ffeb0

CR : 24024022 MSR: 00021200

cds8548>rdspr 26

SPR 26 : 0xfff81300 - 519424

cds8548>rdspr 27

SPR 27 : 0x00001000 4096

cds8548>





On 8/14/07, Andy Fleming <afleming@freescale.com> wrote:
>
>
> On Aug 14, 2007, at 15:21, mike zheng wrote:
>
> >
> > Hi All,
> >
> > I am trying to bring up MPC8548 CDS board on 2.4 kernel. I have
> > problem in the head_e500.S. The "mtspr SRR0, r7; mtspr SRR1 r6"
> > does not work for me. The content of R7 and R6 are not moved to
> > SRR0 and SRR1.  I am using the tool-chain from Freescale for 2.6
> > kernel.
> >
> > Any idea on this issue?
>
> Just to check...how do you know it doesn't work?
>
> Andy
>

[-- Attachment #2: Type: text/html, Size: 2532 bytes --]

^ permalink raw reply

* Re: Device Tree tool [was RE: [PATCH] Consolidate XILINX_VIRTEXboardsupport]
From: Grant Likely @ 2007-08-15 14:03 UTC (permalink / raw)
  To: Stephen Neuendorffer; +Cc: microblaze-uclinux, linuxppc-embedded
In-Reply-To: <20070814215438.3C7AA1B7006C@mail148-cpk.bigfish.com>

On 8/14/07, Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> wrote:
>
> > BTW: I'm currently hacking away to see if I can get a
> > microblaze system
> > booting
> > using a flat device tree...  I haven't decided if it's worth it to go
> > that
> > route in the end yet, but...
> >
> > Steve
>
> I've managed to get the first step working: a microblaze system
> advertising of_devices in 2.6 using a flat device tree.  The next task
> is to
> reimplement probe() for a driver or two (probably the xilinx_emac driver
> first).   My plan is to have the driver advertise both through
> of_platform_bus, and
> through the regular platform bus, and have a config option that either
> advertises
> the devices through of and links in the device tree, or using the
> exising
> platform_device mechanism.

That's fantastic.  Yes, I think that is the right approach to have
both platform_bus and of_platform bus bindings in the drivers.

>
> Grant:  Does this make sense (in terms of dealing with drivers) with
> your plans for
> moving Virtex platforms to arch/powerpc?  I'd like to avoid duplicating
> work on the
> drivers, if possible.

Absolutely

>
> Is there a concensus on how microblaze systems should get booted?
> Currently,
> I'm linking the device tree directly into the kernel itself, loading the
> whole
> mess using SystemAce and the start address jumps directly into the
> kernel, which
> is quite a bit different than the way powerpc works.  It's certainly
> simpler:
> maybe too simple.  At the same time, replicating
> the complexity of arch/powerpc with separate boot code may or may not be
> worth it...
> Any thoughts?

It is a good starting point, and I think it is important that this
remain an option (ie. for boards without a bootloader).  However, it
is a really good idea to support the notion of passing in a device
tree from a bootloader (u-boot).  As Michal mentioned, u-boot already
has the code to support this, and u-boot is able to update the device
tree directly.  The key feature here is being able to support multiple
FPGA designs from a single kernel image because the device tree gives
us some level of abstraction on the hardware design.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: [PATCH] [POWERPC] Fix section mismatch in pasemi/iommu.c
From: Olof Johansson @ 2007-08-15 15:40 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, paulus
In-Reply-To: <20070815205823.b0a04715.sfr@canb.auug.org.au>

On Wed, Aug 15, 2007 at 08:58:23PM +1000, Stephen Rothwell wrote:
> These functions are only called by __init functions.
> 
> WARNING: vmlinux.o(.text+0x56aa0): Section mismatch: reference to .init.text:.lmb_alloc (between '.iob_init' and '.iommu_init_early_pasemi')
> 

Thanks! It was drowning in the other warnings, I'd never noticed it.


> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

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

^ permalink raw reply

* Re: System crash on boot_e500.S
From: Scott Wood @ 2007-08-15 16:02 UTC (permalink / raw)
  To: mike zheng; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <5c9cd53b0708150657k71531bdbl848375d5d80faf21@mail.gmail.com>

On Wed, Aug 15, 2007 at 09:57:59AM -0400, mike zheng wrote:
> Did you done similar work before? Current 2.6 code need many other files,  I
> have following errors when I try to use the head_e500.S from 2.6 code:
> 
> 
> /kernel->   powerpc-linux-gnuspe-gcc -m32 -Wp,-MD,arch/ppc/kernel/.entry.o.d
> -nostdinc -isystem /opt/mtwk/usr/local/gcc-3_4-
> e500-glibc-2.3.4-dp/powerpc-linux-gnuspe/lib/gcc/powerpc-linux-gnuspe/3.4.3/include
> -D__KERNEL__ -Iinclude  -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -Wa,-me500     -c
> -o arch/ppc/kernel/entry.o arch/ppc/kernel/entry.S
> arch/ppc/kernel/entry.S: Assembler messages:
> 
> entry.S:819: Error: unsupported relocation against CSRR0
> entry.S:820: Error: unsupported relocation against CSRR1
> entry.S:888: Error: unsupported relocation against MCSRR0
> entry.S:889: Error: unsupported relocation against MCSRR1
> entry.S:909: Error: unsupported relocation against CSRR0
> entry.S:911: Error: unsupported relocation against CSRR1

Try arch/powerpc; arch/ppc is deprecated.

-Scott

^ 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