Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
* Michael Ellerman <[EMAIL PROTECTED]> [2008-01-18 16:44:58]: > > This fixes it, although I'm a little worried about some of the > removals/movings of node_set_online() in the patch. > > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index 1666e7d..dcedc26 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -49,7 +49,6 @@ static int __cpuinit fake_numa_create_new_node(unsigned > long end_pfn, > static unsigned int fake_nid = 0; > static unsigned long long curr_boundary = 0; > > - *nid = fake_nid; > if (!p) > return 0; > > @@ -60,6 +59,7 @@ static int __cpuinit fake_numa_create_new_node(unsigned > long end_pfn, > if (mem < curr_boundary) > return 0; > > + *nid = fake_nid; > curr_boundary = mem; > > if ((end_pfn << PAGE_SHIFT) > mem) { > Hi, Michael, Here's a better and more complete fix for the problem. Could you please see if it works for you? I tested it on a real NUMA box and it seemed to work fine there. Description --- This patch provides a fix for the problem found by Michael Ellerman <[EMAIL PROTECTED]> while using fake NUMA nodes on a cell box. The code modifies node id iff (as in if and only if) fake NUMA nodes are created. Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- arch/powerpc/mm/numa.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -puN arch/powerpc/mm/numa.c~fix-fake-numa-nid-on-numa arch/powerpc/mm/numa.c --- linux-2.6.24-rc8/arch/powerpc/mm/numa.c~fix-fake-numa-nid-on-numa 2008-01-26 12:20:29.0 +0530 +++ linux-2.6.24-rc8-balbir/arch/powerpc/mm/numa.c 2008-01-26 12:27:53.0 +0530 @@ -49,7 +49,12 @@ static int __cpuinit fake_numa_create_ne static unsigned int fake_nid = 0; static unsigned long long curr_boundary = 0; - *nid = fake_nid; + /* +* If we did enable fake nodes and cross a node, +* remember the last node and start from there. +*/ + if (fake_nid) + *nid = fake_nid; if (!p) return 0; _ -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] FIXED_MII_100_FDX
On the last git pull, FIXED_MII_100_FDX was removed from the phy Kconfig, but the Kconfig for CPMAC still tried to select it. Cheers, Sean Signed-off-by: Sean MacLennan <[EMAIL PROTECTED]> --- diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 9af05a2..297a4b5 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -1710,7 +1710,6 @@ config CPMAC depends on NET_ETHERNET && EXPERIMENTAL && AR7 select PHYLIB select FIXED_PHY - select FIXED_MII_100_FDX help TI AR7 CPMAC Ethernet support ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Patches added to for-2.6.25/master branches of powerpc.git
This includes commits pulled from Josh Boyer, Kumar Gala, Grant Likely, and Olof Johansson. I reverted the "Fake NUMA emulation for PowerPC" commit because it changed behaviour even when the fake numa command-line option wasn't given. I'll be asking Linus to pull within the next few days, so please remind me about anything else that should go in 2.6.25. Paul. Anton Vorontsov (4): libata: pata_platform: make probe and remove functions device type neutral libata: pata_of_platform: OF-Platform PATA device driver [POWERPC] booting-without-of: localbus should not include board name [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes Becky Bruce (1): [POWERPC] Fixup use of phys_addr_t in mpic code Benjamin Herrenschmidt (20): [POWERPC] Reworking machine check handling and Fix 440/440A [POWERPC] 4xx: Improve support for 4xx indirect DCRs [POWERPC] 4xx: PLB to PCI-X support [POWERPC] 4xx: PLB to PCI 2.x support [POWERPC] 4xx: PLB to PCI Express support [POWERPC] 4xx: PCI support for Ebony board [POWERPC] 4xx: Add early udbg support for 40x processors [POWERPC] 4xx: EP405 boards support for arch/powerpc [POWERPC] 4xx: Add PCI to Walnut platform [POWERPC] 4xx: Wire up PCI on Bamboo board [POWERPC] 4xx: Wire up 440EP USB controller support to Bamboo board [POWERPC] 4xx: Adds decoding of 440SPE memory size to boot wrapper library [POWERPC] 4xx: Add mfspr/mtspr inline macros to 4xx bootwrapper [POWERPC] 4xx: Add CPR0 accessors to boot wrapper [POWERPC] 4xx: Rework clock probing in boot wrapper [POWERPC] 4xx: Base support for 440SPe "Katmai" eval board [POWERPC] 4xx: remove bogus "ranges" property in Bamboo EBC node [POWERPC] 4xx: PCI-E Link setup improvements [POWERPC] pci32: 4xx embedded platforms want to reassign all PCI resources [POWERPC] Always hookup PHB IO resource even when empty Cyrill Gorcunov (3): [POWERPC] Use for_each macros in arch/powerpc/sysdev [POWERPC] Use for_each macros in arch/powerpc/kernel [POWERPC] Use for_each macros in arch/powerpc/platforms/powermac Dale Farnsworth (1): [POWERPC] 85xx: Respect KERNELBASE, PAGE_OFFSET, and PHYSICAL_START on e500 David Gibson (1): [POWERPC] Enable RTC for Ebony and Walnut (v2) Geert Uytterhoeven (10): [POWERPC] Kill sparse warning in HPTE_V_COMPARE() [POWERPC] PS3: Make bus_id and dev_id u64 [POWERPC] PS3: Add ps3_repository_find_device_by_id() [POWERPC] PS3: Use the HVs storage device notification mechanism properly [POWERPC] PS3: Add repository polling loop to work around timing bug [POWERPC] PS3: Kill unused ps3_repository_bump_device() [POWERPC] PS3: Refactor ps3_repository_find_device() [POWERPC] PS3: Checkpatch cleanups for drivers/ps3/ps3-sys-manager.c [POWERPC] PS3: Checkpatch cleanups for drivers/ps3/ps3-vuart.c [POWERPC] PS3: Checkpatch cleanups for arch/powerpc/platforms/ps3/repository.c Geoff Levand (5): [POWERPC] Add definition of Cell bookmark SPR [POWERPC] PS3: Add logical performance monitor device support [POWERPC] PS3: Vuart: change semaphore to mutex [POWERPC] PS3: Remove lpar address workaround [POWERPC] PS3: Update ps3_defconfig Grant Likely (8): [POWERPC] 4xx: typo in calling machine_device_initcall() for Sequoia board [POWERPC] pasemi: Use machine_*_initcall() hooks in platform code [POWERPC] Add of_find_matching_node() helper function [POWERPC] powermac: Use machine_*_initcall() hooks in platform code [POWERPC] cell: Use machine_*_initcall() hooks in platform code [POWERPC] mpc5200: eliminate mpc52xx_*_map_*() functions. [POWERPC] mpc5200: merge defconfigs for all mpc5200 boards [POWERPC] 8xx: Use machine_*_initcall() hooks in platform code Hollis Blanchard (1): [POWERPC] 4xx: enable built-in networking for Sequoia defconfig Hugh Blemings (1): [POWERPC] 4xx: Base support for 440GX Taishan eval board Jochen Friedrich (2): [POWERPC] Update .gitignore files fs_enet: Add fixed-phy support for fs_enet John Rigby (4): [POWERPC] Separate MPC52xx PSC FIFO registers from rest of PSC [POWERPC] mpc5200: Cleanup checkpatch.pl problems in mpc52xx_uart.c [POWERPC] Add support for mpc512x interrupts to ipic [POWERPC] Add IPIC Kconfig option Jon Loeliger (5): [POWERPC] Use and not variants. [POWERPC] Add _nmask_and_or_msr() declartion to asm-powerpc/system.h [POWERPC] Add StorCenter DTS first draft. [POWERPC] Add initial iomega StorCenter board port. [POWERPC] Add initial storcenter config file. Jon Tollefson (1): [POWERPC] Add hugepagesz boot-time parameter Joseph Fannin (1): [POWERPC] Export copy_page() on 32bit Josh Boyer (11): [POWERPC] 4xx: Fix 440grx setup function to call 440A fixup [POWERPC] 4xx: Includ
Re: xsysace.c oops on restart
On 1/25/08, Jean-Samuel Chenard <[EMAIL PROTECTED]> wrote: > Hi Grant, > > I'm writing this e-mail directly to you before posting in the > discussion forums because I found some issues with the xsysace.c > driver. You are listed as the main author of the driver, so I'm > assuming you might have a better clue than me as to what is happening. Feel free to post to the mailing list regardless. It's better to have a public record of our discussions. I certainly have no problem with you pointing out issues with that driver in public. :-) > > When I built kernel 2.6.23.9 or the latest from your git tree, if I > use the new system ACE driver that you wrote, I cannot reboot without > a Oops in the kernel. The message happens very late before the CPU is > supposed to reboot. If I compile the kernel with the old Xilinx > driver, I don't get the oops on restart. Yeah; that definitely sounds like a driver bug. > Below are the details of the exception. > > The system is going down NOW! > Sending SIGTERM to all processes > Requesting system reboot > [172545.229120] Restarting system. > [172545.232346] > [172545.234663] Oops: Exception in kernel mode, sig: 8 [#1] > [172545.239960] NIP: c7cb7e00 LR: c7cb7df0 CTR: 0001 > [172545.245003] REGS: c7cb7d40 TRAP: 2007df0 Not tainted > (2.6.23.9-jsc-vanilla) > [172545.252291] MSR: <> CR: 0010 XER: 000a00d2 > [172545.257773] TASK = c02fb430[136] 'init' THREAD: c7cb6000 > [172545.262976] GPR00: 3c303e5b 31373235 34352e32 32393132 305d2000 > 7fa41efc > [172545.271442] GPR08: fee1dead 28121969 c7cb7df0 > c0016350 > [172545.279902] GPR16: 0001 c017 c019a464 c000b1f0 > 00607b83 > [172545.288368] GPR24: 0002d030 0001 > c0024ccc > [172545.296999] NIP [c7cb7e00] 0xc7cb7e00 > [172545.300747] LR [c7cb7df0] 0xc7cb7df0 > [172545.304400] Call Trace: > [172545.306925] Instruction dump: > [172545.309965] > > [172545.317781] > This traceback doesn't help much without knowing where 0xc7cb7e00 is in your kernel image. You could use gdb on the vmlinux image to figure it out, but it would be simpler to enable CONFIG_DEBUG_BUGVERBOSE and CONFIG_DEBUG_INFO and run it again. That should give you a more meaningful traceback. I've also got a rework patch for the sysace drive which makes it a bit more robust. I'll post it to the list shortly. > The only modification I had to make in the xsysace.c to make it work > on my ML-310 is change the width of the systemACE bus: > @@ -1126,7 +1127,7 @@ static void __devexit ace_free(struct device *dev) > static int __devinit ace_probe(struct platform_device *dev) > { > unsigned long physaddr = 0; > - int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded > */ > + int bus_width = ACE_BUS_WIDTH_8; /* FIXME: should not be hard coded */ > int id = dev->id; > int irq = NO_IRQ; > int i; > > I would prefer to use the new systemACE driver because it seems to be > faster (and the code is cleaner), but this oops on restart prevents me > from doing a lot of work remotely since I need to press the reset > button on my board. I get this error on both my ML-310 board and the > BEE2 machine I have at school. I guess I could investigate a bit more > by building the systemACE as a module and trying to load and unload it > to see if I can make it crash. It may not even be related to that > driver, but if I change to the older driver, I never get this problem. > Every time I use the new driver, the problem shows up and this is the > only setting that I change in the kernel. All the time, I have the > driver built into the kernel (not as a loadable module). > > Also, thanks to your Wiki pages and discussions in the linux-ppc > groups, I managed to get my BEE2 to boot Linux 2.6 with all the > goodies. This is basically the only leftover issue with my system. > > Let me know if you have some insights as why this could happen. I can > see if other people have seen a similar problem in the discussion > forums. > > Regards, > > Jean-Samuel > -- > Ph.D. candidate > Integrated Microsystems Laboratory > McGill University, Montréal, QC, CANADA > Web Page: http://chaos.ece.mcgill.ca > -- 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
i2c-ibm_iic.c fix
If anybody is following this patch it needs to be updated. It was recommended that the device_type be removed from the dts files. But the table matches the type, so I changed the table to only match the compatibility. I can give people a full blown patch if they want it. But basically the table should look like follows: static const struct of_device_id ibm_iic_match[] = { { .compatible = "ibm,iic-405ex", }, { .compatible = "ibm,iic-405gp", }, { .compatible = "ibm,iic-440gp", }, { .compatible = "ibm,iic-440gpx", }, { .compatible = "ibm,iic-440grx", }, {} }; Cheers, Sean ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH]warp.c
While merging, I found a small bug that I forgot to send. I add an offset to a value twice. It is much easier to diff if it doesn't show the entire file as new. Cheers, Sean MacLennan Signed-off-by: Sean MacLennan <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index 8f01563..da5b7b7 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c @@ -137,7 +137,7 @@ static int __init pika_dtm_start(void) } of_node_put(np); - fpga = ioremap(res.start + 0x20, 4); + fpga = ioremap(res.start, 0x24); if (fpga == NULL) return -ENOENT; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 063/196] kset: convert /sys/devices to use kset_create
On Fri, Jan 25, 2008 at 09:40:55PM -0600, Olof Johansson wrote: > On Thu, Jan 24, 2008 at 11:10:01PM -0800, Greg Kroah-Hartman wrote: > > Dynamically create the kset instead of declaring it statically. We also > > rename devices_subsys to devices_kset to catch all users of the > > variable. > > Guess what, you broke powerpc again! I did this ON PURPOSE!!! The linux-kernel archives hold the details, and I was told by the PPC64 IBM people that they would fix this properly for 2.6.25, and not to hold back on my changes. This has been known for many months now. > [EMAIL PROTECTED]:~/work/linux/k.org $ git grep devices_subsys > arch/powerpc/kernel/vio.c:extern struct kset devices_subsys; /* needed for > vio_find_name() */ > arch/powerpc/kernel/vio.c: found = kset_find_obj(&devices_subsys, > kobj_name); > > Obviously causes build failues, even of ppc64_defconfig. > > (I can unfortunately not boot test, since I lack hardware that uses vio) > > > Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> > > diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c > index 19a5656..ee752ab 100644 > --- a/arch/powerpc/kernel/vio.c > +++ b/arch/powerpc/kernel/vio.c > @@ -37,7 +37,7 @@ > #include > #include > > -extern struct kset devices_subsys; /* needed for vio_find_name() */ > +extern struct kset *devices_kset; /* needed for vio_find_name() */ No, this just papers over the real problem here. For some reason, the vio code thinks it is acceptable to walk the whole device tree and match by a name and just assume that they got the correct device. You call this "enterprise grade"? :) You need to just put your device on a real bus, and then just walk the bus. That's the ONLY way you can guarantee the proper name will return what you want, and you get the pointer that you really think you are getting. There is a reason that devices_kset is not exported, don't make me go and have to name it something like: devices_kset_dont_touch_this_or_gregkh_will_make_fun_of_you Or I'll just mush 3 files in the driver core together and keep the symbol from being accessible at all. So no, I'm going to leave the build broken for this code, because that is what it really is. Please fix it correctly. thanks, greg k-h ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
> > Not that it seems that Michel reported far worse behaviour than what I > > saw, including pretty hickup'ish X behaviour even without the fair group > > scheduler compared to 2.6.23. It might be because he's running X niced > > to -1 (I leave X at 0 and let the scheduler deal with it in general) > > though. > > Hmm ..with X niced to -1, it should get more cpu power leading to a > better desktop experience. It depends as X can end up starving it's own clients, especially with a compositing manager or other fancy window manager... > Michel, > You had reported that commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 > was the cause for this bad behavior. Do you see behavior change (from > good->bad) > immediately after applying that patch during your bisect process? Also Michel, double check your .config in both cases. > I would prefer to have CONFIG_FAIR_GROUP_SCHED + > CONFIG_FAIR_CGROUP_SCHED on by default. Can you pls let me know how you > think is the desktop experience with that combination? I'm going to give that a try but unfortunately, it will have to wait until I'm back from LCA in a bit more than a week. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Reminder: removal of arch/ppc
> Hm. Katmai is already in-tree. Theoretically I should be able to get > the HW docs and do a new DTS and have it mostly "just work". Perhaps > I'll give that a shot and have you give it a quick spin. Yep, should be pretty easy. A while back I built a Katmai kernel in arch/ppc based on the Yucca support and the differences were pretty trivial -- as I recall, the Katmai has compact flash support that the Yucca doesn't have, and the Yucca has a simple little FPGA with a few registers that controls power to the PCI slots. - R. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Sat, 2008-01-26 at 09:37 +0530, Srivatsa Vaddagiri wrote: > > Ben, > I presume you had CONFIG_FAIR_USER_SCHED turned on too? Yes. It seems to be automatically turned on whenever FAIR_GROUP is turned on. Considering how bad the behaviour is for a standard desktop configuration, I'd be tempted to say to change it to default n. > Also were the > dd process and the niced processes running under different user ids? If > so, that is expected behavior, that we divide CPU equally among > users first and then among the processes within each user. They were different users and that behaviour seems to be a very stupid default behaviour for a desktop machine. Take this situation: - X running as root - User apps running as "user" - Background crap (indexing daemons etc...) running as their own user or nobody Unless you can get some kind of grouping based on user sessions including suid binaries, X etc... I think this shouldn't default y in Kconfig. Not that it seems that Michel reported far worse behaviour than what I saw, including pretty hickup'ish X behaviour even without the fair group scheduler compared to 2.6.23. It might be because he's running X niced to -1 (I leave X at 0 and let the scheduler deal with it in general) though. > When CONFIG_FAIR_GROUP_SCHED (and CONFIG_FAIR_USER_SCHED) is not > enabled, X will be given higher priority for running on CPU when compared to > other niced tasks. When the above options are turned on, X (running > under root uid) would be given lesser priority to run when compared to other > niced tasks running user different uids. Hence I expect some drop in > interactivity-experience with FAIR_GROUP_SCHED on. > > Can you pls let me know if any of these makes a difference: > > 1. Run niced tasks as root. This would bring X and niced tasks in the > same "scheduler group" domain, which would give X much more CPU power > when compared to niced tasks. I'll dbl check. My tests where indeed done with different users. > 2. Keep the niced tasks running under a non-root uid, but increase root users >cpu share. > # echo 8192 > /sys/kernel/uids/0/cpu_share > >This should bump up root user's priority for running on CPU and also >give a better desktop experience. Allright, that's something that might need to be set by default by the kernel ... as it will take some time to have knowledge of those knobs to percolate to distros. Too bad you can't do the opposite by default for "nobody" as there's no standard uid for it. > The group scheduler's SMP-load balance in 2.6.24 is not the best it > could be. sched-devel has a better load balancer, which I am presuming > will go into 2.6.25 soon. > > In this case, I suspect that's not the issue. If X and the niced processes > are > running under different uids, this (niced processes getting more cpu power) > is > on expected lines. Will wait for Ben to confirm this. I would suggest turning the fair group scheduler to default n in stable for now. Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull for-2.6.25 branch of pasemi.git
Hi Paul, Please pull from 'for-2.6.25' branch of master.kernel.org:/pub/scm/linux/kernel/git/olof/pasemi.git for-2.6.25 to receive the following updates: arch/powerpc/kernel/smp.c | 49 +- 1 file changed, 36 insertions(+), 13 deletions(-) Olof Johansson (2): [POWERPC] smp_call_function_map should be static [POWERPC] Make smp_send_stop() handle panic and xmon reboot Those two patches are marked as "awaiting upstream" in patchwork, but I didn't see them in powerpc.git for-2.6.25. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 063/196] kset: convert /sys/devices to use kset_create
On Thu, Jan 24, 2008 at 11:10:01PM -0800, Greg Kroah-Hartman wrote: > Dynamically create the kset instead of declaring it statically. We also > rename devices_subsys to devices_kset to catch all users of the > variable. Guess what, you broke powerpc again! [EMAIL PROTECTED]:~/work/linux/k.org $ git grep devices_subsys arch/powerpc/kernel/vio.c:extern struct kset devices_subsys; /* needed for vio_find_name() */ arch/powerpc/kernel/vio.c: found = kset_find_obj(&devices_subsys, kobj_name); Obviously causes build failues, even of ppc64_defconfig. (I can unfortunately not boot test, since I lack hardware that uses vio) Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 19a5656..ee752ab 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c @@ -37,7 +37,7 @@ #include #include -extern struct kset devices_subsys; /* needed for vio_find_name() */ +extern struct kset *devices_kset; /* needed for vio_find_name() */ static struct bus_type vio_bus_type; @@ -369,7 +369,7 @@ static struct vio_dev *vio_find_name(const char *kobj_name) { struct kobject *found; - found = kset_find_obj(&devices_subsys, kobj_name); + found = kset_find_obj(devices_kset, kobj_name); if (!found) return NULL; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Reminder: removal of arch/ppc
On Fri, 25 Jan 2008 20:07:57 -0700 "Grant Likely" <[EMAIL PROTECTED]> wrote: > On 1/25/08, Kumar Gala <[EMAIL PROTECTED]> wrote: > > Just a reminder that the plan is to remove arch/ppc this summer (June > > 2008). > > I strongly recommend that we delay removal by about a month... > somewhere around July 23-26... so we can have a great big "ding, dong, > arch/ppc is dead" party at OLS. Ironically, that is where the original June date came from. Segher suggested doing it at OLS, which for some reason we all thought was in June. But this is Linux. We never do anything on time, so I'm sure it'll work out ;) josh ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] 5200 dts: add default address and size cells to soc node.
On 1/25/08, Paul Gortmaker <[EMAIL PROTECTED]> wrote: > The various 5200 dts files don't have values specified for the soc > node, which in turn results in a warning from the processing of > every child node (roughly 40 warnings per file). This explicitly > sets the default values and gets rid of all the warnings. > > Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]> Applied, 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] qe/muram dts: Explicitly set address-cells and size cells for muram
Currently there are several dts that don't specify address or size cells for the muram. This causes dtc to use default values, one of which is an address-cells of two, and this breaks the parsing of the muram ranges, which is assuming an address-cells of one. For example: Warning (reg_format): "reg" property in /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED] has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Explicitly setting the address and size cells gets it parsed properly and gets rid of the four dtc warnings. Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc832x_mds.dts |2 ++ arch/powerpc/boot/dts/mpc832x_rdb.dts |2 ++ arch/powerpc/boot/dts/mpc836x_mds.dts |4 +++- arch/powerpc/boot/dts/mpc8568mds.dts |4 +++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index 6902524..ec3ca83 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts @@ -213,6 +213,8 @@ bus-frequency = ; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; device_type = "muram"; ranges = <0 0001 4000>; diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts index 10ff7aa..9251997 100644 --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts @@ -173,6 +173,8 @@ bus-frequency = ; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; device_type = "muram"; ranges = <0 0001 4000>; diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index 2181d2c..10b5d6d 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts @@ -214,10 +214,12 @@ bus-frequency = <179A7B00>; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; device_type = "muram"; ranges = <0 0001 c000>; - [EMAIL PROTECTED] + [EMAIL PROTECTED] { reg = <0 c000>; }; }; diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index 5818a7c..78d4b83 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts @@ -291,10 +291,12 @@ bus-frequency = <179A7B00>; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; device_type = "muram"; ranges = <0 0001 c000>; - [EMAIL PROTECTED] + [EMAIL PROTECTED] { reg = <0 c000>; }; }; -- 1.5.4.rc4.gcab31 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Reminder: removal of arch/ppc
On 1/25/08, Kumar Gala <[EMAIL PROTECTED]> wrote: > Just a reminder that the plan is to remove arch/ppc this summer (June > 2008). I strongly recommend that we delay removal by about a month... somewhere around July 23-26... so we can have a great big "ding, dong, arch/ppc is dead" party at OLS. :-D Cheers, 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
Re: [PATCH 3/3] Cell IOMMU static mapping support
On Fri, Jan 25, 2008 at 09:45:07PM +1100, Michael Ellerman wrote: > Citing "release early release often", I'm posting this now as a mega-patch > to get people looking at it. I'll try to split it up and make it look a > little prettier before submitting it. > > The intent of this patch is to setup (on certain machines) a "static" IOMMU > mapping of all of memory, to reduce the overhead of the IOMMU. If anyone has > a better name than "static" I'm all ears. > > So instead of having an IOMMU window that we use to temporarily map things > in and out of DMA'able space, at boot we create a 1:1 mapping for all of > memory. This obviously only works for devices that can do 64-bit DMA. I don't get it. Why not disable the iommu instead? -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Reminder: removal of arch/ppc
On Fri, 25 Jan 2008 17:30:32 -0800 Roland Dreier <[EMAIL PROTECTED]> wrote: > > > YUCCA > > > > Yucca was what again? 440spe? > > Yes, it was the first 440SPe eval board; since replaced by Katmai. > > I have a Yucca and can at least test thing; if no one else gets to it, > I may try to port it to arch/powerpc for 2.6.26. Hm. Katmai is already in-tree. Theoretically I should be able to get the HW docs and do a new DTS and have it mostly "just work". Perhaps I'll give that a shot and have you give it a quick spin. josh ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] create modalias file in sysfs for bus vio
On Wed, Jan 23, Stephen Rothwell wrote: > It would be nice if we could factor out the "vio:T%sS%s" string as it is > also used in vio_hotplug(). What exactly do you have in mind? Creating a tempstring seems to make things more complicated. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] 5200 dts: add default address and size cells to soc node.
The various 5200 dts files don't have values specified for the soc node, which in turn results in a warning from the processing of every child node (roughly 40 warnings per file). This explicitly sets the default values and gets rid of all the warnings. Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/cm5200.dts|2 ++ arch/powerpc/boot/dts/lite5200.dts |2 ++ arch/powerpc/boot/dts/lite5200b.dts |2 ++ arch/powerpc/boot/dts/motionpro.dts |2 ++ arch/powerpc/boot/dts/tqm5200.dts |2 ++ 5 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts index 9295083..2b88a58 100644 --- a/arch/powerpc/boot/dts/cm5200.dts +++ b/arch/powerpc/boot/dts/cm5200.dts @@ -45,6 +45,8 @@ }; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; model = "fsl,mpc5200b"; compatible = "fsl,mpc5200b"; revision = ""; // from bootloader diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index e1d6f44..7de3d21 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts @@ -46,6 +46,8 @@ }; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; model = "fsl,mpc5200"; compatible = "mpc5200"; revision = ""; // from bootloader diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index 3e06f58..dd2c4fd 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts @@ -46,6 +46,8 @@ }; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; model = "fsl,mpc5200b"; compatible = "mpc5200"; revision = ""; // from bootloader diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts index d8c316a..ee30805 100644 --- a/arch/powerpc/boot/dts/motionpro.dts +++ b/arch/powerpc/boot/dts/motionpro.dts @@ -45,6 +45,8 @@ }; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; model = "fsl,mpc5200b"; compatible = "fsl,mpc5200b"; revision = ""; // from bootloader diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts index 5017cec..58c9799 100644 --- a/arch/powerpc/boot/dts/tqm5200.dts +++ b/arch/powerpc/boot/dts/tqm5200.dts @@ -45,6 +45,8 @@ }; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; model = "fsl,mpc5200"; compatible = "fsl,mpc5200"; revision = ""; // from bootloader -- 1.5.4.rc4.gcab31 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] POWERPC: Convert StorCenter DTS file to /dts-v1/ format.
Signed-off-by: Jon Loeliger <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/storcenter.dts | 73 + 1 files changed, 38 insertions(+), 35 deletions(-) diff --git a/arch/powerpc/boot/dts/storcenter.dts b/arch/powerpc/boot/dts/storcenter.dts index 6aa1d69..2204874 100644 --- a/arch/powerpc/boot/dts/storcenter.dts +++ b/arch/powerpc/boot/dts/storcenter.dts @@ -11,6 +11,8 @@ * warranty of any kind, whether express or implied. */ +/dts-v1/; + / { model = "StorCenter"; compatible = "storcenter"; @@ -30,19 +32,19 @@ PowerPC,[EMAIL PROTECTED] { device_type = "cpu"; reg = <0>; - clock-frequency = ; /* Hz */ - timebase-frequency = ; /* Hz */ + clock-frequency = <2>; + timebase-frequency = <2500>; bus-frequency = <0>;/* from bootwrapper */ - i-cache-line-size = ;/* bytes */ - d-cache-line-size = ;/* bytes */ - i-cache-size = <4000>; - d-cache-size = <4000>; + i-cache-line-size = <32>; + d-cache-line-size = <32>; + i-cache-size = <16384>; + d-cache-size = <16384>; }; }; memory { device_type = "memory"; - reg = < 0400>; /* 64MB @ 0x0 */ + reg = <0x 0x0400>; /* 64MB @ 0x0 */ }; [EMAIL PROTECTED] { @@ -51,15 +53,15 @@ device_type = "soc"; compatible = "fsl,mpc8241", "mpc10x"; store-gathering = <0>; /* 0 == off, !0 == on */ - ranges = <0 fc00 10>; - reg = ;/* EUMB */ + ranges = <0x0 0xfc00 0x10>; + reg = <0xfc00 0x10>;/* EUMB */ bus-frequency = <0>;/* fixed by loader */ [EMAIL PROTECTED] { #address-cells = <1>; #size-cells = <0>; compatible = "fsl-i2c"; - reg = <3000 100>; + reg = <0x3000 0x100>; interrupts = <5 2>; interrupt-parent = <&mpic>; @@ -73,9 +75,9 @@ cell-index = <0>; device_type = "serial"; compatible = "ns16550"; - reg = <4500 20>; - clock-frequency = ; /* Hz */ - current-speed = ; + reg = <0x4500 0x20>; + clock-frequency = <97553800>; /* Hz */ + current-speed = <115200>; interrupts = <9 2>; interrupt-parent = <&mpic>; }; @@ -84,10 +86,10 @@ cell-index = <1>; device_type = "serial"; compatible = "ns16550"; - reg = <4600 20>; - clock-frequency = ; /* Hz */ - current-speed = ; - interrupts = ; + reg = <0x4600 0x20>; + clock-frequency = <97553800>; /* Hz */ + current-speed = <9600>; + interrupts = <10 2>; interrupt-parent = <&mpic>; }; @@ -96,7 +98,7 @@ device_type = "open-pic"; compatible = "chrp,open-pic"; interrupt-controller; - reg = <4 4>; + reg = <0x4 0x4>; }; }; @@ -107,28 +109,29 @@ #interrupt-cells = <1>; device_type = "pci"; compatible = "mpc10x-pci"; - reg = ; - ranges = <0100 00 fe00 0 00c0 - 0200 0 8000 8000 0 7000>; - bus-range = <0 ff>; - clock-frequency = ; /* Hz */ + reg = <0xfe80 0x1000>; + ranges = <0x0100 0x00x0 0xfe00 0x0 0x00c0 + 0x0200 0x0 0x8000 0x8000 0x0 0x7000>; + bus-range = <0 0xff>; + clock-frequency = <97553800>; interrupt-parent = <&mpic>; - interrupt-map-mask = ; + interrupt-map-mask = <0xf800 0 0 7>; interrupt-map = < /* IDSEL 13 - IDE */ - 6800 0 0 1 &mpic 0 1 - 6800 0 0 2 &mpic 0 1 - 6800 0 0 3 &mpic 0 1 + 0x6800 0 0 1 &mpi
[PATCH] POWERPC: Convert all 86xx DTS files to /dts-v1/ format.
Also fixed a few minor indent problems as well. Signed-off-by: Jon Loeliger <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8610_hpcd.dts | 227 +++--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 333 2 files changed, 281 insertions(+), 279 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index d98715c..16c947b 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -8,6 +8,7 @@ * by the Free Software Foundation. */ +/dts-v1/; / { model = "MPC8610HPCD"; @@ -29,11 +30,11 @@ 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 + d-cache-line-size = <32>; + i-cache-line-size = <32>; + d-cache-size = <32768>; // L1 + i-cache-size = <32768>; // L1 + timebase-frequency = <0>; // From uboot bus-frequency = <0>;// From uboot clock-frequency = <0>; // From uboot }; @@ -41,7 +42,7 @@ memory { device_type = "memory"; - reg = < 2000>; // 512M at 0x0 + reg = <0x 0x2000>; // 512M at 0x0 }; [EMAIL PROTECTED] { @@ -50,8 +51,8 @@ #interrupt-cells = <2>; device_type = "soc"; compatible = "fsl,mpc8610-immr", "simple-bus"; - ranges = <0 e000 0010>; - reg = ; + ranges = <0x0 0xe000 0x0010>; + reg = <0xe000 0x1000>; bus-frequency = <0>; [EMAIL PROTECTED] { @@ -59,17 +60,17 @@ #size-cells = <0>; cell-index = <0>; compatible = "fsl-i2c"; - reg = <3000 100>; - interrupts = <2b 2>; + reg = <0x3000 0x100>; + interrupts = <43 2>; interrupt-parent = <&mpic>; dfsrr; -cs4270:[EMAIL PROTECTED] { + cs4270:[EMAIL PROTECTED] { compatible = "cirrus,cs4270"; -reg = <4f>; + reg = <0x4f>; /* MCLK source is a stand-alone oscillator */ - clock-frequency = ; -}; + clock-frequency = <12288000>; + }; }; [EMAIL PROTECTED] { @@ -77,8 +78,8 @@ #size-cells = <0>; cell-index = <1>; compatible = "fsl-i2c"; - reg = <3100 100>; - interrupts = <2b 2>; + reg = <0x3100 0x100>; + interrupts = <43 2>; interrupt-parent = <&mpic>; dfsrr; }; @@ -87,9 +88,9 @@ cell-index = <0>; device_type = "serial"; compatible = "ns16550"; - reg = <4500 100>; + reg = <0x4500 0x100>; clock-frequency = <0>; - interrupts = <2a 2>; + interrupts = <42 2>; interrupt-parent = <&mpic>; }; @@ -97,9 +98,9 @@ cell-index = <1>; device_type = "serial"; compatible = "ns16550"; - reg = <4600 100>; + reg = <0x4600 0x100>; clock-frequency = <0>; - interrupts = <1c 2>; + interrupts = <28 2>; interrupt-parent = <&mpic>; }; @@ -108,7 +109,7 @@ interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; - reg = <4 4>; + reg = <0x4 0x4>; compatible = "chrp,open-pic"; device_type = "open-pic"; big-endian; @@ -116,16 +117,16 @@ [EMAIL PROTECTED] { comp
Re: Reminder: removal of arch/ppc
> >YUCCA > > Yucca was what again? 440spe? Yes, it was the first 440SPe eval board; since replaced by Katmai. I have a Yucca and can at least test thing; if no one else gets to it, I may try to port it to arch/powerpc for 2.6.26. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [RFC][PATCH] remove section mappinng
Badari Pulavarty writes: > Here is the code I cooked up, it seems to be working fine. > But I have concerns where I need your help. > > In order to invalidate htab entries, we need to find the "slot". > But I can only find the hpte group. Is it okay to invalidate the > first entry in the group ? Do I need to invalidate the entire group ? You do need to find the correct slot. (I suppose you could invalidate the entire group, but that would be pretty gross.) Note that in the CONFIG_DEBUG_PAGEALLOC case we use 4k pages and keep a map of the slot numbers in linear_map_hash_slots[]. But in that case I assume that the generic code would have already unmapped all the pages of the LMB that you're trying to hot-unplug. In the non-DEBUG_PAGEALLOC case on a System p machine, the hash table will be big enough that the linear mapping entries should always be in slot 0. So just invalidating slot 0 would probably work in practice, but it seems pretty fragile. We might want to use your new htab_remove_mapping() function on a bare-metal system with a smaller hash table in future, for instance. Have a look at pSeries_lpar_hpte_updateboltedpp. It calls pSeries_lpar_hpte_find to find the slot for a bolted HPTE. You could do something similar. In fact maybe the best approach is to do a pSeries_lpar_hpte_remove_bolted() and not try to solve the more general problem. Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Reminder: removal of arch/ppc
On Fri, 25 Jan 2008 10:55:25 -0600 Kumar Gala <[EMAIL PROTECTED]> wrote: > Just a reminder that the plan is to remove arch/ppc this summer (June > 2008). The following boards still existing over in arch/ppc. Some of > them have been ported over to arch/powerpc. If you care about one of > these boards and its not ported speak up (it helps if you have access > to the board). Also, if you know a given board is free to die of > bitrot let us know so we know not to worry about it: > 4xx: > BAMBOO Ported (mostly) > CPCI405 Doubt this will be ported. > EBONY Ported (mostly) > EP405 Ported (mostly) > BUBINGA > LUAN No idea on these. > YUCCA Yucca was what again? 440spe? > OCOTEA This one will be ported soon. I have an ocotea now. > REDWOOD_5 > REDWOOD_6 Don't have either of these. > SYCAMORE I think Mathias was working on a 405gpr port somewhere. > TAISHAN > WALNUT Ported (mostly) > XILINX_ML300 > XILINX_ML403 Grant should have these in decent shape. josh ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: drivers/char/hvc_* and /Documentation/powerpc/hvcs.txt
On Fri, Jan 25, 2008 at 04:39:27PM -0600, Timur Tabi wrote: > Hi, > > I'm working on a console driver for the Freescale hypervisor. I notice a > bunch > of hvc_* files in the drivers/char directory. I also noticed > /Documentation/powerpc/hvcs.txt. > > My guess is that hvcs.txt talks about drivers/char/hvcs.c, which is a console > driver specific to some IBM hypervisor. The hvc_*.c files are based on that > code but they're more generic and allow people to write console drivers for > other hypervisors easliy. Am I right? Hvcs is the server-side driver in some environments. I.e. a hvc console connects through the hypervisor to a hvcs in another partition. > If so, does this mean that I can take hvc_beat.c, modify it to make Freescale > hypervisor calls instead, and presto, I'm done? Yep, pretty much. It's real easy to write a new backend to hvc, I've got a couple for various bringup environments here as well. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 5/5] [POWERPC] fsl_soc, legacy_serial: add support for "soc" compatible matching
On Fri, Jan 25, 2008 at 10:35:06AM -0600, Kumar Gala wrote: > > On Jan 24, 2008, at 9:40 AM, Anton Vorontsov wrote: > > >We'll match on "soc" compatible for generic code, and "fsl,soc" > >for fsl specific code. > > > >Unfortunately it's still impossible to remove device_type = "soc" > >from the existing device tree, because older u-boots are looking for > >it. > > > >Neither we can remove model number from the soc name to heal > >arch/powerpc/boot/cuboot-85xx.c, because then dts'es will be > >incompatible with older u-boots again. > > > >So, just one machine converted so far: MPC8360E-RDK. It's new machine > >so we don't care about backward compatibility yet. > > > >Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > >--- > > > >I know, this patch will conflict with the legacy serial rework[1]. > >It's okay though, if [1] will hit galak/powerpc.git first, I'll > >simply rebase that patch. > > > >[1] http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050096.html > > > >Documentation/powerpc/booting-without-of.txt | 18 -- > >arch/powerpc/boot/dts/mpc836x_rdk.dts|1 - > >arch/powerpc/kernel/legacy_serial.c |3 +- > >arch/powerpc/sysdev/fsl_soc.c| 51 ++ > >+--- > >4 files changed, 39 insertions(+), 34 deletions(-) > > this needs a bit more discussion. Ok. > "fsl,soc" is terrible describe. I > think we want some generic for the compat that implies 'soc register > space'. My thinking: Freescale soc register space: "fsl,soc" generic soc device: "soc" (or maybe "linux,soc" better?) I know, Scott Wood is pushing "-immr" thing forward... but I don't like that name because SOC isn't only device with the Internal Memory Mapped Registers. (Think of QE placed outside of "soc"/"immr" node). Though, "soc" by itself is fully unfortunate name. QE is the part of SOC too, as we used to call it when speaking of hardware. But logically we divide things for "core soc" and "core soc's companion/communication/offload modules", i.e. QE/CPMs/... We can remove that ambiguity by moving QE/CPMs nodes inside the soc node. Then indeed -immr would be the best compatible for the "soc" node. -- 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 5/5] [POWERPC] fsl_soc, legacy_serial: add support for "soc" compatible matching
On Fri, Jan 25, 2008 at 01:03:28PM -0600, Scott Wood wrote: > Anton Vorontsov wrote: > >$ grep qe@ arch/powerpc/boot/dts/* > >arch/powerpc/boot/dts/mpc832x_mds.dts: [EMAIL PROTECTED] { > >arch/powerpc/boot/dts/mpc832x_rdb.dts: [EMAIL PROTECTED] { > >arch/powerpc/boot/dts/mpc836x_mds.dts: [EMAIL PROTECTED] { > >arch/powerpc/boot/dts/mpc8568mds.dts: [EMAIL PROTECTED] { > > > >^^^ if the practice is wrong, then we should fix it, and then > >-immr would be the good name indeed (just as I've said previously). > > It's wrong, and we should fix it. Ok, good. I'll fix that for at least new RDK board. Though, fixing other boards would be not trivial because of backward compatibility and such. I'll also use -immr for RDK. > It would make sense if the QE block > were relocatable separately from IMMR (but even if it were, the QE > compatible should be fsl,-qe or similar, so no conflict with > fsl,-immr) -- but it isn't, at least on the 8323 and 8360 (I don't > have an 8568 manual handy). Nobody have an MPC8568E manual handy. :-P I've just looked there.. no QE isn't relocatable. Oh, and I lied regarding CPM being relocatable. It isn't, at least CPM2 and at least on MPC8555E. What a pity. -- 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 5/5] [POWERPC] fsl_soc, legacy_serial: add support for "soc" compatible matching
On Jan 24, 2008, at 9:40 AM, Anton Vorontsov wrote: > We'll match on "soc" compatible for generic code, and "fsl,soc" > for fsl specific code. > > Unfortunately it's still impossible to remove device_type = "soc" > from the existing device tree, because older u-boots are looking for > it. > > Neither we can remove model number from the soc name to heal > arch/powerpc/boot/cuboot-85xx.c, because then dts'es will be > incompatible with older u-boots again. > > So, just one machine converted so far: MPC8360E-RDK. It's new machine > so we don't care about backward compatibility yet. > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > --- > > I know, this patch will conflict with the legacy serial rework[1]. > It's okay though, if [1] will hit galak/powerpc.git first, I'll > simply rebase that patch. > > [1] http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050096.html > > Documentation/powerpc/booting-without-of.txt | 18 -- > arch/powerpc/boot/dts/mpc836x_rdk.dts|1 - > arch/powerpc/kernel/legacy_serial.c |3 +- > arch/powerpc/sysdev/fsl_soc.c| 51 ++ > +--- > 4 files changed, 39 insertions(+), 34 deletions(-) this needs a bit more discussion. "fsl,soc" is terrible describe. I think we want some generic for the compat that implies 'soc register space'. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 7/9] powerpc: add MPC837x RDB platform support
On Jan 24, 2008, at 8:47 PM, Kim Phillips wrote: > primarily based on mpc837x mds code. > > Signed-off-by: Joe D'Abbraccio <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- Who's the actual other of these patches? (all 9 of them). - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 6/5] [POWERPC] get rid of `model = "UCC"' in the ucc nodes
On Jan 25, 2008, at 8:37 AM, Anton Vorontsov wrote: > It isn't used anywhere, so remove it. If we'll ever need something > like this, we'll use compatible property instead. > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > --- > > New cleanup in this series... > > Documentation/powerpc/booting-without-of.txt |1 - > arch/powerpc/boot/dts/mpc832x_mds.dts|3 --- > arch/powerpc/boot/dts/mpc832x_rdb.dts|2 -- > arch/powerpc/boot/dts/mpc836x_mds.dts|2 -- > arch/powerpc/boot/dts/mpc8568mds.dts |2 -- > 5 files changed, 0 insertions(+), 10 deletions(-) > > diff --git a/Documentation/powerpc/booting-without-of.txt b/ > Documentation/powerpc/booting-without-of.txt > index a3b6e2a..ab9f0bf 100644 > --- a/Documentation/powerpc/booting-without-of.txt > +++ b/Documentation/powerpc/booting-without-of.txt > @@ -1675,7 +1675,6 @@ platforms are moved over to use the flattened- > device-tree model. > [EMAIL PROTECTED] { > device_type = "network"; > compatible = "ucc_geth"; > - model = "UCC"; > device-id = <1>; can device-id be changed to cell-index? - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] mpc834x_mds: Convert device tree source to dts-v1
On Jan 25, 2008, at 10:16 AM, Paul Gortmaker wrote: > Kumar Gala wrote: >> On Fri, 25 Jan 2008, Paul Gortmaker wrote: >> >> >>> Move mpc834x_mds device tree source forward to dts-v1 format. >>> Nothing >>> too complex in this one, so it boils down to just adding a bunch >>> of 0x >>> in the right places and converting clock speeds to decimal. >>> >>> Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]> >>> --- >>> arch/powerpc/boot/dts/mpc834x_mds.dts | 254 >>> + >>> 1 files changed, 128 insertions(+), 126 deletions(-) >>> >>> >> >> applied. I fixed up things so that interrupts use decimal. >> > > Yeah, IRQ was one of those gray areas where I wasn't 100% > sure whether DTS folks would rather hex or decimal values. decimal is easier since UMs tend to reference IRQs in dec. I think on 85xx I might have left them as hex since the IRQs don't directly reflect the UMs. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v2] [POWERPC] 85xx: Port STX GP3 board over from arch/ppc
On Jan 25, 2008, at 10:08 AM, Scott Wood wrote: > On Thu, Jan 24, 2008 at 10:47:21PM -0600, Kumar Gala wrote: >> +[EMAIL PROTECTED] { > > [EMAIL PROTECTED] will fix this up in the tqm port as well. > > > -Scott >> +[EMAIL PROTECTED] { >> +#address-cells = <1>; >> +#size-cells = <1>; >> +compatible = "fsl,mpc8560-cpm", "fsl,cpm2"; > > This is also a simple-bus. yeah, I realized I missed this. Its fixed in my tree. > > >> +static struct of_device_id __initdata of_bus_ids[] = { >> +{ .name = "soc", }, >> +{ .type = "soc", }, >> +{ .name = "cpm", }, >> +{ .name = "localbus", }, >> +{ .compatible = "simple-bus", }, >> +{}, >> +}; > > You should be able to get rid of the others besides simple-bus > (there may > have been some confusion in what you asked over IRC yesterday -- I > thought you were talking about compatible in the device tree, not > here). yep :) fixed and in the tqm port as well. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Reminder: removal of arch/ppc
Just a reminder that the plan is to remove arch/ppc this summer (June 2008). The following boards still existing over in arch/ppc. Some of them have been ported over to arch/powerpc. If you care about one of these boards and its not ported speak up (it helps if you have access to the board). Also, if you know a given board is free to die of bitrot let us know so we know not to worry about it: PREP PQ2ADS TQM8260 CPCI690 EV64260 CHESTNUT LOPEC KATANA HDPU MVME5100 PAL4 POWERPMC250 PPLUS PRPMC750 PRPMC800 RADSTONE_PPC7D SANDPOINT SBC82xx SPRUCE LITE5200 EV64360 MPC86XADS MPC885ADS ADS8272 4xx: BAMBOO CPCI405 EBONY EP405 BUBINGA LUAN YUCCA OCOTEA REDWOOD_5 REDWOOD_6 SYCAMORE TAISHAN WALNUT XILINX_ML300 XILINX_ML403 - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] 85xx: some minor cleanups for stx_gp3 and tqm85xx
* "simple-bus" covers all our needs for of_platform_bus_probe() * make device tree name just 'soc' not 'soc85..' --- arch/powerpc/boot/dts/stx_gp3_8560.dts |2 +- arch/powerpc/boot/dts/tqm8540.dts |2 +- arch/powerpc/boot/dts/tqm8541.dts |2 +- arch/powerpc/boot/dts/tqm8555.dts |2 +- arch/powerpc/boot/dts/tqm8560.dts |2 +- arch/powerpc/platforms/85xx/stx_gp3.c |4 arch/powerpc/platforms/85xx/tqm85xx.c |4 7 files changed, 5 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/boot/dts/stx_gp3_8560.dts b/arch/powerpc/boot/dts/stx_gp3_8560.dts index 2e97236..f81fd7f 100644 --- a/arch/powerpc/boot/dts/stx_gp3_8560.dts +++ b/arch/powerpc/boot/dts/stx_gp3_8560.dts @@ -46,7 +46,7 @@ reg = <0x 0x1000>; }; - [EMAIL PROTECTED] { + [EMAIL PROTECTED] { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8540.dts b/arch/powerpc/boot/dts/tqm8540.dts index a6e3989..1addb3a 100644 --- a/arch/powerpc/boot/dts/tqm8540.dts +++ b/arch/powerpc/boot/dts/tqm8540.dts @@ -48,7 +48,7 @@ reg = <0x 0x1000>; }; - [EMAIL PROTECTED] { + [EMAIL PROTECTED] { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8541.dts b/arch/powerpc/boot/dts/tqm8541.dts index 11bdb0f..9e01093 100644 --- a/arch/powerpc/boot/dts/tqm8541.dts +++ b/arch/powerpc/boot/dts/tqm8541.dts @@ -47,7 +47,7 @@ reg = <0x 0x1000>; }; - [EMAIL PROTECTED] { + [EMAIL PROTECTED] { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8555.dts b/arch/powerpc/boot/dts/tqm8555.dts index eef9a6b..a20eb06 100644 --- a/arch/powerpc/boot/dts/tqm8555.dts +++ b/arch/powerpc/boot/dts/tqm8555.dts @@ -47,7 +47,7 @@ reg = <0x 0x1000>; }; - [EMAIL PROTECTED] { + [EMAIL PROTECTED] { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/boot/dts/tqm8560.dts b/arch/powerpc/boot/dts/tqm8560.dts index 8ca7fdd..b9ac6c9 100644 --- a/arch/powerpc/boot/dts/tqm8560.dts +++ b/arch/powerpc/boot/dts/tqm8560.dts @@ -48,7 +48,7 @@ reg = <0x 0x1000>; }; - [EMAIL PROTECTED] { + [EMAIL PROTECTED] { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c index 0b20c17..18499d7 100644 --- a/arch/powerpc/platforms/85xx/stx_gp3.c +++ b/arch/powerpc/platforms/85xx/stx_gp3.c @@ -148,10 +148,6 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m) } static struct of_device_id __initdata of_bus_ids[] = { - { .name = "soc", }, - { .type = "soc", }, - { .name = "cpm", }, - { .name = "localbus", }, { .compatible = "simple-bus", }, {}, }; diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index 2a08b31..77681ac 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c @@ -146,10 +146,6 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m) } static struct of_device_id __initdata of_bus_ids[] = { - { .name = "soc", }, - { .type = "soc", }, - { .name = "cpm", }, - { .name = "localbus", }, { .compatible = "simple-bus", }, {}, }; -- 1.5.3.7 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Fri, 2008-01-25 at 16:04 +0100, Michel Dänzer wrote: > > Hmm, interesting. As I said before, I thought I had tested with this > > disabled and not seen a difference, but I'll try again to confirm. > > So, 2.6.24 final is indeed much better with this disabled, but still > not > as good as 2.6.23: While I can reliably move a window again while the > infinite loop is running, it still stutters badly every couple of > seconds. With 2.6.23 this is smooth all the time. This is with or without fair group scheduler enabled ? Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/9] enable FSL SATA driver config for Freescale SoCs
On Thu, 24 Jan 2008, Kim Phillips wrote: > The mpc8315 shares the same SATA controller as the mpc837x, > and likelihood is that future SoCs from Freescale will also. > > Signed-off-by: Jerry Huang <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > Kumar, let me know if you want me to post this to the ata list (I'm > assuming it's not necessary). > > drivers/ata/Kconfig |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/5] [POWERPC][NET] ucc_geth_mii and users: get rid of device_type
On Thu, 24 Jan 2008, Anton Vorontsov wrote: > device_type property is bogus, thus use proper compatible. > > Also change compatible property to "fsl,ucc-mdio". > > Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/mpc832x_mds.dts |3 +-- > arch/powerpc/boot/dts/mpc832x_rdb.dts |3 +-- > arch/powerpc/boot/dts/mpc836x_mds.dts |3 +-- > arch/powerpc/boot/dts/mpc836x_rdk.dts |3 +-- > arch/powerpc/boot/dts/mpc8568mds.dts |2 +- > drivers/net/ucc_geth_mii.c|3 +++ > 6 files changed, 8 insertions(+), 9 deletions(-) > applied. (same comment about rdk) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 8/9] powerpc: add the mpc837[789]_rdb dts files
On Thu, 24 Jan 2008, Kim Phillips wrote: > Add the dts files for the MPC838xE Reference Development Board (RDB). > > The board is a mini-ITX reference board with 256M DDR2, 8M flash, > 32M NAND, USB, PCI, gigabit ethernet, SATA, and serial. > > the difference among the three files is the 8377 has two, the 8378 > none, and the 8379 has four sata controllers. > > partially based on the 8379 mds device trees. > > Signed-off-by: Joe D'Abbraccio <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/mpc8377_rdb.dts | 296 +++ > arch/powerpc/boot/dts/mpc8378_rdb.dts | 282 ++ > arch/powerpc/boot/dts/mpc8379_rdb.dts | 310 > + applied. (fixed spi nodes). - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 7/9] powerpc: add MPC837x RDB platform support
On Thu, 24 Jan 2008, Kim Phillips wrote: > primarily based on mpc837x mds code. > > Signed-off-by: Joe D'Abbraccio <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/platforms/83xx/Kconfig |8 ++- > arch/powerpc/platforms/83xx/Makefile |1 + > arch/powerpc/platforms/83xx/mpc837x_rdb.c | 99 > + > 3 files changed, 107 insertions(+), 1 deletions(-) > create mode 100644 arch/powerpc/platforms/83xx/mpc837x_rdb.c > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 5/9] powerpc: ipic: add interrupt vector 94
On Thu, 24 Jan 2008, Kim Phillips wrote: > this is used on the mpc8315 SoC for DMA error interrupts. > > Signed-off-by: Jerry Huang <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/sysdev/ipic.c |6 ++ > 1 files changed, 6 insertions(+), 0 deletions(-) > applied. (fyi, the irq is for TDM DMA, not general DMA) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 9/9] powerpc: add the mpc837x rdb defconfig
On Thu, 24 Jan 2008, Kim Phillips wrote: > Signed-off-by: Joe D'Abbraccio <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/configs/mpc837x_rdb_defconfig | 887 > > 1 files changed, 887 insertions(+), 0 deletions(-) > create mode 100644 arch/powerpc/configs/mpc837x_rdb_defconfig > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 1/5] [POWERPC] qe_lib and users: get rid of most device_types and model
On Thu, 24 Jan 2008, Anton Vorontsov wrote: > Now we're searching for "fsl,qe", "fsl,qe-muram", "fsl,qe-muram-data" > and "fsl,qe-ic". > > Unfortunately it's still impossible to remove device_type = "qe" > from the existing device trees (except for MPC8360E-RDK), because > older u-boots are looking for it. > > Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > --- > Documentation/powerpc/booting-without-of.txt | 11 +++-- > arch/powerpc/boot/dts/mpc832x_mds.dts|9 ++-- > arch/powerpc/boot/dts/mpc832x_rdb.dts| 10 +++-- > arch/powerpc/boot/dts/mpc836x_mds.dts| 10 +++-- > arch/powerpc/boot/dts/mpc836x_rdk.dts|1 - > arch/powerpc/boot/dts/mpc8568mds.dts | 10 +++-- > arch/powerpc/platforms/83xx/mpc832x_mds.c| 11 +++-- > arch/powerpc/platforms/83xx/mpc832x_rdb.c| 11 +++-- > arch/powerpc/platforms/83xx/mpc836x_mds.c| 11 +++-- > arch/powerpc/platforms/85xx/mpc85xx_mds.c| 32 - > arch/powerpc/sysdev/fsl_soc.c|5 ++- > arch/powerpc/sysdev/qe_lib/qe.c | 63 > ++ > 12 files changed, 117 insertions(+), 67 deletions(-) > applied, however _rdk will need fixing. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/5] [POWERPC] fsl_spi_init and users: stop using device_type = "spi"
On Thu, 24 Jan 2008, Anton Vorontsov wrote: > Also: > - rename "fsl_spi" to "fsl,spi"; > - add and use cell-index property, if found; > - split probing code out of fsl_spi_init, thus we can call > it for legacy device_type probing and new "compatible" probing. > > Per http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048388.html > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > --- > Documentation/powerpc/booting-without-of.txt |8 +- > arch/powerpc/boot/dts/mpc8313erdb.dts|4 +- > arch/powerpc/boot/dts/mpc832x_mds.dts|8 +- > arch/powerpc/boot/dts/mpc832x_rdb.dts|8 +- > arch/powerpc/boot/dts/mpc8349emitx.dts |4 +- > arch/powerpc/boot/dts/mpc8349emitxgp.dts |4 +- > arch/powerpc/boot/dts/mpc834x_mds.dts|4 +- > arch/powerpc/boot/dts/mpc836x_mds.dts|8 +- > arch/powerpc/boot/dts/mpc836x_rdk.dts|6 +- > arch/powerpc/boot/dts/mpc8568mds.dts |8 +- > arch/powerpc/sysdev/fsl_soc.c| 94 > -- > 11 files changed, 88 insertions(+), 68 deletions(-) > applied. (sans _rdk) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 1/9] powerpc: fold the mpc8313 platform into the mpc831x platform
On Thu, 24 Jan 2008, Kim Phillips wrote: > prepare for adding support for the mpc8315 rdb, > since they are identical wrt platform code. > > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > Kumar, this set of patches is base support for two new boards - the > mpc8315e rdb and the mpc837xe rdb. Please consider for 2.6.25. Thanks. > > arch/powerpc/configs/mpc8313_rdb_defconfig |2 +- > arch/powerpc/platforms/83xx/Kconfig|6 ++-- > arch/powerpc/platforms/83xx/Makefile |2 +- > .../83xx/{mpc8313_rdb.c => mpc831x_rdb.c} | 35 +++ > 4 files changed, 18 insertions(+), 27 deletions(-) > rename arch/powerpc/platforms/83xx/{mpc8313_rdb.c => mpc831x_rdb.c} (70%) > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/5] [POWERPC][SPI] use brg-frequency for SPI in QE
On Thu, 24 Jan 2008, Anton Vorontsov wrote: > In case of QE we can use brg-frequency (which is qeclk/2). > Thus no need to divide sysclk in the spi_mpc83xx. > > This patch also adds code to use get_brgfreq() on QE chips. > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > Acked-by: David Brownell <[EMAIL PROTECTED]> > --- > arch/powerpc/sysdev/fsl_soc.c | 44 > drivers/spi/spi_mpc83xx.c |6 + > 2 files changed, 32 insertions(+), 18 deletions(-) > applied - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/9] powerpc: Add the MPC8315E RDB dts
On Thu, 24 Jan 2008, Kim Phillips wrote: > Add the dts for the MPC8315E Reference Development Board (RDB). > > The board is a mini-ITX reference board with 128M DDR2, 8M flash, > 32M NAND, USB, PCI, gigabit ethernet, SATA, and serial. > > Signed-off-by: Jerry Huang <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/mpc8315erdb.dts | 287 > + > 1 files changed, 287 insertions(+), 0 deletions(-) > create mode 100644 arch/powerpc/boot/dts/mpc8315erdb.dts > applied. fixed up spi node - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/9] powerpc: add base platform support for the mpc8315 rdb board
On Thu, 24 Jan 2008, Kim Phillips wrote: > mpc8315 identical to mpc8313 here, just check compatible. > > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/platforms/83xx/Kconfig |2 +- > arch/powerpc/platforms/83xx/mpc831x_rdb.c |3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 6/9] add the mpc8315 rdb defconfig
On Thu, 24 Jan 2008, Kim Phillips wrote: > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/configs/mpc8315_rdb_defconfig | 1417 > > 1 files changed, 1417 insertions(+), 0 deletions(-) > create mode 100644 arch/powerpc/configs/mpc8315_rdb_defconfig > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [i2c] [PATCH] mpc i2c driver, compare to NO_IRQ instead of zero
Any final objections to this patch? When these were changed to 0 instead of NO_IRQ it should have broken polling mode on ppc. ppc would treat polling mode, NO_IRQ=-1, as an error. On powerpc this change is a NOP since NO_IRQ=0. On 1/21/08, Jon Smirl <[EMAIL PROTECTED]> wrote: > Alter the mpc i2c driver to use the NO_IRQ symbol instead of the constant > zero when checking for valid interrupts. NO_IRQ=-1 on ppc and NO_IRQ=0 on > powerpc so the checks against zero are not correct. > > Signed-off-by: Jon Smirl <[EMAIL PROTECTED]> > --- > > drivers/i2c/busses/i2c-mpc.c | 10 +- > 1 files changed, 5 insertions(+), 5 deletions(-) > > > diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c > index bbe787b..d20959d 100644 > --- a/drivers/i2c/busses/i2c-mpc.c > +++ b/drivers/i2c/busses/i2c-mpc.c > @@ -99,7 +99,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, > int writing) > u32 x; > int result = 0; > > - if (i2c->irq == 0) > + if (i2c->irq == NO_IRQ) > { > while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) { > schedule(); > @@ -329,7 +329,7 @@ static int fsl_i2c_probe(struct platform_device *pdev) > return -ENOMEM; > > i2c->irq = platform_get_irq(pdev, 0); > - if (i2c->irq < 0) { > + if (i2c->irq < NO_IRQ) { > result = -ENXIO; > goto fail_get_irq; > } > @@ -344,7 +344,7 @@ static int fsl_i2c_probe(struct platform_device *pdev) > goto fail_map; > } > > - if (i2c->irq != 0) > + if (i2c->irq != NO_IRQ) > if ((result = request_irq(i2c->irq, mpc_i2c_isr, > IRQF_SHARED, "i2c-mpc", i2c)) < 0) { > printk(KERN_ERR > @@ -367,7 +367,7 @@ static int fsl_i2c_probe(struct platform_device *pdev) > return result; > >fail_add: > - if (i2c->irq != 0) > + if (i2c->irq != NO_IRQ) > free_irq(i2c->irq, i2c); >fail_irq: > iounmap(i2c->base); > @@ -384,7 +384,7 @@ static int fsl_i2c_remove(struct platform_device *pdev) > i2c_del_adapter(&i2c->adap); > platform_set_drvdata(pdev, NULL); > > - if (i2c->irq != 0) > + if (i2c->irq != NO_IRQ) > free_irq(i2c->irq, i2c); > > iounmap(i2c->base); > > > ___ > i2c mailing list > [EMAIL PROTECTED] > http://lists.lm-sensors.org/mailman/listinfo/i2c > -- Jon Smirl [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] hide kernel only code in asm-powerpc/elf.h
stuff inside CONFIG_* should not be exported via make headers-install Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> --- include/asm-powerpc/elf.h |2 ++ 1 file changed, 2 insertions(+) --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h @@ -420,6 +420,7 @@ do { \ /* Keep this the last entry. */ #define R_PPC64_NUM107 +#ifdef __KERNEL__ #ifdef CONFIG_SPU_BASE /* Notes used in ET_CORE. Note name is "SPU//". */ #define NT_SPU 1 @@ -427,5 +428,6 @@ do { \ #define ARCH_HAVE_EXTRA_ELF_NOTES #endif /* CONFIG_SPU_BASE */ +#endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_ELF_H */ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull 'for-2.6.25' branch of 4xx tree
Hi Paul, Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git for-2.6.25 to pick up a few more patches for 4xx that should go in for 2.6.25. Mostly self explanatory in the changelogs. The diffstat is mostly from the PIKA Warp board patches that Sean worked quite hard on. thx, josh David Gibson (1): [POWERPC] Enable RTC for Ebony and Walnut (v2) Roel Kluin (1): [POWERPC] 4xx: logical/bitand typo in powerpc/boot/4xx.c Sean MacLennan (5): [POWERPC] 4xx: Add PowerPC 440EP Rev C [POWERPC] 4xx: PIKA Warp base platform [POWERPC] 4xx: PIKA Warp DTS [POWERPC] 4xx: PIKA Warp bootwrapper [POWERPC] 4xx: PIKA Warp defconfig Stefan Roese (2): [POWERPC] 4xx: Add 405EXr to cputable [POWERPC] 4xx: Add AMCC Haleakala (405EXr) dts arch/powerpc/Kconfig |2 +- arch/powerpc/boot/4xx.c|2 +- arch/powerpc/boot/Makefile |4 +- arch/powerpc/boot/cuboot-warp.c| 39 ++ arch/powerpc/boot/dts/ebony.dts|5 +- arch/powerpc/boot/dts/haleakala.dts| 274 + arch/powerpc/boot/dts/walnut.dts |5 +- arch/powerpc/boot/dts/warp.dts | 239 +++ arch/powerpc/configs/warp_defconfig| 1057 arch/powerpc/kernel/cputable.c | 28 +- arch/powerpc/platforms/40x/walnut.c|1 + arch/powerpc/platforms/44x/Kconfig | 15 + arch/powerpc/platforms/44x/Makefile|2 + arch/powerpc/platforms/44x/ebony.c |2 + arch/powerpc/platforms/44x/warp-nand.c | 105 arch/powerpc/platforms/44x/warp.c | 153 + arch/powerpc/platforms/Kconfig |6 + arch/powerpc/sysdev/Makefile |1 + arch/powerpc/sysdev/of_rtc.c | 59 ++ include/asm-powerpc/of_platform.h |2 + 20 files changed, 1992 insertions(+), 9 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/2] IB/ehca: Update sma_attr also in case of disruptive config change
Signed-off-by: Joachim Fenkes <[EMAIL PROTECTED]> --- drivers/infiniband/hw/ehca/ehca_irq.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index 863b34f..b5ca94c 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c @@ -403,6 +403,8 @@ static void parse_ec(struct ehca_shca *shca, u64 eqe) sport->port_state = IB_PORT_ACTIVE; dispatch_port_event(shca, port, IB_EVENT_PORT_ACTIVE, "is active"); + ehca_query_sma_attr(shca, port, + &sport->saved_attr); } else notify_port_conf_change(shca, port); break; -- 1.5.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] create modalias file in sysfs for bus of_platform
Olaf Hering writes: > Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading > of modules. modalias files are already present for many other bus types. This one causes various oopses on boot for me, both on a dual G5 and on a tibook. Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [i2c] [PATCH] Convert pfc8563 i2c driver from old style to new style
Any final objections to this patch? Jean can you pick it up? On 1/21/08, Jon Smirl <[EMAIL PROTECTED]> wrote: > Convert pfc8563 i2c driver from old style to new style. > > Signed-off-by: Jon Smirl <[EMAIL PROTECTED]> > --- > > drivers/rtc/rtc-pcf8563.c | 107 > +++-- > 1 files changed, 27 insertions(+), 80 deletions(-) > > > diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c > index b3317fc..8eff549 100644 > --- a/drivers/rtc/rtc-pcf8563.c > +++ b/drivers/rtc/rtc-pcf8563.c > @@ -25,10 +25,6 @@ > * located at 0x51 will pass the validation routine due to > * the way the registers are implemented. > */ > -static const unsigned short normal_i2c[] = { I2C_CLIENT_END }; > - > -/* Module parameters */ > -I2C_CLIENT_INSMOD; > > #define PCF8563_REG_ST10x00 /* status */ > #define PCF8563_REG_ST20x01 > @@ -72,9 +68,6 @@ struct pcf8563 { > int c_polarity; /* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx > */ > }; > > -static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind); > -static int pcf8563_detach(struct i2c_client *client); > - > /* > * In the routines that deal directly with the pcf8563 hardware, we use > * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch. > @@ -257,98 +250,52 @@ static const struct rtc_class_ops pcf8563_rtc_ops = { > .set_time = pcf8563_rtc_set_time, > }; > > -static int pcf8563_attach(struct i2c_adapter *adapter) > +static int pcf8563_remove(struct i2c_client *client) > { > - return i2c_probe(adapter, &addr_data, pcf8563_probe); > + struct rtc_device *rtc = i2c_get_clientdata(client); > + > + if (rtc) > + rtc_device_unregister(rtc); > + > + return 0; > } > > +static struct i2c_device_id pcf8563_id[] = { > + {"pcf8563", 0}, > + {"rtc8564", 0}, > + {}, > +}; > +MODULE_DEVICE_TABLE(i2c, pcf8563_id); > + > +static int pcf8563_probe(struct i2c_client *client, const struct > i2c_device_id *id); > + > static struct i2c_driver pcf8563_driver = { > .driver = { > - .name = "pcf8563", > + .name = "rtc-pcf8563", > }, > .id = I2C_DRIVERID_PCF8563, > - .attach_adapter = &pcf8563_attach, > - .detach_client = &pcf8563_detach, > + .probe = &pcf8563_probe, > + .remove = &pcf8563_remove, > + .id_table = pcf8563_id, > }; > > -static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind) > +static int pcf8563_probe(struct i2c_client *client, const struct > i2c_device_id *id) > { > - struct pcf8563 *pcf8563; > - struct i2c_client *client; > + int result; > struct rtc_device *rtc; > > - int err = 0; > - > - dev_dbg(&adapter->dev, "%s\n", __FUNCTION__); > - > - if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { > - err = -ENODEV; > - goto exit; > - } > - > - if (!(pcf8563 = kzalloc(sizeof(struct pcf8563), GFP_KERNEL))) { > - err = -ENOMEM; > - goto exit; > - } > - > - client = &pcf8563->client; > - client->addr = address; > - client->driver = &pcf8563_driver; > - client->adapter = adapter; > - > - strlcpy(client->name, pcf8563_driver.driver.name, I2C_NAME_SIZE); > - > - /* Verify the chip is really an PCF8563 */ > - if (kind < 0) { > - if (pcf8563_validate_client(client) < 0) { > - err = -ENODEV; > - goto exit_kfree; > - } > - } > - > - /* Inform the i2c layer */ > - if ((err = i2c_attach_client(client))) > - goto exit_kfree; > - > - dev_info(&client->dev, "chip found, driver version " DRV_VERSION > "\n"); > + result = pcf8563_validate_client(client); > + if (result) > + return result; > > rtc = rtc_device_register(pcf8563_driver.driver.name, &client->dev, > &pcf8563_rtc_ops, THIS_MODULE); > - > - if (IS_ERR(rtc)) { > - err = PTR_ERR(rtc); > - goto exit_detach; > - } > + if (IS_ERR(rtc)) > + return PTR_ERR(rtc); > > i2c_set_clientdata(client, rtc); > > return 0; > - > -exit_detach: > - i2c_detach_client(client); > - > -exit_kfree: > - kfree(pcf8563); > - > -exit: > - return err; > -} > - > -static int pcf8563_detach(struct i2c_client *client) > -{ > - struct pcf8563 *pcf8563 = container_of(client, struct pcf8563, > client); > - int err; > - struct rtc_device *rtc = i2c_get_clientdata(client); > - > - if (rtc) > - rtc_device_unregister(rtc); > - > - if ((err = i2c_detach_client(client))) > - return err; > - > - kfree(pcf8563); > - > - return 0; > } > > static int __ini
Re: [PATCH 5/5] [POWERPC] fsl_soc, legacy_serial: add support for "soc" compatible matching
On Fri, Jan 25, 2008 at 12:17:19PM -0600, Scott Wood wrote: > Anton Vorontsov wrote: > >Freescale soc register space: "fsl,soc" > >generic soc device: "soc" (or maybe "linux,soc" better?) > > > >I know, Scott Wood is pushing "-immr" thing forward... but > >I don't like that name because SOC isn't only device with the > >Internal Memory Mapped Registers. > > If you look in the manual for , you'll find something called > "Internal Memory Mapped Registers". Thus, the name -immr. Theory. > >(Think of QE placed outside of "soc"/"immr" node). > > When is the QE ever placed outside the soc/immr/ccsr node? > The QE registers are part of the IMMR/CCSR. Practice. $ grep qe@ arch/powerpc/boot/dts/* arch/powerpc/boot/dts/mpc832x_mds.dts: [EMAIL PROTECTED] { arch/powerpc/boot/dts/mpc832x_rdb.dts: [EMAIL PROTECTED] { arch/powerpc/boot/dts/mpc836x_mds.dts: [EMAIL PROTECTED] { arch/powerpc/boot/dts/mpc8568mds.dts: [EMAIL PROTECTED] { ^^^ if the practice is wrong, then we should fix it, and then -immr would be the good name indeed (just as I've said previously). -- 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 5/5] [POWERPC] fsl_soc, legacy_serial: add support for "soc" compatible matching
Anton Vorontsov wrote: > Freescale soc register space: "fsl,soc" > generic soc device: "soc" (or maybe "linux,soc" better?) > > I know, Scott Wood is pushing "-immr" thing forward... but > I don't like that name because SOC isn't only device with the > Internal Memory Mapped Registers. If you look in the manual for , you'll find something called "Internal Memory Mapped Registers". Thus, the name -immr. >(Think of QE placed outside of "soc"/"immr" node). When is the QE ever placed outside the soc/immr/ccsr node? The QE registers are part of the IMMR/CCSR. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 7/9] powerpc: add MPC837x RDB platform support
On Fri, 25 Jan 2008 10:17:14 -0600 Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Jan 24, 2008, at 8:47 PM, Kim Phillips wrote: > > > primarily based on mpc837x mds code. > > > > Signed-off-by: Joe D'Abbraccio <[EMAIL PROTECTED]> > > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > > --- > > Who's the actual other of these patches? (all 9 of them). I took Joe's 837x from: http://ozlabs.org/pipermail/linuxppc-embedded/2007-September/028460.html and updated them. 831x I took from Jerry Huang's tree and updated them. Kim ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
drivers/char/hvc_* and /Documentation/powerpc/hvcs.txt
Hi, I'm working on a console driver for the Freescale hypervisor. I notice a bunch of hvc_* files in the drivers/char directory. I also noticed /Documentation/powerpc/hvcs.txt. My guess is that hvcs.txt talks about drivers/char/hvcs.c, which is a console driver specific to some IBM hypervisor. The hvc_*.c files are based on that code but they're more generic and allow people to write console drivers for other hypervisors easliy. Am I right? If so, does this mean that I can take hvc_beat.c, modify it to make Freescale hypervisor calls instead, and presto, I'm done? -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 5/5] [POWERPC] fsl_soc, legacy_serial: add support for "soc" compatible matching
On Fri, Jan 25, 2008 at 08:13:55PM +0300, Anton Vorontsov wrote: [...] > My thinking: > > Freescale soc register space: "fsl,soc" > generic soc device: "soc" (or maybe "linux,soc" better?) > > I know, Scott Wood is pushing "-immr" thing forward... but > I don't like that name because SOC isn't only device with the > Internal Memory Mapped Registers. (Think of QE placed outside > of "soc"/"immr" node). > > Though, "soc" by itself is fully unfortunate name. QE is the > part of SOC too, as we used to call it when speaking of hardware. > But logically we divide things for "core soc" and "core soc's > companion/communication/offload modules", i.e. QE/CPMs/... > > We can remove that ambiguity by moving QE/CPMs nodes inside > the soc node. Then indeed -immr would be the best compatible for > the "soc" node. Oh, and yes, I'm aware that CPM's IMMRs are relocatable, and that's [most probably] why we have CPMs outside of soc node. So, my point is that that -immr name is too vague, so in my opinion we should avoid using it. -- 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
[PATCHv3 2.6.25] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers
Using the port of 2.4 code from Vitaly Bordug <[EMAIL PROTECTED]> and the actual algorithm used by the i2c driver of the DBox code on cvs.tuxboc.org from Tmbinc, Gillem ([EMAIL PROTECTED]). Renamed i2c-rpx.c and i2c-algo-8xx.c to i2c-cpm.c and converted the driver to an of_platform_driver. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8272ads.dts | 10 + arch/powerpc/boot/dts/mpc866ads.dts | 10 + arch/powerpc/boot/dts/mpc885ads.dts | 10 + arch/powerpc/platforms/8xx/mpc885ads_setup.c |5 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile |1 + drivers/i2c/busses/i2c-cpm.c | 759 ++ 7 files changed, 805 insertions(+), 0 deletions(-) create mode 100644 drivers/i2c/busses/i2c-cpm.c diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 7285ca1..7273996 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts @@ -215,6 +215,16 @@ linux,network-index = <1>; fsl,cpm-command = <16200300>; }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8248-i2c", +"fsl,cpm2-i2c", +"fsl,cpm-i2c"; + reg = <11860 20 8afc 2>; + interrupts = <1 8>; + interrupt-parent = <&PIC>; + fsl,cpm-command = <2960>; + }; }; PIC: [EMAIL PROTECTED] { diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts index daf9433..80c08bf 100644 --- a/arch/powerpc/boot/dts/mpc866ads.dts +++ b/arch/powerpc/boot/dts/mpc866ads.dts @@ -169,6 +169,16 @@ fsl,cpm-command = <>; linux,network-index = <1>; }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc866-i2c", +"fsl,cpm1-i2c", +"fsl,cpm-i2c"; + reg = <860 20 3c80 30>; + interrupts = <10 3>; + interrupt-parent = <&Cpm_pic>; + fsl,cpm-command = <0010>; + }; }; }; diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts index 8848e63..fd9c9d7 100644 --- a/arch/powerpc/boot/dts/mpc885ads.dts +++ b/arch/powerpc/boot/dts/mpc885ads.dts @@ -213,6 +213,16 @@ fsl,cpm-command = <0080>; linux,network-index = <2>; }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc885-i2c", +"fsl,cpm1-i2c", +"fsl,cpm-i2c"; + reg = <860 20 3c80 30>; + interrupts = <10>; + interrupt-parent = <&CPM_PIC>; + fsl,cpm-command = <0010>; + }; }; }; diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index f39447b..1e7d056 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c @@ -157,6 +157,11 @@ static struct cpm_pin mpc885ads_pins[] = { {CPM_PORTE, 28, CPM_PIN_OUTPUT}, {CPM_PORTE, 29, CPM_PIN_OUTPUT}, #endif + /* I2C */ +#ifdef CONFIG_I2C_8XX + {CPM_PORTB, 26, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN}, + {CPM_PORTB, 27, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN}, +#endif }; static void __init init_ioports(void) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index c466c6c..5950172 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -114,6 +114,16 @@ config I2C_BLACKFIN_TWI_CLK_KHZ help The unit of the TWI clock is kHz. +config I2C_CPM + tristate "Freescale CPM1 or CPM2 (MPC8xx/826x)" + depends on (CPM1 || CPM2) && I2C && PPC_OF + help + This supports the use of the I2C interface on Freescale + processors with CPM1 or CPM2. + + This driver can also be built as a module. If so, the module + will be called i2c-cpm. + config I2C_DAVINCI tristate "DaVinci I2C driver" depends on ARCH_DAVINCI diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index 81d43c2..a39 100644 --- a/drivers/i2c/
Re: [PATCH v2] [POWERPC] 85xx: Port STX GP3 board over from arch/ppc
On Thu, Jan 24, 2008 at 10:47:21PM -0600, Kumar Gala wrote: > + [EMAIL PROTECTED] { [EMAIL PROTECTED] -Scott > + [EMAIL PROTECTED] { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "fsl,mpc8560-cpm", "fsl,cpm2"; This is also a simple-bus. > +static struct of_device_id __initdata of_bus_ids[] = { > + { .name = "soc", }, > + { .type = "soc", }, > + { .name = "cpm", }, > + { .name = "localbus", }, > + { .compatible = "simple-bus", }, > + {}, > +}; You should be able to get rid of the others besides simple-bus (there may have been some confusion in what you asked over IRC yesterday -- I thought you were talking about compatible in the device tree, not here). -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[RFC][PATCH] remove section mappinng
Hi Paul/Ben/Anton, As part of making memory remove working on ppc64, I need the code to remove htab mappings for the section of the memory. Here is the code I cooked up, it seems to be working fine. But I have concerns where I need your help. In order to invalidate htab entries, we need to find the "slot". But I can only find the hpte group. Is it okay to invalidate the first entry in the group ? Do I need to invalidate the entire group ? Please help, as I would like to push this for 2.6.25/2.6.26. Thanks, Badari For memory remove, we need to remove htab mapping. Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> --- arch/powerpc/mm/hash_utils_64.c | 32 include/asm-powerpc/sparsemem.h |1 + 2 files changed, 33 insertions(+) Index: linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c === --- linux-2.6.24-rc8.orig/arch/powerpc/mm/hash_utils_64.c 2008-01-17 09:47:37.0 -0800 +++ linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c2008-01-25 07:57:48.0 -0800 @@ -191,6 +191,33 @@ int htab_bolt_mapping(unsigned long vsta return ret < 0 ? ret : 0; } +static void htab_remove_mapping(unsigned long vstart, unsigned long vend, + int psize, int ssize) +{ + unsigned long vaddr; + unsigned int step, shift; + + shift = mmu_psize_defs[psize].shift; + step = 1 << shift; + + for (vaddr = vstart; vaddr < vend; vaddr += step) { + unsigned long hash, hpteg; + unsigned long vsid = get_kernel_vsid(vaddr, ssize); + unsigned long va = hpt_va(vaddr, vsid, ssize); + + hash = hpt_hash(va, shift, ssize); + hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); + + /* +* HELP - how do I find the slot ? Is it okay to +* invalidates only first entry ? Do I need to +* remove entire group instead ? +*/ + BUG_ON(!ppc_md.hpte_invalidate); + ppc_md.hpte_invalidate(hpteg, va, psize, ssize, 0); + } +} + static int __init htab_dt_scan_seg_sizes(unsigned long node, const char *uname, int depth, void *data) @@ -436,6 +463,11 @@ void create_section_mapping(unsigned lon _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, mmu_linear_psize, mmu_kernel_ssize)); } + +void remove_section_mapping(unsigned long start, unsigned long end) +{ + htab_remove_mapping(start, end, mmu_linear_psize, mmu_kernel_ssize); +} #endif /* CONFIG_MEMORY_HOTPLUG */ static inline void make_bl(unsigned int *insn_addr, void *func) Index: linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h === --- linux-2.6.24-rc8.orig/include/asm-powerpc/sparsemem.h 2008-01-15 20:22:48.0 -0800 +++ linux-2.6.24-rc8/include/asm-powerpc/sparsemem.h2008-01-24 16:20:17.0 -0800 @@ -20,6 +20,7 @@ #ifdef CONFIG_MEMORY_HOTPLUG extern void create_section_mapping(unsigned long start, unsigned long end); +extern void remove_section_mapping(unsigned long start, unsigned long end); #ifdef CONFIG_NUMA extern int hot_add_scn_to_nid(unsigned long scn_addr); #else ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/2] IB/ehca: Add PMA support
From: Hoang-Nam Nguyen <[EMAIL PROTECTED]> This patch enables ehca to redirect any PMA queries to the actual PMA QP. Signed-off-by: Hoang-Nam Nguyen <[EMAIL PROTECTED]> Reviewed-by: Joachim Fenkes <[EMAIL PROTECTED]> Reviewed-by: Christoph Raisch <[EMAIL PROTECTED]> --- drivers/infiniband/hw/ehca/ehca_classes.h |1 + drivers/infiniband/hw/ehca/ehca_iverbs.h |5 ++ drivers/infiniband/hw/ehca/ehca_main.c|2 +- drivers/infiniband/hw/ehca/ehca_sqp.c | 91 + 4 files changed, 98 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index f281d16..92cce8a 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h @@ -101,6 +101,7 @@ struct ehca_sport { spinlock_t mod_sqp_lock; enum ib_port_state port_state; struct ehca_sma_attr saved_attr; + u32 pma_qp_nr; }; #define HCA_CAP_MR_PGSIZE_4K 0x8000 diff --git a/drivers/infiniband/hw/ehca/ehca_iverbs.h b/drivers/infiniband/hw/ehca/ehca_iverbs.h index c469bfd..a8a2ea5 100644 --- a/drivers/infiniband/hw/ehca/ehca_iverbs.h +++ b/drivers/infiniband/hw/ehca/ehca_iverbs.h @@ -187,6 +187,11 @@ int ehca_dealloc_ucontext(struct ib_ucontext *context); int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma); +int ehca_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, +struct ib_wc *in_wc, struct ib_grh *in_grh, +struct ib_mad *in_mad, +struct ib_mad *out_mad); + void ehca_poll_eqs(unsigned long data); int ehca_calc_ipd(struct ehca_shca *shca, int port, diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 0fe0c84..33b5bac 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c @@ -472,7 +472,7 @@ int ehca_init_device(struct ehca_shca *shca) shca->ib_device.dealloc_fmr = ehca_dealloc_fmr; shca->ib_device.attach_mcast= ehca_attach_mcast; shca->ib_device.detach_mcast= ehca_detach_mcast; - /* shca->ib_device.process_mad = ehca_process_mad; */ + shca->ib_device.process_mad = ehca_process_mad; shca->ib_device.mmap= ehca_mmap; if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) { diff --git a/drivers/infiniband/hw/ehca/ehca_sqp.c b/drivers/infiniband/hw/ehca/ehca_sqp.c index 79e72b2..706d97a 100644 --- a/drivers/infiniband/hw/ehca/ehca_sqp.c +++ b/drivers/infiniband/hw/ehca/ehca_sqp.c @@ -39,12 +39,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #include "ehca_classes.h" #include "ehca_tools.h" #include "ehca_iverbs.h" #include "hcp_if.h" +#define IB_MAD_STATUS_REDIRECT __constant_htons(0x0002) +#define IB_MAD_STATUS_UNSUP_VERSION__constant_htons(0x0004) +#define IB_MAD_STATUS_UNSUP_METHOD __constant_htons(0x0008) + +#define IB_PMA_CLASS_PORT_INFO __constant_htons(0x0001) /** * ehca_define_sqp - Defines special queue pair 1 (GSI QP). When special queue @@ -83,6 +89,9 @@ u64 ehca_define_sqp(struct ehca_shca *shca, port, ret); return ret; } + shca->sport[port - 1].pma_qp_nr = pma_qp_nr; + ehca_dbg(&shca->ib_device, "port=%x pma_qp_nr=%x", +port, pma_qp_nr); break; default: ehca_err(&shca->ib_device, "invalid qp_type=%x", @@ -109,3 +118,85 @@ u64 ehca_define_sqp(struct ehca_shca *shca, return H_SUCCESS; } + +struct ib_perf { + struct ib_mad_hdr mad_hdr; + u8 reserved[40]; + u8 data[192]; +} __attribute__ ((packed)); + + +static int ehca_process_perf(struct ib_device *ibdev, u8 port_num, +struct ib_mad *in_mad, struct ib_mad *out_mad) +{ + struct ib_perf *in_perf = (struct ib_perf *)in_mad; + struct ib_perf *out_perf = (struct ib_perf *)out_mad; + struct ib_class_port_info *poi = + (struct ib_class_port_info *)out_perf->data; + struct ehca_shca *shca = + container_of(ibdev, struct ehca_shca, ib_device); + struct ehca_sport *sport = &shca->sport[port_num - 1]; + + ehca_dbg(ibdev, "method=%x", in_perf->mad_hdr.method); + + *out_mad = *in_mad; + + if (in_perf->mad_hdr.class_version != 1) { + ehca_warn(ibdev, "Unsupported class_version=%x", + in_perf->mad_hdr.class_version); + out_perf->mad_hdr.status = IB_MAD_STATUS_UNSUP_VERSION; + goto perf_reply; + } + + switch (in_perf->mad_hdr.method) { + case IB_MGMT_METHOD_GET: + case IB_MGMT_METHOD_SET: + /* set class port info for redirection */ + out_perf->mad_hdr.attr_id = IB_PMA_CLASS_PORT_INFO;
[PATCH 0/2] IB/ehca: PMA support and a minor fix
This patchset will fix a minor issue and then add support for Performance MADs, which redirects all PMA queries to the actual PMA QP. [1/2] adds a missing query_pma_attr() [2/2] adds PMA redirection code The patches will apply, in order, on top of Roland's for-2.6.25 branch. Please review them and apply for 2.6.25 if you think they're okay. Thanks and regards, Joachim -- Joachim Fenkes -- eHCA Linux Driver Developer and Hardware Tamer IBM Deutschland Entwicklung GmbH -- Dept. 3627 (I/O Firmware Dev. 2) Schoenaicher Strasse 220 -- 71032 Boeblingen -- Germany eMail: [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [NET]: Remove PowerPC code from fec.c
Hi Frans, > Jochen Friedrich wrote: >> +++ b/drivers/net/fec.c >> @@ -23,6 +23,9 @@ >> * >> * Bug fixes and cleanup by Philippe De Muyter ([EMAIL PROTECTED]) >> * Copyright (c) 2004-2006 Macq Electronique SA. >> + * >> + * This driver is now only used on ColdFire processors. Remove conditional >> + * Powerpc code. >> */ > > This comment makes sense for a changelog, but IMO it makes no sense at all > to add it to the file. I just added it to clarify this code is now only used on m68knommu (Coldfire). The comments on top are mailny about MPC860T CPUs (PowerPC), however the driver is no longer used for these CPUs. Maybe the wording should be changed to: This driver is now only used on ColdFire (m68knommu) processors. Conditional PowerPC code has been removed. Thanks, Jochen ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCHv3 7/7] [POWERPC] Move definition of buffer descriptor to cpm.h
On Thu, 24 Jan 2008, Jochen Friedrich wrote: > Buffer descriptors are used by both CPM1 and CPM2. Move the definitions > from the cpm dependent include file to common cpm.h > > Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> > --- > include/asm-powerpc/cpm.h | 73 > include/asm-powerpc/cpm1.h | 65 --- > include/asm-powerpc/cpm2.h | 64 -- > 3 files changed, 73 insertions(+), 129 deletions(-) > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/9] enable FSL SATA driver config for Freescale SoCs
On Jan 24, 2008, at 8:46 PM, Kim Phillips wrote: > The mpc8315 shares the same SATA controller as the mpc837x, > and likelihood is that future SoCs from Freescale will also. > > Signed-off-by: Jerry Huang <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > Kumar, let me know if you want me to post this to the ata list (I'm > assuming it's not necessary). It is necessary so they are aware. CC jgarizk, but we'll take it via powerpc. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] mpc834x_mds: Convert device tree source to dts-v1
On Fri, 25 Jan 2008, Paul Gortmaker wrote: > Move mpc834x_mds device tree source forward to dts-v1 format. Nothing > too complex in this one, so it boils down to just adding a bunch of 0x > in the right places and converting clock speeds to decimal. > > Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/mpc834x_mds.dts | 254 > + > 1 files changed, 128 insertions(+), 126 deletions(-) > applied. I fixed up things so that interrupts use decimal. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH for-2.6.25] [POWERPC] Rename commproc to cpm1 and cpm2_common.c to cpm2.c
On Fri, 25 Jan 2008, Jochen Friedrich wrote: > Rename commproc.[ch] to cpm1.[ch] to be more consistent with cpm2. Also > rename cpm2_common.c to cpm2.c as suggested by Scott Wood. Adjust the > includes accordingly. > > Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> > --- > arch/powerpc/platforms/8xx/ep88xc.c |1 + > arch/powerpc/platforms/8xx/mpc86xads_setup.c |2 +- > arch/powerpc/platforms/8xx/mpc885ads_setup.c |2 +- > arch/powerpc/sysdev/Makefile |4 ++-- > arch/powerpc/sysdev/{commproc.c => cpm1.c}|4 ++-- > arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} |3 +-- > arch/powerpc/sysdev/micropatch.c |2 +- > arch/ppc/8260_io/enet.c |2 +- > arch/ppc/8xx_io/commproc.c|2 +- > arch/ppc/8xx_io/enet.c|6 +++--- > arch/ppc/8xx_io/fec.c |2 +- > arch/ppc/8xx_io/micropatch.c |2 +- > arch/ppc/boot/simple/iic.c|2 +- > arch/ppc/boot/simple/m8xx_tty.c |2 +- > arch/ppc/kernel/ppc_ksyms.c |2 +- > arch/ppc/platforms/mpc866ads_setup.c |2 +- > arch/ppc/platforms/mpc885ads_setup.c |2 +- > arch/ppc/syslib/mpc8xx_devices.c |2 +- > arch/ppc/xmon/start_8xx.c |2 +- > drivers/net/fec_8xx/fec_8xx-netta.c |2 +- > drivers/net/fec_8xx/fec_main.c|2 +- > drivers/net/fec_8xx/fec_mii.c |2 +- > drivers/net/fs_enet/fs_enet.h |2 +- > drivers/net/fs_enet/mac-fec.c |2 +- > drivers/net/fs_enet/mac-scc.c |2 +- > drivers/serial/cpm_uart/cpm_uart_cpm1.h |2 +- > include/asm-powerpc/{commproc.h => cpm1.h}|8 > include/asm-ppc/{commproc.h => cpm1.h}|8 > 28 files changed, 38 insertions(+), 38 deletions(-) > rename arch/powerpc/sysdev/{commproc.c => cpm1.c} (99%) > rename arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} (99%) > rename include/asm-powerpc/{commproc.h => cpm1.h} (99%) > rename include/asm-ppc/{commproc.h => cpm1.h} (99%) > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 08/11] ps3fb: Reorganize modedb handling
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: Reorganize modedb handling: - Reorder the video modes in ps3fb_modedb, for easier indexing using PS3AV_MODE_* numbers, - Introduce ps3fb_native_vmode(), to convert from native (PS3AV_MODE_*) mode numbers to struct fb_videomode *, - Rename and move ps3fb_default_mode() to ps3fb_vmode(). Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c | 116 +- 1 file changed, 60 insertions(+), 56 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -146,6 +146,8 @@ struct ps3fb_par { }; +#define FIRST_NATIVE_MODE_INDEX10 + static const struct fb_videomode ps3fb_modedb[] = { /* 60 Hz broadcast modes (modes "1" to "5") */ { @@ -193,24 +195,7 @@ static const struct fb_videomode ps3fb_m FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED }, -/* VESA modes (modes "11" to "13") */ -{ - /* WXGA */ - "wxga", 60, 1280, 768, 12924, 160, 24, 29, 3, 136, 6, - 0, FB_VMODE_NONINTERLACED, - FB_MODE_IS_VESA -}, { - /* SXGA */ - "sxga", 60, 1280, 1024, 9259, 248, 48, 38, 1, 112, 3, - FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, - FB_MODE_IS_VESA -}, { - /* WUXGA */ - "wuxga", 60, 1920, 1200, 6494, 80, 48, 26, 3, 32, 6, - FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, - FB_MODE_IS_VESA -}, - +[FIRST_NATIVE_MODE_INDEX] = /* 60 Hz broadcast modes (full resolution versions of modes "1" to "5") */ { /* 480if */ @@ -255,6 +240,24 @@ static const struct fb_videomode ps3fb_m /* 1080pf */ "1080pf", 50, 1920, 1080, 6734, 148, 484, 36, 4, 88, 5, FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED +}, + +/* VESA modes (modes "11" to "13") */ +{ + /* WXGA */ + "wxga", 60, 1280, 768, 12924, 160, 24, 29, 3, 136, 6, + 0, FB_VMODE_NONINTERLACED, + FB_MODE_IS_VESA +}, { + /* SXGA */ + "sxga", 60, 1280, 1024, 9259, 248, 48, 38, 1, 112, 3, + FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, + FB_MODE_IS_VESA +}, { + /* WUXGA */ + "wuxga", 60, 1920, 1200, 6494, 80, 48, 26, 3, 32, 6, + FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, + FB_MODE_IS_VESA } }; @@ -298,20 +301,43 @@ static int ps3fb_cmp_mode(const struct f return 0; } +static const struct fb_videomode *ps3fb_native_vmode(enum ps3av_mode_num id) +{ + return &ps3fb_modedb[FIRST_NATIVE_MODE_INDEX + id - 1]; +} + +static const struct fb_videomode *ps3fb_vmode(int id) +{ + u32 mode = id & PS3AV_MODE_MASK; + + if (mode < PS3AV_MODE_480I || mode > PS3AV_MODE_WUXGA) + return NULL; + + if (mode <= PS3AV_MODE_1080P50 && !(id & PS3AV_MODE_FULL)) { + /* Non-fullscreen broadcast mode */ + return &ps3fb_modedb[mode - 1]; + } + + return ps3fb_native_vmode(mode); +} + static unsigned int ps3fb_find_mode(struct fb_var_screeninfo *var, u32 *ddr_line_length, u32 *xdr_line_length) { - unsigned int i, mode; + unsigned int id; + const struct fb_videomode *vmode; - for (i = PS3AV_MODE_1080P50; i < ARRAY_SIZE(ps3fb_modedb); i++) - if (!ps3fb_cmp_mode(&ps3fb_modedb[i], var)) + for (id = PS3AV_MODE_480I; id <= PS3AV_MODE_WUXGA; id++) { + vmode = ps3fb_native_vmode(id); + if (!ps3fb_cmp_mode(vmode, var)) goto found; + } - pr_debug("ps3fb_find_mode: mode not found\n"); + pr_debug("%s: mode not found\n", __func__); return 0; found: - *ddr_line_length = ps3fb_modedb[i].xres * BPP; + *ddr_line_length = vmode->xres * BPP; if (!var->xres) { var->xres = 1; @@ -330,36 +356,14 @@ found: } else *xdr_line_length = *ddr_line_length; - mode = i+1; - if (mode > PS3AV_MODE_WUXGA) { - mode -= PS3AV_MODE_WUXGA; + if (vmode->sync & FB_SYNC_BROADCAST) { /* Full broadcast modes have the full mode bit set */ - if (ps3fb_modedb[i].xres == var->xres && - ps3fb_modedb[i].yres == var->yres) - mode |= PS3AV_MODE_FULL; - } - - pr_debug("ps3fb_find_mode: mode %u\n", mode); - - return mode; -} - -static const struct fb_videomode *ps3fb_default_mode(int id) -{ - u32 mode = id & PS3AV_MODE_MASK; - u32 flags; - - if (mode < PS3AV_MODE_480I || mode > PS3AV_MODE_WUXGA) - return NULL; - - flags = id & ~PS3AV_MODE_MASK; - - if (mode <= PS3AV_MODE_1080P50 && flags & PS3AV_MODE_FULL) { - /* Full broadcast mode */ - return &ps3fb_modedb[mode + PS3AV_MODE_WUXGA - 1]; + if (vmode->xres == va
[patch 09/11] ps3fb: Round up video modes
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: Round up arbitrary video modes until they fit (if possible) Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c | 160 +++--- 1 file changed, 114 insertions(+), 46 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -276,29 +276,49 @@ static char *mode_option __devinitdata; static int ps3fb_cmp_mode(const struct fb_videomode *vmode, const struct fb_var_screeninfo *var) { - /* resolution + black border must match a native resolution */ - if (vmode->left_margin + vmode->xres + vmode->right_margin != - var->left_margin + var->xres + var->right_margin || - vmode->upper_margin + vmode->yres + vmode->lower_margin != - var->upper_margin + var->yres + var->lower_margin) + long xres, yres, left_margin, right_margin, upper_margin, lower_margin; + long dx, dy; + + /* maximum values */ + if (var->xres > vmode->xres || var->yres > vmode->yres || + var->pixclock > vmode->pixclock || + var->hsync_len > vmode->hsync_len || + var->vsync_len > vmode->vsync_len) return -1; - /* minimum limits for margins */ - if (vmode->left_margin > var->left_margin || - vmode->right_margin > var->right_margin || - vmode->upper_margin > var->upper_margin || - vmode->lower_margin > var->lower_margin) + /* progressive/interlaced must match */ + if ((var->vmode & FB_VMODE_MASK) != vmode->vmode) return -1; - /* these fields must match exactly */ - if (vmode->pixclock != var->pixclock || - vmode->hsync_len != var->hsync_len || - vmode->vsync_len != var->vsync_len || - vmode->sync != var->sync || - vmode->vmode != (var->vmode & FB_VMODE_MASK)) + /* minimum resolution */ + xres = max(var->xres, 1U); + yres = max(var->yres, 1U); + + /* minimum margins */ + left_margin = max(var->left_margin, vmode->left_margin); + right_margin = max(var->right_margin, vmode->right_margin); + upper_margin = max(var->upper_margin, vmode->upper_margin); + lower_margin = max(var->lower_margin, vmode->lower_margin); + + /* resolution + margins may not exceed native parameters */ + dx = ((long)vmode->left_margin + (long)vmode->xres + + (long)vmode->right_margin) - +(left_margin + xres + right_margin); + if (dx < 0) return -1; - return 0; + dy = ((long)vmode->upper_margin + (long)vmode->yres + + (long)vmode->lower_margin) - +(upper_margin + yres + lower_margin); + if (dy < 0) + return -1; + + /* exact match */ + if (!dx && !dy) + return 0; + + /* resolution difference */ + return (vmode->xres - xres) * (vmode->yres - yres); } static const struct fb_videomode *ps3fb_native_vmode(enum ps3av_mode_num id) @@ -324,33 +344,96 @@ static const struct fb_videomode *ps3fb_ static unsigned int ps3fb_find_mode(struct fb_var_screeninfo *var, u32 *ddr_line_length, u32 *xdr_line_length) { - unsigned int id; + unsigned int id, best_id; + int diff, best_diff; const struct fb_videomode *vmode; + long gap; + best_id = 0; + best_diff = INT_MAX; + pr_debug("%s: wanted %u [%u] %u x %u [%u] %u\n", __func__, +var->left_margin, var->xres, var->right_margin, +var->upper_margin, var->yres, var->lower_margin); for (id = PS3AV_MODE_480I; id <= PS3AV_MODE_WUXGA; id++) { vmode = ps3fb_native_vmode(id); - if (!ps3fb_cmp_mode(vmode, var)) - goto found; + diff = ps3fb_cmp_mode(vmode, var); + pr_debug("%s: mode %u: %u [%u] %u x %u [%u] %u: diff = %d\n", +__func__, id, vmode->left_margin, vmode->xres, +vmode->right_margin, vmode->upper_margin, +vmode->yres, vmode->lower_margin, diff); + if (diff < 0) + continue; + if (diff < best_diff) { + best_id = id; + if (!diff) + break; + best_diff = diff; + } } - pr_debug("%s: mode not found\n", __func__); - return 0; + if (!best_id) { + pr_debug("%s: no suitable mode found\n", __func__); + return 0; + } + + id = best_id; + vmode = ps3fb_native_vmode(id); -found: *ddr_line_length = vmode->xres * BPP; - if (!var->xres) { + /* minimum resolution */ + if (!var->xres) var->xres = 1; - var->right_ma
[patch 11/11] ps3fb: Fix modedb typos
From: Geoff Levand <[EMAIL PROTECTED]> ps3fb: Fix modedb typos Signed-off-by: Geoff Levand <[EMAIL PROTECTED]> Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -184,7 +184,7 @@ static const struct fb_videomode ps3fb_m "720p", 50, 1124, 644, 13468, 298, 478, 57, 44, 80, 5, FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED },{ -/* 1080 */ +/* 1080i */ "1080i", 50, 1688, 964, 13468, 264, 600, 94, 62, 88, 5, FB_SYNC_BROADCAST, FB_VMODE_INTERLACED },{ @@ -232,7 +232,7 @@ static const struct fb_videomode ps3fb_m FB_SYNC_BROADCAST, FB_VMODE_NONINTERLACED }, { /* 1080if */ - "1080f", 50, 1920, 1080, 13468, 148, 484, 36, 4, 88, 5, + "1080if", 50, 1920, 1080, 13468, 148, 484, 36, 4, 88, 5, FB_SYNC_BROADCAST, FB_VMODE_INTERLACED }, { /* 1080pf */ -- With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 10/11] ps3fb: Cleanup sweep
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: cleanup sweep: - Kill ps3fb_priv.xdr_ea and ps3fb_priv.xdr_size, use info->screen_base and info->fix.smem_len instead. - Kill superfluous assignments to info->fix.smem_start, info->fix.smem_len, and info->screen_base in ps3fb_set_par(). Their values never change. - Add sparse annotations to casts to kill address space warnings Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c | 64 +- 1 file changed, 27 insertions(+), 37 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -116,8 +116,6 @@ struct ps3fb_priv { unsigned int irq_no; u64 context_handle, memory_handle; - void *xdr_ea; - size_t xdr_size; struct gpu_driver_info *dinfo; u64 vblank_count; /* frame count */ @@ -598,7 +596,7 @@ static int ps3fb_check_var(struct fb_var } /* Memory limit */ - if (var->yres_virtual * xdr_line_length > ps3fb.xdr_size) { + if (var->yres_virtual * xdr_line_length > info->fix.smem_len) { dev_dbg(info->device, "Not enough memory\n"); return -ENOMEM; } @@ -627,19 +625,15 @@ static int ps3fb_set_par(struct fb_info vmode = ps3fb_native_vmode(mode & PS3AV_MODE_MASK); - info->fix.smem_start = virt_to_abs(ps3fb.xdr_ea); - info->fix.smem_len = ps3fb.xdr_size; info->fix.xpanstep = info->var.xres_virtual > info->var.xres ? 1 : 0; info->fix.ypanstep = info->var.yres_virtual > info->var.yres ? 1 : 0; info->fix.line_length = xdr_line_length; - info->screen_base = (char __iomem *)ps3fb.xdr_ea; - par->ddr_line_length = ddr_line_length; par->ddr_frame_size = vmode->yres * ddr_line_length; par->xdr_frame_size = info->var.yres_virtual * xdr_line_length; - par->num_frames = ps3fb.xdr_size / + par->num_frames = info->fix.smem_len / max(par->ddr_frame_size, par->xdr_frame_size); /* Keep the special bits we cannot set using fb_var_screeninfo */ @@ -667,13 +661,13 @@ static int ps3fb_set_par(struct fb_info } /* Clear XDR frame buffer memory */ - memset(ps3fb.xdr_ea, 0, ps3fb.xdr_size); + memset((void __force *)info->screen_base, 0, info->fix.smem_len); /* Clear DDR frame buffer memory */ lines = vmode->yres * par->num_frames; if (par->full_offset) lines++; - maxlines = ps3fb.xdr_size / ddr_line_length; + maxlines = info->fix.smem_len / ddr_line_length; for (dst = 0; lines; dst += maxlines * ddr_line_length) { unsigned int l = min(lines, maxlines); ps3fb_sync_image(info->device, 0, dst, 0, vmode->xres, l, @@ -1017,10 +1011,9 @@ static int ps3fb_xdr_settings(u64 xdr_lp __func__, status); return -ENXIO; } - dev_dbg(dev, - "video:%p xdr_ea:%p ioif:%lx lpar:%lx phys:%lx size:%lx\n", - ps3fb_videomemory.address, ps3fb.xdr_ea, GPU_IOIF, xdr_lpar, - virt_to_abs(ps3fb.xdr_ea), ps3fb_videomemory.size); + dev_dbg(dev, "video:%p ioif:%lx lpar:%lx size:%lx\n", + ps3fb_videomemory.address, GPU_IOIF, xdr_lpar, + ps3fb_videomemory.size); status = lv1_gpu_context_attribute(ps3fb.context_handle, L1GPU_CONTEXT_ATTRIBUTE_FB_SETUP, @@ -1103,6 +1096,7 @@ static int __devinit ps3fb_probe(struct u64 lpar_reports = 0; u64 lpar_reports_size = 0; u64 xdr_lpar; + void *fb_start; int status; struct task_struct *task; unsigned long max_ps3fb_size; @@ -1158,7 +1152,7 @@ static int __devinit ps3fb_probe(struct } /* vsync interrupt */ - ps3fb.dinfo = ioremap(lpar_driver_info, 128 * 1024); + ps3fb.dinfo = (void __force *)ioremap(lpar_driver_info, 128 * 1024); if (!ps3fb.dinfo) { dev_err(&dev->core, "%s: ioremap failed\n", __func__); goto err_gpu_context_free; @@ -1168,22 +1162,10 @@ static int __devinit ps3fb_probe(struct if (retval) goto err_iounmap_dinfo; - /* XDR frame buffer */ - ps3fb.xdr_ea = ps3fb_videomemory.address; - xdr_lpar = ps3_mm_phys_to_lpar(__pa(ps3fb.xdr_ea)); - /* Clear memory to prevent kernel info leakage into userspace */ - memset(ps3fb.xdr_ea, 0, ps3fb_videomemory.size); - - /* -* The GPU command buffer is at the start of video memory -* As we don't use the full command buffer, we can put the actual -* frame buffer at offset GPU_FB_START and save some precious XDR -* memory -*/ - ps3fb.xdr_ea += GPU_FB_START; - ps3fb.xdr_size = ps3fb_videomemory.size - GPU_FB_START; + memset(ps3fb_videomemory.ad
[patch 07/11] ps3fb: Add support for configurable black borders
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: Allow all video modes where the visible resolution plus the black borders matches a native resolution Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> -- drivers/video/ps3fb.c | 69 +++--- 1 file changed, 49 insertions(+), 20 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -270,32 +270,57 @@ module_param(ps3fb_mode, int, 0); static char *mode_option __devinitdata; -static unsigned int ps3fb_find_mode(const struct fb_var_screeninfo *var, +static int ps3fb_cmp_mode(const struct fb_videomode *vmode, + const struct fb_var_screeninfo *var) +{ + /* resolution + black border must match a native resolution */ + if (vmode->left_margin + vmode->xres + vmode->right_margin != + var->left_margin + var->xres + var->right_margin || + vmode->upper_margin + vmode->yres + vmode->lower_margin != + var->upper_margin + var->yres + var->lower_margin) + return -1; + + /* minimum limits for margins */ + if (vmode->left_margin > var->left_margin || + vmode->right_margin > var->right_margin || + vmode->upper_margin > var->upper_margin || + vmode->lower_margin > var->lower_margin) + return -1; + + /* these fields must match exactly */ + if (vmode->pixclock != var->pixclock || + vmode->hsync_len != var->hsync_len || + vmode->vsync_len != var->vsync_len || + vmode->sync != var->sync || + vmode->vmode != (var->vmode & FB_VMODE_MASK)) + return -1; + + return 0; +} + +static unsigned int ps3fb_find_mode(struct fb_var_screeninfo *var, u32 *ddr_line_length, u32 *xdr_line_length) { - unsigned int i, fi, mode; + unsigned int i, mode; - for (i = 0; i < ARRAY_SIZE(ps3fb_modedb); i++) - if (var->xres == ps3fb_modedb[i].xres && - var->yres == ps3fb_modedb[i].yres && - var->pixclock == ps3fb_modedb[i].pixclock && - var->hsync_len == ps3fb_modedb[i].hsync_len && - var->vsync_len == ps3fb_modedb[i].vsync_len && - var->left_margin == ps3fb_modedb[i].left_margin && - var->right_margin == ps3fb_modedb[i].right_margin && - var->upper_margin == ps3fb_modedb[i].upper_margin && - var->lower_margin == ps3fb_modedb[i].lower_margin && - var->sync == ps3fb_modedb[i].sync && - (var->vmode & FB_VMODE_MASK) == ps3fb_modedb[i].vmode) + for (i = PS3AV_MODE_1080P50; i < ARRAY_SIZE(ps3fb_modedb); i++) + if (!ps3fb_cmp_mode(&ps3fb_modedb[i], var)) goto found; pr_debug("ps3fb_find_mode: mode not found\n"); return 0; found: - /* Cropped broadcast modes use the full line length */ - fi = i < PS3AV_MODE_1080P50 ? i + PS3AV_MODE_WUXGA : i; - *ddr_line_length = ps3fb_modedb[fi].xres * BPP; + *ddr_line_length = ps3fb_modedb[i].xres * BPP; + + if (!var->xres) { + var->xres = 1; + var->right_margin--; + } + if (!var->yres) { + var->yres = 1; + var->lower_margin--; + } if (ps3_compare_firmware_version(1, 9, 0) >= 0) { *xdr_line_length = GPU_ALIGN_UP(max(var->xres, @@ -305,10 +330,14 @@ found: } else *xdr_line_length = *ddr_line_length; - /* Full broadcast modes have the full mode bit set */ mode = i+1; - if (mode > PS3AV_MODE_WUXGA) - mode = (mode - PS3AV_MODE_WUXGA) | PS3AV_MODE_FULL; + if (mode > PS3AV_MODE_WUXGA) { + mode -= PS3AV_MODE_WUXGA; + /* Full broadcast modes have the full mode bit set */ + if (ps3fb_modedb[i].xres == var->xres && + ps3fb_modedb[i].yres == var->yres) + mode |= PS3AV_MODE_FULL; + } pr_debug("ps3fb_find_mode: mode %u\n", mode); -- With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 05/11] ps3fb: Kill ps3fb_res
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: kill ps3fb_res[], as all information it contains can be obtained in some other way. Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c | 108 ++ 1 file changed, 22 insertions(+), 86 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -134,42 +134,17 @@ static struct ps3fb_priv ps3fb; struct ps3fb_par { u32 pseudo_palette[16]; int mode_id, new_mode_id; - int res_index; unsigned int num_frames;/* num of frame buffers */ unsigned int width; unsigned int height; + unsigned int ddr_line_length; + unsigned int ddr_frame_size; + unsigned int xdr_frame_size; unsigned long full_offset; /* start of fullscreen DDR fb */ unsigned long fb_offset;/* start of actual DDR fb */ unsigned long pan_offset; }; -struct ps3fb_res_table { - u32 xres; - u32 yres; - u32 xoff; - u32 yoff; - u32 type; -}; -#define PS3FB_RES_FULL 1 -static const struct ps3fb_res_table ps3fb_res[] = { - /* res_x,y margin_x,y full */ - { 720, 480, 72, 48 , 0}, - { 720, 576, 72, 58 , 0}, - { 1280, 720, 78, 38 , 0}, - { 1920, 1080, 116, 58 , 0}, - /* full mode */ - { 720, 480, 0, 0 , PS3FB_RES_FULL}, - { 720, 576, 0, 0 , PS3FB_RES_FULL}, - { 1280, 720, 0, 0 , PS3FB_RES_FULL}, - { 1920, 1080, 0, 0 , PS3FB_RES_FULL}, - /* vesa: normally full mode */ - { 1280, 768, 0, 0 , 0}, - { 1280, 1024, 0, 0 , 0}, - { 1920, 1200, 0, 0 , 0}, - {0,0, 0, 0 , 0} }; - -/* default resolution */ -#define GPU_RES_INDEX 0 /* 720 x 480 */ static const struct fb_videomode ps3fb_modedb[] = { /* 60 Hz broadcast modes (modes "1" to "5") */ @@ -295,37 +270,6 @@ module_param(ps3fb_mode, int, 0); static char *mode_option __devinitdata; -static int ps3fb_get_res_table(u32 xres, u32 yres, int mode) -{ - int full_mode; - unsigned int i; - u32 x, y, f; - - full_mode = (mode & PS3AV_MODE_FULL) ? PS3FB_RES_FULL : 0; - for (i = 0;; i++) { - x = ps3fb_res[i].xres; - y = ps3fb_res[i].yres; - f = ps3fb_res[i].type; - - if (!x) { - pr_debug("ERROR: ps3fb_get_res_table()\n"); - return -1; - } - - if (full_mode == PS3FB_RES_FULL && f != PS3FB_RES_FULL) - continue; - - if (x == xres && (yres == 0 || y == yres)) - break; - - x = x - 2 * ps3fb_res[i].xoff; - y = y - 2 * ps3fb_res[i].yoff; - if (x == xres && (yres == 0 || y == yres)) - break; - } - return i; -} - static unsigned int ps3fb_find_mode(const struct fb_var_screeninfo *var, u32 *ddr_line_length, u32 *xdr_line_length) { @@ -433,8 +377,7 @@ static void ps3fb_sync_image(struct devi static int ps3fb_sync(struct fb_info *info, u32 frame) { struct ps3fb_par *par = info->par; - int i, error = 0; - u32 ddr_line_length, xdr_line_length; + int error = 0; u64 ddr_base, xdr_base; if (frame > par->num_frames - 1) { @@ -444,16 +387,13 @@ static int ps3fb_sync(struct fb_info *in goto out; } - i = par->res_index; - xdr_line_length = info->fix.line_length; - ddr_line_length = ps3fb_res[i].xres * BPP; - xdr_base = frame * info->var.yres_virtual * xdr_line_length; - ddr_base = frame * ps3fb_res[i].yres * ddr_line_length; + xdr_base = frame * par->xdr_frame_size; + ddr_base = frame * par->ddr_frame_size; ps3fb_sync_image(info->device, ddr_base + par->full_offset, ddr_base + par->fb_offset, xdr_base + par->pan_offset, -par->width, par->height, ddr_line_length, -xdr_line_length); +par->width, par->height, par->ddr_line_length, +info->fix.line_length); out: return error; @@ -572,8 +512,9 @@ static int ps3fb_set_par(struct fb_info { struct ps3fb_par *par = info->par; unsigned int mode, ddr_line_length, xdr_line_length, lines, maxlines; - int i; + unsigned int ddr_xoff, ddr_yoff; unsigned long offset; + const struct fb_videomode *vmode; u64 dst; dev_dbg(info->device, "xres:%d xv:%d yres:%d yv:%d clock:%d\n", @@ -584,8 +525,7 @@ static int ps3fb_set_par(struct fb_info if (!mode) return -EINVAL; - i = ps3fb_get_res_table(info->var.xres, info->var.yres, mode); - par->res_index = i; + vmode = ps3fb_default_mode(mode | PS3AV_
[patch 06/11] ps3fb: Make frame buffer offsets unsigned int
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: Frame buffer offsets don't have to be `unsigned long', `unsigned int' is sufficient Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -140,9 +140,9 @@ struct ps3fb_par { unsigned int ddr_line_length; unsigned int ddr_frame_size; unsigned int xdr_frame_size; - unsigned long full_offset; /* start of fullscreen DDR fb */ - unsigned long fb_offset;/* start of actual DDR fb */ - unsigned long pan_offset; + unsigned int full_offset; /* start of fullscreen DDR fb */ + unsigned int fb_offset; /* start of actual DDR fb */ + unsigned int pan_offset; }; @@ -512,8 +512,7 @@ static int ps3fb_set_par(struct fb_info { struct ps3fb_par *par = info->par; unsigned int mode, ddr_line_length, xdr_line_length, lines, maxlines; - unsigned int ddr_xoff, ddr_yoff; - unsigned long offset; + unsigned int ddr_xoff, ddr_yoff, offset; const struct fb_videomode *vmode; u64 dst; -- With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 03/11] ps3fb: Kill PS3FB_FULL_MODE_BIT
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: Kill PS3FB_FULL_MODE_BIT, use PS3AV_MODE_FULL instead Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -57,8 +57,6 @@ #define GPU_ALIGN_UP(x)_ALIGN_UP((x), 64) #define GPU_MAX_LINE_LENGTH(65536 - 64) -#define PS3FB_FULL_MODE_BIT0x80 - #define GPU_INTR_STATUS_VSYNC_00 /* vsync on head A */ #define GPU_INTR_STATUS_VSYNC_11 /* vsync on head B */ #define GPU_INTR_STATUS_FLIP_0 3 /* flip head A */ @@ -310,7 +308,7 @@ static int ps3fb_get_res_table(u32 xres, unsigned int i; u32 x, y, f; - full_mode = (mode & PS3FB_FULL_MODE_BIT) ? PS3FB_RES_FULL : 0; + full_mode = (mode & PS3AV_MODE_FULL) ? PS3FB_RES_FULL : 0; for (i = 0;; i++) { x = ps3fb_res[i].xres; y = ps3fb_res[i].yres; @@ -373,7 +371,7 @@ found: /* Full broadcast modes have the full mode bit set */ mode = i+1; if (mode > PS3AV_MODE_WUXGA) - mode = (mode - PS3AV_MODE_WUXGA) | PS3FB_FULL_MODE_BIT; + mode = (mode - PS3AV_MODE_WUXGA) | PS3AV_MODE_FULL; pr_debug("ps3fb_find_mode: mode %u\n", mode); @@ -390,7 +388,7 @@ static const struct fb_videomode *ps3fb_ flags = id & ~PS3AV_MODE_MASK; - if (mode <= PS3AV_MODE_1080P50 && flags & PS3FB_FULL_MODE_BIT) { + if (mode <= PS3AV_MODE_1080P50 && flags & PS3AV_MODE_FULL) { /* Full broadcast mode */ return &ps3fb_modedb[mode + PS3AV_MODE_WUXGA - 1]; } -- With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 04/11] ps3fb: Inline macros that are used only once
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3fb: inline the X_OFF(), Y_OFF(), WIDTH(), HEIGHT(), and VP_OFF() macros, as they're used in one place only Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/video/ps3fb.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -287,15 +287,8 @@ static const struct fb_videomode ps3fb_m #define HEAD_A #define HEAD_B -#define X_OFF(i) (ps3fb_res[i].xoff) /* left/right margin (pixel) */ -#define Y_OFF(i) (ps3fb_res[i].yoff) /* top/bottom margin (pixel) */ -#define WIDTH(i) (ps3fb_res[i].xres) /* width of FB */ -#define HEIGHT(i) (ps3fb_res[i].yres) /* height of FB */ #define BPP4 /* number of bytes per pixel */ -/* Start of the virtual frame buffer (relative to fullscreen ) */ -#define VP_OFF(i) ((WIDTH(i) * Y_OFF(i) + X_OFF(i)) * BPP) - static int ps3fb_mode; module_param(ps3fb_mode, int, 0); @@ -611,7 +604,10 @@ static int ps3fb_set_par(struct fb_info par->width = info->var.xres; par->height = info->var.yres; - offset = VP_OFF(i); + + /* Start of the virtual frame buffer (relative to fullscreen) */ + offset = ps3fb_res[i].yoff * ddr_line_length + ps3fb_res[i].xoff * BPP; + par->fb_offset = GPU_ALIGN_UP(offset); par->full_offset = par->fb_offset - offset; par->pan_offset = info->var.yoffset * xdr_line_length + -- With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 02/11] ps3: Use symbolic names for video modes
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3: Use symbolic names for video modes Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/ps3/ps3av.c | 39 --- drivers/video/ps3fb.c | 17 ++--- include/asm-powerpc/ps3av.h | 41 ++--- 3 files changed, 60 insertions(+), 37 deletions(-) --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c @@ -542,7 +542,7 @@ static void ps3av_set_videomode_packet(u static void ps3av_set_videomode_cont(u32 id, u32 old_id) { - static int vesa = 0; + static int vesa; int res; /* video signal off */ @@ -552,9 +552,9 @@ static void ps3av_set_videomode_cont(u32 * AV backend needs non-VESA mode setting at least one time * when VESA mode is used. */ - if (vesa == 0 && (id & PS3AV_MODE_MASK) >= 11) { + if (vesa == 0 && (id & PS3AV_MODE_MASK) >= PS3AV_MODE_WXGA) { /* vesa mode */ - ps3av_set_videomode_packet(2); /* 480P */ + ps3av_set_videomode_packet(PS3AV_MODE_480P); } vesa = 1; @@ -594,20 +594,21 @@ static const struct { unsigned mask : 19; unsigned id : 4; } ps3av_preferred_modes[] = { - { .mask = PS3AV_RESBIT_WUXGA<< SHIFT_VESA, .id = 13 }, - { .mask = PS3AV_RESBIT_1920x1080P << SHIFT_60,.id = 5 }, - { .mask = PS3AV_RESBIT_1920x1080P << SHIFT_50,.id = 10 }, - { .mask = PS3AV_RESBIT_1920x1080I << SHIFT_60,.id = 4 }, - { .mask = PS3AV_RESBIT_1920x1080I << SHIFT_50,.id = 9 }, - { .mask = PS3AV_RESBIT_SXGA << SHIFT_VESA, .id = 12 }, - { .mask = PS3AV_RESBIT_WXGA << SHIFT_VESA, .id = 11 }, - { .mask = PS3AV_RESBIT_1280x720P<< SHIFT_60,.id = 3 }, - { .mask = PS3AV_RESBIT_1280x720P<< SHIFT_50,.id = 8 }, - { .mask = PS3AV_RESBIT_720x480P << SHIFT_60,.id = 2 }, - { .mask = PS3AV_RESBIT_720x576P << SHIFT_50,.id = 7 }, + { PS3AV_RESBIT_WUXGA << SHIFT_VESA, PS3AV_MODE_WUXGA }, + { PS3AV_RESBIT_1920x1080P << SHIFT_60, PS3AV_MODE_1080P60 }, + { PS3AV_RESBIT_1920x1080P << SHIFT_50, PS3AV_MODE_1080P50 }, + { PS3AV_RESBIT_1920x1080I << SHIFT_60, PS3AV_MODE_1080I60 }, + { PS3AV_RESBIT_1920x1080I << SHIFT_50, PS3AV_MODE_1080I50 }, + { PS3AV_RESBIT_SXGA << SHIFT_VESA, PS3AV_MODE_SXGA}, + { PS3AV_RESBIT_WXGA << SHIFT_VESA, PS3AV_MODE_WXGA}, + { PS3AV_RESBIT_1280x720P << SHIFT_60, PS3AV_MODE_720P60 }, + { PS3AV_RESBIT_1280x720P << SHIFT_50, PS3AV_MODE_720P50 }, + { PS3AV_RESBIT_720x480P << SHIFT_60, PS3AV_MODE_480P}, + { PS3AV_RESBIT_720x576P << SHIFT_50, PS3AV_MODE_576P}, }; -static int ps3av_resbit2id(u32 res_50, u32 res_60, u32 res_vesa) +static enum ps3av_mode_num ps3av_resbit2id(u32 res_50, u32 res_60, + u32 res_vesa) { unsigned int i; u32 res_all; @@ -636,9 +637,9 @@ static int ps3av_resbit2id(u32 res_50, u return 0; } -static int ps3av_hdmi_get_id(struct ps3av_info_monitor *info) +static enum ps3av_mode_num ps3av_hdmi_get_id(struct ps3av_info_monitor *info) { - int id; + enum ps3av_mode_num id; if (safe_mode) return PS3AV_DEFAULT_HDMI_MODE_ID_REG_60; @@ -852,7 +853,7 @@ int ps3av_set_video_mode(u32 id) /* auto mode */ option = id & ~PS3AV_MODE_MASK; - if ((id & PS3AV_MODE_MASK) == 0) { + if ((id & PS3AV_MODE_MASK) == PS3AV_MODE_AUTO) { id = ps3av_auto_videomode(&ps3av->av_hw_conf); if (id < 1) { printk(KERN_ERR "%s: invalid id :%d\n", __func__, id); @@ -958,7 +959,7 @@ static int ps3av_probe(struct ps3_system return -ENOMEM; mutex_init(&ps3av->mutex); - ps3av->ps3av_mode = 0; + ps3av->ps3av_mode = PS3AV_MODE_AUTO; ps3av->dev = dev; INIT_WORK(&ps3av->work, ps3avd); --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -338,7 +338,7 @@ static int ps3fb_get_res_table(u32 xres, static unsigned int ps3fb_find_mode(const struct fb_var_screeninfo *var, u32 *ddr_line_length, u32 *xdr_line_length) { - unsigned int i, mode; + unsigned int i, fi, mode; for (i = 0; i < ARRAY_SIZE(ps3fb_modedb); i++) if (var->xres == ps3fb_modedb[i].xres && @@ -359,7 +359,8 @@ static unsigned int ps3fb_find_mode(cons found: /* Cropped broadcast modes use the full line length */ - *ddr_line_length = ps3fb_modedb[i < 10 ? i + 13 : i].xres * BPP; + fi = i < PS3AV_MODE_1080P50 ? i + PS3AV_MODE_WUXGA : i; + *ddr_line_length = ps3fb_modedb[fi].xres * BPP; if (ps3_compare_firmware_vers
[patch 01/11] ps3av: ps3av_get_scanmode() and ps3av_get_refresh_rate() are unused
From: Geert Uytterhoeven <[EMAIL PROTECTED]> ps3av: ps3av_get_scanmode() and ps3av_get_refresh_rate() are unused, so remove them Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- drivers/ps3/ps3av.c | 58 +--- include/asm-powerpc/ps3av.h |2 - 2 files changed, 13 insertions(+), 47 deletions(-) --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c @@ -78,23 +78,21 @@ static const struct avset_video_mode { u32 aspect; u32 x; u32 y; - u32 interlace; - u32 freq; } video_mode_table[] = { { 0, }, /* auto */ - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480I, A_N, 720, 480, 1, 60}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480P, A_N, 720, 480, 0, 60}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_60HZ, A_N, 1280, 720, 0, 60}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_60HZ, A_W, 1920, 1080, 1, 60}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_60HZ, A_W, 1920, 1080, 0, 60}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576I, A_N, 720, 576, 1, 50}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576P, A_N, 720, 576, 0, 50}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_50HZ, A_N, 1280, 720, 0, 50}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_50HZ, A_W, 1920, 1080, 1, 50}, - {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_50HZ, A_W, 1920, 1080, 0, 50}, - { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WXGA, A_W, 1280, 768, 0, 60}, - { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_SXGA, A_N, 1280, 1024, 0, 60}, - { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WUXGA, A_W, 1920, 1200, 0, 60}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480I, A_N, 720, 480}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480P, A_N, 720, 480}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_60HZ, A_N, 1280, 720}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_60HZ, A_W, 1920, 1080}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_60HZ, A_W, 1920, 1080}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576I, A_N, 720, 576}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576P, A_N, 720, 576}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_50HZ, A_N, 1280, 720}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_50HZ, A_W, 1920, 1080}, + {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_50HZ, A_W, 1920, 1080}, + { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WXGA, A_W, 1280, 768}, + { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_SXGA, A_N, 1280, 1024}, + { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WUXGA, A_W, 1920, 1200}, }; /* supported CIDs */ @@ -889,36 +887,6 @@ int ps3av_get_mode(void) EXPORT_SYMBOL_GPL(ps3av_get_mode); -int ps3av_get_scanmode(int id) -{ - int size; - - id = id & PS3AV_MODE_MASK; - size = ARRAY_SIZE(video_mode_table); - if (id > size - 1 || id < 0) { - printk(KERN_ERR "%s: invalid mode %d\n", __func__, id); - return -EINVAL; - } - return video_mode_table[id].interlace; -} - -EXPORT_SYMBOL_GPL(ps3av_get_scanmode); - -int ps3av_get_refresh_rate(int id) -{ - int size; - - id = id & PS3AV_MODE_MASK; - size = ARRAY_SIZE(video_mode_table); - if (id > size - 1 || id < 0) { - printk(KERN_ERR "%s: invalid mode %d\n", __func__, id); - return -EINVAL; - } - return video_mode_table[id].freq; -} - -EXPORT_SYMBOL_GPL(ps3av_get_refresh_rate); - /* get resolution by video_mode */ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres) { --- a/include/asm-powerpc/ps3av.h +++ b/include/asm-powerpc/ps3av.h @@ -713,8 +713,6 @@ extern int ps3av_set_video_mode(u32); extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); extern int ps3av_get_auto_mode(void); extern int ps3av_get_mode(void); -extern int ps3av_get_scanmode(int); -extern int ps3av_get_refresh_rate(int); extern int ps3av_video_mode2res(u32, u32 *, u32 *); extern int ps3av_video_mute(int); extern int ps3av_audio_mute(int); -- With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 00/11] ps3av/3fb patches for 2.6.25
Hi Tony, Andrew, Hare are the ps3av/fb patches for 2.6.25: [1] ps3av: ps3av_get_scanmode() and ps3av_get_refresh_rate() are unused [2] ps3: Use symbolic names for video modes [3] ps3fb: Kill PS3FB_FULL_MODE_BIT [4] ps3fb: Inline macros that are used only once [5] ps3fb: Kill ps3fb_res[] [6] ps3fb: Make frame buffer offsets unsigned int [7] ps3fb: Add support for configurable black borders [8] ps3fb: Reorganize modedb handling [9] ps3fb: Round up video modes [10] ps3fb: Cleanup sweep [11] ps3fb: Fix modedb typos Patches 1-9 have been sent for review on Mon, 26 Nov 2007. They haven't changed in the mean time, except for rebasing and minor editing of patch descriptions. Patches 10-11 are new, but not very complex, and tested in ps3-linux.git since a while. Please apply for 2.6.25. Thanks a lot! With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Fri, 2008-01-25 at 12:34 +0100, Michel Dänzer wrote: > On Fri, 2008-01-25 at 17:54 +1100, Benjamin Herrenschmidt wrote: > > On Wed, 2008-01-23 at 13:42 +0100, Peter Zijlstra wrote: > > > Another question, do you have: > > > CONFIG_FAIR_GROUP_SCHED=y > > > > > > if so, does flipping that off have any effect? > > > > Yes. > > > > Here, I do the test of running 4 times the repro-case provided by Michel > > with nice 19 and a dd eating CPU with nice 0. > > > > Without this option, I get the dd at 100% and the nice 19 shells down > > below it with whatever is left of the CPUs. > > > > With this option, dd gets about 50% of one CPU and the niced processes > > still get most of the time. > > Hmm, interesting. As I said before, I thought I had tested with this > disabled and not seen a difference, but I'll try again to confirm. So, 2.6.24 final is indeed much better with this disabled, but still not as good as 2.6.23: While I can reliably move a window again while the infinite loop is running, it still stutters badly every couple of seconds. With 2.6.23 this is smooth all the time. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [NET]: Remove PowerPC code from fec.c
On Fri, 25 Jan 2008, Jochen Friedrich wrote: > fec.c is only used on M68k Coldfire CPUs. Remove leftover > PowerPC code from this driver. As per MAINTAINERS, m68knommu is handled by: UCLINUX (AND M68KNOMMU) P: Greg Ungerer M: [EMAIL PROTECTED] L: [EMAIL PROTECTED] (subscribers-only) I already forwarded a copy of your email to Greg. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 6/5] [POWERPC] get rid of `model = "UCC"' in the ucc nodes
It isn't used anywhere, so remove it. If we'll ever need something like this, we'll use compatible property instead. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- New cleanup in this series... Documentation/powerpc/booting-without-of.txt |1 - arch/powerpc/boot/dts/mpc832x_mds.dts|3 --- arch/powerpc/boot/dts/mpc832x_rdb.dts|2 -- arch/powerpc/boot/dts/mpc836x_mds.dts|2 -- arch/powerpc/boot/dts/mpc8568mds.dts |2 -- 5 files changed, 0 insertions(+), 10 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index a3b6e2a..ab9f0bf 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -1675,7 +1675,6 @@ platforms are moved over to use the flattened-device-tree model. [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; device-id = <1>; reg = <2000 200>; interrupts = ; diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index 15bb345..c60ebf7 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts @@ -251,7 +251,6 @@ enet0: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <3>; device-id = <3>; reg = <2200 200>; @@ -267,7 +266,6 @@ enet1: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <4>; device-id = <4>; reg = <3200 200>; @@ -283,7 +281,6 @@ [EMAIL PROTECTED] { device_type = "serial"; compatible = "ucc_uart"; - model = "UCC"; device-id = <5>;/* The UCC number, 1-7*/ port-number = <0>; /* Which ttyQEx device */ soft-uart; /* We need Soft-UART */ diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts index f086fac..60461be 100644 --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts @@ -204,7 +204,6 @@ enet0: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <2>; device-id = <2>; reg = <3000 200>; @@ -220,7 +219,6 @@ enet1: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <3>; device-id = <3>; reg = <2200 200>; diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index d3b8262..e2b20f7 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts @@ -253,7 +253,6 @@ enet0: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <1>; device-id = <1>; reg = <2000 200>; @@ -270,7 +269,6 @@ enet1: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <2>; device-id = <2>; reg = <3000 200>; diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index c929fba..e136410 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts @@ -322,7 +322,6 @@ enet2: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <1>; device-id = <1>; reg = <2000 200>; @@ -339,7 +338,6 @@ enet3: [EMAIL PROTECTED] { device_type = "network"; compatible = "ucc_geth"; - model = "UCC"; cell-index = <2>; device-id = <2>; reg = <3000 200>; -- 1.5.2.2 __
[PATCH] [NET]: Remove PowerPC code from fec.c
fec.c is only used on M68k Coldfire CPUs. Remove leftover PowerPC code from this driver. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- drivers/net/fec.c | 136 +--- 1 files changed, 3 insertions(+), 133 deletions(-) diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 0fbf1bb..0499cbb 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -23,6 +23,9 @@ * * Bug fixes and cleanup by Philippe De Muyter ([EMAIL PROTECTED]) * Copyright (c) 2004-2006 Macq Electronique SA. + * + * This driver is now only used on ColdFire processors. Remove conditional + * Powerpc code. */ #include @@ -49,17 +52,9 @@ #include #include -#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \ -defined(CONFIG_M5272) || defined(CONFIG_M528x) || \ -defined(CONFIG_M520x) || defined(CONFIG_M532x) #include #include #include "fec.h" -#else -#include -#include -#include "commproc.h" -#endif #if defined(CONFIG_FEC2) #defineFEC_MAX_PORTS 2 @@ -1223,14 +1218,9 @@ static phy_info_t const * const phy_info[] = { /* - */ #if !defined(CONFIG_M532x) -#ifdef CONFIG_RPXCLASSIC -static void -mii_link_interrupt(void *dev_id); -#else static irqreturn_t mii_link_interrupt(int irq, void * dev_id); #endif -#endif #if defined(CONFIG_M5272) /* @@ -1800,121 +1790,6 @@ static void __inline__ fec_uncache(unsigned long addr) /* - */ -#else - -/* - * Code specific to the MPC860T setup. - */ -static void __inline__ fec_request_intrs(struct net_device *dev) -{ - volatile immap_t *immap; - - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */ - - if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0) - panic("Could not allocate FEC IRQ!"); - -#ifdef CONFIG_RPXCLASSIC - /* Make Port C, bit 15 an input that causes interrupts. - */ - immap->im_ioport.iop_pcpar &= ~0x0001; - immap->im_ioport.iop_pcdir &= ~0x0001; - immap->im_ioport.iop_pcso &= ~0x0001; - immap->im_ioport.iop_pcint |= 0x0001; - cpm_install_handler(CPMVEC_PIO_PC15, mii_link_interrupt, dev); - - /* Make LEDS reflect Link status. - */ - *((uint *) RPX_CSR_ADDR) &= ~BCSR2_FETHLEDMODE; -#endif -#ifdef CONFIG_FADS - if (request_8xxirq(SIU_IRQ2, mii_link_interrupt, 0, "mii", dev) != 0) - panic("Could not allocate MII IRQ!"); -#endif -} - -static void __inline__ fec_get_mac(struct net_device *dev) -{ - bd_t *bd; - - bd = (bd_t *)__res; - memcpy(dev->dev_addr, bd->bi_enetaddr, ETH_ALEN); - -#ifdef CONFIG_RPXCLASSIC - /* The Embedded Planet boards have only one MAC address in -* the EEPROM, but can have two Ethernet ports. For the -* FEC port, we create another address by setting one of -* the address bits above something that would have (up to -* now) been allocated. -*/ - dev->dev_adrd[3] |= 0x80; -#endif -} - -static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) -{ - extern uint _get_IMMR(void); - volatile immap_t *immap; - volatile fec_t *fecp; - - fecp = fep->hwp; - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */ - - /* Configure all of port D for MII. - */ - immap->im_ioport.iop_pdpar = 0x1fff; - - /* Bits moved from Rev. D onward. - */ - if ((_get_IMMR() & 0x) < 0x0501) - immap->im_ioport.iop_pddir = 0x1c58;/* Pre rev. D */ - else - immap->im_ioport.iop_pddir = 0x1fff;/* Rev. D and later */ - - /* Set MII speed to 2.5 MHz - */ - fecp->fec_mii_speed = fep->phy_speed = - ((bd->bi_busfreq * 100) / 250) & 0x7e; -} - -static void __inline__ fec_enable_phy_intr(void) -{ - volatile fec_t *fecp; - - fecp = fep->hwp; - - /* Enable MII command finished interrupt - */ - fecp->fec_ivec = (FEC_INTERRUPT/2) << 29; -} - -static void __inline__ fec_disable_phy_intr(void) -{ -} - -static void __inline__ fec_phy_ack_intr(void) -{ -} - -static void __inline__ fec_localhw_setup(void) -{ - volatile fec_t *fecp; - - fecp = fep->hwp; - fecp->fec_r_hash = PKT_MAXBUF_SIZE; - /* Enable big endian and don't care about SDMA FC. - */ - fecp->fec_fun_code = 0x7800; -} - -static void __inline__ fec_uncache(unsigned long addr) -{ - pte_t *pte; - pte = va_to_pte(mem_addr); - pte_val(*pte) |= _PAGE_NO_CACHE; - flush_tlb_page(init_mm.mmap, mem_addr); -} - #endif /* - */ @@ -2126,13 +2001,8 @@ mii_discover_phy(uint mii_reg, struct net_device *dev) /* This interrupt occurs when
[PATCH for-2.6.25] [POWERPC] Rename commproc to cpm1 and cpm2_common.c to cpm2.c
Rename commproc.[ch] to cpm1.[ch] to be more consistent with cpm2. Also rename cpm2_common.c to cpm2.c as suggested by Scott Wood. Adjust the includes accordingly. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- arch/powerpc/platforms/8xx/ep88xc.c |1 + arch/powerpc/platforms/8xx/mpc86xads_setup.c |2 +- arch/powerpc/platforms/8xx/mpc885ads_setup.c |2 +- arch/powerpc/sysdev/Makefile |4 ++-- arch/powerpc/sysdev/{commproc.c => cpm1.c}|4 ++-- arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} |3 +-- arch/powerpc/sysdev/micropatch.c |2 +- arch/ppc/8260_io/enet.c |2 +- arch/ppc/8xx_io/commproc.c|2 +- arch/ppc/8xx_io/enet.c|6 +++--- arch/ppc/8xx_io/fec.c |2 +- arch/ppc/8xx_io/micropatch.c |2 +- arch/ppc/boot/simple/iic.c|2 +- arch/ppc/boot/simple/m8xx_tty.c |2 +- arch/ppc/kernel/ppc_ksyms.c |2 +- arch/ppc/platforms/mpc866ads_setup.c |2 +- arch/ppc/platforms/mpc885ads_setup.c |2 +- arch/ppc/syslib/mpc8xx_devices.c |2 +- arch/ppc/xmon/start_8xx.c |2 +- drivers/net/fec_8xx/fec_8xx-netta.c |2 +- drivers/net/fec_8xx/fec_main.c|2 +- drivers/net/fec_8xx/fec_mii.c |2 +- drivers/net/fs_enet/fs_enet.h |2 +- drivers/net/fs_enet/mac-fec.c |2 +- drivers/net/fs_enet/mac-scc.c |2 +- drivers/serial/cpm_uart/cpm_uart_cpm1.h |2 +- include/asm-powerpc/{commproc.h => cpm1.h}|8 include/asm-ppc/{commproc.h => cpm1.h}|8 28 files changed, 38 insertions(+), 38 deletions(-) rename arch/powerpc/sysdev/{commproc.c => cpm1.c} (99%) rename arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} (99%) rename include/asm-powerpc/{commproc.h => cpm1.h} (99%) rename include/asm-ppc/{commproc.h => cpm1.h} (99%) diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c index 4897eda..a8dffa0 100644 --- a/arch/powerpc/platforms/8xx/ep88xc.c +++ b/arch/powerpc/platforms/8xx/ep88xc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "mpc8xx.h" diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c index c0dda53..c028a5b 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index 3be115e..6e7ded0 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index f17e7b8..928d75b 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -36,8 +36,8 @@ endif # Temporary hack until we have migrated to asm-powerpc ifeq ($(ARCH),powerpc) obj-$(CONFIG_CPM) += cpm_common.o -obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o +obj-$(CONFIG_CPM2) += cpm2.o cpm2_pic.o obj-$(CONFIG_PPC_DCR) += dcr.o -obj-$(CONFIG_8xx) += mpc8xx_pic.o commproc.o +obj-$(CONFIG_8xx) += mpc8xx_pic.o cpm1.o obj-$(CONFIG_UCODE_PATCH) += micropatch.o endif diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/cpm1.c similarity index 99% rename from arch/powerpc/sysdev/commproc.c rename to arch/powerpc/sysdev/cpm1.c index ef82587..df8bd2b 100644 --- a/arch/powerpc/sysdev/commproc.c +++ b/arch/powerpc/sysdev/cpm1.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -290,7 +290,7 @@ cpm_setbrg(uint brg, uint rate) out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN); else out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) | -CPM_BRG_EN | CPM_BRG_DIV16); + CPM_BRG_EN | CPM_BRG_DIV16); } #ifndef CONFIG_PPC_CPM_NEW_BINDING diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2.c similarity index 99% rename from arch/powerpc/sysdev/cpm2_common.c rename to arch/powerpc/sysdev/cpm2.c index f7188e2..7be7112 100644 --- a/arch/powerpc/sysdev/cpm2_common.c +++ b/arch/powerpc/sysdev/cpm2.c @@ -153,8 +153,7 @@ cpm2_fastbrg(uint brg, uint rate, int div16) if (brg < 4) { bp = cpm2_map_size(im_brgc1, 16); - } - else { + } else { bp = cpm2_map_size(im_brgc5, 16);
[PATCH v3] [POWERPC] MPC8360E-RDK: device tree, board file and defconfig
On Wed, Jan 23, 2008 at 11:45:07PM +0300, Anton Vorontsov wrote: [...] > Hello Kumar, > > ...if there will no further comments regarding this board, it would > be great if you will merge it for 2.6.25. I've reworked that patch so > today it doesn't depend on the cleanup queue. That is, the device tree > includes device_type and other cruft that will be removed along with > other boards. > > Another change is: "display" node addition. It could be not fully > correct regarding device_type etc, but that's what offb driver > understands for today. New version below. Changes: - Thanks to Stephen Rothwell few glitches found and fixed. - Got rid of model = "MPC8360RDK" in the root node and changed compatible to fsl,mpc8360erdk (idea of that cleanup shamelessly stolen from the Kim Phillips' MPC8315E-RDB patches). - model = "UCC" removed from the ucc nodes. - - - - From: Anton Vorontsov <[EMAIL PROTECTED]> Subject: [POWERPC] MPC8360E-RDK: device tree, board file and defconfig This is new board made by Freescale Semiconductor Inc. and Logic Product Development. Currently supported: 1. UEC{1,2,7,4}; 2. I2C; 3. SPI; 4. NS16550 serial; 5. PCI and miniPCI; 6. Intel NOR StrataFlash X16 64Mbit PC28F640P30T85; 7. Graphics controller, Fujitsu MB86277. Not supported so far: 1. StMICRO NAND512W3A2BN6E, 512 Mbit (supported with FSL UPM patches); 2. QE Serial UCCs (tested to not work with ucc_uart driver, reason unknown, yet); 3. ADC AD7843 (tested to work, but support via device tree depends on major SPI rework, GPIO API, etc); 4. FHCI USB (will send RFC patches soon). Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc836x_rdk.dts | 375 ++ arch/powerpc/configs/mpc836x_rdk_defconfig | 1054 arch/powerpc/platforms/83xx/Kconfig| 11 +- arch/powerpc/platforms/83xx/Makefile |1 + arch/powerpc/platforms/83xx/mpc836x_rdk.c | 116 +++ 5 files changed, 1556 insertions(+), 1 deletions(-) create mode 100644 arch/powerpc/boot/dts/mpc836x_rdk.dts create mode 100644 arch/powerpc/configs/mpc836x_rdk_defconfig create mode 100644 arch/powerpc/platforms/83xx/mpc836x_rdk.c diff --git a/arch/powerpc/boot/dts/mpc836x_rdk.dts b/arch/powerpc/boot/dts/mpc836x_rdk.dts new file mode 100644 index 000..4b38e0b --- /dev/null +++ b/arch/powerpc/boot/dts/mpc836x_rdk.dts @@ -0,0 +1,375 @@ +/* + * MPC8360E RDK Device Tree Source + * + * Copyright 2006 Freescale Semiconductor Inc. + * Copyright 2007 MontaVista Software, Inc. + * Anton Vorontsov <[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 + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mpc8360erdk"; + + aliases { + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + ethernet3 = &enet3; + pci0 = &pci0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,[EMAIL PROTECTED] { + device_type = "cpu"; + reg = <0>; + d-cache-line-size = <32>; + i-cache-line-size = <32>; + d-cache-size = <32768>; + i-cache-size = <32768>; + /* filled by u-boot */ + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + }; + + memory { + device_type = "memory"; + /* filled by u-boot */ + reg = <0 0>; + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + compatible = "fsl,mpc8360-soc", "fsl,soc", "soc"; + ranges = <0 0xe000 0x10>; + reg = <0xe000 0x200>; + /* filled by u-boot */ + bus-frequency = <0>; + + [EMAIL PROTECTED] { + compatible = "mpc83xx_wdt"; + reg = <0x200 0x100>; + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + compatible = "fsl-i2c"; + reg = <0x3000 0x100>; + interrupts = <14 8>; + interrupt-parent = <&ipic>; +
Re: [Cbe-oss-dev] [PATCH 3/3] Cell IOMMU static mapping support
On Fri, 25 Jan 2008, Michael Ellerman wrote: > Citing "release early release often", I'm posting this now as a mega-patch > to get people looking at it. I'll try to split it up and make it look a > little prettier before submitting it. > > The intent of this patch is to setup (on certain machines) a "static" IOMMU > mapping of all of memory, to reduce the overhead of the IOMMU. If anyone has > a better name than "static" I'm all ears. Early mapping? Premapping? Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Fri, 2008-01-25 at 17:54 +1100, Benjamin Herrenschmidt wrote: > On Wed, 2008-01-23 at 13:42 +0100, Peter Zijlstra wrote: > > Another question, do you have: > > CONFIG_FAIR_GROUP_SCHED=y > > > > if so, does flipping that off have any effect? > > Yes. > > Here, I do the test of running 4 times the repro-case provided by Michel > with nice 19 and a dd eating CPU with nice 0. > > Without this option, I get the dd at 100% and the nice 19 shells down > below it with whatever is left of the CPUs. > > With this option, dd gets about 50% of one CPU and the niced processes > still get most of the time. Hmm, interesting. As I said before, I thought I had tested with this disabled and not seen a difference, but I'll try again to confirm. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Thu, 2008-01-24 at 19:46 +1100, Benjamin Herrenschmidt wrote: > Could the fact that our sched_clock() returns utter crap if called > before time_init() explain the problem ? I don't think so. I've confirmed that it gets called exactly once before time_init(), but it just returns 0 then, which I don't think should be a problem. Also, I'm attaching two copies of /proc/sched_debug obtained with sudo -b -u nobody nice -n 19 sh -c 'while true; do true; done' && cat /proc/sched_debug >/tmp/sched_debug.before && sleep 20 && cat /proc/sched_debug >/tmp/sched_debug.after && sudo -u nobody killall sh Looking at the diff below, the clock appears quite accurate. Peter or Ingo, maybe you notice something else odd with these or have other ideas for what conditions could cause niced processes to have such an impact on interactivity? --- /home/michdaen/sched_debug.before 2008-01-25 09:40:34.0 +0100 +++ /home/michdaen/sched_debug.after2008-01-25 09:40:34.0 +0100 @@ -1,5 +1,5 @@ Sched Debug Version: v0.07, 2.6.24-rc8 #4 -now at 204890.233650 msecs +now at 224908.343840 msecs .sysctl_sched_latency: 20.00 .sysctl_sched_min_granularity: 4.00 .sysctl_sched_wakeup_granularity : 10.00 @@ -8,56 +8,56 @@ now at 204890.233650 msecs .sysctl_sched_features : 7 cpu#0 - .nr_running: 6 - .load : 9971 - .nr_switches : 133199 - .nr_load_updates : 80363 - .nr_uninterruptible: 2 - .jiffies : 4294872186 + .nr_running: 5 + .load : 4364 + .nr_switches : 142978 + .nr_load_updates : 100239 + .nr_uninterruptible: 0 + .jiffies : 4294892204 .next_balance : 0.00 - .curr->pid : 4736 - .clock : 80363.072863 + .curr->pid : 4746 + .clock : 100239.072955 .idle_clock: 0.00 - .prev_clock_raw: 204876.445696 + .prev_clock_raw: 224892.259968 .clock_warps : 0 - .clock_overflows : 114542 + .clock_overflows : 119985 .clock_deep_idle_events: 0 .clock_max_delta : 0.36 - .cpu_load[0] : 9971 - .cpu_load[1] : 9948 - .cpu_load[2] : 9733 - .cpu_load[3] : 8396 - .cpu_load[4] : 5996 + .cpu_load[0] : 4364 + .cpu_load[1] : 3979 + .cpu_load[2] : 3443 + .cpu_load[3] : 3331 + .cpu_load[4] : 3268 cfs_rq - .exec_clock: 60747.682602 - .MIN_vruntime : 35455.964402 - .min_vruntime : 35455.964402 - .max_vruntime : 35455.964402 - .spread: 0.00 + .exec_clock: 80597.780820 + .MIN_vruntime : 54813.436178 + .min_vruntime : 54813.436178 + .max_vruntime : 54818.646546 + .spread: 5.210368 .spread0 : 0.00 - .nr_running: 2 - .load : 3072 + .nr_running: 3 + .load : 4096 .bkl_count : 0 .nr_spread_over: 0 cfs_rq - .exec_clock: 1.407424 - .MIN_vruntime : 0.01 - .min_vruntime : 35455.964402 - .max_vruntime : 0.01 + .exec_clock: 19353.983950 + .MIN_vruntime : 1362837.967264 + .min_vruntime : 54813.436178 + .max_vruntime : 1362837.967264 .spread: 0.00 .spread0 : 0.00 - .nr_running: 0 - .load : 0 + .nr_running: 1 + .load : 15 .bkl_count : 0 .nr_spread_over: 0 cfs_rq - .exec_clock: 9247.295261 - .MIN_vruntime : 41795.173040 - .min_vruntime : 35455.964402 - .max_vruntime : 41795.173040 + .exec_clock: 9397.906333 + .MIN_vruntime : 41843.822192 + .min_vruntime : 54813.436178 + .max_vruntime : 41843.822192 .spread: 0.00 .spread0 : 0.00 .nr_running: 2 @@ -68,7 +68,7 @@ cfs_rq cfs_rq .exec_clock: 0.997824 .MIN_vrun
[PATCH 3/3] Cell IOMMU static mapping support
Citing "release early release often", I'm posting this now as a mega-patch to get people looking at it. I'll try to split it up and make it look a little prettier before submitting it. The intent of this patch is to setup (on certain machines) a "static" IOMMU mapping of all of memory, to reduce the overhead of the IOMMU. If anyone has a better name than "static" I'm all ears. So instead of having an IOMMU window that we use to temporarily map things in and out of DMA'able space, at boot we create a 1:1 mapping for all of memory. This obviously only works for devices that can do 64-bit DMA. Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]> --- arch/powerpc/platforms/cell/iommu.c | 318 --- 1 files changed, 295 insertions(+), 23 deletions(-) diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 9223559..935d4e6 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c @@ -147,6 +147,10 @@ struct cbe_iommu { static struct cbe_iommu iommus[NR_IOMMUS]; static int cbe_nr_iommus; +static unsigned long cell_dma_direct_offset; +struct dma_mapping_ops cell_dma_static_ops; +static unsigned long cell_dma_static_base; + static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte, long n_ptes) { @@ -306,22 +310,64 @@ static int cell_iommu_find_ioc(int nid, unsigned long *base) return -ENODEV; } -static void cell_iommu_setup_hardware(struct cbe_iommu *iommu, unsigned long size) +static void cell_iommu_setup_static_ptab(struct cbe_iommu *iommu, + struct device_node *np, unsigned long dbase, unsigned long dsize, + unsigned long sbase, unsigned long ssize) +{ + unsigned long ioid, prot, base_pte, uaddr, *io_pte; + const unsigned int *p; + int i; + + cell_dma_static_base = sbase; + + p = of_get_property(np, "ioid", NULL); + ioid = p ? *p : 0; + + prot = 0xc48UL << (52 + 4 * DMA_BIDIRECTIONAL); + + base_pte = (prot & (IOPTE_PP_W | IOPTE_PP_R)) + | IOPTE_M | IOPTE_SO_RW | (ioid & IOPTE_IOID_Mask); + + /* convert from bytes into ptab indices */ + dbase = dbase >> IOMMU_PAGE_SHIFT; + dsize = dsize >> IOMMU_PAGE_SHIFT; + sbase = sbase >> IOMMU_PAGE_SHIFT; + ssize = ssize >> IOMMU_PAGE_SHIFT; + + io_pte = iommu->ptab; + + pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", ssize, sbase); + + uaddr = 0; + for (i = sbase; i < sbase + ssize; i++, uaddr += IOMMU_PAGE_SIZE) { + /* Don't touch the dynamic region */ + if (i >= dbase && i < (dbase + dsize)) { + pr_debug("iommu: static/dynamic overlap, skipping\n"); + continue; + } + io_pte[i] = base_pte | (__pa(uaddr) & IOPTE_RPN_Mask); + } + + mb(); +} + +static void cell_iommu_setup_page_tables(struct cbe_iommu *iommu, + unsigned long dbase, unsigned long dsize, + unsigned long sbase, unsigned long ssize) { - struct page *page; - int ret, i; unsigned long reg, segments, pages_per_segment, ptab_size, stab_size, - n_pte_pages, xlate_base; - unsigned int virq; + n_pte_pages, end, base, size, offset; + struct page *page; + int i; - if (cell_iommu_find_ioc(iommu->nid, &xlate_base)) - panic("%s: missing IOC register mappings for node %d\n", - __FUNCTION__, iommu->nid); + end = max(dbase + dsize, sbase + ssize); + base = dbase; + if (ssize != 0) + base = min(sbase, dbase); - iommu->xlate_regs = ioremap(xlate_base, IOC_Reg_Size); - iommu->cmd_regs = iommu->xlate_regs + IOC_IOCmd_Offset; + size = end - base; - segments = size >> IO_SEGMENT_SHIFT; + segments = end >> IO_SEGMENT_SHIFT; pages_per_segment = 1ull << IO_PAGENO_BITS; pr_debug("%s: iommu[%d]: segments: %lu, pages per segment: %lu\n", @@ -372,12 +418,29 @@ static void cell_iommu_setup_hardware(struct cbe_iommu *iommu, unsigned long siz __unknown_page_size_error(); } + pr_debug("iommu: stab init i = 0x%lx end = 0x%lx\n", +base >> IO_SEGMENT_SHIFT, end >> IO_SEGMENT_SHIFT); + pr_debug("Setting up IOMMU stab:\n"); - for (i = 0; i * (1ul << IO_SEGMENT_SHIFT) < size; i++) { - iommu->stab[i] = reg | - (__pa(iommu->ptab) + n_pte_pages * IOMMU_PAGE_SIZE * i); - pr_debug("\t[%d] 0x%016lx\n", i, iommu->stab[i]); + for (i = base >> IO_SEGMENT_SHIFT; i < segments; i++) { + offset = n_pte_pages * IOMMU_PAGE_SIZE * i; + iommu->stab[i] = reg | (__pa(iommu->ptab) + offset); + pr_debug("\t[%d] 0x%016lx (offset %lx)\n", i, iommu->stab[i], offset); } +} + +st
[PATCH 1/3] Add set_dma_ops() to match get_dma_ops().
Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]> --- include/asm-powerpc/dma-mapping.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 5eea6db..bbefb69 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h @@ -76,6 +76,11 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) return dev->archdata.dma_ops; } +static inline void set_dma_ops(struct device *dev, struct dma_mapping_ops *ops) +{ + dev->archdata.dma_ops = ops; +} + static inline int dma_supported(struct device *dev, u64 mask) { struct dma_mapping_ops *dma_ops = get_dma_ops(dev); -- 1.5.2.rc1.1884.g59b20 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/3] Allocate the hash table under 1G on cell
In order to support our IOMMU performance trick, we need the hash table to be inside the DMA window. This is usually 2G, but let's make sure the hash table is under 1G as that will satisfy the IOMMU requirements and also means the hash table will be on node 0. Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]> --- arch/powerpc/mm/hash_utils_64.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 9326a69..487c5e2 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -471,7 +471,7 @@ void __init htab_initialize(void) unsigned long table; unsigned long pteg_count; unsigned long mode_rw; - unsigned long base = 0, size = 0; + unsigned long base = 0, size = 0, limit; int i; extern unsigned long tce_alloc_start, tce_alloc_end; @@ -505,9 +505,15 @@ void __init htab_initialize(void) _SDR1 = 0; } else { /* Find storage for the HPT. Must be contiguous in -* the absolute address space. +* the absolute address space. On cell we want it to be +* in the first 1 Gig. */ - table = lmb_alloc(htab_size_bytes, htab_size_bytes); + if (machine_is(cell)) + limit = 0x4000; + else + limit = 0; + + table = lmb_alloc_base(htab_size_bytes, htab_size_bytes, limit); DBG("Hash table allocated at %lx, size: %lx\n", table, htab_size_bytes); -- 1.5.2.rc1.1884.g59b20 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCHv3 6/7] [POWERPC] Rename commproc to cpm1 and cpm2_common.c to cpm2.c
Hi Kumar, >> drivers/net/fec.c |8 >> drivers/net/fec.h |2 +- > > asm-m68knommu/commproc.h ?? these are only built on coldfire. Yes. Here I just removed dead code (commented out using #ifdef on coldfire). Apparently the driver was used on MPC8xx before or was copied from there but never cleaned up? Maybe this should be a seperate patch? >> drivers/serial/68360serial.c |2 +- > > I think this is using asm-m68knommu/commproc.h Oops, that one slipped through :-/. Thanks, Jochen ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
what's in my tree for 2.6.25
Here's what I've currently got in my tree. I plan on looking at the following: * Anton V's device_type/compat cleanup * Kim's 83xx board ports * UCC TDM So if there are some other patches for 2.6.25 linger let me know. There are a few on my radar. - k Documentation/powerpc/booting-without-of.txt | 158 +++ arch/powerpc/boot/Makefile |6 arch/powerpc/boot/cuboot-85xx-cpm2.c | 66 + arch/powerpc/boot/dts/sbc8349.dts| 243 + arch/powerpc/boot/dts/sbc8548.dts| 244 + arch/powerpc/boot/dts/sbc8560.dts| 330 +++ arch/powerpc/boot/dts/stx_gp3_8560.dts | 228 + arch/powerpc/boot/dts/tqm8540.dts| 204 arch/powerpc/boot/dts/tqm8541.dts| 228 + arch/powerpc/boot/dts/tqm8555.dts| 228 + arch/powerpc/boot/dts/tqm8560.dts| 245 + arch/powerpc/boot/libfdt-wrapper.c |9 arch/powerpc/boot/ops.h | 11 arch/powerpc/configs/sbc834x_defconfig | 800 ++ arch/powerpc/configs/sbc8548_defconfig | 741 arch/powerpc/configs/sbc8560_defconfig | 764 + arch/powerpc/configs/stx_gp3_defconfig | 1183 +++ arch/powerpc/configs/tqm8540_defconfig | 1032 +++ arch/powerpc/configs/tqm8541_defconfig | 1044 +++ arch/powerpc/configs/tqm8555_defconfig | 1044 +++ arch/powerpc/configs/tqm8560_defconfig | 1044 +++ arch/powerpc/kernel/legacy_serial.c | 45 - arch/powerpc/platforms/82xx/mpc8272_ads.c|5 arch/powerpc/platforms/82xx/pq2fads.c|5 arch/powerpc/platforms/83xx/Kconfig |9 arch/powerpc/platforms/83xx/Makefile |1 arch/powerpc/platforms/83xx/sbc834x.c| 115 ++ arch/powerpc/platforms/85xx/Kconfig | 71 + arch/powerpc/platforms/85xx/Makefile |4 arch/powerpc/platforms/85xx/sbc8548.c| 169 +++ arch/powerpc/platforms/85xx/sbc8560.c| 285 ++ arch/powerpc/platforms/85xx/stx_gp3.c| 187 arch/powerpc/platforms/85xx/tqm85xx.c| 191 arch/powerpc/platforms/8xx/ep88xc.c |4 arch/powerpc/platforms/8xx/m8xx_setup.c | 11 arch/powerpc/platforms/8xx/mpc86xads_setup.c |6 arch/powerpc/platforms/8xx/mpc885ads_setup.c |5 arch/powerpc/platforms/8xx/mpc8xx.h | 21 arch/powerpc/platforms/Kconfig |4 arch/powerpc/platforms/embedded6xx/ls_uart.c |5 arch/powerpc/sysdev/commproc.c | 38 arch/powerpc/sysdev/commproc.h | 12 arch/powerpc/sysdev/mpc8xx_pic.c |1 arch/ppc/8xx_io/commproc.c | 38 arch/ppc/syslib/ppc8xx_pic.h |1 drivers/pci/Makefile |2 include/asm-powerpc/commproc.h |6 include/asm-powerpc/mpc8xx.h | 20 include/asm-ppc/commproc.h |4 49 files changed, 10933 insertions(+), 184 deletions(-) Grant Likely (1): [POWERPC] 82xx and embedded6xx: Use machine_*_initcall() hooks in platform code Jochen Friedrich (5): [POWERPC] 8xx: Remove unused m8xx_cpm_hostalloc/free/dump() [POWERPC] 8xx: Rename m8xx_pic_init to mpc8xx_pics_init [POWERPC] 8xx: Remove unneeded and misspelled prototype m8xx_calibrate_decr [POWERPC] 8xx: Remove sysdev/commproc.h [POWERPC] 8xx: Get rid of conditional includes of board specific setup Kumar Gala (5): [POWERPC] Always build setup-bus.c on powerpc [POWERPC] bootwrapper: Add find_node_by_compatible [POWERPC] Add a cuboot wrapper for 85xx with CPM2 [POWERPC] 85xx: Port STX GP3 board over from arch/ppc [POWERPC] 85xx: Port TQM85xx boards over from arch/ppc Li Yang (1): [POWERPC] Add docs for Freescale PowerQUICC SATA device tree nodes Paul Gortmaker (11): [POWERPC] Reduce code duplication in legacy_serial, add UART parent types [POWERPC] 85xx: Add support for Wind River SBC8560 in arch/powerpc [POWERPC] 85xx: Add v1 device tree source for Wind River SBC8560 board [POWERPC] CPM2: Make support for the CPM2 optional on 8560 based boards [POWERPC] 85xx: Add default .config file for Wind River SBC8560 [POWERPC] 85xx: Add basic support for Wind River SBC8548 board [POWERPC] 85xx: Add v1 device tree source for Wind River SBC8548 board [POWERPC] 85xx: Add default .config file for Wind River SBC8548 [POWERPC] 83xx: Add support for Wind River SBC834x boards [POWERPC] 83xx: Add device tree source for Wind River SBC834x board. [POWERPC] 83xx: Add default config file for Wind River SBC8349 board Zhang Wei (1): [POWERPC] Add docs for Freescale DMA & DMA channel device tree nodes ___ Linu
Re: [PATCHv3 6/7] [POWERPC] Rename commproc to cpm1 and cpm2_common.c to cpm2.c
On Jan 24, 2008, at 9:19 AM, Jochen Friedrich wrote: > Rename commproc.[ch] to cpm1.[ch] to be more consistent with cpm2. > Also > rename cpm2_common.c to cpm2.c as suggested by Scott Wood. Adjust the > includes accordingly. > > Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> > --- > arch/powerpc/platforms/8xx/ep88xc.c |1 + > arch/powerpc/platforms/8xx/mpc86xads_setup.c |2 +- > arch/powerpc/platforms/8xx/mpc885ads_setup.c |2 +- > arch/powerpc/sysdev/Makefile |4 ++-- > arch/powerpc/sysdev/{commproc.c => cpm1.c}|4 ++-- > arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} |3 +-- > arch/powerpc/sysdev/micropatch.c |2 +- > arch/ppc/8260_io/enet.c |2 +- > arch/ppc/8xx_io/commproc.c|2 +- > arch/ppc/8xx_io/enet.c|6 +++--- > arch/ppc/8xx_io/fec.c |2 +- > arch/ppc/8xx_io/micropatch.c |2 +- > arch/ppc/boot/simple/iic.c|2 +- > arch/ppc/boot/simple/m8xx_tty.c |2 +- > arch/ppc/kernel/ppc_ksyms.c |2 +- > arch/ppc/platforms/mpc866ads_setup.c |2 +- > arch/ppc/platforms/mpc885ads_setup.c |2 +- > arch/ppc/syslib/mpc8xx_devices.c |2 +- > arch/ppc/xmon/start_8xx.c |2 +- All of these files seem reasonable. > drivers/net/fec.c |8 > drivers/net/fec.h |2 +- asm-m68knommu/commproc.h ?? these are only built on coldfire. > drivers/net/fec_8xx/fec_8xx-netta.c |2 +- > drivers/net/fec_8xx/fec_main.c|2 +- > drivers/net/fec_8xx/fec_mii.c |2 +- > drivers/net/fs_enet/fs_enet.h |2 +- > drivers/net/fs_enet/mac-fec.c |2 +- > drivers/net/fs_enet/mac-scc.c |2 +- these seem ok. > drivers/serial/68360serial.c |2 +- I think this is using asm-m68knommu/commproc.h > drivers/serial/cpm_uart/cpm_uart_cpm1.h |2 +- > include/asm-powerpc/{commproc.h => cpm1.h}|8 > include/asm-ppc/{commproc.h => cpm1.h}|8 > 31 files changed, 40 insertions(+), 48 deletions(-) > rename arch/powerpc/sysdev/{commproc.c => cpm1.c} (99%) > rename arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} (99%) > rename include/asm-powerpc/{commproc.h => cpm1.h} (99%) > rename include/asm-ppc/{commproc.h => cpm1.h} (99%) Also, CC jgarizk since we will be touching netdev drivers. We've been pushing such updates via the powerpc tree's but its good that Jeff's aware. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCHv3 0/7] [POWERPC] 8xx cleanups
On Thu, 24 Jan 2008, Jochen Friedrich wrote: > Hi, > > this is a series against paulus for-2.6.25 tree to clean up various 8xx > related stuff. > The series can be pulled from git://git.bocc.de/dbox2.git cleanup. > Old patches 2+4 have been merged into Patch 2. Patch 4 has been modified to > move the > prototypes into a new platforms/8xx/mpc8xx.h. Patch 5 leaves the PCMCIA bits > in > asm-powerpc/mpc8xx.h as this driver needs to be fixed first (unfortunately, i > don't > have an 8xx board with PCMCIA). I would suggest removing asm-powerpc/mpc8xx.h > after > ARCH=ppc is gone to avoid adding #ifdefs to all shared drivers. > > I also modified an option in Thunderbird so i hope whitespaces are OK now :-/ > > [POWERPC] Remove unused m8xx_cpm_hostalloc/free/dump() > [POWERPC] Rename m8xx_pic_init to mpc8xx_pics_init > [POWERPC] Remove unneeded and misspelled prototype m8xx_calibrate_decr > [POWERPC] Remove sysdev/commproc.h > [POWERPC] Get rid of conditional includes of board specific setup I've applied the above patches. > [POWERPC] Rename commproc to cpm1 and cpm2_common.c to cpm2.c I'm a bit concerned this patch is touching too many files.. or ones that it never should have. > [POWERPC] Move definition of buffer descriptor to cpm.h I'm assmuing this patch depends on the previous one. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Fri, 2008-01-25 at 18:25 +1100, Benjamin Herrenschmidt wrote: > On Fri, 2008-01-25 at 18:03 +1100, Benjamin Herrenschmidt wrote: > > On Fri, 2008-01-25 at 17:54 +1100, Benjamin Herrenschmidt wrote: > > > > > > Here, I do the test of running 4 times the repro-case provided by Michel > > > with nice 19 and a dd eating CPU with nice 0. > > > > > > Without this option, I get the dd at 100% and the nice 19 shells down > > > below it with whatever is left of the CPUs. > > > > > > With this option, dd gets about 50% of one CPU and the niced processes > > > still get most of the time. > > > > FYI. This is a 4 way G5 (ppc64) > > I also tested responsiveness of X running with or without that option > and with niced CPU eaters in the background (still 4 of them, one per > CPU), and I can confirm Michel observations, it gets very sluggish > (maybe not -as- bad as his but still pretty annoying) with the fair > group scheduler enabled. > > Here, X is running with nice=0 Curious, sounds like an issue with the group load balancer, vatsa, any ideas? ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/10] Support for SBC834x/8548/8560 Wind River Boards
On Thu, 24 Jan 2008, Paul Gortmaker wrote: > > This series contains the patches for the Wind River SBC834x, SBC8548 and > SBC8560, grouped together for merge convenience. > > Changes since previous: > > sbc834x: > - machine_device_initcall as per Kumar's recent commit 6392f184 > - remove four device_type from dts that DavidG wanted gone. > - add of_node_put() and __initdata as per StephenR's suggestions. > > sbc8548: > - fold the dts, and conversion to dts-v1, into a single commit > > sbc8560: > - dts has localbus with 2 address cells (chipsel) and epld as child > - UART detection legacy_serial patch separated out from 8560 patches > - fold the dts, and conversion to dts-v1, into a single commit > > I've boot tested these all on "for-2.6.25" to make sure things are sane. > Thanks again to those who have suggested improvements and changes. applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev