[PATCH] RapidIO: Fix hang on RapidIO doorbell queue full condition

2011-01-03 Thread Thomas Taranowski
In fsl_rio_dbell_handler, the code currently simply acknowledges the QFI queue
full interrupt, but does nothing to resolve the queue full condition.  Instead,
it jumps to the end of the isr.  When a queue full condition occurs, the isr is
then re-entered immediately and continually, forever.

The fix is to just fall through and read out current doorbell entries.

Tested against 2.6.26-rc8 on a p2020

Signed-off-by: Thomas Taranowski 
---
 arch/powerpc/sysdev/fsl_rio.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 9725369..9f99bef 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -973,7 +973,6 @@ fsl_rio_dbell_handler(int irq, void *dev_instance)
if (dsr & DOORBELL_DSR_QFI) {
pr_info("RIO: doorbell queue full\n");
out_be32(&priv->msg_regs->dsr, DOORBELL_DSR_QFI);
-   goto out;
}

/* XXX Need to check/dispatch until queue empty */
-- 
1.7.0.4


Thomas Taranowski
Certified netburner consultant
baringforge.com
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 4/5] powerpc/5200: dts: Change combatible strings on localbus

2011-01-03 Thread Grant Likely
On Wed, Nov 17, 2010 at 03:28:47PM -0800, John Bonesio wrote:
> This patch changes some incorrect compatible strings on the local plus bus 
> node
> in dts files for MPC5200b based systems.
> 
> Signed-off-by: John Bonesio 
> ---

Applied, thanks.

g.

> 
>  arch/powerpc/boot/dts/cm5200.dts|2 +-
>  arch/powerpc/boot/dts/digsy_mtc.dts |2 +-
>  arch/powerpc/boot/dts/media5200.dts |2 +-
>  arch/powerpc/boot/dts/motionpro.dts |2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/cm5200.dts 
> b/arch/powerpc/boot/dts/cm5200.dts
> index d549897..22f7233 100644
> --- a/arch/powerpc/boot/dts/cm5200.dts
> +++ b/arch/powerpc/boot/dts/cm5200.dts
> @@ -219,7 +219,7 @@
>   };
>  
>   localbus {
> - compatible = "fsl,mpc5200b-lpb","simple-bus";
> + compatible = "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";
>   #address-cells = <2>;
>   #size-cells = <1>;
>   ranges = <0 0 0xfc00 0x200>;
> diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts 
> b/arch/powerpc/boot/dts/digsy_mtc.dts
> index f0592de..3147b98 100644
> --- a/arch/powerpc/boot/dts/digsy_mtc.dts
> +++ b/arch/powerpc/boot/dts/digsy_mtc.dts
> @@ -218,7 +218,7 @@
>   };
>  
>   localbus {
> - compatible = "fsl,mpc5200b-lpb","simple-bus";
> + compatible = "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";
>   #address-cells = <2>;
>   #size-cells = <1>;
>   ranges = <0 0 0xff00 0x100>;
> diff --git a/arch/powerpc/boot/dts/media5200.dts 
> b/arch/powerpc/boot/dts/media5200.dts
> index e027f45..861f09f 100644
> --- a/arch/powerpc/boot/dts/media5200.dts
> +++ b/arch/powerpc/boot/dts/media5200.dts
> @@ -270,7 +270,7 @@
>   };
>  
>   localbus {
> - compatible = "fsl,mpc5200b-lpb","simple-bus";
> + compatible = "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";
>   #address-cells = <2>;
>   #size-cells = <1>;
>  
> diff --git a/arch/powerpc/boot/dts/motionpro.dts 
> b/arch/powerpc/boot/dts/motionpro.dts
> index 3ab4666..97cb085 100644
> --- a/arch/powerpc/boot/dts/motionpro.dts
> +++ b/arch/powerpc/boot/dts/motionpro.dts
> @@ -236,7 +236,7 @@
>   };
>  
>   localbus {
> - compatible = "fsl,mpc5200b-lpb","simple-bus";
> + compatible = "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";
>   #address-cells = <2>;
>   #size-cells = <1>;
>   ranges = <0 0 0xff00 0x0100
> 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 3/5] powerpc/5200: dts: remove unused properties

2011-01-03 Thread Grant Likely
On Wed, Nov 17, 2010 at 03:28:39PM -0800, John Bonesio wrote:
> This patch remove unused properties in dts files in preparation of refactoring
> the dts files for MPC5200b based boards.
> 
> Signed-off-by: John Bonesio 

Applied, thanks.

g.

> ---
> 
>  arch/powerpc/boot/dts/cm5200.dts|2 --
>  arch/powerpc/boot/dts/lite5200b.dts |3 ---
>  arch/powerpc/boot/dts/media5200.dts |2 --
>  arch/powerpc/boot/dts/motionpro.dts |2 --
>  arch/powerpc/boot/dts/pcm030.dts|2 --
>  arch/powerpc/boot/dts/pcm032.dts|2 --
>  6 files changed, 0 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/cm5200.dts 
> b/arch/powerpc/boot/dts/cm5200.dts
> index 9369dcd..d549897 100644
> --- a/arch/powerpc/boot/dts/cm5200.dts
> +++ b/arch/powerpc/boot/dts/cm5200.dts
> @@ -230,8 +230,6 @@
>   reg = <0 0 0x200>;
>   bank-width = <2>;
>   device-width = <2>;
> - #size-cells = <1>;
> - #address-cells = <1>;
>   };
>   };
>  };
> diff --git a/arch/powerpc/boot/dts/lite5200b.dts 
> b/arch/powerpc/boot/dts/lite5200b.dts
> index a74b790..c0a4e45 100644
> --- a/arch/powerpc/boot/dts/lite5200b.dts
> +++ b/arch/powerpc/boot/dts/lite5200b.dts
> @@ -174,7 +174,6 @@
>  
>   p...@2000 { // PSC1
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - cell-index = <0>;
>   reg = <0x2000 0x100>;
>   interrupts = <2 1 0>;
>   };
> @@ -198,7 +197,6 @@
>   // PSC4 in uart mode example
>   //ser...@2600 { // PSC4
>   //  compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - //  cell-index = <3>;
>   //  reg = <0x2600 0x100>;
>   //  interrupts = <2 11 0>;
>   //};
> @@ -206,7 +204,6 @@
>   // PSC5 in uart mode example
>   //ser...@2800 { // PSC5
>   //  compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - //  cell-index = <4>;
>   //  reg = <0x2800 0x100>;
>   //  interrupts = <2 12 0>;
>   //};
> diff --git a/arch/powerpc/boot/dts/media5200.dts 
> b/arch/powerpc/boot/dts/media5200.dts
> index a70ef68..e027f45 100644
> --- a/arch/powerpc/boot/dts/media5200.dts
> +++ b/arch/powerpc/boot/dts/media5200.dts
> @@ -185,8 +185,6 @@
>   // PSC6 in uart mode
>   console: p...@2c00 {// PSC6
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - cell-index = <5>;
> - port-number = <0>;  // Logical port assignment
>   reg = <0x2c00 0x100>;
>   interrupts = <2 4 0>;
>   };
> diff --git a/arch/powerpc/boot/dts/motionpro.dts 
> b/arch/powerpc/boot/dts/motionpro.dts
> index f6261ea..3ab4666 100644
> --- a/arch/powerpc/boot/dts/motionpro.dts
> +++ b/arch/powerpc/boot/dts/motionpro.dts
> @@ -277,8 +277,6 @@
>   reg = <0 0 0x0100>;
>   bank-width = <2>;
>   device-width = <2>;
> - #size-cells = <1>;
> - #address-cells = <1>;
>   };
>   };
>  };
> diff --git a/arch/powerpc/boot/dts/pcm030.dts 
> b/arch/powerpc/boot/dts/pcm030.dts
> index 3a4f554..f3e30bb 100644
> --- a/arch/powerpc/boot/dts/pcm030.dts
> +++ b/arch/powerpc/boot/dts/pcm030.dts
> @@ -196,7 +196,6 @@
>  
>   p...@2400 { /* PSC3 in UART mode */
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - cell-index = <2>;
>   reg = <0x2400 0x100>;
>   interrupts = <2 3 0>;
>   };
> @@ -207,7 +206,6 @@
>  
>   p...@2c00 { /* PSC6 in UART mode */
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - cell-index = <5>;
>   reg = <0x2c00 0x100>;
>   interrupts = <2 4 0>;
>   };
> diff --git a/arch/powerpc/boot/dts/pcm032.dts 
> b/arch/powerpc/boot/dts/pcm032.dts
> index 17596c7..e0f2702 100644
> --- a/arch/powerpc/boot/dts/pcm032.dts
> +++ b/arch/powerpc/boot/dts/pcm032.dts
> @@ -196,7 +196,6 @@
>  
>   p...@2400 { /* PSC3 in UART mode */
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - cell-index = <2>;
>   reg = <0x2400 0x100>;
>   interrupts = <2 3 0>;
>   };
> @@ -207,7 +206,6 @@
>  
>   p...@2c00 { /* PSC6 in UART mode */
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
> - 

Re: [PATCH 2/5] powerpc/5200: dts: rename nodes to prepare for refactoring dts files

2011-01-03 Thread Grant Likely
On Wed, Nov 17, 2010 at 03:28:30PM -0800, John Bonesio wrote:
> This patch renames nodes in dts fils for MPC5200b files to prepare for
> refactoring of these files later. When refactoring it will be easier to verify
> the results if the node names aren't changing at the same time.
> 
> Signed-off-by: John Bonesio 

Applied, thanks.

g.

> ---
> 
>  arch/powerpc/boot/dts/cm5200.dts|8 
>  arch/powerpc/boot/dts/digsy_mtc.dts |6 +++---
>  arch/powerpc/boot/dts/lite5200b.dts |2 +-
>  arch/powerpc/boot/dts/media5200.dts |2 +-
>  arch/powerpc/boot/dts/motionpro.dts |   10 +-
>  arch/powerpc/boot/dts/mucmc52.dts   |6 +++---
>  arch/powerpc/boot/dts/pcm030.dts|6 +++---
>  arch/powerpc/boot/dts/pcm032.dts|6 +++---
>  arch/powerpc/boot/dts/uc101.dts |6 +++---
>  9 files changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/cm5200.dts 
> b/arch/powerpc/boot/dts/cm5200.dts
> index dd38608..9369dcd 100644
> --- a/arch/powerpc/boot/dts/cm5200.dts
> +++ b/arch/powerpc/boot/dts/cm5200.dts
> @@ -160,25 +160,25 @@
>   reg = <0x1f00 0x100>;
>   };
>  
> - ser...@2000 {   // PSC1
> + p...@2000 { // PSC1
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   reg = <0x2000 0x100>;
>   interrupts = <2 1 0>;
>   };
>  
> - ser...@2200 {   // PSC2
> + p...@2200 { // PSC2
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   reg = <0x2200 0x100>;
>   interrupts = <2 2 0>;
>   };
>  
> - ser...@2400 {   // PSC3
> + p...@2400 { // PSC3
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   reg = <0x2400 0x100>;
>   interrupts = <2 3 0>;
>   };
>  
> - ser...@2c00 {   // PSC6
> + p...@2c00 { // PSC6
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   reg = <0x2c00 0x100>;
>   interrupts = <2 4 0>;
> diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts 
> b/arch/powerpc/boot/dts/digsy_mtc.dts
> index 8e9be6b..f0592de 100644
> --- a/arch/powerpc/boot/dts/digsy_mtc.dts
> +++ b/arch/powerpc/boot/dts/digsy_mtc.dts
> @@ -155,13 +155,13 @@
>   reg = <0x1f00 0x100>;
>   };
>  
> - ser...@2600 {   // PSC4
> + p...@2600 { // PSC4
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   reg = <0x2600 0x100>;
>   interrupts = <2 11 0>;
>   };
>  
> - ser...@2800 {   // PSC5
> + p...@2800 { // PSC5
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   reg = <0x2800 0x100>;
>   interrupts = <2 12 0>;
> @@ -217,7 +217,7 @@
>   };
>   };
>  
> - lpb {
> + localbus {
>   compatible = "fsl,mpc5200b-lpb","simple-bus";
>   #address-cells = <2>;
>   #size-cells = <1>;
> diff --git a/arch/powerpc/boot/dts/lite5200b.dts 
> b/arch/powerpc/boot/dts/lite5200b.dts
> index 59702ac..a74b790 100644
> --- a/arch/powerpc/boot/dts/lite5200b.dts
> +++ b/arch/powerpc/boot/dts/lite5200b.dts
> @@ -172,7 +172,7 @@
>   reg = <0x1f00 0x100>;
>   };
>  
> - ser...@2000 {   // PSC1
> + p...@2000 { // PSC1
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   cell-index = <0>;
>   reg = <0x2000 0x100>;
> diff --git a/arch/powerpc/boot/dts/media5200.dts 
> b/arch/powerpc/boot/dts/media5200.dts
> index 0c3902b..a70ef68 100644
> --- a/arch/powerpc/boot/dts/media5200.dts
> +++ b/arch/powerpc/boot/dts/media5200.dts
> @@ -183,7 +183,7 @@
>   };
>  
>   // PSC6 in uart mode
> - console: ser...@2c00 {  // PSC6
> + console: p...@2c00 {// PSC6
>   compatible = 
> "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
>   cell-index = <5>;
>   port-number = <0>;  // Logical port assignment
> diff --git a/arch/powerpc/boot/dts/motionpro.dts 
> b/arch/powerpc/boot/dts/motionpro.dts
> index 6ca4fc1..f6261ea 100644
> --- a/arch/powerpc/boot/dts/motionpro.dts
> +++ b/arch/powerpc/boot/dts/motionpro.dts
> @@ -100,7 +100,7 @@
>   interrupts = <1 14 0>;
>   };
>  
> - motionpro-...@660 { // Motion-PRO status 

[git pull] powerpc changes for 2.6.38

2011-01-03 Thread Grant Likely
Hi Ben,

Here are some of the powerpc patched I've picked up for .38.

g.

The following changes since commit b518a64983cbf2ff31aed530898de2d80e4573d5:

  hwmon: (s3c-hwmon) Fix compilation (2011-01-02 15:31:11 -0800)

are available in the git repository at:
  git://git.secretlab.ca/git/linux-2.6 next

Anatolij Gustschin (1):
  powerpc/5xxx: extend mpc8xxx_gpio driver to support mpc512x gpios

Grant Likely (1):
  Merge v2.6.37-rc8 into powerpc/next

Ilya Yanok (6):
  powerpc/512x: scatter/gather dma fix
  powerpc/512x: fix the hanged dma transfer issue
  powerpc/512x: add MPC8308 dma support
  powerpc/512x: try to free dma descriptors in case of allocation failure
  powerpc/83xx: add DMA controller to mpc8308 device-tree node
  powerpc/83xx: add mpc8308_p1m DMA controller device-tree node

 arch/powerpc/boot/dts/mpc8308_p1m.dts |8 ++
 arch/powerpc/boot/dts/mpc8308rdb.dts  |8 ++
 arch/powerpc/platforms/Kconfig|7 +-
 arch/powerpc/sysdev/mpc8xxx_gpio.c|   75 --
 drivers/dma/Kconfig   |2 +-
 drivers/dma/mpc512x_dma.c |  187 +
 6 files changed, 210 insertions(+), 77 deletions(-)


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] of/device: Don't register disabled devices

2011-01-03 Thread Grant Likely
Device nodes with the property status="disabled" are not usable and so
don't register them when parsing the device tree for devices.

Signed-off-by: Grant Likely 
Cc: Hollis Blanchard 
Cc: Deepak Saxena 
Cc: Scott Wood ,
Cc: David Gibson 
Cc: Benjamin Herrenschmidt 
---
 drivers/of/platform.c |   22 ++
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 5b4a07f..c01cd1a 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -633,6 +633,9 @@ EXPORT_SYMBOL(of_device_alloc);
  * @np: pointer to node to create device for
  * @bus_id: name to assign device
  * @parent: Linux device model parent device.
+ *
+ * Returns pointer to created platform device, or NULL if a device was not
+ * registered.  Unavailable devices will not get registered.
  */
 struct platform_device *of_platform_device_create(struct device_node *np,
const char *bus_id,
@@ -640,6 +643,9 @@ struct platform_device *of_platform_device_create(struct 
device_node *np,
 {
struct platform_device *dev;
 
+   if (!of_device_is_available(np))
+   return NULL;
+
dev = of_device_alloc(np, bus_id, parent);
if (!dev)
return NULL;
@@ -683,8 +689,9 @@ static int of_platform_bus_create(const struct device_node 
*bus,
pr_debug("   create child: %s\n", child->full_name);
dev = of_platform_device_create(child, NULL, parent);
if (dev == NULL)
-   rc = -ENOMEM;
-   else if (!of_match_node(matches, child))
+   continue;
+
+   if (!of_match_node(matches, child))
continue;
if (rc == 0) {
pr_debug("   and sub busses\n");
@@ -733,10 +740,9 @@ int of_platform_bus_probe(struct device_node *root,
if (of_match_node(matches, root)) {
pr_debug(" root match, create all sub devices\n");
dev = of_platform_device_create(root, NULL, parent);
-   if (dev == NULL) {
-   rc = -ENOMEM;
+   if (dev == NULL)
goto bail;
-   }
+
pr_debug(" create all sub busses\n");
rc = of_platform_bus_create(root, matches, &dev->dev);
goto bail;
@@ -748,9 +754,9 @@ int of_platform_bus_probe(struct device_node *root,
pr_debug("  match: %s\n", child->full_name);
dev = of_platform_device_create(child, NULL, parent);
if (dev == NULL)
-   rc = -ENOMEM;
-   else
-   rc = of_platform_bus_create(child, matches, &dev->dev);
+   continue;
+
+   rc = of_platform_bus_create(child, matches, &dev->dev);
if (rc) {
of_node_put(child);
break;

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: problem backporting talitos for MPC8272

2011-01-03 Thread Scott Wood
On Wed, 29 Dec 2010 02:10:55 +0100
Alexandru Ionut Grama  wrote:

> My final question it's about of-tree. I have the mpc8272ads.dts file with a
> tree that involves talitos, but I've changed the properties acording the new
> version of it on 2.6.35. ¿This file (mpc8272ads.dts) when it's used?I think
> I don't use this file for nothing (it doesn't appears on make V=1) because I
> don't have a normal bootloader and I have to load the kernel like a
> flat-binary gz, so there's no more step after building System.map.

IIRC, in 2.6.21, it wasn't used on 82xx (I think there was only
arch/ppc support for 82xx, or at best 82xx arch/powerpc support was
just getting started).  2.6.21 is very old, and doing new development on
it is not recommended.

Why not work with the current kernel?

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] powerpc/405: Fix missing #{address,size}-cells in i2c node

2011-01-03 Thread Grant Likely
Signed-off-by: Grant Likely 
---

I'm putting this patch into my next-devicetree branch.

g.

 arch/powerpc/boot/dts/hotfoot.dts |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/hotfoot.dts 
b/arch/powerpc/boot/dts/hotfoot.dts
index cad9c38..71d3bb4 100644
--- a/arch/powerpc/boot/dts/hotfoot.dts
+++ b/arch/powerpc/boot/dts/hotfoot.dts
@@ -117,6 +117,8 @@
};
 
IIC: i...@ef600500 {
+   #address-cells = <1>;
+   #size-cells = <0>;
compatible = "ibm,iic-405ep", "ibm,iic";
reg = <0xef600500 0x0011>;
interrupt-parent = <&UIC0>;

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] powerpc/dts: fix syntax bugs in bluestone.dts

2011-01-03 Thread Grant Likely
Signed-off-by: Grant Likely 
---

I'm picking this one up immediately into my next-devicetree branch

g.

 arch/powerpc/boot/dts/bluestone.dts |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/boot/dts/bluestone.dts 
b/arch/powerpc/boot/dts/bluestone.dts
index 9bb3d72..2a56a0d 100644
--- a/arch/powerpc/boot/dts/bluestone.dts
+++ b/arch/powerpc/boot/dts/bluestone.dts
@@ -33,7 +33,7 @@
aliases {
ethernet0 = &EMAC0;
serial0 = &UART0;
-   serial1 = &UART1;
+   //serial1 = &UART1; --gcl missing UART1 label
};
 
cpus {
@@ -52,7 +52,7 @@
d-cache-size = <32768>;
dcr-controller;
dcr-access-method = "native";
-   next-level-cache = <&L2C0>;
+   //next-level-cache = <&L2C0>; --gcl missing L2C0 label
};
};
 
@@ -142,7 +142,7 @@
/*RXEOB*/ 0x7 0x4
/*SERR*/  0x3 0x4
/*TXDE*/  0x4 0x4
-   /*RXDE*/  0x5 0x4
+   /*RXDE*/  0x5 0x4>;
};
 
POB0: opb {
@@ -182,7 +182,7 @@
reg = <0x001a 0x0006>;
};
};
-   }
+   };
 
UART0: ser...@ef600300 {
device_type = "serial";

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [RFC] MPIC Bindings and Bindings for AMP Systems

2011-01-03 Thread Scott Wood
On Wed, 22 Dec 2010 23:58:09 -0600
Meador Inge  wrote:

> NOTE: The 'interrupt-parent' is implicit since message register nodes
> are always children of interrupt controller nodes.
> 
> ** Example:
> 
>   mpic: p...@4 {
>   interrupt-controller;
>   #address-cells = <0>;
>   #interrupt-cells = <2>;
>   reg = <0x4 0x4>;
>   compatible = "chrp,open-pic";
>   device_type = "open-pic";
>   protected-sources = <0xb1>;
> 
>   m...@1400 {
>   compatible = "fsl,p2020-msgr", "fsl,mpic-msgr";
>   reg = <0x1400 0x200>;
>   cell-index = <0>;
>   interrupts = <0xb0 0x2 0xb1 0x2
>0xb2 0x2 0xb3 0x2>;
>   };
> 
>   m...@2400 {
>   compatible = "fsl,p2020-msgr", "fsl,mpic-msgr";
>   reg = <0x2400 0x200>;
>   cell-index = <1>;
>   interrupts = <0xb4 0x2 0xb5 0x2
>0xb6 0x2 0xb7 0x2>;
>}; 
>   };

These nodes cannot go under the mpic node, because interrupt
controllers need #address-cells = <0>.

It would be nice if the binding provided some way of partitioning
up individual message interrupts within a block.

Interrupt generation could be exported as a "service", similar to
(inbound) interrupts and gpios.

Perhaps a something like this, with "doorbell" being a new standard
hw-independent service with its own binding:

msg1: mpic-...@1400 {
compatible = "fsl,mpic-v3.0-msg";
reg = <0x1400 0x200>;
interrupts <176 2 178 2>;

// We have message registers 0 and 2 for sending,
// and 1 and 3 for receiving.
// If absent, we own all message registers in this block.
fsl,mpic-msg-send-mask = <0x5>;
fsl,mpic-msg-receive-mask = <0xa>;

doorbell-controller;

// split into #doorbell-send-cells and #doorbell-receive-cells?
#doorbell-cells = <1>;
};

some-amp-protocol-thingy {
send-doorbells = <&msg1 0>; // generate messages on MSGR0
receive-doorbells = <&msg1 0>; // receive messages on MSGR1
};

some-other-amp-protocol-thingy {
send-doorbells = <&msg1 1>; // generate messages on MSGR2
receive-doorbells = <&msg1 1>; // receive messages on MSGR3
};

Doorbell capabilities such as passing a 32-bit message can be negotiated
between the drivers for the doorbell controller and the doorbell client.

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [RFC] MPIC Bindings and Bindings for AMP Systems

2011-01-03 Thread Scott Wood
On Thu, 23 Dec 2010 15:33:25 -0700
Grant Likely  wrote:

> On Thu, Dec 23, 2010 at 03:49:54PM -0600, Meador Inge wrote:
> > How do you
> > see this working in terms of processing the data?  It seems like we
> > are going to have to be aware of N values instead of 1, which seems
> > worse.
> 
> This argument has been rehashed many times, but it basically comes
> down to compatible values should ideally be anchored to a real
> implemented device, not to a family of devices, or to an unversioned
> specification.

Freescale MPICs do have version numbers (version registers, even).  We
should put that version (possibly along with a compatible version) in
the compatible, though, for blocks such as this which don't include the
main MPIC registers and thus the version registers.

> In practise, the implementation doesn't actually look any different
> except that the 'reference' version specifies a specific
> implementation instead of a generic name.  To use a concrete example,
> if there are two parts using this MPIC, like the freescale p2040 and
> p4080, and say for argument that the p2040 was implemented first, then
> the compatible values would look like:
> 
> for the p2040:   compatible = "fsl,p2040-msgr";
> for the p4080:   compatible = "fsl,p4080-msgr", "fsl,p2040-msgr";

While I don't think it affected the message unit, p4080 rev 1 has a
different version of the MPIC from p4080 rev 2 (4.0 versus 4.1, IIRC).

I don't think "mpic-" should be dropped, whether a specific chip is
added or not.  "msgr" just seems too generic, and "mpic-" tells the
reader where in the chip manual they can find information about it.

> > >?  This needs some more explanation.  cell-index often gets abused as
> > >a way to enumerate devices.  Typically, the address of the device
> > >itself is sufficient to identify the device.
> > 
> > The message registers typically come in blocks of four memory mapped
> > registers and may not be in contiguous memory (example [3]).  The
> > intent of 'cell-index' is to put an ordering on the blocks (so, yes,
> > enumeration).  We could order them by address as well I suppose.
> > One less property to worry about :)

But why do we care about ordering them?  What's important is just that
you use the same one on both the sending partition and the receiving
partition.

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread Sergei Shtylyov

Hello.

On 03-01-2011 18:27, Sergei Shtylyov wrote:


The commit you bisected to contains all those conversions too. Take a
look at a similar driver and look at how it has been converted
recently. Even better, just send the driver upstream. :-)



It's already there...



Ouch, did I forget to convert



It probably wasn't obvious as this driver had lived in non-BMDMA section of
Kconfig before the recent patch:



http://marc.info/?l=linux-ide&m=129303304605907



it or was it a merge timing problem?
Anyways, sorry about that. Please go ahead and fix it. :-)


   Looks like the commit that added DMA support should be thanked for the 
mischief:


http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6b61e69e7bc1cfe80ab54c6321f19061f9487ed3

WBR, Sergei
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] Make auto-loading of therm_pm72 possible

2011-01-03 Thread Marc Zyngier
The therm_pm72 driver, used on the PowerMac G5 range, cannot be
auto-loaded, since the driver itself creates both the device node
and the driver instance.

Moving the device node creation to the platform setup code and
adding the necessary MODULE_DEVICE_TABLE() information allows the
driver to be automatically loaded by udev on any semi-modern
distribution.

It "fixes" a major source of problem on G5 machines where the
driver wasn't explicitely loaded by default, and the system
would automatically shutdown under load.

Tested on an Xserve G5.

Signed-off-by: Marc Zyngier 
Cc: Benjamin Herrenschmidt 
---
 arch/powerpc/platforms/powermac/setup.c |9 +
 drivers/macintosh/therm_pm72.c  |   30 +-
 2 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/setup.c 
b/arch/powerpc/platforms/powermac/setup.c
index 9deb274..d5aceb7 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -506,6 +506,15 @@ static int __init pmac_declare_of_platform_devices(void)
of_platform_device_create(np, "smu", NULL);
of_node_put(np);
}
+   np = of_find_node_by_type(NULL, "fcu");
+   if (np == NULL) {
+   /* Some machines have strangely broken device-tree */
+   np = 
of_find_node_by_path("/u...@0,f800/i...@f8001000/f...@15e");
+   }
+   if (np) {
+   of_platform_device_create(np, "temperature", NULL);
+   of_node_put(np);
+   }
 
return 0;
 }
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 4454927..2e041fd 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -2213,6 +2213,9 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
 static int fcu_of_probe(struct platform_device* dev, const struct of_device_id 
*match)
 {
state = state_detached;
+   of_dev = dev;
+
+   dev_info(&dev->dev, "PowerMac G5 Thermal control driver %s\n", VERSION);
 
/* Lookup the fans in the device tree */
fcu_lookup_fans(dev->dev.of_node);
@@ -2235,6 +2238,7 @@ static const struct of_device_id fcu_match[] =
},
{},
 };
+MODULE_DEVICE_TABLE(of, fcu_match);
 
 static struct of_platform_driver fcu_of_platform_driver = 
 {
@@ -2252,8 +2256,6 @@ static struct of_platform_driver fcu_of_platform_driver =
  */
 static int __init therm_pm72_init(void)
 {
-   struct device_node *np;
-
rackmac = of_machine_is_compatible("RackMac3,1");
 
if (!of_machine_is_compatible("PowerMac7,2") &&
@@ -2261,34 +2263,12 @@ static int __init therm_pm72_init(void)
!rackmac)
return -ENODEV;
 
-   printk(KERN_INFO "PowerMac G5 Thermal control driver %s\n", VERSION);
-
-   np = of_find_node_by_type(NULL, "fcu");
-   if (np == NULL) {
-   /* Some machines have strangely broken device-tree */
-   np = 
of_find_node_by_path("/u...@0,f800/i...@f8001000/f...@15e");
-   if (np == NULL) {
-   printk(KERN_ERR "Can't find FCU in device-tree 
!\n");
-   return -ENODEV;
-   }
-   }
-   of_dev = of_platform_device_create(np, "temperature", NULL);
-   if (of_dev == NULL) {
-   printk(KERN_ERR "Can't register FCU platform device !\n");
-   return -ENODEV;
-   }
-
-   of_register_platform_driver(&fcu_of_platform_driver);
-   
-   return 0;
+   return of_register_platform_driver(&fcu_of_platform_driver);
 }
 
 static void __exit therm_pm72_exit(void)
 {
of_unregister_platform_driver(&fcu_of_platform_driver);
-
-   if (of_dev)
-   of_device_unregister(of_dev);
 }
 
 module_init(therm_pm72_init);
-- 
1.7.2.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread Sergei Shtylyov

Hello.

On 03-01-2011 17:33, Tejun Heo wrote:


The commit you bisected to contains all those conversions too.  Take a
look at a similar driver and look at how it has been converted
recently.  Even better, just send the driver upstream.  :-)



   It's already there...



Ouch, did I forget to convert


   It probably wasn't obvious as this driver had lived in non-BMDMA section 
of Kconfig before the recent patch:


http://marc.info/?l=linux-ide&m=129303304605907


it or was it a merge timing problem?
Anyways, sorry about that.  Please go ahead and fix it. :-)


WBR, Sergei
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/5]arch:powerpc:platforms:85xx:mpc85xx_mds.c Typo change singal to signal

2011-01-03 Thread Jiri Kosina
On Thu, 30 Dec 2010, Justin P. Mattock wrote:

> The patches below fixes a typo "singal" to "signal". Please let me 
> know if anything needs to be changed.
> 
> Signed-off-by: Justin P. Mattock 
> 
> ---
>  arch/powerpc/platforms/85xx/mpc85xx_mds.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c 
> b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> index aa34cac..747d1ee 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> @@ -309,7 +309,7 @@ static void __init mpc85xx_mds_qe_init(void)
>   /* P1021 has pins muxed for QE and other functions. To
>* enable QE UEC mode, we need to set bit QE0 for UCC1
>* in Eth mode, QE0 and QE3 for UCC5 in Eth mode, QE9
> -  * and QE12 for QE MII management singals in PMUXCR
> +  * and QE12 for QE MII management signals in PMUXCR
>* register.
>*/

Applied.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread Roman Fietze
Hallo Tejun,

On Monday, 03.January.2011 14:59:29 Tejun Heo wrote:

> Which driver is it?

drivers/ata/pata_mpc52xx.c from the standard tree, 100% unchanged. As
I said, for the bisect I was using the original, unchanged
torvalds/master tree from git.kernel.org.

> You probably now want to use ata_bmdma_qc_issue() ...

I'm sorry, but if I would know about the details, and would know more
about ATA I would have tried to patch pata_mpc52xx.c by myself.

>  Even better, just send the driver upstream.

It has been there for a long while. You even patched it last summer.


Roman

-- 
Roman Fietze  Telemotive AG Buero Muehlhausen
Breitwiesen 73347 Muehlhausen
Tel.: +49(0)7335/18493-45http://www.telemotive.de
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread Tejun Heo
On Mon, Jan 3, 2011 at 3:29 PM, Sergei Shtylyov  wrote:
>> The commit you bisected to contains all those conversions too.  Take a
>> look at a similar driver and look at how it has been converted
>> recently.  Even better, just send the driver upstream.  :-)
>
>   It's already there...

Ouch, did I forget to convert it or was it a merge timing problem?
Anyways, sorry about that.  Please go ahead and fix it. :-)

-- 
tejun
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread Sergei Shtylyov

Hello.

On 03-01-2011 16:59, Tejun Heo wrote:


When merging more recent kernel versions, tried that using v2.6.35 and
v2.6.36, into our tree (branched at v2.6.34), I detected, that MWDMA2
on the HW listed in the subject does no longer work.



So I bisected that using the original, standard kernel tree using a
minimum config using



git bisect start v2.6.35 v2.6.34



The final result is:



360ff7833098e944e5003618b03894251e937802 is the first bad commit
commit 360ff7833098e944e5003618b03894251e937802
Author: Tejun Heo
Date:   Mon May 10 21:41:42 2010 +0200



 libata-sff: separate out BMDMA qc_issue



...




I double checked the failure with the latest torvalds/master as well
(b518a64983cbf2ff31), still the same issue.



The HW is an own board very close to the original Freescale
Lite5200/Lite5200B. The relevant part of the device tree source file
contains "mwdma-mode =<2>;" inside the ata section.



In the bad case the log always shows (the exact drive or drive type
doesn't matter, double checked):



[1.553501] ata1.00: ATA-5: HEJ423020F9AT00, 00MJA0A0, max UDMA/100
[1.560003] ata1.00: 39070080 sectors, multi 0: LBA
[1.581418] ata1.00: configured for MWDMA2
[1.586644] scsi 0:0:0:0: Direct-Access ATA  HEJ423020F9AT00  00MJ 
PQ: 0 ANSI: 5
[1.597831] sd 0:0:0:0: [sda] 39070080 512-byte logical blocks: (20.0 
GB/18.6 GiB)
[1.606876] sd 0:0:0:0: [sda] Write Protect is off
[1.611907] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[1.617627] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[1.629423]  sda:
[1.631702] [ cut here ]
[1.636613] Badness at 
/home/fietze/src/linux-2.6-telemotive/drivers/ata/libata-sff.c:1466
[1.645047] NIP: c01ae650 LR: c01ae624 CTR: c01accbc
[1.650115] REGS: c7955b30 TRAP: 0700   Not tainted  (2.6.34-rc7-obelix)
[1.656948] MSR: 00021032   CR: 24008084  XER: 
[1.663452] TASK = c78f2490[784] 'async/0' THREAD: c7954000
[1.668957] GPR00: 0001 c7955be0 c78f2490 0050 c904aa78 0001 
 
[1.677497] GPR08:  c034ee50   44008082 1001a7f0 
c7955f68 07fb2938
[1.686037] GPR16: c78a8000 07fb2914 07f3f64c c034 c031ed00 c78a8000 
 c0010adc
[1.694577] GPR24: c7842820 0002 c7949428 c7948000 0003  
c7948000 c794809c
[1.703321] NIP [c01ae650] ata_sff_qc_issue+0x74/0x248
[1.708564] LR [c01ae624] ata_sff_qc_issue+0x48/0x248
[1.713712] Call Trace:
[1.716211] [c7955be0] [c01ae624] ata_sff_qc_issue+0x48/0x248 (unreliable)



Which driver is it?


   It's 'pata_mpc52xx' I think.


You probably now want to use ata_bmdma_qc_issue()
instead of ata_sff_qc_issue() (or inherit from ata_bmdma_port_ops
instead of ata_sff_port_ops) as sff doesn't deal with BMDMA anymore.


   Indeed, the driver inherits from 'ata_sff_port_ops'...


The commit you bisected to contains all those conversions too.  Take a
look at a similar driver and look at how it has been converted
recently.  Even better, just send the driver upstream.  :-)


   It's already there...


