linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fixups to SystemACE driver
@ 2007-10-04  4:13 Grant Likely
  2007-10-04  4:13 ` [PATCH 1/3] Sysace: Minor coding convention fixup Grant Likely
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Grant Likely @ 2007-10-04  4:13 UTC (permalink / raw)
  To: jens.axboe, linux-kernel, linuxppc-dev

Jens,

Here are some more Sysace patches based on comments received on the
first series and a run through sparse.  Can you please queue them up
for 2.6.24?

Thanks,
g.

--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] Sysace: Minor coding convention fixup
  2007-10-04  4:13 [PATCH 0/3] Fixups to SystemACE driver Grant Likely
@ 2007-10-04  4:13 ` Grant Likely
  2007-10-04  4:13 ` [PATCH 2/3] Sysace: sparse fixes Grant Likely
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2007-10-04  4:13 UTC (permalink / raw)
  To: jens.axboe, linux-kernel, linuxppc-dev

From: Grant Likely <grant.likely@secretlab.ca>

Put function call and return code test on separate lines.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 drivers/block/xsysace.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 3ea172b..3847464 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1091,7 +1091,8 @@ ace_alloc(struct device *dev, int id, unsigned long physaddr,
 	ace->bus_width = bus_width;
 
 	/* Call the setup code */
-	if ((rc = ace_setup(ace)) != 0)
+	rc = ace_setup(ace);
+	if (rc)
 		goto err_setup;
 
 	dev_set_drvdata(dev, ace);
@@ -1253,11 +1254,13 @@ static int __init ace_init(void)
 		goto err_blk;
 	}
 
-	if ((rc = ace_of_register()) != 0)
+	rc = ace_of_register();
+	if (rc)
 		goto err_of;
 
 	pr_debug("xsysace: registering platform binding\n");
-	if ((rc = platform_driver_register(&ace_platform_driver)) != 0)
+	rc = platform_driver_register(&ace_platform_driver);
+	if (rc)
 		goto err_plat;
 
 	pr_info("Xilinx SystemACE device driver, major=%i\n", ace_major);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] Sysace: sparse fixes
  2007-10-04  4:13 [PATCH 0/3] Fixups to SystemACE driver Grant Likely
  2007-10-04  4:13 ` [PATCH 1/3] Sysace: Minor coding convention fixup Grant Likely
