ChangeSet 1.2181.22.5, 2005/03/19 14:53:04-06:00, [EMAIL PROTECTED]
[PATCH] Zalon updates
Zalon updates
- Add KERN_INFO to printk
Signed-off-by: Andrew McGregor <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]>
- Remove iomem-related warnings
- Improve printk message
- Use cpu_relax()
Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]>
Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
zalon.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff -Nru a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
--- a/drivers/scsi/zalon.c 2005-03-30 16:07:25 -08:00
+++ b/drivers/scsi/zalon.c 2005-03-30 16:07:25 -08:00
@@ -88,31 +88,30 @@
struct gsc_irq gsc_irq;
u32 zalon_vers;
int error = -ENODEV;
- unsigned long zalon = dev->hpa;
- unsigned long io_port = zalon + GSC_SCSI_ZALON_OFFSET;
+ void __iomem *zalon = ioremap(dev->hpa, 4096);
+ void __iomem *io_port = zalon + GSC_SCSI_ZALON_OFFSET;
static int unit = 0;
struct Scsi_Host *host;
struct ncr_device device;
__raw_writel(CMD_RESET, zalon + IO_MODULE_IO_COMMAND);
while (!(__raw_readl(zalon + IO_MODULE_IO_STATUS) & IOSTATUS_RY))
- ;
+ cpu_relax();
__raw_writel(IOIIDATA_MINT5EN | IOIIDATA_PACKEN | IOIIDATA_PREFETCHEN,
zalon + IO_MODULE_II_CDATA);
/* XXX: Save the Zalon version for bug workarounds? */
- zalon_vers = __raw_readl(dev->hpa + IO_MODULE_II_CDATA) & 0x07000000;
- zalon_vers >>= 24;
+ zalon_vers = (__raw_readl(zalon + IO_MODULE_II_CDATA) >> 24) & 0x07;
/* Setup the interrupts first.
** Later on request_irq() will register the handler.
*/
dev->irq = gsc_alloc_irq(&gsc_irq);
- printk("%s: Zalon vers field is 0x%x, IRQ %d\n", __FUNCTION__,
+ printk(KERN_INFO "%s: Zalon version %d, IRQ %d\n", __FUNCTION__,
zalon_vers, dev->irq);
- __raw_writel(gsc_irq.txn_addr | gsc_irq.txn_data, dev->hpa +
IO_MODULE_EIM);
+ __raw_writel(gsc_irq.txn_addr | gsc_irq.txn_data, zalon +
IO_MODULE_EIM);
if (zalon_vers == 0)
printk(KERN_WARNING "%s: Zalon 1.1 or earlier\n", __FUNCTION__);
@@ -120,16 +119,16 @@
memset(&device, 0, sizeof(struct ncr_device));
/* The following three are needed before any other access. */
- writeb(0x20, io_port + 0x38); /* DCNTL_REG, EA */
- writeb(0x04, io_port + 0x1b); /* CTEST0_REG, EHP */
- writeb(0x80, io_port + 0x22); /* CTEST4_REG, MUX */
+ __raw_writeb(0x20, io_port + 0x38); /* DCNTL_REG, EA */
+ __raw_writeb(0x04, io_port + 0x1b); /* CTEST0_REG, EHP */
+ __raw_writeb(0x80, io_port + 0x22); /* CTEST4_REG, MUX */
/* Initialise ncr_device structure with items required by ncr_attach. */
device.chip = zalon720_chip;
device.host_id = 7;
device.dev = &dev->dev;
- device.slot.base = (u_long)io_port;
- device.slot.base_c = (u_long)io_port;
+ device.slot.base = dev->hpa + GSC_SCSI_ZALON_OFFSET;
+ device.slot.base_v = io_port;
device.slot.irq = dev->irq;
device.differential = 2;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html