Good luck.


WBR, Sergei
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread acrux
hi,

my MPC5200B (Genesi EFIKA PowerPC) works fine with linux-2.6.36.2 and these two 
patches:
http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-December/087632.html
http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-December/087633.html


i hope this helps,
cheers
--acrux

-- 
GNU/Linux on Power Architecture
CRUX PPC - http://cruxppc.org/
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread Tejun Heo
On Mon, Jan 03, 2011 at 02:45:47PM +0100, Roman Fietze wrote:
> Hello,
> 
> When merging more recent kernel versions, tried that using v2.6.35 and
> v2.6.36, into our tree (branched at v2.6.34), I detected, that MWDMA2
> on the HW listed in the subject does no longer work.
> 
> So I bisected that using the original, standard kernel tree using a
> minimum config using
> 
>git bisect start v2.6.35 v2.6.34
> 
> The final result is:
> 
> 360ff7833098e944e5003618b03894251e937802 is the first bad commit
> commit 360ff7833098e944e5003618b03894251e937802
> Author: Tejun Heo 
> Date:   Mon May 10 21:41:42 2010 +0200
> 
> libata-sff: separate out BMDMA qc_issue
> 
> ...
> 
> 
> I double checked the failure with the latest torvalds/master as well
> (b518a64983cbf2ff31), still the same issue.
> 
> The HW is an own board very close to the original Freescale
> Lite5200/Lite5200B. The relevant part of the device tree source file
> contains "mwdma-mode = <2>;" inside the ata section.
> 
> In the bad case the log always shows (the exact drive or drive type
> doesn't matter, double checked):
> 
> [1.553501] ata1.00: ATA-5: HEJ423020F9AT00, 00MJA0A0, max UDMA/100
> [1.560003] ata1.00: 39070080 sectors, multi 0: LBA 
> [1.581418] ata1.00: configured for MWDMA2
> [1.586644] scsi 0:0:0:0: Direct-Access ATA  HEJ423020F9AT00  00MJ 
> PQ: 0 ANSI: 5
> [1.597831] sd 0:0:0:0: [sda] 39070080 512-byte logical blocks: (20.0 
> GB/18.6 GiB)
> [1.606876] sd 0:0:0:0: [sda] Write Protect is off
> [1.611907] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
> [1.617627] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
> doesn't support DPO or FUA
> [1.629423]  sda:
> [1.631702] [ cut here ]
> [1.636613] Badness at 
> /home/fietze/src/linux-2.6-telemotive/drivers/ata/libata-sff.c:1466
> [1.645047] NIP: c01ae650 LR: c01ae624 CTR: c01accbc
> [1.650115] REGS: c7955b30 TRAP: 0700   Not tainted  (2.6.34-rc7-obelix)
> [1.656948] MSR: 00021032   CR: 24008084  XER: 
> [1.663452] TASK = c78f2490[784] 'async/0' THREAD: c7954000
> [1.668957] GPR00: 0001 c7955be0 c78f2490 0050 c904aa78 0001 
>   
> [1.677497] GPR08:  c034ee50   44008082 1001a7f0 
> c7955f68 07fb2938 
> [1.686037] GPR16: c78a8000 07fb2914 07f3f64c c034 c031ed00 c78a8000 
>  c0010adc 
> [1.694577] GPR24: c7842820 0002 c7949428 c7948000 0003  
> c7948000 c794809c 
> [1.703321] NIP [c01ae650] ata_sff_qc_issue+0x74/0x248
> [1.708564] LR [c01ae624] ata_sff_qc_issue+0x48/0x248
> [1.713712] Call Trace:
> [1.716211] [c7955be0] [c01ae624] ata_sff_qc_issue+0x48/0x248 (unreliable)

Which driver is it?  You probably now want to use ata_bmdma_qc_issue()
instead of ata_sff_qc_issue() (or inherit from ata_bmdma_port_ops
instead of ata_sff_port_ops) as sff doesn't deal with BMDMA anymore.
The commit you bisected to contains all those conversions too.  Take a
look at a similar driver and look at how it has been converted
recently.  Even better, just send the driver upstream.  :-)

Good luck.

-- 
tejun
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


PowerPC MPC5200B ATA MWDMA regression

2011-01-03 Thread Roman Fietze
Hello,

When merging more recent kernel versions, tried that using v2.6.35 and
v2.6.36, into our tree (branched at v2.6.34), I detected, that MWDMA2
on the HW listed in the subject does no longer work.

So I bisected that using the original, standard kernel tree using a
minimum config using

   git bisect start v2.6.35 v2.6.34

The final result is:

360ff7833098e944e5003618b03894251e937802 is the first bad commit
commit 360ff7833098e944e5003618b03894251e937802
Author: Tejun Heo 
Date:   Mon May 10 21:41:42 2010 +0200

libata-sff: separate out BMDMA qc_issue

...


I double checked the failure with the latest torvalds/master as well
(b518a64983cbf2ff31), still the same issue.

The HW is an own board very close to the original Freescale
Lite5200/Lite5200B. The relevant part of the device tree source file
contains "mwdma-mode = <2>;" inside the ata section.

In the bad case the log always shows (the exact drive or drive type
doesn't matter, double checked):

[1.553501] ata1.00: ATA-5: HEJ423020F9AT00, 00MJA0A0, max UDMA/100
[1.560003] ata1.00: 39070080 sectors, multi 0: LBA 
[1.581418] ata1.00: configured for MWDMA2
[1.586644] scsi 0:0:0:0: Direct-Access ATA  HEJ423020F9AT00  00MJ 
PQ: 0 ANSI: 5
[1.597831] sd 0:0:0:0: [sda] 39070080 512-byte logical blocks: (20.0 
GB/18.6 GiB)
[1.606876] sd 0:0:0:0: [sda] Write Protect is off
[1.611907] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[1.617627] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[1.629423]  sda:
[1.631702] [ cut here ]
[1.636613] Badness at 
/home/fietze/src/linux-2.6-telemotive/drivers/ata/libata-sff.c:1466
[1.645047] NIP: c01ae650 LR: c01ae624 CTR: c01accbc
[1.650115] REGS: c7955b30 TRAP: 0700   Not tainted  (2.6.34-rc7-obelix)
[1.656948] MSR: 00021032   CR: 24008084  XER: 
[1.663452] TASK = c78f2490[784] 'async/0' THREAD: c7954000
[1.668957] GPR00: 0001 c7955be0 c78f2490 0050 c904aa78 0001 
  
[1.677497] GPR08:  c034ee50   44008082 1001a7f0 
c7955f68 07fb2938 
[1.686037] GPR16: c78a8000 07fb2914 07f3f64c c034 c031ed00 c78a8000 
 c0010adc 
[1.694577] GPR24: c7842820 0002 c7949428 c7948000 0003  
c7948000 c794809c 
[1.703321] NIP [c01ae650] ata_sff_qc_issue+0x74/0x248
[1.708564] LR [c01ae624] ata_sff_qc_issue+0x48/0x248
[1.713712] Call Trace:
[1.716211] [c7955be0] [c01ae624] ata_sff_qc_issue+0x48/0x248 (unreliable)
[1.723243] [c7955c00] [c019dd10] ata_qc_issue+0x1ac/0x31c
[1.728850] [c7955c30] [c01a3540] ata_scsi_translate+0x104/0x1b0
[1.734987] [c7955c50] [c018a8e0] scsi_dispatch_cmd+0xf4/0x208
[1.740952] [c7955c70] [c01912bc] scsi_request_fn+0x268/0x404
[1.746827] [c7955ca0] [c013bc84] __generic_unplug_device+0x48/0x5c
[1.753227] [c7955cb0] [c013c518] generic_unplug_device+0x28/0x44
[1.759449] [c7955cc0] [c0139c08] blk_unplug+0x20/0x30
[1.764697] [c7955cd0] [c00ad148] block_sync_page+0x50/0x6c
[1.770403] [c7955ce0] [c005a6b8] sync_page+0x4c/0x70
[1.775577] [c7955cf0] [c0252f24] __wait_on_bit_lock+0x94/0x124
[1.781623] [c7955d10] [c005a638] __lock_page+0x50/0x60
[1.786961] [c7955d40] [c005addc] do_read_cache_page+0x18c/0x190
[1.793093] [c7955d70] [c005ae38] read_cache_page+0x14/0x28
[1.798793] [c7955d80] [c00d2a44] read_dev_sector+0x40/0xb0
[1.804488] [c7955da0] [c00d36fc] msdos_partition+0x58/0x888
[1.810270] [c7955e20] [c00d33e8] rescan_partitions+0x18c/0x430
[1.816326] [c7955e80] [c00b51d8] __blkdev_get+0x1a0/0x368
[1.821929] [c7955ec0] [c00d31ec] register_disk+0x140/0x158
[1.827620] [c7955ef0] [c0143024] add_disk+0xe4/0x144
[1.832784] [c7955f20] [c0198aa8] sd_probe_async+0xd4/0x1d8
[1.838478] [c7955f40] [c00429f4] async_thread+0x120/0x2a8
[1.844079] [c7955fc0] [c003af90] kthread+0x78/0x7c
[1.849076] [c7955ff0] [c0010fd4] kernel_thread+0x4c/0x68
[1.854581] Instruction dump:
[1.857606] 4bffe96d 8b9f0014 2f9c0002 419e00e8 2b9c0002 419d0040 2f9c0001 
419e0158 
[1.865525] 3d20c035 3929ee50 89690006 6961 <0f00> 2f8b 38600040 
419e01bc 
[1.873859] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[1.880541] ata1.00: failed command: READ DMA
[1.885101] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 
in
[1.885116]  res 50/00:00:7f:29:54/00:00:00:00:00/a0 Emask 0x40 
(internal error)
[1.900812] ata1.00: status: { DRDY }
[1.921430] ata1.00: configured for MWDMA2
[1.925775] ata1: EH complete
[1.929052] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[1.935739] ata1.00: failed command: READ DMA
[1.940301] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 
in
[1.940316]  res 50/00:00:7f:29:54/00:00:00:00:00/a0 Emask 0x40 
(internal error)
[1.956013] ata1.00: status: { DRDY }
[1.9

[PATCH 02/32] powerpc/cell: use system_wq in cpufreq_spudemand

2011-01-03 Thread Tejun Heo
With cmwq, there's no reason to use a separate workqueue in
cpufreq_spudemand.  Use system_wq instead.  The work items are already
sync canceled on stop, so it's already guaranteed that no work is
running when spu_gov_exit() is entered.

Signed-off-by: Tejun Heo 
Cc: Arnd Bergmann 
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Dave Jones 
Cc: cpuf...@vger.kernel.org
---
Only compile tested.  Please feel free to take it into the subsystem
tree or simply ack - I'll route it through the wq tree.

Thanks.

 arch/powerpc/platforms/cell/cpufreq_spudemand.c |   20 +++-
 1 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/platforms/cell/cpufreq_spudemand.c 
b/arch/powerpc/platforms/cell/cpufreq_spudemand.c
index 968c1c0..d809836 100644
--- a/arch/powerpc/platforms/cell/cpufreq_spudemand.c
+++ b/arch/powerpc/platforms/cell/cpufreq_spudemand.c
@@ -39,8 +39,6 @@ struct spu_gov_info_struct {
 };
 static DEFINE_PER_CPU(struct spu_gov_info_struct, spu_gov_info);
 
-static struct workqueue_struct *kspugov_wq;
-
 static int calc_freq(struct spu_gov_info_struct *info)
 {
int cpu;
@@ -71,14 +69,14 @@ static void spu_gov_work(struct work_struct *work)
__cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H);
 
delay = usecs_to_jiffies(info->poll_int);
-   queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, 
delay);
+   schedule_delayed_work_on(info->policy->cpu, &info->work, delay);
 }
 
 static void spu_gov_init_work(struct spu_gov_info_struct *info)
 {
int delay = usecs_to_jiffies(info->poll_int);
INIT_DELAYED_WORK_DEFERRABLE(&info->work, spu_gov_work);
-   queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, 
delay);
+   schedule_delayed_work_on(info->policy->cpu, &info->work, delay);
 }
 
 static void spu_gov_cancel_work(struct spu_gov_info_struct *info)
@@ -152,27 +150,15 @@ static int __init spu_gov_init(void)
 {
int ret;
 
-   kspugov_wq = create_workqueue("kspugov");
-   if (!kspugov_wq) {
-   printk(KERN_ERR "creation of kspugov failed\n");
-   ret = -EFAULT;
-   goto out;
-   }
-
ret = cpufreq_register_governor(&spu_governor);
-   if (ret) {
+   if (ret)
printk(KERN_ERR "registration of governor failed\n");
-   destroy_workqueue(kspugov_wq);
-   goto out;
-   }
-out:
return ret;
 }
 
 static void __exit spu_gov_exit(void)
 {
cpufreq_unregister_governor(&spu_governor);
-   destroy_workqueue(kspugov_wq);
 }
 
 
-- 
1.7.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


PATA_WINBOND lost interrupt - linux-2.6.36.2 - ppc64

2011-01-03 Thread acrux
hi,
there is a problem using new pata drivers with an old IBM Intellistation POWER 
275  (9114-275 pSeries POWER4+).
These boxes are equipped with an IDE dvd-rom drive (PATA_WINBOND driver). 
:00:03.1 IDE interface: Symphony Labs SL82c105 (rev 05)

I can report, instead, that the old ide-cd driver BLK_DEV_SL82C105 (i tested 
the same scenario but with linux-2.6.32.7) works fine. Obviously it happens 
only when boot or try to read from the dvdrom drive.