@ 2007-10-04  4:13 ` Grant Likely
  2007-10-04  4:13 ` [PATCH 3/3] Sysace: Don't enable IRQ until after interrupt handler is registered Grant Likely
  2007-10-04  6:53 ` [PATCH 0/3] Fixups to SystemACE driver Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2007-10-04  4:13 UTC (permalink / raw)
  To: jens.axboe, linux-kernel, linuxppc-dev

From: Grant Likely <grant.likely@secretlab.ca>

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 drivers/block/xsysace.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 3847464..5b73471 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -195,7 +195,7 @@ struct ace_device {
 
 	/* Details of hardware device */
 	unsigned long physaddr;
-	void *baseaddr;
+	void __iomem *baseaddr;
 	int irq;
 	int bus_width;		/* 0 := 8 bit; 1 := 16 bit */
 	struct ace_reg_ops *reg_ops;
@@ -227,20 +227,20 @@ struct ace_reg_ops {
 /* 8 Bit bus width */
 static u16 ace_in_8(struct ace_device *ace, int reg)
 {
-	void *r = ace->baseaddr + reg;
+	void __iomem *r = ace->baseaddr + reg;
 	return in_8(r) | (in_8(r + 1) << 8);
 }
 
 static void ace_out_8(struct ace_device *ace, int reg, u16 val)
 {
-	void *r = ace->baseaddr + reg;
+	void __iomem *r = ace->baseaddr + reg;
 	out_8(r, val);
 	out_8(r + 1, val >> 8);
 }
 
 static void ace_datain_8(struct ace_device *ace)
 {
-	void *r = ace->baseaddr + 0x40;
+	void __iomem *r = ace->baseaddr + 0x40;
 	u8 *dst = ace->data_ptr;
 	int i = ACE_FIFO_SIZE;
 	while (i--)
@@ -250,7 +250,7 @@ static void ace_datain_8(struct ace_device *ace)
 
 static void ace_dataout_8(struct ace_device *ace)
 {
-	void *r = ace->baseaddr + 0x40;
+	void __iomem *r = ace->baseaddr + 0x40;
 	u8 *src = ace->data_ptr;
 	int i = ACE_FIFO_SIZE;
 	while (i--)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] Sysace: Don't enable IRQ until after interrupt handler is registered
  2007-10-04  4:13 [PATCH 0/3] Fixups to SystemACE driver Grant Likely
  2007-10-04  4:13 ` [PATCH 1/3] Sysace: Minor coding convention fixup Grant Likely
  2007-10-04  4:13 ` [PATCH 2/3] Sysace: sparse fixes Grant Likely
@ 2007-10-04  4:13 ` Grant Likely
  2007-10-04  6:53 ` [PATCH 0/3] Fixups to SystemACE driver Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2007-10-04  4:13 UTC (permalink / raw)
  To: jens.axboe, linux-kernel, linuxppc-dev

From: Grant Likely <grant.likely@secretlab.ca>

The previous patch to move the interrupt handler registration moved it
below enabling interrupts which could be a problem if the device is on
a shared interrupt line.  This patch fixes the order.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 drivers/block/xsysace.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 5b73471..9e7652d 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1005,11 +1005,6 @@ static int __devinit ace_setup(struct ace_device *ace)
 	ace_out(ace, ACE_CTRL, ACE_CTRL_FORCECFGMODE |
 		ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ);
 
-	/* Enable interrupts */
-	val = ace_in(ace, ACE_CTRL);
-	val |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ;
-	ace_out(ace, ACE_CTRL, val);
-
 	/* Now we can hook up the irq handler */
 	if (ace->irq != NO_IRQ) {
 		rc = request_irq(ace->irq, ace_interrupt, 0, "systemace", ace);
@@ -1020,6 +1015,11 @@ static int __devinit ace_setup(struct ace_device *ace)
 		}
 	}
 
+	/* Enable interrupts */
+	val = ace_in(ace, ACE_CTRL);
+	val |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ;
+	ace_out(ace, ACE_CTRL, val);
+
 	/* Print the identification */
 	dev_info(ace->dev, "Xilinx SystemACE revision %i.%i.%i\n",
 		 (version >> 12) & 0xf, (version >> 8) & 0x0f, version & 0xff);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] Fixups to SystemACE driver
  2007-10-04  4:13 [PATCH 0/3] Fixups to SystemACE driver Grant Likely
                   ` (2 preceding siblings ...)
  2007-10-04  4:13 ` [PATCH 3/3] Sysace: Don't enable IRQ until after interrupt handler is registered Grant Likely
@ 2007-10-04  6:53 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2007-10-04  6:53 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, linux-kernel

On Wed, Oct 03 2007, Grant Likely wrote:
> Jens,
> 
> Here are some more Sysace patches based on comments received on the
> first series and a run through sparse.  Can you please queue them up
> for 2.6.24?

Applied all 3, looked fine to me.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-04  6:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-04  4:13 [PATCH 0/3] Fixups to SystemACE driver Grant Likely
2007-10-04  4:13 ` [PATCH 1/3] Sysace: Minor coding convention fixup Grant Likely
2007-10-04  4:13 ` [PATCH 2/3] Sysace: sparse fixes Grant Likely
2007-10-04  4:13 ` [PATCH 3/3] Sysace: Don't enable IRQ until after interrupt handler is registered Grant Likely
2007-10-04  6:53 ` [PATCH 0/3] Fixups to SystemACE driver Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).