Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .

2008-01-30 Thread Kumar Gala


On Jan 31, 2008, at 12:04 AM, Zhang Wei wrote:


All right, I'll give you another patch for 86xx dts file. :)

Btw: Why the PCI and other nodes were moved from SOC? Just for clear?
If they are moved out, their register address must use full address  
not

offset address.


we did this because the feeling was the SOC node just represented the  
IMMR/CCSBAR registers, and not the address space used by the various  
busses.


(this is why pci, rio, and local bus all exist outside of the soc node).

- k
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .

2008-01-30 Thread Zhang Wei
All right, I'll give you another patch for 86xx dts file. :)

 Btw: Why the PCI and other nodes were moved from SOC? Just for clear?
If they are moved out, their register address must use full address not
offset address.

Thanks!
Wei.

> -Original Message-
> From: Kumar Gala [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 30, 2008 10:44 PM
> To: Zhang Wei
> Cc: [EMAIL PROTECTED]; 
> linux-kernel@vger.kernel.org; [EMAIL PROTECTED]
> Subject: Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
> 
> Can you post a device tree update as well.
> 
> The older patches on the list for the 86xx .dts should NOT 
> put the rio  
> node under the soc.  It should be at the same level as PCI.
> 
> - k
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .

2008-01-30 Thread Kumar Gala

Can you post a device tree update as well.

The older patches on the list for the 86xx .dts should NOT put the rio  
node under the soc.  It should be at the same level as PCI.


- k
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .

2008-01-30 Thread Zhang Wei
The driver is also fit for Freescale MPC8641 processor.

Signed-off-by: Zhang Wei <[EMAIL PROTECTED]>
---
 arch/powerpc/sysdev/fsl_rio.c |   80 
 1 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index af2425e..36c4be4 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1,5 +1,5 @@
 /*
- * MPC85xx RapidIO support
+ * Freescale MPC85xx/MPC86xx RapidIO support
  *
  * Copyright 2005 MontaVista Software, Inc.
  * Matt Porter <[EMAIL PROTECTED]>
@@ -145,7 +145,7 @@ static struct rio_msg_rx_ring {
 } msg_rx_ring;
 
 /**
- * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message
+ * fsl_rio_doorbell_send - Send a MPC85xx doorbell message
  * @index: ID of RapidIO interface
  * @destid: Destination ID of target device
  * @data: 16-bit info field of RapidIO doorbell message
@@ -153,9 +153,9 @@ static struct rio_msg_rx_ring {
  * Sends a MPC85xx doorbell message. Returns %0 on success or
  * %-EINVAL on failure.
  */
-static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
+static int fsl_rio_doorbell_send(int index, u16 destid, u16 data)
 {
-   pr_debug("mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n",
+   pr_debug("fsl_doorbell_send: index %d destid %4.4x data %4.4x\n",
 index, destid, data);
out_be32((void *)_atmu_regs->rowtar, destid << 22);
out_be16((void *)(dbell_win), data);
@@ -164,7 +164,7 @@ static int mpc85xx_rio_doorbell_send(int index, u16 destid, 
u16 data)
 }
 
 /**
- * mpc85xx_local_config_read - Generate a MPC85xx local config space read
+ * fsl_local_config_read - Generate a MPC85xx local config space read
  * @index: ID of RapdiIO interface
  * @offset: Offset into configuration space
  * @len: Length (in bytes) of the maintenance transaction
@@ -173,9 +173,9 @@ static int mpc85xx_rio_doorbell_send(int index, u16 destid, 
u16 data)
  * Generates a MPC85xx local configuration space read. Returns %0 on
  * success or %-EINVAL on failure.
  */
-static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * 
data)
+static int fsl_local_config_read(int index, u32 offset, int len, u32 * data)
 {
-   pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index,
+   pr_debug("fsl_local_config_read: index %d offset %8.8x\n", index,
 offset);
*data = in_be32((void *)(regs_win + offset));
 
@@ -183,7 +183,7 @@ static int mpc85xx_local_config_read(int index, u32 offset, 
int len, u32 * data)
 }
 
 /**
- * mpc85xx_local_config_write - Generate a MPC85xx local config space write
+ * fsl_local_config_write - Generate a MPC85xx local config space write
  * @index: ID of RapdiIO interface
  * @offset: Offset into configuration space
  * @len: Length (in bytes) of the maintenance transaction
@@ -192,10 +192,10 @@ static int mpc85xx_local_config_read(int index, u32 
offset, int len, u32 * data)
  * Generates a MPC85xx local configuration space write. Returns %0 on
  * success or %-EINVAL on failure.
  */
-static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
+static int fsl_local_config_write(int index, u32 offset, int len, u32 data)
 {
pr_debug
-   ("mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n",
+   ("fsl_local_config_write: index %d offset %8.8x data %8.8x\n",
 index, offset, data);
out_be32((void *)(regs_win + offset), data);
 
@@ -203,7 +203,7 @@ static int mpc85xx_local_config_write(int index, u32 
offset, int len, u32 data)
 }
 
 /**
- * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction
+ * fsl_rio_config_read - Generate a MPC85xx read maintenance transaction
  * @index: ID of RapdiIO interface
  * @destid: Destination ID of transaction
  * @hopcount: Number of hops to target device
@@ -215,13 +215,13 @@ static int mpc85xx_local_config_write(int index, u32 
offset, int len, u32 data)
  * success or %-EINVAL on failure.
  */
 static int
-mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int 
len,
+fsl_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
u32 * val)
 {
u8 *data;
 
pr_debug
-   ("mpc85xx_rio_config_read: index %d destid %d hopcount %d offset 
%8.8x len %d\n",
+   ("fsl_rio_config_read: index %d destid %d hopcount %d offset %8.8x 
len %d\n",
 index, destid, hopcount, offset, len);
out_be32((void *)_atmu_regs->rowtar,
 (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
@@ -243,7 +243,7 @@ mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, 
u32 offset, int len,
 }
 
 /**
- * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction
+ * fsl_rio_config_write - Generate a MPC85xx write maintenance transaction
  * @index: ID of RapdiIO interface
  * @destid: 

[PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .

2008-01-30 Thread Zhang Wei
The driver is also fit for Freescale MPC8641 processor.

Signed-off-by: Zhang Wei [EMAIL PROTECTED]
---
 arch/powerpc/sysdev/fsl_rio.c |   80 
 1 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index af2425e..36c4be4 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1,5 +1,5 @@
 /*
- * MPC85xx RapidIO support
+ * Freescale MPC85xx/MPC86xx RapidIO support
  *
  * Copyright 2005 MontaVista Software, Inc.
  * Matt Porter [EMAIL PROTECTED]
@@ -145,7 +145,7 @@ static struct rio_msg_rx_ring {
 } msg_rx_ring;
 
 /**
- * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message
+ * fsl_rio_doorbell_send - Send a MPC85xx doorbell message
  * @index: ID of RapidIO interface
  * @destid: Destination ID of target device
  * @data: 16-bit info field of RapidIO doorbell message
@@ -153,9 +153,9 @@ static struct rio_msg_rx_ring {
  * Sends a MPC85xx doorbell message. Returns %0 on success or
  * %-EINVAL on failure.
  */
-static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
+static int fsl_rio_doorbell_send(int index, u16 destid, u16 data)
 {
-   pr_debug(mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n,
+   pr_debug(fsl_doorbell_send: index %d destid %4.4x data %4.4x\n,
 index, destid, data);
out_be32((void *)dbell_atmu_regs-rowtar, destid  22);
out_be16((void *)(dbell_win), data);
@@ -164,7 +164,7 @@ static int mpc85xx_rio_doorbell_send(int index, u16 destid, 
u16 data)
 }
 
 /**
- * mpc85xx_local_config_read - Generate a MPC85xx local config space read
+ * fsl_local_config_read - Generate a MPC85xx local config space read
  * @index: ID of RapdiIO interface
  * @offset: Offset into configuration space
  * @len: Length (in bytes) of the maintenance transaction
@@ -173,9 +173,9 @@ static int mpc85xx_rio_doorbell_send(int index, u16 destid, 
u16 data)
  * Generates a MPC85xx local configuration space read. Returns %0 on
  * success or %-EINVAL on failure.
  */
-static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * 
data)
+static int fsl_local_config_read(int index, u32 offset, int len, u32 * data)
 {
-   pr_debug(mpc85xx_local_config_read: index %d offset %8.8x\n, index,
+   pr_debug(fsl_local_config_read: index %d offset %8.8x\n, index,
 offset);
*data = in_be32((void *)(regs_win + offset));
 
@@ -183,7 +183,7 @@ static int mpc85xx_local_config_read(int index, u32 offset, 
int len, u32 * data)
 }
 
 /**
- * mpc85xx_local_config_write - Generate a MPC85xx local config space write
+ * fsl_local_config_write - Generate a MPC85xx local config space write
  * @index: ID of RapdiIO interface
  * @offset: Offset into configuration space
  * @len: Length (in bytes) of the maintenance transaction
@@ -192,10 +192,10 @@ static int mpc85xx_local_config_read(int index, u32 
offset, int len, u32 * data)
  * Generates a MPC85xx local configuration space write. Returns %0 on
  * success or %-EINVAL on failure.
  */
-static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
+static int fsl_local_config_write(int index, u32 offset, int len, u32 data)
 {
pr_debug
-   (mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n,
+   (fsl_local_config_write: index %d offset %8.8x data %8.8x\n,
 index, offset, data);
out_be32((void *)(regs_win + offset), data);
 
@@ -203,7 +203,7 @@ static int mpc85xx_local_config_write(int index, u32 
offset, int len, u32 data)
 }
 
 /**
- * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction
+ * fsl_rio_config_read - Generate a MPC85xx read maintenance transaction
  * @index: ID of RapdiIO interface
  * @destid: Destination ID of transaction
  * @hopcount: Number of hops to target device
@@ -215,13 +215,13 @@ static int mpc85xx_local_config_write(int index, u32 
offset, int len, u32 data)
  * success or %-EINVAL on failure.
  */
 static int
-mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int 
len,
+fsl_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
u32 * val)
 {
u8 *data;
 
pr_debug
-   (mpc85xx_rio_config_read: index %d destid %d hopcount %d offset 
%8.8x len %d\n,
+   (fsl_rio_config_read: index %d destid %d hopcount %d offset %8.8x 
len %d\n,
 index, destid, hopcount, offset, len);
out_be32((void *)maint_atmu_regs-rowtar,
 (destid  22) | (hopcount  12) | ((offset  ~0x3)  9));
@@ -243,7 +243,7 @@ mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, 
u32 offset, int len,
 }
 
 /**
- * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction
+ * fsl_rio_config_write - Generate a MPC85xx write maintenance transaction
  * @index: ID of RapdiIO interface
  * @destid: Destination ID of 

Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .

2008-01-30 Thread Kumar Gala

Can you post a device tree update as well.

The older patches on the list for the 86xx .dts should NOT put the rio  
node under the soc.  It should be at the same level as PCI.


- k
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .

2008-01-30 Thread Zhang Wei
All right, I'll give you another patch for 86xx dts file. :)

 Btw: Why the PCI and other nodes were moved from SOC? Just for clear?
If they are moved out, their register address must use full address not
offset address.

Thanks!
Wei.

 -Original Message-
 From: Kumar Gala [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, January 30, 2008 10:44 PM
 To: Zhang Wei
 Cc: [EMAIL PROTECTED]; 
 linux-kernel@vger.kernel.org; [EMAIL PROTECTED]
 Subject: Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
 
 Can you post a device tree update as well.
 
 The older patches on the list for the 86xx .dts should NOT 
 put the rio  
 node under the soc.  It should be at the same level as PCI.
 
 - k
 
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/