[PATCH] powerpc/rmu: Fix the error memory free parameters

2014-04-09 Thread Liu Gang
There are error parameters should be corrected when calling dma_free_coherent to free rmu rx-ring buffers in fsl_open_inb_mbox() function. Signed-off-by: Liu Gang Reported-by: Dan Carpenter --- arch/powerpc/sysdev/fsl_rmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

Re: [PATCH v2] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536

2013-11-26 Thread Liu Gang
y think a comment is worth adding here about why we do this. > > - k Hi, Kumar, Thanks for your comment. In fact, there already had some comments above the function: /* Workaround GPIO 1 errata on MPC8572/MPC8536. The status of GPIOs * defined as output

[PATCH v2] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536

2013-11-22 Thread Liu Gang
reading the pin status will always return high even if the actual pin status is low. The code should eliminate the effects of the shadow data to the input pins, and the status of those pins should be read directly from GPDAT. Signed-off-by: Liu Gang --- changes in v2: - Added more description of

Re: [PATCH] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536

2013-11-21 Thread Liu Gang
-Scott > I think you considered about this more comprehensive. I'll update the code without the modification of ->data in the get() function, and also with the comments from Anatolij. Best Regards, Liu Gang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536

2013-11-19 Thread Liu Gang
in" function. So maybe it's better to eliminate the effects of the ->data to the input pins when reading the status, regardless of the possible changes of the pins and the data. Do you think so? Best Regards, Liu Gang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536

2013-11-19 Thread Liu Gang
On Tue, 2013-11-19 at 16:32 +0100, Anatolij Gustschin wrote: > On Fri, 15 Nov 2013 15:16:29 +0800 > Liu Gang wrote: > > > For MPC8572/MPC8536, the status of GPIOs defined as output > > cannot be determined by reading GPDAT register, so the code > > use shadow data r

[PATCH] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536

2013-11-15 Thread Liu Gang
should be read directly from GPDAT, not the shadow data. Signed-off-by: Liu Gang --- drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 9ae29cc..1d4ac75 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b

RE: [PATCH v3] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-13 Thread Liu Gang-B34182
Hi, Kumar, Can you help to apply the two patches? powerpc/srio: Fix the compile errors when building with 64bit http://patchwork.ozlabs.org/patch/145687/ powerpc/srio: Fix the relocation errors when building with 64bit http://patchwork.ozlabs.org/patch/144829/ Thanks a lot. Best Regards, Liu

[PATCH v3] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-09 Thread Liu Gang
ut argument 5 has type 'size_t' .../fsl_rmu.c:985: error: cast from pointer to integer of different size .../fsl_rmu.c:997: error: cast to pointer from integer of different size Rewrote the corresponding code with the support of 64bit building. Signed-off-by: Liu Gang Signed-off-by:

RE: [PATCH v2] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-07 Thread Liu Gang
"%8.8lx len %8.8zx\n", rdev->destid, mbox, > > + (unsigned long)buffer, len); > > Should 'buffer' be printed with %p ?? Yes, printing with "%p" can get rid of the cast, although they have the same print results. Thanks a lot. Liu G

[PATCH v2] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-07 Thread Liu Gang
ut argument 5 has type 'size_t' .../fsl_rmu.c:985: error: cast from pointer to integer of different size .../fsl_rmu.c:997: error: cast to pointer from integer of different size Rewrote the corresponding code with the support of 64bit building. Signed-off-by: Liu Gang Signed-off-by:

Re: [PATCH] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-07 Thread Liu Gang
ing.virt + > (in_be32(&fsl_dbell->dbell_regs->dqdpar) & 0xfff); > > Than you can git rid of the DBELL_* macros. Yes, this can really git rid of the DBELL_* macros and some other code. I'll update the patch based on your comments. Thanks a lot. Liu Gang

[PATCH] powerpc/srio: Fix the relocation errors when building with 64bit

2012-03-05 Thread Liu Gang
'+18 Rewrote the corresponding code with the support of 64bit building. Signed-off-by: Liu Gang --- arch/powerpc/sysdev/fsl_rio.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index a4c4f4a..5b6f556 100

Re: [PATCH] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-05 Thread Liu Gang
uld virt_buf really be void * here? I think you are right, the phys_buf should not be changed to 'unsigned long' and the virt_buf should be void *. I'll correct this in next version. > > @@ -982,7 +983,7 @@ void *fsl_get_inb_message(struct rio_mport *mport, int > > mbox) > > The memcpy later could remove a cast if you make virt_buf a void *. Thanks a lot, will remove. Best Regards, Liu Gang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-04 Thread Liu Gang
Hi, Paul, On Fri, 2012-03-02 at 09:30 -0500, Paul Gortmaker wrote: > > Signed-off-by: Liu Gang > > Signed-off-by: Shaohui Xie > > Signed-off-by: Paul Gortmaker > > Hi Liu, > > You can't just go adding a "Signed-off-by:" line for me to a patch that

[PATCH] powerpc/srio: Fix the compile errors when building with 64bit

2012-03-01 Thread Liu Gang
ut argument 5 has type 'size_t' .../fsl_rmu.c:985: error: cast from pointer to integer of different size .../fsl_rmu.c:997: error: cast to pointer from integer of different size Rewrote the corresponding code with the support of 64bit building. Signed-off-by: Liu Gang Signed-off-by: Sh

Re: [PATCH/RFC] rapidio: temporarily exclude FSL_RIO from 64 bit builds

2012-02-26 Thread Liu Gang
my other urgent issues. I also found these errors of 64bit building last week. I'll provide patch for this issue as soon as possible. Thanks. Best Regards, Liu Gang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists

RE: [PATCH 4/5, v3] powerpc/8xxx: Update device tree bus probe for new RapidIO node binding

2011-11-14 Thread Liu Gang-B34182
Yeah, send binding first should be better for reviewing entire set of patches. Thanks! -Original Message- From: Wood Scott-B07421 Sent: Tuesday, November 15, 2011 1:37 AM To: Liu Gang-B34182 Cc: Li Yang-R58472; Jiang Kai-B18973; linux-ker...@vger.kernel.org; Zang Roy-R61911

[PATCH 3/5,v3] powerpc/85xx: Update SRIO device tree nodes

2011-11-12 Thread Liu Gang
From: Kumar Gala Update all dts files that support SRIO controllers to match the new fsl,srio device tree binding. Signed-off-by: Kumar Gala --- arch/powerpc/boot/dts/mpc8568mds.dts | 66 ++--- arch/powerpc/boot/dts/mpc8569mds.dts | 72 +-

[PATCH 5/5, v3] powerpc/fsl: Document rapidio node binding-information

2011-11-12 Thread Liu Gang
This document is created for powerpc rapidio and rmu nodes in dts file. These nodes can support two rapidio ports and message units. In addition, It explicates the properties and gives examples about rapidio and rmu nodes. Signed-off-by: Li Yang Signed-off-by: Jin Qing Signed-off-by: Liu Gang

[PATCH 2/5, v3] fsl-rio: Add two ports and rapidio message units support

2011-11-12 Thread Liu Gang
can work simultaneously. Signed-off-by: Li Yang Signed-off-by: Jin Qing Signed-off-by: Liu Gang Signed-off-by: Kumar Gala --- arch/powerpc/sysdev/fsl_rio.c | 391 +--- arch/powerpc/sysdev/fsl_rio.h | 75 ++- arch/powerpc/sysdev/fsl_rmu.c | 502

[PATCH 4/5, v3] powerpc/8xxx: Update device tree bus probe for new RapidIO node binding

2011-11-12 Thread Liu Gang
From: Kai Jiang Update of_platform_bus_probe() RapidIO node to be compitable with new RapidIO dts compatible property. Signed-off-by: Kai Jiang Signed-off-by: Kumar Gala --- arch/powerpc/platforms/85xx/corenet_ds.c |2 +- arch/powerpc/platforms/85xx/mpc85xx_mds.c |2 +- arch/powerp

RE: [PATCH] fsl-rio: fix compile error

2011-11-11 Thread Liu Gang-B34182
Yes, I'm afraid srio was not enabled when you compiled. Regards, Liu Gang -Original Message- From: Paul Gortmaker [mailto:paul.gortma...@windriver.com] Sent: Friday, November 11, 2011 11:48 PM To: Liu Gang-B34182 Cc: linuxppc-dev@lists.ozlabs.org; alexandre.boun...@idt.com; a...@

[PATCH] fsl-rio: fix compile error

2011-11-11 Thread Liu Gang
werpc/sysdev/fsl_rio.c:296: error: implicit declaration of function 'search_exception_tables'. The file fsl_rio.c needs the declaration of function "search_exception_tables" in the header file "linux/module.h". Signed-off-by: Liu Gang --- arch/powerpc/sysdev/fsl_rio.c

RE: [PATCH 3/5][v2] fsl-rio: Add two ports and rapidio message units support

2011-10-25 Thread Liu Gang-B34182
-Original Message- From: Bounine, Alexandre [mailto:alexandre.boun...@idt.com] Sent: Monday, October 24, 2011 9:51 PM To: Liu Gang-B34182; Kumar Gala; linuxppc-...@ozlabs.org; Zang Roy-R61911 Cc: Andrew Morton; linux-ker...@vger.kernel.org Subject: RE: [PATCH 3/5][v2] fsl-rio: Add two

RE: [PATCH 3/5][v2] fsl-rio: Add two ports and rapidio message units support

2011-10-21 Thread Liu Gang-B34182
Hi, Alex, Thanks for your comments, please find my replies inlines. -Original Message- From: Bounine, Alexandre [mailto:alexandre.boun...@idt.com] Sent: Thursday, October 20, 2011 3:54 AM To: Kumar Gala; linuxppc-...@ozlabs.org Cc: Andrew Morton; Liu Gang-B34182; linux-ker

RE: [PATCH 4/4] powerpc/fsl: Document rapidio node binding-information

2011-09-30 Thread Liu Gang-B34182
Thanks Kumar! I'll update these SRIO patches following all your comments. Regards, Liu Gang -Original Message- From: Kumar Gala [mailto:ga...@kernel.crashing.org] Sent: Thursday, September 29, 2011 10:21 PM To: Liu Gang-B34182 Cc: linuxppc-dev@lists.ozlabs.org; a...@linux-foundatio

[PATCH 4/4] powerpc/fsl: Document rapidio node binding-information

2011-09-28 Thread Liu Gang
This document is created for powerpc rapidio and rmu nodes in dts file. These nodes can support two rapidio ports and message units. In addition, It explicates the properties and gives examples about rapidio and rmu nodes. Signed-off-by: Li Yang Signed-off-by: Jin Qing Signed-off-by: Liu Gang

[PATCH 2/4] fsl-rio: Add two ports and rapidio message units support

2011-09-28 Thread Liu Gang
units can work simultaneously. Signed-off-by: Li Yang Signed-off-by: Jin Qing Signed-off-by: Liu Gang --- arch/powerpc/sysdev/fsl_rio.c | 336 +-- arch/powerpc/sysdev/fsl_rio.h | 73 +++- arch/powerpc/sysdev/fsl_rmu.c | 434

[PATCH 3/4] p4080ds-dts: Add two rapidio ports and message units support

2011-09-28 Thread Liu Gang
Add two message units and number of ports according to the p4080 reference manual. Signed-off-by: Li Yang Signed-off-by: Jin Qing Signed-off-by: Liu Gang --- arch/powerpc/boot/dts/p4080ds.dts |4 +- arch/powerpc/boot/dts/p4080si.dtsi | 37 +++ 2 files

[PATCH] fsl-rio: Release rapidio port I/O region resource if port failed to initialize

2011-09-01 Thread Liu Gang
ources list and this will cause the system to crash. So the requested port I/O memory resource should be released before freeing allocated "rio_mport" structure. Signed-off-by: Liu Gang --- arch/powerpc/sysdev/fsl_rio.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff

RE: [PATCH] fsl-rio: Correct IECSR register clear value

2011-08-24 Thread Liu Gang-B34182
called persistently. Thanks again! Regards, Liu Gang -Original Message- From: Andrew Morton [mailto:a...@linux-foundation.org] Sent: Thursday, August 25, 2011 2:54 AM To: Liu Gang-B34182 Cc: 'linuxppc-dev@lists.ozlabs.org'; Li Yang-R58472; Gala Kumar-B11780; Zang Roy-R61911 S

RE: [PATCH] fsl-rio: Correct IECSR register clear value

2011-08-24 Thread Liu Gang-B34182
tree? Thanks a lot! Regards, Liu Gang -Original Message- From: Liu Gang-B34182 Sent: Monday, August 08, 2011 6:14 PM To: linuxppc-...@ozlabs.org Cc: a...@linux-foundation.org; Li Yang-R58472; Gala Kumar-B11780; Zang Roy-R61911; Liu Gang-B34182; Liu Gang-B34182 Subject: [PATCH] fs

RE: [PATCH] rio: Use discovered bit to test if enumeration is complete

2011-08-17 Thread Liu Gang-B34182
Hi, Andrew, Could you please apply this patch into your tree? Thanks a lot! Regards, Liu Gang -Original Message- From: Bounine, Alexandre [mailto:alexandre.boun...@idt.com] Sent: Tuesday, August 09, 2011 8:36 PM To: Liu Gang-B34182; linux-ker...@vger.kernel.org Cc: Li Yang-R58472

[PATCH] rio: Use discovered bit to test if enumeration is complete

2011-08-08 Thread Liu Gang
The discovered bit in PGCCSR register indicates if the device has been discovered by system host. In Rapidio system, some agent devices can also be master devices. They can issue requests into the system. Signed-off-by: Liu Gang --- drivers/rapidio/rio-scan.c |4 ++-- 1 files changed, 2

[PATCH] fsl-rio: Correct IECSR register clear value

2011-08-08 Thread Liu Gang
The RETE bit in IECSR is cleared by writing a 1 to it. Signed-off-by: Liu Gang --- arch/powerpc/sysdev/fsl_rio.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index b3fd081..cdd765b 100644 --- a/arch