diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-10-01 10:33:54 -0400 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-10-10 03:25:58 -0400 |
commit | 4a24d8610df542b6599a65b100d438df144574de (patch) | |
tree | 0f9e7d4dab9a0a7b234ca7f09a2600695a33fb2d /drivers/block | |
parent | 1b455466549f46bab0a75a7a296a9331a38fd6fa (diff) |
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: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | 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 555939bd2d53..10bb4e54f685 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c | |||
@@ -158,6 +158,9 @@ MODULE_LICENSE("GPL"); | |||
158 | #define ACE_FIFO_SIZE (32) | 158 | #define ACE_FIFO_SIZE (32) |
159 | #define ACE_BUF_PER_SECTOR (ACE_SECTOR_SIZE / ACE_FIFO_SIZE) | 159 | #define ACE_BUF_PER_SECTOR (ACE_SECTOR_SIZE / ACE_FIFO_SIZE) |
160 | 160 | ||
161 | #define ACE_BUS_WIDTH_8 0 | ||
162 | #define ACE_BUS_WIDTH_16 1 | ||
163 | |||
161 | struct ace_reg_ops; | 164 | struct ace_reg_ops; |
162 | 165 | ||
163 | struct ace_device { | 166 | struct ace_device { |
@@ -931,9 +934,11 @@ static int __devinit ace_setup(struct ace_device *ace) | |||
931 | { | 934 | { |
932 | u16 version; | 935 | u16 version; |
933 | u16 val; | 936 | u16 val; |
934 | |||
935 | int rc; | 937 | int rc; |
936 | 938 | ||
939 | dev_dbg(ace->dev, "ace_setup(ace=0x%p)\n", ace); | ||
940 | dev_dbg(ace->dev, "physaddr=0x%lx irq=%i\n", ace->physaddr, ace->irq); | ||
941 | |||
937 | spin_lock_init(&ace->lock); | 942 | spin_lock_init(&ace->lock); |
938 | init_completion(&ace->id_completion); | 943 | init_completion(&ace->id_completion); |
939 | 944 | ||
@@ -982,7 +987,7 @@ static int __devinit ace_setup(struct ace_device *ace) | |||
982 | snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a'); | 987 | snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a'); |
983 | 988 | ||
984 | /* set bus width */ | 989 | /* set bus width */ |
985 | if (ace->bus_width == 1) { | 990 | if (ace->bus_width == ACE_BUS_WIDTH_16) { |
986 | /* 0x0101 should work regardless of endianess */ | 991 | /* 0x0101 should work regardless of endianess */ |
987 | ace_out_le16(ace, ACE_BUSMODE, 0x0101); | 992 | ace_out_le16(ace, ACE_BUSMODE, 0x0101); |
988 | 993 | ||
@@ -1117,7 +1122,7 @@ static void __devexit ace_free(struct device *dev) | |||
1117 | static int __devinit ace_probe(struct platform_device *dev) | 1122 | static int __devinit ace_probe(struct platform_device *dev) |
1118 | { | 1123 | { |
1119 | unsigned long physaddr = 0; | 1124 | unsigned long physaddr = 0; |
1120 | int bus_width = 1; /* FIXME: should not be hard coded */ | 1125 | int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */ |
1121 | int id = dev->id; | 1126 | int id = dev->id; |
1122 | int irq = NO_IRQ; | 1127 | int irq = NO_IRQ; |
1123 | int i; | 1128 | int i; |
@@ -1166,6 +1171,7 @@ static int __init ace_init(void) | |||
1166 | goto err_blk; | 1171 | goto err_blk; |
1167 | } | 1172 | } |
1168 | 1173 | ||
1174 | pr_debug("xsysace: registering platform binding\n"); | ||
1169 | if ((rc = platform_driver_register(&ace_platform_driver)) != 0) | 1175 | if ((rc = platform_driver_register(&ace_platform_driver)) != 0) |
1170 | goto err_plat; | 1176 | goto err_plat; |
1171 | 1177 | ||