Re: [PATCH 92/92]Documentation/powerpc/booting-without-of.txt update web address.
The patch below fixes a broken web address. Signed-off-by: Justin P. Mattock justinmatt...@gmail.com --- Documentation/powerpc/booting-without-of.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/p ow erpc/booting-without-of.txt index 46d2210..7882a10 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -1048,7 +1048,7 @@ IV - dtc, the device tree compiler dtc source code can be found at -http://ozlabs.org/~dgibson/dtc/dtc.tar.gz +http://ozlabs.org/ I think this link should really be: git clone git://www.jdl.com/software/dtc.git/ Actually, maybe this instead? http://git.jdl.com/gitweb/?p=dtc.git Mikey ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
one more question about dts
my board is mpc8247,and i write it's dts by imitating mpc8272's dts how can i set the localbus address? local...@f0010100 { compatible = fsl,mpc8272-localbus, fsl,pq2-localbus; #address-cells = 2; #size-cells = 1; reg = f0010100 40; ranges = 0 0 7000 100 #my flash1 1 0 7100 100 #my flash2 2 ? ?????? #how to set it for board-control? 3 ? # how to set it for pci_pic ; board-cont...@2,0 { reg = 1 0 20; compatible = fsl,mpc8272ads-bcsr; }; PCI_PIC: interrupt-control...@3,0 { compatible = fsl,mpc8272ads-pci-pic, fsl,pq2ads-pci-pic; #interrupt-cells = 1; interrupt-controller; reg = 3 0 8; interrupt-parent = PIC; interrupts = 14 8; }; thanks for answering~ 2010-07-21 hacklu ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 92/92]Documentation/powerpc/booting-without-of.txt update web address.
On 07/20/2010 11:07 PM, Michael Neuling wrote: The patch below fixes a broken web address. Signed-off-by: Justin P. Mattockjustinmatt...@gmail.com --- Documentation/powerpc/booting-without-of.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/p ow erpc/booting-without-of.txt index 46d2210..7882a10 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -1048,7 +1048,7 @@ IV - dtc, the device tree compiler dtc source code can be found at -http://ozlabs.org/~dgibson/dtc/dtc.tar.gz +http://ozlabs.org/ I think this link should really be: git clone git://www.jdl.com/software/dtc.git/ Actually, maybe this instead? http://git.jdl.com/gitweb/?p=dtc.git Mikey cool thanks.. I resent.. Justin P. Mattock ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] DTS: Adding device tree source for the STx GP3 SSA MPC8555-based board.
+ soc8...@e000 { + #address-cells = 1; + #size-cells = 1; + device_type = soc; + compatible = simple-bus; + ranges = 0x0 0xe000 0x10; + bus-frequency = 0; + + ecm-...@0 { + compatible = fsl,ecm-law; + reg = 0x0 0x1000; + fsl,num-laws = 8; + }; + + e...@1000 { + compatible = fsl,mpc8555-ecm, fsl,ecm; + reg = 0x1000 0x1000; + interrupts = 17 2; + interrupt-parent = mpic; + }; + + memory-control...@2000 { + compatible = fsl,8555-memory-controller; fsl,mpc8555? + reg = 0x2000 0x1000; + interrupt-parent = mpic; + interrupts = 18 2; + }; + + L2: l2-cache-control...@2 { fsl,mpc8555? + compatible = fsl,8555-l2-cache-controller; + reg = 0x2 0x1000; + cache-line-size = 32; // 32 bytes + cache-size = 0x4; // L2, 256K + interrupt-parent = mpic; + interrupts = 16 2; + }; + - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] DTS: Adding device tree source for the STx GP3 SSA MPC8555-based board.
On Wed, Jul 21, 2010 at 10:24 AM, Kumar Gala ga...@kernel.crashing.org wrote: + soc8...@e000 { + #address-cells = 1; + #size-cells = 1; + device_type = soc; + compatible = simple-bus; + ranges = 0x0 0xe000 0x10; + bus-frequency = 0; + + ecm-...@0 { + compatible = fsl,ecm-law; + reg = 0x0 0x1000; + fsl,num-laws = 8; + }; + + e...@1000 { + compatible = fsl,mpc8555-ecm, fsl,ecm; + reg = 0x1000 0x1000; + interrupts = 17 2; + interrupt-parent = mpic; + }; + + memory-control...@2000 { + compatible = fsl,8555-memory-controller; fsl,mpc8555? Ah, yes -- it seems the dts I used for an example also has this problem. In drivers/edac/mpc85xx_edac.c, bindings still work for fsl,85.. style notation, but a comment claims that this notation would be deprecated at some point (2.6.29 or 2.6.30). I have updated my local copy and it works fine, should I send a new patch? I could also extend this change to the other DTS files affected (A quick search found 14 instances of fsl,85.. style notation.) Please let me know what I should do. + reg = 0x2000 0x1000; + interrupt-parent = mpic; + interrupts = 18 2; + }; + + L2: l2-cache-control...@2 { fsl,mpc8555? + compatible = fsl,8555-l2-cache-controller; + reg = 0x2 0x1000; + cache-line-size = 32; // 32 bytes + cache-size = 0x4; // L2, 256K + interrupt-parent = mpic; + interrupts = 16 2; + }; + - k Best Regards, Bradley ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt)
On Tue, Jul 20, 2010 at 08:59:52AM -0700, Guenter Roeck wrote: On Tue, Jul 20, 2010 at 11:09:53AM -0400, Andre Prendel wrote: On Thu, May 20, 2010 at 09:35:56PM +0200, Andre Prendel wrote: On Thu, May 20, 2010 at 03:07:05PM -0400, Jeff Angielski wrote: In any event, here it is again: Acked-by: Andre Prendel andre.pren...@gmx.de Hi Jeff, I'de suggest to resend the patch with my acked-by to the lm-sensors list and Andrew Morton. It looks like Jean is too busy at the moment. Regards, Andre From 9acd29ff48c64e58a7f5cdb888c86e737c56281c Mon Sep 17 00:00:00 2001 From: Jeff Angielski j...@theptrgroup.com Date: Mon, 10 May 2010 10:26:34 -0400 Subject: [PATCH] hwmon: (tmp421) Add nfactor support Add support for reading and writing the n-factor correction registers. This is needed to compensate for the characteristics of a particular sensor hanging off of the remote channels. My concerns with this approach are 1) It changes the sysfs abi. libsensors won't support it. It opens up a can of worms with everyone starting to put chip-specific extensions into the ABI. If such an extension has to be made, it should be a) really necessary and b) a generic extension which applies to all chips. A chip-specific extension can't be also generic. So we have to decide whether weaccept chip-specific extensions or not. 2) My understanding is that value adjustments are supposed to be made via sensors.conf, and that values reported by the chip should always be 'raw', ie unadjusted values. Instead of exporting n_adjust to the user via sysfs, it might make more sense to reset the correction factor to its default (if it was changed), and handle required adjustments in sensors.conf. Jeff, what do you think? Even if Jean doesn't have time to handle the patch, you should at least get his Ack for the ABI changes. That was the intention of resending the patch to the lm-sensors list. It would be a pity to lose Jeff's effort. Guenter Regards, Andre Signed-off-by: Jeff Angielski j...@theptrgroup.com --- Documentation/hwmon/tmp421 | 19 +++ drivers/hwmon/tmp421.c | 41 + 2 files changed, 60 insertions(+), 0 deletions(-) diff --git a/Documentation/hwmon/tmp421 b/Documentation/hwmon/tmp421 index 0cf07f8..668228a 100644 --- a/Documentation/hwmon/tmp421 +++ b/Documentation/hwmon/tmp421 @@ -17,6 +17,7 @@ Supported chips: Authors: Andre Prendel andre.pren...@gmx.de + Jeff Angielski j...@theptrgroup.com Description --- @@ -34,3 +35,21 @@ the temperature values via the following sysfs files: temp[1-4]_input temp[2-4]_fault + +The chips allow the user to adjust the n-factor value that is used +when converting the remote channel measurements to temperature. The +adjustment has a range of -128 to +127 that yields an effective +n-factor range of 0.706542 to 1.747977. The power on reset value +for the adjustment is 0 which results in an n-factor of 1.008. + +The effective n-factor is calculated according to the following +equation: + +n_factor = (1.008 * 300) / (300 - nfactor_adjust) + +The driver exports the n-factor adjustment value via the following +sysfs files: + +temp[2-4]_n_adjust + + diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index 738c472..dfd62be 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c @@ -49,6 +49,7 @@ enum chips { tmp421, tmp422, tmp423 }; static const u8 TMP421_TEMP_MSB[4] = { 0x00, 0x01, 0x02, 0x03 }; static const u8 TMP421_TEMP_LSB[4] = { 0x10, 0x11, 0x12, 0x13 }; +static const u8 TMP421_N_CORRECT[3]= { 0x21, 0x22, 0x23 }; /* Flags */ #define TMP421_CONFIG_SHUTDOWN 0x40 @@ -76,6 +77,7 @@ struct tmp421_data { int channels; u8 config; s16 temp[4]; + s8 n_adjust[3]; }; static int temp_from_s16(s16 reg) @@ -115,6 +117,10 @@ static struct tmp421_data *tmp421_update_device(struct device *dev) data-temp[i] |= i2c_smbus_read_byte_data(client, TMP421_TEMP_LSB[i]); } + for (i = 1; i data-channels; i++) { + data-n_adjust[i - 1] = i2c_smbus_read_byte_data(client, + TMP421_N_CORRECT[i - 1]); + } data-last_updated = jiffies; data-valid = 1; } @@ -157,6 +163,32 @@ static ssize_t show_fault(struct device *dev, return sprintf(buf, 0\n); } +static ssize_t
Re: [PATCH] DTS: Adding device tree source for the STx GP3 SSA MPC8555-based board.
On Jul 21, 2010, at 11:52 AM, Bradley Hughes wrote: On Wed, Jul 21, 2010 at 10:24 AM, Kumar Gala ga...@kernel.crashing.org wrote: + soc8...@e000 { + #address-cells = 1; + #size-cells = 1; + device_type = soc; + compatible = simple-bus; + ranges = 0x0 0xe000 0x10; + bus-frequency = 0; + + ecm-...@0 { + compatible = fsl,ecm-law; + reg = 0x0 0x1000; + fsl,num-laws = 8; + }; + + e...@1000 { + compatible = fsl,mpc8555-ecm, fsl,ecm; + reg = 0x1000 0x1000; + interrupts = 17 2; + interrupt-parent = mpic; + }; + + memory-control...@2000 { + compatible = fsl,8555-memory-controller; fsl,mpc8555? Ah, yes -- it seems the dts I used for an example also has this problem. In drivers/edac/mpc85xx_edac.c, bindings still work for fsl,85.. style notation, but a comment claims that this notation would be deprecated at some point (2.6.29 or 2.6.30). I have updated my local copy and it works fine, should I send a new patch? I could also extend this change to the other DTS files affected (A quick search found 14 instances of fsl,85.. style notation.) Please let me know what I should do. Send two patches. One to update your patch and another to fix the in tree dts that have the old name. - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 7/8] v3 Define memory_block_size_bytes() for ppc/pseries
On 07/19/2010 10:59 PM, Nathan Fontenot wrote: +static u32 get_memblock_size(void) +{ + struct device_node *np; + unsigned int memblock_size = 0; + + np = of_find_node_by_path(/ibm,dynamic-reconfiguration-memory); + if (np) { + const unsigned int *size; This needs to be an unsigned long, otherwise I always get zero on my p6. + + size = of_get_property(np, ibm,lmb-size, NULL); + memblock_size = size ? *size : 0; + + of_node_put(np); -- Brian King Linux on Power Virtualization IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 0/2] tqm85xx: enable PCMCIA bridge on ST85xx baseboards.
Baseboards for tqm85xx modules (STK85xx) bear TI PCI1520 PCMCIA controllers. These two patches enables one to fully use this controller in Linux. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/2] tqm85xx: update PCI interrupt-map attribute
Update PCI IRQ mapping on TQM85xx platforms: include INTC and INTD on PCI-X slot and add INTA/INTB mapping for PCMCIA bridge. Signed-off-by: Dmitry Eremin-Solenikov dbarysh...@gmail.com --- arch/powerpc/boot/dts/tqm8540.dts |9 - arch/powerpc/boot/dts/tqm8541.dts |9 - arch/powerpc/boot/dts/tqm8548-bigflash.dts |9 - arch/powerpc/boot/dts/tqm8548.dts |9 - arch/powerpc/boot/dts/tqm8555.dts |9 - arch/powerpc/boot/dts/tqm8560.dts |9 - 6 files changed, 48 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/boot/dts/tqm8540.dts b/arch/powerpc/boot/dts/tqm8540.dts index 7161b93..b5c0940 100644 --- a/arch/powerpc/boot/dts/tqm8540.dts +++ b/arch/powerpc/boot/dts/tqm8540.dts @@ -290,7 +290,14 @@ interrupt-map = /* IDSEL 28 */ 0xe000 0 0 1 mpic 2 1 -0xe000 0 0 2 mpic 3 1; +0xe000 0 0 2 mpic 3 1 +0xe000 0 0 3 mpic 6 1 +0xe000 0 0 4 mpic 5 1 + + /* IDSEL 11 */ +0x5800 0 0 1 mpic 6 1 +0x5800 0 0 2 mpic 5 1 +; interrupt-parent = mpic; interrupts = 24 2; diff --git a/arch/powerpc/boot/dts/tqm8541.dts b/arch/powerpc/boot/dts/tqm8541.dts index b30f637..f49d091 100644 --- a/arch/powerpc/boot/dts/tqm8541.dts +++ b/arch/powerpc/boot/dts/tqm8541.dts @@ -311,7 +311,14 @@ interrupt-map = /* IDSEL 28 */ 0xe000 0 0 1 mpic 2 1 -0xe000 0 0 2 mpic 3 1; +0xe000 0 0 2 mpic 3 1 +0xe000 0 0 3 mpic 6 1 +0xe000 0 0 4 mpic 5 1 + + /* IDSEL 11 */ +0x5800 0 0 1 mpic 6 1 +0x5800 0 0 2 mpic 5 1 +; interrupt-parent = mpic; interrupts = 24 2; diff --git a/arch/powerpc/boot/dts/tqm8548-bigflash.dts b/arch/powerpc/boot/dts/tqm8548-bigflash.dts index 61f25e1..5dbb36e 100644 --- a/arch/powerpc/boot/dts/tqm8548-bigflash.dts +++ b/arch/powerpc/boot/dts/tqm8548-bigflash.dts @@ -442,7 +442,14 @@ interrupt-map = /* IDSEL 28 */ 0xe000 0 0 1 mpic 2 1 -0xe000 0 0 2 mpic 3 1; +0xe000 0 0 2 mpic 3 1 +0xe000 0 0 3 mpic 6 1 +0xe000 0 0 4 mpic 5 1 + + /* IDSEL 11 */ +0x5800 0 0 1 mpic 6 1 +0x5800 0 0 2 mpic 5 1 +; interrupt-parent = mpic; interrupts = 24 2; diff --git a/arch/powerpc/boot/dts/tqm8548.dts b/arch/powerpc/boot/dts/tqm8548.dts index 025759c..a050ae4 100644 --- a/arch/powerpc/boot/dts/tqm8548.dts +++ b/arch/powerpc/boot/dts/tqm8548.dts @@ -442,7 +442,14 @@ interrupt-map = /* IDSEL 28 */ 0xe000 0 0 1 mpic 2 1 -0xe000 0 0 2 mpic 3 1; +0xe000 0 0 2 mpic 3 1 +0xe000 0 0 3 mpic 6 1 +0xe000 0 0 4 mpic 5 1 + + /* IDSEL 11 */ +0x5800 0 0 1 mpic 6 1 +0x5800 0 0 2 mpic 5 1 +; interrupt-parent = mpic; interrupts = 24 2; diff --git a/arch/powerpc/boot/dts/tqm8555.dts b/arch/powerpc/boot/dts/tqm8555.dts index 95e2873..81bad8c 100644 --- a/arch/powerpc/boot/dts/tqm8555.dts +++ b/arch/powerpc/boot/dts/tqm8555.dts @@ -311,7 +311,14 @@ interrupt-map = /* IDSEL 28 */ 0xe000 0 0 1 mpic 2 1 -0xe000 0 0 2 mpic 3 1; +0xe000 0 0 2 mpic 3 1 +0xe000 0 0 3 mpic 6 1 +0xe000 0 0 4 mpic 5 1 + + /* IDSEL 11 */ +0x5800 0 0 1 mpic 6 1 +0x5800 0 0 2 mpic 5 1 +; interrupt-parent = mpic; interrupts = 24 2; diff --git a/arch/powerpc/boot/dts/tqm8560.dts b/arch/powerpc/boot/dts/tqm8560.dts index ff70580..22ec39b 100644 ---
[PATCH 2/2] tqm85xx: add a quirk for ti1520 PCMCIA bridge
By default ti1520 bridge expects an input clock on CLOCK pin (to control power chip). However on this boards CLOCK should be generated by PCI1520 itself. Add a quirk that enables internal 16 KHz clock generation on this pin. Signed-off-by: Dmitry Eremin-Solenikov dbarysh...@gmail.com --- arch/powerpc/platforms/85xx/tqm85xx.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index 5b0ab99..8f29bbc 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c @@ -151,6 +151,27 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m) seq_printf(m, PLL setting\t: 0x%x\n, ((phid1 24) 0x3f)); } +static void __init tqm85xx_ti1520_fixup(struct pci_dev *pdev) +{ + unsigned int val; + + /* Do not do the fixup on other platforms! */ + if (!machine_is(tqm85xx)) + return; + + dev_info(pdev-dev, Using TI 1520 fixup on TQM85xx\n); + + /* +* Enable P2CCLK bit in system control register +* to enable CLOCK output to power chip +*/ + pci_read_config_dword(pdev, 0x80, val); + pci_write_config_dword(pdev, 0x80, val | (1 27)); + +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520, + tqm85xx_ti1520_fixup); + static struct of_device_id __initdata of_bus_ids[] = { { .compatible = simple-bus, }, { .compatible = gianfar, }, -- 1.7.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2 0/2] kexec/crash support on mpc85xx parts
The patch series is meant to fix a few issues with kexec/crash working on mpc85xx parts v1: initial version v2: Fix a typo when decremeting a wait condition twice leading to never showing when we fail waiting for extra cpus to shutdown Moved around code so the crash and kexec shutdown code paths both work correctly - this was exposed by the above fix Disable modifying the PAGE_OFFSET and PHYSICAL_START when we build a crash kernel w/ relocation enabled. We don't need to change these values as a default action. Matthew McClintock (2): powerpc/85xx: kexec for SMP 85xx BookE systems powerpc/crashdump: Fix issues with kexec and 36bit physical addr arch/powerpc/Kconfig| 10 +++--- arch/powerpc/kernel/crash_dump.c|4 +- arch/powerpc/kernel/machine_kexec.c | 10 +++--- arch/powerpc/platforms/85xx/smp.c | 63 +++ 4 files changed, 75 insertions(+), 12 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2 1/2] powerpc/85xx: kexec for SMP 85xx BookE systems
Adds support for kexec on 85xx machines for the BookE platform. Including support for SMP machines Based off work from Maxim Uvarov muva...@mvista.com Signed-off-by: Matthew McClintock m...@freescale.com --- arch/powerpc/Kconfig | 10 +++--- arch/powerpc/platforms/85xx/smp.c | 63 + 2 files changed, 68 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 328774b..351ce4a 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -351,7 +351,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE config KEXEC bool kexec system call (EXPERIMENTAL) - depends on (PPC_BOOK3S || (FSL_BOOKE !SMP)) EXPERIMENTAL + depends on (PPC_BOOK3S || FSL_BOOKE) EXPERIMENTAL help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot @@ -368,8 +368,8 @@ config KEXEC config CRASH_DUMP bool Build a kdump crash kernel - depends on PPC64 || 6xx - select RELOCATABLE if PPC64 + depends on PPC64 || 6xx || FSL_BOOKE + select RELOCATABLE if PPC64 || FSL_BOOKE help Build a kernel suitable for use as a kdump capture kernel. The same kernel binary can be used as production kernel and dump @@ -897,7 +897,7 @@ config KERNEL_START_BOOL config KERNEL_START hex Virtual address of kernel base if KERNEL_START_BOOL default PAGE_OFFSET if PAGE_OFFSET_BOOL - default 0xc200 if CRASH_DUMP + default 0xc200 if CRASH_DUMP !RELOCATABLE default 0xc000 config PHYSICAL_START_BOOL @@ -910,7 +910,7 @@ config PHYSICAL_START_BOOL config PHYSICAL_START hex Physical address where the kernel is loaded if PHYSICAL_START_BOOL - default 0x0200 if PPC_STD_MMU CRASH_DUMP + default 0x0200 if PPC_STD_MMU CRASH_DUMP !RELOCATABLE default 0x config PHYSICAL_ALIGN diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index a15f582..036c33c 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -15,6 +15,7 @@ #include linux/init.h #include linux/delay.h #include linux/of.h +#include linux/kexec.h #include asm/machdep.h #include asm/pgtable.h @@ -24,6 +25,7 @@ #include asm/dbell.h #include sysdev/fsl_soc.h +#include sysdev/mpic.h extern void __early_start(void); @@ -103,8 +105,64 @@ smp_85xx_setup_cpu(int cpu_nr) struct smp_ops_t smp_85xx_ops = { .kick_cpu = smp_85xx_kick_cpu, +#ifdef CONFIG_KEXEC + .give_timebase = smp_generic_give_timebase, + .take_timebase = smp_generic_take_timebase, +#endif }; +#ifdef CONFIG_KEXEC +static int kexec_down_cpus = 0; + +void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary) +{ + mpic_teardown_this_cpu(1); + + /* When crashing, this gets called on all CPU's we only +* take down the non-boot cpus */ + if (smp_processor_id() != boot_cpuid) + { + local_irq_disable(); + kexec_down_cpus++; + + while (1); + } +} + +static void mpc85xx_smp_kexec_down(void *arg) +{ + if (ppc_md.kexec_cpu_down) + ppc_md.kexec_cpu_down(0,1); +} + +static void mpc85xx_smp_machine_kexec(struct kimage *image) +{ + int timeout = 2000; + int i; + + set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); + + smp_call_function(mpc85xx_smp_kexec_down, NULL, 0); + + while ( (kexec_down_cpus != (num_online_cpus() - 1)) + ( timeout 0 ) ) + { + timeout--; + } + + if ( !timeout ) + printk(KERN_ERR Unable to bring down secondary cpu(s)); + + for (i = 0; i num_present_cpus(); i++) + { + if ( i == smp_processor_id() ) continue; + mpic_reset_core(i); + } + + default_machine_kexec(image); +} +#endif /* CONFIG_KEXEC */ + void __init mpc85xx_smp_init(void) { struct device_node *np; @@ -122,4 +180,9 @@ void __init mpc85xx_smp_init(void) BUG_ON(!smp_85xx_ops.message_pass); smp_ops = smp_85xx_ops; + +#ifdef CONFIG_KEXEC + ppc_md.kexec_cpu_down = mpc85xx_smp_kexec_cpu_down; + ppc_md.machine_kexec = mpc85xx_smp_machine_kexec; +#endif } -- 1.6.6.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2 2/2] powerpc/crashdump: Fix issues with kexec and 36bit physical addr
Fix sizes of variables so correct values are exported via /proc. Cast variable in comparison to avoid compiler error. Signed-off-by: Matthew McClintock m...@freescale.com --- arch/powerpc/kernel/crash_dump.c|4 ++-- arch/powerpc/kernel/machine_kexec.c | 10 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 5fb667a..d254132 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c @@ -128,9 +128,9 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, if (!csize) return 0; - csize = min(csize, PAGE_SIZE); + csize = min_t(size_t, csize, PAGE_SIZE); - if (pfn max_pfn) { + if ((min_low_pfn pfn) (pfn max_pfn)) { vaddr = __va(pfn PAGE_SHIFT); csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf); } else { diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index bb3d893..6ff15f0 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c @@ -144,24 +144,24 @@ int overlaps_crashkernel(unsigned long start, unsigned long size) } /* Values we need to export to the second kernel via the device tree. */ -static unsigned long kernel_end; -static unsigned long crashk_size; +static phys_addr_t kernel_end; +static phys_addr_t crashk_size; static struct property kernel_end_prop = { .name = linux,kernel-end, - .length = sizeof(unsigned long), + .length = sizeof(phys_addr_t), .value = kernel_end, }; static struct property crashk_base_prop = { .name = linux,crashkernel-base, - .length = sizeof(unsigned long), + .length = sizeof(phys_addr_t), .value = crashk_res.start, }; static struct property crashk_size_prop = { .name = linux,crashkernel-size, - .length = sizeof(unsigned long), + .length = sizeof(phys_addr_t), .value = crashk_size, }; -- 1.6.6.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 0/8] sdhci: Move real work out of an atomic context
On Wed, 14 Jul 2010 17:07:28 +0400 Anton Vorontsov avoront...@mvista.com wrote: Hi all, Currently the sdhci driver does everything in the atomic context. And what is worse, PIO transfers are made from the IRQ handler. This causes huge latencies (up to 120 ms). On some P2020 SOCs, DMA and card detection is broken, which means that kernel polls for the card via PIO transfers every second. Needless to say that this is quite bad. So, this patch set reworks sdhci code to avoid atomic context, almost completely. We only do two device memory operations in the atomic context, and all the rest is threaded. I noticed no throughput drop neither with PIO transfers nor with DMA (tested on MPC8569E CPU), while latencies should be greatly improved. The patchset looks good to me, but it'd be nice to hear from the other people who work on this code, please? ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2 0/2] Adding DTS for the STx GP3-SSA MPC8555 board
This version uses fsl,mpc8555... instead of fsl,85... notation. There is also an 8541 version of this board so DTS for this board is specific to the 8555 processor. Another patch is coming to fix-up other DTS that use old notation. Signed-off-by: Bradley Hughes bhug...@silicontkx.com --- arch/powerpc/boot/dts/stxssa8555.dts | 380 ++ 1 files changed, 380 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/stxssa8555.dts diff --git a/arch/powerpc/boot/dts/stxssa8555.dts b/arch/powerpc/boot/dts/stxssa8555.dts new file mode 100644 index 000..49efd44 --- /dev/null +++ b/arch/powerpc/boot/dts/stxssa8555.dts @@ -0,0 +1,380 @@ +/* + * MPC8555-based STx GP3 Device Tree Source + * + * Copyright 2006, 2008 Freescale Semiconductor Inc. + * + * Copyright 2010 Silicon Turnkey Express LLC. + * + * 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 = stx,gp3; +compatible = stx,gp3-8560, stx,gp3; + #address-cells = 1; + #size-cells = 1; + + aliases { + ethernet0 = enet0; + ethernet1 = enet1; + serial0 = serial0; + serial1 = serial1; + pci0 = pci0; + }; + + cpus { + #address-cells = 1; + #size-cells = 0; + + PowerPC,8...@0 { + device_type = cpu; + reg = 0x0; + d-cache-line-size = 32; // 32 bytes + i-cache-line-size = 32; // 32 bytes + d-cache-size = 0x8000;// L1, 32K + i-cache-size = 0x8000;// L1, 32K + timebase-frequency = 0; // 33 MHz, from uboot + bus-frequency = 0;// 166 MHz + clock-frequency = 0; // 825 MHz, from uboot + next-level-cache = L2; + }; + }; + + memory { + device_type = memory; + reg = 0x 0x1000; + }; + + soc8...@e000 { + #address-cells = 1; + #size-cells = 1; + device_type = soc; + compatible = simple-bus; + ranges = 0x0 0xe000 0x10; + bus-frequency = 0; + + ecm-...@0 { + compatible = fsl,ecm-law; + reg = 0x0 0x1000; + fsl,num-laws = 8; + }; + + e...@1000 { + compatible = fsl,mpc8555-ecm, fsl,ecm; + reg = 0x1000 0x1000; + interrupts = 17 2; + interrupt-parent = mpic; + }; + + memory-control...@2000 { + compatible = fsl,mpc8555-memory-controller; + reg = 0x2000 0x1000; + interrupt-parent = mpic; + interrupts = 18 2; + }; + + L2: l2-cache-control...@2 { + compatible = fsl,mpc8555-l2-cache-controller; + reg = 0x2 0x1000; + cache-line-size = 32; // 32 bytes + cache-size = 0x4; // L2, 256K + interrupt-parent = mpic; + interrupts = 16 2; + }; + + i...@3000 { + #address-cells = 1; + #size-cells = 0; + cell-index = 0; + compatible = fsl-i2c; + reg = 0x3000 0x100; + interrupts = 43 2; + interrupt-parent = mpic; + dfsrr; + }; + + d...@21300 { + #address-cells = 1; + #size-cells = 1; + compatible = fsl,mpc8555-dma, fsl,eloplus-dma; + reg = 0x21300 0x4; + ranges = 0x0 0x21100 0x200; + cell-index = 0; + dma-chan...@0 { + compatible = fsl,mpc8555-dma-channel, + fsl,eloplus-dma-channel; + reg = 0x0 0x80; + cell-index = 0; + interrupt-parent = mpic; + interrupts = 20 2; + }; + dma-chan...@80 { + compatible = fsl,mpc8555-dma-channel, + fsl,eloplus-dma-channel; +
[PATCH v2 1/2] DTS: Change deprecated binding for 85xx-based boards
The fsl,85... style compatible binding was to be deprecated some time ago. This patch corrects existing occurrences of the incorrect binding. The memory-controller and l2-cache-controller are the only affected nodes. Signed-off-by: Bradley Hughes bhug...@silicontkx.com --- arch/powerpc/boot/dts/mpc8540ads.dts |4 ++-- arch/powerpc/boot/dts/mpc8541cds.dts |4 ++-- arch/powerpc/boot/dts/mpc8544ds.dts |4 ++-- arch/powerpc/boot/dts/mpc8548cds.dts |4 ++-- arch/powerpc/boot/dts/mpc8555cds.dts |4 ++-- arch/powerpc/boot/dts/mpc8560ads.dts |4 ++-- arch/powerpc/boot/dts/mpc8568mds.dts |4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts index 9dc2929..8d1bf0f 100644 --- a/arch/powerpc/boot/dts/mpc8540ads.dts +++ b/arch/powerpc/boot/dts/mpc8540ads.dts @@ -71,14 +71,14 @@ }; memory-control...@2000 { - compatible = fsl,8540-memory-controller; + compatible = fsl,mpc8540-memory-controller; reg = 0x2000 0x1000; interrupt-parent = mpic; interrupts = 18 2; }; L2: l2-cache-control...@2 { - compatible = fsl,8540-l2-cache-controller; + compatible = fsl,mpc8540-l2-cache-controller; reg = 0x2 0x1000; cache-line-size = 32; // 32 bytes cache-size = 0x4; // L2, 256K diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts index 9a3ad31..87ff965 100644 --- a/arch/powerpc/boot/dts/mpc8541cds.dts +++ b/arch/powerpc/boot/dts/mpc8541cds.dts @@ -71,14 +71,14 @@ }; memory-control...@2000 { - compatible = fsl,8541-memory-controller; + compatible = fsl,mpc8541-memory-controller; reg = 0x2000 0x1000; interrupt-parent = mpic; interrupts = 18 2; }; L2: l2-cache-control...@2 { - compatible = fsl,8541-l2-cache-controller; + compatible = fsl,mpc8541-l2-cache-controller; reg = 0x2 0x1000; cache-line-size = 32; // 32 bytes cache-size = 0x4; // L2, 256K diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index 98e94b4..d793968 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts @@ -73,14 +73,14 @@ }; memory-control...@2000 { - compatible = fsl,8544-memory-controller; + compatible = fsl,mpc8544-memory-controller; reg = 0x2000 0x1000; interrupt-parent = mpic; interrupts = 18 2; }; L2: l2-cache-control...@2 { - compatible = fsl,8544-l2-cache-controller; + compatible = fsl,mpc8544-l2-cache-controller; reg = 0x2 0x1000; cache-line-size = 32; // 32 bytes cache-size = 0x4; // L2, 256K diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts index 0f52624..a17a557 100644 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/arch/powerpc/boot/dts/mpc8548cds.dts @@ -74,14 +74,14 @@ }; memory-control...@2000 { - compatible = fsl,8548-memory-controller; + compatible = fsl,mpc8548-memory-controller; reg = 0x2000 0x1000; interrupt-parent = mpic; interrupts = 18 2; }; L2: l2-cache-control...@2 { - compatible = fsl,8548-l2-cache-controller; + compatible = fsl,mpc8548-l2-cache-controller; reg = 0x2 0x1000; cache-line-size = 32; // 32 bytes cache-size = 0x8; // L2, 512K diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts index 065b2f0..5c5614f 100644 --- a/arch/powerpc/boot/dts/mpc8555cds.dts +++ b/arch/powerpc/boot/dts/mpc8555cds.dts @@ -71,14 +71,14 @@ }; memory-control...@2000 { - compatible = fsl,8555-memory-controller; + compatible = fsl,mpc8555-memory-controller; reg = 0x2000 0x1000; interrupt-parent = mpic; interrupts = 18 2; }; L2: l2-cache-control...@2 { -
[PATCH v2 2/2] EDAC: Remove deprecated bindings for MPC85xx
The fsl,85... style bindings for the l2-cache-controller and memory-controller were intended to be deprected as of 2.6.30 per comment in drivers/edac/mpc85xx_edac.c. Previous patch in this series updates all DTS to use the fsl,mpc85... style binding for these two nodes, allowing us to finally deprecate said notation. Signed-off-by: Bradley Hughes bhug...@silicontkx.com --- drivers/edac/mpc85xx_edac.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 52ca09b..50b319e 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c @@ -631,13 +631,6 @@ static int mpc85xx_l2_err_remove(struct of_device *op) } static struct of_device_id mpc85xx_l2_err_of_match[] = { -/* deprecate the fsl,85.. forms in the future, 2.6.30? */ - { .compatible = fsl,8540-l2-cache-controller, }, - { .compatible = fsl,8541-l2-cache-controller, }, - { .compatible = fsl,8544-l2-cache-controller, }, - { .compatible = fsl,8548-l2-cache-controller, }, - { .compatible = fsl,8555-l2-cache-controller, }, - { .compatible = fsl,8568-l2-cache-controller, }, { .compatible = fsl,mpc8536-l2-cache-controller, }, { .compatible = fsl,mpc8540-l2-cache-controller, }, { .compatible = fsl,mpc8541-l2-cache-controller, }, -- 1.7.0.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: rename immap_86xx.h to fsl_guts.h, and add 85xx support
The immap_86xx.h header file only defines one data structure: the global utilities register set found on Freescale PowerPC SOCs. Rename this file to fsl_guts.h to reflect its true purpose, and extend it to cover the GUTS register set on 85xx chips. Signed-off-by: Timur Tabi ti...@freescale.com --- Liam, This patch is a powerpc-patch, but it's much simpler if you apply it to multi-component, since only the SSI audio drivers are affected. Kumar Gala will ack this patch. .../include/asm/{immap_86xx.h = fsl_guts.h} | 106 +--- sound/soc/fsl/fsl_ssi.c|2 - sound/soc/fsl/mpc8610_hpcd.c | 10 +- 3 files changed, 76 insertions(+), 42 deletions(-) rename arch/powerpc/include/asm/{immap_86xx.h = fsl_guts.h} (67%) diff --git a/arch/powerpc/include/asm/immap_86xx.h b/arch/powerpc/include/asm/fsl_guts.h similarity index 67% rename from arch/powerpc/include/asm/immap_86xx.h rename to arch/powerpc/include/asm/fsl_guts.h index 0f165e5..4827900 100644 --- a/arch/powerpc/include/asm/immap_86xx.h +++ b/arch/powerpc/include/asm/fsl_guts.h @@ -1,5 +1,5 @@ /** - * MPC86xx Internal Memory Map + * Freecale 85xx and 86xx Global Utilties register set * * Authors: Jeff Brown * Timur Tabi ti...@freescale.com @@ -10,73 +10,107 @@ * 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 header file defines structures for various 86xx SOC devices that are - * used by multiple source files. */ -#ifndef __ASM_POWERPC_IMMAP_86XX_H__ -#define __ASM_POWERPC_IMMAP_86XX_H__ +#ifndef __ASM_POWERPC_FSL_GUTS_H__ +#define __ASM_POWERPC_FSL_GUTS_H__ #ifdef __KERNEL__ -/* Global Utility Registers */ -struct ccsr_guts { +#if !defined(CONFIG_PPC_85xx) !defined(CONFIG_PPC_86xx) +#error Only 85xx and 86xx SOCs are supported +#endif + +/** + * Global Utility Registers. + * + * Not all registers defined in this structure are available on all chips, so + * you are expected to know whether a given register actually exists on your + * chip before you access it. + * + * Also, some registers are similar on different chips but have slightly + * different names. In these cases, one name is chosen to avoid extraneous + * #ifdefs. + */ +#ifdef CONFIG_PPC_85xx +struct ccsr_guts_85xx { +#else +struct ccsr_guts_86xx { +#endif __be32 porpllsr; /* 0x. - POR PLL Ratio Status Register */ __be32 porbmsr;/* 0x.0004 - POR Boot Mode Status Register */ __be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */ __be32 pordevsr; /* 0x.000c - POR I/O Device Status Register */ __be32 pordbgmsr; /* 0x.0010 - POR Debug Mode Status Register */ - u8 res1[0x20 - 0x14]; + __be32 pordevsr2; /* 0x.0014 - POR device status register 2 */ + u8 res018[0x20 - 0x18]; __be32 porcir; /* 0x.0020 - POR Configuration Information Register */ - u8 res2[0x30 - 0x24]; + u8 res024[0x30 - 0x24]; __be32 gpiocr; /* 0x.0030 - GPIO Control Register */ - u8 res3[0x40 - 0x34]; + u8 res034[0x40 - 0x34]; __be32 gpoutdr;/* 0x.0040 - General-Purpose Output Data Register */ - u8 res4[0x50 - 0x44]; + u8 res044[0x50 - 0x44]; __be32 gpindr; /* 0x.0050 - General-Purpose Input Data Register */ - u8 res5[0x60 - 0x54]; + u8 res054[0x60 - 0x54]; __be32 pmuxcr; /* 0x.0060 - Alternate Function Signal Multiplex Control */ - u8 res6[0x70 - 0x64]; +__be32 pmuxcr2; /* 0x.0064 - Alternate function signal multiplex control 2 */ +__be32 dmuxcr;/* 0x.0068 - DMA Mux Control Register */ +u8 res06c[0x70 - 0x6c]; __be32 devdisr;/* 0x.0070 - Device Disable Control */ __be32 devdisr2; /* 0x.0074 - Device Disable Control 2 */ - u8 res7[0x80 - 0x78]; + u8 res078[0x7c - 0x78]; + __be32 pmjcr; /* 0x.007c - 4 Power Management Jog Control Register */ __be32 powmgtcsr; /* 0x.0080 - Power Management Status and Control Register */ - u8 res8[0x90 - 0x84]; + __be32 pmrccr; /* 0x.0084 - Power Management Reset Counter Configuration Register */ + __be32 pmpdccr;/* 0x.0088 - Power Management Power Down Counter Configuration Register */ + __be32 pmcdr; /* 0x.008c - 4Power management clock disable register */ __be32 mcpsumr;/* 0x.0090 - Machine Check Summary Register */ __be32 rstrscr;/* 0x.0094 - Reset Request Status and Control Register */ - u8 res9[0xA0 - 0x98]; + __be32 ectrstcr; /* 0x.0098 - Exception reset control register */ +
Re: [PATCH v2] edac: mpc85xx: Add support for new MPCxxx/Pxxxx EDAC controllers
On Fri, 16 Jul 2010 15:12:24 -0500 Scott Wood scottw...@freescale.com wrote: On Thu, 15 Jul 2010 22:25:07 +0400 Anton Vorontsov avoront...@mvista.com wrote: Simply add proper IDs into the device table. Signed-off-by: Anton Vorontsov avoront...@mvista.com --- It appears that the driver has two device ID tables. :-) So, my previous attempt enabled only half of the functionality. Andrew, Can you please replace edac-mpc85xx-add-support-for-mpc8569-edac-controllers.patch with this patch? It also adds some more IDs for the newer chips. edac-mpc85xx-add-support-for-mpc8569-edac-controllers.patch already got itself merged. I queued this: --- a/drivers/edac/mpc85xx_edac.c~edac-mpc85xx-add-support-for-new-mpcxxx-p-edac-controllers +++ a/drivers/edac/mpc85xx_edac.c @@ -646,8 +646,12 @@ static struct of_device_id mpc85xx_l2_er { .compatible = fsl,mpc8555-l2-cache-controller, }, { .compatible = fsl,mpc8560-l2-cache-controller, }, { .compatible = fsl,mpc8568-l2-cache-controller, }, + { .compatible = fsl,mpc8569-l2-cache-controller, }, { .compatible = fsl,mpc8572-l2-cache-controller, }, + { .compatible = fsl,p1020-l2-cache-controller, }, + { .compatible = fsl,p1021-l2-cache-controller, }, { .compatible = fsl,p2020-l2-cache-controller, }, + { .compatible = fsl,p4080-l2-cache-controller, }, {}, }; @@ -1123,7 +1127,10 @@ static struct of_device_id mpc85xx_mc_er { .compatible = fsl,mpc8569-memory-controller, }, { .compatible = fsl,mpc8572-memory-controller, }, { .compatible = fsl,mpc8349-memory-controller, }, + { .compatible = fsl,p1020-memory-controller, }, + { .compatible = fsl,p1021-memory-controller, }, { .compatible = fsl,p2020-memory-controller, }, + { .compatible = fsl,p4080-memory-controller, }, {}, }; _ drivers/edac/mpc85xx_edac.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 52ca09b..3820879 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c @@ -646,8 +646,12 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = { { .compatible = fsl,mpc8555-l2-cache-controller, }, { .compatible = fsl,mpc8560-l2-cache-controller, }, { .compatible = fsl,mpc8568-l2-cache-controller, }, + { .compatible = fsl,mpc8569-l2-cache-controller, }, { .compatible = fsl,mpc8572-l2-cache-controller, }, + { .compatible = fsl,p1020-l2-cache-controller, }, + { .compatible = fsl,p1021-l2-cache-controller, }, { .compatible = fsl,p2020-l2-cache-controller, }, + { .compatible = fsl,p4080-l2-cache-controller, }, L2 on the p4080 is quite different from those other chips. It's part of the core, controlled by SPRs. erm, was that an ack or a nack? ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 0/2] Adding DTS for the STx GP3-SSA MPC8555 board
Dear Bradley Hughes, In message aanlktimmb_pshxaidvbffdbcqhrly13qiz9g2ez1v...@mail.gmail.com you wrote: This version uses fsl,mpc8555... instead of fsl,85... notation. Such comments should go below the --- line. There is also an 8541 version of this board so DTS for this board is specific to the 8555 processor. Another patch is coming to fix-up other DTS that use old notation. Ditto. Signed-off-by: Bradley Hughes bhug...@silicontkx.com --- ^^^ Insert comments after this line. Hm... have you verified that PCI is working? I tried enabling drivers for the ITE8211 PATA controller, but it doesn't seem to work for me (and yes, I did add the required pata_it821x.noraid=1 to the bootargs). Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de To be a winner, all you need to give is all you have. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] edac: mpc85xx: Add support for new MPCxxx/Pxxxx EDAC controllers
On Wed, 21 Jul 2010 15:39:33 -0700 Andrew Morton a...@linux-foundation.org wrote: On Fri, 16 Jul 2010 15:12:24 -0500 Scott Wood scottw...@freescale.com wrote: drivers/edac/mpc85xx_edac.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 52ca09b..3820879 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c @@ -646,8 +646,12 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = { { .compatible = fsl,mpc8555-l2-cache-controller, }, { .compatible = fsl,mpc8560-l2-cache-controller, }, { .compatible = fsl,mpc8568-l2-cache-controller, }, + { .compatible = fsl,mpc8569-l2-cache-controller, }, { .compatible = fsl,mpc8572-l2-cache-controller, }, + { .compatible = fsl,p1020-l2-cache-controller, }, + { .compatible = fsl,p1021-l2-cache-controller, }, { .compatible = fsl,p2020-l2-cache-controller, }, + { .compatible = fsl,p4080-l2-cache-controller, }, L2 on the p4080 is quite different from those other chips. It's part of the core, controlled by SPRs. erm, was that an ack or a nack? NACK, p4080 doesn't belong in this table, at least not its L2. L3 on p4080 is similar to L2 on these other chips, though, and it wouldn't take much to get this driver working on it -- but the match table entry should wait until the differences are accommodated. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/5] drivercore/of: Add OF style matching to platform bus
As part of the merge between platform bus and of_platform bus, add the ability to do of-style matching to the platform bus. Signed-off-by: Grant Likely grant.lik...@secretlab.ca CC: Greg Kroah-Hartman gre...@suse.de CC: Michal Simek mon...@monstr.eu CC: Grant Likely grant.lik...@secretlab.ca CC: Benjamin Herrenschmidt b...@kernel.crashing.org CC: Stephen Rothwell s...@canb.auug.org.au CC: linux-ker...@vger.kernel.org CC: microblaze-ucli...@itee.uq.edu.au CC: linuxppc-...@ozlabs.org CC: devicetree-disc...@lists.ozlabs.org --- drivers/base/platform.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 4d99c8b..6a9b3dd 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -12,6 +12,7 @@ #include linux/string.h #include linux/platform_device.h +#include linux/of_device.h #include linux/module.h #include linux/init.h #include linux/dma-mapping.h @@ -673,6 +674,10 @@ static int platform_match(struct device *dev, struct device_driver *drv) struct platform_device *pdev = to_platform_device(dev); struct platform_driver *pdrv = to_platform_driver(drv); + /* Attempt an OF style match first */ + if (of_driver_match_device(dev, drv)) + return 1; + /* match against the id table first */ if (pdrv-id_table) return platform_match_id(pdrv-id_table, pdev) != NULL; ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 3/5] of/platform: remove all of_bus_type and of_platform_bus_type references
Both of_bus_type and of_platform_bus_type are just #define aliases for the platform bus. This patch removes all references to them and switches to the of_register_platform_driver()/of_unregister_platform_driver() API for registering. Subsequent patches will convert each user of of_register_platform_driver() into plain platform_drivers without the of_platform_driver shim. At which point the of_register_platform_driver()/of_unregister_platform_driver() functions can be removed. Signed-off-by: Grant Likely grant.lik...@secretlab.ca --- arch/microblaze/kernel/of_platform.c |3 +-- arch/powerpc/kernel/of_platform.c|3 +-- arch/sparc/include/asm/of_platform.h |2 -- arch/sparc/include/asm/parport.h |4 +--- arch/sparc/kernel/apc.c |2 +- arch/sparc/kernel/auxio_64.c |2 +- arch/sparc/kernel/central.c |4 ++-- arch/sparc/kernel/chmc.c |4 ++-- arch/sparc/kernel/of_device_common.c |2 +- arch/sparc/kernel/pci_fire.c |2 +- arch/sparc/kernel/pci_psycho.c |2 +- arch/sparc/kernel/pci_sabre.c|2 +- arch/sparc/kernel/pci_schizo.c |2 +- arch/sparc/kernel/pci_sun4v.c|2 +- arch/sparc/kernel/pmc.c |2 +- arch/sparc/kernel/power.c|2 +- arch/sparc/kernel/time_32.c |2 +- arch/sparc/kernel/time_64.c |6 +++--- drivers/atm/fore200e.c |6 +++--- drivers/char/hw_random/n2-drv.c |4 ++-- drivers/crypto/n2_core.c | 10 +- drivers/hwmon/ultra45_env.c |4 ++-- drivers/input/misc/sparcspkr.c | 12 +--- drivers/input/serio/i8042-sparcio.h |5 ++--- drivers/mtd/maps/sun_uflash.c|4 ++-- drivers/net/ibm_newemac/core.c |4 ++-- drivers/net/myri_sbus.c |4 ++-- drivers/net/niu.c|6 +++--- drivers/net/sunbmac.c|4 ++-- drivers/net/sunhme.c |4 ++-- drivers/net/sunlance.c |4 ++-- drivers/net/sunqe.c |4 ++-- drivers/parport/parport_sunbpp.c |4 ++-- drivers/sbus/char/bbc_i2c.c |4 ++-- drivers/sbus/char/display7seg.c |4 ++-- drivers/sbus/char/envctrl.c |4 ++-- drivers/sbus/char/flash.c|4 ++-- drivers/sbus/char/uctrl.c|4 ++-- drivers/scsi/qlogicpti.c |4 ++-- drivers/scsi/sun_esp.c |4 ++-- drivers/serial/sunhv.c |4 ++-- drivers/serial/sunsab.c |4 ++-- drivers/serial/sunsu.c |2 +- drivers/serial/sunzilog.c|6 +++--- drivers/video/bw2.c |4 ++-- drivers/video/cg14.c |4 ++-- drivers/video/cg3.c |4 ++-- drivers/video/cg6.c |4 ++-- drivers/video/ffb.c |4 ++-- drivers/video/leo.c |4 ++-- drivers/video/p9100.c|4 ++-- drivers/video/sunxvr1000.c |4 ++-- drivers/video/tcx.c |4 ++-- drivers/watchdog/cpwd.c |4 ++-- drivers/watchdog/riowd.c |4 ++-- include/linux/of_platform.h |6 -- sound/sparc/amd7930.c|4 ++-- sound/sparc/cs4231.c |4 ++-- sound/sparc/dbri.c |4 ++-- 59 files changed, 109 insertions(+), 124 deletions(-) diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index fb28661..80c9c49 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c @@ -57,8 +57,7 @@ struct of_device *of_find_device_by_node(struct device_node *np) { struct device *dev; - dev = bus_find_device(of_platform_bus_type, - NULL, np, of_dev_node_match); + dev = bus_find_device(platform_bus_type, NULL, np, of_dev_node_match); if (dev) return to_of_device(dev); return NULL; diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index d3497cd..b093d4b 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c @@ -61,8 +61,7 @@ struct of_device *of_find_device_by_node(struct device_node *np) { struct device *dev; - dev = bus_find_device(of_platform_bus_type, - NULL, np, of_dev_node_match); + dev = bus_find_device(platform_bus_type, NULL, np, of_dev_node_match); if (dev) return to_of_device(dev); return NULL; diff --git a/arch/sparc/include/asm/of_platform.h b/arch/sparc/include/asm/of_platform.h index 90da990..26540dd 100644 --- a/arch/sparc/include/asm/of_platform.h +++ b/arch/sparc/include/asm/of_platform.h @@ -13,6 +13,4 @@ * */ -#define of_bus_type
[PATCH 4/5] of: remove asm/of_platform.h
Only thing left in it is of_instantiate_rtc() which can be moved to asm/prom.h on PowerPC and is unused in microblaze. Signed-off-by: Grant Likely grant.lik...@secretlab.ca --- arch/microblaze/include/asm/of_platform.h | 19 --- arch/powerpc/include/asm/of_platform.h| 16 arch/powerpc/include/asm/prom.h |2 ++ arch/sparc/include/asm/of_platform.h | 16 include/linux/of_platform.h |2 -- 5 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 arch/microblaze/include/asm/of_platform.h delete mode 100644 arch/powerpc/include/asm/of_platform.h delete mode 100644 arch/sparc/include/asm/of_platform.h diff --git a/arch/microblaze/include/asm/of_platform.h b/arch/microblaze/include/asm/of_platform.h deleted file mode 100644 index 353d8f6..000 --- a/arch/microblaze/include/asm/of_platform.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. - * b...@kernel.crashing.org - * - * 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. - */ - -#ifndef _ASM_MICROBLAZE_OF_PLATFORM_H -#define _ASM_MICROBLAZE_OF_PLATFORM_H - -/* This is just here during the transition */ -#include linux/of_platform.h - -extern void of_instantiate_rtc(void); - -#endif /* _ASM_MICROBLAZE_OF_PLATFORM_H */ diff --git a/arch/powerpc/include/asm/of_platform.h b/arch/powerpc/include/asm/of_platform.h deleted file mode 100644 index d506aa6..000 --- a/arch/powerpc/include/asm/of_platform.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _ASM_POWERPC_OF_PLATFORM_H -#define _ASM_POWERPC_OF_PLATFORM_H -/* - *Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. - * b...@kernel.crashing.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - */ - -extern void of_instantiate_rtc(void); - -#endif /* _ASM_POWERPC_OF_PLATFORM_H */ diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h index f864722..da7dd63 100644 --- a/arch/powerpc/include/asm/prom.h +++ b/arch/powerpc/include/asm/prom.h @@ -117,5 +117,7 @@ extern const void *of_get_mac_address(struct device_node *np); struct pci_dev; extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); +extern void of_instantiate_rtc(void); + #endif /* __KERNEL__ */ #endif /* _POWERPC_PROM_H */ diff --git a/arch/sparc/include/asm/of_platform.h b/arch/sparc/include/asm/of_platform.h deleted file mode 100644 index 26540dd..000 --- a/arch/sparc/include/asm/of_platform.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef ___ASM_SPARC_OF_PLATFORM_H -#define ___ASM_SPARC_OF_PLATFORM_H -/* - *Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. - * b...@kernel.crashing.org - *Modified for Sparc by merging parts of asm/of_device.h - * by Stephen Rothwell - * - * 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. - * - */ - -#endif diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 429513a..a79f59b 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -52,8 +52,6 @@ extern void of_unregister_platform_driver(struct of_platform_driver *drv); extern struct of_device *of_device_alloc(struct device_node *np, const char *bus_id, struct device *parent); -#include asm/of_platform.h - extern struct of_device *of_find_device_by_node(struct device_node *np); extern int of_bus_type_init(struct bus_type *bus, const char *name); ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/2] MPC85xx: add definitions for PCI error detection soc part
Add definitions for PCI error detection device to be handled by (already existing) mpc85xx_edac.c driver. Signed-off-by: Dmitry Eremin-Solenikov dbarysh...@gmail.com --- arch/powerpc/boot/dts/mpc8536ds.dts|7 +++ arch/powerpc/boot/dts/mpc8536ds_36b.dts|7 +++ arch/powerpc/boot/dts/mpc8540ads.dts |8 arch/powerpc/boot/dts/mpc8541cds.dts | 14 ++ arch/powerpc/boot/dts/mpc8544ds.dts|7 +++ arch/powerpc/boot/dts/mpc8548cds.dts | 14 ++ arch/powerpc/boot/dts/mpc8555cds.dts | 14 ++ arch/powerpc/boot/dts/mpc8560ads.dts |7 +++ arch/powerpc/boot/dts/mpc8568mds.dts |7 +++ arch/powerpc/boot/dts/sbc8548.dts |7 +++ arch/powerpc/boot/dts/sbc8560.dts |7 +++ arch/powerpc/boot/dts/socrates.dts |7 +++ arch/powerpc/boot/dts/stx_gp3_8560.dts |7 +++ arch/powerpc/boot/dts/tqm8540.dts | 10 ++ arch/powerpc/boot/dts/tqm8541.dts |7 +++ arch/powerpc/boot/dts/tqm8548-bigflash.dts |7 +++ arch/powerpc/boot/dts/tqm8548.dts |7 +++ arch/powerpc/boot/dts/tqm8555.dts |7 +++ arch/powerpc/boot/dts/tqm8560.dts |7 +++ arch/powerpc/boot/dts/xpedite5200.dts |7 +++ arch/powerpc/boot/dts/xpedite5200_xmon.dts |7 +++ 21 files changed, 172 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/mpc8536ds.dts index 815cebb..6c02e5a 100644 --- a/arch/powerpc/boot/dts/mpc8536ds.dts +++ b/arch/powerpc/boot/dts/mpc8536ds.dts @@ -278,6 +278,13 @@ interrupt-parent = mpic; }; + pci-er...@8e00 { + compatible = fsl,mpc8536-pci-error; + reg = 0x8e00 0x100; + interrupt-parent = mpic; + interrupts = 24 2; + }; + cry...@3 { compatible = fsl,sec3.0, fsl,sec2.4, fsl,sec2.2, fsl,sec2.1, fsl,sec2.0; diff --git a/arch/powerpc/boot/dts/mpc8536ds_36b.dts b/arch/powerpc/boot/dts/mpc8536ds_36b.dts index d95b260..89ef5c1 100644 --- a/arch/powerpc/boot/dts/mpc8536ds_36b.dts +++ b/arch/powerpc/boot/dts/mpc8536ds_36b.dts @@ -278,6 +278,13 @@ interrupt-parent = mpic; }; + pci-er...@8e00 { + compatible = fsl,mpc8536-pci-error; + reg = 0x8e00 0x100; + interrupt-parent = mpic; + interrupts = 24 2; + }; + cry...@3 { compatible = fsl,sec3.0, fsl,sec2.4, fsl,sec2.2, fsl,sec2.1, fsl,sec2.0; diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts index 9dc2929..d89f470 100644 --- a/arch/powerpc/boot/dts/mpc8540ads.dts +++ b/arch/powerpc/boot/dts/mpc8540ads.dts @@ -259,6 +259,14 @@ interrupts = 42 2; interrupt-parent = mpic; }; + + pci-er...@8e00 { + compatible = fsl,mpc8540-pci-error; + reg = 0x8e00 0x100; + interrupt-parent = mpic; + interrupts = 24 2; + }; + mpic: p...@4 { interrupt-controller; #address-cells = 0; diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts index 9a3ad31..c2c5732 100644 --- a/arch/powerpc/boot/dts/mpc8541cds.dts +++ b/arch/powerpc/boot/dts/mpc8541cds.dts @@ -226,6 +226,20 @@ interrupt-parent = mpic; }; + pci-er...@8e00 { + compatible = fsl,mpc8541-pci-error; + reg = 0x8e00 0x100; + interrupt-parent = mpic; + interrupts = 24 2; + }; + + pci-er...@9e00 { + compatible = fsl,mpc8541-pci-error; + reg = 0x9e00 0x100; + interrupt-parent = mpic; + interrupts = 25 2; + }; + cry...@3 { compatible = fsl,sec2.0; reg = 0x3 0x1; diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index 98e94b4..387da1f 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts @@ -242,6 +242,13 @@ interrupt-parent = mpic; }; + pci-er...@8e00 { + compatible = fsl,mpc8544-pci-error; + reg = 0x8e00 0x100; +
Re: [PATCH 1/5] drivercore/of: Add OF style matching to platform bus
On Wed, Jul 21, 2010 at 05:39:54PM -0600, Grant Likely wrote: As part of the merge between platform bus and of_platform bus, add the ability to do of-style matching to the platform bus. Signed-off-by: Grant Likely grant.lik...@secretlab.ca CC: Greg Kroah-Hartman gre...@suse.de CC: Michal Simek mon...@monstr.eu CC: Grant Likely grant.lik...@secretlab.ca CC: Benjamin Herrenschmidt b...@kernel.crashing.org CC: Stephen Rothwell s...@canb.auug.org.au CC: linux-ker...@vger.kernel.org CC: microblaze-ucli...@itee.uq.edu.au CC: linuxppc-...@ozlabs.org CC: devicetree-disc...@lists.ozlabs.org --- drivers/base/platform.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 4d99c8b..6a9b3dd 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -12,6 +12,7 @@ #include linux/string.h #include linux/platform_device.h +#include linux/of_device.h #include linux/module.h #include linux/init.h #include linux/dma-mapping.h @@ -673,6 +674,10 @@ static int platform_match(struct device *dev, struct device_driver *drv) struct platform_device *pdev = to_platform_device(dev); struct platform_driver *pdrv = to_platform_driver(drv); + /* Attempt an OF style match first */ + if (of_driver_match_device(dev, drv)) + return 1; + /* match against the id table first */ I think you need to also change this comment, you can't have two firsts :) If you do that, feel free to add an: Acked-by: Greg Kroah-Hartman gre...@suse.de to the patch. thanks, greg k-h ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [alsa-devel] [PATCH] powerpc: rename immap_86xx.h to fsl_guts.h, and add 85xx support
On Wed, Jul 21, 2010 at 5:05 PM, Timur Tabi ti...@freescale.com wrote: The immap_86xx.h header file only defines one data structure: the global utilities register set found on Freescale PowerPC SOCs. Rename this file to fsl_guts.h to reflect its true purpose, and extend it to cover the GUTS register set on 85xx chips. Signed-off-by: Timur Tabi ti...@freescale.com Argh, I forgot to add the text to explain e500 vs. e600. V2 coming. -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v4 0/2] powerpc: add support for new hcall H_BEST_ENERGY
Hi Ben, The following series adds a kernel module for powerpc pseries platforms in order to export platform energy management capabilities. The module exports data from a new hypervisor call H_BEST_ENERGY. Some of the comments and suggestions made on the previous iteration of the patch has been incorporated. Changes in v4: * Added more documentation * Added check_for_h_best_energy() to look in ibm,hypertas-functions so that sysfs entries are not created in an unsupported platform * Added cleaner error checks and correct of_node_put() * Rebased and tested on 2.6.35-rc5 Changed in v3: [3] [PATCH v3 0/2] powerpc: add support for new hcall H_BEST_ENERGY http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-June/083414.html * Added more documentation in the cleanup patch * Removed RFC tag, rebased and tested on 2.6.35-rc3 * Ready for inclusion in powerpc/next tree for further testing Changes in v2: [2] [RFC PATCH v2 0/2] powerpc: add support for new hcall H_BEST_ENERGY http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-May/082246.html * Cleanup cpu/thread/core APIs * Export APIs to module instead of threads_per_core * Use of_find_node_by_path() instead of of_find_node_by_name() * Error checking and whitespace cleanups First version: [1] [RFC] powerpc: add support for new hcall H_BEST_ENERGY http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-March/080796.html This patch series will apply on 2.6.35-rc5 as well as powerpc/next tree. Please review and include in powerpc/next tree for further testing. I could incrementally reduce some of the error checks as suggested by Michael Neuling as next steps. Thanks, Vaidy --- Vaidyanathan Srinivasan (2): powerpc: cleanup APIs for cpu/thread/core mappings powerpc: add support for new hcall H_BEST_ENERGY arch/powerpc/include/asm/cputhreads.h | 15 + arch/powerpc/include/asm/hvcall.h |3 arch/powerpc/kernel/smp.c | 19 + arch/powerpc/mm/mmu_context_nohash.c| 12 - arch/powerpc/platforms/pseries/Kconfig | 10 + arch/powerpc/platforms/pseries/Makefile |1 arch/powerpc/platforms/pseries/pseries_energy.c | 326 +++ 7 files changed, 370 insertions(+), 16 deletions(-) create mode 100644 arch/powerpc/platforms/pseries/pseries_energy.c ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v4 1/2] powerpc: cleanup APIs for cpu/thread/core mappings
These APIs take logical cpu number as input Change cpu_first_thread_in_core() to cpu_leftmost_thread_sibling() Change cpu_last_thread_in_core() to cpu_rightmost_thread_sibling() These APIs convert core number (index) to logical cpu/thread numbers Add cpu_first_thread_of_core(int core) Changed cpu_thread_to_core() to cpu_core_of_thread(int cpu) The goal is to make 'threads_per_core' accessible to the pseries_energy module. Instead of making an API to read threads_per_core, this is a higher level wrapper function to convert from logical cpu number to core number. The current APIs cpu_first_thread_in_core() and cpu_last_thread_in_core() returns logical CPU number while cpu_thread_to_core() returns core number or index which is not a logical CPU number. The APIs are now clearly named to distinguish 'core number' versus first and last 'logical cpu number' in that core. The new APIs cpu_{left,right}most_thread_sibling() work on logical cpu numbers. While cpu_first_thread_of_core() and cpu_core_of_thread() work on core index. Example usage: (4 threads per core system) cpu_leftmost_thread_sibling(5) = 4 cpu_rightmost_thread_sibling(5) = 7 cpu_core_of_thread(5) = 1 cpu_first_thread_of_core(1) = 4 cpu_core_of_thread() is used in cpu_to_drc_index() in the module and cpu_first_thread_of_core() is used in drc_index_to_cpu() in the module. Made API changes to few callers. Exported symbols for use in modules. Signed-off-by: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com --- arch/powerpc/include/asm/cputhreads.h | 15 +-- arch/powerpc/kernel/smp.c | 19 --- arch/powerpc/mm/mmu_context_nohash.c | 12 ++-- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/cputhreads.h b/arch/powerpc/include/asm/cputhreads.h index a8e1844..26dc6bd 100644 --- a/arch/powerpc/include/asm/cputhreads.h +++ b/arch/powerpc/include/asm/cputhreads.h @@ -61,22 +61,25 @@ static inline cpumask_t cpu_online_cores_map(void) return cpu_thread_mask_to_cores(cpu_online_map); } -static inline int cpu_thread_to_core(int cpu) -{ - return cpu threads_shift; -} +#ifdef CONFIG_SMP +int cpu_core_of_thread(int cpu); +int cpu_first_thread_of_core(int core); +#else +static inline int cpu_core_of_thread(int cpu) { return cpu; } +static inline int cpu_first_thread_of_core(int core) { return core; } +#endif static inline int cpu_thread_in_core(int cpu) { return cpu (threads_per_core - 1); } -static inline int cpu_first_thread_in_core(int cpu) +static inline int cpu_leftmost_thread_sibling(int cpu) { return cpu ~(threads_per_core - 1); } -static inline int cpu_last_thread_in_core(int cpu) +static inline int cpu_rightmost_thread_sibling(int cpu) { return cpu | (threads_per_core - 1); } diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 5c196d1..da4c2f8 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -468,7 +468,20 @@ out: return id; } -/* Must be called when no change can occur to cpu_present_mask, +/* Helper routines for cpu to core mapping */ +int cpu_core_of_thread(int cpu) +{ + return cpu threads_shift; +} +EXPORT_SYMBOL_GPL(cpu_core_of_thread); + +int cpu_first_thread_of_core(int core) +{ + return core threads_shift; +} +EXPORT_SYMBOL_GPL(cpu_first_thread_of_core); + +/* Must be called when no change can occur to cpu_present_map, * i.e. during cpu online or offline. */ static struct device_node *cpu_to_l2cache(int cpu) @@ -527,7 +540,7 @@ int __devinit start_secondary(void *unused) notify_cpu_starting(cpu); set_cpu_online(cpu, true); /* Update sibling maps */ - base = cpu_first_thread_in_core(cpu); + base = cpu_leftmost_thread_sibling(cpu); for (i = 0; i threads_per_core; i++) { if (cpu_is_offline(base + i)) continue; @@ -606,7 +619,7 @@ int __cpu_disable(void) return err; /* Update sibling maps */ - base = cpu_first_thread_in_core(cpu); + base = cpu_leftmost_thread_sibling(cpu); for (i = 0; i threads_per_core; i++) { cpumask_clear_cpu(cpu, cpu_sibling_mask(base + i)); cpumask_clear_cpu(base + i, cpu_sibling_mask(cpu)); diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index ddfd7ad..22f3bc5 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c @@ -111,8 +111,8 @@ static unsigned int steal_context_smp(unsigned int id) * a core map instead but this will do for now. */ for_each_cpu(cpu, mm_cpumask(mm)) { - for (i = cpu_first_thread_in_core(cpu); -i = cpu_last_thread_in_core(cpu); i++) + for (i = cpu_leftmost_thread_sibling(cpu); +i =
[PATCH v4 2/2] powerpc: add support for new hcall H_BEST_ENERGY
Create sysfs interface to export data from H_BEST_ENERGY hcall that can be used by administrative tools on supported pseries platforms for energy management optimizations. /sys/device/system/cpu/pseries_(de)activate_hint_list and /sys/device/system/cpu/cpuN/pseries_(de)activate_hint will provide hints for activation and deactivation of cpus respectively. These hints are abstract number given by the hypervisor based on the extended knowledge the hypervisor has regarding the current system topology and resource mappings. The activate and the deactivate sysfs entry is for the two distinct operations that we could do for energy savings. When we have more capacity than required, we could deactivate few core to save energy. The choice of the core to deactivate will be based on /sys/devices/system/cpu/deactivate_hint_list. The comma separated list of cpus (cores) will be the preferred choice. If we have to activate some of the deactivated cores, then /sys/devices/system/cpu/activate_hint_list will be used. The per-cpu file /sys/device/system/cpu/cpuN/pseries_(de)activate_hint further provide more fine grain information by exporting the value of the hint itself. Added new driver module arch/powerpc/platforms/pseries/pseries_energy.c under new config option CONFIG_PSERIES_ENERGY Signed-off-by: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com --- arch/powerpc/include/asm/hvcall.h |3 arch/powerpc/platforms/pseries/Kconfig | 10 + arch/powerpc/platforms/pseries/Makefile |1 arch/powerpc/platforms/pseries/pseries_energy.c | 326 +++ 4 files changed, 339 insertions(+), 1 deletions(-) create mode 100644 arch/powerpc/platforms/pseries/pseries_energy.c diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index 5119b7d..34b66e0 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h @@ -231,7 +231,8 @@ #define H_GET_EM_PARMS 0x2B8 #define H_SET_MPP 0x2D0 #define H_GET_MPP 0x2D4 -#define MAX_HCALL_OPCODE H_GET_MPP +#define H_BEST_ENERGY 0x2F4 +#define MAX_HCALL_OPCODE H_BEST_ENERGY #ifndef __ASSEMBLY__ diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index c667f0f..8323622 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig @@ -33,6 +33,16 @@ config PSERIES_MSI depends on PCI_MSI EEH default y +config PSERIES_ENERGY + tristate pSeries energy management capabilities driver + depends on PPC_PSERIES + default y + help + Provides interface to platform energy management capabilities + on supported PSERIES platforms. + Provides: /sys/devices/system/cpu/pseries_(de)activation_hint_list + and /sys/devices/system/cpu/cpuN/pseries_(de)activation_hint + config SCANLOG tristate Scanlog dump interface depends on RTAS_PROC PPC_PSERIES diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 3dbef30..32ae72e 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile @@ -16,6 +16,7 @@ obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o eeh_sysfs.o obj-$(CONFIG_KEXEC)+= kexec.o obj-$(CONFIG_PCI) += pci.o pci_dlpar.o obj-$(CONFIG_PSERIES_MSI) += msi.o +obj-$(CONFIG_PSERIES_ENERGY) += pseries_energy.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o obj-$(CONFIG_MEMORY_HOTPLUG) += hotplug-memory.o diff --git a/arch/powerpc/platforms/pseries/pseries_energy.c b/arch/powerpc/platforms/pseries/pseries_energy.c new file mode 100644 index 000..e217ea3 --- /dev/null +++ b/arch/powerpc/platforms/pseries/pseries_energy.c @@ -0,0 +1,326 @@ +/* + * POWER platform energy management driver + * Copyright (C) 2010 IBM Corporation + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This pseries platform device driver provides access to + * platform energy management capabilities. + */ + +#include linux/module.h +#include linux/types.h +#include linux/errno.h +#include linux/init.h +#include linux/seq_file.h +#include linux/sysdev.h +#include linux/cpu.h +#include linux/of.h +#include asm/cputhreads.h +#include asm/page.h +#include asm/hvcall.h + + +#define MODULE_VERS 1.0 +#define MODULE_NAME pseries_energy + +/* Driver flags */ + +static int sysfs_entries; + +/* Helper routines */ + +/* + * Routine to detect firmware support for hcall + * return 1 if H_BEST_ENERGY is supported + * else return 0 + */ +
Re: [PATCH v3 2/2] powerpc: add support for new hcall H_BEST_ENERGY
* Michael Neuling mi...@neuling.org [2010-06-28 16:11:06]: [snip] These hints are abstract number given by the hypervisor based on the extended knowledge the hypervisor has regarding the current system topology and resource mappings. The activate and the deactivate part is for the two distinct operations that we could do for energy savings. When we have more capacity than required, we could deactivate few core to save energy. The choice of the core to deactivate will be based on /sys/devices/system/cpu/deactivate_hint_list. The comma separated list of cpus (cores) will be the preferred choice. Once the system has few deactivated cores, based on workload demand we may have to activate them to meet the demand. In that case the /sys/devices/system/cpu/activate_hint_list will be used to prefer the core in-order among the deactivated cores. In simple terms, activate_hint_list will be null until we deactivate few cores. Then we could look at the corresponding list for activation or deactivation. Can you put these details in the code and in the check-in comments. Hi Mikey, I have added these in the -v4 post. Regarding your second point, there is a reason for both a list and per-cpu interface. The list gives us a system wide list of cores in one shot for userspace to base their decision. This will be the preferred interface for most cases. On the other hand, per-cpu file /sys/device/system/cpu/cpuN/pseries_(de)activate_hint provide more information since it exports the hint value as such. The idea is that the list interface will be used to get a suggested list of cores to manage, while the per-cpu value can be used to further get fine grain information on a per-core bases from the hypervisor. This allows Linux to have access to all information that the hypervisor has offered through this hcall interface. OK, I didn't realise that they contained different info. Just more reasons that this interface needs better documentation :-) Overall, I'm mostly happy with the interface. It's pretty light weight. these too. Other comments below. [snip] diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platfo rms/ pseries/Kconfig index c667f0f..b3dd108 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig @@ -33,6 +33,16 @@ config PSERIES_MSI depends on PCI_MSI EEH default y +config PSERIES_ENERGY Probably need a less generic name. PSERIES_ENERGY_MANAGEMENT? PSERIES_ENERGY_HOTPLUG_HINTS? PSERIES_ENERGY_MANAGEMENT may be good but too long for a config option. The idea is to collect all energy management functions in this module as and when new features are introduced in the pseries platform. This hcall interface is the first to be included, but going forward in future I do not propose to have different modules for other energy management related features. The name is specific enough for IBM pseries platform and energy management functions and enablements. Having less generic name below this level will make it difficult to add all varieties of energy management functions in future. OK, I thought this might be the case but you never said. Please say something like This adds CONFIG_PSERIES_ENERGY which will be used for future power saving code or some such. I already had this comment in the patch description. Did not want add a comment in the Kconfig file as the CONFIG_ prefix is assumed in each of the + +/* Helper Routines to convert between drc_index to cpu numbers */ + +static u32 cpu_to_drc_index(int cpu) +{ + struct device_node *dn = NULL; + const int *indexes; + int i; + dn = of_find_node_by_path(/cpus); + if (dn == NULL) + goto err; Humm, I not sure this is really needed. If you don't have /cpus you are probably not going to boot. Good suggestion. I could add all these checks in module_init. I was think if any of the functions being called is allocating memory and in case they fail, we need to abort. I just reviewed and look like of_find_node_by_path() will not sleep or allocate any memory. So if it succeeds once in module_init(), then it will never fail! + indexes = of_get_property(dn, ibm,drc-indexes, NULL); + if (indexes == NULL) + goto err; These checks should probably be moved to module init rather than /sfs read time. If they fail, don't load the module and print a warning. These HCALLS and device-tree entire aren't going to be dynamic. Agreed. Only cause of runtime failure is OOM. If none of these allocate memory, moving these checks once at module_init() will be a good optimization. Cool, thanks. Hey, I did not yet remove the failure checks in
[PATCH] powerpc: print cores passed to firmware in decimal
Currently we look pretty stupid when printing out the number of cores passed to FW Max number of cores passed to firmware: 0x0080 So I've change this to print in decimal: Max number of cores passed to firmware: 128 (NR_CPUS = 256) This required adding a prom_print_dec() function. Signed-off-by: Michael Neuling mi...@neuling.org -- Anton suggested printing it in EBCDIC, but I nixed that. arch/powerpc/kernel/prom_init.c | 32 +--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 3b6f8ae..4428d26 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -311,6 +311,27 @@ static void __init prom_print_hex(unsigned long val) call_prom(write, 3, 1, _prom-stdout, buf, nibbles); } +/* max number of decimal digits in an unsigned long */ +#define UL_DIGITS 21 +static void __init prom_print_dec(unsigned long val) +{ + int i, size; + char buf[UL_DIGITS+1]; + struct prom_t *_prom = RELOC(prom); + + for (i = UL_DIGITS-1; i = 0; i--) { + buf[i] = (val % 10) + '0'; + val = val/10; + if (val == 0) + break; + } + /* shift stuff down */ + size = UL_DIGITS - i; + for (i = 0 ; i size ; i++) + buf[i] = buf[i + UL_DIGITS - size]; + buf[size+1] = '\0'; + call_prom(write, 3, 1, _prom-stdout, buf, size); +} static void __init prom_printf(const char *format, ...) { @@ -350,6 +371,11 @@ static void __init prom_printf(const char *format, ...) v = va_arg(args, unsigned long); prom_print_hex(v); break; + case 'i': + ++q; + v = va_arg(args, unsigned long); + prom_print_dec(v); + break; } } } @@ -869,12 +895,12 @@ static void __init prom_send_capabilities(void) cores = (u32 *)PTRRELOC(ibm_architecture_vec[IBM_ARCH_VEC_NRCORES_OFFSET]); if (*cores != NR_CPUS) { prom_printf(WARNING ! - ibm_architecture_vec structure inconsistent: 0x%x !\n, + ibm_architecture_vec structure inconsistent: 0x%i !\n, *cores); } else { *cores = DIV_ROUND_UP(NR_CPUS, prom_count_smt_threads()); - prom_printf(Max number of cores passed to firmware: 0x%x\n, - (unsigned long)*cores); + prom_printf(Max number of cores passed to firmware: %i (NR_CPUS = %i)\n, + *cores, NR_CPUS); } /* try calling the ibm,client-architecture-support method */ ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 0/5] Eliminate of_platform_bus_type
From: Grant Likely grant.lik...@secretlab.ca Date: Wed, 21 Jul 2010 17:39:49 -0600 David, you'll also want to take a look at patches 4 5 to see if you agree with my decisions on where I move symbols in the header files. Looks fine to me. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/5] of: Merge of_platform_bus_type with platform_bus_type
From: Grant Likely grant.lik...@secretlab.ca Date: Wed, 21 Jul 2010 17:40:00 -0600 of_platform_bus was being used in the same manner as the platform_bus. The only difference being that of_platform_bus devices are generated from data in the device tree, and platform_bus devices are usually statically allocated in platform code. Having them separate causes the problem of device drivers having to be registered twice if it was possible for the same device to appear on either bus. This patch removes of_platform_bus_type and registers all of_platform bus devices and drivers on the platform bus instead. A previous patch made the of_device structure an alias for the platform_device structure, and a shim is used to adapt of_platform_drivers to the platform bus. After all of of_platform_bus drivers are converted to be normal platform drivers, the shim code can be removed. Signed-off-by: Grant Likely grant.lik...@secretlab.ca Acked-by: David S. Miller da...@davemloft.net ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/5] of/platform: remove all of_bus_type and of_platform_bus_type references
From: Grant Likely grant.lik...@secretlab.ca Date: Wed, 21 Jul 2010 17:40:05 -0600 Both of_bus_type and of_platform_bus_type are just #define aliases for the platform bus. This patch removes all references to them and switches to the of_register_platform_driver()/of_unregister_platform_driver() API for registering. Subsequent patches will convert each user of of_register_platform_driver() into plain platform_drivers without the of_platform_driver shim. At which point the of_register_platform_driver()/of_unregister_platform_driver() functions can be removed. Signed-off-by: Grant Likely grant.lik...@secretlab.ca Acked-by: David S. Miller da...@davemloft.net ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 4/5] of: remove asm/of_platform.h
From: Grant Likely grant.lik...@secretlab.ca Date: Wed, 21 Jul 2010 17:40:10 -0600 Only thing left in it is of_instantiate_rtc() which can be moved to asm/prom.h on PowerPC and is unused in microblaze. Signed-off-by: Grant Likely grant.lik...@secretlab.ca Acked-by: David S. Miller da...@davemloft.net ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 5/5] of: remove asm/of_device.h
From: Grant Likely grant.lik...@secretlab.ca Date: Wed, 21 Jul 2010 17:40:15 -0600 It is mostly unused now. Sparc has a few defines left in it, but they can be moved to other headers. Removing this header means that new architectures adding CONFIG_OF support don't need to also add this header file. Signed-off-by: Grant Likely grant.lik...@secretlab.ca Acked-by: David S. Miller da...@davemloft.net ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev