Re: [PATCH 1/1 v1] powerpc44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support.
Hi, Feng Kan wrote: This patch adds support for the AMCC (AppliedMicro) PPC460SX Eiger evaluation board. Signed-off-by: Tai Tri Nguyen ttngu...@amcc.com Acked-by: Feng Kan f...@amcc.com Acked-by: Tirumala Marri tma...@amcc.com --- arch/powerpc/boot/dts/eiger.dts| 421 ++ arch/powerpc/configs/44x/eiger_defconfig | 1200 arch/powerpc/platforms/44x/Kconfig | 12 + arch/powerpc/platforms/44x/ppc44x_simple.c |1 + 4 files changed, 1634 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/eiger.dts create mode 100644 arch/powerpc/configs/44x/eiger_defconfig diff --git a/arch/powerpc/boot/dts/eiger.dts b/arch/powerpc/boot/dts/eiger.dts new file mode 100644 index 000..c4a934f --- /dev/null +++ b/arch/powerpc/boot/dts/eiger.dts @@ -0,0 +1,421 @@ +/* + * Device Tree Source for AMCC (AppliedMicro) Eiger(460SX) + * + * Copyright 2009 AMCC (AppliedMicro) ttngu...@amcc.com + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed as is without + * any warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +/ { + #address-cells = 2; + #size-cells = 1; + model = amcc,eiger; + compatible = amcc,eiger; + dcr-parent = {/cpus/c...@0}; + + aliases { + ethernet0 = EMAC0; + ethernet1 = EMAC1; + ethernet2 = EMAC2; + ethernet3 = EMAC3; + serial0 = UART0; + serial1 = UART1; + }; + + cpus { + #address-cells = 1; + #size-cells = 0; + + c...@0 { + device_type = cpu; + model = PowerPC,460SX; + reg = 0x; + clock-frequency = 0; /* Filled in by U-Boot */ + timebase-frequency = 0; /* Filled in by U-Boot */ + i-cache-line-size = 32; + d-cache-line-size = 32; + i-cache-size = 32768; + d-cache-size = 32768; + dcr-controller; + dcr-access-method = native; + }; + }; + + memory { + device_type = memory; + reg = 0x 0x 0x; /* Filled in by U-Boot */ + }; + + UIC0: interrupt-controller0 { + compatible = ibm,uic-460sx,ibm,uic; + interrupt-controller; + cell-index = 0; + dcr-reg = 0x0c0 0x009; + #address-cells = 0; + #size-cells = 0; + #interrupt-cells = 2; + }; + + UIC1: interrupt-controller1 { + compatible = ibm,uic-460sx,ibm,uic; + interrupt-controller; + cell-index = 1; + dcr-reg = 0x0d0 0x009; + #address-cells = 0; + #size-cells = 0; + #interrupt-cells = 2; + interrupts = 0x1e 0x4 0x1f 0x4; /* cascade */ + interrupt-parent = UIC0; + }; + + UIC2: interrupt-controller2 { + compatible = ibm,uic-460sx,ibm,uic; + interrupt-controller; + cell-index = 2; + dcr-reg = 0x0e0 0x009; + #address-cells = 0; + #size-cells = 0; + #interrupt-cells = 2; + interrupts = 0xa 0x4 0xb 0x4; /* cascade */ + interrupt-parent = UIC0; + }; + + UIC3: interrupt-controller3 { + compatible = ibm,uic-460sx,ibm,uic; + interrupt-controller; + cell-index = 3; + dcr-reg = 0x0f0 0x009; + #address-cells = 0; + #size-cells = 0; + #interrupt-cells = 2; + interrupts = 0x10 0x4 0x11 0x4; /* cascade */ + interrupt-parent = UIC0; + }; + + SDR0: sdr { + compatible = ibm,sdr-460sx; + dcr-reg = 0x00e 0x002; + }; + + CPR0: cpr { + compatible = ibm,cpr-460sx; + dcr-reg = 0x00c 0x002; + }; + + plb { + compatible = ibm,plb-460sx, ibm,plb4; + #address-cells = 2; + #size-cells = 1; + ranges; + clock-frequency = 0; /* Filled in by U-Boot */ + + SDRAM0: sdram { + compatible = ibm,sdram-460sx, ibm,sdram-405gp; + dcr-reg = 0x010 0x002; + }; + + MAL0: mcmal { + compatible = ibm,mcmal-460sx, ibm,mcmal2; + dcr-reg = 0x180 0x62; + num-tx-chans = 4; + num-rx-chans = 32; + #address-cells = 1; + #size-cells = 1; + interrupt-parent =
Re: [PATCH] Disable PowerMac cpufreq on SMP kernels
On Tue, 2009-08-11 at 11:39 +0200, Bastian Blank wrote: The build of a PowerMac 32bit kernel currently fails with error: #warning WARNING, CPUFREQ not recommended on SMP kernels This patch just disables this driver on SMP kernels, as it is obviously not supported. Signed-off-by: Bastian Blank wa...@debian.org Why not remove the #error instead ? :-) I don't think it's still meaningful, especially since we use the timebase for delays nowadays which doesn't depend on the CPU frequency... Ben. diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 04a8061..99d3564 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -149,7 +149,7 @@ menu CPU Frequency drivers config CPU_FREQ_PMAC bool Support for Apple PowerBooks - depends on ADB_PMU PPC32 + depends on ADB_PMU PPC32 !SMP select CPU_FREQ_TABLE help This adds support for frequency switching on Apple PowerBooks, -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
On Wed, 2009-08-05 at 14:08 +0900, FUJITA Tomonori wrote: The above swiotlb patchset was merged in -tip so I think that merging this patchset via -tip too is the easiest way to handle this patchset. The patchset also is available via a git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git powerpc Hi ! While I generally agree here with the patches, I'm not sure it should be merged via -tip since it mostly touches arch/powerpc files (and I need to review it a bit more carefully, hopefully you'll have Ack's hitting your mailbox later today). Ben. = arch/powerpc/Kconfig |7 +- arch/powerpc/include/asm/device.h |7 +- arch/powerpc/include/asm/dma-mapping.h | 318 +++- arch/powerpc/include/asm/pci.h |4 +- arch/powerpc/include/asm/swiotlb.h |8 +- arch/powerpc/kernel/dma-iommu.c|2 +- arch/powerpc/kernel/dma-swiotlb.c | 53 ++--- arch/powerpc/kernel/dma.c | 13 +- arch/powerpc/kernel/ibmebus.c |2 +- arch/powerpc/kernel/pci-common.c |6 +- arch/powerpc/kernel/vio.c |2 +- arch/powerpc/platforms/85xx/mpc8536_ds.c |3 +- arch/powerpc/platforms/85xx/mpc85xx_ds.c |3 +- arch/powerpc/platforms/85xx/mpc85xx_mds.c |3 +- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |3 +- arch/powerpc/platforms/cell/iommu.c|2 +- arch/powerpc/platforms/ps3/system-bus.c|4 +- include/linux/dma-mapping.h|1 + 18 files changed, 89 insertions(+), 352 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
On Thu, 2009-08-13 at 16:44 +1000, Benjamin Herrenschmidt wrote: On Wed, 2009-08-05 at 14:08 +0900, FUJITA Tomonori wrote: The above swiotlb patchset was merged in -tip so I think that merging this patchset via -tip too is the easiest way to handle this patchset. The patchset also is available via a git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git powerpc Hi ! While I generally agree here with the patches, I'm not sure it should be merged via -tip since it mostly touches arch/powerpc files (and I need to review it a bit more carefully, hopefully you'll have Ack's hitting your mailbox later today). Maybe best is that I pull your series too. Note that your patch clashes with Takashi's addition of dma_mmap_coherent() : http://patchwork.ozlabs.org/patch/29595/ Can you sort that out with Takashi as I'd like his patch in -next soon too. Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/3] agp/uninorth: Unify U3 and pre-U3 insert_memory and remove_memory hooks.
On Tue, 2009-08-04 at 23:51 +0200, Michel Dänzer wrote: From: Michel Dänzer daen...@vmware.com Signed-off-by: Michel Dänzer daen...@vmware.com --- Hi Michel ! While your two previous patches apply just fine, this one doesn't, the uninorth_insert_memory() function seems to be slightly different upstream. Does this depend on some separate yet unapplied patches ? I'm putting 1/3 and 2/3 into my -test branch and they should hit my -next branch in a couple of days. Or do you prefer us to merge that via Dave ? The thing is, stuff in -powerpc is much more likely to get some amount of testing on actual ppc hardware than stuff in random other trees :-) Cheers, Ben. drivers/char/agp/uninorth-agp.c | 64 +++ 1 files changed, 11 insertions(+), 53 deletions(-) diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index bc8b43a..75aa33a 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c @@ -144,53 +144,7 @@ static int uninorth_configure(void) return 0; } -static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, - int type) -{ - int i, j, num_entries; - void *temp; - int mask_type; - - if (type != mem-type) - return -EINVAL; - - mask_type = agp_bridge-driver-agp_type_to_mask_type(agp_bridge, type); - if (mask_type != 0) { - /* We know nothing of memory types */ - return -EINVAL; - } - - if (mem-page_count == 0) - return 0; - - temp = agp_bridge-current_size; - num_entries = A_SIZE_32(temp)-num_entries; - - if ((pg_start + mem-page_count) num_entries) - return -EINVAL; - - j = pg_start; - - while (j (pg_start + mem-page_count)) { - if (agp_bridge-gatt_table[j]) - return -EBUSY; - j++; - } - - for (i = 0, j = pg_start; i mem-page_count; i++, j++) { - agp_bridge-gatt_table[j] = - cpu_to_le32((page_to_phys(mem-pages[i]) 0xF000UL) | 0x1UL); - flush_dcache_range((unsigned long)__va(page_to_phys(mem-pages[i])), -(unsigned long)__va(page_to_phys(mem-pages[i]))+0x1000); - } - (void)in_le32((volatile u32*)agp_bridge-gatt_table[pg_start]); - mb(); - - uninorth_tlbflush(mem); - return 0; -} - -static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) +static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, int type) { int i, num_entries; void *temp; @@ -219,14 +173,18 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) for (i = 0; i mem-page_count; ++i) { if (gp[i]) { dev_info(agp_bridge-dev-dev, - u3_insert_memory: entry 0x%x occupied (%x)\n, + uninorth_insert_memory: entry 0x%x occupied (%x)\n, i, gp[i]); return -EBUSY; } } for (i = 0; i mem-page_count; i++) { - gp[i] = (page_to_phys(mem-pages[i]) PAGE_SHIFT) | 0x8000UL; + if (is_u3) + gp[i] = (page_to_phys(mem-pages[i]) PAGE_SHIFT) | 0x8000UL; + else + gp[i] = cpu_to_le32((page_to_phys(mem-pages[i]) 0xF000UL) | + 0x1UL); flush_dcache_range((unsigned long)__va(page_to_phys(mem-pages[i])), (unsigned long)__va(page_to_phys(mem-pages[i]))+0x1000); } @@ -236,7 +194,7 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) return 0; } -int u3_remove_memory(struct agp_memory *mem, off_t pg_start, int type) +int uninorth_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { size_t i; u32 *gp; @@ -551,7 +509,7 @@ const struct agp_bridge_driver uninorth_agp_driver = { .create_gatt_table = uninorth_create_gatt_table, .free_gatt_table= uninorth_free_gatt_table, .insert_memory = uninorth_insert_memory, - .remove_memory = agp_generic_remove_memory, + .remove_memory = uninorth_remove_memory, .alloc_by_type = agp_generic_alloc_by_type, .free_by_type = agp_generic_free_by_type, .agp_alloc_page = agp_generic_alloc_page, @@ -577,8 +535,8 @@ const struct agp_bridge_driver u3_agp_driver = { .agp_enable = uninorth_agp_enable, .create_gatt_table = uninorth_create_gatt_table, .free_gatt_table= uninorth_free_gatt_table, - .insert_memory = u3_insert_memory, - .remove_memory =
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
On Thu, 13 Aug 2009 15:48:42 +1000 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Wed, 2009-08-05 at 14:08 +0900, FUJITA Tomonori wrote: The above swiotlb patchset was merged in -tip so I think that merging this patchset via -tip too is the easiest way to handle this patchset. The patchset also is available via a git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git powerpc Hi ! While I generally agree here with the patches, I'm not sure it should be merged via -tip since it mostly touches arch/powerpc files (and I need to review it a bit more carefully, hopefully you'll have Ack's hitting your mailbox later today). Thanks! This patchset depends on my swiotlb cleanup patchset: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git swiotlb http://marc.info/?l=linux-ia64m=124718816520156w=2 My swiotlb cleanup patchset has been in -tip. It might be easier to merge both the swiotlb patchset and this patchset in powerpc tree? ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/5] Mechanism to enable use Generic NVRAM driver for different size chips
On Thu, 2009-07-02 at 17:12 +0100, Martyn Welch wrote: Remove the reliance on a staticly defined NVRAM size, allowing platforms to support NVRAMs with sizes differing from the standard. A fall back value is provided for platforms not supporting this extension. Signed-off-by: Martyn Welch martyn.we...@gefanuc.com I was about to stick 1/5 and 2/5 in -test (on the way to -next) but I hit this when building 64-bit kernels: /home/benh/linux-powerpc-test/arch/powerpc/platforms/pseries/nvram.c:26: error: ‘nvram_size’ redeclared as different kind of symbol /home/benh/linux-powerpc-test/arch/powerpc/include/asm/nvram.h:111: error: previous declaration of ‘nvram_size’ was here make[3]: *** [arch/powerpc/platforms/pseries/nvram.o] Error 1 Looks trivial enough, can you respin the patch ? Cheers, Ben. --- arch/powerpc/include/asm/nvram.h |3 +++ arch/powerpc/kernel/setup_32.c |8 drivers/char/generic_nvram.c | 27 --- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/nvram.h b/arch/powerpc/include/asm/nvram.h index efde5ac..71df8b2 100644 --- a/arch/powerpc/include/asm/nvram.h +++ b/arch/powerpc/include/asm/nvram.h @@ -107,6 +107,9 @@ extern void pmac_xpram_write(int xpaddr, u8 data); /* Synchronize NVRAM */ extern void nvram_sync(void); +/* Determine NVRAM size */ +extern ssize_t nvram_size(void); + /* Normal access to NVRAM */ extern unsigned char nvram_read_byte(int i); extern void nvram_write_byte(unsigned char c, int i); diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 1d15424..28f7570 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -208,6 +208,14 @@ void nvram_write_byte(unsigned char val, int addr) } EXPORT_SYMBOL(nvram_write_byte); +ssize_t nvram_size(void) +{ + if (ppc_md.nvram_size) + return ppc_md.nvram_size(); + return -1; +} +EXPORT_SYMBOL(nvram_size); + void nvram_sync(void) { if (ppc_md.nvram_sync) diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index a00869c..e5f71f3 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c @@ -2,7 +2,7 @@ * Generic /dev/nvram driver for architectures providing some * generic hooks, that is : * - * nvram_read_byte, nvram_write_byte, nvram_sync + * nvram_read_byte, nvram_write_byte, nvram_sync, nvram_size * * Note that an additional hook is supported for PowerMac only * for getting the nvram partition informations @@ -28,6 +28,8 @@ #define NVRAM_SIZE 8192 +static ssize_t nvram_len; + static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) { lock_kernel(); @@ -36,7 +38,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) offset += file-f_pos; break; case 2: - offset += NVRAM_SIZE; + offset += nvram_len; break; } if (offset 0) { @@ -56,9 +58,9 @@ static ssize_t read_nvram(struct file *file, char __user *buf, if (!access_ok(VERIFY_WRITE, buf, count)) return -EFAULT; - if (*ppos = NVRAM_SIZE) + if (*ppos = nvram_len) return 0; - for (i = *ppos; count 0 i NVRAM_SIZE; ++i, ++p, --count) + for (i = *ppos; count 0 i nvram_len; ++i, ++p, --count) if (__put_user(nvram_read_byte(i), p)) return -EFAULT; *ppos = i; @@ -74,9 +76,9 @@ static ssize_t write_nvram(struct file *file, const char __user *buf, if (!access_ok(VERIFY_READ, buf, count)) return -EFAULT; - if (*ppos = NVRAM_SIZE) + if (*ppos = nvram_len) return 0; - for (i = *ppos; count 0 i NVRAM_SIZE; ++i, ++p, --count) { + for (i = *ppos; count 0 i nvram_len; ++i, ++p, --count) { if (__get_user(c, p)) return -EFAULT; nvram_write_byte(c, i); @@ -133,9 +135,20 @@ static struct miscdevice nvram_dev = { int __init nvram_init(void) { + int ret = 0; + printk(KERN_INFO Generic non-volatile memory driver v%s\n, NVRAM_VERSION); - return misc_register(nvram_dev); + ret = misc_register(nvram_dev); + if (ret != 0) + goto out; + + nvram_len = nvram_size(); + if (nvram_len 0) + nvram_len = NVRAM_SIZE; + +out: + return ret; } void __exit nvram_cleanup(void) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
At Thu, 13 Aug 2009 16:51:53 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-08-13 at 16:44 +1000, Benjamin Herrenschmidt wrote: On Wed, 2009-08-05 at 14:08 +0900, FUJITA Tomonori wrote: The above swiotlb patchset was merged in -tip so I think that merging this patchset via -tip too is the easiest way to handle this patchset. The patchset also is available via a git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git powerpc Hi ! While I generally agree here with the patches, I'm not sure it should be merged via -tip since it mostly touches arch/powerpc files (and I need to review it a bit more carefully, hopefully you'll have Ack's hitting your mailbox later today). Maybe best is that I pull your series too. Note that your patch clashes with Takashi's addition of dma_mmap_coherent() : http://patchwork.ozlabs.org/patch/29595/ Can you sort that out with Takashi as I'd like his patch in -next soon too. I'm willing to rebase my patches to the generic dma_ops, so feel free to pull it first. It might need to add mmap_coherent op to all platforms when generic dma ops is used. This would be more volume but less hackish than the previous version, OTOH :) thanks, Takashi ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2] Mechanism to enable use Generic NVRAM driver for different size chips
Remove the reliance on a staticly defined NVRAM size, allowing platforms to support NVRAMs with sizes differing from the standard. A fall back value is provided for platforms not supporting this extension. Signed-off-by: Martyn Welch martyn.we...@gefanuc.com --- Ben: Is this a suitable solution? v2: rename nvram_size() to nvram_get_size(), thus avoiding the collision with the global variables in arch/powerpc/platforms/pseries/nvram.c and arch/powerpc/platforms/chrp/nvram.c of the same name. arch/powerpc/include/asm/nvram.h |3 +++ arch/powerpc/kernel/setup_32.c |8 drivers/char/generic_nvram.c | 27 --- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/nvram.h b/arch/powerpc/include/asm/nvram.h index efde5ac..6c587ed 100644 --- a/arch/powerpc/include/asm/nvram.h +++ b/arch/powerpc/include/asm/nvram.h @@ -107,6 +107,9 @@ extern void pmac_xpram_write(int xpaddr, u8 data); /* Synchronize NVRAM */ extern voidnvram_sync(void); +/* Determine NVRAM size */ +extern ssize_t nvram_get_size(void); + /* Normal access to NVRAM */ extern unsigned char nvram_read_byte(int i); extern void nvram_write_byte(unsigned char c, int i); diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index e1e3059..53bcf3d 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -210,6 +210,14 @@ void nvram_write_byte(unsigned char val, int addr) } EXPORT_SYMBOL(nvram_write_byte); +ssize_t nvram_get_size(void) +{ + if (ppc_md.nvram_size) + return ppc_md.nvram_size(); + return -1; +} +EXPORT_SYMBOL(nvram_get_size); + void nvram_sync(void) { if (ppc_md.nvram_sync) diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index a00869c..ef31738 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c @@ -2,7 +2,7 @@ * Generic /dev/nvram driver for architectures providing some * generic hooks, that is : * - * nvram_read_byte, nvram_write_byte, nvram_sync + * nvram_read_byte, nvram_write_byte, nvram_sync, nvram_get_size * * Note that an additional hook is supported for PowerMac only * for getting the nvram partition informations @@ -28,6 +28,8 @@ #define NVRAM_SIZE 8192 +static ssize_t nvram_len; + static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) { lock_kernel(); @@ -36,7 +38,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) offset += file-f_pos; break; case 2: - offset += NVRAM_SIZE; + offset += nvram_len; break; } if (offset 0) { @@ -56,9 +58,9 @@ static ssize_t read_nvram(struct file *file, char __user *buf, if (!access_ok(VERIFY_WRITE, buf, count)) return -EFAULT; - if (*ppos = NVRAM_SIZE) + if (*ppos = nvram_len) return 0; - for (i = *ppos; count 0 i NVRAM_SIZE; ++i, ++p, --count) + for (i = *ppos; count 0 i nvram_len; ++i, ++p, --count) if (__put_user(nvram_read_byte(i), p)) return -EFAULT; *ppos = i; @@ -74,9 +76,9 @@ static ssize_t write_nvram(struct file *file, const char __user *buf, if (!access_ok(VERIFY_READ, buf, count)) return -EFAULT; - if (*ppos = NVRAM_SIZE) + if (*ppos = nvram_len) return 0; - for (i = *ppos; count 0 i NVRAM_SIZE; ++i, ++p, --count) { + for (i = *ppos; count 0 i nvram_len; ++i, ++p, --count) { if (__get_user(c, p)) return -EFAULT; nvram_write_byte(c, i); @@ -133,9 +135,20 @@ static struct miscdevice nvram_dev = { int __init nvram_init(void) { + int ret = 0; + printk(KERN_INFO Generic non-volatile memory driver v%s\n, NVRAM_VERSION); - return misc_register(nvram_dev); + ret = misc_register(nvram_dev); + if (ret != 0) + goto out; + + nvram_len = nvram_get_size(); + if (nvram_len 0) + nvram_len = NVRAM_SIZE; + +out: + return ret; } void __exit nvram_cleanup(void) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] Mechanism to enable use Generic NVRAM driver for different size chips
On Thu, 2009-08-13 at 09:03 +0100, Martyn Welch wrote: Remove the reliance on a staticly defined NVRAM size, allowing platforms to support NVRAMs with sizes differing from the standard. A fall back value is provided for platforms not supporting this extension. Signed-off-by: Martyn Welch martyn.we...@gefanuc.com --- Ben: Is this a suitable solution? Yup. I'll have a closer look tomorrow. Thanks. Cheers, Ben. v2: rename nvram_size() to nvram_get_size(), thus avoiding the collision with the global variables in arch/powerpc/platforms/pseries/nvram.c and arch/powerpc/platforms/chrp/nvram.c of the same name. arch/powerpc/include/asm/nvram.h |3 +++ arch/powerpc/kernel/setup_32.c |8 drivers/char/generic_nvram.c | 27 --- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/nvram.h b/arch/powerpc/include/asm/nvram.h index efde5ac..6c587ed 100644 --- a/arch/powerpc/include/asm/nvram.h +++ b/arch/powerpc/include/asm/nvram.h @@ -107,6 +107,9 @@ extern void pmac_xpram_write(int xpaddr, u8 data); /* Synchronize NVRAM */ extern void nvram_sync(void); +/* Determine NVRAM size */ +extern ssize_t nvram_get_size(void); + /* Normal access to NVRAM */ extern unsigned char nvram_read_byte(int i); extern void nvram_write_byte(unsigned char c, int i); diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index e1e3059..53bcf3d 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -210,6 +210,14 @@ void nvram_write_byte(unsigned char val, int addr) } EXPORT_SYMBOL(nvram_write_byte); +ssize_t nvram_get_size(void) +{ + if (ppc_md.nvram_size) + return ppc_md.nvram_size(); + return -1; +} +EXPORT_SYMBOL(nvram_get_size); + void nvram_sync(void) { if (ppc_md.nvram_sync) diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index a00869c..ef31738 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c @@ -2,7 +2,7 @@ * Generic /dev/nvram driver for architectures providing some * generic hooks, that is : * - * nvram_read_byte, nvram_write_byte, nvram_sync + * nvram_read_byte, nvram_write_byte, nvram_sync, nvram_get_size * * Note that an additional hook is supported for PowerMac only * for getting the nvram partition informations @@ -28,6 +28,8 @@ #define NVRAM_SIZE 8192 +static ssize_t nvram_len; + static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) { lock_kernel(); @@ -36,7 +38,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) offset += file-f_pos; break; case 2: - offset += NVRAM_SIZE; + offset += nvram_len; break; } if (offset 0) { @@ -56,9 +58,9 @@ static ssize_t read_nvram(struct file *file, char __user *buf, if (!access_ok(VERIFY_WRITE, buf, count)) return -EFAULT; - if (*ppos = NVRAM_SIZE) + if (*ppos = nvram_len) return 0; - for (i = *ppos; count 0 i NVRAM_SIZE; ++i, ++p, --count) + for (i = *ppos; count 0 i nvram_len; ++i, ++p, --count) if (__put_user(nvram_read_byte(i), p)) return -EFAULT; *ppos = i; @@ -74,9 +76,9 @@ static ssize_t write_nvram(struct file *file, const char __user *buf, if (!access_ok(VERIFY_READ, buf, count)) return -EFAULT; - if (*ppos = NVRAM_SIZE) + if (*ppos = nvram_len) return 0; - for (i = *ppos; count 0 i NVRAM_SIZE; ++i, ++p, --count) { + for (i = *ppos; count 0 i nvram_len; ++i, ++p, --count) { if (__get_user(c, p)) return -EFAULT; nvram_write_byte(c, i); @@ -133,9 +135,20 @@ static struct miscdevice nvram_dev = { int __init nvram_init(void) { + int ret = 0; + printk(KERN_INFO Generic non-volatile memory driver v%s\n, NVRAM_VERSION); - return misc_register(nvram_dev); + ret = misc_register(nvram_dev); + if (ret != 0) + goto out; + + nvram_len = nvram_get_size(); + if (nvram_len 0) + nvram_len = NVRAM_SIZE; + +out: + return ret; } void __exit nvram_cleanup(void) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
On Thu, 2009-08-13 at 09:11 +0200, Takashi Iwai wrote: I'm willing to rebase my patches to the generic dma_ops, so feel free to pull it first. I think I'll end up pulling Ingo's iommu branch into powerpc-next to get Fujita stuff, so if you rebase on top of his stuff, it will come along just fine. It might need to add mmap_coherent op to all platforms when generic dma ops is used. This would be more volume but less hackish than the previous version, OTOH :) Right :-) Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
Ben, what's your preference? I waited for your reaction with these bits, i.e. they are not in tip:core/iommu yet. Oh I though they were... discard my previous private mail about missing Ack's then :-) I'll review them more in depth hopefully tomorrow but they look good. One variant would be what Fujita suggested: you could pull core/iommu as a basis (it's a well-tested, problem-free tree at the moment, with no big risky items), and then pull/apply the powerpc specific bits from Fujita. Or we can have the patches in core/iommu and I pull the whole thing in powerpc-next. My main concern isn't which tree they go through but that they are in powerpc-next for better testing. Cheers, Ben. A second variant would be that we could pull these bits into core/iommu ... albeit you are right that the PowerPC tree is much better at testing PowerPC patches. A third variant would be to wait with these bits until the swiotlb bits in core/iommu hit upstream. This would increase patch latency. Any of these variants is good to me. What Fujita suggests seems to be the best to me: #1 gets us the most testing and the lowest latency - at the cost of tree dependency. We wont rebase core/iommu. [ We've got three good tree properties: tree independence, good testing, low patch latency, but we cannot have all three at once, we must pick two of them ;-) ] Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
At Thu, 13 Aug 2009 18:07:57 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-08-13 at 09:11 +0200, Takashi Iwai wrote: I'm willing to rebase my patches to the generic dma_ops, so feel free to pull it first. I think I'll end up pulling Ingo's iommu branch into powerpc-next to get Fujita stuff, so if you rebase on top of his stuff, it will come along just fine. OK, I'll work on it later. thanks, Takashi ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/3] agp/uninorth: Unify U3 and pre-U3 insert_memory and remove_memory hooks.
On Thu, 2009-08-13 at 17:05 +1000, Benjamin Herrenschmidt wrote: On Tue, 2009-08-04 at 23:51 +0200, Michel Dänzer wrote: From: Michel Dänzer daen...@vmware.com Signed-off-by: Michel Dänzer daen...@vmware.com --- Hi Michel ! While your two previous patches apply just fine, this one doesn't, the uninorth_insert_memory() function seems to be slightly different upstream. Does this depend on some separate yet unapplied patches ? I previously sent the attached patches to Dave in the course of the radeon KMS issues thread. Not sure which of these he's picked up yet, if any. I'm putting 1/3 and 2/3 into my -test branch and they should hit my -next branch in a couple of days. Or do you prefer us to merge that via Dave ? The thing is, stuff in -powerpc is much more likely to get some amount of testing on actual ppc hardware than stuff in random other trees :-) I'm fine with either way. -- Earthling Michel Dänzer |http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer From b73acc1a48cbea4d9ba9caa41451b38223bed516 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Michel=20D=C3=A4nzer?= daen...@vmware.com Date: Thu, 13 Aug 2009 08:42:36 +0200 Subject: [PATCH] uninorth: Handle user memory types. Signed-off-by: Michel Dänzer daen...@vmware.com --- drivers/char/agp/uninorth-agp.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 03f95ec..880d3f6 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c @@ -146,13 +146,20 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, { int i, j, num_entries; void *temp; + int mask_type; temp = agp_bridge-current_size; num_entries = A_SIZE_32(temp)-num_entries; - if (type != 0 || mem-type != 0) + if (type != mem-type) + return -EINVAL; + + mask_type = agp_bridge-driver-agp_type_to_mask_type(agp_bridge, type); + if (mask_type != 0) { /* We know nothing of memory types */ return -EINVAL; + } + if ((pg_start + mem-page_count) num_entries) return -EINVAL; @@ -184,13 +191,20 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) int i, num_entries; void *temp; u32 *gp; + int mask_type; temp = agp_bridge-current_size; num_entries = A_SIZE_32(temp)-num_entries; - if (type != 0 || mem-type != 0) + if (type != mem-type) + return -EINVAL; + + mask_type = agp_bridge-driver-agp_type_to_mask_type(agp_bridge, type); + if (mask_type != 0) { /* We know nothing of memory types */ return -EINVAL; + } + if ((pg_start + mem-page_count) num_entries) return -EINVAL; -- 1.6.3.3 From 0e4f25a616fdb5136372ab0523a43af39ff7fcd6 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Michel=20D=C3=A4nzer?= daen...@vmware.com Date: Thu, 13 Aug 2009 08:42:38 +0200 Subject: [PATCH] uninorth: Also handle user memory types in u3_remove_memory(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Also short-circuit empty updates. Signed-off-by: Michel Dänzer daen...@vmware.com --- drivers/char/agp/uninorth-agp.c | 29 ++--- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 880d3f6..cd63d76 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c @@ -148,9 +148,6 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, void *temp; int mask_type; - temp = agp_bridge-current_size; - num_entries = A_SIZE_32(temp)-num_entries; - if (type != mem-type) return -EINVAL; @@ -160,6 +157,12 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, return -EINVAL; } + if (mem-page_count == 0) + return 0; + + temp = agp_bridge-current_size; + num_entries = A_SIZE_32(temp)-num_entries; + if ((pg_start + mem-page_count) num_entries) return -EINVAL; @@ -193,9 +196,6 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) u32 *gp; int mask_type; - temp = agp_bridge-current_size; - num_entries = A_SIZE_32(temp)-num_entries; - if (type != mem-type) return -EINVAL; @@ -205,6 +205,12 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) return -EINVAL; } + if (mem-page_count == 0) + return 0; + + temp = agp_bridge-current_size; + num_entries = A_SIZE_32(temp)-num_entries; + if ((pg_start + mem-page_count) num_entries) return -EINVAL; @@ -234,10 +240,19 @@ int u3_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { size_t i; u32 *gp; + int mask_type; + + if (type != mem-type) + return -EINVAL; - if (type != 0 || mem-type != 0) + mask_type = agp_bridge-driver-agp_type_to_mask_type(agp_bridge, type); + if (mask_type != 0) { /* We know nothing of memory types */ return
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
* FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp wrote: On Thu, 13 Aug 2009 15:48:42 +1000 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Wed, 2009-08-05 at 14:08 +0900, FUJITA Tomonori wrote: The above swiotlb patchset was merged in -tip so I think that merging this patchset via -tip too is the easiest way to handle this patchset. The patchset also is available via a git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git powerpc Hi ! While I generally agree here with the patches, I'm not sure it should be merged via -tip since it mostly touches arch/powerpc files (and I need to review it a bit more carefully, hopefully you'll have Ack's hitting your mailbox later today). Thanks! This patchset depends on my swiotlb cleanup patchset: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git swiotlb http://marc.info/?l=linux-ia64m=124718816520156w=2 My swiotlb cleanup patchset has been in -tip. It might be easier to merge both the swiotlb patchset and this patchset in powerpc tree? Ben, what's your preference? I waited for your reaction with these bits, i.e. they are not in tip:core/iommu yet. One variant would be what Fujita suggested: you could pull core/iommu as a basis (it's a well-tested, problem-free tree at the moment, with no big risky items), and then pull/apply the powerpc specific bits from Fujita. A second variant would be that we could pull these bits into core/iommu ... albeit you are right that the PowerPC tree is much better at testing PowerPC patches. A third variant would be to wait with these bits until the swiotlb bits in core/iommu hit upstream. This would increase patch latency. Any of these variants is good to me. What Fujita suggests seems to be the best to me: #1 gets us the most testing and the lowest latency - at the cost of tree dependency. We wont rebase core/iommu. [ We've got three good tree properties: tree independence, good testing, low patch latency, but we cannot have all three at once, we must pick two of them ;-) ] Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
* Benjamin Herrenschmidt b...@kernel.crashing.org wrote: Ben, what's your preference? I waited for your reaction with these bits, i.e. they are not in tip:core/iommu yet. Oh I though they were... discard my previous private mail about missing Ack's then :-) I'll review them more in depth hopefully tomorrow but they look good. Sure - take your time. One variant would be what Fujita suggested: you could pull core/iommu as a basis (it's a well-tested, problem-free tree at the moment, with no big risky items), and then pull/apply the powerpc specific bits from Fujita. Or we can have the patches in core/iommu and I pull the whole thing in powerpc-next. [...] Ok! We could also stage it a bit (one or two weeks) in a separate branch and allow a rebase, should you find any bugs during testing? Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
RE: ARM clock API to PowerPC
Now, I know there is at least one person on earth contemplating sharing some drivers between PPC and ARM. I won't tell much more at this stage, but it makes sense in the grand scheme of things to see SoC vendors put similar IO cores into either PPC or ARM and providing that clock API is a good way to also allow these drivers to work since the drivers in questions make use of it. Freescale USB UDC driver is another example that shared between PowerPC and ARM(i.mx). Currently, the imx part of the driver uses clk API, but PowerPC part uses static initialization. It will be better if we can unify the clk setting part of the driver. - Leo ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Using dmatest driver with FSL DMA engine
Felix Radensky wrote: Hi, I'm trying to use dmatest driver on MPC8536DS running linux 2.6.31-rc5. The loading of driver fails, as it is unable to allocate DMA channel. Is this driver supposed to work with FSL DMA engine ? I should have disabled TCP receive copy offload DMA client. dmatest works now as expected. Sorry for the noise. Felix. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] Remove SMP warning from PowerMac cpufreq
On Thu, Aug 13, 2009 at 04:14:58PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2009-08-11 at 11:39 +0200, Bastian Blank wrote: This patch just disables this driver on SMP kernels, as it is obviously not supported. Why not remove the #error instead ? :-) I don't think it's still meaningful, especially since we use the timebase for delays nowadays which doesn't depend on the CPU frequency... Your call. Take this one: The build of a PowerMac 32bit kernel currently fails with error: #warning WARNING, CPUFREQ not recommended on SMP kernels Thie patch removes the not longer applicable SMP warning from the PowerMac cpufreq code. Signed-off-by: Bastian Blank wa...@debian.org diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index 65c585b..08d94e4 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c @@ -44,14 +44,6 @@ */ #undef DEBUG_FREQ -/* - * There is a problem with the core cpufreq code on SMP kernels, - * it won't recalculate the Bogomips properly - */ -#ifdef CONFIG_SMP -#warning WARNING, CPUFREQ not recommended on SMP kernels -#endif - extern void low_choose_7447a_dfs(int dfs); extern void low_choose_750fx_pll(int pll); extern void low_sleep_handler(void); -- Those who hate and fight must stop themselves -- otherwise it is not stopped. -- Spock, Day of the Dove, stardate unknown ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
test branch update
I've pushed a few more things to my -test branch (in addition to some -next updates that I may have forgotten to mention yesterday). So here's the whole lot of stuff that's in there today vs. upstream. Please give it a spin, it's really only compile tested here (and I haven't scrubbed the warnings yet in case they show something bad), so things will simmer there for a couple of days I think before I'm confident enough to put them into -next. Anton Blanchard (3): powerpc: Move 64bit VDSO to improve context switch performance powerpc: Rearrange SLB preload code powerpc: Preload application text segment instead of TASK_UNMAPPED_BASE Anton Vorontsov (3): powerpc/83xx: Add support for MPC8377E-WLAN boards powerpc/85xx: Add support for I2C EEPROMs on MPC8548CDS boards powerpc/83xx: Add eSDHC support for MPC837xE-RDB/WLAN boards Benjamin Herrenschmidt (29): powerpc: Rename exception.h to exception-64s.h powerpc: Use names rather than numbers for SPRGs (v2) powerpc: Remove use of a second scratch SPRG in STAB code powerpc/mm: Fix definitions of FORCE_MAX_ZONEORDER in Kconfig powerpc/pmac: Fix PowerSurge SMP IPI allocation powerpc: Change PACA from SPRG3 to SPRG1 powerpc: Add compat_sys_truncate powerpc/mm: Fix misplaced #endif in pgtable-ppc64-64k.h powerpc/of: Remove useless register save/restore when calling OF back powerpc/mm: Add HW threads support to no_hash TLB management powerpc/mm: Add opcode definitions for tlbivax and tlbsrx. powerpc/mm: Add more bit definitions for Book3E MMU registers powerpc/mm: Add support for early ioremap on non-hash 64-bit processors powerpc: Modify some ppc_asm.h macros to accomodate 64-bits Book3E powerpc/mm: Make low level TLB flush ops on BookE take additional args powerpc/mm: Call mmu_context_init() from ppc64 powerpc: Clean ifdef usage in copy_thread() powerpc: Move definitions of secondary CPU spinloop to header file powerpc/mm: Rework cleanup page table freeing code path powerpc: Add SPR definitions for new 64-bit BookE powerpc: Add memory management headers for new 64-bit BookE powerpc: Add definitions used by exception handling on 64-bit Book3E powerpc: Add PACA fields specific to 64-bit Book3E processors powerpc/mm: Move around mmu_gathers definition on 64-bit powerpc: Add TLB management code for 64-bit Book3E powerpc/mm: Add support for SPARSEMEM_VMEMMAP on 64-bit Book3E powerpc: Remaining 64-bit Book3E support powerpc/mm: Fix encoding of page table cache numbers powerpc/mm: Cleanup handling of execute permission Benjamin Krill (1): powerpc/prom_init: Evaluate mem kernel parameter for early allocation Christoph Hellwig (2): powerpc/sputrace: Use the generic event tracer powerpc: Switch to asm-generic/hardirq.h Frans Pop (1): powerpc: Makefile simplification through use of cc-ifversion Geert Uytterhoeven (1): powerpc/cell: Move CBE_IOPTE_* to asm/cell-regs.h Geoff Thorpe (1): powerpc: expose the multi-bit ops that underlie single-bit ops. Gerhard Pircher (1): powerpc/amigaone: Convert amigaone_init() to a machine_device_initcall() Heiko Schocher (1): powerpc/82xx: mgcoge - updates for 2.6.32 Julia Lawall (5): powerpc/fsl_rio: Add kmalloc NULL tests powerpc/ipic: introduce missing kfree powerpc/qe: introduce missing kfree hvc_console: Drop unnecessary NULL test powerpc: Use DIV_ROUND_CLOSEST in time init code Kumar Gala (3): powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus powerpc/85xx: Move mpc8536ds.dts to address-cells/size-cells = 2 powerpc/85xx: Added 36-bit physical device tree for mpc8572ds board Lucian Adrian Grijincu (1): powerpc: Update boot wrapper script with the new location of dtc Martyn Welch (4): powerpc/86xx: Correct reading of information presented in cpuinfo powerpc/86xx: Enable XMC site on GE Fanuc SBC310 powerpc/86xx: Update GE Fanuc sbc310 DTS powerpc/nvram: Allow byte length reads from mmio NVRAM driver Michael Ellerman (5): powerpc/mpic: Fix MPIC_BROKEN_REGREAD on non broken MPICs kmemleak: Allow kmemleak to be built on powerpc powerpc: Enable GCOV powerpc/vmlinux.lds: Move _edata down powerpc: Add kmemleak annotations to lmb.c Michel Dänzer (2): agp/uninorth: Allow larger aperture sizes on pre-U3 bridges. agp/uninorth: Simplify cache flushing. Roel Kluin (2): powerpc/fsl-booke: read buffer overflow powerpc/hvsi: Avoid calculating possibly-invalid address Sebastian Andrzej Siewior (1): powerpc/ipic: unmask all interrupt sources Stefan Roese (5): powerpc: Add AMCC 460EX/460GT Rev. B support to cputable.c powerpc/44x: Add NAND support to Canyonlands dts powerpc/40x: Update Kilauea dts to support
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
On Thu, 2009-08-13 at 10:55 +0200, Ingo Molnar wrote: Or we can have the patches in core/iommu and I pull the whole thing in powerpc-next. [...] Ok! We could also stage it a bit (one or two weeks) in a separate branch and allow a rebase, should you find any bugs during testing? Sounds like a plan. I'll try to sort that out tomorrow, I can stick them in my -test branch (which is rebase friendly) for a while too. Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] viotape: Fix memory and semaphore leak
On Thursday 13 August 2009 07:00:03 Benjamin Herrenschmidt wrote: On Sat, 2009-07-18 at 15:06 +0200, Michael Buesch wrote: This patch fixes a memory and semaphore leak in the viotape driver's char device write op. It leaks the DMA memory and the semaphore lock in case the device was opened with O_NONBLOCK. This patch is only compile tested, because I do not have the hardware. Signed-off-by: Michael Buesch m...@bu3sch.de (going trough my backlog ...) Thanks Michael, but I don't think that's right... IE. We aren't waiting for the write to complete, which means that it can be happening asynchronously, thus we must not free the DMA memory until it has actually complete. Now, if you look at vioHandleTapeEvent(), it does appear that when the completion happens, the DMA memory will eventually be released and the mutex up'ed. Or am I missing something ? I think you are right. -- Greetings, Michael. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h
On Aug 13, 2009, at 5:38 AM, Benjamin Herrenschmidt wrote: On Thu, 2009-08-13 at 10:55 +0200, Ingo Molnar wrote: Or we can have the patches in core/iommu and I pull the whole thing in powerpc-next. [...] Ok! We could also stage it a bit (one or two weeks) in a separate branch and allow a rebase, should you find any bugs during testing? Sounds like a plan. I'll try to sort that out tomorrow, I can stick them in my -test branch (which is rebase friendly) for a while too. Getting them all in your -test branch gives Becky and I an opportunity to test them w/all the other PPC changes on the platforms we have that enable SWIOTLB today. - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Adding MTD concat support to FSL ELBC NAND driver
Hi, I'd like to be able to concatenate several NAND banks (each bank on separate chip select) into a single MTD device, and define partition table on a concatenated device. Currently concatenation support is implemented in physmap_of driver. The syntax used to define a concatenation device involves multiple reg tuples, as described in Documentation/powerpc/dts-bindings/mtd-physmap.txt. Will same syntax be acceptable for NAND chips ? Thanks. Felix. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/2] powerpc/44x: Update Arches dts
This patch adds some nodes to the AMCC Arches dts: - L2 cache support - NOR FLASH mapping with default partitioning - I2C HWMON device (AD7414) Signed-off-by: Stefan Roese s...@denx.de --- arch/powerpc/boot/dts/arches.dts | 50 ++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dts/arches.dts b/arch/powerpc/boot/dts/arches.dts index d9113b1..414ef8b 100644 --- a/arch/powerpc/boot/dts/arches.dts +++ b/arch/powerpc/boot/dts/arches.dts @@ -124,6 +124,16 @@ dcr-reg = 0x00c 0x002; }; + L2C0: l2c { + compatible = ibm,l2-cache-460gt, ibm,l2-cache; + dcr-reg = 0x020 0x008 /* Internal SRAM DCR's */ + 0x030 0x008;/* L2 cache DCR's */ + cache-line-size = 32; /* 32 bytes */ + cache-size = 262144; /* L2, 256K */ + interrupt-parent = UIC1; + interrupts = 11 1; + }; + plb { compatible = ibm,plb-460gt, ibm,plb4; #address-cells = 2; @@ -168,6 +178,38 @@ /* ranges property is supplied by U-Boot */ interrupts = 0x6 0x4; interrupt-parent = UIC1; + + nor_fl...@0,0 { + compatible = amd,s29gl256n, cfi-flash; + bank-width = 2; + reg = 0x 0x 0x0200; + #address-cells = 1; + #size-cells = 1; + partit...@0 { + label = kernel; + reg = 0x 0x001e; + }; + partit...@1e { + label = dtb; + reg = 0x001e 0x0002; + }; + partit...@20 { + label = root; + reg = 0x0020 0x0020; + }; + partit...@40 { + label = user; + reg = 0x0040 0x01b6; + }; + partit...@1f6 { + label = env; + reg = 0x01f6 0x0004; + }; + partit...@1fa { + label = u-boot; + reg = 0x01fa 0x0006; + }; + }; }; UART0: ser...@ef600300 { @@ -186,6 +228,14 @@ reg = 0xef600700 0x0014; interrupt-parent = UIC0; interrupts = 0x2 0x4; + #address-cells = 1; + #size-cells = 0; + s...@4a { + compatible = ad,ad7414; + reg = 0x4a; + interrupt-parent = UIC1; + interrupts = 0x0 0x8; + }; }; IIC1: i...@ef600800 { -- 1.6.3.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/2] powerpc/44x: Update Arches defconfig
This patch adds NOR MTD support and I2C HWMON support for the AD7414 to the AMCC Arches defconfig. Signed-off-by: Stefan Roese s...@denx.de --- arch/powerpc/configs/44x/arches_defconfig | 382 + 1 files changed, 332 insertions(+), 50 deletions(-) diff --git a/arch/powerpc/configs/44x/arches_defconfig b/arch/powerpc/configs/44x/arches_defconfig index f7fd32c..6f976b5 100644 --- a/arch/powerpc/configs/44x/arches_defconfig +++ b/arch/powerpc/configs/44x/arches_defconfig @@ -1,14 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.29-rc2 -# Tue Jan 20 08:22:31 2009 +# Linux kernel version: 2.6.31-rc5 +# Thu Aug 13 14:14:07 2009 # # CONFIG_PPC64 is not set # # Processor support # -# CONFIG_6xx is not set +# CONFIG_PPC_BOOK3S_32 is not set # CONFIG_PPC_85xx is not set # CONFIG_PPC_8xx is not set # CONFIG_40x is not set @@ -31,15 +31,16 @@ CONFIG_GENERIC_TIME=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set CONFIG_IRQ_PER_CPU=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_FIND_NEXT_BIT=y # CONFIG_ARCH_NO_VIRT_TO_BUS is not set CONFIG_PPC=y @@ -53,11 +54,14 @@ CONFIG_PPC_UDBG_16550=y # CONFIG_GENERIC_TBSYNC is not set CONFIG_AUDIT_ARCH=y CONFIG_GENERIC_BUG=y +CONFIG_DTC=y # CONFIG_DEFAULT_UIMAGE is not set CONFIG_PPC_DCR_NATIVE=y # CONFIG_PPC_DCR_MMIO is not set CONFIG_PPC_DCR=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config +CONFIG_CONSTRUCTORS=y # # General setup @@ -71,9 +75,19 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set + +# +# RCU Subsystem +# +CONFIG_CLASSIC_RCU=y +# CONFIG_TREE_RCU is not set +# CONFIG_PREEMPT_RCU is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_PREEMPT_RCU_TRACE is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_GROUP_SCHED is not set @@ -84,8 +98,12 @@ CONFIG_SYSFS_DEPRECATED_V2=y # CONFIG_NAMESPACES is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE= +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y CONFIG_EMBEDDED=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y @@ -95,23 +113,30 @@ CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y -CONFIG_COMPAT_BRK=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y -CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y +CONFIG_HAVE_PERF_COUNTERS=y + +# +# Performance Counters +# +# CONFIG_PERF_COUNTERS is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_PCI_QUIRKS=y CONFIG_SLUB_DEBUG=y +# CONFIG_STRIP_ASM_SYMS is not set +CONFIG_COMPAT_BRK=y # CONFIG_SLAB is not set CONFIG_SLUB=y # CONFIG_SLOB is not set # CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y @@ -119,6 +144,12 @@ CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +# CONFIG_SLOW_WORK is not set # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y @@ -130,8 +161,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_BLOCK=y -CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set +CONFIG_LBDAF=y # CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_INTEGRITY is not set @@ -147,11 +177,6 @@ CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED=anticipatory -CONFIG_CLASSIC_RCU=y -# CONFIG_TREE_RCU is not set -# CONFIG_PREEMPT_RCU is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_PREEMPT_RCU_TRACE is not set # CONFIG_FREEZER is not set CONFIG_PPC4xx_PCI_EXPRESS=y @@ -172,6 +197,7 @@ CONFIG_PPC4xx_PCI_EXPRESS=y CONFIG_ARCHES=y # CONFIG_CANYONLANDS is not set # CONFIG_GLACIER is not set +# CONFIG_REDWOOD is not set # CONFIG_YOSEMITE is not set # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set CONFIG_PPC44x_SIMPLE=y @@ -214,6 +240,7 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_MATH_EMULATION is not set # CONFIG_IOMMU_HELPER is not set +# CONFIG_SWIOTLB is not set CONFIG_PPC_NEED_DMA_SYNC_OPS=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_HAS_WALK_MEMORY=y @@ -233,10 +260,14 @@ CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_ZONE_DMA_FLAG=1
Re: [PATCH] Add kmemleak annotations to lmb.c
On Thu, 2009-08-13 at 13:01 +1000, Michael Ellerman wrote: We don't actually want kmemleak to track the lmb allocations, so we pass min_count as 0. However telling kmemleak about lmb allocations allows it to scan that memory for pointers to other memory that is tracked by kmemleak, ie. slab allocations etc. Looks alright to me (though I haven't tested it). You can add a Reviewed-by: Catalin Marinas catalin.mari...@arm.com -- Catalin ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/1 v1] powerpc44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support.
Hi Felix: Sorry the documentation seems a little miss leading. There is no harm with the bit turned off to zero. Once the nand boot is over, we change the EBC to use the ready signal, this bit does not affect performance anymore. Thanks Feng Kan On 08/12/2009 11:14 PM, Felix Radensky wrote: Hi, Feng Kan wrote: This patch adds support for the AMCC (AppliedMicro) PPC460SX Eiger evaluation board. Signed-off-by: Tai Tri Nguyen ttngu...@amcc.com Acked-by: Feng Kan f...@amcc.com Acked-by: Tirumala Marri tma...@amcc.com --- arch/powerpc/boot/dts/eiger.dts| 421 ++ arch/powerpc/configs/44x/eiger_defconfig | 1200 arch/powerpc/platforms/44x/Kconfig | 12 + arch/powerpc/platforms/44x/ppc44x_simple.c |1 + 4 files changed, 1634 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/eiger.dts create mode 100644 arch/powerpc/configs/44x/eiger_defconfig diff --git a/arch/powerpc/boot/dts/eiger.dts b/arch/powerpc/boot/dts/eiger.dts new file mode 100644 index 000..c4a934f --- /dev/null +++ b/arch/powerpc/boot/dts/eiger.dts @@ -0,0 +1,421 @@ +/* + * Device Tree Source for AMCC (AppliedMicro) Eiger(460SX) + * + * Copyright 2009 AMCC (AppliedMicro) ttngu...@amcc.com + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed as is without + * any warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +/ { +#address-cells = 2; +#size-cells = 1; +model = amcc,eiger; +compatible = amcc,eiger; +dcr-parent = {/cpus/c...@0}; + +aliases { +ethernet0 = EMAC0; +ethernet1 = EMAC1; +ethernet2 = EMAC2; +ethernet3 = EMAC3; +serial0 = UART0; +serial1 = UART1; +}; + +cpus { +#address-cells = 1; +#size-cells = 0; + +c...@0 { +device_type = cpu; +model = PowerPC,460SX; +reg = 0x; +clock-frequency = 0; /* Filled in by U-Boot */ +timebase-frequency = 0; /* Filled in by U-Boot */ +i-cache-line-size = 32; +d-cache-line-size = 32; +i-cache-size = 32768; +d-cache-size = 32768; +dcr-controller; +dcr-access-method = native; +}; +}; + +memory { +device_type = memory; +reg = 0x 0x 0x; /* Filled in by U-Boot */ +}; + +UIC0: interrupt-controller0 { +compatible = ibm,uic-460sx,ibm,uic; +interrupt-controller; +cell-index = 0; +dcr-reg = 0x0c0 0x009; +#address-cells = 0; +#size-cells = 0; +#interrupt-cells = 2; +}; + +UIC1: interrupt-controller1 { +compatible = ibm,uic-460sx,ibm,uic; +interrupt-controller; +cell-index = 1; +dcr-reg = 0x0d0 0x009; +#address-cells = 0; +#size-cells = 0; +#interrupt-cells = 2; +interrupts = 0x1e 0x4 0x1f 0x4; /* cascade */ +interrupt-parent = UIC0; +}; + +UIC2: interrupt-controller2 { +compatible = ibm,uic-460sx,ibm,uic; +interrupt-controller; +cell-index = 2; +dcr-reg = 0x0e0 0x009; +#address-cells = 0; +#size-cells = 0; +#interrupt-cells = 2; +interrupts = 0xa 0x4 0xb 0x4; /* cascade */ +interrupt-parent = UIC0; +}; + +UIC3: interrupt-controller3 { +compatible = ibm,uic-460sx,ibm,uic; +interrupt-controller; +cell-index = 3; +dcr-reg = 0x0f0 0x009; +#address-cells = 0; +#size-cells = 0; +#interrupt-cells = 2; +interrupts = 0x10 0x4 0x11 0x4; /* cascade */ +interrupt-parent = UIC0; +}; + +SDR0: sdr { +compatible = ibm,sdr-460sx; +dcr-reg = 0x00e 0x002; +}; + +CPR0: cpr { +compatible = ibm,cpr-460sx; +dcr-reg = 0x00c 0x002; +}; + +plb { +compatible = ibm,plb-460sx, ibm,plb4; +#address-cells = 2; +#size-cells = 1; +ranges; +clock-frequency = 0; /* Filled in by U-Boot */ + +SDRAM0: sdram { +compatible = ibm,sdram-460sx, ibm,sdram-405gp; +dcr-reg = 0x010 0x002; +}; + +MAL0: mcmal { +compatible = ibm,mcmal-460sx, ibm,mcmal2; +dcr-reg = 0x180 0x62; +num-tx-chans = 4; +num-rx-chans = 32; +#address-cells = 1; +#size-cells = 1; +interrupt-parent = UIC1; +interrupts = /*TXEOB*/ 0x6 0x4 +/*RXEOB*/ 0x7 0x4 +/*SERR*/ 0x1 0x4 +/*TXDE*/ 0x2 0x4 +/*RXDE*/ 0x3 0x4 +/*COAL TX0*/ 0x18 0x2 +/*COAL TX1*/ 0x19 0x2 +/*COAL TX2*/ 0x1a 0x2 +/*COAL TX3*/ 0x1b 0x2 +
Re: Adding MTD concat support to FSL ELBC NAND driver
Felix Radensky wrote: Currently concatenation support is implemented in physmap_of driver. The syntax used to define a concatenation device involves multiple reg tuples, as described in Documentation/powerpc/dts-bindings/mtd-physmap.txt. Will same syntax be acceptable for NAND chips ? I'm not too fond of that -- it would require support in each controller driver, and would preclude providing other device-specific information in the node (e.g. what if each NAND chip has to sit under a different parent node to describe its connection to the system?). What if a NAND controller has multiple reg resources for each chip? It's not memory-like the way NOR flash is. If we're going to put it in the device tree at all (I suppose for the same reason we put partitioning there), it should probably be some external construct that glues together flash nodes. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: derive COMMAND_LINE_SIZE from asm-generic
On Thursday 13 August 2009 19:37:04 Paul Gortmaker wrote: The default COMMAND_LINE_SIZE in asm-generic is 512, so the net effect of this change is nil, aside from the cleanup factor. See also commit 2b74b8569. Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com Acked-by: Arnd Bergmann a...@arndb.de Just to clarify why this is good: There is a patch from Remis to kbuild that can automatically create the trivial wrappers, so we can remove arch/powerpc/include/asm/setup.h from the kernel once that patch is applied. I was also planning to submit a series to clean up more powerpc in this way headers where applicable, see http://git.kernel.org/?p=linux/kernel/git/arnd/asm-generic.git;a=shortlog;h=powerpc The series needs some forward porting to 2.6.31 as well as testing. If you or someone else wants to help with that, please go ahead! Thanks, Arnd ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: derive COMMAND_LINE_SIZE from asm-generic
Arnd Bergmann wrote: On Thursday 13 August 2009 19:37:04 Paul Gortmaker wrote: The default COMMAND_LINE_SIZE in asm-generic is 512, so the net effect of this change is nil, aside from the cleanup factor. See also commit 2b74b8569. Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com Acked-by: Arnd Bergmann a...@arndb.de Just to clarify why this is good: There is a patch from Remis to kbuild that can automatically create the trivial wrappers, so we can remove arch/powerpc/include/asm/setup.h from the kernel once that patch is applied. I was also planning to submit a series to clean up more powerpc in this way headers where applicable, see http://git.kernel.org/?p=linux/kernel/git/arnd/asm-generic.git;a=shortlog;h=powerpc I'd looked at master and next in your tree; I didn't list all the branches and so I'd not noticed powerpc in there as well. The series needs some forward porting to 2.6.31 as well as testing. If you or someone else wants to help with that, please go ahead! I'll definitely have a look at what is in there. Paul. Thanks, Arnd ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] sbc8560: Fix warm reboot with board specific reset function
From: Liang Li liang...@windriver.com The existing fsl_rstcr_restart function fails to reset the sbc8560 board. This implements a board specific reset function that uses the RCR(Reset Control Register) of the board's EPLD to do a reset. Signed-off-by: Liang Li liang...@windriver.com Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com --- arch/powerpc/platforms/85xx/sbc8560.c | 39 - 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c index cc27807..86dcca2 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c @@ -267,6 +267,43 @@ arch_initcall(sbc8560_rtc_init); #endif /* M48T59 */ +static __u8 __iomem *brstcr; + +static int __init sbc8560_bdrstcr_init(void) +{ + struct device_node *np; + struct resource res; + + np = of_find_compatible_node(NULL, NULL, wrs,sbc8560-brstcr); + if (np == NULL) { + printk(KERN_WARNING sbc8560: No board specific RSTCR in DTB.\n); + return -ENODEV; + } + + of_address_to_resource(np, 0, res); + + printk(KERN_INFO sbc8560: Found BRSTCR at i/o 0x%x\n, res.start); + + brstcr = ioremap(res.start, res.end - res.start); + if(!brstcr) + printk(KERN_WARNING sbc8560: ioremap of brstcr failed.\n); + + of_node_put(np); + + return 0; +} + +arch_initcall(sbc8560_bdrstcr_init); + +void sbc8560_rstcr_restart(char * cmd) +{ + local_irq_disable(); + if(brstcr) + out_8(brstcr,in_8(brstcr) 0x7f); + + while(1); +} + define_machine(sbc8560) { .name = SBC8560, .probe = sbc8560_probe, @@ -274,7 +311,7 @@ define_machine(sbc8560) { .init_IRQ = sbc8560_pic_init, .show_cpuinfo = sbc8560_show_cpuinfo, .get_irq= mpic_get_irq, - .restart= fsl_rstcr_restart, + .restart= sbc8560_rstcr_restart, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, }; -- 1.6.3.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: derive COMMAND_LINE_SIZE from asm-generic
The default COMMAND_LINE_SIZE in asm-generic is 512, so the net effect of this change is nil, aside from the cleanup factor. See also commit 2b74b8569. Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com --- arch/powerpc/include/asm/setup.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h index 817fac0..dae1934 100644 --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc/include/asm/setup.h @@ -1,6 +1,6 @@ #ifndef _ASM_POWERPC_SETUP_H #define _ASM_POWERPC_SETUP_H -#define COMMAND_LINE_SIZE 512 +#include asm-generic/setup.h #endif /* _ASM_POWERPC_SETUP_H */ -- 1.6.3.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] sbc8560: Fix warm reboot with board specific reset function
On Aug 13, 2009, at 6:06 PM, Paul Gortmaker wrote: From: Liang Li liang...@windriver.com The existing fsl_rstcr_restart function fails to reset the sbc8560 board. This implements a board specific reset function that uses the RCR(Reset Control Register) of the board's EPLD to do a reset. Signed-off-by: Liang Li liang...@windriver.com Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com --- arch/powerpc/platforms/85xx/sbc8560.c | 39 - 1 files changed, 38 insertions(+), 1 deletions(-) The reason it didn't was that feature doesnt exist on the mpc8560 :) - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] sbc8560: Fix warm reboot with board specific reset function
On Aug 13, 2009, at 6:06 PM, Paul Gortmaker wrote: From: Liang Li liang...@windriver.com The existing fsl_rstcr_restart function fails to reset the sbc8560 board. This implements a board specific reset function that uses the RCR(Reset Control Register) of the board's EPLD to do a reset. Signed-off-by: Liang Li liang...@windriver.com Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com --- arch/powerpc/platforms/85xx/sbc8560.c | 39 - 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/ platforms/85xx/sbc8560.c index cc27807..86dcca2 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c @@ -267,6 +267,43 @@ arch_initcall(sbc8560_rtc_init); #endif /* M48T59 */ +static __u8 __iomem *brstcr; + +static int __init sbc8560_bdrstcr_init(void) +{ + struct device_node *np; + struct resource res; + + np = of_find_compatible_node(NULL, NULL, wrs,sbc8560-brstcr); + if (np == NULL) { + printk(KERN_WARNING sbc8560: No board specific RSTCR in DTB.\n); + return -ENODEV; + } + + of_address_to_resource(np, 0, res); + + printk(KERN_INFO sbc8560: Found BRSTCR at i/o 0x%x\n, res.start); + + brstcr = ioremap(res.start, res.end - res.start); + if(!brstcr) + printk(KERN_WARNING sbc8560: ioremap of brstcr failed.\n); + + of_node_put(np); + + return 0; +} + +arch_initcall(sbc8560_bdrstcr_init); + +void sbc8560_rstcr_restart(char * cmd) +{ + local_irq_disable(); + if(brstcr) + out_8(brstcr,in_8(brstcr) 0x7f); how about using clrbits8() + + while(1); +} + define_machine(sbc8560) { .name = SBC8560, .probe = sbc8560_probe, @@ -274,7 +311,7 @@ define_machine(sbc8560) { .init_IRQ = sbc8560_pic_init, .show_cpuinfo = sbc8560_show_cpuinfo, .get_irq= mpic_get_irq, - .restart= fsl_rstcr_restart, + .restart= sbc8560_rstcr_restart, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, }; -- 1.6.3.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev