Re: Patches added to powerpc.git for-2.6.24 branch
On Wed, 3 Oct 2007 16:27:26 +1000 Paul Mackerras <[EMAIL PROTECTED]> wrote: > > Stephen Rothwell (5): > [POWERPC] Create and use CONFIG_WORD_SIZE > [POWERPC] Remove debug printk from vio_bus_init > [POWERPC] Simplify vio_bus_init a little for legacy iSeries > [POWERPC] Make vio_bus_type static > [POWERPC] Limit range of __init_ref_ok somewhat Would you also consider: [POWERPC] Prepare to remove of_platform_driver name (http://patchwork.ozlabs.org/linuxppc/patch?id=13667) -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgp9vexQaPeIn.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Problem with OF interrupt parsing code
Original-Nachricht > Datum: Wed, 03 Oct 2007 08:03:27 +1000 > Von: Benjamin Herrenschmidt <[EMAIL PROTECTED]> > An: Gerhard Pircher <[EMAIL PROTECTED]> > CC: linuxppc-dev@ozlabs.org > Betreff: Re: Problem with OF interrupt parsing code > > On Tue, 2007-10-02 at 14:38 +0200, Gerhard Pircher wrote: > > I know that it's ugly, but the problem is how to distinguish the > > boards. The only real difference I know of is the PCI interrupt > > mapping. The northbridges chip revision for example is always the > > same, but CPU type, amount of memory and PCI devices can appear in > > all possible combinations. The firmware doesn't tell me, which board > > the kernel is runnning on, so I would like to rely on this fall back > > here until I get the chance to update the firmware (which is beyond > > my control). > > And how does the firmware know ? There must be a strap somewhere... > > Ben. Good question. I don't know. Anyway I changed the device tree based on your comments and now it works (at least until the kernel deadlocks somewhere else). :( Gerhard -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Patches added to powerpc.git for-2.6.24 branch
On Wed, 3 Oct 2007 17:15:51 +1000 Stephen Rothwell <[EMAIL PROTECTED]> wrote: > > Would you also consider: > > [POWERPC] Prepare to remove of_platform_driver name > (http://patchwork.ozlabs.org/linuxppc/patch?id=13667) Also: [PATCH 07/11] [POWERPC] iSeries: missing newline in printk (http://patchwork.ozlabs.org/linuxppc/patch?id=13661) and [PATCH 10/11] [POWERPC] Clean up vio.h (http://patchwork.ozlabs.org/linuxppc/patch?id=13664) don't actually interact with the rest of the series. I rebuilt {ppc64,pseries,iseries}_defconfig with just the above three patches on top of the current for-2.6.24 tree to be sure. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgp9fNVY3Mvoc.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
Hi Timur, On Thu, Sep 20, 2007 at 03:47:26PM -0500, Timur Tabi wrote: > This patch makes numerous miscellaneous code improvements to the QE library. ...and also breaks MPC8568E-MDS. ;-) Board hangs just after ip-config stuff. Commit 589ffa1c520355e37d5868 in galak/powerpc.git. Unfortunately it isn't split, thus it will take time to track faulty bit. But so far... maybe you have any ideas? ... serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 42) is a 16550A RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize loop: module loaded Gianfar MII Bus: probed eth0: Gianfar Ethernet Controller Version 1.2, 00:e0:0c:00:00:fd eth0: Running with NAPI enabled eth0: 256/256 RX/TX BD ring size eth1: Gianfar Ethernet Controller Version 1.2, 00:e0:0c:00:01:fd eth1: Running with NAPI enabled eth1: 256/256 RX/TX BD ring size UCC Ethernet Controller MII Bus: probed ucc_geth: QE UCC Gigabit Ethernet Controller ucc_geth: UCC1 at 0xe0082000 (irq = 32) ucc_geth: UCC2 at 0xe0083000 (irq = 33) PCI: Enabling device 0001:02:00.0 ( -> 0003) sky2 0001:02:00.0: v1.18 addr 0xa000 irq 18 Yukon-EC (0xb6) rev 1 sky2 eth4: addr 00:00:5a:71:75:fe Marvell 88E1101: Registered new driver Marvell 88E1112: Registered new driver Marvell 88E: Registered new driver Marvell 88E1145: Registered new driver netconsole: not configured, aborting i2c /dev entries driver rtc-ds1374 0-0068: rtc core: registered rtc-ds1374 as rtc0 TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 rtc-ds1374 0-0068: setting the system clock to 2007-01-02 22:23:42 (1167776622) sky2 eth4: enabling interface Sending DHCP requests .<6>PHY: e0024520:02 - Link is Up - 100/Full PHY: e0024520:03 - Link is Up - 100/Full PHY: e0024520:01 - Link is Up - 100/Full ., OK IP-Config: Got DHCP answer from 10.0.0.2, my address is 10.0.0.99 Thanks, -- Anton Vorontsov email: [EMAIL PROTECTED] backup email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Patches added to powerpc.git for-2.6.24 branch
> Jochen Friedrich (4): > [POWERPC] Fix copy'n'paste typo in commproc.c > [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem > [PPC] Compile fix for 8xx CPM Ehernet driver > [POWERPC] Fix cpm_uart driver > Some of these should already be Linus's tree (all but the 8xx CPM Ehernet) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Please pull from 'for-2.6.24' branch of 4xx tree
On Tue, 2 Oct 2007 07:54:20 -0500 Josh Boyer <[EMAIL PROTECTED]> wrote: > Hi Paul, > > Please pull from > > master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git > for-2.6.24 > > to pick up a handful of new items for 2.6.24. Initial Virtex support > from Grant, some cpu setup functions for 4xx from Valentine, a compile > fix for the Walnut wrapper, and a small number of arch/ppc fixes for > Xilinx boards. I've rebased my branch on top of your latest tree and added the following two additional commits: Grant Likely (2): [POWERPC] Uartlite: Add macros for register names [POWERPC] Uartlite: Revert register io access changes Please pull thx, josh ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
Anton Vorontsov wrote: > Hi Timur, > > On Thu, Sep 20, 2007 at 03:47:26PM -0500, Timur Tabi wrote: >> This patch makes numerous miscellaneous code improvements to the QE library. > > ...and also breaks MPC8568E-MDS. ;-) Board hangs just after ip-config stuff. > > Commit 589ffa1c520355e37d5868 in galak/powerpc.git. > > Unfortunately it isn't split, thus it will take time to track faulty bit. > But so far... maybe you have any ideas? No. The changes are supposed to be completely transparent. I did have to modify the ucc_geth driver because of a change in some QE library functions, but I tested it on 8360 and it works there. It could be something peripheral, like a general breakdown of the QE itself on 85xx. -- Timur Tabi Linux Kernel Developer @ Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Use 1TB segments
On Wed, 2007-10-03 at 13:13 +1000, Paul Mackerras wrote: > Will Schmidt writes: > > > I still need to test this code for performance issues, and this version > > could still use some cosmetic touchups, so I dont think we want this to > > go into a tree yet. I am reposting this primarily to indicate the prior > > version isnt quite right, and so Jon can rebase to this version. :-) > > The way we scan the ibm,processor-segment-sizes property could be > nicer. Where there any other cosmetic touchups you were thinking of, > and if so what were they? I didn't notice any leftover debugging > printks or anything else that obviously needed cleaning up. Correct.. nothing in the patch really *needs* to be cleaned up. This is mostly me being way more nit-picky than I need to be. :-) I don't have any real issues with the patch (being candidate for) going into a tree. The only obvious is the MMU_SEGSIZE_* #define's in mmu-hash64.h appear to be duplicated. The rest I can follow up on later, none of it affects the code outside of #ifdef DEBUG's and it should be a separate patch anyway. Thanks, -Will > Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] mtd: remove unnecessary memset from physmap_of driver
No need for memset to zero memory here, since we use kzalloc. Signed-off-by: Valentine Barshak <[EMAIL PROTECTED]> --- drivers/mtd/maps/physmap_of.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index cf75a56..aeed9ea 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -232,7 +232,6 @@ static int __devinit of_flash_probe(struct of_device *dev, info = kzalloc(sizeof(*info), GFP_KERNEL); if (!info) goto err_out; - memset(info, 0, sizeof(*info)); dev_set_drvdata(&dev->dev, info); -- 1.5.2.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
On Wed, Oct 03, 2007 at 09:16:51AM -0500, Timur Tabi wrote: > Anton Vorontsov wrote: >> Hi Timur, >> On Thu, Sep 20, 2007 at 03:47:26PM -0500, Timur Tabi wrote: >>> This patch makes numerous miscellaneous code improvements to the QE >>> library. >> ...and also breaks MPC8568E-MDS. ;-) Board hangs just after ip-config >> stuff. >> Commit 589ffa1c520355e37d5868 in galak/powerpc.git. >> Unfortunately it isn't split, thus it will take time to track faulty bit. >> But so far... maybe you have any ideas? > > No. The changes are supposed to be completely transparent. I did have to > modify the ucc_geth driver because of a change in some QE library > functions, but I tested it on 8360 and it works there. I see. > It could be something peripheral, like a general breakdown of the QE itself > on 85xx. Doubtfully, if changes are completely transparent. Because everything works here without that cleanup. Ok, thanks anyway, will look further as time will permit. -- Anton Vorontsov email: [EMAIL PROTECTED] backup email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2 6/7] Uartlite: Add of-platform-bus binding
On 10/2/07, Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-10-02 at 22:18 -0600, Grant Likely wrote: > > > For many drivers, I think that is already the case. USB OHCI is a > > prime example where there are both PCI and platform_bus bindings among > > others. It seems to me that the bus binding effectively translates > > down to "where do I go to get the needed information". I think it > > results in less of a maintenance burden to explicitly separate bus > > binding from device setup as opposed to adding constructor code. > > I think nobody consider the mess that is USB in that are to be something > we want to reproduce. Heh, true, but the structure of multiple bus bindings is probably not something we can get away from. > > > > The important thing however, with the constructor approach is to try as > > > much as possible to keep the proper tree structure, and thus, try to > > > find a way to instanciate the devices with proper parent/child > > > relationship so that ordering for things like suspend/resume operations > > > is maintained. > > > > I'm not sure I follow. Example? > > Well, make sure that if 2 platform devices repreesnt respectively a bus > and a device on that bus, they properly get instanciated as parent & > child in sysfs as well. Right, okay. Looking at platform_device_add(), the default parent is platform_bus, but it can be overridden. of_platform_bus devices get the hierarchy of the device tree by default. So in the platform bus case, the constructor would need to explicitly set the parent device? Correct? Also, how do you see the constructor code getting executed? Called explicitly from the platform code, or some form of auto binding? I look at fsl_soc.c and I shudder as each constructor does a pass of the whole tree looking for compatible nodes. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
Anton Vorontsov wrote: > Doubtfully, if changes are completely transparent. Because everything works > here without that cleanup. > > Ok, thanks anyway, will look further as time will permit. I did have one idea - the programming of the GUEMR register in ucc_fast_init() could be wrong. Can do a before/after comparison of the contents of that register? -- Timur Tabi Linux Kernel Developer @ Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
On Oct 3, 2007, at 9:39 AM, Timur Tabi wrote: > Anton Vorontsov wrote: > >> Doubtfully, if changes are completely transparent. Because >> everything works >> here without that cleanup. >> >> Ok, thanks anyway, will look further as time will permit. > > I did have one idea - the programming of the GUEMR register in > ucc_fast_init() > could be wrong. Can do a before/after comparison of the contents > of that > register? I'm dropping this patch from my tree till you guys figure this out. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
Anton Vorontsov wrote: > Ok, thanks anyway, will look further as time will permit. I think I found it. Of course, if I'm right, then that doesn't explain how the 8360 works. In struct ucc_geth, add this: struct ucc_geth { struct ucc_fast uccf; + u8 res9[0x100 - sizeof(struct ucc_fast)]; u32 maccfg1;/* mac configuration reg. 1 */ u32 maccfg2;/* mac configuration reg. 2 */ -- Timur Tabi Linux Kernel Developer @ Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] Fixup MPC8568 dts
The PCI nodes on the MPC8568 dts didn't get moved up to be sibilings of the SOC node when we did that clean up for some reason. Fix that up and some minor whitespace and adjusting the size of the soc reg property. --- arch/powerpc/boot/dts/mpc8568mds.dts | 125 +++--- 1 files changed, 70 insertions(+), 55 deletions(-) in my git tree, just posted here so everyone can see it. diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index 6923e42..6ac134a 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts @@ -52,7 +52,7 @@ #size-cells = <1>; device_type = "soc"; ranges = <0 e000 0010>; - reg = ; + reg = ; bus-frequency = <0>; [EMAIL PROTECTED] { @@ -183,60 +183,6 @@ fsl,has-rstcr; }; - [EMAIL PROTECTED] { - interrupt-map-mask = ; - interrupt-map = < - /* IDSEL 0x12 AD18 */ - 9000 0 0 1 &mpic 5 1 - 9000 0 0 2 &mpic 6 1 - 9000 0 0 3 &mpic 7 1 - 9000 0 0 4 &mpic 4 1 - - /* IDSEL 0x13 AD19 */ - 9800 0 0 1 &mpic 6 1 - 9800 0 0 2 &mpic 7 1 - 9800 0 0 3 &mpic 4 1 - 9800 0 0 4 &mpic 5 1>; - - interrupt-parent = <&mpic>; - interrupts = <18 2>; - bus-range = <0 ff>; - ranges = <0200 0 8000 8000 0 2000 - 0100 0 e200 0 0080>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8000 1000>; - compatible = "fsl,mpc8540-pci"; - device_type = "pci"; - }; - - /* PCI Express */ - [EMAIL PROTECTED] { - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x0 (PEX) */ - 0 0 0 1 &mpic 0 1 - 0 0 0 2 &mpic 1 1 - 0 0 0 3 &mpic 2 1 - 0 0 0 4 &mpic 3 1>; - - interrupt-parent = <&mpic>; - interrupts = <1a 2>; - bus-range = <0 ff>; - ranges = <0200 0 a000 a000 0 1000 - 0100 0 e280 0 0080>; - clock-frequency = <1fca055>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = ; - compatible = "fsl,mpc8548-pcie"; - device_type = "pci"; - }; - [EMAIL PROTECTED] { device_type = "serial"; compatible = "ns16550"; @@ -269,6 +215,7 @@ device_type = "open-pic"; big-endian; }; + [EMAIL PROTECTED] { reg = ; device_type = "par_io"; @@ -301,6 +248,7 @@ 4 13 1 0 2 0 /* GTX_CLK */ 1 1f 2 0 3 0>; /* GTX125 */ }; + pio2: [EMAIL PROTECTED] { pio-map = < /* port pin dir open_drain assignment has_irq */ @@ -461,4 +409,71 @@ }; }; + + [EMAIL PROTECTED] { + interrupt-map-mask = ; + interrupt-map = < + /* IDSEL 0x12 AD18 */ + 9000 0 0 1 &mpic 5 1 + 9000 0 0 2 &mpic 6 1 + 9000 0 0 3 &mpic 7 1 + 9000 0 0 4 &mpic 4 1 + + /* IDSEL 0x13 AD19 */ + 9800 0 0 1 &mpic 6 1 + 9800 0 0 2 &mpic 7 1 + 9800 0 0 3 &mpic 4 1 + 9800 0 0 4 &mpic 5 1>; + + interrupt-parent = <&mpic>; + interrupts = <18 2>; + bus-range = <0 ff>; + ranges = <0200 0 8000 8000 0 2000 + 0100 0 e200 0 0080>; + clock-frequency = <3f940aa>; +
[PATCH] [POWERPC] Cleaned up whitespace in head_fsl_booke.S
--- arch/powerpc/kernel/head_fsl_booke.S | 76 +- 1 files changed, 38 insertions(+), 38 deletions(-) Its just for show, this exists in my git-tree. diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index bfc3870..4dab680 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -2,27 +2,27 @@ * Kernel execution entry point code. * *Copyright (c) 1995-1996 Gary Thomas <[EMAIL PROTECTED]> - * Initial PowerPC version. + * Initial PowerPC version. *Copyright (c) 1996 Cort Dougan <[EMAIL PROTECTED]> - * Rewritten for PReP + * Rewritten for PReP *Copyright (c) 1996 Paul Mackerras <[EMAIL PROTECTED]> - * Low-level exception handers, MMU support, and rewrite. + * Low-level exception handers, MMU support, and rewrite. *Copyright (c) 1997 Dan Malek <[EMAIL PROTECTED]> - * PowerPC 8xx modifications. + * PowerPC 8xx modifications. *Copyright (c) 1998-1999 TiVo, Inc. - * PowerPC 403GCX modifications. + * PowerPC 403GCX modifications. *Copyright (c) 1999 Grant Erickson <[EMAIL PROTECTED]> - * PowerPC 403GCX/405GP modifications. + * PowerPC 403GCX/405GP modifications. *Copyright 2000 MontaVista Software Inc. * PPC405 modifications - * PowerPC 403GCX/405GP modifications. - * Author: MontaVista Software, Inc. - * [EMAIL PROTECTED] or [EMAIL PROTECTED] - * [EMAIL PROTECTED] + * PowerPC 403GCX/405GP modifications. + * Author: MontaVista Software, Inc. + * [EMAIL PROTECTED] or [EMAIL PROTECTED] + * [EMAIL PROTECTED] *Copyright 2002-2004 MontaVista Software, Inc. - * PowerPC 44x support, Matt Porter <[EMAIL PROTECTED]> + * PowerPC 44x support, Matt Porter <[EMAIL PROTECTED]> *Copyright 2004 Freescale Semiconductor, Inc - * PowerPC e500 modifications, Kumar Gala <[EMAIL PROTECTED]> + * PowerPC e500 modifications, Kumar Gala <[EMAIL PROTECTED]> * * 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 @@ -146,13 +146,13 @@ skpinv: addir6,r6,1 /* Increment */ bne 1b /* If not, repeat */ /* Invalidate TLB0 */ - li r6,0x04 + li r6,0x04 tlbivax 0,r6 #ifdef CONFIG_SMP tlbsync #endif /* Invalidate TLB1 */ - li r6,0x0c + li r6,0x0c tlbivax 0,r6 #ifdef CONFIG_SMP tlbsync @@ -211,7 +211,7 @@ skpinv: addir6,r6,1 /* Increment */ mtspr SPRN_MAS1,r6 tlbwe /* Invalidate TLB1 */ - li r9,0x0c + li r9,0x0c tlbivax 0,r9 #ifdef CONFIG_SMP tlbsync @@ -254,7 +254,7 @@ skpinv: addir6,r6,1 /* Increment */ mtspr SPRN_MAS1,r8 tlbwe /* Invalidate TLB1 */ - li r9,0x0c + li 9,0x0c tlbivax 0,r9 #ifdef CONFIG_SMP tlbsync @@ -294,7 +294,7 @@ skpinv: addir6,r6,1 /* Increment */ #ifdef CONFIG_E200 orisr2,r2,MAS4_TLBSELD(1)@h #endif - mtspr SPRN_MAS4, r2 + mtspr SPRN_MAS4, r2 #if 0 /* Enable DOZE */ @@ -305,7 +305,7 @@ skpinv: addir6,r6,1 /* Increment */ #ifdef CONFIG_E200 /* enable dedicated debug exception handling resources (Debug APU) */ mfspr r2,SPRN_HID0 - ori r2,r2,[EMAIL PROTECTED] + ori r2,r2,[EMAIL PROTECTED] mtspr SPRN_HID0,r2 #endif @@ -391,7 +391,7 @@ skpinv: addir6,r6,1 /* Increment */ #ifdef CONFIG_PTE_64BIT #define PTE_FLAGS_OFFSET 4 #define FIND_PTE \ - rlwinm r12, r10, 13, 19, 29; /* Compute pgdir/pmd offset */ \ + rlwinm r12, r10, 13, 19, 29; /* Compute pgdir/pmd offset */ \ lwzxr11, r12, r11; /* Get pgd/pmd entry */ \ rlwinm. r12, r11, 0, 0, 20; /* Extract pt base address */ \ beq 2f; /* Bail if no table */ \ @@ -487,7 +487,7 @@ interrupt_base: */ andi. r11, r11, _PAGE_HWEXEC rlwimi r11, r11, 31, 27, 27/* SX <- _PAGE_HWEXEC */ - ori r11, r11, (MAS3_UW|MAS3_SW|MAS3_UR|MAS3_SR)@l /* set static perms */ + ori r11, r11, (MAS3_UW|MAS3_SW|MAS3_UR|MAS3_SR)@l /* set static perms */ /* update search PID in MAS6, AS = 0 */ mfspr r12, SPRN_PID0 @@ -694,7 +694,7 @@ interrupt_base: START_EXCEPTION(SPEUnavailable) NORMAL_EXCEPTION_PROLOG bne load_up_spe - addir3,r1,STACK_FRAME_OVERHEAD + addir3,r1,STACK_FRAME_OVERHEAD EXC_XFER_EE_LITE(0x2010, KernelSPE) #else
Re: [RFC] PPC64 Exporting memory information through /proc/iomem
On Wed, 2007-10-03 at 10:19 +0900, KAMEZAWA Hiroyuki wrote: > On Tue, 02 Oct 2007 16:10:53 -0700 > Badari Pulavarty <[EMAIL PROTECTED]> wrote: > > > > Otherwise, we need to add arch-specific hooks in hotplug-remove > > > > code to be able to do this. > > > > > > Isn't it just a matter of abstracting the test for a valid range of > > > memory? If it's really hard to abstract that, then I guess we can put > > > RAM in iomem_resource, but I'd rather not. > > > > > > > Sure. I will work on it and see how ugly it looks. > > > > KAME, are you okay with abstracting the find_next_system_ram() and > > let arch provide whatever implementation they want ? (since current > > code doesn't work for x86-64 also ?). > > > Hmm, registering /proc/iomem is complicated ? Its not complicated. Like Paul mentioned, its part of user/kernel API which he is not prefering to break (if possible) + /proc/iomem seems like a weird place to export conventional memory. > If too complicated, adding config > like > CONFIG_ARCH_SUPPORT_IORESOURCE_RAM or something can do good work. > you can define your own "check_pages_isolated" (you can rename this to > arch_check_apges_isolated().) I was thinking more in the lines of CONFIG_ARCH_HAS_VALID_MEMORY_RANGE. Then define own find_next_system_ram() (rename to is_valid_memory_range()) - which checks the given range is a valid memory range for memory-remove or not. What do you think ? Thanks, Badari ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] fsl_spi devices should use mode "cpu" or "qe"
According to booting-without-of.txt, fsl_spi mode should be either "cpu" or "qe", not "cpu-qe". Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc832x_rdb.dts |2 +- arch/powerpc/sysdev/fsl_soc.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts index 388c8a7..a5158d5 100644 --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts @@ -175,7 +175,7 @@ reg = <4c0 40>; interrupts = <2>; interrupt-parent = <&qeic>; - mode = "cpu-qe"; + mode = "qe"; }; [EMAIL PROTECTED] { diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index c765d7a..a57fe56 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -1253,7 +1253,7 @@ int __init fsl_spi_init(struct spi_board_info *board_infos, pdata.bus_num = *(u32 *)prop; prop = of_get_property(np, "mode", NULL); - if (prop && !strcmp(prop, "cpu-qe")) + if (prop && !strcmp(prop, "qe")) pdata.qe_mode = 1; for (j = 0; j < num_board_infos; j++) { -- 1.5.3.2 -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] fsl_spi_init: Support non-QE processors
On non-QE processors (mpc831x/mpc834x) the SPI clock is the SoC clock. Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/fsl_soc.c | 27 +++ 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index a57fe56..59e4188 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -1220,14 +1220,17 @@ int __init fsl_spi_init(struct spi_board_info *board_infos, { struct device_node *np; unsigned int i; - const u32 *sysclk; + const u32 *qe_sysclk = 0, *soc_sysclk = 0; np = of_find_node_by_type(NULL, "qe"); - if (!np) - return -ENODEV; + if (np) + qe_sysclk = of_get_property(np, "bus-frequency", NULL); + + np = of_find_node_by_type(NULL, "soc"); + if (np) + soc_sysclk = of_get_property(np, "bus-frequency", NULL); - sysclk = of_get_property(np, "bus-frequency", NULL); - if (!sysclk) + if (!(qe_sysclk || soc_sysclk)) return -ENODEV; for (np = NULL, i = 1; @@ -1245,16 +1248,24 @@ int __init fsl_spi_init(struct spi_board_info *board_infos, memset(res, 0, sizeof(res)); - pdata.sysclk = *sysclk; - prop = of_get_property(np, "reg", NULL); if (!prop) goto err; pdata.bus_num = *(u32 *)prop; prop = of_get_property(np, "mode", NULL); - if (prop && !strcmp(prop, "qe")) + if (prop && !strcmp(prop, "qe")) { pdata.qe_mode = 1; + if (qe_sysclk) + pdata.sysclk = *qe_sysclk; + else + goto err; + } else { + if (soc_sysclk) + pdata.sysclk = *soc_sysclk; + else + goto err; + } for (j = 0; j < num_board_infos; j++) { if (board_infos[j].bus_num == pdata.bus_num) -- 1.5.3.2 -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] SPI: Use fsl_spi instead of mpc83xx_spi
According to booting-without-of.txt, compatible should be "fsl_spi" and mode "cpu" or "qe" for the fsl SPI controllers. Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8313erdb.dts|4 ++-- arch/powerpc/boot/dts/mpc8349emitx.dts |4 ++-- arch/powerpc/boot/dts/mpc8349emitxgp.dts |4 ++-- arch/powerpc/boot/dts/mpc834x_mds.dts|4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index a8eadc8..9e7eba9 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts @@ -71,11 +71,11 @@ [EMAIL PROTECTED] { device_type = "spi"; - compatible = "mpc83xx_spi"; + compatible = "fsl_spi"; reg = <7000 1000>; interrupts = <10 8>; interrupt-parent = < &ipic >; - mode = <0>; + mode = "cpu"; }; /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts index e0cb2a7..b2b3995 100644 --- a/arch/powerpc/boot/dts/mpc8349emitx.dts +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts @@ -70,11 +70,11 @@ [EMAIL PROTECTED] { device_type = "spi"; - compatible = "mpc83xx_spi"; + compatible = "fsl_spi"; reg = <7000 1000>; interrupts = <10 8>; interrupt-parent = < &ipic >; - mode = <0>; + mode = "cpu"; }; [EMAIL PROTECTED] { diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts index fa852ba..cf8c72a 100644 --- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts +++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts @@ -70,11 +70,11 @@ [EMAIL PROTECTED] { device_type = "spi"; - compatible = "mpc83xx_spi"; + compatible = "fsl_spi"; reg = <7000 1000>; interrupts = <10 8>; interrupt-parent = < &ipic >; - mode = <0>; + mode = "cpu"; }; [EMAIL PROTECTED] { diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts index 1b8882e..cf7b84f 100644 --- a/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/arch/powerpc/boot/dts/mpc834x_mds.dts @@ -76,11 +76,11 @@ [EMAIL PROTECTED] { device_type = "spi"; - compatible = "mpc83xx_spi"; + compatible = "fsl_spi"; reg = <7000 1000>; interrupts = <10 8>; interrupt-parent = < &ipic >; - mode = <0>; + mode = "cpu"; }; /* phy type (ULPI or SERIAL) are only types supportted for MPH */ -- 1.5.3.2 -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] Update .gitignore for new vdso generated files
We now generate vdso[32,64].so.dbg as part of the build so add them to .gitignore --- arch/powerpc/kernel/vdso32/.gitignore |1 + arch/powerpc/kernel/vdso64/.gitignore |1 + 2 files changed, 2 insertions(+), 0 deletions(-) in my git tree. diff --git a/arch/powerpc/kernel/vdso32/.gitignore b/arch/powerpc/kernel/vdso32/.gitignore index e45fba9..fea5809 100644 --- a/arch/powerpc/kernel/vdso32/.gitignore +++ b/arch/powerpc/kernel/vdso32/.gitignore @@ -1 +1,2 @@ vdso32.lds +vdso32.so.dbg diff --git a/arch/powerpc/kernel/vdso64/.gitignore b/arch/powerpc/kernel/vdso64/.gitignore index 3fd18cf..77a0b42 100644 --- a/arch/powerpc/kernel/vdso64/.gitignore +++ b/arch/powerpc/kernel/vdso64/.gitignore @@ -1 +1,2 @@ vdso64.lds +vdso64.so.dbg -- 1.5.2.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi devices should use mode "cpu" or "qe"
On Oct 3, 2007, at 10:43 AM, Peter Korsgaard wrote: > According to booting-without-of.txt, fsl_spi mode should be either > "cpu" or "qe", not "cpu-qe". > > Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> I think we should update the doc instead of the code here. Thoughts? - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] SPI: Use fsl_spi instead of mpc83xx_spi
On 10/3/07, Peter Korsgaard <[EMAIL PROTECTED]> wrote: > According to booting-without-of.txt, compatible should be "fsl_spi" and > mode "cpu" or "qe" for the fsl SPI controllers. > > Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/mpc8313erdb.dts|4 ++-- > arch/powerpc/boot/dts/mpc8349emitx.dts |4 ++-- > arch/powerpc/boot/dts/mpc8349emitxgp.dts |4 ++-- > arch/powerpc/boot/dts/mpc834x_mds.dts|4 ++-- > 4 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts > b/arch/powerpc/boot/dts/mpc8313erdb.dts > index a8eadc8..9e7eba9 100644 > --- a/arch/powerpc/boot/dts/mpc8313erdb.dts > +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts > @@ -71,11 +71,11 @@ > > [EMAIL PROTECTED] { > device_type = "spi"; > - compatible = "mpc83xx_spi"; > + compatible = "fsl_spi"; Compatible is a list property; this might be more appropriate: compatible = "fsl,mpc8313_spi", "fsl_spi"; Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi_init: Support non-QE processors
On 10/3/07, Peter Korsgaard <[EMAIL PROTECTED]> wrote: > On non-QE processors (mpc831x/mpc834x) the SPI clock is the SoC clock. > > Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> > --- > arch/powerpc/sysdev/fsl_soc.c | 27 +++ > 1 files changed, 19 insertions(+), 8 deletions(-) > > diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c > index a57fe56..59e4188 100644 > --- a/arch/powerpc/sysdev/fsl_soc.c > +++ b/arch/powerpc/sysdev/fsl_soc.c > @@ -1220,14 +1220,17 @@ int __init fsl_spi_init(struct spi_board_info > *board_infos, > { > struct device_node *np; > unsigned int i; > - const u32 *sysclk; > + const u32 *qe_sysclk = 0, *soc_sysclk = 0; > > np = of_find_node_by_type(NULL, "qe"); > - if (!np) > - return -ENODEV; > + if (np) > + qe_sysclk = of_get_property(np, "bus-frequency", NULL); > + > + np = of_find_node_by_type(NULL, "soc"); > + if (np) > + soc_sysclk = of_get_property(np, "bus-frequency", NULL); Why not just: np = of_find_node_by_type(NULL, "qe"); + if (!np) + np = of_find_node_by_type(NULL, "soc"); if (!np) return -ENODEV; The other changes aren't needed that way. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi devices should use mode "cpu" or "qe"
> "Kumar" == Kumar Gala <[EMAIL PROTECTED]> writes: Kumar> On Oct 3, 2007, at 10:43 AM, Peter Korsgaard wrote: >> According to booting-without-of.txt, fsl_spi mode should be either >> "cpu" or "qe", not "cpu-qe". >> >> Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> Kumar> I think we should update the doc instead of the code here. Thoughts? Same for me, but qe is shorter.. -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi devices should use mode "cpu" or "qe"
On 10/3/07, Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Oct 3, 2007, at 10:43 AM, Peter Korsgaard wrote: > > > According to booting-without-of.txt, fsl_spi mode should be either > > "cpu" or "qe", not "cpu-qe". > > > > Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> > > I think we should update the doc instead of the code here. Thoughts? Updating the doc is more backward compatible. :-) g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] SPI: Use fsl_spi instead of mpc83xx_spi
> "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: Hi, >> - compatible = "mpc83xx_spi"; >> + compatible = "fsl_spi"; Grant> Compatible is a list property; this might be more appropriate: Grant> compatible = "fsl,mpc8313_spi", "fsl_spi"; Fine by me, I'm just following booting-without-of.txt. -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi_init: Support non-QE processors
> "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: Hi, Grant> Why not just: Grant> np = of_find_node_by_type(NULL, "qe"); Grant> + if (!np) Grant> + np = of_find_node_by_type(NULL, "soc"); Grant> if (!np) Grant> return -ENODEV; My first iteration did it like that, but then you don't get a -ENODEV if the node is missing (and you'll end up using the wrong clock) and it doesn't support processors with SPI on and off QE (if that exists/will ever exist). -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi devices should use mode "cpu" or "qe"
On Oct 3, 2007, at 10:57 AM, Grant Likely wrote: > On 10/3/07, Kumar Gala <[EMAIL PROTECTED]> wrote: >> >> On Oct 3, 2007, at 10:43 AM, Peter Korsgaard wrote: >> >>> According to booting-without-of.txt, fsl_spi mode should be either >>> "cpu" or "qe", not "cpu-qe". >>> >>> Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> >> >> I think we should update the doc instead of the code here. Thoughts? > > Updating the doc is more backward compatible. :-) Peter, can you respin this as an update to booting-without-of.txt thanks - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi devices should use mode "cpu" or "qe"
On Wed, 2007-10-03 at 10:51 -0500, Kumar Gala wrote: > On Oct 3, 2007, at 10:43 AM, Peter Korsgaard wrote: > > > According to booting-without-of.txt, fsl_spi mode should be either > > "cpu" or "qe", not "cpu-qe". > > > > Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> > > I think we should update the doc instead of the code here. Thoughts? Yes, "cpu-qe" means QE in CPU mode. There is a native QE mode too that isn't impl. in the driver yet. "qe" should be reserved for native QE mode. Jocke ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [RFC] PPC64 Exporting memory information through /proc/iomem
On Wed, 03 Oct 2007 08:35:35 -0700 Badari Pulavarty <[EMAIL PROTECTED]> wrote: > On Wed, 2007-10-03 at 10:19 +0900, KAMEZAWA Hiroyuki wrote: > CONFIG_ARCH_HAS_VALID_MEMORY_RANGE. Then define own > find_next_system_ram() (rename to is_valid_memory_range()) - which > checks the given range is a valid memory range for memory-remove > or not. What do you think ? > My concern is... Now, memory hot *add* makes use of resource(/proc/iomem) information for onlining memory.(See add_memory()->register_memory_resource() in mm/memoryhotplug.c) So, we'll have to consider changing it if we need. Does PPC64 memory hot add registers new memory information to arch dependent information list ? It seems ppc64 registers hot-added memory information from *probe* file and registers it by add_memory()->register_memory_resource(). If you add all add/remove/walk system ram information in sane way, I have no objection. I like find_next_system_ram() because I used some amount of time to debug it ;) Thanks, -Kame ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
On Wed, Oct 03, 2007 at 10:01:48AM -0500, Timur Tabi wrote: > Anton Vorontsov wrote: > >> Ok, thanks anyway, will look further as time will permit. > > I think I found it. Of course, if I'm right, then that doesn't explain how > the 8360 works. > > In struct ucc_geth, add this: > > struct ucc_geth { > struct ucc_fast uccf; > + u8 res9[0x100 - sizeof(struct ucc_fast)]; > u32 maccfg1;/* mac configuration reg. 1 */ > u32 maccfg2;/* mac configuration reg. 2 */ > This fixed issue, much thanks. -- Anton Vorontsov email: [EMAIL PROTECTED] backup email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] fsl_spi: mode should be "cpu-qe" instead of "qe"
> "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: >> I think we should update the doc instead of the code here. Thoughts? Grant> Updating the doc is more backward compatible. :-) Ok. --- Mode should be "cpu-qe" for QE in CPU mode. "qe" should be reserved for native QE mode. Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> --- Documentation/powerpc/booting-without-of.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index ce5d67f..7a6c5f2 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -1551,7 +1551,7 @@ platforms are moved over to use the flattened-device-tree model. Required properties: - device_type : should be "spi". - compatible : should be "fsl_spi". - - mode : the SPI operation mode, it can be "cpu" or "qe". + - mode : the SPI operation mode, it can be "cpu" or "cpu-qe". - reg : Offset and length of the register set for the device - interrupts : where a is the interrupt number and b is a field that represents an encoding of the sense and level -- 1.5.3.2 -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] qe: miscellaneous code improvements and fixes to the QE library
Anton Vorontsov wrote: >> struct ucc_geth { >> struct ucc_fast uccf; >> +u8 res9[0x100 - sizeof(struct ucc_fast)]; >> u32 maccfg1;/* mac configuration reg. 1 */ >> u32 maccfg2;/* mac configuration reg. 2 */ >> > > This fixed issue, much thanks. Great! I'm very sorry about introducing that bug. I guess I didn't really test it on 8360 after all. I just thought I did. I'm sending v4 of this patch out now. -- Timur Tabi Linux Kernel Developer @ Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH v4] qe: miscellaneous code improvements and fixes to the QE library
This patch makes numerous miscellaneous code improvements to the QE library. 1. Remove struct ucc_common and merge ucc_init_guemr() into ucc_set_type() (every caller of ucc_init_guemr() also calls ucc_set_type()). Modify all callers of ucc_set_type() accordingly. 2. Remove the unused enum ucc_pram_initial_offset. 3. Refactor qe_setbrg(), also implement work-around for errata QE_General4. 4. Several printk() calls were missing the terminating \n. 5. Add __iomem where needed, and change u16 to __be16 and u32 to __be32 where appropriate. 6. In ucc_slow_init() the RBASE and TBASE registers in the PRAM were programmed with the wrong value. 7. Add the protocol type to struct us_info and updated ucc_slow_init() to use it, instead of always programming QE_CR_PROTOCOL_UNSPECIFIED. 8. Rename ucc_slow_restart_x() to ucc_slow_restart_tx() 9. Add several macros in qe.h (mostly for slow UCC support, but also to standardize some naming convention) and remove several unused macros. 10. Update ucc_geth.c to use the new macros. 11. Add ucc_slow_info.protocol to specify which QE_CR_PROTOCOL_xxx protcol to use when initializing the UCC in ucc_slow_init(). 12. Rename ucc_slow_pram.rfcr to rbmr and ucc_slow_pram.tfcr to tbmr, since these are the real names of the registers. 13. Use the setbits, clrbits, and clrsetbits where appropriate. 14. Refactor ucc_set_qe_mux_rxtx(). 15. Remove all instances of 'volatile'. 16. Simplify get_cmxucr_reg(); 17. Replace qe_mux.cmxucrX with qe_mux.cmxucr[]. 18. Updated struct ucc_geth because struct ucc_fast is not padded any more. Signed-off-by: Timur Tabi <[EMAIL PROTECTED]> --- Add fix 18. arch/powerpc/sysdev/qe_lib/qe.c | 36 +++-- arch/powerpc/sysdev/qe_lib/qe_ic.c|2 - arch/powerpc/sysdev/qe_lib/qe_io.c| 35 ++--- arch/powerpc/sysdev/qe_lib/ucc.c | 270 ++--- arch/powerpc/sysdev/qe_lib/ucc_fast.c | 127 arch/powerpc/sysdev/qe_lib/ucc_slow.c | 48 +++--- drivers/net/ucc_geth.c|2 +- drivers/net/ucc_geth.h|1 + include/asm-powerpc/immap_qe.h| 30 ++--- include/asm-powerpc/qe.h | 243 - include/asm-powerpc/ucc.h | 40 ++ include/asm-powerpc/ucc_slow.h|9 +- 12 files changed, 431 insertions(+), 412 deletions(-) diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 90f8740..3d57d38 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -141,7 +141,7 @@ EXPORT_SYMBOL(qe_issue_cmd); * 16 BRGs, which can be connected to the QE channels or output * as clocks. The BRGs are in two different block of internal * memory mapped space. - * The baud rate clock is the system clock divided by something. + * The BRG clock is the QE clock divided by 2. * It was set up long ago during the initial boot phase and is * is given to us. * Baud rate clocks are zero-based in the driver code (as that maps @@ -165,28 +165,38 @@ unsigned int get_brg_clk(void) return brg_clk; } -/* This function is used by UARTS, or anything else that uses a 16x - * oversampled clock. +/* Program the BRG to the given sampling rate and multiplier + * + * @brg: the BRG, 1-16 + * @rate: the desired sampling rate + * @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or + * GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01, + * then 'multiplier' should be 8. + * + * Also note that the value programmed into the BRGC register must be even. */ -void qe_setbrg(u32 brg, u32 rate) +void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier) { - volatile u32 *bp; u32 divisor, tempval; - int div16 = 0; + u32 div16 = 0; - bp = &qe_immr->brg.brgc[brg]; + divisor = get_brg_clk() / (rate * multiplier); - divisor = (get_brg_clk() / rate); if (divisor > QE_BRGC_DIVISOR_MAX + 1) { - div16 = 1; + div16 = QE_BRGC_DIV16; divisor /= 16; } - tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) | QE_BRGC_ENABLE; - if (div16) - tempval |= QE_BRGC_DIV16; + /* Errata QE_General4, which affects some MPC832x and MPC836x SOCs, says + that the BRG divisor must be even if you're not using divide-by-16 + mode. */ + if (!div16 && (divisor & 1)) + divisor++; + + tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) | + QE_BRGC_ENABLE | div16; - out_be32(bp, tempval); + out_be32(&qe_immr->brg.brgc[brg - 1], tempval); } /* Initialize SNUMs (thread serial numbers) according to diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index 55e6f39..9a2d1ed 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c @@ -405,8 +405,6
Re: [RFC] PPC64 Exporting memory information through /proc/iomem
On Thu, 2007-10-04 at 01:25 +0900, KAMEZAWA Hiroyuki wrote: > On Wed, 03 Oct 2007 08:35:35 -0700 > Badari Pulavarty <[EMAIL PROTECTED]> wrote: > > > On Wed, 2007-10-03 at 10:19 +0900, KAMEZAWA Hiroyuki wrote: > > CONFIG_ARCH_HAS_VALID_MEMORY_RANGE. Then define own > > find_next_system_ram() (rename to is_valid_memory_range()) - which > > checks the given range is a valid memory range for memory-remove > > or not. What do you think ? > > > My concern is... > Now, memory hot *add* makes use of resource(/proc/iomem) information for > onlining > memory.(See add_memory()->register_memory_resource() in mm/memoryhotplug.c) > So, we'll have to consider changing it if we need. > > Does PPC64 memory hot add registers new memory information to arch dependent > information list ? It seems ppc64 registers hot-added memory information from > *probe* file and registers it by add_memory()->register_memory_resource(). Yes. Thats what I realized after looking at the code. I have been concentrating on memory remove, never care about "add" :( Let me take a closer look at "add" support for ppc. Thanks, Badari ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [POWERPC] Cleaned up whitespace in head_fsl_booke.S
On Wed, Oct 03, 2007 at 10:20:11AM -0500, Kumar Gala wrote: > /* Invalidate TLB1 */ > - li r9,0x0c > + li 9,0x0c No 'r'? -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v4] qe: miscellaneous code improvements and fixes to the QE library
On Wed, 3 Oct 2007 11:34:59 -0500 Timur Tabi <[EMAIL PROTECTED]> wrote: > This patch makes numerous miscellaneous code improvements to the QE library. > > 1. Remove struct ucc_common and merge ucc_init_guemr() into ucc_set_type() >(every caller of ucc_init_guemr() also calls ucc_set_type()). Modify all >callers of ucc_set_type() accordingly. > > 2. Remove the unused enum ucc_pram_initial_offset. > > 3. Refactor qe_setbrg(), also implement work-around for errata QE_General4. > > 4. Several printk() calls were missing the terminating \n. > > 5. Add __iomem where needed, and change u16 to __be16 and u32 to __be32 where >appropriate. > > 6. In ucc_slow_init() the RBASE and TBASE registers in the PRAM were > programmed >with the wrong value. > > 7. Add the protocol type to struct us_info and updated ucc_slow_init() to >use it, instead of always programming QE_CR_PROTOCOL_UNSPECIFIED. > > 8. Rename ucc_slow_restart_x() to ucc_slow_restart_tx() > > 9. Add several macros in qe.h (mostly for slow UCC support, but also to >standardize some naming convention) and remove several unused macros. > > 10. Update ucc_geth.c to use the new macros. > > 11. Add ucc_slow_info.protocol to specify which QE_CR_PROTOCOL_xxx protcol > to use when initializing the UCC in ucc_slow_init(). > > 12. Rename ucc_slow_pram.rfcr to rbmr and ucc_slow_pram.tfcr to tbmr, since > these are the real names of the registers. > > 13. Use the setbits, clrbits, and clrsetbits where appropriate. > > 14. Refactor ucc_set_qe_mux_rxtx(). > > 15. Remove all instances of 'volatile'. > > 16. Simplify get_cmxucr_reg(); > > 17. Replace qe_mux.cmxucrX with qe_mux.cmxucr[]. > > 18. Updated struct ucc_geth because struct ucc_fast is not padded any more. > > Signed-off-by: Timur Tabi <[EMAIL PROTECTED]> > --- > Separate the changes into individual patches to allow for better comment/review and bisection in case of regression. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [9/11] pasemi_mac: clear out old errors on interface open
Olof Johansson wrote: > pasemi_mac: clear out old errors on interface open > > Clear out any pending errors when an interface is brought up. Since the bits > are sticky, they might be from interface shutdown time after firmware has > used it, etc. > > Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> In general, interface-open should completely reset and initialize the hardware. does pasemi_mac not do that? Jeff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [11/11] pasemi_mac: enable iommu support
Olof Johansson wrote: > pasemi_mac: use buffer index pointer in clean_rx() > > Use the new features in B0 for buffer ring index on the receive side. This > means we no longer have to search in the ring for where the buffer > came from. > > Also cleanup the RX cleaning side a little, while I was at it. > > Note: Pre-B0 hardware is no longer supported, and needs a pile of other > workarounds that are not being submitted for mainline inclusion. So the > fact that this breaks old hardware is not a problem at this time. > > Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> You sent patch #10 against as patch #11 :) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [POWERPC] Cleaned up whitespace in head_fsl_booke.S
On Oct 3, 2007, at 11:39 AM, Scott Wood wrote: > On Wed, Oct 03, 2007 at 10:20:11AM -0500, Kumar Gala wrote: >> /* Invalidate TLB1 */ >> -li r9,0x0c >> +li 9,0x0c > > No 'r'? damn, one too many chars deleted :) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Fix typo in new EMAC driver.
Valentine Barshak (by way of Josh Boyer <[EMAIL PROTECTED]>) wrote: > Fix an obvious typo in emac_xmit_finish. > > Signed-off-by: Valentine Barshak <[EMAIL PROTECTED]> > --- > drivers/net/ibm_newemac/core.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) applied ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [9/11] pasemi_mac: clear out old errors on interface open
On Wed, Oct 03, 2007 at 01:46:16PM -0400, Jeff Garzik wrote: > Olof Johansson wrote: >> pasemi_mac: clear out old errors on interface open >> Clear out any pending errors when an interface is brought up. Since the >> bits >> are sticky, they might be from interface shutdown time after firmware has >> used it, etc. >> Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> > > In general, interface-open should completely reset and initialize the > hardware. does pasemi_mac not do that? There's no explicit way to reset just one interface besides disabling it (which we do at close, and re-enable at open). It seems that some of the error bits are sticky across disable/enable, which is why this was needed. Also, they're RW1C, so writing 0 doesn't remove them (need to write 1 to clear). The only other dependency from firmware at this time is the setting of mac addresses, something that will be taken care of once we allow override of them via ethtool, since we'd need to program them from the driver then no matter what. Right now we assume that firmware has programmed it. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH RESEND] [11/11] pasemi_mac: enable iommu support
pasemi_mac: enable iommu support Enable IOMMU support for pasemi_mac, but avoid using it on non-partitioned systems for performance reasons. The user can override this by selecting the PPC_PASEMI_IOMMU_DMA_FORCE configuration option. Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> --- On Wed, Oct 03, 2007 at 01:47:17PM -0400, Jeff Garzik wrote: > You sent patch #10 against as patch #11 :) Oops! Here's the real copy. -Olof Index: k.org/arch/powerpc/platforms/pasemi/iommu.c === --- k.org.orig/arch/powerpc/platforms/pasemi/iommu.c +++ k.org/arch/powerpc/platforms/pasemi/iommu.c @@ -25,6 +25,7 @@ #include #include #include +#include #define IOBMAP_PAGE_SHIFT 12 @@ -175,13 +176,17 @@ static void pci_dma_dev_setup_pasemi(str { pr_debug("pci_dma_dev_setup, dev %p (%s)\n", dev, pci_name(dev)); - /* DMA device is untranslated, but all other PCI-e goes through -* the IOMMU +#if !defined(CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE) + /* For non-LPAR environment, don't translate anything for the DMA +* engine. The exception to this is if the user has enabled +* CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE at build time. */ - if (dev->vendor == 0x1959 && dev->device == 0xa007) + if (dev->vendor == 0x1959 && dev->device == 0xa007 && + !firmware_has_feature(FW_FEATURE_LPAR)) dev->dev.archdata.dma_ops = &dma_direct_ops; - else - dev->dev.archdata.dma_data = &iommu_table_iobmap; +#endif + + dev->dev.archdata.dma_data = &iommu_table_iobmap; } static void pci_dma_bus_setup_null(struct pci_bus *b) { } Index: k.org/drivers/net/pasemi_mac.c === --- k.org.orig/drivers/net/pasemi_mac.c +++ k.org/drivers/net/pasemi_mac.c @@ -34,6 +34,7 @@ #include #include +#include #include "pasemi_mac.h" @@ -89,6 +90,15 @@ MODULE_PARM_DESC(debug, "PA Semi MAC bit static struct pasdma_status *dma_status; +static int translation_enabled(void) +{ +#if defined(CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE) + return 1; +#else + return firmware_has_feature(FW_FEATURE_LPAR); +#endif +} + static void write_iob_reg(struct pasemi_mac *mac, unsigned int reg, unsigned int val) { @@ -193,6 +203,7 @@ static int pasemi_mac_setup_rx_resources struct pasemi_mac_rxring *ring; struct pasemi_mac *mac = netdev_priv(dev); int chan_id = mac->dma_rxch; + unsigned int cfg; ring = kzalloc(sizeof(*ring), GFP_KERNEL); @@ -232,20 +243,28 @@ static int pasemi_mac_setup_rx_resources PAS_DMA_RXCHAN_BASEU_BRBH(ring->dma >> 32) | PAS_DMA_RXCHAN_BASEU_SIZ(RX_RING_SIZE >> 3)); - write_dma_reg(mac, PAS_DMA_RXCHAN_CFG(chan_id), - PAS_DMA_RXCHAN_CFG_HBU(2)); + cfg = PAS_DMA_RXCHAN_CFG_HBU(2); + + if (translation_enabled()) + cfg |= PAS_DMA_RXCHAN_CFG_CTR; + + write_dma_reg(mac, PAS_DMA_RXCHAN_CFG(chan_id), cfg); write_dma_reg(mac, PAS_DMA_RXINT_BASEL(mac->dma_if), - PAS_DMA_RXINT_BASEL_BRBL(__pa(ring->buffers))); + PAS_DMA_RXINT_BASEL_BRBL(ring->buf_dma)); write_dma_reg(mac, PAS_DMA_RXINT_BASEU(mac->dma_if), - PAS_DMA_RXINT_BASEU_BRBH(__pa(ring->buffers) >> 32) | + PAS_DMA_RXINT_BASEU_BRBH(ring->buf_dma >> 32) | PAS_DMA_RXINT_BASEU_SIZ(RX_RING_SIZE >> 3)); - write_dma_reg(mac, PAS_DMA_RXINT_CFG(mac->dma_if), - PAS_DMA_RXINT_CFG_DHL(3) | PAS_DMA_RXINT_CFG_L2 | - PAS_DMA_RXINT_CFG_LW | PAS_DMA_RXINT_CFG_RBP | - PAS_DMA_RXINT_CFG_HEN); + cfg = PAS_DMA_RXINT_CFG_DHL(3) | PAS_DMA_RXINT_CFG_L2 | + PAS_DMA_RXINT_CFG_LW | PAS_DMA_RXINT_CFG_RBP | + PAS_DMA_RXINT_CFG_HEN; + + if (translation_enabled()) + cfg |= PAS_DMA_RXINT_CFG_ITRR | PAS_DMA_RXINT_CFG_ITR; + + write_dma_reg(mac, PAS_DMA_RXINT_CFG(mac->dma_if), cfg); ring->next_to_fill = 0; ring->next_to_clean = 0; @@ -275,6 +294,7 @@ static int pasemi_mac_setup_tx_resources u32 val; int chan_id = mac->dma_txch; struct pasemi_mac_txring *ring; + unsigned int cfg; ring = kzalloc(sizeof(*ring), GFP_KERNEL); if (!ring) @@ -304,11 +324,15 @@ static int pasemi_mac_setup_tx_resources write_dma_reg(mac, PAS_DMA_TXCHAN_BASEU(chan_id), val); - write_dma_reg(mac, PAS_DMA_TXCHAN_CFG(chan_id), - PAS_DMA_TXCHAN_CFG_TY_IFACE | - PAS_DMA_TXCHAN_CFG_TATTR(mac->dma_if) | - PAS_DMA_TXCHAN_CFG_UP | - PAS_DMA_TXCHAN_CFG_WT(2)); + cfg = PAS_DMA_TXCHAN_C
Re: [PATCH] [1/11] pasemi_mac: basic error checking
Olof Johansson wrote: > pasemi_mac: basic error checking > > Add some rudimentary error checking to pasemi_mac. > > Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> applied 1-10 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v4] qe: miscellaneous code improvements and fixes to the QE library
Stephen Hemminger wrote: > Separate the changes into individual patches to allow for better > comment/review > and bisection in case of regression. That would be too difficult. Some of the changes are single lines, and this patch has already been approved -- I just cross-posted to netdev because I made a few ucc_geth changes that can't be docoupled from the powerpc changes. A series of 18 patches would just be convoluted. -- Timur Tabi Linux Kernel Developer @ Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/5] ibmebus: Move to of_device and of_platform_driver, match eHCA and eHEA drivers
> > Replace struct ibmebus_dev and struct ibmebus_driver with struct of_device > > and struct of_platform_driver, respectively. Match the external ibmebus > > interface and drivers using it. > > > > Signed-off-by: Joachim Fenkes <[EMAIL PROTECTED]> > > If not, then you need to get an Acked-by and an agreement that this > change can go via the powerpc.git tree from Roland Dreier and Jeff > Garzik. I don't see anything objectionable in the infiniband parts of the patch -- I don't have any way to test the changes but it all looks like a straightforward conversion to a new platform API. So: Acked-by: Roland Dreier <[EMAIL PROTECTED]> - R. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [9/11] pasemi_mac: clear out old errors on interface open
Olof Johansson wrote: > On Wed, Oct 03, 2007 at 01:46:16PM -0400, Jeff Garzik wrote: >> Olof Johansson wrote: >>> pasemi_mac: clear out old errors on interface open >>> Clear out any pending errors when an interface is brought up. Since the >>> bits >>> are sticky, they might be from interface shutdown time after firmware has >>> used it, etc. >>> Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> >> In general, interface-open should completely reset and initialize the >> hardware. does pasemi_mac not do that? > > There's no explicit way to reset just one interface besides disabling it > (which we do at close, and re-enable at open). It seems that some of > the error bits are sticky across disable/enable, which is why this was > needed. Also, they're RW1C, so writing 0 doesn't remove them (need to > write 1 to clear). OK just making sure, thanks. > The only other dependency from firmware at this time is the setting of mac > addresses, something that will be taken care of once we allow override of > them via ethtool, since we'd need to program them from the driver then > no matter what. Right now we assume that firmware has programmed it. Standard procedure for this is * upon module-load, obtain the MAC address from * upon interface-up, program dev->dev_addr[] into chip's RX filter (aka MAC address) registers That permits the admin to override the MAC address via ifconfig. (ethtool doesn't support that, but you basically had the right idea) Jeff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi_init: Support non-QE processors
On 10/3/07, Peter Korsgaard <[EMAIL PROTECTED]> wrote: > > "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: > > Hi, > > Grant> Why not just: > > Grant> np = of_find_node_by_type(NULL, "qe"); > Grant> + if (!np) > Grant> + np = of_find_node_by_type(NULL, "soc"); > Grant> if (!np) > Grant> return -ENODEV; > > My first iteration did it like that, but then you don't get a -ENODEV > if the node is missing (and you'll end up using the wrong clock) and > it doesn't support processors with SPI on and off QE (if that > exists/will ever exist). Okay, but you should at least be able confine your determination of which sysclk value to use to one part of the function. Otherwise, it looks good. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH RESEND] [11/11] pasemi_mac: enable iommu support
Olof Johansson wrote: > pasemi_mac: enable iommu support > > Enable IOMMU support for pasemi_mac, but avoid using it on non-partitioned > systems for performance reasons. > > The user can override this by selecting the PPC_PASEMI_IOMMU_DMA_FORCE > configuration option. > > Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> applied ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/6] Patch series to add of_platform binding to xilinxfb
On 10/3/07, Andrei Konovalov <[EMAIL PROTECTED]> wrote: > Hi Grant, > > Grant Likely wrote: > > (resend due to mailer issues. Apologies to anyone receiving this twice) > > > > This patch series reworks the Xilinx framebuffer driver and then adds > > an of_platform bus binding. The of_platform bus binding is needed to use > > the driver in arch/powerpc platforms. > > The patch series looks good (though I did no testing on my site; seems > the Xilinx ML* boards should not be hurt). I've tested under both arch/ppc and arch/powerpc on a custom board that I have here. > > BTW, I don't follow the linuxppc list close enough at the moment. > What boards are going to use of_platform bus binding? Any Xilinx platform (powerpc & microblaze) using the xilinx framebuffer (ml300, ml403, etc). > ML40x/ML300 are not in the arch/powerpc yet, right? 2.6.24 will have Xilinx Virtex support in arch/powerpc. It's already in Josh's 4xx maintainer tree. > Do I recall correct that you have a mpc5200 based one with two xilinxfb's? Nope, I haven't seen such a beast myself. > PS > I don't think you need an ack from me. > If this is not true, let me know, and I'll ack the patch series You are the author after all. :-) Your ack is probably appropriate, if not absolutely necessary. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc: fix crash in rtas during early boot.
RTAS messages can occur very early during boot, before the error message buffer has been allocated. The current code will lead to a null-pointer deref. Explicitly protect against this. Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> Cc: Andy Whitcroft <[EMAIL PROTECTED]> Andy Whitcroft's crash was appearently due to firmware complaining about lost power, (actually, lost power supply redundancy!), which occurred very early during boot. Type0040 (EPOW) Status: bypassed new Residual error from previous boot. EPOW Sensor Value: 0002 EPOW warning due to loss of redundancy. EPOW general power fault. I've no clue why firmware thought it was OK to report this during one of the earliest calls to RTAS; I'm still investiigating that. arch/powerpc/platforms/pseries/rtasd.c |6 ++ 1 file changed, 6 insertions(+) Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/rtasd.c === --- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/rtasd.c 2007-09-26 15:06:49.0 -0500 +++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/rtasd.c 2007-10-03 11:58:09.0 -0500 @@ -235,6 +235,12 @@ void pSeries_log_error(char *buf, unsign return; } + /* During early boot, the log buffer hasn't been allocted yet. */ + if (rtas_log_buf == NULL) { + spin_unlock_irqrestore(&rtasd_log_lock, s); + return; + } + /* call type specific method for error */ switch (err_type & ERR_TYPE_MASK) { case ERR_TYPE_RTAS_LOG: ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic
On Wed, Oct 03, 2007 at 02:09:46PM +1000, Michael Ellerman wrote: > > Until we initialise what exactly? Until we allocate the error log buffer. The original crash was for a null-pointer deref of the unallocated buffer. I just sent out a patch to fix this; its a bit simpler than the below. In that email, I remarked: Andy Whitcroft's crash was appearently due to firmware complaining about lost power, (actually, lost power supply redundancy!), which occurred very early during boot. Type0040 (EPOW) Status: bypassed new Residual error from previous boot. EPOW Sensor Value: 0002 EPOW warning due to loss of redundancy. EPOW general power fault. I've no clue why firmware thought it was OK to report this during one of the earliest calls to RTAS; I'm still investiigating that. --linas ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 08/10] ia64: Convert cpu_sibling_map to a per_cpu data array (v3)
Hi Paul, I just now found this. I'll take a look immediately. I tried it on a couple of systems but not margin. Thanks, Mike Paul Jackson wrote: > Mike, > > I think there is a bug either in this ia64 patch, or in the related > generic arch patch: Convert cpu_sibling_map to be a per cpu variable > (v3). > > It dies early in boot on me, on the SGI internal 8 processor IA64 > system that you and I know as 'margin'. The death is a hard hang, due > to a corrupt stack, due to a bogus cpu index. > > I haven't tracked it down all the way, but have gotten this far. If I add > the following patch, I get a panic on the BUG_ON if I have these two patches > in 2.6.23-rc8-mm1, but it boots just fine if I don't have these two patches. > > It seems that the "cpu_sibling_map[cpu]" cpumask_t is empty (all zero > bits) with your two patches applied, but has some non-zero bits > otherwise, which leads to 'group' being NR_CPUS instead of a useful CPU > number. Unfortunately, I have no idea why the "cpu_sibling_map[cpu]" > cpumask_t is empty -- good luck on that part. > > The patch that catches this bug earlier is this: > > --- 2.6.23-rc8-mm1.orig/kernel/sched.c2007-09-28 01:42:20.144561024 > -0700 > +++ 2.6.23-rc8-mm1/kernel/sched.c 2007-09-28 02:27:14.239075497 -0700 > @@ -5905,6 +5905,7 @@ static int cpu_to_phys_group(int cpu, co > #else > group = cpu; > #endif > + BUG_ON(group == NR_CPUS); > if (sg) > *sg = &per_cpu(sched_group_phys, group); > return group; > > ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 0/5] Add MPC8610 HPCD Base Port
Kumar and Paul, These five patches add the base port for the newly introduced MPC8610 HPCD reference board. We would like to see these added to 2.6.24 if possible! Thanks, jdl arch/powerpc/boot/dts/mpc8610_hpcd.dts | 191 + arch/powerpc/configs/mpc8610_hpcd_defconfig | 1023 +++ arch/powerpc/platforms/86xx/Kconfig | 13 + arch/powerpc/platforms/86xx/Makefile|1 + arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 267 +++ arch/powerpc/sysdev/fsl_pci.c |1 + include/linux/pci_ids.h |1 + 7 files changed, 1497 insertions(+), 0 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/5] Add initial MPC8610 HPCD Device Tree Source file.
From: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Jon Loeliger <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8610_hpcd.dts | 191 1 files changed, 191 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/mpc8610_hpcd.dts diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts new file mode 100644 index 000..966edf1 --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -0,0 +1,191 @@ +/* + * MPC8610 HPCD Device Tree Source + * + * 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 Version 2 as published + * by the Free Software Foundation. + */ + + +/ { + model = "MPC8610HPCD"; + compatible = "fsl,MPC8610HPCD"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,[EMAIL PROTECTED] { + device_type = "cpu"; + reg = <0>; + d-cache-line-size = ;// bytes + i-cache-line-size = ;// bytes + d-cache-size = <8000>; // L1, 32K + i-cache-size = <8000>; // L1, 32K + timebase-frequency = <0>; // 33 MHz, from uboot + bus-frequency = <0>;// From uboot + clock-frequency = <0>; // From uboot + }; + }; + + memory { + device_type = "memory"; + reg = < 2000>; // 512M at 0x0 + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; + #interrupt-cells = <2>; + device_type = "soc"; + ranges = <0 e000 0010>; + reg = ; + bus-frequency = <0>; + + [EMAIL PROTECTED] { + device_type = "i2c"; + compatible = "fsl-i2c"; + #address-cells = <1>; + #size-cells = <0>; + reg = <3000 100>; + interrupts = <2b 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + [EMAIL PROTECTED] { + device_type = "i2c"; + compatible = "fsl-i2c"; + #address-cells = <1>; + #size-cells = <0>; + reg = <3100 100>; + interrupts = <2b 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + [EMAIL PROTECTED] { + device_type = "serial"; + compatible = "ns16550"; + reg = <4500 100>; + clock-frequency = <0>; + interrupts = <2a 2>; + interrupt-parent = <&mpic>; + }; + + [EMAIL PROTECTED] { + device_type = "serial"; + compatible = "ns16550"; + reg = <4600 100>; + clock-frequency = <0>; + interrupts = <1c 2>; + interrupt-parent = <&mpic>; + }; + + + mpic: [EMAIL PROTECTED] { + clock-frequency = <0>; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + reg = <4 4>; + compatible = "chrp,open-pic"; + device_type = "open-pic"; + big-endian; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8610-guts"; + reg = ; + fsl,has-rstcr; + }; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8610-pci"; + device_type = "pci"; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + reg = ; + bus-range = <0 0>; + ranges = <0200 0 8000 8000 0 1000 + 0100 0 e100 0 0010>; + clock-frequency = <1fca055>; + interrupt-parent = <&mpic>; + interrupts = <18 2>; + interrupt-map-mask = ; + interrupt-map = < + /* IDSEL 0x11 */ + 8800 0 0 1 &mpic 4 1 + 8800 0 0 2 &mpic 5 1 +
[PATCH 2/5] Add initial MPC8610 HPCD Platform files.
From: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Jason Jin <[EMAIL PROTECTED]> Signed-off-by: Jon Loelier <[EMAIL PROTECTED]> --- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 267 1 files changed, 267 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/platforms/86xx/mpc8610_hpcd.c diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c new file mode 100644 index 000..ba73163 --- /dev/null +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c @@ -0,0 +1,267 @@ +/* + * MPC8610 HPCD board specific routines + * + * Initial author: Xianghua Xiao <[EMAIL PROTECTED]> + * Recode: Jason Jin <[EMAIL PROTECTED]> + * + * Rewrite the interrupt routing. remove the 8259PIC support, + * All the integrated device in ULI use sideband interrupt. + * + * 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 +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "mpc86xx.h" + +#define MPC86XX_RSTCR_OFFSET (0xe00b0) /* Reset Control Register */ + + +void __init +mpc86xx_hpcd_init_irq(void) +{ + struct mpic *mpic1; + struct device_node *np; + struct resource res; + + /* Determine PIC address. */ + np = of_find_node_by_type(NULL, "open-pic"); + if (np == NULL) + return; + of_address_to_resource(np, 0, &res); + + /* Alloc mpic structure and per isu has 16 INT entries. */ + mpic1 = mpic_alloc(np, res.start, + MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, + 0, 256, " MPIC "); + BUG_ON(mpic1 == NULL); + + mpic_init(mpic1); + +} + + +#ifdef CONFIG_PCI +static void __devinit quirk_uli1575(struct pci_dev *dev) +{ + u32 temp32; + + /* Disable INTx */ + pci_read_config_dword(dev, 0x48, &temp32); + pci_write_config_dword(dev, 0x48, (temp32 | 1<<26)); + + /* Enable sideband interrupt */ + pci_read_config_dword(dev, 0x90, &temp32); + pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); +} + + +static void __devinit quirk_uli5288(struct pci_dev *dev) +{ + unsigned char c; + unsigned short temp; + + /* Interrupt Disable, Needed when SATA disabled */ + pci_read_config_word(dev, PCI_COMMAND, &temp); + temp |= 1<<10; + pci_write_config_word(dev, PCI_COMMAND, temp); + + pci_read_config_byte(dev, 0x83, &c); + c |= 0x80; + pci_write_config_byte(dev, 0x83, c); + + pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01); + pci_write_config_byte(dev, PCI_CLASS_DEVICE, 0x06); + + pci_read_config_byte(dev, 0x83, &c); + c &= 0x7f; + pci_write_config_byte(dev, 0x83, c); +} + + +/* + * Since 8259PIC was disabled on the board, the IDE device can not + * use the legacy IRQ, we need to let the IDE device work under + * native mode and use the interrupt line like other PCI devices. + * IRQ14 is a sideband interrupt from IDE device to CPU and we use this + * as the interrupt for IDE device. + */ +static void __devinit quirk_uli5229(struct pci_dev *dev) +{ + unsigned char c; + + pci_read_config_byte(dev, 0x4b, &c); + c |= 0x10; + pci_write_config_byte(dev, 0x4b, c); +} + + +/* + * SATA interrupt pin bug fix + * There's a chip bug for 5288, The interrupt pin should be 2, + * not the read only value 1, So it use INTB#, not INTA# which + * actually used by the IDE device 5229. + * As of this bug, during the PCI initialization, 5288 read the + * irq of IDE device from the device tree, this function fix this + * bug by re-assigning a correct irq to 5288. + * + */ +static void __devinit final_uli5288(struct pci_dev *dev) +{ + struct pci_controller *hose = pci_bus_to_host(dev->bus); + struct device_node *hosenode = hose ? hose->arch_data : NULL; + struct of_irq oirq; + int virq, pin = 2; + u32 laddr[3]; + + if (!hosenode) + return; + + laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); + laddr[1] = laddr[2] = 0; + of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq); + virq = irq_create_of_mapping(oirq.controller, oirq.specifier, +oirq.size); + dev->irq = virq; +} + + +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, 0x5288, fina
[PATCH 3/5] Treat 8610 host bridge as transparent
From: Jason Jin <[EMAIL PROTECTED]> Signed-off-by: Jason Jin <[EMAIL PROTECTED]> Signed-off-by: Jon Loeliger <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/fsl_pci.c |1 + include/linux/pci_ids.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 34cad96..98290f4 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -259,3 +259,4 @@ DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transpare DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent); DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent); DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent); +DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_transparent); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 545f24c..bb244a4 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2104,6 +2104,7 @@ #define PCI_DEVICE_ID_MPC8572 0x0041 #define PCI_DEVICE_ID_MPC8641 0x7010 #define PCI_DEVICE_ID_MPC8641D 0x7011 +#define PCI_DEVICE_ID_MPC8610 0x7018 #define PCI_VENDOR_ID_PASEMI 0x1959 -- 1.5.3 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 4/5] Add initial MPC8610 HPCD Kconfig and Makefiles.
From: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Jason Jin <[EMAIL PROTECTED]> Signed-off-by: Jon Loeliger <[EMAIL PROTECTED]> --- arch/powerpc/platforms/86xx/Kconfig | 13 + arch/powerpc/platforms/86xx/Makefile |1 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index 685b2fb..21d1135 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig @@ -11,6 +11,12 @@ config MPC8641_HPCN help This option enables support for the MPC8641 HPCN board. +config MPC8610_HPCD + bool "Freescale MPC8610 HPCD" + select DEFAULT_UIMAGE + help + This option enables support for the MPC8610 HPCD board. + endchoice config MPC8641 @@ -19,3 +25,10 @@ config MPC8641 select PPC_UDBG_16550 select MPIC default y if MPC8641_HPCN + +config MPC8610 + bool + select FSL_PCI if PCI + select PPC_UDBG_16550 + select MPIC + default y if MPC8610_HPCD diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile index 3376c77..c967063 100644 --- a/arch/powerpc/platforms/86xx/Makefile +++ b/arch/powerpc/platforms/86xx/Makefile @@ -4,3 +4,4 @@ obj-$(CONFIG_SMP) += mpc86xx_smp.o obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o +obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o -- 1.5.3 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 5/5] Add initial MPC8610 HPCD defconfig file.
From: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Xianghua Xiao <[EMAIL PROTECTED]> Signed-off-by: Jon Loeliger <[EMAIL PROTECTED]> --- arch/powerpc/configs/mpc8610_hpcd_defconfig | 1023 +++ 1 files changed, 1023 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/configs/mpc8610_hpcd_defconfig diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig new file mode 100644 index 000..de19b78 --- /dev/null +++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig @@ -0,0 +1,1023 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.23-rc6 +# Tue Oct 2 11:42:56 2007 +# +# CONFIG_PPC64 is not set + +# +# Processor support +# +CONFIG_6xx=y +# CONFIG_PPC_85xx is not set +# CONFIG_PPC_8xx is not set +# CONFIG_40x is not set +# CONFIG_44x is not set +# CONFIG_E200 is not set +CONFIG_PPC_FPU=y +CONFIG_ALTIVEC=y +CONFIG_PPC_STD_MMU=y +CONFIG_PPC_STD_MMU_32=y +# CONFIG_PPC_MM_SLICES is not set +# CONFIG_SMP is not set +CONFIG_PPC32=y +CONFIG_PPC_MERGE=y +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_IRQ_PER_CPU=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_ILOG2_U32=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set +CONFIG_PPC=y +CONFIG_EARLY_PRINTK=y +CONFIG_GENERIC_NVRAM=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_PPC_OF=y +CONFIG_OF=y +CONFIG_PPC_UDBG_16550=y +# CONFIG_GENERIC_TBSYNC is not set +CONFIG_AUDIT_ARCH=y +CONFIG_GENERIC_BUG=y +CONFIG_DEFAULT_UIMAGE=y +# CONFIG_PPC_DCR_NATIVE is not set +# CONFIG_PPC_DCR_MMIO is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +# CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SYSFS_DEPRECATED=y +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_MODULES is not set +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# Platform support +# +# CONFIG_PPC_MULTIPLATFORM is not set +# CONFIG_EMBEDDED6xx is not set +# CONFIG_PPC_82xx is not set +# CONFIG_PPC_83xx is not set +CONFIG_PPC_86xx=y +# CONFIG_PPC_MPC52xx is not set +# CONFIG_PPC_MPC5200 is not set +# CONFIG_PPC_CELL is not set +# CONFIG_PPC_CELL_NATIVE is not set +# CONFIG_PQ2ADS is not set +# CONFIG_MPC8641_HPCN is not set +CONFIG_MPC8610_HPCD=y +CONFIG_MPC8610=y +CONFIG_MPIC=y +# CONFIG_MPIC_WEIRD is not set +# CONFIG_PPC_I8259 is not set +# CONFIG_PPC_RTAS is not set +# CONFIG_MMIO_NVRAM is not set +# CONFIG_PPC_MPC106 is not set +# CONFIG_PPC_970_NAP is not set +# CONFIG_PPC_INDIRECT_IO is not set +# CONFIG_GENERIC_IOMAP is not set +# CONFIG_CPU_FREQ is not set +# CONFIG_CPM2 is not set +# CONFIG_FSL_ULI1575 is not set + +# +# Kernel options +# +CONFIG_HIGHMEM=y +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +# CONFIG_HZ_300 is not set +CONFIG_HZ_1000=y +CONFIG_HZ=1000 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_PROC_DEVICETREE=y +# CONFIG_CMDLINE_BOOL is not set +# CONFIG_PM is not set +CONFIG_SUSPEND_UP_POSSIBLE=y +CONFIG_HI
Re: [PATCH 08/10] bootwrapper: Add a firmware-independent "raw" target.
On 9/5/07, Scott Wood <[EMAIL PROTECTED]> wrote: > This target produces a flat binary rather than an ELF file, > fixes the entry point at the beginning of the image, and takes > a complete device tree with no fixups needed. > > The device tree must have labels on /#address-cells, the timebase > frequency, and the memory size. Scott, Are you planning to address the comments on this patch and resubmit in time for the 2.6.24 merge window? The raw platform is quite useful for Xilinx Virtex support, so I'd really like to see it get merged. Thanks, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2 6/7] Uartlite: Add of-platform-bus binding
On Wed, 2007-10-03 at 08:39 -0600, Grant Likely wrote: > Right, okay. Looking at platform_device_add(), the default parent is > platform_bus, but it can be overridden. of_platform_bus devices get > the hierarchy of the device tree by default. So in the platform bus > case, the constructor would need to explicitly set the parent device? > Correct? > > Also, how do you see the constructor code getting executed? Called > explicitly from the platform code, or some form of auto binding? I > look at fsl_soc.c and I shudder as each constructor does a pass of the > whole tree looking for compatible nodes. My idea was to have some platform code at boot walk the DT and call the constructors on the way, passing them the parent. Constructors return a struct device * so it would keep track of who is where. Drivers or platform code can then register constructors along with of match tables. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Stdout console clogging => 300ms blocked
On Tue, 02 Oct 2007 09:41:28 +0200, Willaert, Bernard wrote: > System details: > Freescale [EMAIL PROTECTED] > Kernel 2.6.18 > > Problem: > When we log debug output via the serial console on a multithreaded > application, the console throughput may get clogged and then we > experience a >300ms deadlock. > > Quick and dirty test program: threadtest.c: > //-- > - > #include > #include > #include > > #define THREAD_DELAY 1000 > > void* thread_1(void* unused) > { > while (1) > { > usleep(THREAD_DELAY); > fprintf(stdout," <- thread 1\n"); > } > return NULL; > } > > void* thread_2(void* unused) > { > static long ts_old; > long ts; > struct timeval tv; > > while (1) > { > usleep(THREAD_DELAY); > fprintf(stdout," <- thread 2\n"); > > gettimeofday (&tv, NULL); > ts = (tv.tv_sec * 1000L) + (tv.tv_usec / 1000L); > if ((ts - ts_old) > 100) > { > fprintf(stdout, "!!! thread2 interval > timeout = %d ms\n",(int)(ts - ts_old)); > } > ts_old = ts; > } > return NULL; > > } > > > > int main() > { > pthread_t pthread_id_1, pthread_id_2; > > pthread_create(&pthread_id_1,NULL,&thread_1,NULL); > pthread_create(&pthread_id_2,NULL,&thread_2,NULL); > while (1) > { > } > return 0; > > } > > //-- > - > > Build command on our platform: > powerpc-linux-uclibc-gcc threadtest.c -lpthread -o threadtest > Execute: ./threadtest > /dev/console & > > Uboot settings for the serial console: > consoledev=ttyS0 > baudrate=115200 > stdin=serial > stdout=serial > stderr=serial > boot_go=setenv bootargs console=$consoledev,$baudrate $args_rtc > $args_mtd $args_nfs $args_debug;bootm $addr_kernel $addr_root $addr_dtb > > > Expected output [snippet] on the console: > /\ > <- thread 1 > <- thread 2 > <- thread 1 > <- thread 2 > <- thread 1 > <- thread 2 > <- thread 1 > <- thread 2 > <- thread 1 > <- thread 2 > <- thread 1 > /\ > > Real output on the console: > > /\ > <- thread 1 > <- thread 2 > <- thread 1 > <- thread 2 > <- thread 1 > <- thread 2 > !!! thread2 interval timeout = 335 ms > <- thread 1 > <- thread 2 > <- thread 1 > <- thread 2 > <- thread 1 > /\ > > This timeout shows up around every second and has always about the same > value of 335 ms. > Can somebody reproduce this behaviour ( the console speed and/or thread > interval may have to be tweaked to clog the serial output) ? > Thank you in advance for your help. Could you not post HTML please? Thanks. "Deadlock" means dead due to incorrect locking. Instead, you seem to be talking about a momentary pause. :) Are you saying that the problem does not occur when you do not use /dev/console? What about /dev/ttyS0, or whatever your serial port device is? You're certain that this isn't simply a result of multitasking? -- Hollis Blanchard IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi_init: Support non-QE processors
On Oct 3, 2007, at 1:17 PM, Grant Likely wrote: > On 10/3/07, Peter Korsgaard <[EMAIL PROTECTED]> wrote: >>> "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: >> >> Hi, >> >> Grant> Why not just: >> >> Grant> np = of_find_node_by_type(NULL, "qe"); >> Grant> + if (!np) >> Grant> + np = of_find_node_by_type(NULL, "soc"); >> Grant> if (!np) >> Grant> return -ENODEV; >> >> My first iteration did it like that, but then you don't get a -ENODEV >> if the node is missing (and you'll end up using the wrong clock) and >> it doesn't support processors with SPI on and off QE (if that >> exists/will ever exist). > > Okay, but you should at least be able confine your determination of > which sysclk value to use to one part of the function. Otherwise, it > looks good. Peter, can you respin this w/Grant's modification. I've grabbed the other patches and applied them. waiting on this one. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/5] Add MPC8610 HPCD Base Port
On Oct 3, 2007, at 3:09 PM, Jon Loeliger wrote: > Kumar and Paul, > > These five patches add the base port for the newly > introduced MPC8610 HPCD reference board. We would > like to see these added to 2.6.24 if possible! > > Thanks, > jdl > > > arch/powerpc/boot/dts/mpc8610_hpcd.dts | 191 + > arch/powerpc/configs/mpc8610_hpcd_defconfig | 1023 > +++ > arch/powerpc/platforms/86xx/Kconfig | 13 + > arch/powerpc/platforms/86xx/Makefile|1 + > arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 267 +++ > arch/powerpc/sysdev/fsl_pci.c |1 + > include/linux/pci_ids.h |1 + > 7 files changed, 1497 insertions(+), 0 deletions(-) applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v4] qe: miscellaneous code improvements and fixes to the QE library
On Oct 3, 2007, at 1:00 PM, Timur Tabi wrote: > Stephen Hemminger wrote: > >> Separate the changes into individual patches to allow for better >> comment/review >> and bisection in case of regression. > > That would be too difficult. Some of the changes are single lines, > and this patch has already been approved -- I just cross-posted to > netdev because I made a few ucc_geth changes that can't be > docoupled from the powerpc changes. A series of 18 patches would > just be convoluted. Normally I would agree, but at this point I'm not going to gripe too much about it. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] Remove some section mismatch warnings
>From g5_defconfig: WARNING: vmlinux.o(.text+0x2ff5c): Section mismatch: reference to .init.text:.pmac_find_ide_boot (between '.note_bootable_part' and '.note_scsi_host') >From holly_defconfig: WARNING: vmlinux.o(.text+0x164fe): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') WARNING: vmlinux.o(.text+0x16506): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') >From linkstation_defconfig: WARNING: vmlinux.o(.text+0x158fe): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') WARNING: vmlinux.o(.text+0x15906): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') >From mpc7448_hpc2_defconfig: WARNING: vmlinux.o(.text+0x1583e): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') WARNING: vmlinux.o(.text+0x15846): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') >From pmac32_defconfig: WARNING: vmlinux.o(.text+0x154ca): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'note_scsi_host') WARNING: vmlinux.o(.text+0x154d2): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'note_scsi_host') WARNING: vmlinux.o(.text+0x1553c): Section mismatch: reference to .init.text:pmac_find_ide_boot (between 'note_bootable_part' and 'note_scsi_host') >From ppc64_defconfig: WARNING: vmlinux.o(.text+0x3acdc): Section mismatch: reference to .init.text:.pmac_find_ide_boot (between '.note_bootable_part' and '.note_scsi_host') >From prpmc2800_defconfig: WARNING: vmlinux.o(.text+0x1611e): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') WARNING: vmlinux.o(.text+0x16126): Section mismatch: reference to .init.data:boot_command_line (between 'note_bootable_part' and 'find_via_pmu') Signed-off-by: Stephen Rothwell <[EMAIL PROTECTED]> --- arch/powerpc/platforms/powermac/setup.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) -- Cheers, Stephen Rothwell[EMAIL PROTECTED] diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 7ccb923..840f5b4 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -466,8 +466,13 @@ static int pmac_late_init(void) late_initcall(pmac_late_init); -/* can't be __init - can be called whenever a disk is first accessed */ -void note_bootable_part(dev_t dev, int part, int goodness) +/* + * This is __init_refok because we check for "initializing" before + * touching any of the __init sensitive things and "initializing" + * will be false after __init time. This can't be __init because it + * can be called whenever a disk is first accessed. + */ +void __init_refok note_bootable_part(dev_t dev, int part, int goodness) { static int found_boot = 0; char *p; -- 1.5.3.3 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] SPI: Use fsl_spi instead of mpc83xx_spi
On Wed, Oct 03, 2007 at 06:00:37PM +0200, Peter Korsgaard wrote: > > "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: > > Hi, > > >> - compatible = "mpc83xx_spi"; > >> + compatible = "fsl_spi"; > > Grant> Compatible is a list property; this might be more appropriate: > > Grant> compatible = "fsl,mpc8313_spi", "fsl_spi"; > > Fine by me, I'm just following booting-without-of.txt. Yeah, some of the older bits of booting-without-of.txt are a bit crufty. There should certainly be a specific compatible value in the list as well as the general "fsl_spi" one. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/5] Add initial MPC8610 HPCD Platform files.
On Wed, 03 Oct 2007 15:09:33 -0500 Jon Loeliger <[EMAIL PROTECTED]> wrote: > > +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include You should include linux/of.h as well to use the of_ accessor functions. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpnAmAWgMdTD.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] Remove unused old code from powermac setup code
Since bootdevice never gets initialized, it's always NULL, and hence a whole pile of code in arch/powerpc/platforms/setup.c never gets used. (This was the code that originally was there so that the automatic root partition selection mechanism would prefer a rootish-looking partition on the device that OF loaded the kernel from over a similar partition on other devices.) This removes the unused code. Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 7ccb923..c59a508 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -387,69 +387,13 @@ static void __init pmac_setup_arch(void) #endif /* CONFIG_ADB */ } -char *bootpath; -char *bootdevice; -void *boot_host; -int boot_target; -int boot_part; -static dev_t boot_dev; - #ifdef CONFIG_SCSI void note_scsi_host(struct device_node *node, void *host) { - int l; - char *p; - - l = strlen(node->full_name); - if (bootpath != NULL && bootdevice != NULL - && strncmp(node->full_name, bootdevice, l) == 0 - && (bootdevice[l] == '/' || bootdevice[l] == 0)) { - boot_host = host; - /* -* There's a bug in OF 1.0.5. (Why am I not surprised.) -* If you pass a path like scsi/[EMAIL PROTECTED]:0 to canon, it returns -* something like /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED],0 -* That is, the scsi target number doesn't get preserved. -* So we pick the target number out of bootpath and use that. -*/ - p = strstr(bootpath, "/sd@"); - if (p != NULL) { - p += 4; - boot_target = simple_strtoul(p, NULL, 10); - p = strchr(p, ':'); - if (p != NULL) - boot_part = simple_strtoul(p + 1, NULL, 10); - } - } } EXPORT_SYMBOL(note_scsi_host); #endif -#if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC) -static dev_t __init find_ide_boot(void) -{ - char *p; - int n; - dev_t __init pmac_find_ide_boot(char *bootdevice, int n); - - if (bootdevice == NULL) - return 0; - p = strrchr(bootdevice, '/'); - if (p == NULL) - return 0; - n = p - bootdevice; - - return pmac_find_ide_boot(bootdevice, n); -} -#endif /* CONFIG_BLK_DEV_IDE && CONFIG_BLK_DEV_IDE_PMAC */ - -static void __init find_boot_device(void) -{ -#if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC) - boot_dev = find_ide_boot(); -#endif -} - static int initializing = 1; static int pmac_late_init(void) @@ -469,7 +413,6 @@ late_initcall(pmac_late_init); /* can't be __init - can be called whenever a disk is first accessed */ void note_bootable_part(dev_t dev, int part, int goodness) { - static int found_boot = 0; char *p; if (!initializing) @@ -481,15 +424,8 @@ void note_bootable_part(dev_t dev, int part, int goodness) if (p != NULL && (p == boot_command_line || p[-1] == ' ')) return; - if (!found_boot) { - find_boot_device(); - found_boot = 1; - } - if (!boot_dev || dev == boot_dev) { - ROOT_DEV = dev + part; - boot_dev = 0; - current_root_goodness = goodness; - } + ROOT_DEV = dev + part; + current_root_goodness = goodness; } #ifdef CONFIG_ADB_CUDA ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Remove unused old code from powermac setup code
On Thu, 2007-10-04 at 13:47 +1000, Paul Mackerras wrote: > Since bootdevice never gets initialized, it's always NULL, and hence a > whole pile of code in arch/powerpc/platforms/setup.c never gets used. > (This was the code that originally was there so that the automatic > root partition selection mechanism would prefer a rootish-looking > partition on the device that OF loaded the kernel from over a similar > partition on other devices.) > > This removes the unused code. > > Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_spi_init: Support non-QE processors
On Wed, 03 Oct 2007 17:43:50 +0200 Peter Korsgaard <[EMAIL PROTECTED]> wrote: > > @@ -1220,14 +1220,17 @@ int __init fsl_spi_init(struct spi_board_info > *board_infos, > { > struct device_node *np; > unsigned int i; > - const u32 *sysclk; > + const u32 *qe_sysclk = 0, *soc_sysclk = 0; Please use NULL when referring to pointers. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpEy2tRqvvAv.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] Bootwrapper: Enable debug info on boot wrapper
From: Grant Likely <[EMAIL PROTECTED]> Add '-g' to BOOTCFLAGS if CONFIG_DEBUG_INFO is set. Signed-off-by: Grant Likely <[EMAIL PROTECTED]> --- arch/powerpc/boot/Makefile |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index cf80db3..9dfe79b 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -25,6 +25,10 @@ BOOTCFLAGS:= -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -isystem $(shell $(CROSS32CC) -print-file-name=include) BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc +ifdef CONFIG_DEBUG_INFO +BOOTCFLAGS += -g +endif + ifeq ($(call cc-option-yn, -fstack-protector),y) BOOTCFLAGS += -fno-stack-protector endif ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/3] Sysace: sparse fixes
From: Grant Likely <[EMAIL PROTECTED]> Signed-off-by: Grant Likely <[EMAIL PROTECTED]> --- drivers/block/xsysace.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 3847464..5b73471 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -195,7 +195,7 @@ struct ace_device { /* Details of hardware device */ unsigned long physaddr; - void *baseaddr; + void __iomem *baseaddr; int irq; int bus_width; /* 0 := 8 bit; 1 := 16 bit */ struct ace_reg_ops *reg_ops; @@ -227,20 +227,20 @@ struct ace_reg_ops { /* 8 Bit bus width */ static u16 ace_in_8(struct ace_device *ace, int reg) { - void *r = ace->baseaddr + reg; + void __iomem *r = ace->baseaddr + reg; return in_8(r) | (in_8(r + 1) << 8); } static void ace_out_8(struct ace_device *ace, int reg, u16 val) { - void *r = ace->baseaddr + reg; + void __iomem *r = ace->baseaddr + reg; out_8(r, val); out_8(r + 1, val >> 8); } static void ace_datain_8(struct ace_device *ace) { - void *r = ace->baseaddr + 0x40; + void __iomem *r = ace->baseaddr + 0x40; u8 *dst = ace->data_ptr; int i = ACE_FIFO_SIZE; while (i--) @@ -250,7 +250,7 @@ static void ace_datain_8(struct ace_device *ace) static void ace_dataout_8(struct ace_device *ace) { - void *r = ace->baseaddr + 0x40; + void __iomem *r = ace->baseaddr + 0x40; u8 *src = ace->data_ptr; int i = ACE_FIFO_SIZE; while (i--) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/3] Sysace: Minor coding convention fixup
From: Grant Likely <[EMAIL PROTECTED]> Put function call and return code test on separate lines. Signed-off-by: Grant Likely <[EMAIL PROTECTED]> --- drivers/block/xsysace.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 3ea172b..3847464 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -1091,7 +1091,8 @@ ace_alloc(struct device *dev, int id, unsigned long physaddr, ace->bus_width = bus_width; /* Call the setup code */ - if ((rc = ace_setup(ace)) != 0) + rc = ace_setup(ace); + if (rc) goto err_setup; dev_set_drvdata(dev, ace); @@ -1253,11 +1254,13 @@ static int __init ace_init(void) goto err_blk; } - if ((rc = ace_of_register()) != 0) + rc = ace_of_register(); + if (rc) goto err_of; pr_debug("xsysace: registering platform binding\n"); - if ((rc = platform_driver_register(&ace_platform_driver)) != 0) + rc = platform_driver_register(&ace_platform_driver); + if (rc) goto err_plat; pr_info("Xilinx SystemACE device driver, major=%i\n", ace_major); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 3/3] Sysace: Don't enable IRQ until after interrupt handler is registered
From: Grant Likely <[EMAIL PROTECTED]> The previous patch to move the interrupt handler registration moved it below enabling interrupts which could be a problem if the device is on a shared interrupt line. This patch fixes the order. Signed-off-by: Grant Likely <[EMAIL PROTECTED]> --- drivers/block/xsysace.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 5b73471..9e7652d 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -1005,11 +1005,6 @@ static int __devinit ace_setup(struct ace_device *ace) ace_out(ace, ACE_CTRL, ACE_CTRL_FORCECFGMODE | ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ); - /* Enable interrupts */ - val = ace_in(ace, ACE_CTRL); - val |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ; - ace_out(ace, ACE_CTRL, val); - /* Now we can hook up the irq handler */ if (ace->irq != NO_IRQ) { rc = request_irq(ace->irq, ace_interrupt, 0, "systemace", ace); @@ -1020,6 +1015,11 @@ static int __devinit ace_setup(struct ace_device *ace) } } + /* Enable interrupts */ + val = ace_in(ace, ACE_CTRL); + val |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ; + ace_out(ace, ACE_CTRL, val); + /* Print the identification */ dev_info(ace->dev, "Xilinx SystemACE revision %i.%i.%i\n", (version >> 12) & 0xf, (version >> 8) & 0x0f, version & 0xff); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 0/3] Fixups to SystemACE driver
Jens, Here are some more Sysace patches based on comments received on the first series and a run through sparse. Can you please queue them up for 2.6.24? Thanks, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] Fix performance monitor on machines with logical PVR
Some IBM machines supply a "logical" PVR (processor version register) value in the device tree in the cpu nodes rather than the real PVR. This is used for instance to indicate that the processors in a POWER6 partition have been configured by the hypervisor to run in POWER5+ mode rather than POWER6 mode. To cope with this, we call identify_cpu a second time with the logical PVR value (the first call is with the real PVR value in the very early setup code). However, POWER5+ machines can also supply a logical PVR value, and use the same value (the value that indicates a v2.04 architecture compliant processor). This causes problems for code that uses the performance monitor (such as oprofile), because the PMU registers are different in POWER6 (even in POWER5+ mode) from the real POWER5+. This change works around this problem by taking out the PMU information from the cputable entries for the logical PVR values, and changing identify_cpu so that the second call to it won't overwrite the PMU information that was established by the first call (the one with the real PVR), but does update the other fields. So that we can create a mixed cputable entry, we now make cur_cpu_spec point to a single static struct cpu_spec, and copy stuff from cpu_specs[i] into it. This has the side-effect that we can now make cpu_specs[] be initdata. Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index b03a442..8662cf0 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -71,7 +71,7 @@ extern void __restore_cpu_ppc970(void); #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ PPC_FEATURE_BOOKE) -static struct cpu_spec cpu_specs[] = { +static struct cpu_spec __initdata cpu_specs[] = { #ifdef CONFIG_PPC64 { /* Power3 */ .pvr_mask = 0x, @@ -327,14 +327,6 @@ static struct cpu_spec cpu_specs[] = { .cpu_user_features = COMMON_USER_POWER5_PLUS, .icache_bsize = 128, .dcache_bsize = 128, - .num_pmcs = 6, - .pmc_type = PPC_PMC_IBM, - .oprofile_cpu_type = "ppc64/power6", - .oprofile_type = PPC_OPROFILE_POWER4, - .oprofile_mmcra_sihv= POWER6_MMCRA_SIHV, - .oprofile_mmcra_sipr= POWER6_MMCRA_SIPR, - .oprofile_mmcra_clear = POWER6_MMCRA_THRM | - POWER6_MMCRA_OTHER, .platform = "power5+", }, { /* Power6 */ @@ -364,14 +356,6 @@ static struct cpu_spec cpu_specs[] = { .cpu_user_features = COMMON_USER_POWER6, .icache_bsize = 128, .dcache_bsize = 128, - .num_pmcs = 6, - .pmc_type = PPC_PMC_IBM, - .oprofile_cpu_type = "ppc64/power6", - .oprofile_type = PPC_OPROFILE_POWER4, - .oprofile_mmcra_sihv= POWER6_MMCRA_SIHV, - .oprofile_mmcra_sipr= POWER6_MMCRA_SIPR, - .oprofile_mmcra_clear = POWER6_MMCRA_THRM | - POWER6_MMCRA_OTHER, .platform = "power6", }, { /* Cell Broadband Engine */ @@ -1316,18 +1300,37 @@ static struct cpu_spec cpu_specs[] = { #endif /* CONFIG_PPC32 */ }; -struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr) +static struct cpu_spec the_cpu_spec; + +struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) { struct cpu_spec *s = cpu_specs; - struct cpu_spec **cur = &cur_cpu_spec; + struct cpu_spec *t = &the_cpu_spec; int i; s = PTRRELOC(s); - cur = PTRRELOC(cur); + t = PTRRELOC(t); for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) if ((pvr & s->pvr_mask) == s->pvr_value) { - *cur = cpu_specs + i; + /* +* If we are overriding a previous value derived +* from the real PVR with a new value obtained +* using a logical PVR value, don't modify the +* performance monitor fields. +*/ + if (t->num_pmcs && !s->num_pmcs) { + t->cpu_name = s->cpu_name; + t->cpu_features = s->cpu_features; + t->cpu_user_features = s->cpu_user_features; + t->icache_bsize = s->icache_bsize; + t->dcache_bsize = s->dcache_bsize; + t->cpu_setup = s->cpu_setup; + t->cpu
[PATCH] Don't build arch/powerpc/sysdev/dcr.c for ARCH=ppc kernels
From: Grant Likely <[EMAIL PROTECTED]> dcr.c is an arch/powerpc only thing. Signed-off-by: Grant Likely <[EMAIL PROTECTED]> --- Ben/Paulus, As far as I can tell this is correct. Having sysdev/dcr.c in the arch/ppc build spits out warnings. Grep doesn't show anything in arch/ppc that is using it. Cheers, g. arch/powerpc/sysdev/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 592c17e..7f88d4e 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -6,7 +6,6 @@ mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y) obj-$(CONFIG_PPC_MPC106) += grackle.o -obj-$(CONFIG_PPC_DCR) += dcr.o obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o obj-$(CONFIG_PPC_PMI) += pmi.o obj-$(CONFIG_U3_DART) += dart_iommu.o @@ -31,6 +30,7 @@ endif # Temporary hack until we have migrated to asm-powerpc ifeq ($(ARCH),powerpc) +obj-$(CONFIG_PPC_DCR) += dcr.o obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o obj-$(CONFIG_8xx) += mpc8xx_pic.o commproc.o obj-$(CONFIG_UCODE_PATCH) += micropatch.o ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/5] Add initial MPC8610 HPCD Platform files.
On Oct 3, 2007, at 10:41 PM, Stephen Rothwell wrote: > On Wed, 03 Oct 2007 15:09:33 -0500 Jon Loeliger <[EMAIL PROTECTED]> > wrote: >> >> +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > > You should include linux/of.h as well to use the of_ accessor > functions. added. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Fix performance monitor on machines with logical PVR
> This change works around this problem by taking out the PMU > information from the cputable entries for the logical PVR values, and > changing identify_cpu so that the second call to it won't overwrite > the PMU information that was established by the first call (the one > with the real PVR), but does update the other fields. The description could be more precise. Something along the lines of: The second call wlil not override the PMU information if the entry for the logical PVR has a num_pmcs value of 0. That way, we can -still- override them if future processor also implement PMC backwater^H^H^Hrd compat mode via a different virtual PVR. (This is what the code does, it's juse the description that is unclear). Appart from that and pending testing... Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Oh, and another note: I dislike that: + if (t->num_pmcs && !s->num_pmcs) { + t->cpu_name = s->cpu_name; + t->cpu_features = s->cpu_features; + t->cpu_user_features = s->cpu_user_features; + t->icache_bsize = s->icache_bsize; + t->dcache_bsize = s->dcache_bsize; + t->cpu_setup = s->cpu_setup; + t->cpu_restore = s->cpu_restore; + t->platform = s->platform; + } else + *t = *s; That means that we'll easily forget to update this bit of code when we add things to cputable... Thus, it would be best to put all the PMC related bits into a single sub-structure, and rather than doing the above, save it, copy everything, and eventually copy it back over (if it's a pointer it's even easier). Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: dtc: Refactor Makefiles
On Wed, Oct 03, 2007 at 03:59:33PM +1000, David Gibson wrote: > This patch makes a number of Makefile cleanups and improvements: > - We use more generic rules to invoke flex and bison, which is > useful for some of the other changes. > - We use the name dtc-lexer.lex.c for the flex output, instead > of the default lex.yy.c. That means less potential for confusion if > dtc is embedded into other projects (e.g. the kernel). > - We separate out a Makefile.dtc designed for embedding into > other projects, analagous to Makefile.libfdt. > - Makefile.libfdt is cleaned up to be more useful based on > some actual trial runs of embedding libfdt in the kernel bootwrapper. > - Versioning related rules and variables are collected into > one place in the Makefile. Crap. Don't apply, this seems to break the autodependency generation for libfdt. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] FSL: Access PCIe LTSSM register with correct size
The LTSSM register is actual 32-bits wide so we should be doing a dword access. --- arch/powerpc/sysdev/fsl_pci.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) minor cleanup patch diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 98290f4..af090c9 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -160,8 +160,8 @@ static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev) int __init fsl_pcie_check_link(struct pci_controller *hose) { - u16 val; - early_read_config_word(hose, 0, 0, PCIE_LTSSM, &val); + u32 val; + early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val); if (val < PCIE_LTSSM_L0) return 1; return 0; -- 1.5.2.4 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] Use for_each_ matching routinues for pci PHBs
On the Freescale embedded (83xx, 85xx, 86xx) and a few of the discrete bridges (mpc10x, tsi108) use the new for_each_compatible_node() or for_each_node_by_type() to provide more exact matching when looking for PHBs in the device tree. With the previous code it was possible to match on pci bridges since we were only matching on device_type. --- arch/powerpc/platforms/83xx/mpc8313_rdb.c |2 +- arch/powerpc/platforms/83xx/mpc832x_mds.c |2 +- arch/powerpc/platforms/83xx/mpc832x_rdb.c |2 +- arch/powerpc/platforms/83xx/mpc834x_itx.c |2 +- arch/powerpc/platforms/83xx/mpc834x_mds.c |2 +- arch/powerpc/platforms/83xx/mpc836x_mds.c |2 +- arch/powerpc/platforms/85xx/mpc85xx_ads.c |3 ++- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 18 +++--- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 18 +++--- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 14 +++--- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c|3 ++- arch/powerpc/platforms/embedded6xx/linkstation.c |2 +- arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c |2 +- 13 files changed, 45 insertions(+), 27 deletions(-) In my git tree. diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c index 140b46f..33766b8 100644 --- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c @@ -43,7 +43,7 @@ static void __init mpc8313_rdb_setup_arch(void) ppc_md.progress("mpc8313_rdb_setup_arch()", 0); #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") mpc83xx_add_bridge(np); #endif mpc831x_usb_cfg(); diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index d494bc4..b8d8c91 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c @@ -73,7 +73,7 @@ static void __init mpc832x_sys_setup_arch(void) } #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") mpc83xx_add_bridge(np); #endif diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index 24a790c..4da0698 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c @@ -93,7 +93,7 @@ static void __init mpc832x_rdb_setup_arch(void) ppc_md.progress("mpc832x_rdb_setup_arch()", 0); #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") mpc83xx_add_bridge(np); #endif diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 870fd20..aa76819 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c @@ -52,7 +52,7 @@ static void __init mpc834x_itx_setup_arch(void) ppc_md.progress("mpc834x_itx_setup_arch()", 0); #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") mpc83xx_add_bridge(np); #endif diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index a9140b6..00aed7c 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -83,7 +83,7 @@ static void __init mpc834x_mds_setup_arch(void) ppc_md.progress("mpc834x_mds_setup_arch()", 0); #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") mpc83xx_add_bridge(np); #endif diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index db69576..0b18a75 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c @@ -79,7 +79,7 @@ static void __init mpc836x_mds_setup_arch(void) } #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") mpc83xx_add_bridge(np); #endif diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index c22bc1c..acb1ef9 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c @@ -204,8 +204,9 @@ static void __init mpc85xx_ads_setup_arch(void) #endif #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) + for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
Re: dtc: Refactor Makefiles (v2)
On Thu, Oct 04, 2007 at 03:20:53PM +1000, David Gibson wrote: > On Wed, Oct 03, 2007 at 03:59:33PM +1000, David Gibson wrote: > > This patch makes a number of Makefile cleanups and improvements: > > - We use more generic rules to invoke flex and bison, which is > > useful for some of the other changes. > > - We use the name dtc-lexer.lex.c for the flex output, instead > > of the default lex.yy.c. That means less potential for confusion if > > dtc is embedded into other projects (e.g. the kernel). > > - We separate out a Makefile.dtc designed for embedding into > > other projects, analagous to Makefile.libfdt. > > - Makefile.libfdt is cleaned up to be more useful based on > > some actual trial runs of embedding libfdt in the kernel bootwrapper. > > - Versioning related rules and variables are collected into > > one place in the Makefile. > > Crap. Don't apply, this seems to break the autodependency generation > for libfdt. Here's a corrected version. dtc: Refactor Makefiles This patch makes a number of Makefile cleanups and improvements: - We use more generic rules to invoke flex and bison, which is useful for some of the other changes. - We use the name dtc-lexer.lex.c for the flex output, instead of the default lex.yy.c. That means less potential for confusion if dtc is embedded into other projects (e.g. the kernel). - We separate out a Makefile.dtc designed for embedding into other projects, analagous to Makefile.libfdt. - Makefile.libfdt is cleaned up to be more useful based on some actual trial runs of embedding libfdt in the kernel bootwrapper. - Versioning related rules and variables are collected into one place in the Makefile. Signed-off-by: David Gibson <[EMAIL PROTECTED]> Index: dtc/Makefile === --- dtc.orig/Makefile 2007-10-04 15:20:48.0 +1000 +++ dtc/Makefile2007-10-04 15:34:02.0 +1000 @@ -15,40 +15,12 @@ EXTRAVERSION = LOCAL_VERSION = CONFIG_LOCALVERSION = -DTC_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -VERSION_FILE = version_gen.h - -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ - else if [ -x /bin/bash ]; then echo /bin/bash; \ - else echo sh; fi ; fi) - -nullstring := -space := $(nullstring) # end of line - -localver_config = $(subst $(space),, $(string) \ - $(patsubst "%",%,$(CONFIG_LOCALVERSION))) - -localver_cmd = $(subst $(space),, $(string) \ - $(patsubst "%",%,$(LOCALVERSION))) - -localver_scm = $(shell $(CONFIG_SHELL) ./scripts/setlocalversion) -localver_full = $(localver_config)$(localver_cmd)$(localver_scm) - -dtc_version = $(DTC_VERSION)$(localver_full) - -# -# Contents of the generated version file. -# -define filechk_version - (echo "#define DTC_VERSION \"DTC $(dtc_version)\""; ) -endef - - CPPFLAGS = -I libfdt CFLAGS = -Wall -g -Os LDFLAGS = -Llibfdt BISON = bison +LEX = flex INSTALL = /usr/bin/install DESTDIR = @@ -77,52 +49,107 @@ endif all: dtc ftdump libfdt tests +install: all + @$(VECHO) INSTALL + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) -m 755 dtc $(DESTDIR)$(BINDIR) + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) -m 644 $(LIBFDT_LIB) $(DESTDIR)$(LIBDIR) + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) + $(INSTALL) -m 644 $(LIBFDT_INCLUDES) $(DESTDIR)$(INCLUDEDIR) + # -# Rules for dtc proper +# Rules for versioning # -DTC_PROGS = dtc ftdump -DTC_OBJS = dtc.o flattree.o fstree.o data.o livetree.o \ - srcpos.o treesource.o \ - dtc-parser.tab.o lex.yy.o -DTC_DEPFILES = $(DTC_OBJS:%.o=%.d) -BIN += dtc ftdump +DTC_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) +VERSION_FILE = version_gen.h -dtc-parser.tab.c dtc-parser.tab.h dtc-parser.output: dtc-parser.y - @$(VECHO) BISON $@ - @$(VECHO) Expect 2 s/r and 2 r/r. - $(BISON) -d $< +CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ + else if [ -x /bin/bash ]; then echo /bin/bash; \ + else echo sh; fi ; fi) + +nullstring := +space := $(nullstring) # end of line + +localver_config = $(subst $(space),, $(string) \ + $(patsubst "%",%,$(CONFIG_LOCALVERSION))) + +localver_cmd = $(subst $(space),, $(string) \ + $(patsubst "%",%,$(LOCALVERSION))) + +localver_scm = $(shell $(CONFIG_SHELL) ./scripts/setlocalversion) +localver_full = $(localver_config)$(localver_cmd)$(localver_scm) + +dtc_version = $(DTC_VERSION)$(localver_full) + +# Contents of the generated version file. +define filechk_version + (echo "#define DTC_VERSION \"DTC $(dtc_version)\""; ) +endef + +define filechk + set -e; \ + echo ' CHK $@';\ + mkdir -p $(dir $@); \ + $(filechk_$(1
[PATCH 0/4] Cell EDAC driver and dependencies
This is a serie of 4 patches. The first two should be applied via the powerpc tree and the second via the bluesmoke tree. The later do depend on the former so the new driver won't compile until the former has been merged in case bluesmoke is pulled first but that shoudn't be a big issue. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/4] powerpc: Move cbe_regs.h to include/asm-powerpc/cell-regs.h
The new Cell EDAC driver needs that file, oprofile also does ugly path tricks to get to it, it's time to move it to asm-powerpc. While at it, rename it to be consistent with cell-pmu.h (and dashes look nicer than underscores anyway). Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- arch/powerpc/oprofile/cell/pr_util.h|3 arch/powerpc/oprofile/op_model_cell.c |2 arch/powerpc/platforms/cell/cbe_cpufreq.c |2 arch/powerpc/platforms/cell/cbe_cpufreq_pervasive.c |2 arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c |2 arch/powerpc/platforms/cell/cbe_regs.c |3 arch/powerpc/platforms/cell/cbe_regs.h | 271 arch/powerpc/platforms/cell/cbe_thermal.c |2 arch/powerpc/platforms/cell/interrupt.c |2 arch/powerpc/platforms/cell/iommu.c |2 arch/powerpc/platforms/cell/pervasive.c |2 arch/powerpc/platforms/cell/pmu.c |2 arch/powerpc/platforms/cell/ras.c |2 arch/powerpc/platforms/cell/setup.c |2 include/asm-powerpc/cell-regs.h | 271 15 files changed, 284 insertions(+), 286 deletions(-) Index: linux-work/arch/powerpc/platforms/cell/cbe_regs.h === --- linux-work.orig/arch/powerpc/platforms/cell/cbe_regs.h 2007-10-04 15:15:21.0 +1000 +++ /dev/null 1970-01-01 00:00:00.0 + @@ -1,271 +0,0 @@ -/* - * cbe_regs.h - * - * This file is intended to hold the various register definitions for CBE - * on-chip system devices (memory controller, IO controller, etc...) - * - * (C) Copyright IBM Corporation 2001,2006 - * - * Authors: Maximino Aguilar ([EMAIL PROTECTED]) - * David J. Erb ([EMAIL PROTECTED]) - * - * (c) 2006 Benjamin Herrenschmidt <[EMAIL PROTECTED]>, IBM Corp. - */ - -#ifndef CBE_REGS_H -#define CBE_REGS_H - -#include - -/* - * - * Some HID register definitions - * - */ - -/* CBE specific HID0 bits */ -#define HID0_CBE_THERM_WAKEUP 0x0200ul -#define HID0_CBE_SYSERR_WAKEUP 0x0080ul -#define HID0_CBE_THERM_INT_EN 0x0004ul -#define HID0_CBE_SYSERR_INT_EN 0x0002ul - -#define MAX_CBE2 - -/* - * - * Pervasive unit register definitions - * - */ - -union spe_reg { - u64 val; - u8 spe[8]; -}; - -union ppe_spe_reg { - u64 val; - struct { - u32 ppe; - u32 spe; - }; -}; - - -struct cbe_pmd_regs { - /* Debug Bus Control */ - u64 pad_0x; /* 0x */ - - u64 group_control; /* 0x0008 */ - - u8 pad_0x0010_0x00a8 [0x00a8 - 0x0010];/* 0x0010 */ - - u64 debug_bus_control; /* 0x00a8 */ - - u8 pad_0x00b0_0x0100 [0x0100 - 0x00b0];/* 0x00b0 */ - - u64 trace_aux_data; /* 0x0100 */ - u64 trace_buffer_0_63; /* 0x0108 */ - u64 trace_buffer_64_127;/* 0x0110 */ - u64 trace_address; /* 0x0118 */ - u64 ext_tr_timer; /* 0x0120 */ - - u8 pad_0x0128_0x0400 [0x0400 - 0x0128];/* 0x0128 */ - - /* Performance Monitor */ - u64 pm_status; /* 0x0400 */ - u64 pm_control; /* 0x0408 */ - u64 pm_interval;/* 0x0410 */ - u64 pm_ctr[4]; /* 0x0418 */ - u64 pm_start_stop; /* 0x0438 */ - u64 pm07_control[8];/* 0x0440 */ - - u8 pad_0x0480_0x0800 [0x0800 - 0x0480];/* 0x0480 */ - - /* Thermal Sensor Registers */ - union spe_reg ts_ctsr1; /* 0x0800 */ - u64 ts_ctsr2; /* 0x0808 */ - union spe_reg ts_mtsr1; /* 0x0810 */ - u64 ts_mtsr2; /* 0x0818 */ - union spe_reg ts_itr1;/* 0x0820 */ - u64 ts_itr2;/* 0x0828 */ - u64 ts_gitr;/* 0x0830 */ - u64 ts_isr; /* 0x0838 */ - u64 ts_imr; /* 0x0840 */ - union spe_reg tm_cr1; /* 0x0848 */ - u64 tm_cr2; /* 0
[PATCH 2/4] powerpc: Add Cell memory controller register defs and expose it
This adds definitions for the Cell memory controller registers (at least some of them) for use by the EDAC driver for ECC error reporting. It also expose the said MIC as a platform device that can be used by the EDAC driver to match on. Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- arch/powerpc/platforms/cell/setup.c | 10 +++ include/asm-powerpc/cell-regs.h | 48 ++-- 2 files changed, 56 insertions(+), 2 deletions(-) Index: linux-work/include/asm-powerpc/cell-regs.h === --- linux-work.orig/include/asm-powerpc/cell-regs.h 2007-10-04 15:15:23.0 +1000 +++ linux-work/include/asm-powerpc/cell-regs.h 2007-10-04 15:33:06.0 +1000 @@ -244,16 +244,60 @@ struct cbe_mic_tm_regs { u64 slow_fast_timer_0; /* 0x0090 */ u64 slow_next_timer_0; /* 0x0098 */ - u8 pad_0x00a0_0x01c0[0x01c0 - 0x0a0]; /* 0x00a0 */ + u8 pad_0x00a0_0x00f8[0x00f8 - 0x00a0]; /* 0x00a0 */ + u64 mic_df_ecc_address_0; /* 0x00f8 */ + + u8 pad_0x0100_0x01b8[0x01b8 - 0x0100]; /* 0x0100 */ + u64 mic_df_ecc_address_1; /* 0x01b8 */ u64 mic_ctl_cnfg_1; /* 0x01c0 */ #define CBE_MIC_DISABLE_PWR_SAV_1 0x8000LL + u64 pad_0x01c8; /* 0x01c8 */ u64 slow_fast_timer_1; /* 0x01d0 */ u64 slow_next_timer_1; /* 0x01d8 */ - u8 pad_0x01e0_0x1000[0x1000 - 0x01e0]; /* 0x01e0 */ + u8 pad_0x01e0_0x0208[0x0208 - 0x01e0]; /* 0x01e0 */ + u64 mic_exc;/* 0x0208 */ +#define CBE_MIC_EXC_BLOCK_SCRUB0x0800ULL +#define CBE_MIC_EXC_FAST_SCRUB 0x0100ULL + + u64 mic_mnt_cfg;/* 0x0210 */ +#define CBE_MIC_MNT_CFG_CHAN_0_POP 0x0002ULL +#define CBE_MIC_MNT_CFG_CHAN_1_POP 0x0004ULL + + u64 mic_df_config; /* 0x0218 */ +#define CBE_MIC_ECC_DISABLE_0 0x4000ULL +#define CBE_MIC_ECC_REP_SINGLE_0 0x2000ULL +#define CBE_MIC_ECC_DISABLE_1 0x0080ULL +#define CBE_MIC_ECC_REP_SINGLE_1 0x0040ULL + + u8 pad_0x0220_0x0230[0x0230 - 0x0220]; /* 0x0220 */ + u64 mic_fir;/* 0x0230 */ +#define CBE_MIC_FIR_ECC_SINGLE_0_ERR 0x0200ULL +#define CBE_MIC_FIR_ECC_MULTI_0_ERR0x0100ULL +#define CBE_MIC_FIR_ECC_SINGLE_1_ERR 0x0080ULL +#define CBE_MIC_FIR_ECC_MULTI_1_ERR0x0040ULL +#define CBE_MIC_FIR_ECC_ERR_MASK 0xULL +#define CBE_MIC_FIR_ECC_SINGLE_0_CTE 0x0200ULL +#define CBE_MIC_FIR_ECC_MULTI_0_CTE0x0100ULL +#define CBE_MIC_FIR_ECC_SINGLE_1_CTE 0x0080ULL +#define CBE_MIC_FIR_ECC_MULTI_1_CTE0x0040ULL +#define CBE_MIC_FIR_ECC_CTE_MASK 0xULL +#define CBE_MIC_FIR_ECC_SINGLE_0_RESET 0x0200ULL +#define CBE_MIC_FIR_ECC_MULTI_0_RESET 0x0100ULL +#define CBE_MIC_FIR_ECC_SINGLE_1_RESET 0x0080ULL +#define CBE_MIC_FIR_ECC_MULTI_1_RESET 0x0040ULL +#define CBE_MIC_FIR_ECC_RESET_MASK 0xULL +#define CBE_MIC_FIR_ECC_SINGLE_0_SET 0x0200ULL +#define CBE_MIC_FIR_ECC_MULTI_0_SET0x0100ULL +#define CBE_MIC_FIR_ECC_SINGLE_1_SET 0x0080ULL +#define CBE_MIC_FIR_ECC_MULTI_1_SET0x0040ULL +#define CBE_MIC_FIR_ECC_SET_MASK 0xULL + u64 mic_fir_debug; /* 0x0238 */ + + u8 pad_0x0240_0x1000[0x1000 - 0x0240]; /* 0x0240 */ }; extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np); Index: linux-work/arch/powerpc/platforms/cell/setup.c === --- linux-work.orig/arch/powerpc/platforms/cell/setup.c 2007-10-04 15:15:23.0 +1000 +++ linux-work/arch/powerpc/platforms/cell/setup.c 2007-10-04 15:33:06.0 +1000 @@ -83,12 +83,22 @@ static void cell_progress(char *s, unsig static int __init cell_publish_devices(void) { + int node; + if (!machine_is(cell)) return 0; /* Publish OF platform devices for southbridge IOs */ of_platform_bus_probe(NULL, NULL, NULL); + /* There is no device for the MIC memory controller, thus we create +* a platform de
[PATCH 3/4] edac: Add Cell XDR memory definition
This patch adds the definitions for the Rambus XDR memory type used by the Cell processor. It's a pre-requisite for the followup Cell EDAC patch. Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- drivers/edac/edac_core.h |2 ++ drivers/edac/edac_mc_sysfs.c |3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) Index: linux-work/drivers/edac/edac_core.h === --- linux-work.orig/drivers/edac/edac_core.h2007-10-04 15:00:16.0 +1000 +++ linux-work/drivers/edac/edac_core.h 2007-10-04 15:34:20.0 +1000 @@ -138,6 +138,7 @@ enum mem_type { MEM_DDR2, /* DDR2 RAM */ MEM_FB_DDR2,/* fully buffered DDR2 */ MEM_RDDR2, /* Registered DDR2 RAM */ + MEM_XDR,/* Rambus XDR */ }; #define MEM_FLAG_EMPTY BIT(MEM_EMPTY) @@ -154,6 +155,7 @@ enum mem_type { #define MEM_FLAG_DDR2 BIT(MEM_DDR2) #define MEM_FLAG_FB_DDR2BIT(MEM_FB_DDR2) #define MEM_FLAG_RDDR2 BIT(MEM_RDDR2) +#define MEM_FLAG_XDRBIT(MEM_XDR) /* chipset Error Detection and Correction capabilities and mode */ enum edac_type { Index: linux-work/drivers/edac/edac_mc_sysfs.c === --- linux-work.orig/drivers/edac/edac_mc_sysfs.c2007-10-04 15:00:16.0 +1000 +++ linux-work/drivers/edac/edac_mc_sysfs.c 2007-10-04 15:34:26.0 +1000 @@ -73,7 +73,8 @@ static const char *mem_types[] = { [MEM_RMBS] = "RMBS", [MEM_DDR2] = "Unbuffered-DDR2", [MEM_FB_DDR2] = "FullyBuffered-DDR2", - [MEM_RDDR2] = "Registered-DDR2" + [MEM_RDDR2] = "Registered-DDR2", + [MEM_XDR] = "XDR" }; static const char *dev_types[] = { ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 4/4] edac: Add Cell memory controller
Adds driver for the Cell memory controller when used without a Hypervisor such as on the IBM Cell blades. There might still be some improvements to do to this such as finding if it's possible to properly obtain more details about the address of the error but it's good enough already to report CE counts which is our main priority at the moment. Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- device_initcall(cell_publish_devices); drivers/edac/Kconfig |7 + drivers/edac/Makefile|1 drivers/edac/cell-edac.c | 258 +++ 3 files changed, 266 insertions(+) Index: linux-work/drivers/edac/Kconfig === --- linux-work.orig/drivers/edac/Kconfig2007-10-04 15:00:11.0 +1000 +++ linux-work/drivers/edac/Kconfig 2007-10-04 15:34:32.0 +1000 @@ -131,5 +131,12 @@ config EDAC_PASEMI Support for error detection and correction on PA Semi PWRficient. +config EDAC_CELL + tristate "Cell Broadband Engine memory controller" + depends on EDAC_MM_EDAC && PPC_CELL_NATIVE + help + Support for error detection and correction on the + Cell Broadband Engine internal memory controller + on platform without a hypervisor endif # EDAC Index: linux-work/drivers/edac/Makefile === --- linux-work.orig/drivers/edac/Makefile 2007-10-04 15:00:11.0 +1000 +++ linux-work/drivers/edac/Makefile2007-10-04 15:34:32.0 +1000 @@ -28,4 +28,5 @@ obj-$(CONFIG_EDAC_I3000) += i3000_edac. obj-$(CONFIG_EDAC_I82860) += i82860_edac.o obj-$(CONFIG_EDAC_R82600) += r82600_edac.o obj-$(CONFIG_EDAC_PASEMI) += pasemi_edac.o +obj-$(CONFIG_EDAC_CELL)+= cell-edac.o Index: linux-work/drivers/edac/cell-edac.c === --- /dev/null 1970-01-01 00:00:00.0 + +++ linux-work/drivers/edac/cell-edac.c 2007-10-04 15:34:46.0 +1000 @@ -0,0 +1,258 @@ +/* + * Cell MIC driver for ECC counting + * + * Copyright 2007 Benjamin Herrenschmidt, IBM Corp. + *<[EMAIL PROTECTED]> + * + * This file may be distributed under the terms of the + * GNU General Public License. + */ +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include + +#include "edac_core.h" + +struct cell_edac_priv +{ + struct cbe_mic_tm_regs __iomem *regs; + int node; + int chanmask; +#ifdef DEBUG + u64 prev_fir; +#endif +}; + +static void cell_edac_count_ce(struct mem_ctl_info *mci, int chan, u64 ar) +{ + struct cell_edac_priv *priv = mci->pvt_info; + struct csrow_info *csrow = &mci->csrows[0]; + unsigned long address, pfn, offset; + + dev_dbg(mci->dev, "ECC CE err on node %d, channel %d, ar = 0x%016lx\n", + priv->node, chan, ar); + + /* Address decoding is likely a bit bogus, to dbl check */ + address = (ar & 0xe000ul) >> 29; + if (priv->chanmask == 0x3) + address = (address << 1) | chan; + pfn = address >> PAGE_SHIFT; + offset = address & ~PAGE_MASK; + + /* TODO: Decoding of the error addresss */ + edac_mc_handle_ce(mci, csrow->first_page + pfn, offset, + 0, 0, chan, ""); +} + +static void cell_edac_count_ue(struct mem_ctl_info *mci, int chan, u64 ar) +{ + struct cell_edac_priv *priv = mci->pvt_info; + struct csrow_info *csrow = &mci->csrows[0]; + unsigned long address, pfn, offset; + + dev_dbg(mci->dev, "ECC UE err on node %d, channel %d, ar = 0x%016lx\n", + priv->node, chan, ar); + + /* Address decoding is likely a bit bogus, to dbl check */ + address = (ar & 0xe000ul) >> 29; + if (priv->chanmask == 0x3) + address = (address << 1) | chan; + pfn = address >> PAGE_SHIFT; + offset = address & ~PAGE_MASK; + + /* TODO: Decoding of the error addresss */ + edac_mc_handle_ue(mci, csrow->first_page + pfn, offset, 0, ""); +} + +static void cell_edac_check(struct mem_ctl_info *mci) +{ + struct cell_edac_priv *priv = mci->pvt_info; + u64 fir, addreg, clear = 0; + + fir = in_be64(&priv->regs->mic_fir); +#ifdef DEBUG + if (fir != priv->prev_fir) { + dev_dbg(mci->dev, "fir change : 0x%016lx\n", fir); + priv->prev_fir = fir; + } +#endif + if ((priv->chanmask & 0x1) && (fir & CBE_MIC_FIR_ECC_SINGLE_0_ERR)) { + addreg = in_be64(&priv->regs->mic_df_ecc_address_0); + cl
[PATCH] [POWERPC] 85xx/86xx: refactor RSTCR reset code
On the majority of 85xx & 86xx we have a register that's ability to assert HRESET_REQ to reset the board. We refactored that code so it can be shared between both platforms into fsl_soc.c and removed all the duplication in each platform directory. --- arch/powerpc/boot/dts/mpc8641_hpcn.dts |6 +++ arch/powerpc/platforms/85xx/Makefile |1 - arch/powerpc/platforms/85xx/misc.c | 55 arch/powerpc/platforms/85xx/mpc85xx.h | 17 - arch/powerpc/platforms/85xx/mpc85xx_ads.c |3 +- arch/powerpc/platforms/85xx/mpc85xx_cds.c |5 +-- arch/powerpc/platforms/85xx/mpc85xx_ds.c |5 +-- arch/powerpc/platforms/85xx/mpc85xx_mds.c |4 +-- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 19 +- arch/powerpc/platforms/86xx/mpc8641_hpcn.h | 21 --- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 20 +-- arch/powerpc/sysdev/fsl_soc.c | 38 +++ arch/powerpc/sysdev/fsl_soc.h |1 + 13 files changed, 53 insertions(+), 142 deletions(-) delete mode 100644 arch/powerpc/platforms/85xx/misc.c delete mode 100644 arch/powerpc/platforms/85xx/mpc85xx.h delete mode 100644 arch/powerpc/platforms/86xx/mpc8641_hpcn.h Some code reduction for once :) diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts index f797662..3677659 100644 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts @@ -214,6 +214,12 @@ device_type = "open-pic"; big-endian; }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8641-guts"; + reg = ; + fsl,has-rstcr; + }; }; [EMAIL PROTECTED] { diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 25bd9e2..5eca920 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -1,7 +1,6 @@ # # Makefile for the PowerPC 85xx linux kernel. # -obj-$(CONFIG_PPC_85xx) += misc.o obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c deleted file mode 100644 index 4fe376e..000 --- a/arch/powerpc/platforms/85xx/misc.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * MPC85xx generic code. - * - * Maintained by Kumar Gala (see MAINTAINERS for contact information) - * - * Copyright 2005 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 -#include -#include -#include -#include -#include - -static __be32 __iomem *rstcr; - -extern void abort(void); - -static int __init mpc85xx_rstcr(void) -{ - struct device_node *np; - np = of_find_node_by_name(NULL, "global-utilities"); - if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) { - const u32 *prop = of_get_property(np, "reg", NULL); - if (prop) { - /* map reset control register -* 0xE00B0 is offset of reset control register -*/ - rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff); - if (!rstcr) - printk (KERN_EMERG "Error: reset control " - "register not mapped!\n"); - } - } else - printk (KERN_INFO "rstcr compatible register does not exist!\n"); - if (np) - of_node_put(np); - return 0; -} - -arch_initcall(mpc85xx_rstcr); - -void mpc85xx_restart(char *cmd) -{ - local_irq_disable(); - if (rstcr) - /* set reset control register */ - out_be32(rstcr, 0x2); /* HRESET_REQ */ - abort(); -} diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h deleted file mode 100644 index 5b34dee..000 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * arch/powerpc/platforms/85xx/mpc85xx.h - * - * MPC85xx soc definitions/function decls - * - * Maintainer: Kumar Gala <[EMAIL PROTECTED]> - * - * Copyright 2005 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. - * - */ - -extern void mpc85xx_restart(char *); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arc
Re: [PATCH 0/3] Fixups to SystemACE driver
On Wed, Oct 03 2007, Grant Likely wrote: > Jens, > > Here are some more Sysace patches based on comments received on the > first series and a run through sparse. Can you please queue them up > for 2.6.24? Applied all 3, looked fine to me. -- Jens Axboe ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev