Commit 4a24d861 authored by Grant Likely's avatar Grant Likely Committed by Jens Axboe

Sysace: minor rework and cleanup changes

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: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 1b455466
...@@ -158,6 +158,9 @@ MODULE_LICENSE("GPL"); ...@@ -158,6 +158,9 @@ MODULE_LICENSE("GPL");
#define ACE_FIFO_SIZE (32) #define ACE_FIFO_SIZE (32)
#define ACE_BUF_PER_SECTOR (ACE_SECTOR_SIZE / ACE_FIFO_SIZE) #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_reg_ops;
struct ace_device { struct ace_device {
...@@ -931,9 +934,11 @@ static int __devinit ace_setup(struct ace_device *ace) ...@@ -931,9 +934,11 @@ static int __devinit ace_setup(struct ace_device *ace)
{ {
u16 version; u16 version;
u16 val; u16 val;
int rc; 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); spin_lock_init(&ace->lock);
init_completion(&ace->id_completion); init_completion(&ace->id_completion);
...@@ -982,7 +987,7 @@ static int __devinit ace_setup(struct ace_device *ace) ...@@ -982,7 +987,7 @@ static int __devinit ace_setup(struct ace_device *ace)
snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a'); snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a');
/* set bus width */ /* set bus width */
if (ace->bus_width == 1) { if (ace->bus_width == ACE_BUS_WIDTH_16) {
/* 0x0101 should work regardless of endianess */ /* 0x0101 should work regardless of endianess */
ace_out_le16(ace, ACE_BUSMODE, 0x0101); ace_out_le16(ace, ACE_BUSMODE, 0x0101);
...@@ -1117,7 +1122,7 @@ static void __devexit ace_free(struct device *dev) ...@@ -1117,7 +1122,7 @@ static void __devexit ace_free(struct device *dev)
static int __devinit ace_probe(struct platform_device *dev) static int __devinit ace_probe(struct platform_device *dev)
{ {
unsigned long physaddr = 0; 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 id = dev->id;
int irq = NO_IRQ; int irq = NO_IRQ;
int i; int i;
...@@ -1166,6 +1171,7 @@ static int __init ace_init(void) ...@@ -1166,6 +1171,7 @@ static int __init ace_init(void)
goto err_blk; goto err_blk;
} }
pr_debug("xsysace: registering platform binding\n");
if ((rc = platform_driver_register(&ace_platform_driver)) != 0) if ((rc = platform_driver_register(&ace_platform_driver)) != 0)
goto err_plat; goto err_plat;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment