mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	paulus@samba.org, axboe@kernel.dk
Subject: [PATCH v2 4/6] Sysace: minor rework and cleanup changes
Date: Sun, 30 Sep 2007 16:57:21 -0600	[thread overview]
Message-ID: <20070930225720.2476.45305.stgit@trillian.cg.shawcable.net> (raw)
In-Reply-To: <20070930225112.2476.49914.stgit@trillian.cg.shawcable.net>

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

Miscellanious rework to the sysace driver; Not critical, but makes the
subsequent addition of the of_platform bus binding a wee bit cleaner

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

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

diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 555939b..10bb4e5 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -158,6 +158,9 @@ MODULE_LICENSE("GPL");
 #define ACE_FIFO_SIZE (32)
 #define ACE_BUF_PER_SECTOR (ACE_SECTOR_SIZE / ACE_FIFO_SIZE)
 
+#define ACE_BUS_WIDTH_8  0
+#define ACE_BUS_WIDTH_16 1
+
 struct ace_reg_ops;
 
 struct ace_device {
@@ -931,9 +934,11 @@ static int __devinit ace_setup(struct ace_device *ace)
 {
 	u16 version;
 	u16 val;
-
 	int rc;
 
+	dev_dbg(ace->dev, "ace_setup(ace=0x%p)\n", ace);
+	dev_dbg(ace->dev, "physaddr=0x%lx irq=%i\n", ace->physaddr, ace->irq);
+
 	spin_lock_init(&ace->lock);
 	init_completion(&ace->id_completion);
 
@@ -982,7 +987,7 @@ static int __devinit ace_setup(struct ace_device *ace)
 	snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a');
 
 	/* set bus width */
-	if (ace->bus_width == 1) {
+	if (ace->bus_width == ACE_BUS_WIDTH_16) {
 		/* 0x0101 should work regardless of endianess */
 		ace_out_le16(ace, ACE_BUSMODE, 0x0101);
 
@@ -1117,7 +1122,7 @@ static void __devexit ace_free(struct device *dev)
 static int __devinit ace_probe(struct platform_device *dev)
 {
 	unsigned long physaddr = 0;
-	int bus_width = 1; /* FIXME: should not be hard coded */
+	int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */
 	int id = dev->id;
 	int irq = NO_IRQ;
 	int i;
@@ -1166,6 +1171,7 @@ static int __init ace_init(void)
 		goto err_blk;
 	}
 
+	pr_debug("xsysace: registering platform binding\n");
 	if ((rc = platform_driver_register(&ace_platform_driver)) != 0)
 		goto err_plat;
 


  parent reply	other threads:[~2007-09-30 22:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 22:56 [PATCH v2 0/6] SystemACE: rework and of_platform bus binding patches Grant Likely
2007-09-30 22:57 ` [PATCH v2 1/6] Add Xilinx SystemACE entry to maintainers Grant Likely
2007-09-30 22:57 ` [PATCH v2 2/6] Sysace: Use the established platform bus api Grant Likely
2007-09-30 23:05   ` Christoph Hellwig
2007-09-30 23:33     ` Grant Likely
2007-10-01 11:59       ` Jens Axboe
2007-10-01 13:17         ` Grant Likely
2007-10-02  5:58         ` Benjamin Herrenschmidt
2007-10-02  6:35           ` Jens Axboe
2007-10-02 13:52             ` Grant Likely
2007-09-30 22:57 ` [PATCH v2 3/6] Sysace: Move structure allocation from bus binding into common code Grant Likely
2007-09-30 22:57 ` Grant Likely [this message]
2007-09-30 22:57 ` [PATCH v2 5/6] Sysace: Move IRQ handler registration to occur after FSM is initialized Grant Likely
2007-10-02  5:55   ` Benjamin Herrenschmidt
2007-10-02 13:57     ` Grant Likely
2007-09-30 22:57 ` [PATCH v2 6/6] Sysace: Add of_platform_bus binding Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070930225720.2476.45305.stgit@trillian.cg.shawcable.net \
    --to=grant.likely@secretlab.ca \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome