Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Mon, 2008-01-28 at 15:25 +1100, Benjamin Herrenschmidt wrote: > On Sun, 2008-01-27 at 17:13 +0100, Michel Dänzer wrote: > > > > > Do you see behavior change (from good->bad) immediately after > > applying that patch > > > during your bisect process? > > > > Yes, confirmed by trying that commit and its parent again. > > Just to be paranoid... can you try with a different gcc version in case > something gets miscompiled ? Is that really necessary - after all, 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 is related to process wakeup behaviour? -- 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 Sun, 2008-01-27 at 17:13 +0100, Michel Dänzer wrote: > In summary, there are two separate problems with similar symptoms, which > had me confused at times: > > * With CONFIG_FAIR_USER_SCHED disabled, there are severe > interactivity hickups with a niced CPU hog and top running. This > started with commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8. The revert at the bottom causes the wakeup granularity to shrink for + nice and to grow for - nice. That is, it becomes easier to preempt a + nice task, and harder to preempt a - nice task. I think we originally had that; didn't comment it, forgot the reason changed it because the units didn't match. Another reason might have been the more difficult preemption of - nice tasks. That might - niced tasks to cause horrible latencies - Ingo, any recollection? Are you perhaps running with a very low HZ (HZ=100)? (If wakeup preemption fails, tick preemption will take over). Also, could you try lowering: /proc/sys/kernel/sched_wakeup_granularity_ns > * With CONFIG_FAIR_USER_SCHED enabled, X becomes basically > unusable with a niced CPU hog, with or without top running. I > don't know when this started, possibly when this option was > first introduced. Srivatsa found an issue that might explain the very bad behaviour under group scheduling. But I gather you're not at all interested in this feature? > FWIW, the patch below (which reverts commit > 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8) restores 2.6.24 interactivity > to the same level as 2.6.23 here with CONFIG_FAIR_USER_SCHED disabled > (my previous report to the contrary was with CONFIG_FAIR_USER_SCHED > enabled because I didn't yet realize the difference it makes), but I > don't know if that's the real fix. > > > diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c > index da7c061..a7cc22a 100644 > --- a/kernel/sched_fair.c > +++ b/kernel/sched_fair.c > @@ -843,7 +843,6 @@ static void check_preempt_wakeup(struct rq *rq, struct > task_struct *p) > struct task_struct *curr = rq->curr; > struct cfs_rq *cfs_rq = task_cfs_rq(curr); > struct sched_entity *se = &curr->se, *pse = &p->se; > - unsigned long gran; > > if (unlikely(rt_prio(p->prio))) { > update_rq_clock(rq); > @@ -866,11 +865,8 @@ static void check_preempt_wakeup(struct rq *rq, struct > task_struct *p) > pse = parent_entity(pse); > } > > - gran = sysctl_sched_wakeup_granularity; > - if (unlikely(se->load.weight != NICE_0_LOAD)) > - gran = calc_delta_fair(gran, &se->load); > > - if (pse->vruntime + gran < se->vruntime) > + if (pse->vruntime + sysctl_sched_wakeup_granularity < se->vruntime) > resched_task(curr); > } ___ 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 Mon, 2008-01-28 at 09:50 +0100, Peter Zijlstra wrote: > On Sun, 2008-01-27 at 17:13 +0100, Michel Dänzer wrote: > > > In summary, there are two separate problems with similar symptoms, which > > had me confused at times: > > > > * With CONFIG_FAIR_USER_SCHED disabled, there are severe > > interactivity hickups with a niced CPU hog and top running. This > > started with commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8. > > The revert at the bottom causes the wakeup granularity to shrink for + > nice and to grow for - nice. That is, it becomes easier to preempt a + > nice task, and harder to preempt a - nice task. Yeah, that matches my observations. :) > I think we originally had that; didn't comment it, forgot the reason > changed it because the units didn't match. Another reason might have > been the more difficult preemption of - nice tasks. That might - niced > tasks to cause horrible latencies - Ingo, any recollection? > > Are you perhaps running with a very low HZ (HZ=100)? (If wakeup > preemption fails, tick preemption will take over). I haven't had it below 250 since that became an option, and I'm currently at 1000 (and NO_HZ, but disabling that didn't seem to make a difference). > Also, could you try lowering: > /proc/sys/kernel/sched_wakeup_granularity_ns Will try. > > * With CONFIG_FAIR_USER_SCHED enabled, X becomes basically > > unusable with a niced CPU hog, with or without top running. I > > don't know when this started, possibly when this option was > > first introduced. > > Srivatsa found an issue that might explain the very bad behaviour under > group scheduling. But I gather you're not at all interested in this > feature? That's right, but it's good to hear you have a lead there as well, and if you can't find any interested testers, let me know and I'll try. -- 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: Reminder: removal of arch/ppc
On Saturday 26 January 2008 02:21, Josh Boyer wrote: > > 4xx: > > BAMBOO > > Ported (mostly) > > > CPCI405 > > Doubt this will be ported. Of course this will be ported! I will do that in th next weeks. Matthias ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/1][PPC] replace logical- by bit-and in pci_process_ISA_OF_ranges(), arch/powerpc/kernel/isa-bridge.c
in arch/powerpc/kernel/isa-bridge.c: 41:#define ISA_SPACE_MASK 0x1 42:#define ISA_SPACE_IO 0x1 ... 54:struct isa_address { 55: u32 a_hi; ... 65: const struct isa_range *range; 83:if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) { ... 89:if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) shouldn't these be a single &? then consider the untested patch below. -- replace logical "&&" by bit "&" for ISA_SPACE_MASK Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c index f0f49d1..406a9e6 100644 --- a/arch/powerpc/kernel/isa-bridge.c +++ b/arch/powerpc/kernel/isa-bridge.c @@ -80,13 +80,13 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, * (size depending on dev->n_addr_cells) * cell 5:the size of the range */ - if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) { + if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) { range++; rlen -= sizeof(struct isa_range); if (rlen < sizeof(struct isa_range)) goto inval_range; } - if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) + if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) goto inval_range; isa_addr = range->isa_addr.a_lo; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
* Nish Aravamudan <[EMAIL PROTECTED]> [2008-01-27 12:22:54]: > On 1/27/08, Balbir Singh <[EMAIL PROTECTED]> wrote: > > * Paul Mackerras <[EMAIL PROTECTED]> [2008-01-27 22:55:43]: > > > > > Balbir Singh writes: > > > > > > > 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. > > > > > > There are a couple of other changes in behaviour that your patch > > > introduces, and I'd like to understand them better before taking the > > > patch. First, with your patch we don't set nodes online if they end > > > up having no memory in them because of the memory limit, whereas > > > previously we did. Secondly, in the case where we don't have NUMA > > > information, we now set node 0 online after adding each LMB, whereas > > > previously we only set it online once. > > > > > > If in fact these changes are benign, then your patch description > > > should mention them and explain why they are benign. > > > > > > > Yes, they are. I'll try and justify the changes with a good detailed > > changelog. If people prefer it, I can hide fake NUMA nodes under a > > config option, so that it does not come enabled by default. > > Sigh, there already *is* a fake NUMA config option: CONFIG_NUMA_EMU. > > "CONFIG_NUMA_EMU: > Enable NUMA emulation. A flat machine will be split > into virtual nodes when booted with "numa=fake=N", where N is the > number of nodes. This is only useful for debugging." > > I have to assume your patch is implementing the same feature for > powerpc (really just extending the x86_64 one), and thus should share > the config option. > > Any chance you can just make some of that code common? Maybe as a > follow-on patch. I expect that some of Mel's (added to Cc) work to > allow NUMA to be set on x86 more easily will flow quite simply into > adding fake NUMA support there as well. So moving the code to a common > place (at least the parsing) makes sense. > That's the long term plan and we discussed using common code in the discussion thread for fake NUMA (for PowerPC). We'll get there in steps. My patch is the basic initial, simple method for implementing fake NUMA nodes. > I also feel like you want to be able to online memoryless nodes -- > that's where we've been hitting a number of bugs lately in the VM. I > can't tell from Paul's comment if your patch prevents that from being > faked or not. > My patch prevents nodes from being enabled if we cross the memory limit. Earlier they were being enabled. > Thanks, > Nish > ___ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev > -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ 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 Mon, Jan 28, 2008 at 10:14:33AM +0100, Michel Dänzer wrote: > > > * With CONFIG_FAIR_USER_SCHED enabled, X becomes basically > > > unusable with a niced CPU hog, with or without top running. I > > > don't know when this started, possibly when this option was > > > first introduced. > > > > Srivatsa found an issue that might explain the very bad behaviour under > > group scheduling. But I gather you're not at all interested in this > > feature? > > That's right, but it's good to hear you have a lead there as well, and > if you can't find any interested testers, let me know and I'll try. Michel, Thanks for offering to test! The issue I found wrt preemption latency (when FAIR_USER_SCHED is turned on) is explained here: http://marc.info/?l=linux-kernel&m=120148675326287 Does the patch in that URL help bring FAIR_USER_SCHED interactivity to the same level as !FAIR_USER_SCHED? -- Regards, vatsa ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [Cbe-oss-dev] [PATCH 3/3] Cell IOMMU static mapping support
On Saturday 26 January 2008, Olof Johansson wrote: > > > > 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? > When you disable the iommu, the 32-bit devices stop working because they can no longer access all of main memory. The 1:1 mapping is in addition to the DMA window used for those devices, not in place of it. Arnd <>< ___ 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 Mon, Jan 28, 2008 at 01:32:53PM +0100, Ingo Molnar wrote: > * Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > > * With CONFIG_FAIR_USER_SCHED disabled, there are severe > > > interactivity hickups with a niced CPU hog and top running. This > > > started with commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8. > > > > The revert at the bottom causes the wakeup granularity to shrink for + > > nice and to grow for - nice. That is, it becomes easier to preempt a + > > nice task, and harder to preempt a - nice task. > > i think it would be OK to do half of this: make it easier to preempt a > +nice task. Hmm .. I doubt whether that would help Michel's case, as he seems to be running +niced tasks and having problems getting control over his desktop. Something is basically wrong here .. > Michel, do you really need the -nice portion as well? It's > not a problem to super-preempt positively reniced tasks, but it can be > quite annoying if negatively reniced tasks have super-slices. -- Regards, vatsa ___ 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
* Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > i think it would be OK to do half of this: make it easier to preempt > > a +nice task. Michel, do you really need the -nice portion as well? > > It's not a problem to super-preempt positively reniced tasks, but it > > can be quite annoying if negatively reniced tasks have super-slices. > > This should do that (unless I need a stronger cup of tea). cool - thanks Peter. Michel, could you check Peter's patch, does it resolve all the interactivity problems you've been seeing? Ingo ___ 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
* Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > * With CONFIG_FAIR_USER_SCHED disabled, there are severe > > interactivity hickups with a niced CPU hog and top running. This > > started with commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8. > > The revert at the bottom causes the wakeup granularity to shrink for + > nice and to grow for - nice. That is, it becomes easier to preempt a + > nice task, and harder to preempt a - nice task. i think it would be OK to do half of this: make it easier to preempt a +nice task. Michel, do you really need the -nice portion as well? It's not a problem to super-preempt positively reniced tasks, but it can be quite annoying if negatively reniced tasks have super-slices. Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [PPC] Remove 85xx from arch/ppc
85xx exists in arch/powerpc as well as cuImage support to boot from a u-boot that doesn't support device trees. --- arch/ppc/Kconfig | 51 +- arch/ppc/Makefile|8 - arch/ppc/configs/TQM8540_defconfig | 973 --- arch/ppc/configs/TQM8541_defconfig | 986 arch/ppc/configs/TQM8555_defconfig | 983 arch/ppc/configs/TQM8560_defconfig | 992 arch/ppc/configs/mpc8540_ads_defconfig | 706 - arch/ppc/configs/mpc8548_cds_defconfig | 658 arch/ppc/configs/mpc8555_cds_defconfig | 784 --- arch/ppc/configs/mpc8560_ads_defconfig | 769 --- arch/ppc/configs/stx_gp3_defconfig | 989 arch/ppc/kernel/Makefile |1 - arch/ppc/kernel/asm-offsets.c|6 - arch/ppc/kernel/entry.S | 12 +- arch/ppc/kernel/head_booke.h | 55 -- arch/ppc/kernel/head_fsl_booke.S | 1065 -- arch/ppc/kernel/misc.S | 46 +-- arch/ppc/kernel/ppc_ksyms.c |8 +- arch/ppc/kernel/setup.c |3 +- arch/ppc/kernel/traps.c | 121 --- arch/ppc/mm/Makefile |1 - arch/ppc/mm/fsl_booke_mmu.c | 236 -- arch/ppc/mm/init.c |6 - arch/ppc/mm/mmu_decl.h |6 - arch/ppc/mm/pgtable.c| 28 - arch/ppc/platforms/85xx/Kconfig | 106 --- arch/ppc/platforms/85xx/Makefile | 13 - arch/ppc/platforms/85xx/mpc8540_ads.c| 226 -- arch/ppc/platforms/85xx/mpc8540_ads.h| 22 - arch/ppc/platforms/85xx/mpc8555_cds.h| 23 - arch/ppc/platforms/85xx/mpc8560_ads.c| 303 arch/ppc/platforms/85xx/mpc8560_ads.h| 24 - arch/ppc/platforms/85xx/mpc85xx_ads_common.c | 197 - arch/ppc/platforms/85xx/mpc85xx_ads_common.h | 67 -- arch/ppc/platforms/85xx/mpc85xx_cds_common.c | 601 --- arch/ppc/platforms/85xx/mpc85xx_cds_common.h | 80 -- arch/ppc/platforms/85xx/sbc8560.c| 234 -- arch/ppc/platforms/85xx/sbc8560.h| 47 -- arch/ppc/platforms/85xx/sbc85xx.c| 166 arch/ppc/platforms/85xx/sbc85xx.h| 70 -- arch/ppc/platforms/85xx/stx_gp3.c| 339 arch/ppc/platforms/85xx/stx_gp3.h| 69 -- arch/ppc/platforms/85xx/tqm85xx.c| 412 -- arch/ppc/platforms/85xx/tqm85xx.h| 53 -- arch/ppc/syslib/Makefile |8 - arch/ppc/syslib/mpc85xx_devices.c| 826 arch/ppc/syslib/mpc85xx_sys.c| 233 -- arch/ppc/syslib/ocp.c|2 +- arch/ppc/syslib/open_pic.c |2 +- arch/ppc/syslib/ppc85xx_common.c | 38 - arch/ppc/syslib/ppc85xx_common.h | 22 - arch/ppc/syslib/ppc85xx_setup.c | 367 - arch/ppc/syslib/ppc85xx_setup.h | 56 -- include/asm-powerpc/irq.h| 121 --- include/asm-ppc/cpm2.h |2 +- include/asm-ppc/immap_85xx.h | 126 --- include/asm-ppc/mmu_context.h|5 - include/asm-ppc/mpc85xx.h| 192 - include/asm-ppc/pgtable.h| 46 -- include/asm-ppc/ppc_sys.h|2 - include/asm-ppc/ppcboot.h|7 +- include/asm-ppc/reg_booke.h | 26 - include/asm-ppc/serial.h |2 - 63 files changed, 20 insertions(+), 14608 deletions(-) delete mode 100644 arch/ppc/configs/TQM8540_defconfig delete mode 100644 arch/ppc/configs/TQM8541_defconfig delete mode 100644 arch/ppc/configs/TQM8555_defconfig delete mode 100644 arch/ppc/configs/TQM8560_defconfig delete mode 100644 arch/ppc/configs/mpc8540_ads_defconfig delete mode 100644 arch/ppc/configs/mpc8548_cds_defconfig delete mode 100644 arch/ppc/configs/mpc8555_cds_defconfig delete mode 100644 arch/ppc/configs/mpc8560_ads_defconfig delete mode 100644 arch/ppc/configs/stx_gp3_defconfig delete mode 100644 arch/ppc/kernel/head_fsl_booke.S delete mode 100644 arch/ppc/mm/fsl_booke_mmu.c delete mode 100644 arch/ppc/platforms/85xx/Kconfig delete mode 100644 arch/ppc/platforms/85xx/Makefile delete mode 100644 arch/ppc/platforms/85xx/mpc8540_ads.c delete mode 100644 arch/ppc/platforms/85xx/mpc8540_ads.h delete mode 100644 arch/ppc/platforms/85xx/mpc8555_cds.h delete mode 100644 arch/ppc/platforms/85xx/mpc8560_ads.c delete mode 100644 arch/ppc/platforms/85xx/mpc8560_ads.h delete mode 100644 arch/p
[PATCH 1/3] Rename i2c-mpc to i2c-mpc-drv in preparation for breaking out common code.
Rename i2c-mpc to i2c-mpc-drv in preparation for breaking out common code. Signed-off-by: Jon Smirl <[EMAIL PROTECTED]> --- drivers/i2c/busses/Makefile |2 drivers/i2c/busses/i2c-mpc-drv.c | 421 ++ drivers/i2c/busses/i2c-mpc.c | 421 -- 3 files changed, 423 insertions(+), 421 deletions(-) create mode 100644 drivers/i2c/busses/i2c-mpc-drv.c delete mode 100644 drivers/i2c/busses/i2c-mpc.c diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index ea7068f..171800d 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -2,6 +2,8 @@ # Makefile for the i2c bus drivers. # +i2c-mpc-objs := i2c-mpc-drv.o + obj-$(CONFIG_I2C_ALI1535) += i2c-ali1535.o obj-$(CONFIG_I2C_ALI1563) += i2c-ali1563.o obj-$(CONFIG_I2C_ALI15X3) += i2c-ali15x3.o diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc-drv.c similarity index 100% rename from drivers/i2c/busses/i2c-mpc.c rename to drivers/i2c/busses/i2c-mpc-drv.c ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH powerpc] Fake NUMA emulation for PowerPC (Take 3)
* Paul Mackerras <[EMAIL PROTECTED]> [2008-01-27 22:55:43]: > Balbir Singh writes: > > > 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. > > There are a couple of other changes in behaviour that your patch > introduces, and I'd like to understand them better before taking the > patch. First, with your patch we don't set nodes online if they end > up having no memory in them because of the memory limit, whereas > previously we did. Secondly, in the case where we don't have NUMA > information, we now set node 0 online after adding each LMB, whereas > previously we only set it online once. > > If in fact these changes are benign, then your patch description > should mention them and explain why they are benign. > > Paul. > Hi, Paul, Here's version 3 of the patch. I've commented the side-effect of repeatedly setting node 0 online (as to why that is done) and I've removed the side effect of not creating memory less nodes (when we hit the memory limit). I've described all my tests below Changelog v3 1. Remove the side-effect of not setting nodes online if they end up having no memory in them because of the memory limit. Changelog v2 1. Get rid of the constant 5 (based on comments from [EMAIL PROTECTED]) 2. Implement suggestions from Olof Johannson 3. Check if cmdline is NULL in fake_numa_create_new_node() Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake NUMA nodes can be specified using the following command line option numa=fake= node range is of the format ,,... Each of the rangeX parameters is passed using memparse(). I find the patch useful for fake NUMA emulation on my simple PowerPC machine. I've tested it on a numa box with the following arguments numa=fake=512M numa=fake=512M,768M numa=fake=256M,512M mem=512M numa=fake=1G mem=768M numa=fake= without any numa= argument The other side-effect introduced by this patch is that; in the case where we don't have NUMA information, we now set a node online after adding each LMB. This node could very well be node 0, but in the case that we enable fake NUMA nodes, when we cross node boundaries, we need to set the new node online. Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- arch/powerpc/mm/numa.c | 60 ++--- 1 file changed, 57 insertions(+), 3 deletions(-) diff -puN arch/powerpc/mm/numa.c~fakenumappc arch/powerpc/mm/numa.c --- linux-2.6.24-rc8/arch/powerpc/mm/numa.c~fakenumappc 2008-01-28 17:05:34.0 +0530 +++ linux-2.6.24-rc8-balbir/arch/powerpc/mm/numa.c 2008-01-28 18:15:41.0 +0530 @@ -24,6 +24,8 @@ static int numa_enabled = 1; +static char *cmdline __initdata; + static int numa_debug; #define dbg(args...) if (numa_debug) { printk(KERN_INFO args); } @@ -39,6 +41,47 @@ static bootmem_data_t __initdata plat_no static int min_common_depth; static int n_mem_addr_cells, n_mem_size_cells; +static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn, + unsigned int *nid) +{ + unsigned long long mem; + char *p = cmdline; + static unsigned int fake_nid; + static unsigned long long curr_boundary; + + /* +* Modify node id, iff we started creating NUMA nodes +*/ + if (fake_nid) + *nid = fake_nid; + if (!p) + return 0; + + mem = memparse(p, &p); + if (!mem) + return 0; + + if (mem < curr_boundary) + return 0; + + curr_boundary = mem; + + if ((end_pfn << PAGE_SHIFT) > mem) { + /* +* Skip commas and spaces +*/ + while (*p == ',' || *p == ' ' || *p == '\t') + p++; + + cmdline = p; + fake_nid++; + *nid = fake_nid; + dbg("created new fake_node with id %d\n", fake_nid); + return 1; + } + return 0; +} + static void __cpuinit map_cpu_to_node(int cpu, int node) { numa_cpu_lookup_table[cpu] = node; @@ -344,6 +387,9 @@ static void __init parse_drconf_memory(s if (nid == 0x || nid >= MAX_NUMNODES) nid = default_nid; } + + fake_numa_create_new_node(((start + lmb_size) >> PAGE_SHIFT), + &nid); node_set_online(nid); size = numa_enforce_memory_limit(start, lmb_size); @@ -429,6 +475,8 @@ new_range: nid = of_node_to_nid_single(memory); if (nid < 0) nid = default_nid; + + fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid); node_set_online(nid); if (!(size = nu
Re: [PATCH] POWERPC: Convert StorCenter DTS file to /dts-v1/ format.
On Fri, 25 Jan 2008, Jon Loeliger wrote: > > Signed-off-by: Jon Loeliger <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/storcenter.dts | 73 + > 1 files changed, 38 insertions(+), 35 deletions(-) > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] 86xx: Remove unused IRQ defines
86xx uses the flat device tree for all its needs so we dont need explicit IRQ info. Its not clear why this code existed since 86xx never existed in arch/ppc. --- include/asm-powerpc/irq.h | 86 - 1 files changed, 0 insertions(+), 86 deletions(-) diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 0efe7b2..b5c0312 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h @@ -483,92 +483,6 @@ static __inline__ int irq_canonicalize(int irq) */ #definemk_int_int_mask(IL) (1 << (7 - (IL/2))) -#elif defined(CONFIG_PPC_86xx) -#include - -#define NR_EPIC_INTS 48 -#ifndef NR_8259_INTS -#define NR_8259_INTS 16 /*ULI 1575 can route 12 interrupts */ -#endif -#define NUM_8259_INTERRUPTS NR_8259_INTS - -#ifndef I8259_OFFSET -#define I8259_OFFSET 0 -#endif - -#define NR_IRQS 256 - -/* Internal IRQs on MPC86xx OpenPIC */ - -#ifndef MPC86xx_OPENPIC_IRQ_OFFSET -#define MPC86xx_OPENPIC_IRQ_OFFSET NR_8259_INTS -#endif - -/* The 48 internal sources */ -#define MPC86xx_IRQ_NULL( 0 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_MCM ( 1 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DDR ( 2 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_LBC ( 3 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA0( 4 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA1( 5 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA2( 6 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA3( 7 + MPC86xx_OPENPIC_IRQ_OFFSET) - -/* no 10,11 */ -#define MPC86xx_IRQ_UART2 (12 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC1_TX(13 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC1_RX(14 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC3_TX(15 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC3_RX(16 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC3_ERROR (17 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC1_ERROR (18 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC2_TX(19 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC2_RX(20 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC4_TX(21 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC4_RX(22 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC4_ERROR (23 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC2_ERROR (24 + MPC86xx_OPENPIC_IRQ_OFFSET) -/* no 25 */ -#define MPC86xx_IRQ_UART1 (26 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_IIC (27 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_PERFMON (28 + MPC86xx_OPENPIC_IRQ_OFFSET) -/* no 29,30,31 */ -#define MPC86xx_IRQ_SRIO_ERROR(32 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_OUT_BELL (33 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_IN_BELL (34 + MPC86xx_OPENPIC_IRQ_OFFSET) -/* no 35,36 */ -#define MPC86xx_IRQ_SRIO_OUT_MSG1 (37 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_IN_MSG1 (38 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_OUT_MSG2 (39 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_IN_MSG2 (40 + MPC86xx_OPENPIC_IRQ_OFFSET) - -/* The 12 external interrupt lines */ -#define MPC86xx_IRQ_EXT_BASE 48 -#define MPC86xx_IRQ_EXT0 (0 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT1 (1 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT2 (2 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT3 (3 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT4 (4 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT5 (5 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT6 (6 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT7 (7 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT8 (8 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT9 (9 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT10 (10 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT11 (11 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) - #else /* CONFIG_40x + CONFIG_8xx */ /* * this is the # irq's for all ppc arch's (pmac/chrp/prep) -- 1.5.3.7 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [PPC] Remove 83xx from arch/ppc
83xx exists in arch/powerpc as well as cuImage support to boot from a u-boot that doesn't support device trees. --- arch/ppc/Kconfig | 46 +-- arch/ppc/Makefile |1 - arch/ppc/configs/mpc834x_sys_defconfig | 844 arch/ppc/kernel/ppc_ksyms.c|3 +- arch/ppc/kernel/setup.c|2 +- arch/ppc/mm/mmu_context.c |2 +- arch/ppc/mm/ppc_mmu.c |2 +- arch/ppc/platforms/83xx/Makefile |4 - arch/ppc/platforms/83xx/mpc834x_sys.c | 346 - arch/ppc/platforms/83xx/mpc834x_sys.h | 54 -- arch/ppc/syslib/Makefile |5 - arch/ppc/syslib/ipic.c | 646 arch/ppc/syslib/ipic.h | 47 -- arch/ppc/syslib/mpc83xx_devices.c | 251 -- arch/ppc/syslib/mpc83xx_sys.c | 122 - arch/ppc/syslib/ppc83xx_pci.h | 151 -- arch/ppc/syslib/ppc83xx_setup.c| 410 arch/ppc/syslib/ppc83xx_setup.h| 55 -- include/asm-powerpc/irq.h |5 - include/asm-ppc/mpc83xx.h | 107 include/asm-ppc/ppc_sys.h |2 - include/asm-ppc/ppcboot.h |5 +- include/asm-ppc/serial.h |2 - 23 files changed, 15 insertions(+), 3097 deletions(-) delete mode 100644 arch/ppc/configs/mpc834x_sys_defconfig delete mode 100644 arch/ppc/platforms/83xx/Makefile delete mode 100644 arch/ppc/platforms/83xx/mpc834x_sys.c delete mode 100644 arch/ppc/platforms/83xx/mpc834x_sys.h delete mode 100644 arch/ppc/syslib/ipic.c delete mode 100644 arch/ppc/syslib/ipic.h delete mode 100644 arch/ppc/syslib/mpc83xx_devices.c delete mode 100644 arch/ppc/syslib/mpc83xx_sys.c delete mode 100644 arch/ppc/syslib/ppc83xx_pci.h delete mode 100644 arch/ppc/syslib/ppc83xx_setup.c delete mode 100644 arch/ppc/syslib/ppc83xx_setup.h delete mode 100644 include/asm-ppc/mpc83xx.h diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 6473fa7..08e083d 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -78,18 +78,18 @@ choice default 6xx config 6xx - bool "6xx/7xx/74xx/52xx/82xx/83xx" + bool "6xx/7xx/74xx/52xx/82xx" select PPC_FPU help There are four types of PowerPC chips supported. The more common types (601, 603, 604, 740, 750, 7400), the older Freescale (formerly Motorola) embedded versions (821, 823, 850, 855, 860, - 52xx, 82xx, 83xx), the IBM embedded versions (403 and 405) and + 52xx, 82xx), the IBM embedded versions (403 and 405) and the Book E embedded processors from IBM (44x) and Freescale (85xx). For support for 64-bit processors, set ARCH=powerpc. Unless you are building a kernel for one of the embedded processor systems, choose 6xx. - Also note that because the 52xx, 82xx, & 83xx family have a 603e + Also note that because the 52xx, 82xx family have a 603e core, specific support for that chipset is asked later on. config 40x @@ -153,7 +153,7 @@ config PHYS_64BIT config ALTIVEC bool "AltiVec Support" depends on 6xx - depends on !8260 && !83xx + depends on !8260 ---help--- This option enables kernel support for the Altivec extensions to the PowerPC processor. The kernel currently supports saving and restoring @@ -184,7 +184,7 @@ config SPE config TAU bool "Thermal Management Support" - depends on 6xx && !8260 && !83xx + depends on 6xx && !8260 help G3 and G4 processors have an on-chip temperature sensor called the 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die @@ -721,16 +721,6 @@ config LITE5200B Support for the LITE5200B dev board for the MPC5200 from Freescale. This is the new board with 2 PCI slots. -config MPC834x_SYS - bool "Freescale MPC834x SYS" - help - This option enables support for the MPC 834x SYS evaluation board. - - Be aware that PCI buses can only function when SYS board is plugged - into the PIB (Platform IO Board) board from Freescale which provide - 3 PCI slots. The PIBs PCI initialization is the bootloader's - responsibility. - config EV64360 bool "Marvell-EV64360BP" help @@ -774,18 +764,6 @@ config 8272 The MPC8272 CPM has a different internal dpram setup than other CPM2 devices -config 83xx - bool - default y if MPC834x_SYS - -config MPC834x - bool - default y if MPC834x_SYS - -config PPC_83xx - bool - default y if 83xx - config CPM1 bool depends on 8xx @@ -811,8 +789,7 @@ config PPC_GEN550 bool depends on SANDPOINT || SPRUCE || PPLUS || \ PRPMC750 || PRPMC800 || LOPEC || \ -
[PATCH 1/1][PPC] Test value, not 1 in print_insn_spu(), arch/powerpc/xmon/spu-dis.c
untested, please confirm: The '|| 1' does nothing, should this be corrected like my patch does? -- Test value, not 1. Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/arch/powerpc/xmon/spu-dis.c b/arch/powerpc/xmon/spu-dis.c index e5f8983..74d45fb 100644 --- a/arch/powerpc/xmon/spu-dis.c +++ b/arch/powerpc/xmon/spu-dis.c @@ -222,7 +222,7 @@ print_insn_spu (unsigned long insn, unsigned long memaddr) break; case A_U18: value = DECODE_INSN_U18 (insn); - if (value == 0 || 1) + if (value == 0 || value == 1) { hex_value = value; printf("%u", value); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/9] 83xx DTS fixes and v1 conversions
On 1/28/08, Paul Gortmaker <[EMAIL PROTECTED]> wrote: > > This series incorporates my earlier qe/muram fix before converting > the existing mpc83xx DTS files to v1 format. I've also redone the > mpc834x_mds with the IRQs as decimal as per Kumar's comments and > re-included that too. I've kept each board as a separate commit > in case one of them conflicts with what someone else is working on. > > Boards covered are: 8349mds, 8349mitx, 8349mitx-gp, 836x_mds, > 8323_mds, 8323_rdb, and the 8313_rdb. Plus a small tweak to the > sbc8349 (it was already v1 -- but IRQs were in hex.) Cool! Want to do the 5200 dts files too? :-) /me is lazy 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[1/1] 8xx: Add clock-frequency to .dts brg entries
On Mon, Jan 28, 2008 at 01:53:11AM +, Bryan O'Donoghue wrote: > cpm_uart_core has a dependency on fsl,cpm-brg/clock-frequency, this > means that a .dts that uses the cpm uart driver needs to supply a > clock-frequency entry for get_brgfreq to return a meaningful number. > > Included is a patchset which adds the correct brgclk to the adder port - > @ 50Mhz and also adds an entry for mpc885ads - which I've noticed is > missing a clock-frequency entry. It's not missing -- it's added by the bootwrapper. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] POWERPC: Convert all 86xx DTS files to /dts-v1/ format.
On Fri, 25 Jan 2008, Jon Loeliger wrote: > > 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(-) > applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 0/3] Implement device tree based i2c module loading on mpc5200 powerpc
These are the final three patches in the series implementing device tree directed loading of i2c modules on mpc5200 powerpc. These patches have been posted multiple times. This revision implements a few minor changes suggested in the last two weeks. -- Jon Smirl [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 3/3] Add device tree compatible aliases to i2c drivers
PowerPC device trees use a different naming convention than the Linux kernel. Provide alias names for i2c drivers in order to allow them to be loaded by device tree name. The OF_ID macro ensures that the aliases are only present in powerpc builds and separated into their own namespace. Signed-off-by: Jon Smirl <[EMAIL PROTECTED]> --- drivers/hwmon/f75375s.c |2 ++ drivers/i2c/chips/ds1682.c |1 + drivers/i2c/chips/menelaus.c |1 + drivers/i2c/chips/tps65010.c |4 drivers/i2c/chips/tsl2550.c |1 + drivers/rtc/rtc-ds1307.c |6 ++ drivers/rtc/rtc-ds1374.c |1 + drivers/rtc/rtc-m41t80.c |8 drivers/rtc/rtc-pcf8563.c|2 ++ drivers/rtc/rtc-rs5c372.c|4 10 files changed, 30 insertions(+), 0 deletions(-) diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 4cb4db4..dd548e7 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -132,6 +132,8 @@ static struct i2c_driver f75375_legacy_driver = { static const struct i2c_device_id f75375_id[] = { { "f75373", f75373 }, { "f75375", f75375 }, + OF_ID("fintek,f75373", f75373) + OF_ID("fintek,f75375", f75375) { }, }; MODULE_DEVICE_TABLE(i2c, f75375_id); diff --git a/drivers/i2c/chips/ds1682.c b/drivers/i2c/chips/ds1682.c index 51ff518..817ad1f 100644 --- a/drivers/i2c/chips/ds1682.c +++ b/drivers/i2c/chips/ds1682.c @@ -237,6 +237,7 @@ static int ds1682_remove(struct i2c_client *client) static const struct i2c_device_id ds1682_id[] = { { "ds1682", 0 }, + OF_ID("dallas,ds1682", 0) { }, }; MODULE_DEVICE_TABLE(i2c, ds1682_id); diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c index 1f9ac5e..ba7d619 100644 --- a/drivers/i2c/chips/menelaus.c +++ b/drivers/i2c/chips/menelaus.c @@ -1245,6 +1245,7 @@ static int __exit menelaus_remove(struct i2c_client *client) static const struct i2c_device_id menelaus_id[] = { { "menelaus", 0 }, + OF_ID("ti,twl92330", 0) { }, }; MODULE_DEVICE_TABLE(i2c, menelaus_id); diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c index e07274d..9cd1770 100644 --- a/drivers/i2c/chips/tps65010.c +++ b/drivers/i2c/chips/tps65010.c @@ -571,6 +571,10 @@ static const struct i2c_device_id tps65010_id[] = { { "tps65011", TPS65011 }, { "tps65012", TPS65012 }, { "tps65013", TPS65013 }, + OF_ID("ti,tps65010", TPS65010) + OF_ID("ti,tps65011", TPS65011) + OF_ID("ti,tps65012", TPS65012) + OF_ID("ti,tps65013", TPS65013) { }, }; MODULE_DEVICE_TABLE(i2c, tps65010_id); diff --git a/drivers/i2c/chips/tsl2550.c b/drivers/i2c/chips/tsl2550.c index 2add8be..8071d6d 100644 --- a/drivers/i2c/chips/tsl2550.c +++ b/drivers/i2c/chips/tsl2550.c @@ -454,6 +454,7 @@ static int tsl2550_resume(struct i2c_client *client) static const struct i2c_device_id tsl2550_id[] = { { "tsl2550", 0 }, + OF_ID("taos,tsl2550", 0) { }, }; MODULE_DEVICE_TABLE(i2c, tsl2550_id); diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index a5614ab..e363a5f 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -129,6 +129,12 @@ static const struct i2c_device_id ds1307_id[] = { { "ds1339", ds_1339 }, { "ds1340", ds_1340 }, { "m41t00", m41t00 }, + OF_ID("dallas,ds1307", ds_1307) + OF_ID("dallas,ds1337", ds_1337) + OF_ID("dallas,ds1338", ds_1338) + OF_ID("dallas,ds1339", ds_1339) + OF_ID("dallas,ds1340", ds_1340) + OF_ID("stm,m41t00", m41t00) {}, }; MODULE_DEVICE_TABLE(i2c, ds1307_id); diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 376ceeb..e4f680a 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c @@ -43,6 +43,7 @@ static const struct i2c_device_id ds1374_id[] = { { "ds1374", 0 }, + OF_ID("dallas,ds1374", 0) {}, }; MODULE_DEVICE_TABLE(i2c, ds1374_id); diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index c672557..663f8b5 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c @@ -69,6 +69,14 @@ static const struct i2c_device_id m41t80_id[] = { { "m41st84", M41T80_FEATURE_HT | M41T80_FEATURE_BL }, { "m41st85", M41T80_FEATURE_HT | M41T80_FEATURE_BL }, { "m41st87", M41T80_FEATURE_HT | M41T80_FEATURE_BL }, + OF_ID("stm,m41t80", 0) + OF_ID("stm,m41t81", M41T80_FEATURE_HT) + OF_ID("stm,m41t81s", M41T80_FEATURE_HT | M41T80_FEATURE_BL) + OF_ID("stm,m41t82", M41T80_FEATURE_HT | M41T80_FEATURE_BL) + OF_ID("stm,m41t83", M41T80_FEATURE_HT | M41T80_FEATURE_BL) + OF_ID("stm,m41st84", M41T80_FEATURE_HT | M41T80_FEATURE_BL) + OF_ID("stm,m41st85", M41T80_FEATURE_HT | M41T80_FEATURE_BL) + OF_ID("stm,m41st87", M41T80_FEATURE_HT | M41T80_FEATURE_BL) {}, }; MODULE_DEVICE_TABLE(i2c, m41t80_id); diff --git a/drivers/
[PATCH 2/3] Convert PowerPC MPC i2c to of_platform_driver from platform_driver
Convert MPC i2c driver from a platform_driver to a of_platform_driver. Add the ability to dynamically load i2c drivers based on device tree names. Routine names were changed from fsl_ to mpc_ to make them match the file name. Common code moved to powerpc-common.* Orginal ppc driver left intact for deletion when ppc arch is removed. Signed-off-by: Jon Smirl <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/fsl_soc.c | 125 --- drivers/i2c/busses/Makefile |2 drivers/i2c/busses/i2c-mpc-drv.c| 164 --- drivers/i2c/busses/powerpc-common.c | 81 + drivers/i2c/busses/powerpc-common.h | 23 + include/linux/mod_devicetable.h |9 ++ 6 files changed, 263 insertions(+), 141 deletions(-) create mode 100644 drivers/i2c/busses/powerpc-common.c create mode 100644 drivers/i2c/busses/powerpc-common.h diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index e4b14a5..d6ef264 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -318,131 +318,6 @@ err: arch_initcall(gfar_of_init); -#ifdef CONFIG_I2C_BOARDINFO -#include -struct i2c_driver_device { - char*of_device; - char*i2c_type; -}; - -static struct i2c_driver_device i2c_devices[] __initdata = { - {"ricoh,rs5c372a", "rs5c372a",}, - {"ricoh,rs5c372b", "rs5c372b",}, - {"ricoh,rv5c386", "rv5c386",}, - {"ricoh,rv5c387a", "rv5c387a",}, - {"dallas,ds1307", "ds1307",}, - {"dallas,ds1337", "ds1337",}, - {"dallas,ds1338", "ds1338",}, - {"dallas,ds1339", "ds1339",}, - {"dallas,ds1340", "ds1340",}, - {"stm,m41t00", "m41t00"}, - {"dallas,ds1374", "rtc-ds1374",}, -}; - -static int __init of_find_i2c_driver(struct device_node *node, -struct i2c_board_info *info) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { - if (!of_device_is_compatible(node, i2c_devices[i].of_device)) - continue; - if (strlcpy(info->type, i2c_devices[i].i2c_type, - I2C_NAME_SIZE) >= I2C_NAME_SIZE) - return -ENOMEM; - return 0; - } - return -ENODEV; -} - -static void __init of_register_i2c_devices(struct device_node *adap_node, - int bus_num) -{ - struct device_node *node = NULL; - - while ((node = of_get_next_child(adap_node, node))) { - struct i2c_board_info info = {}; - const u32 *addr; - int len; - - addr = of_get_property(node, "reg", &len); - if (!addr || len < sizeof(int) || *addr > (1 << 10) - 1) { - printk(KERN_WARNING "fsl_soc.c: invalid i2c device entry\n"); - continue; - } - - info.irq = irq_of_parse_and_map(node, 0); - if (info.irq == NO_IRQ) - info.irq = -1; - - if (of_find_i2c_driver(node, &info) < 0) - continue; - - info.addr = *addr; - - i2c_register_board_info(bus_num, &info, 1); - } -} - -static int __init fsl_i2c_of_init(void) -{ - struct device_node *np; - unsigned int i; - struct platform_device *i2c_dev; - int ret; - - for (np = NULL, i = 0; -(np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; -i++) { - struct resource r[2]; - struct fsl_i2c_platform_data i2c_data; - const unsigned char *flags = NULL; - - memset(&r, 0, sizeof(r)); - memset(&i2c_data, 0, sizeof(i2c_data)); - - ret = of_address_to_resource(np, 0, &r[0]); - if (ret) - goto err; - - of_irq_to_resource(np, 0, &r[1]); - - i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); - if (IS_ERR(i2c_dev)) { - ret = PTR_ERR(i2c_dev); - goto err; - } - - i2c_data.device_flags = 0; - flags = of_get_property(np, "dfsrr", NULL); - if (flags) - i2c_data.device_flags |= FSL_I2C_DEV_SEPARATE_DFSRR; - - flags = of_get_property(np, "fsl5200-clocking", NULL); - if (flags) - i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; - - ret = - platform_device_add_data(i2c_dev, &i2c_data, -sizeof(struct - fsl_i2c_platform_data)); - if (ret) - goto unreg; - - of_register_i2c_devices(np, i); - } - - return 0; - -unreg: - platfor
Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc
On Mon, 2008-01-28 at 13:32 +0100, Ingo Molnar wrote: > * Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > > * With CONFIG_FAIR_USER_SCHED disabled, there are severe > > > interactivity hickups with a niced CPU hog and top running. This > > > started with commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8. > > > > The revert at the bottom causes the wakeup granularity to shrink for + > > nice and to grow for - nice. That is, it becomes easier to preempt a + > > nice task, and harder to preempt a - nice task. > > i think it would be OK to do half of this: make it easier to preempt a > +nice task. Michel, do you really need the -nice portion as well? It's > not a problem to super-preempt positively reniced tasks, but it can be > quite annoying if negatively reniced tasks have super-slices. This should do that (unless I need a stronger cup of tea). --- Index: linux-2.6/kernel/sched_fair.c === --- linux-2.6.orig/kernel/sched_fair.c +++ linux-2.6/kernel/sched_fair.c @@ -1106,7 +1106,11 @@ static void check_preempt_wakeup(struct } gran = sysctl_sched_wakeup_granularity; - if (unlikely(se->load.weight != NICE_0_LOAD)) + /* +* More easily preempt - nice tasks, while not making +* it harder for + nice tasks. +*/ + if (unlikely(se->load.weight > NICE_0_LOAD)) gran = calc_delta_fair(gran, &se->load); if (pse->vruntime + gran < se->vruntime) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/3] Add device tree compatible aliases to i2c drivers
On Mon, 2008-01-28 at 08:42, Jon Smirl wrote: > PowerPC device trees use a different naming convention than the Linux kernel. > Provide alias names for i2c drivers in order to allow them to be loaded by > device tree name. The OF_ID macro ensures that the aliases are only present > in powerpc builds and separated into their own namespace. > > Signed-off-by: Jon Smirl <[EMAIL PROTECTED]> > --- Hi Jon, Any chance we can have hard 70-ish column limited log messages, please? Thanks, jdl ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
request_irq() for external interrupt pin on MPC875 (A&M adder MPC 875)
With kernel 2.6.13 we used request_irq (use_irq, irq_handler, SA_INTERRUPT|SA_SHIRQ, DEVICE_NAME, dev) where use_irq is 12 to use the external IRQ6 pin. We are now trying to get this driver to work with the 2.6.25 pull from powerpc.git. request_irq (use_irq, irq_handler, IRQF_SHARED, DEVICE_NAME, dev); returns -ENOSYS on the newer kernel. Have the IRQ mappings for the external IRQX pins been moved in the later kernels? - Dag K. W. Rognlien Research Scientist SINTEF ICT Communication Systems ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 1/9] qe/muram dts: Explicitly set address-cells and size cells for muram
Kumar Gala wrote: > On Mon, 28 Jan 2008, Paul Gortmaker wrote: > > >> 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/mpc836x_mds.dts |4 +++- >> 1 files changed, 3 insertions(+), 1 deletions(-) >> >> > > Also fixed up mpc832x_*.dts and mpc8568mds.dts. > Thanks - I'd done those as well but forgot to git-add P. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [Cbe-oss-dev] [PATCH 3/3] Cell IOMMU static mapping support
On Mon, Jan 28, 2008 at 12:41:48PM +0100, Arnd Bergmann wrote: > On Saturday 26 January 2008, Olof Johansson wrote: > > > > > > 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? > > > > When you disable the iommu, the 32-bit devices stop working because > they can no longer access all of main memory. > > The 1:1 mapping is in addition to the DMA window used for those devices, > not in place of it. Ok, makes sense. I was going to protest the hack for >32GB configs, with the motivation that just using the htab-backed window is way too small for such a config. However, with 32GB memory and 4K pages, that window is 512MB, so we should be fine. Having that described in the patch (or at least in the patch description) to make it more clear could be good. That, and the fact that the mapping is offset on <32GB memory machines, and thus not really a 1:1 mapping. Does the cell I/O bridge reflect out accesses to 2-4GB on the bus again? If not, that could be another place to stick the dynamic range for large config machines. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] 85xx: rework platform Kconfig
* Allow multiple boards to be selected in a single build * Removed Kconfig option '85xx' which existed only for compat with arch/ppc * Added a multiplatform 85xx defconfig (mpc85xx_defconfig). This builds all 85xx boards except sbc8560 and stx_gp3 since these to boards have board specific ifdef in driver code that may break all other boards --- * removed defconfig from patch. arch/powerpc/configs/mpc85xx_defconfig | 1521 arch/powerpc/platforms/85xx/Kconfig| 32 +- arch/powerpc/platforms/Kconfig.cputype |6 +- 3 files changed, 1533 insertions(+), 26 deletions(-) create mode 100644 arch/powerpc/configs/mpc85xx_defconfig diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 74779b9..7e76ddb 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -1,7 +1,14 @@ -choice - prompt "Machine Type" +menuconfig MPC85xx + bool "Machine Type" depends on PPC_85xx - default MPC8540_ADS + select PPC_UDBG_16550 + select PPC_INDIRECT_PCI if PCI + select MPIC + select FSL_PCI if PCI + select SERIAL_8250_SHARE_IRQ if SERIAL_8250 + default y + +if MPC85xx config MPC8540_ADS bool "Freescale MPC8540 ADS" @@ -96,24 +103,7 @@ config SBC8560 help This option enables support for the Wind River SBC8560 board -endchoice +endif # MPC85xx config TQM85xx bool - select MPC85xx - -config MPC8540 - bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI - default y if MPC8540_ADS || MPC85xx_CDS || SBC8548 - -config MPC85xx - bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI if PCI - select MPIC - select FSL_PCI if PCI - select SERIAL_8250_SHARE_IRQ if SERIAL_8250 - default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \ - || MPC85xx_MDS || MPC85xx_DS || STX_GP3 || SBC8560 || SBC8548 diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index c3ee0b5..f6bf025 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -29,8 +29,8 @@ config PPC_85xx bool "Freescale 85xx" select E500 select FSL_SOC - select 85xx select WANT_DEVICE_TREE + select MPC85xx config PPC_8xx bool "Freescale 8xx" @@ -97,10 +97,6 @@ config 8xx config 83xx bool -# this is temp to handle compat with arch=ppc -config 85xx - bool - config E500 bool -- 1.5.3.7 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] Convert PowerPC MPC i2c to of_platform_driver from platform_driver
Changed common name from powerpc_ to of_ per Olof's suggestion. Convert MPC i2c driver from a platform_driver to a of_platform_driver. Add the ability to dynamically load i2c drivers based on device tree names. Routine names were changed from fsl_ to mpc_ to make them match the file name. Common code moved to of-common.* Orginal ppc driver left intact for deletion when ppc arch is removed. Signed-off-by: Jon Smirl <[EMAIL PROTECTED]> --- arch/powerpc/sysdev/fsl_soc.c| 125 - drivers/i2c/busses/Makefile |2 drivers/i2c/busses/i2c-mpc-drv.c | 164 +++--- drivers/i2c/busses/of-common.c | 81 +++ drivers/i2c/busses/of-common.h | 23 + include/linux/mod_devicetable.h |9 ++ 6 files changed, 263 insertions(+), 141 deletions(-) create mode 100644 drivers/i2c/busses/of-common.c create mode 100644 drivers/i2c/busses/of-common.h diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index e4b14a5..d6ef264 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -318,131 +318,6 @@ err: arch_initcall(gfar_of_init); -#ifdef CONFIG_I2C_BOARDINFO -#include -struct i2c_driver_device { - char*of_device; - char*i2c_type; -}; - -static struct i2c_driver_device i2c_devices[] __initdata = { - {"ricoh,rs5c372a", "rs5c372a",}, - {"ricoh,rs5c372b", "rs5c372b",}, - {"ricoh,rv5c386", "rv5c386",}, - {"ricoh,rv5c387a", "rv5c387a",}, - {"dallas,ds1307", "ds1307",}, - {"dallas,ds1337", "ds1337",}, - {"dallas,ds1338", "ds1338",}, - {"dallas,ds1339", "ds1339",}, - {"dallas,ds1340", "ds1340",}, - {"stm,m41t00", "m41t00"}, - {"dallas,ds1374", "rtc-ds1374",}, -}; - -static int __init of_find_i2c_driver(struct device_node *node, -struct i2c_board_info *info) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { - if (!of_device_is_compatible(node, i2c_devices[i].of_device)) - continue; - if (strlcpy(info->type, i2c_devices[i].i2c_type, - I2C_NAME_SIZE) >= I2C_NAME_SIZE) - return -ENOMEM; - return 0; - } - return -ENODEV; -} - -static void __init of_register_i2c_devices(struct device_node *adap_node, - int bus_num) -{ - struct device_node *node = NULL; - - while ((node = of_get_next_child(adap_node, node))) { - struct i2c_board_info info = {}; - const u32 *addr; - int len; - - addr = of_get_property(node, "reg", &len); - if (!addr || len < sizeof(int) || *addr > (1 << 10) - 1) { - printk(KERN_WARNING "fsl_soc.c: invalid i2c device entry\n"); - continue; - } - - info.irq = irq_of_parse_and_map(node, 0); - if (info.irq == NO_IRQ) - info.irq = -1; - - if (of_find_i2c_driver(node, &info) < 0) - continue; - - info.addr = *addr; - - i2c_register_board_info(bus_num, &info, 1); - } -} - -static int __init fsl_i2c_of_init(void) -{ - struct device_node *np; - unsigned int i; - struct platform_device *i2c_dev; - int ret; - - for (np = NULL, i = 0; -(np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; -i++) { - struct resource r[2]; - struct fsl_i2c_platform_data i2c_data; - const unsigned char *flags = NULL; - - memset(&r, 0, sizeof(r)); - memset(&i2c_data, 0, sizeof(i2c_data)); - - ret = of_address_to_resource(np, 0, &r[0]); - if (ret) - goto err; - - of_irq_to_resource(np, 0, &r[1]); - - i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); - if (IS_ERR(i2c_dev)) { - ret = PTR_ERR(i2c_dev); - goto err; - } - - i2c_data.device_flags = 0; - flags = of_get_property(np, "dfsrr", NULL); - if (flags) - i2c_data.device_flags |= FSL_I2C_DEV_SEPARATE_DFSRR; - - flags = of_get_property(np, "fsl5200-clocking", NULL); - if (flags) - i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; - - ret = - platform_device_add_data(i2c_dev, &i2c_data, -sizeof(struct - fsl_i2c_platform_data)); - if (ret) - goto unreg; - - of_register_i2c_devices(np, i); - } - -
Re: [PATCHv3 2.6.25] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers
On Jan 25, 2008, at 11:11 AM, Jochen Friedrich wrote: > 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(-) really should be split in two patches. The drivers/i2c/* should go via the i2c maintainers. the arch/powerpc via me or vitaly. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] 85xx: convert sbc85* boards to use machine_device_initcall
--- arch/powerpc/platforms/85xx/sbc8548.c |6 ++ arch/powerpc/platforms/85xx/sbc8560.c |6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c index de27b57..488facb 100644 --- a/arch/powerpc/platforms/85xx/sbc8548.c +++ b/arch/powerpc/platforms/85xx/sbc8548.c @@ -135,13 +135,11 @@ static struct of_device_id __initdata of_bus_ids[] = { static int __init declare_of_platform_devices(void) { - if (!machine_is(sbc8548)) - return 0; - of_platform_bus_probe(NULL, of_bus_ids, NULL); + return 0; } -device_initcall(declare_of_platform_devices); +machine_device_initcall(sbc8548, declare_of_platform_devices); /* * Called very early, device-tree isn't unflattened diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c index e2bc368..2c580cd 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c @@ -222,13 +222,11 @@ static struct of_device_id __initdata of_bus_ids[] = { static int __init declare_of_platform_devices(void) { - if (!machine_is(sbc8560)) - return 0; - of_platform_bus_probe(NULL, of_bus_ids, NULL); + return 0; } -device_initcall(declare_of_platform_devices); +machine_device_initcall(sbc8560, declare_of_platform_devices); /* * Called very early, device-tree isn't unflattened -- 1.5.3.7 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [POWERPC] 86xx: Remove unused IRQ defines
So, like, the other day Kumar Gala mumbled: > 86xx uses the flat device tree for all its needs so we dont need explicit > IRQ info. Its not clear why this code existed since 86xx never existed in > arch/ppc. Sorry, my fault. If you Sign-off-by: that patch, a maintainer can apply it! :-) jdl ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[Add mpc5121 support PATCH v4 2/4] Device tree for MPC5121 ADS
Minimal /dts-v1/ device tree for mpc5121 ads. port-number property in uart nodes will go away after the driver learns to use aliases Signed-off-by: John Rigby <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc5121ads.dts | 122 ++ 1 files changed, 122 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/mpc5121ads.dts diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts b/arch/powerpc/boot/dts/mpc5121ads.dts new file mode 100644 index 000..94ad7b2 --- /dev/null +++ b/arch/powerpc/boot/dts/mpc5121ads.dts @@ -0,0 +1,122 @@ +/* + * MPC5121E MDS Device Tree Source + * + * Copyright 2007 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +/dts-v1/; + +/ { + model = "mpc5121ads"; + compatible = "fsl,mpc5121ads"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,[EMAIL PROTECTED] { + device_type = "cpu"; + reg = <0>; + d-cache-line-size = <0x20>; // 32 bytes + i-cache-line-size = <0x20>; // 32 bytes + d-cache-size = <0x8000>;// L1, 32K + i-cache-size = <0x8000>;// L1, 32K + timebase-frequency = <4950>;// 49.5 MHz (csb/4) + bus-frequency = <19800>;// 198 MHz csb bus + clock-frequency = <39600>; // 396 MHz ppc core + }; + }; + + memory { + device_type = "memory"; + reg = <0x 0x1000>; // 256MB at 0 + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc5121ads-localbus"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0x8020 0x40>; + + ranges = <0x0 0x0 0xfc00 0x0400 + 0x2 0x0 0x8200 0x8000>; + + [EMAIL PROTECTED],0 { + compatible = "cfi-flash"; + reg = <0 0x0 0x400>; + bank-width = <4>; + device-width = <1>; + }; + + [EMAIL PROTECTED],0 { + compatible = "fsl,mpc5121ads-cpld"; + reg = <0x2 0x0 0x8000>; + }; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc5121-immr"; + #address-cells = <1>; + #size-cells = <1>; + #interrupt-cells = <2>; + ranges = <0x0 0x8000 0x40>; + reg = <0x8000 0x40>; + bus-frequency = <6600>; // 66 MHz ips bus + + + // IPIC + // interrupts cell = + // sense values match linux IORESOURCE_IRQ_* defines: + // sense == 8: Level, low assertion + // sense == 2: Edge, high-to-low change + // + ipic: [EMAIL PROTECTED] { + compatible = "fsl,mpc5121-ipic", "fsl,ipic"; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + reg = <0xc00 0x100>; + }; + + // 512x PSCs are not 52xx PSCs compatible + // PSC3 serial port A aka ttyPSC0 + [EMAIL PROTECTED] { + device_type = "serial"; + compatible = "fsl,mpc5121-psc-uart"; + // Logical port assignment needed until driver + // learns to use aliases + port-number = <0>; + cell-index = <3>; + reg = <0x11300 0x100>; + interrupts = <0x28 0x8>; // actually the fifo irq + interrupt-parent = < &ipic >; + }; + + // PSC4 serial port B aka ttyPSC1 + [EMAIL PROTECTED] { + device_type = "serial"; + compatible = "fsl,mpc5121-psc-uart"; + // Logical port assignment needed until driver + // learns to use aliases + port-number = <1>; + cell-index = <4>; + reg = <0x11400 0x100>; + interrupts = <0x28 0x8>; // actually the fifo irq + interrupt-parent = < &ipic >; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc5121-psc-fifo"; +
Re: [PATCHv3 2.6.25] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers
On Jan 26, 2008 1:11 AM, Jochen Friedrich <[EMAIL PROTECTED]> wrote: > 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 c
Re: [PATCH 0/9] 83xx DTS fixes and v1 conversions
On Mon, 28 Jan 2008, Paul Gortmaker wrote: > > This series incorporates my earlier qe/muram fix before converting > the existing mpc83xx DTS files to v1 format. I've also redone the > mpc834x_mds with the IRQs as decimal as per Kumar's comments and > re-included that too. I've kept each board as a separate commit > in case one of them conflicts with what someone else is working on. > > Boards covered are: 8349mds, 8349mitx, 8349mitx-gp, 836x_mds, > 8323_mds, 8323_rdb, and the 8313_rdb. Plus a small tweak to the > sbc8349 (it was already v1 -- but IRQs were in hex.) > > I've fed all the files to DTC before and after to ensure the > output is the same after the conversion. > > I'm not aware of any explicit rules for what is hex vs decimal. > I've tried to keep things that are usually discussed in decimal > as decimal quantities (i.e. cache size, IRQ, counts, indicies) > and all other data that you'd normally expect in hex (addresses, > IRQ flags, masks) as hex -- including prefixing 0x on values from > zero to 10 where it tends to make rows of numbers (e.g. ranges) > align for better readability, even though it isn't required. > Can you regen these patches (2..9) againast my latest tree. Also, a single patch that cleans up all the boards is sufficient. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: request_irq() for external interrupt pin on MPC875 (A&M adder MPC 875)
Rognlien Dag Kristian wrote: > With kernel 2.6.13 we used > > request_irq (use_irq, irq_handler, SA_INTERRUPT|SA_SHIRQ, DEVICE_NAME, dev) > > where use_irq is 12 to use the external IRQ6 pin. > > We are now trying to get this driver to work with the 2.6.25 pull from > powerpc.git. > > request_irq (use_irq, irq_handler, IRQF_SHARED, DEVICE_NAME, dev); > > returns -ENOSYS on the newer kernel. > > Have the IRQ mappings for the external IRQX pins been moved in the later > kernels? Yes, you need to use the result of irq_create_mapping() or irq_of_parse_and_map(). -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/9] 83xx DTS fixes and v1 conversions
Kumar Gala wrote: > On Mon, 28 Jan 2008, Paul Gortmaker wrote: > > >> This series incorporates my earlier qe/muram fix before converting >> the existing mpc83xx DTS files to v1 format. I've also redone the >> mpc834x_mds with the IRQs as decimal as per Kumar's comments and >> re-included that too. I've kept each board as a separate commit >> in case one of them conflicts with what someone else is working on. >> >> Boards covered are: 8349mds, 8349mitx, 8349mitx-gp, 836x_mds, >> 8323_mds, 8323_rdb, and the 8313_rdb. Plus a small tweak to the >> sbc8349 (it was already v1 -- but IRQs were in hex.) >> >> I've fed all the files to DTC before and after to ensure the >> output is the same after the conversion. >> >> I'm not aware of any explicit rules for what is hex vs decimal. >> I've tried to keep things that are usually discussed in decimal >> as decimal quantities (i.e. cache size, IRQ, counts, indicies) >> and all other data that you'd normally expect in hex (addresses, >> IRQ flags, masks) as hex -- including prefixing 0x on values from >> zero to 10 where it tends to make rows of numbers (e.g. ranges) >> align for better readability, even though it isn't required. >> >> > > Can you regen these patches (2..9) againast my latest tree. Also, a > single patch that cleans up all the boards is sufficient. > The patches should be current to your tree still as of today; they are based on: f09f415ea23272ae68f9322f90246680d46f4868not-for-merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc My patch #1 with all four qe/muram boards was posted earlier here: http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050767.html Let me know what you need them based against and I can respin as required. P. > - k > ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] 83xx: rework platform Kconfig
* Allow multiple boards to be selected in a single build * Removed Kconfig option '83xx' which existed only for compat with arch/ppc * Removed Kconfig option 'PPC_MPC836x' since its not used * Renamed Kconfig option 'MPC834x' to 'PPC_MPC834x' to match others * Added a multiplatform 83xx defconfig (mpc83xx_defconfig). --- Removed defconfig from patch arch/powerpc/configs/mpc83xx_defconfig | 895 arch/powerpc/platforms/83xx/Kconfig| 43 +- arch/powerpc/platforms/83xx/usb.c |4 +- arch/powerpc/platforms/Kconfig |2 +- arch/powerpc/platforms/Kconfig.cputype |4 - 5 files changed, 918 insertions(+), 30 deletions(-) create mode 100644 arch/powerpc/configs/mpc83xx_defconfig diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig index ba28882..13587e2 100644 --- a/arch/powerpc/platforms/83xx/Kconfig +++ b/arch/powerpc/platforms/83xx/Kconfig @@ -1,11 +1,15 @@ -choice - prompt "83xx Board Type" +menuconfig MPC83xx + bool "83xx Board Type" depends on PPC_83xx - default MPC834x_MDS + select PPC_UDBG_16550 + select PPC_INDIRECT_PCI + +if MPC83xx config MPC831x_RDB bool "Freescale MPC831x RDB" select DEFAULT_UIMAGE + select PPC_MPC831x help This option enables support for the MPC8313 RDB and MPC8315 RDB boards. @@ -13,6 +17,7 @@ config MPC832x_MDS bool "Freescale MPC832x MDS" select DEFAULT_UIMAGE select QUICC_ENGINE + select PPC_MPC832x help This option enables support for the MPC832x MDS evaluation board. @@ -20,12 +25,14 @@ config MPC832x_RDB bool "Freescale MPC832x RDB" select DEFAULT_UIMAGE select QUICC_ENGINE + select PPC_MPC832x help This option enables support for the MPC8323 RDB board. config MPC834x_MDS bool "Freescale MPC834x MDS" select DEFAULT_UIMAGE + select PPC_MPC834x help This option enables support for the MPC 834x MDS evaluation board. @@ -37,6 +44,7 @@ config MPC834x_MDS config MPC834x_ITX bool "Freescale MPC834x ITX" select DEFAULT_UIMAGE + select PPC_MPC834x help This option enables support for the MPC 834x ITX evaluation board. @@ -53,49 +61,38 @@ config MPC836x_MDS config MPC837x_MDS bool "Freescale MPC837x MDS" select DEFAULT_UIMAGE + select PPC_MPC837x help This option enables support for the MPC837x MDS Processor Board. config MPC837x_RDB bool "Freescale MPC837x RDB" select DEFAULT_UIMAGE + select PPC_MPC837x help This option enables support for the MPC837x RDB Board. config SBC834x bool "Wind River SBC834x" select DEFAULT_UIMAGE + select PPC_MPC834x help This option enables support for the Wind River SBC834x board. -endchoice +endif +# used for usb config PPC_MPC831x bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI - default y if MPC831x_RDB +# used for math-emu config PPC_MPC832x bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI - default y if MPC832x_MDS || MPC832x_RDB -config MPC834x +# used for usb +config PPC_MPC834x bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI - default y if MPC834x_MDS || MPC834x_ITX || SBC834x - -config PPC_MPC836x - bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI - default y if MPC836x_MDS +# used for usb config PPC_MPC837x bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI - default y if MPC837x_MDS || MPC837x_RDB diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index 6a454a4..681230a 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c @@ -22,7 +22,7 @@ #include "mpc83xx.h" -#ifdef CONFIG_MPC834x +#ifdef CONFIG_PPC_MPC834x int mpc834x_usb_cfg(void) { unsigned long sccr, sicrl, sicrh; @@ -96,7 +96,7 @@ int mpc834x_usb_cfg(void) iounmap(immap); return 0; } -#endif /* CONFIG_MPC834x */ +#endif /* CONFIG_PPC_MPC834x */ #ifdef CONFIG_PPC_MPC831x int mpc831x_usb_cfg(void) diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 582a3a6..fdce10c 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -21,7 +21,7 @@ config PPC_83xx bool "Freescale 83xx" depends on 6xx select FSL_SOC - select 83xx + select MPC83xx select IPIC select WANT_DEVICE_TREE diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index f6bf025..7fc4110 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -93,10 +93,6 @@ config 6xx config 8xx bool -# thi
Re: [Cbe-oss-dev] [PATCH 3/3] Cell IOMMU static mapping support
On Mon, 2008-01-28 at 10:23 -0600, Olof Johansson wrote: > Ok, makes sense. > > I was going to protest the hack for >32GB configs, with the motivation > that just using the htab-backed window is way too small for such a > config. However, with 32GB memory and 4K pages, that window is 512MB, so > we should be fine. Might be a problem with 64K pages tho... Or do we use the same calculation ? In addition, on those blades, really the only device that is limited to 32 bits (and thus is forced to use the iommu remapped region) is USB. > Having that described in the patch (or at least in the patch description) > to make it more clear could be good. That, and the fact that the mapping > is offset on <32GB memory machines, and thus not really a 1:1 mapping. Should be called a "linear" mapping. > Does the cell I/O bridge reflect out accesses to 2-4GB on the bus > again? If not, that could be another place to stick the dynamic range > for large config machines. On the PCI bus itself, 2-4GB is where MMIO sits. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [Cbe-oss-dev] [PATCH 3/3] Cell IOMMU static mapping support
On Mon, 2008-01-28 at 10:23 -0600, Olof Johansson wrote: > Having that described in the patch (or at least in the patch > description) > to make it more clear could be good. That, and the fact that the > mapping > is offset on <32GB memory machines, and thus not really a 1:1 mapping. It is at an offset still on the PCI bus. On those, 0...2G will be used to cover the hole, but a different range higher in the bus space (in 64 bits space) will be use to access the linear mapping. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCHv3 2.6.25] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers
Hi Bryan, >> + >> + /* register new adapter to i2c module... */ >> + >> + result = i2c_add_adapter(&cpm->adap); > > As I was pointed before, please use the new style i2c driver interface: > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=991dee591a99d035796a8c194eb1796cc020e142 AFAIK, the device tree currently doesn't provide an adapter id. If we're going to add this property, this would be needed on other of_platform i2c drivers, as well. Thanks, Jochen ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch v4 0/4] Cypress c67x00 (EZ-Host/EZ-OTG) support
> "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: Hi, Grant> I've now merged the driver into my tree and tested it. Grant> The good news is that using only one device node is absolutely Grant> no problem. It works without error or complaint and sysfs Grant> looks sane. Great. Grant> The bad news is that I discovered a race condition on Grant> initialization. The problem is that IRQs are enabled before Grant> the SIEs are configured. The interrupt handler is firing Grant> immediately and tries to get the status of each SIE. Since Grant> the SIE probe has not yet occured, sie->dev is NULL and we get Grant> a kernel oops when c67x00_ll_get_siemsg() tries to dereference Grant> it. Not so great. I unfortunately don't see it here. Grant> However, register_irq() cannot be easily moved to after the Grant> SIE probe because the current probe code depends on interrupts Grant> being enabled. Below is an ugly workaround that solves the Grant> problem to me, but there is probably a better solution. Wouldn't it be simpler to just add a if (sie->dev) check to _ll_get_siemsg()? Or doesn't the hcd init properly reinitialize the device? -- Bye, Peter Korsgaard ___ 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 Friday 25 January 2008, Jochen Friedrich wrote: > Maybe the wording should be changed to: > > This driver is now only used on ColdFire (m68knommu) processors. Conditional > PowerPC code has been removed. > How about adding a pointer to the driver that is now used on powerpc, for the people that are looking in here? Arnd <>< ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Patches added to for-2.6.25/master branches of powerpc.git
On Sunday 27 January 2008, Michael Ellerman wrote: > Can you grab these four assuming there's no objections in the meantime. > > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16430 > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16433 > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16434 > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16437 > Yes, they all look good to me, you can add an 'Acked-by: Arnd Bergmann <[EMAIL PROTECTED]>' if you like. What about your other series that adds the linear iommu mapping for cell blades? Are you still waiting for more feedback and testing on that, or can it also go in? Arnd <>< ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] hide kernel only code in asm-powerpc/elf.h
On Friday 25 January 2008, Olaf Hering wrote: > stuff inside CONFIG_* should not be exported via make headers-install > > Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> > Acked-by: Arnd Bergmann <[EMAIL PROTECTED]> I think at some point I even had a script to automatically check for this kind of bug. Using any #ifdef CONFIG_* in an exported header is guaranteed to be a bug, because we don't export config.h. Arnd <>< ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/9] 83xx DTS fixes and v1 conversions
On Jan 28, 2008, at 9:51 AM, Paul Gortmaker wrote: > Kumar Gala wrote: >> On Mon, 28 Jan 2008, Paul Gortmaker wrote: >> >> >>> This series incorporates my earlier qe/muram fix before converting >>> the existing mpc83xx DTS files to v1 format. I've also redone the >>> mpc834x_mds with the IRQs as decimal as per Kumar's comments and >>> re-included that too. I've kept each board as a separate commit >>> in case one of them conflicts with what someone else is working on. >>> >>> Boards covered are: 8349mds, 8349mitx, 8349mitx-gp, 836x_mds, >>> 8323_mds, 8323_rdb, and the 8313_rdb. Plus a small tweak to the >>> sbc8349 (it was already v1 -- but IRQs were in hex.) >>> >>> I've fed all the files to DTC before and after to ensure the >>> output is the same after the conversion. >>> >>> I'm not aware of any explicit rules for what is hex vs decimal. >>> I've tried to keep things that are usually discussed in decimal >>> as decimal quantities (i.e. cache size, IRQ, counts, indicies) >>> and all other data that you'd normally expect in hex (addresses, >>> IRQ flags, masks) as hex -- including prefixing 0x on values from >>> zero to 10 where it tends to make rows of numbers (e.g. ranges) >>> align for better readability, even though it isn't required. >>> >>> >> >> Can you regen these patches (2..9) againast my latest tree. Also, a >> single patch that cleans up all the boards is sufficient. >> > > The patches should be current to your tree still as of today; they > are based on: > > f09f415ea23272ae68f9322f90246680d46f4868not-for-merge > branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/ > galak/powerpc > > My patch #1 with all four qe/muram boards was posted earlier here: > > http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050767.html > > Let me know what you need them based against and I can respin > as required. I've pushed out a bunch of stuff today. commit 390167efa329d11099957108fc23d1ad15c3f37e I'm expect a respin since the patches don't currently apply to my tree. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [Cbe-oss-dev] [PATCH 3/3] Cell IOMMU static mapping support
On Tue, Jan 29, 2008 at 08:16:17AM +1100, Benjamin Herrenschmidt wrote: > > On Mon, 2008-01-28 at 10:23 -0600, Olof Johansson wrote: > > Ok, makes sense. > > > > I was going to protest the hack for >32GB configs, with the motivation > > that just using the htab-backed window is way too small for such a > > config. However, with 32GB memory and 4K pages, that window is 512MB, so > > we should be fine. > > Might be a problem with 64K pages tho... Or do we use the same > calculation ? The current code is hardcoded at page shift 12. That's probably the safest thing to do, since even though PAGE_SHIFT might be 16, if we're doing the software-based 64K approach we can't use a smaller table. See htab_get_table_size() in arch/powerpc/mm/hash_utils_64.c. > In addition, on those blades, really the only device that is limited to > 32 bits (and thus is forced to use the iommu remapped region) is USB. > > > Having that described in the patch (or at least in the patch description) > > to make it more clear could be good. That, and the fact that the mapping > > is offset on <32GB memory machines, and thus not really a 1:1 mapping. > > Should be called a "linear" mapping. Yep. Linear with a fixed offset. > > Does the cell I/O bridge reflect out accesses to 2-4GB on the bus > > again? If not, that could be another place to stick the dynamic range > > for large config machines. > > On the PCI bus itself, 2-4GB is where MMIO sits. Depending on the implementation, 2-4GB accesses _from_ PCI could mean something else. But for most machines it doesn't, and I'm guessing cell is one of those. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[Add mpc5121 support PATCH v4 1/4] Basic Freescale MPC512x support
512x is very similar to 83xx and most of this is patterned after code from 83xx. New platform: changed: arch/powerpc/Kconfig arch/powerpc/platforms/Kconfig arch/powerpc/platforms/Kconfig.cputype arch/powerpc/platforms/Makefile new: arch/powerpc/platforms/512x/* include/asm-powerpc/mpc512x.h Signed-off-by: John Rigby <[EMAIL PROTECTED]> Acked-by: Grant Likely <[EMAIL PROTECTED]> Conflicts: arch/powerpc/Kconfig --- arch/powerpc/Kconfig |2 +- arch/powerpc/platforms/512x/Kconfig | 20 ++ arch/powerpc/platforms/512x/Makefile |4 + arch/powerpc/platforms/512x/mpc5121_ads.c | 104 + arch/powerpc/platforms/Kconfig|1 + arch/powerpc/platforms/Kconfig.cputype|6 +- arch/powerpc/platforms/Makefile |1 + include/asm-powerpc/mpc512x.h | 22 ++ 8 files changed, 156 insertions(+), 4 deletions(-) create mode 100644 arch/powerpc/platforms/512x/Kconfig create mode 100644 arch/powerpc/platforms/512x/Makefile create mode 100644 arch/powerpc/platforms/512x/mpc5121_ads.c create mode 100644 include/asm-powerpc/mpc512x.h diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5e10838..12c5cde 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -481,7 +481,7 @@ config PCI bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ || PPC_PS3 || 44x - default y if !40x && !CPM2 && !8xx && !PPC_83xx \ + default y if !40x && !CPM2 && !8xx && !PPC_MPC512x && !PPC_83xx \ && !PPC_85xx && !PPC_86xx default PCI_PERMEDIA if !4xx && !CPM2 && !8xx default PCI_QSPAN if !4xx && !CPM2 && 8xx diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig new file mode 100644 index 000..c6fa49e --- /dev/null +++ b/arch/powerpc/platforms/512x/Kconfig @@ -0,0 +1,20 @@ +config PPC_MPC512x + bool + select FSL_SOC + select IPIC + default n + +config PPC_MPC5121 + bool + select PPC_MPC512x + default n + +config MPC5121_ADS + bool "Freescale MPC5121E ADS" + depends on PPC_MULTIPLATFORM && PPC32 + select DEFAULT_UIMAGE + select WANT_DEVICE_TREE + select PPC_MPC5121 + help + This option enables support for the MPC5121E ADS board. + default n diff --git a/arch/powerpc/platforms/512x/Makefile b/arch/powerpc/platforms/512x/Makefile new file mode 100644 index 000..232c89f --- /dev/null +++ b/arch/powerpc/platforms/512x/Makefile @@ -0,0 +1,4 @@ +# +# Makefile for the Freescale PowerPC 512x linux kernel. +# +obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c new file mode 100644 index 000..50bd3a3 --- /dev/null +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved. + * + * Author: John Rigby, <[EMAIL PROTECTED]>, Thur Mar 29 2007 + * + * Description: + * MPC5121 ADS board setup + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +/** + * mpc512x_find_ips_freq - Find the IPS bus frequency for a device + * @node: device node + * + * Returns IPS bus frequency, or 0 if the bus frequency cannot be found. + */ +unsigned long +mpc512x_find_ips_freq(struct device_node *node) +{ + struct device_node *np; + const unsigned int *p_ips_freq = NULL; + + of_node_get(node); + while (node) { + p_ips_freq = of_get_property(node, "bus-frequency", NULL); + if (p_ips_freq) + break; + + np = of_get_parent(node); + of_node_put(node); + node = np; + } + if (node) + of_node_put(node); + + return p_ips_freq ? *p_ips_freq : 0; +} +EXPORT_SYMBOL(mpc512x_find_ips_freq); + +static struct of_device_id __initdata of_bus_ids[] = { + { .name = "soc", }, + { .name = "localbus", }, + {}, +}; + +static void __init mpc5121_ads_declare_of_platform_devices(void) +{ + /* Find every child of the SOC node and add it to of_platform */ + if (of_platform_bus_probe(NULL, of_bus_ids, NULL)) + printk(KERN_ERR __FILE__ ": " + "Error while probing of_platform bus\n"); +} + +static void __init mpc5121_ads_init_IRQ(void) +{ + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "
[PATCH] [POWERPC] 85xx: Only invalidate TLB0 and TLB1
All current 85xx/e500 implementations only have two TLB arrays. We are wasting cycles by invalidating TLB2 and TLB3. --- arch/powerpc/kernel/misc_32.S | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index be09f0d..5c2e253 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -275,12 +275,6 @@ _GLOBAL(_tlbia) /* Invalidate all entries in TLB1 */ li r3, 0x0c tlbivax 0,3 - /* Invalidate all entries in TLB2 */ - li r3, 0x14 - tlbivax 0,3 - /* Invalidate all entries in TLB3 */ - li r3, 0x1c - tlbivax 0,3 msync #ifdef CONFIG_SMP tlbsync @@ -375,12 +369,8 @@ _GLOBAL(_tlbie) #elif defined(CONFIG_FSL_BOOKE) rlwinm r4, r3, 0, 0, 19 ori r5, r4, 0x08/* TLBSEL = 1 */ - ori r6, r4, 0x10/* TLBSEL = 2 */ - ori r7, r4, 0x18/* TLBSEL = 3 */ tlbivax 0, r4 tlbivax 0, r5 - tlbivax 0, r6 - tlbivax 0, r7 msync #if defined(CONFIG_SMP) tlbsync -- 1.5.3.7 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/3] Convert PowerPC MPC i2c to of_platform_driver from platform_driver
Hi, Nice to see this one, I've been waiting for it. :) On Mon, Jan 28, 2008 at 09:42:07AM -0500, Jon Smirl wrote: > diff --git a/drivers/i2c/busses/powerpc-common.c > b/drivers/i2c/busses/powerpc-common.c > new file mode 100644 > index 000..51b039f > --- /dev/null > +++ b/drivers/i2c/busses/powerpc-common.c This is really broader than powerpc. devtree-common.c would be a more suitable name. > @@ -0,0 +1,81 @@ > +/* > + * powerpc-common.c - routines common to device tree parsing for all > + *powerpc based i2c hosts > + * > + * 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. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > + * > + * (C) Copyright 2008 Jon Smirl <[EMAIL PROTECTED]> > + * > + */ > + > +#include > +#include > +#include > + > +#include "powerpc-common.h" > + > +#ifdef CONFIG_PPC_MERGE > + > +void of_register_i2c_devices(struct i2c_adapter *adap, struct device_node > *adap_node) > +{ > + void *result; > + struct device_node *node = NULL; > + > + while ((node = of_get_next_child(adap_node, node))) { > + struct i2c_board_info info; > + const u32 *addr; > + const char *compatible; > + int len; > + > + compatible = of_get_property(node, "compatible", NULL); > + if (!compatible) { > + printk(KERN_ERR "i2c-mpc.c: missing compatible > attribute\n"); > + continue; > + } > + > + addr = of_get_property(node, "reg", &len); > + if (!addr || len < sizeof(int) || *addr > (1 << 10) - 1) { > + printk(KERN_ERR "i2c-mpc.c: missing reg attribute for > %s\n", compatible); This is no longer i2c-mpc. Same for the other comments in this function. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull from 'for-2.6.25' branch
Please pull from 'for-2.6.25' branch of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.25 to receive the following updates: Documentation/powerpc/booting-without-of.txt | 177 +++ arch/powerpc/boot/Makefile |5 arch/powerpc/boot/cuboot-85xx-cpm2.c | 66 + arch/powerpc/boot/dts/mpc8313erdb.dts|4 arch/powerpc/boot/dts/mpc8315erdb.dts| 287 + arch/powerpc/boot/dts/mpc832x_mds.dts| 22 arch/powerpc/boot/dts/mpc832x_rdb.dts| 23 arch/powerpc/boot/dts/mpc8349emitx.dts |4 arch/powerpc/boot/dts/mpc8349emitxgp.dts |4 arch/powerpc/boot/dts/mpc834x_mds.dts| 256 ++-- arch/powerpc/boot/dts/mpc836x_mds.dts| 25 arch/powerpc/boot/dts/mpc8377_mds.dts|3 arch/powerpc/boot/dts/mpc8377_rdb.dts| 296 + arch/powerpc/boot/dts/mpc8378_mds.dts|3 arch/powerpc/boot/dts/mpc8378_rdb.dts| 282 + arch/powerpc/boot/dts/mpc8379_mds.dts|3 arch/powerpc/boot/dts/mpc8379_rdb.dts| 310 + arch/powerpc/boot/dts/mpc8568mds.dts | 24 arch/powerpc/boot/dts/mpc8610_hpcd.dts | 227 ++-- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 333 +++--- arch/powerpc/boot/dts/sbc8349.dts| 244 arch/powerpc/boot/dts/sbc8548.dts| 244 arch/powerpc/boot/dts/sbc8560.dts| 330 ++ arch/powerpc/boot/dts/storcenter.dts | 73 - 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/mpc8313_rdb_defconfig |2 arch/powerpc/configs/mpc8315_rdb_defconfig | 1417 +++ arch/powerpc/configs/mpc837x_rdb_defconfig | 887 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 | 25 arch/powerpc/platforms/83xx/Makefile |4 arch/powerpc/platforms/83xx/mpc8313_rdb.c| 101 - arch/powerpc/platforms/83xx/mpc831x_rdb.c| 93 + 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/83xx/mpc837x_rdb.c| 99 + arch/powerpc/platforms/83xx/sbc834x.c| 115 ++ arch/powerpc/platforms/85xx/Kconfig | 71 + arch/powerpc/platforms/85xx/Makefile |4 arch/powerpc/platforms/85xx/mpc85xx_mds.c| 32 arch/powerpc/platforms/85xx/sbc8548.c| 169 +++ arch/powerpc/platforms/85xx/sbc8560.c| 285 + arch/powerpc/platforms/85xx/stx_gp3.c| 183 +++ arch/powerpc/platforms/85xx/tqm85xx.c| 187 +++ arch/powerpc/platforms/8xx/ep88xc.c |5 arch/powerpc/platforms/8xx/m8xx_setup.c | 11 arch/powerpc/platforms/8xx/mpc86xads_setup.c |8 arch/powerpc/platforms/8xx/mpc885ads_setup.c |7 arch/powerpc/platforms/8xx/mpc8xx.h | 21 arch/powerpc/platforms/Kconfig |4 arch/powerpc/platforms/embedded6xx/ls_uart.c |5 arch/powerpc/sysdev/Makefile |4 arch/powerpc/sysdev/commproc.c | 650 arch/powerpc/sysdev/commproc.h | 12 arch/powerpc/sysdev/cpm1.c | 612 +++ arch/powerpc/sysdev/cpm2.c | 469 arch/powerpc/sysdev/cpm2_common.c| 470 arch/powerpc/sysdev/fsl_soc.c| 99 + arch/powerpc/sysdev/ipic.c |6 arch/powerpc/sysdev/micropatch.c |2 arch/powerpc/sysdev/mpc8xx_pic.c |1 arch/powerpc/sysdev/qe_lib/qe.c | 63 - arch/ppc/8260_io/enet.c |2 arch/ppc/8xx_io/commproc.c | 40 arch/ppc/8xx_io/enet.c |6 arch/ppc/8xx_io/fec.c|2 arch/ppc/8xx_io/micropatch.c |2 arch/ppc/Kconfig
[Add mpc5121 support PATCH v4 3/4] Factor out 5200 dependencies from 52xx psc driver
PSCs change from 5200 to 5121 this patch localizes the differences in preparation for adding 5121 support Signed-off-by: John Rigby <[EMAIL PROTECTED]> --- drivers/serial/mpc52xx_uart.c | 256 ++-- 1 files changed, 192 insertions(+), 64 deletions(-) diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 1e3721a..5bd1171 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -67,7 +67,6 @@ #include #include #include - #include #include @@ -111,8 +110,8 @@ static struct device_node *mpc52xx_uart_nodes[MPC52xx_PSC_MAXNUM]; static void mpc52xx_uart_of_enumerate(void); #endif + #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase)) -#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1)) /* Forward declaration of the interruption handling routine */ @@ -135,6 +134,162 @@ static struct of_device_id mpc52xx_uart_of_match[] = { }; #endif +/* */ +/* PSC fifo operations for isolating differences between 52xx and 512x */ +/* */ + +struct psc_ops { + void(*fifo_init)(struct uart_port *port); + int (*raw_rx_rdy)(struct uart_port *port); + int (*raw_tx_rdy)(struct uart_port *port); + int (*rx_rdy)(struct uart_port *port); + int (*tx_rdy)(struct uart_port *port); + int (*tx_empty)(struct uart_port *port); + void(*stop_rx)(struct uart_port *port); + void(*start_tx)(struct uart_port *port); + void(*stop_tx)(struct uart_port *port); + void(*rx_clr_irq)(struct uart_port *port); + void(*tx_clr_irq)(struct uart_port *port); + void(*write_char)(struct uart_port *port, unsigned char c); + unsigned char (*read_char)(struct uart_port *port); + void(*cw_disable_ints)(struct uart_port *port); + void(*cw_restore_ints)(struct uart_port *port); + unsigned long (*getuartclk)(void *p); +}; + +#define FIFO_52xx(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1)) +static void mpc52xx_psc_fifo_init(struct uart_port *port) +{ + struct mpc52xx_psc __iomem *psc = PSC(port); + struct mpc52xx_psc_fifo __iomem *fifo = FIFO_52xx(port); + + /* /32 prescaler */ + out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); + + out_8(&fifo->rfcntl, 0x00); + out_be16(&fifo->rfalarm, 0x1ff); + out_8(&fifo->tfcntl, 0x07); + out_be16(&fifo->tfalarm, 0x80); + + port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY; + out_be16(&psc->mpc52xx_psc_imr, port->read_status_mask); +} + +static int mpc52xx_psc_raw_rx_rdy(struct uart_port *port) +{ + return in_be16(&PSC(port)->mpc52xx_psc_status) + & MPC52xx_PSC_SR_RXRDY; +} + +static int mpc52xx_psc_raw_tx_rdy(struct uart_port *port) +{ + return in_be16(&PSC(port)->mpc52xx_psc_status) + & MPC52xx_PSC_SR_TXRDY; +} + + +static int mpc52xx_psc_rx_rdy(struct uart_port *port) +{ + return in_be16(&PSC(port)->mpc52xx_psc_isr) + & port->read_status_mask + & MPC52xx_PSC_IMR_RXRDY; +} + +static int mpc52xx_psc_tx_rdy(struct uart_port *port) +{ + return in_be16(&PSC(port)->mpc52xx_psc_isr) + & port->read_status_mask + & MPC52xx_PSC_IMR_TXRDY; +} + +static int mpc52xx_psc_tx_empty(struct uart_port *port) +{ + return in_be16(&PSC(port)->mpc52xx_psc_status) + & MPC52xx_PSC_SR_TXEMP; +} + +static void mpc52xx_psc_start_tx(struct uart_port *port) +{ + port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY; + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask); +} + +static void mpc52xx_psc_stop_tx(struct uart_port *port) +{ + port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY; + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask); +} + +static void mpc52xx_psc_stop_rx(struct uart_port *port) +{ + port->read_status_mask &= ~MPC52xx_PSC_IMR_RXRDY; + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask); +} + +static void mpc52xx_psc_rx_clr_irq(struct uart_port *port) +{ +} + +static void mpc52xx_psc_tx_clr_irq(struct uart_port *port) +{ +} + +static void mpc52xx_psc_write_char(struct uart_port *port, unsigned char c) +{ + out_8(&PSC(port)->mpc52xx_psc_buffer_8, c); +} + +static unsigned char mpc52xx_psc_read_char(struct uart_port *port) +{ + return in_8(&PSC(port)->mpc52xx_psc_buffer_8); +} + +static void mpc52xx_psc_cw_disable_ints(struct uart_port *port) +{ + out_be16(&PSC(port)->mpc52xx_psc_imr, 0); +} + +static void mpc52xx_psc_cw_restore_ints(struct uart_port *port) +{ + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status
[Add mpc5121 support PATCH v4 0/4] Basic Freescale MPC512x support
New patches set hopefully for 2.6.25 Changes since v3 First four patches have already gone in via Grant and Kumar 1/4 Basic-Freescale-MPC512x-support.patch Previously Acked-by: Grant Likely <[EMAIL PROTECTED]> 2/4 Device-tree-for-MPC5121-ADS.patch Updated to /dts-v1/ 3/4 Factor out 5200 dependencies from 52xx psc driver Fixed problem on no output in userland 4/4 Add MPC512x support to MPC52xx psc driver No changes since v3 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] 83xx: Clean up / convert mpc83xx board DTS files to v1 format.
On Mon, 28 Jan 2008, Paul Gortmaker wrote: > This patch converts the remaining 83xx boards to the dts-v1 format. > This includes the mpc8313_rdb, mpc832x_mds, mpc8323_rdb, mpc8349emitx, > mpc8349emitxgp and the mpc836x_mds. > > The mpc8315_rdb mpc834x_mds, mpc837[789]_*, and sbc8349 were already > dts-v1 and only undergo minor changes for the sake of formatting > consistency across the whole group of boards; i.e. the idea being > that you can do a "diff -u board_A.dts board_B.dts" and see something > meaningful. > > The general rule I've applied is that entries for values normally > parsed by humans are left in decimal (i.e. IRQ, cache size, clock > rates, basic counts and indexes) and all other data (i.e. reg and > ranges, IRQ flags etc.) remain in hex. > > I've used dtc to confirm that the output prior to this changeset > matches the output after this changeset is applied for all boards. > > Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/mpc8313erdb.dts| 152 +- > arch/powerpc/boot/dts/mpc8315erdb.dts| 100 ++-- > arch/powerpc/boot/dts/mpc832x_mds.dts| 252 +++-- > arch/powerpc/boot/dts/mpc832x_rdb.dts| 154 +- > arch/powerpc/boot/dts/mpc8349emitx.dts | 155 +- > arch/powerpc/boot/dts/mpc8349emitxgp.dts | 109 +++-- > arch/powerpc/boot/dts/mpc834x_mds.dts| 36 ++-- > arch/powerpc/boot/dts/mpc836x_mds.dts| 260 > +++--- > arch/powerpc/boot/dts/mpc8377_mds.dts| 138 > arch/powerpc/boot/dts/mpc8377_rdb.dts| 102 ++-- > arch/powerpc/boot/dts/mpc8378_mds.dts| 130 > arch/powerpc/boot/dts/mpc8378_rdb.dts| 94 ++-- > arch/powerpc/boot/dts/mpc8379_mds.dts| 146 +- > arch/powerpc/boot/dts/mpc8379_rdb.dts| 112 +++--- > arch/powerpc/boot/dts/sbc8349.dts| 44 +++--- > 15 files changed, 999 insertions(+), 985 deletions(-) > applied. Checkout for whitespace in the future (sbc8349.dts) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: fix typo in mpc837x compatible entries
On Mon, 28 Jan 2008, Kim Phillips wrote: > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> > --- > arch/powerpc/boot/dts/mpc8377_rdb.dts |2 +- > arch/powerpc/boot/dts/mpc8378_rdb.dts |2 +- > arch/powerpc/boot/dts/mpc8379_rdb.dts |2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts > b/arch/powerpc/boot/dts/mpc8377_rdb.dts applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Patches added to for-2.6.25/master branches of powerpc.git
On Mon, 2008-01-28 at 21:19 +0100, Arnd Bergmann wrote: > On Sunday 27 January 2008, Michael Ellerman wrote: > > Can you grab these four assuming there's no objections in the meantime. > > > > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16430 > > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16433 > > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16434 > > http://patchwork.ozlabs.org/linuxppc/patch?q=ellerman&id=16437 > > > > Yes, they all look good to me, you can add an > 'Acked-by: Arnd Bergmann <[EMAIL PROTECTED]>' if you like. > > What about your other series that adds the linear iommu mapping > for cell blades? Are you still waiting for more feedback and > testing on that, or can it also go in? I'd like to clean it up a bit, split the big patch up a bit. I'll try to do that today or tomorrow. And more testing would definitely be good, but that's a little tricky from LCA :) cheers -- Michael Ellerman OzLabs, IBM Australia Development Lab wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 1/9] qe/muram dts: Explicitly set address-cells and size cells for muram
On Mon, 28 Jan 2008, Paul Gortmaker wrote: > 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/mpc836x_mds.dts |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > Also fixed up mpc832x_*.dts and mpc8568mds.dts. applied - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc: fix typo in mpc837x compatible entries
Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8377_rdb.dts |2 +- arch/powerpc/boot/dts/mpc8378_rdb.dts |2 +- arch/powerpc/boot/dts/mpc8379_rdb.dts |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts index 8fe02cc..cd60005 100644 --- a/arch/powerpc/boot/dts/mpc8377_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts @@ -12,7 +12,7 @@ /dts-v1/; / { - compatible = "fsl,mpc8377erdb"; + compatible = "fsl,mpc8377rdb"; #address-cells = <1>; #size-cells = <1>; diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts index 33d490b..03831a1 100644 --- a/arch/powerpc/boot/dts/mpc8378_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts @@ -12,7 +12,7 @@ /dts-v1/; / { - compatible = "fsl,mpc8378erdb"; + compatible = "fsl,mpc8378rdb"; #address-cells = <1>; #size-cells = <1>; diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts index a81e916..255d2e4 100644 --- a/arch/powerpc/boot/dts/mpc8379_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts @@ -12,7 +12,7 @@ /dts-v1/; / { - compatible = "fsl,mpc8379erdb"; + compatible = "fsl,mpc8379rdb"; #address-cells = <1>; #size-cells = <1>; -- 1.5.2.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch v4 0/4] Cypress c67x00 (EZ-Host/EZ-OTG) support
On 1/23/08, David Brownell <[EMAIL PROTECTED]> wrote: > On Wednesday 23 January 2008, Grant Likely wrote: > > The question is about the device structure which used to be provided > > by the platform device instances and now there just uses the c67x00's > > device struct. I was under the impression that each USB HCD needs to > > have it's own struct device. I take it that's not true? > > Each root hub necessarily is a unique device, representing a set > of downstream links. Unless Peter didn't test something relevant, > it would seem we have observational proof that two root hubs can > share the same device node for an upstream link. > > I can't think of a reason to demand multiple upstream links, though > sharing them between root hubs like that isn't a common structure. I've now merged the driver into my tree and tested it. The good news is that using only one device node is absolutely no problem. It works without error or complaint and sysfs looks sane. The bad news is that I discovered a race condition on initialization. The problem is that IRQs are enabled before the SIEs are configured. The interrupt handler is firing immediately and tries to get the status of each SIE. Since the SIE probe has not yet occured, sie->dev is NULL and we get a kernel oops when c67x00_ll_get_siemsg() tries to dereference it. However, register_irq() cannot be easily moved to after the SIE probe because the current probe code depends on interrupts being enabled. Below is an ugly workaround that solves the problem to me, but there is probably a better solution. Cheers, g. diff --git a/drivers/usb/c67x00/c67x00-drv.c b/drivers/usb/c67x00/c67x00-drv.c index 360bae5..4051502 100644 --- a/drivers/usb/c67x00/c67x00-drv.c +++ b/drivers/usb/c67x00/c67x00-drv.c @@ -105,6 +105,8 @@ static irqreturn_t c67x00_irq(int irq, void *__dev) } if (sie->irq) sie->irq(sie, int_status, msg); + else if (int_status & SOFEOP_FLG(sie->sie_num)) + c67x00_ll_usb_clear_status(sie, SOF_EOP_IRQ_FLG); } int_status = c67x00_ll_hpi_status(c67x00); } @@ -168,6 +170,11 @@ static int __devinit c67x00_drv_probe(struct platform_device *pdev) goto request_irq_failed; } + for (i = 0; i < C67X00_SIES; i++) { + c67x00->sie[i].sie_num = i; + c67x00->sie[i].dev = c67x00; + } + ret = c67x00_ll_reset(c67x00); if (ret) { dev_err(&pdev->dev, "Device reset failed\n"); -- 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: [RFC][PATCH] remove section mappinng
On Sat, 2008-01-26 at 12:24 +1100, Paul Mackerras wrote: > 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, Thank you for your input and suggestions. Does this look reasonable to you ? Thanks, Badari For memory remove, we need to clean up htab mappings for the section of the memory we are removing. This patch implements support for removing htab bolted mappings for ppc64 lpar. Other sub-archs, may need to implement similar functionality for the hotplug memory remove to work. Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> --- arch/powerpc/mm/hash_utils_64.c | 23 +++ arch/powerpc/platforms/pseries/lpar.c | 15 +++ include/asm-powerpc/machdep.h |2 ++ include/asm-powerpc/sparsemem.h |1 + 5 files changed, 44 insertions(+), 1 deletion(-) 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-25 08:04:32.0 -0800 +++ linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c2008-01-28 11:45:40.0 -0800 @@ -191,6 +191,24 @@ 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; + + if (!ppc_md.hpte_removebolted) { + printk("Sub-arch doesn't implement hpte_removebolted\n"); + return; + } + + for (vaddr = vstart; vaddr < vend; vaddr += step) + ppc_md.hpte_removebolted(vaddr, psize, ssize); +} + static int __init htab_dt_scan_seg_sizes(unsigned long node, const char *uname, int depth, void *data) @@ -436,6 +454,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-25 08:18:11.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 Index: linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c === --- linux-2.6.24-rc8.orig/arch/powerpc/platforms/pseries/lpar.c 2008-01-15 20:22:48.0 -0800 +++ linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c 2008-01-28 14:10:58.0 -0800 @@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate BUG_ON(lpar_rc != H_SUCCESS); } +static void pSeries_lpar_hpte_removebolted(unsigned long ea, + int psize, int ssize) +{ +
Re: [PATCH] 83xx: Clean up / convert mpc83xx board DTS files to v1 format.
Kumar Gala wrote: > On Mon, 28 Jan 2008, Paul Gortmaker wrote: > > >> This patch converts the remaining 83xx boards to the dts-v1 format. >> This includes the mpc8313_rdb, mpc832x_mds, mpc8323_rdb, mpc8349emitx, >> mpc8349emitxgp and the mpc836x_mds. >> >> The mpc8315_rdb mpc834x_mds, mpc837[789]_*, and sbc8349 were already >> dts-v1 and only undergo minor changes for the sake of formatting >> consistency across the whole group of boards; i.e. the idea being >> that you can do a "diff -u board_A.dts board_B.dts" and see something >> meaningful. >> >> The general rule I've applied is that entries for values normally >> parsed by humans are left in decimal (i.e. IRQ, cache size, clock >> rates, basic counts and indexes) and all other data (i.e. reg and >> ranges, IRQ flags etc.) remain in hex. >> >> I've used dtc to confirm that the output prior to this changeset >> matches the output after this changeset is applied for all boards. >> >> Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]> >> --- >> arch/powerpc/boot/dts/mpc8313erdb.dts| 152 +- >> arch/powerpc/boot/dts/mpc8315erdb.dts| 100 ++-- >> arch/powerpc/boot/dts/mpc832x_mds.dts| 252 >> +++-- >> arch/powerpc/boot/dts/mpc832x_rdb.dts| 154 +- >> arch/powerpc/boot/dts/mpc8349emitx.dts | 155 +- >> arch/powerpc/boot/dts/mpc8349emitxgp.dts | 109 +++-- >> arch/powerpc/boot/dts/mpc834x_mds.dts| 36 ++-- >> arch/powerpc/boot/dts/mpc836x_mds.dts| 260 >> +++--- >> arch/powerpc/boot/dts/mpc8377_mds.dts| 138 >> arch/powerpc/boot/dts/mpc8377_rdb.dts| 102 ++-- >> arch/powerpc/boot/dts/mpc8378_mds.dts| 130 >> arch/powerpc/boot/dts/mpc8378_rdb.dts| 94 ++-- >> arch/powerpc/boot/dts/mpc8379_mds.dts| 146 +- >> arch/powerpc/boot/dts/mpc8379_rdb.dts| 112 +++--- >> arch/powerpc/boot/dts/sbc8349.dts| 44 +++--- >> 15 files changed, 999 insertions(+), 985 deletions(-) >> >> > > applied. Checkout for whitespace in the future (sbc8349.dts) > Oops -- leaked one space in my rush to get it done and to you today. Thanks for catching it. P. > - k > ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull from 'for-2.6.25' branch (updated)
Please pull from 'for-2.6.25' branch of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.25 to receive the following updates: Documentation/powerpc/booting-without-of.txt | 177 ++- arch/powerpc/boot/Makefile |5 arch/powerpc/boot/cuboot-85xx-cpm2.c | 66 + arch/powerpc/boot/dts/mpc8313erdb.dts| 156 +- arch/powerpc/boot/dts/mpc8315erdb.dts| 287 + arch/powerpc/boot/dts/mpc832x_mds.dts| 270 ++-- arch/powerpc/boot/dts/mpc832x_rdb.dts| 177 +-- arch/powerpc/boot/dts/mpc8349emitx.dts | 159 +- arch/powerpc/boot/dts/mpc8349emitxgp.dts | 113 +- arch/powerpc/boot/dts/mpc834x_mds.dts| 260 ++-- arch/powerpc/boot/dts/mpc836x_mds.dts| 287 ++--- arch/powerpc/boot/dts/mpc8377_mds.dts| 141 +- arch/powerpc/boot/dts/mpc8377_rdb.dts| 296 + arch/powerpc/boot/dts/mpc8378_mds.dts| 133 +- arch/powerpc/boot/dts/mpc8378_rdb.dts| 282 arch/powerpc/boot/dts/mpc8379_mds.dts| 149 +- arch/powerpc/boot/dts/mpc8379_rdb.dts| 310 + arch/powerpc/boot/dts/mpc8568mds.dts | 24 arch/powerpc/boot/dts/mpc8610_hpcd.dts | 227 ++-- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 333 ++--- arch/powerpc/boot/dts/sbc8349.dts| 244 arch/powerpc/boot/dts/sbc8548.dts| 244 arch/powerpc/boot/dts/sbc8560.dts| 330 + arch/powerpc/boot/dts/storcenter.dts | 73 - 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/mpc8313_rdb_defconfig |2 arch/powerpc/configs/mpc8315_rdb_defconfig | 1417 + arch/powerpc/configs/mpc837x_rdb_defconfig | 887 +++ arch/powerpc/configs/mpc83xx_defconfig | 887 +++ arch/powerpc/configs/mpc85xx_defconfig | 1523 +++ 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/kernel/misc_32.S| 10 arch/powerpc/platforms/82xx/mpc8272_ads.c|5 arch/powerpc/platforms/82xx/pq2fads.c|5 arch/powerpc/platforms/83xx/Kconfig | 62 - arch/powerpc/platforms/83xx/Makefile |4 arch/powerpc/platforms/83xx/mpc8313_rdb.c| 101 - arch/powerpc/platforms/83xx/mpc831x_rdb.c| 93 + 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/83xx/mpc837x_rdb.c| 99 + arch/powerpc/platforms/83xx/sbc834x.c| 115 ++ arch/powerpc/platforms/83xx/usb.c|4 arch/powerpc/platforms/85xx/Kconfig | 87 + arch/powerpc/platforms/85xx/Makefile |4 arch/powerpc/platforms/85xx/mpc85xx_mds.c| 32 arch/powerpc/platforms/85xx/sbc8548.c| 167 ++ arch/powerpc/platforms/85xx/sbc8560.c| 283 + arch/powerpc/platforms/85xx/stx_gp3.c| 183 +++ arch/powerpc/platforms/85xx/tqm85xx.c| 187 +++ arch/powerpc/platforms/8xx/ep88xc.c |5 arch/powerpc/platforms/8xx/m8xx_setup.c | 11 arch/powerpc/platforms/8xx/mpc86xads_setup.c |8 arch/powerpc/platforms/8xx/mpc885ads_setup.c |7 arch/powerpc/platforms/8xx/mpc8xx.h | 21 arch/powerpc/platforms/Kconfig |6 arch/powerpc/platforms/Kconfig.cputype | 10 arch/powerpc/platforms/embedded6xx/ls_uart.c |5 arch/powerpc/sysdev/Makefile |4 arch/powerpc/sysdev/commproc.c | 650 --- arch/powerpc/sysdev/commproc.h | 12 arch/powerpc/sysdev/cpm1.c | 612 ++ arch/powerpc/sysdev/cpm2.c | 469 arch/powerpc/sysdev/cpm2_common.c| 470 arch/powerpc/sysdev/fsl_soc.c| 99 + arch/powerpc/sysdev/ipic.c |6 arch/powerpc/sysdev/micropatch.c |2 arch/powerpc/sysdev/mpc8xx_pic.c |1 arch/powerpc/sysdev/qe
Re: [Cbe-oss-dev] [PATCH 3/3] Cell IOMMU static mapping support
On Mon, 2008-01-28 at 15:48 -0600, Olof Johansson wrote: > > > Does the cell I/O bridge reflect out accesses to 2-4GB on the bus > > > again? If not, that could be another place to stick the dynamic range > > > for large config machines. > > > > On the PCI bus itself, 2-4GB is where MMIO sits. > > Depending on the implementation, 2-4GB accesses _from_ PCI could mean > something else. Not on PCI / PCI-X no. Maybe PCI-E could do that sort of ugly hacks but that wouldn't be within specs I believe. > But for most machines it doesn't, and I'm guessing cell > is one of those. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[Add mpc5121 support PATCH v4 4/4] Add MPC512x support to MPC52xx psc driver
Add 512x support using the psc_ops framework established with the previous patch. All 512x PSCs share the same interrupt so add IRQF_SHARED to irq flags. Signed-off-by: John Rigby <[EMAIL PROTECTED]> --- drivers/serial/Kconfig| 12 ++-- drivers/serial/mpc52xx_uart.c | 177 +++-- include/asm-powerpc/mpc52xx_psc.h | 48 ++ 3 files changed, 222 insertions(+), 15 deletions(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index d962b74..d9d7673 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -1114,17 +1114,17 @@ config SERIAL_SGI_L1_CONSOLE say Y. Otherwise, say N. config SERIAL_MPC52xx - tristate "Freescale MPC52xx family PSC serial support" - depends on PPC_MPC52xx + tristate "Freescale MPC52xx/MPC512x family PSC serial support" + depends on PPC_MPC52xx || PPC_MPC512x select SERIAL_CORE help - This drivers support the MPC52xx PSC serial ports. If you would - like to use them, you must answer Y or M to this option. Not that + This driver supports MPC52xx and MPC512x PSC serial ports. If you would + like to use them, you must answer Y or M to this option. Note that for use as console, it must be included in kernel and not as a module. config SERIAL_MPC52xx_CONSOLE - bool "Console on a Freescale MPC52xx family PSC serial port" + bool "Console on a Freescale MPC52xx/MPC512x family PSC serial port" depends on SERIAL_MPC52xx=y select SERIAL_CORE_CONSOLE help @@ -1132,7 +1132,7 @@ config SERIAL_MPC52xx_CONSOLE of the Freescale MPC52xx family as a console. config SERIAL_MPC52xx_CONSOLE_BAUD - int "Freescale MPC52xx family PSC serial port baud" + int "Freescale MPC52xx/MPC512x family PSC serial port baud" depends on SERIAL_MPC52xx_CONSOLE=y default "9600" help diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 5bd1171..75654f8 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -16,6 +16,9 @@ * Some of the code has been inspired/copied from the 2.4 code written * by Dale Farnsworth <[EMAIL PROTECTED]>. * + * Copyright (C) 2008 Freescale Semiconductor Inc. + *John Rigby <[EMAIL PROTECTED]> + * Added support for MPC5121 * Copyright (C) 2006 Secret Lab Technologies Ltd. *Grant Likely <[EMAIL PROTECTED]> * Copyright (C) 2004-2006 Sylvain Munaut <[EMAIL PROTECTED]> @@ -78,6 +81,7 @@ #endif #include +#include #include #if defined(CONFIG_SERIAL_MPC52xx_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) @@ -127,12 +131,6 @@ static irqreturn_t mpc52xx_uart_int(int irq, void *dev_id); #define uart_console(port) (0) #endif -#if defined(CONFIG_PPC_MERGE) -static struct of_device_id mpc52xx_uart_of_match[] = { - { .type = "serial", .compatible = "mpc5200-psc-uart", }, - {}, -}; -#endif /* */ /* PSC fifo operations for isolating differences between 52xx and 512x */ @@ -157,6 +155,7 @@ struct psc_ops { unsigned long (*getuartclk)(void *p); }; +#ifdef CONFIG_PPC_MPC52xx #define FIFO_52xx(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1)) static void mpc52xx_psc_fifo_init(struct uart_port *port) { @@ -289,7 +288,161 @@ static struct psc_ops mpc52xx_psc_ops = { .getuartclk = mpc52xx_getuartclk, }; -static struct psc_ops *psc_ops = &mpc52xx_psc_ops; +#endif /* CONFIG_MPC52xx */ + +#ifdef CONFIG_PPC_MPC512x +#define FIFO_512x(port) ((struct mpc512x_psc_fifo __iomem *)(PSC(port)+1)) +static void mpc512x_psc_fifo_init(struct uart_port *port) +{ + out_be32(&FIFO_512x(port)->txcmd, MPC512x_PSC_FIFO_RESET_SLICE); + out_be32(&FIFO_512x(port)->txcmd, MPC512x_PSC_FIFO_ENABLE_SLICE); + out_be32(&FIFO_512x(port)->txalarm, 1); + out_be32(&FIFO_512x(port)->tximr, 0); + + out_be32(&FIFO_512x(port)->rxcmd, MPC512x_PSC_FIFO_RESET_SLICE); + out_be32(&FIFO_512x(port)->rxcmd, MPC512x_PSC_FIFO_ENABLE_SLICE); + out_be32(&FIFO_512x(port)->rxalarm, 1); + out_be32(&FIFO_512x(port)->rximr, 0); + + out_be32(&FIFO_512x(port)->tximr, MPC512x_PSC_FIFO_ALARM); + out_be32(&FIFO_512x(port)->rximr, MPC512x_PSC_FIFO_ALARM); +} + +static int mpc512x_psc_raw_rx_rdy(struct uart_port *port) +{ + return !(in_be32(&FIFO_512x(port)->rxsr) & MPC512x_PSC_FIFO_EMPTY); +} + +static int mpc512x_psc_raw_tx_rdy(struct uart_port *port) +{ + return !(in_be32(&FIFO_512x(port)->txsr) & MPC512x_PSC_FIFO_FULL); +} + +static int mpc512x_psc_rx_rdy(struct uart_port *port) +{ + return in_be32(&FIFO_512x(port)->rxsr) + & in_be32(&FIFO_512x(port)->rximr) + & MPC512x_PSC_FIFO_ALARM; +} + +static int mpc512x_psc_tx_rdy(struct uart_port *port) +{ + return in
Re: PATCH[1/1] 8xx: Add clock-frequency to .dts brg entries
On Mon, 2008-01-28 at 09:50 -0600, Scott Wood wrote: > On Mon, Jan 28, 2008 at 01:53:11AM +, Bryan O'Donoghue wrote: > > cpm_uart_core has a dependency on fsl,cpm-brg/clock-frequency, this > > means that a .dts that uses the cpm uart driver needs to supply a > > clock-frequency entry for get_brgfreq to return a meaningful number. > > > > Included is a patchset which adds the correct brgclk to the adder port - > > @ 50Mhz and also adds an entry for mpc885ads - which I've noticed is > > missing a clock-frequency entry. > > It's not missing -- it's added by the bootwrapper. > > -Scott Hmm.. You mean that arch/powerpc/boot/mpc8xx.c mpc8xx_set_clocks is supposed to be adding this field ? I see arch/powerpc/boot/wrapper.a has a reference to the function but - and this time I've checked all documentation - there's no mention of how to use this library at all... it _looks_ to me like this isn't being linked in any way. It for sure is nowhere in the uImage - and I've taken the preferred route of making a uImage with .dtb - genreated from adder875-uboot.dts dtc -O -o adder875-uboot.dtb arch/powerpc/boot/dts/adder875-uboot.dtb cpm_uart depends on "fsl,cpm-brg" and a field called "clock-frequency" as I understand it that's fsl,cpm-brg |_clock-frequency whereas mpc8xx_set_clocks seems to add /soc/cpm/brg |_clock-frequency So unless I'm not understanding the structure of the tree - possible - I don't see how /soc/cpm/brg => clock-frequency could /possibly/ satisfy get_brgfreq in fsl_soc.c If there's something other then making a uImage and dtb and booting these from u-boot that I'm supposed to be doing here ... it'd help if you could say.. Otherwise in order to get the UART working using a uImage + dbt I've found it necessary to add this field to the .dts mpc866ads.dts - also has a "fsl,cpm-brg" => clock-frequency entry in linux/arch/powerpc/boot/dts/mpc866ads.dts - and to me this looks like the correct approach for get_brgfreq to function properly... What do you think ? ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[-mm PATCH] updates for hotplug memory remove
Hi Andrew, Here are the updates for hotplug memory remove code currently in -mm. 1) Please don't push this patch to mainline (for the merge window). memory-hotplug-add-removable-to-sysfs-to-show-memblock-removability.patch I didn't find this consistently useful - even though memory is marked removable, I found cases where I can't move it. When we get it right, we can push it at that time. Please leave this in -mm. 2) Can you replace the following patch with this ? add-remove_memory-for-ppc64-2.patch I found that, I do need arch-specific hooks to get the memory remove working on ppc64 LPAR. Earlier, I tried to make remove_memory() arch neutral, but we do need arch specific hooks. Thanks, Badari Supply ppc64 remove_memory() function. Arch specific is still being reviewed by Paul Mackerras. From: Badari Pulavarty <[EMAIL PROTECTED]> --- arch/powerpc/mm/mem.c | 16 1 file changed, 16 insertions(+) Index: linux-2.6.24-rc8/arch/powerpc/mm/mem.c === --- linux-2.6.24-rc8.orig/arch/powerpc/mm/mem.c 2008-01-25 08:04:32.0 -0800 +++ linux-2.6.24-rc8/arch/powerpc/mm/mem.c 2008-01-25 08:16:37.0 -0800 @@ -145,6 +145,22 @@ walk_memory_resource(unsigned long start return (*func)(start_pfn, nr_pages, arg); } +#ifdef CONFIG_MEMORY_HOTREMOVE +int remove_memory(u64 start, u64 size) +{ + unsigned long start_pfn, end_pfn; + int ret; + + start_pfn = start >> PAGE_SHIFT; + end_pfn = start_pfn + (size >> PAGE_SHIFT); + ret = offline_pages(start_pfn, end_pfn, 120 * HZ); + if (ret) + goto out; + /* Arch-specific calls go here - next patch */ +out: + return ret; +} +#endif /* CONFIG_MEMORY_HOTREMOVE */ #endif /* CONFIG_MEMORY_HOTPLUG */ void show_mem(void) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [NET]: Remove PowerPC code from fec.c
> -- Forwarded message -- > Date: Fri, 25 Jan 2008 15:33:45 +0100 > From: Jochen Friedrich <[EMAIL PROTECTED]> > To: "Garzik, Jeff" <[EMAIL PROTECTED]> > Cc: Vitaly Bordug <[EMAIL PROTECTED]>, > Scott Wood <[EMAIL PROTECTED]>, > Kumar Gala <[EMAIL PROTECTED]>, > Geert Uytterhoeven <[EMAIL PROTECTED]>, > "Kernel, Linux" <[EMAIL PROTECTED]>, > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, > linuxppc-dev list , [EMAIL PROTECTED] > Subject: [PATCH] [NET]: Remove PowerPC code from fec.c > > fec.c is only used on M68k Coldfire CPUs. Remove leftover > PowerPC code from this driver. I was always hoping that this driver would be supported on both architectures. After all the underlying eth device is essentially the same on both. Anyway... I don't have a problem with this patch, looks ok the me. Acked-by: Greg Ungerer <[EMAIL PROTECTED]> Regards Greg > 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) > #define FEC_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 = > -((b
Re: [PATCH 4/9] enable FSL SATA driver config for Freescale SoCs
On Fri, 25 Jan 2008 10:04:08 -0600 Kumar Gala <[EMAIL PROTECTED]> wrote: > > 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 > ok, cc'ing Jeff, linux-ide here: From: Kim Phillips <[EMAIL PROTECTED]> Date: Thu, 24 Jan 2008 01:49:24 -0600 Subject: [PATCH] enable FSL SATA driver config for Freescale SoCs 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]> --- drivers/ata/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 64b4964..75939dd 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -184,7 +184,7 @@ config PATA_ACPI config SATA_FSL tristate "Freescale 3.0Gbps SATA support" - depends on PPC_MPC837x + depends on FSL_SOC help This option enables support for Freescale 3.0Gbps SATA controller. It can be found on MPC837x and MPC8315. -- 1.5.2.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH UCC TDM 3/3 ] Modified Documentation to explain dtsentries for TDM driver
Aggrwal Poonam wrote: > The device tree already has a brg-frequency property in qe node which > is the value of BRGCLK. Yes, I'm saying it belongs as brg/clock-frequency. :-) CPM1/2 already do this. -Scott ___ 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: > $ 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. 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). -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [-mm PATCH] updates for hotplug memory remove
On Mon, 2008-01-28 at 16:31 -0800, Badari Pulavarty wrote: > 2) Can you replace the following patch with this ? > > add-remove_memory-for-ppc64-2.patch > > I found that, I do need arch-specific hooks to get the memory remove > working on ppc64 LPAR. Earlier, I tried to make remove_memory() arch > neutral, but we do need arch specific hooks. > > Thanks, > Badari Andrew, Here is the patch which provides arch-specific code to complete memory remove on ppc64 LPAR. So far, it works fine in my testing - but waiting for ppc-experts for review and completeness. FYI. Thanks, Badari For memory remove, we need to clean up htab mappings for the section of the memory we are removing. This patch implements support for removing htab bolted mappings for ppc64 lpar. Other sub-archs, may need to implement similar functionality for the hotplug memory remove to work. Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> --- arch/powerpc/mm/hash_utils_64.c | 23 +++ arch/powerpc/mm/mem.c |4 +++- arch/powerpc/platforms/pseries/lpar.c | 15 +++ include/asm-powerpc/machdep.h |2 ++ include/asm-powerpc/sparsemem.h |1 + 5 files changed, 44 insertions(+), 1 deletion(-) 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-25 08:04:32.0 -0800 +++ linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c2008-01-28 11:45:40.0 -0800 @@ -191,6 +191,24 @@ 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; + + if (!ppc_md.hpte_removebolted) { + printk("Sub-arch doesn't implement hpte_removebolted\n"); + return; + } + + for (vaddr = vstart; vaddr < vend; vaddr += step) + ppc_md.hpte_removebolted(vaddr, psize, ssize); +} + static int __init htab_dt_scan_seg_sizes(unsigned long node, const char *uname, int depth, void *data) @@ -436,6 +454,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-25 08:18:11.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 Index: linux-2.6.24-rc8/arch/powerpc/mm/mem.c === --- linux-2.6.24-rc8.orig/arch/powerpc/mm/mem.c 2008-01-25 08:16:37.0 -0800 +++ linux-2.6.24-rc8/arch/powerpc/mm/mem.c 2008-01-25 08:20:33.0 -0800 @@ -156,7 +156,9 @@ int remove_memory(u64 start, u64 size) ret = offline_pages(start_pfn, end_pfn, 120 * HZ); if (ret) goto out; - /* Arch-specific calls go here - next patch */ + + start = (unsigned long)__va(start); + remove_section_mapping(start, start + size); out: return ret; } Index: linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c === --- linux-2.6.24-rc8.orig/arch/powerpc/platforms/pseries/lpar.c 2008-01-15 20:22:48.0 -0800 +++ linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c 2008-01-28 14:10:58.0 -0800 @@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate BUG_ON(lpar_rc != H_SUCCESS); } +static void pSeries_lpar_hpte_removebolted(unsigned long ea, + int psize, int ssize) +{ + unsigned long slot, vsid, va; + + vsid = get_kernel_vsid(ea, ssize); + va = hpt_va(ea, vsid, ssize); + + slot = pSeries_lpar_hpte_find(va, psize, ssize); + BUG_ON(slot == -1); + + pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0); +} + /* Flag bits for H_BULK_REMOVE */ #define HBR_RE
Re: [PATCH 0/9] 83xx DTS fixes and v1 conversions
Kumar Gala wrote: > > On Jan 28, 2008, at 9:51 AM, Paul Gortmaker wrote: > >> Kumar Gala wrote: >>> On Mon, 28 Jan 2008, Paul Gortmaker wrote: >>> >>> This series incorporates my earlier qe/muram fix before converting the existing mpc83xx DTS files to v1 format. I've also redone the mpc834x_mds with the IRQs as decimal as per Kumar's comments and re-included that too. I've kept each board as a separate commit in case one of them conflicts with what someone else is working on. Boards covered are: 8349mds, 8349mitx, 8349mitx-gp, 836x_mds, 8323_mds, 8323_rdb, and the 8313_rdb. Plus a small tweak to the sbc8349 (it was already v1 -- but IRQs were in hex.) I've fed all the files to DTC before and after to ensure the output is the same after the conversion. I'm not aware of any explicit rules for what is hex vs decimal. I've tried to keep things that are usually discussed in decimal as decimal quantities (i.e. cache size, IRQ, counts, indicies) and all other data that you'd normally expect in hex (addresses, IRQ flags, masks) as hex -- including prefixing 0x on values from zero to 10 where it tends to make rows of numbers (e.g. ranges) align for better readability, even though it isn't required. >>> >>> Can you regen these patches (2..9) againast my latest tree. Also, a >>> single patch that cleans up all the boards is sufficient. >>> >> >> The patches should be current to your tree still as of today; they >> are based on: >> >> f09f415ea23272ae68f9322f90246680d46f4868not-for-merge >> branch 'for-2.6.25' of >> git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc >> >> My patch #1 with all four qe/muram boards was posted earlier here: >> >> http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050767.html >> >> Let me know what you need them based against and I can respin >> as required. > > I've pushed out a bunch of stuff today. > > commit 390167efa329d11099957108fc23d1ad15c3f37e > > I'm expect a respin since the patches don't currently apply to my tree. OK - no problem, I've pulled todays updates; I'll rebase and resend. P. > > - k > ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCHv3 2.6.25] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers
On Fri, Jan 25, 2008 at 06:11:57PM +0100, Jochen Friedrich wrote: > 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>; The label is &CPM_PIC in the current mpc866ads.dts. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [POWERPC] 85xx: some minor cleanups for stx_gp3 and tqm85xx
On Fri, Jan 25, 2008 at 10:39:38AM -0600, Kumar Gala wrote: > * "simple-bus" covers all our needs for of_platform_bus_probe() > * make device tree name just 'soc' not 'soc85..' Getting rid of the device_type="soc" would be nice, too... -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [-mm PATCH] updates for hotplug memory remove
Hello. Badari-san. Is your patch for notification the event of removing to firmware, right? Have you ever tested hotadd(probe) of the removed memory? I'm afraid there are some differences of the status between pre hot-add section and the removed section by this patch. I think the mem_section of removed memory should be invalidated at least. But anyway, this is a great first step for physical memory remove. Thanks. > On Mon, 2008-01-28 at 16:31 -0800, Badari Pulavarty wrote: > > > > 2) Can you replace the following patch with this ? > > > > add-remove_memory-for-ppc64-2.patch > > > > I found that, I do need arch-specific hooks to get the memory remove > > working on ppc64 LPAR. Earlier, I tried to make remove_memory() arch > > neutral, but we do need arch specific hooks. > > > > Thanks, > > Badari > > Andrew, > > Here is the patch which provides arch-specific code to complete memory > remove on ppc64 LPAR. So far, it works fine in my testing - but waiting > for ppc-experts for review and completeness. > > FYI. > > Thanks, > Badari > > For memory remove, we need to clean up htab mappings for the > section of the memory we are removing. > > This patch implements support for removing htab bolted mappings > for ppc64 lpar. Other sub-archs, may need to implement similar > functionality for the hotplug memory remove to work. > > Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> > --- > arch/powerpc/mm/hash_utils_64.c | 23 +++ > arch/powerpc/mm/mem.c |4 +++- > arch/powerpc/platforms/pseries/lpar.c | 15 +++ > include/asm-powerpc/machdep.h |2 ++ > include/asm-powerpc/sparsemem.h |1 + > 5 files changed, 44 insertions(+), 1 deletion(-) > > 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-25 > 08:04:32.0 -0800 > +++ linux-2.6.24-rc8/arch/powerpc/mm/hash_utils_64.c 2008-01-28 > 11:45:40.0 -0800 > @@ -191,6 +191,24 @@ 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; > + > + if (!ppc_md.hpte_removebolted) { > + printk("Sub-arch doesn't implement hpte_removebolted\n"); > + return; > + } > + > + for (vaddr = vstart; vaddr < vend; vaddr += step) > + ppc_md.hpte_removebolted(vaddr, psize, ssize); > +} > + > static int __init htab_dt_scan_seg_sizes(unsigned long node, >const char *uname, int depth, >void *data) > @@ -436,6 +454,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.h 2008-01-25 > 08:18:11.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 > Index: linux-2.6.24-rc8/arch/powerpc/mm/mem.c > === > --- linux-2.6.24-rc8.orig/arch/powerpc/mm/mem.c 2008-01-25 > 08:16:37.0 -0800 > +++ linux-2.6.24-rc8/arch/powerpc/mm/mem.c2008-01-25 08:20:33.0 > -0800 > @@ -156,7 +156,9 @@ int remove_memory(u64 start, u64 size) > ret = offline_pages(start_pfn, end_pfn, 120 * HZ); > if (ret) > goto out; > - /* Arch-specific calls go here - next patch */ > + > + start = (unsigned long)__va(start); > + remove_section_mapping(start, start + size); > out: > return ret; > } > Index: linux-2.6.24-rc8/arch/powerpc/platforms/pseries/lpar.c > === > --- linux-2.6.24-rc8.orig/arch/powerpc/platforms/pseries/lpar.c > 2008-01-15 20:22:48.0 -0800 > +++ linux-2.6.24-rc8/arch/powerpc/platforms/pser
Re: [PATCH] [POWERPC] 85xx: some minor cleanups for stx_gp3 and tqm85xx
On Jan 28, 2008, at 11:47 PM, David Gibson wrote: > On Fri, Jan 25, 2008 at 10:39:38AM -0600, Kumar Gala wrote: >> * "simple-bus" covers all our needs for of_platform_bus_probe() >> * make device tree name just 'soc' not 'soc85..' > > Getting rid of the device_type="soc" would be nice, too... Agreed, but one thing at a time. We need to define a compat that is the equivalent of what we are using SoC for today. (simple-bus + the range property details on chip registers) If we can come up with something compat name that is defined as such that I'm all for remoing device_type=soc. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 4/5] ehea: fix phyp checkpatch complaints
Cc: Jan-Bernd Themann <[EMAIL PROTECTED]> Signed-off-by: Doug Maxey <[EMAIL PROTECTED]> --- drivers/net/ehea/ehea_phyp.c | 158 +- drivers/net/ehea/ehea_phyp.h | 22 +++--- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c index 95c4a7f..156eb63 100644 --- a/drivers/net/ehea/ehea_phyp.c +++ b/drivers/net/ehea/ehea_phyp.c @@ -6,9 +6,9 @@ * (C) Copyright IBM Corp. 2006 * * Authors: - * Christoph Raisch <[EMAIL PROTECTED]> - * Jan-Bernd Themann <[EMAIL PROTECTED]> - * Thomas Klein <[EMAIL PROTECTED]> + * Christoph Raisch <[EMAIL PROTECTED]> + * Jan-Bernd Themann <[EMAIL PROTECTED]> + * Thomas Klein <[EMAIL PROTECTED]> * * * This program is free software; you can redistribute it and/or modify @@ -38,11 +38,11 @@ static inline u16 get_order_of_qentries(u16 queue_entries) } /* Defines for H_CALL H_ALLOC_RESOURCE */ -#define H_ALL_RES_TYPE_QP1 -#define H_ALL_RES_TYPE_CQ2 -#define H_ALL_RES_TYPE_EQ3 -#define H_ALL_RES_TYPE_MR5 -#define H_ALL_RES_TYPE_MW6 +#define H_ALL_RES_TYPE_QP 1 +#define H_ALL_RES_TYPE_CQ 2 +#define H_ALL_RES_TYPE_EQ 3 +#define H_ALL_RES_TYPE_MR 5 +#define H_ALL_RES_TYPE_MW 6 static long ehea_plpar_hcall_norets(unsigned long opcode, unsigned long arg1, @@ -137,77 +137,77 @@ u64 ehea_h_query_ehea_qp(const u64 adapter_handle, const u8 qp_category, const u64 qp_handle, const u64 sel_mask, void *cb_addr) { return ehea_plpar_hcall_norets(H_QUERY_HEA_QP, - adapter_handle, /* R4 */ - qp_category, /* R5 */ - qp_handle, /* R6 */ - sel_mask,/* R7 */ + adapter_handle, /* R4 */ + qp_category, /* R5 */ + qp_handle, /* R6 */ + sel_mask,/* R7 */ virt_to_abs(cb_addr),/* R8 */ 0, 0); } /* input param R5 */ -#define H_ALL_RES_QP_EQPO EHEA_BMASK_IBM(9, 11) -#define H_ALL_RES_QP_QPP EHEA_BMASK_IBM(12, 12) -#define H_ALL_RES_QP_RQR EHEA_BMASK_IBM(13, 15) -#define H_ALL_RES_QP_EQEG EHEA_BMASK_IBM(16, 16) -#define H_ALL_RES_QP_LL_QPEHEA_BMASK_IBM(17, 17) -#define H_ALL_RES_QP_DMA128 EHEA_BMASK_IBM(19, 19) -#define H_ALL_RES_QP_HSM EHEA_BMASK_IBM(20, 21) -#define H_ALL_RES_QP_SIGT EHEA_BMASK_IBM(22, 23) -#define H_ALL_RES_QP_TENURE EHEA_BMASK_IBM(48, 55) -#define H_ALL_RES_QP_RES_TYP EHEA_BMASK_IBM(56, 63) +#define H_ALL_RES_QP_EQPOEHEA_BMASK_IBM(9, 11) +#define H_ALL_RES_QP_QPP EHEA_BMASK_IBM(12, 12) +#define H_ALL_RES_QP_RQR EHEA_BMASK_IBM(13, 15) +#define H_ALL_RES_QP_EQEGEHEA_BMASK_IBM(16, 16) +#define H_ALL_RES_QP_LL_QP EHEA_BMASK_IBM(17, 17) +#define H_ALL_RES_QP_DMA128 EHEA_BMASK_IBM(19, 19) +#define H_ALL_RES_QP_HSM EHEA_BMASK_IBM(20, 21) +#define H_ALL_RES_QP_SIGTEHEA_BMASK_IBM(22, 23) +#define H_ALL_RES_QP_TENURE EHEA_BMASK_IBM(48, 55) +#define H_ALL_RES_QP_RES_TYP EHEA_BMASK_IBM(56, 63) /* input param R9 */ -#define H_ALL_RES_QP_TOKENEHEA_BMASK_IBM(0, 31) -#define H_ALL_RES_QP_PD EHEA_BMASK_IBM(32,63) +#define H_ALL_RES_QP_TOKEN EHEA_BMASK_IBM(0, 31) +#define H_ALL_RES_QP_PD EHEA_BMASK_IBM(32, 63) /* input param R10 */ -#define H_ALL_RES_QP_MAX_SWQE EHEA_BMASK_IBM(4, 7) -#define H_ALL_RES_QP_MAX_R1WQEEHEA_BMASK_IBM(12, 15) -#define H_ALL_RES_QP_MAX_R2WQEEHEA_BMASK_IBM(20, 23) -#define H_ALL_RES_QP_MAX_R3WQEEHEA_BMASK_IBM(28, 31) +#define H_ALL_RES_QP_MAX_SWQEEHEA_BMASK_IBM(4, 7) +#define H_ALL_RES_QP_MAX_R1WQE EHEA_BMASK_IBM(12, 15) +#define H_ALL_RES_QP_MAX_R2WQE EHEA_BMASK_IBM(20, 23) +#define H_ALL_RES_QP_MAX_R3WQE EHEA_BMASK_IBM(28, 31) /* Max Send Scatter Gather Elements */ -#define H_ALL_RES_QP_MAX_SSGE EHEA_BMASK_IBM(37, 39) -#define H_ALL_RES_QP_MAX_R1SGEEHEA_BMASK_IBM(45, 47) +#define H_ALL_RES_QP_MAX_SSGEEHEA_BMASK_IBM(37, 39) +#define H_ALL_RES_QP_MAX_R1SGE EHEA_BMASK_IBM(45, 47) /* Max Receive SG Elements RQ1 */ -#define H_ALL_RES_QP_MAX_R2SGEEHEA_BMASK_IBM(53, 55) -#define H_ALL_RES_QP_MAX_R3SGEEHEA_BMASK_IBM(61, 63) +#define H_ALL_RES_QP_MAX_R2SGE EHEA_BMASK_IBM(53, 55) +#define H_ALL_RES_QP_MAX_R3SGE EHEA_BMASK_IBM(61, 63) /* input param R11 */ -#define H_ALL_RES_QP_SWQE_IDL EHEA_BMASK_IBM(0, 7) +#define H_ALL_RES_QP_SWQE_IDLEHEA_BMASK_IBM(0, 7) /* max swq
[PATCH 5/5] ehea: fix qmr checkpatch complaints
Cc: Jan-Bernd Themann <[EMAIL PROTECTED]> Signed-off-by: Doug Maxey <[EMAIL PROTECTED]> --- drivers/net/ehea/ehea_qmr.c | 32 drivers/net/ehea/ehea_qmr.h | 16 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 83b7643..d522e90 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c @@ -33,8 +33,6 @@ struct ehea_busmap ehea_bmap = { 0, 0, NULL }; -extern u64 ehea_driver_flags; -extern struct work_struct ehea_rereg_mr_task; static void *hw_qpageit_get_inc(struct hw_queue *queue) @@ -65,7 +63,7 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages, } queue->queue_length = nr_of_pages * pagesize; - queue->queue_pages = kmalloc(nr_of_pages * sizeof(void*), GFP_KERNEL); + queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL); if (!queue->queue_pages) { ehea_error("no mem for queue_pages"); return -ENOMEM; @@ -78,11 +76,11 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages, */ i = 0; while (i < nr_of_pages) { - u8 *kpage = (u8*)get_zeroed_page(GFP_KERNEL); + u8 *kpage = (u8 *)get_zeroed_page(GFP_KERNEL); if (!kpage) goto out_nomem; for (k = 0; k < pages_per_kpage && i < nr_of_pages; k++) { - (queue->queue_pages)[i] = (struct ehea_page*)kpage; + (queue->queue_pages)[i] = (struct ehea_page *)kpage; kpage += pagesize; i++; } @@ -235,8 +233,8 @@ int ehea_destroy_cq(struct ehea_cq *cq) return 0; hcp_epas_dtor(&cq->epas); - - if ((hret = ehea_destroy_cq_res(cq, NORMAL_FREE)) == H_R_STATE) { + hret = ehea_destroy_cq_res(cq, NORMAL_FREE); + if (hret == H_R_STATE) { ehea_error_data(cq->adapter, cq->fw_handle); hret = ehea_destroy_cq_res(cq, FORCE_FREE); } @@ -301,13 +299,13 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter, if (i == (eq->attr.nr_pages - 1)) { /* last page */ vpage = hw_qpageit_get_inc(&eq->hw_queue); - if ((hret != H_SUCCESS) || (vpage)) { + if ((hret != H_SUCCESS) || (vpage)) goto out_kill_hwq; - } + } else { - if ((hret != H_PAGE_REGISTERED) || (!vpage)) { + if ((hret != H_PAGE_REGISTERED) || (!vpage)) goto out_kill_hwq; - } + } } @@ -331,7 +329,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq) unsigned long flags; spin_lock_irqsave(&eq->spinlock, flags); - eqe = (struct ehea_eqe*)hw_eqit_eq_get_inc_valid(&eq->hw_queue); + eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid(&eq->hw_queue); spin_unlock_irqrestore(&eq->spinlock, flags); return eqe; @@ -364,7 +362,8 @@ int ehea_destroy_eq(struct ehea_eq *eq) hcp_epas_dtor(&eq->epas); - if ((hret = ehea_destroy_eq_res(eq, NORMAL_FREE)) == H_R_STATE) { + hret = ehea_destroy_eq_res(eq, NORMAL_FREE); + if (hret == H_R_STATE) { ehea_error_data(eq->adapter, eq->fw_handle); hret = ehea_destroy_eq_res(eq, FORCE_FREE); } @@ -546,7 +545,8 @@ int ehea_destroy_qp(struct ehea_qp *qp) hcp_epas_dtor(&qp->epas); - if ((hret = ehea_destroy_qp_res(qp, NORMAL_FREE)) == H_R_STATE) { + hret = ehea_destroy_qp_res(qp, NORMAL_FREE); + if (hret == H_R_STATE) { ehea_error_data(qp->adapter, qp->fw_handle); hret = ehea_destroy_qp_res(qp, FORCE_FREE); } @@ -559,7 +559,7 @@ int ehea_destroy_qp(struct ehea_qp *qp) return 0; } -int ehea_create_busmap( void ) +int ehea_create_busmap(void) { u64 vaddr = EHEA_BUSMAP_START; unsigned long high_section_index = 0; @@ -595,7 +595,7 @@ int ehea_create_busmap( void ) return 0; } -void ehea_destroy_busmap( void ) +void ehea_destroy_busmap(void) { vfree(ehea_bmap.vaddr); } diff --git a/drivers/net/ehea/ehea_qmr.h b/drivers/net/ehea/ehea_qmr.h index bc62d38..0bb6f92 100644 --- a/drivers/net/ehea/ehea_qmr.h +++ b/drivers/net/ehea/ehea_qmr.h @@ -41,8 +41,8 @@ #define EHEA_SECTSIZE (1UL << 24) #define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT) -#if (1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE -#error eHEA module can't work if kernel sectionsize < ehea sectionsize +#if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE) +#error eHEA module cannot work if kernel sectionsize < ehea sectionsize #endif /* S
[PATCH 1/5] ehea: fix ehea.h checkpatch complaints
Cc: Jan-Bernd Themann <[EMAIL PROTECTED]> Signed-off-by: Doug Maxey <[EMAIL PROTECTED]> --- drivers/net/ehea/ehea.h|3 +++ drivers/net/ehea/ehea_hw.h |8 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 5f82a46..88fb53e 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -458,4 +458,7 @@ void ehea_set_ethtool_ops(struct net_device *netdev); int ehea_sense_port_attr(struct ehea_port *port); int ehea_set_portspeed(struct ehea_port *port, u32 port_speed); +extern u64 ehea_driver_flags; +extern struct work_struct ehea_rereg_mr_task; + #endif /* __EHEA_H__ */ diff --git a/drivers/net/ehea/ehea_hw.h b/drivers/net/ehea/ehea_hw.h index 1af7ca4..567981b 100644 --- a/drivers/net/ehea/ehea_hw.h +++ b/drivers/net/ehea/ehea_hw.h @@ -29,10 +29,10 @@ #ifndef __EHEA_HW_H__ #define __EHEA_HW_H__ -#define QPX_SQA_VALUE EHEA_BMASK_IBM(48,63) -#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48,63) -#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48,63) -#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48,63) +#define QPX_SQA_VALUE EHEA_BMASK_IBM(48, 63) +#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48, 63) +#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48, 63) +#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48, 63) #define QPTEMM_OFFSET(x) offsetof(struct ehea_qptemm, x) -- 1.5.3.7 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/5] ehea: fix ethtool checkpatch complaints
Cc: Jan-Bernd Themann <[EMAIL PROTECTED]> Signed-off-by: Doug Maxey <[EMAIL PROTECTED]> --- drivers/net/ehea/ehea_ethtool.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c index 679f40e..d768852 100644 --- a/drivers/net/ehea/ehea_ethtool.c +++ b/drivers/net/ehea/ehea_ethtool.c @@ -40,7 +40,7 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) return ret; if (netif_carrier_ok(dev)) { - switch(port->port_speed) { + switch (port->port_speed) { case EHEA_SPEED_10M: cmd->speed = SPEED_10; break; case EHEA_SPEED_100M: cmd->speed = SPEED_100; break; case EHEA_SPEED_1G: cmd->speed = SPEED_1000; break; @@ -78,7 +78,7 @@ static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) goto doit; } - switch(cmd->speed) { + switch (cmd->speed) { case SPEED_10: if (cmd->duplex == DUPLEX_FULL) sp = H_SPEED_10M_F; -- 1.5.3.7 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 0/5] ehea: fixups for checkpatch
A set of fixups that silences checkpatch. ++doug --- drivers/net/ehea/ehea.h |3 + drivers/net/ehea/ehea_ethtool.c |4 +- drivers/net/ehea/ehea_hw.h |8 +- drivers/net/ehea/ehea_main.c| 87 +++-- drivers/net/ehea/ehea_phyp.c| 158 +++--- drivers/net/ehea/ehea_phyp.h| 22 +++--- drivers/net/ehea/ehea_qmr.c | 32 drivers/net/ehea/ehea_qmr.h | 16 ++-- 8 files changed, 169 insertions(+), 161 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 3/5] ehea: fix main checkpatch complaints
Cc: Jan-Bernd Themann <[EMAIL PROTECTED]> Signed-off-by: Doug Maxey <[EMAIL PROTECTED]> --- drivers/net/ehea/ehea_main.c | 87 ++ 1 files changed, 46 insertions(+), 41 deletions(-) diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 869e160..99ea46a 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -6,9 +6,9 @@ * (C) Copyright IBM Corp. 2006 * * Authors: - * Christoph Raisch <[EMAIL PROTECTED]> - * Jan-Bernd Themann <[EMAIL PROTECTED]> - * Thomas Klein <[EMAIL PROTECTED]> + * Christoph Raisch <[EMAIL PROTECTED]> + * Jan-Bernd Themann <[EMAIL PROTECTED]> + * Thomas Klein <[EMAIL PROTECTED]> * * * This program is free software; you can redistribute it and/or modify @@ -54,11 +54,11 @@ static int rq1_entries = EHEA_DEF_ENTRIES_RQ1; static int rq2_entries = EHEA_DEF_ENTRIES_RQ2; static int rq3_entries = EHEA_DEF_ENTRIES_RQ3; static int sq_entries = EHEA_DEF_ENTRIES_SQ; -static int use_mcs = 0; -static int use_lro = 0; +static int use_mcs; +static int use_lro; static int lro_max_aggr = EHEA_LRO_MAX_AGGR; static int num_tx_qps = EHEA_NUM_TX_QP; -static int prop_carrier_state = 0; +static int prop_carrier_state; module_param(msg_level, int, 0); module_param(rq1_entries, int, 0); @@ -94,9 +94,9 @@ MODULE_PARM_DESC(lro_max_aggr, " LRO: Max packets to be aggregated. Default = " MODULE_PARM_DESC(use_lro, " Large Receive Offload, 1: enable, 0: disable, " "Default = 0"); -static int port_name_cnt = 0; +static int port_name_cnt; static LIST_HEAD(adapter_list); -u64 ehea_driver_flags = 0; +u64 ehea_driver_flags; struct work_struct ehea_rereg_mr_task; struct semaphore dlpar_mem_lock; @@ -121,12 +121,13 @@ static struct of_platform_driver ehea_driver = { .remove = ehea_remove, }; -void ehea_dump(void *adr, int len, char *msg) { +void ehea_dump(void *adr, int len, char *msg) +{ int x; unsigned char *deb = adr; for (x = 0; x < len; x += 16) { printk(DRV_NAME " %s adr=%p ofs=%04x %016lx %016lx\n", msg, - deb, x, *((u64*)&deb[0]), *((u64*)&deb[8])); + deb, x, *((u64 *)&deb[0]), *((u64 *)&deb[8])); deb += 16; } } @@ -518,7 +519,8 @@ static int ehea_proc_rwqes(struct net_device *dev, last_wqe_index = wqe_index; rmb(); if (!ehea_check_cqe(cqe, &rq)) { - if (rq == 1) { /* LL RQ1 */ + if (rq == 1) { + /* LL RQ1 */ skb = get_skb_by_index_ll(skb_arr_rq1, skb_arr_rq1_len, wqe_index); @@ -531,10 +533,11 @@ static int ehea_proc_rwqes(struct net_device *dev, if (!skb) break; } - skb_copy_to_linear_data(skb, ((char*)cqe) + 64, + skb_copy_to_linear_data(skb, ((char *)cqe) + 64, cqe->num_bytes_transfered - 4); ehea_fill_skb(dev, skb, cqe); - } else if (rq == 2) { /* RQ2 */ + } else if (rq == 2) { + /* RQ2 */ skb = get_skb_by_index(skb_arr_rq2, skb_arr_rq2_len, cqe); if (unlikely(!skb)) { @@ -544,7 +547,8 @@ static int ehea_proc_rwqes(struct net_device *dev, } ehea_fill_skb(dev, skb, cqe); processed_rq2++; - } else { /* RQ3 */ + } else { + /* RQ3 */ skb = get_skb_by_index(skb_arr_rq3, skb_arr_rq3_len, cqe); if (unlikely(!skb)) { @@ -592,7 +596,7 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota) unsigned long flags; cqe = ehea_poll_cq(send_cq); - while(cqe && (quota > 0)) { + while (cqe && (quota > 0)) { ehea_inc_cq(send_cq); cqe_counter++; @@ -643,7 +647,8 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota) static int ehea_poll(struct napi_struct *napi, int budget) { - struct ehea_port_res *pr = container_of(napi, struct ehea_port_res, napi); + struct ehea_port_res *pr = container_of(napi, struct ehea_port_res, + napi); struct net_device *dev = pr->