[...]
ata1: lost interrupt (Status 0x50)
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
sr 1:0:0:0: CDB: Xdread, Read track info: 52 01 00 00 00 01 00 00 20 00
ata1.00: cmd a0/01:00:00:20:00/00:00:00:00:00/a0 tag 0 dma 16416 in
 res 40/00:02:00:08:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for MWDMA2
ata1: EH complete
sr0: CDROM (ioctl) error, command: Xdread, Read track info 52 01 00 00 00 01 00 
00 20 00
sr: Sense Key : Aborted Command [current] [descriptor]
sr: Add. Sense: No additional sense information
ata1: lost interrupt (Status 0x50)
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
sr 1:0:0:0: [sr0] CDB: Xpwrite, Read disk info: 51 00 00 00 00 00 00 00 20 00
ata1.00: cmd a0/01:00:00:20:00/00:00:00:00:00/a0 tag 0 dma 16416 in
 res 40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for MWDMA2
ata1: EH complete
ata1: lost interrupt (Status 0x50)
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
sr 1:0:0:0: CDB: Get configuration: 46 00 00 00 00 00 00 00 20 00
ata1.00: cmd a0/01:00:00:20:00/00:00:00:00:00/a0 tag 0 dma 16416 in
 res 40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for MWDMA2
sr0: CDROM (ioctl) error, command: 
ata1: EH complete
Get configuration 46 00 00 00 00 00 00 00 20 00
sr: Sense Key : Aborted Command [current] [descriptor]
sr: Add. Sense: No additional sense information
ata1: lost interrupt (Status 0x50)
ata1.00: limiting speed to MWDMA1:PIO4
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
sr 1:0:0:0: [sr0] CDB: Xpwrite, Read disk info: 51 00 00 00 00 00 00 00 20 00
ata1.00: cmd a0/01:00:00:20:00/00:00:00:00:00/a0 tag 0 dma 16416 in
 res 40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for MWDMA1
ata1: EH complete
ata1: lost interrupt (Status 0x50)
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
sr 1:0:0:0: CDB: Get configuration: 46 00 00 00 00 00 00 00 20 00
ata1.00: cmd a0/01:00:00:20:00/00:00:00:00:00/a0 tag 0 dma 16416 in
 res 40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for MWDMA1
ata1: EH complete
sr0: CDROM (ioctl) error, command: Get configuration 46 00 00 00 00 00 00 00 20 
00
sr: Sense Key : Aborted Command [current] [descriptor]
sr: Add. Sense: No additional sense information
[...]

Here the full dmesg and kernel config:
http://cruxppc.org/~acrux/linux-2.6.36.2-IntellistationPOWER275.dmesg
http://cruxppc.org/~acrux/linux-2.6.36.2-IntellistationPOWER275.config



thanks,
--acrux
-- 
GNU/Linux on Power Architecture
CRUX PPC - http://cruxppc.org/

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev