diff options
Diffstat (limited to 'drivers/scsi/sun_esp.c')
| -rw-r--r-- | drivers/scsi/sun_esp.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index 89ba6fe02f80..193b37ba1834 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
| @@ -44,7 +44,7 @@ enum dvma_rev { | |||
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | static int __devinit esp_sbus_setup_dma(struct esp *esp, | 46 | static int __devinit esp_sbus_setup_dma(struct esp *esp, |
| 47 | struct of_device *dma_of) | 47 | struct platform_device *dma_of) |
| 48 | { | 48 | { |
| 49 | esp->dma = dma_of; | 49 | esp->dma = dma_of; |
| 50 | 50 | ||
| @@ -81,7 +81,7 @@ static int __devinit esp_sbus_setup_dma(struct esp *esp, | |||
| 81 | 81 | ||
| 82 | static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) | 82 | static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) |
| 83 | { | 83 | { |
| 84 | struct of_device *op = esp->dev; | 84 | struct platform_device *op = esp->dev; |
| 85 | struct resource *res; | 85 | struct resource *res; |
| 86 | 86 | ||
| 87 | /* On HME, two reg sets exist, first is DVMA, | 87 | /* On HME, two reg sets exist, first is DVMA, |
| @@ -101,7 +101,7 @@ static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) | |||
| 101 | 101 | ||
| 102 | static int __devinit esp_sbus_map_command_block(struct esp *esp) | 102 | static int __devinit esp_sbus_map_command_block(struct esp *esp) |
| 103 | { | 103 | { |
| 104 | struct of_device *op = esp->dev; | 104 | struct platform_device *op = esp->dev; |
| 105 | 105 | ||
| 106 | esp->command_block = dma_alloc_coherent(&op->dev, 16, | 106 | esp->command_block = dma_alloc_coherent(&op->dev, 16, |
| 107 | &esp->command_block_dma, | 107 | &esp->command_block_dma, |
| @@ -114,15 +114,15 @@ static int __devinit esp_sbus_map_command_block(struct esp *esp) | |||
| 114 | static int __devinit esp_sbus_register_irq(struct esp *esp) | 114 | static int __devinit esp_sbus_register_irq(struct esp *esp) |
| 115 | { | 115 | { |
| 116 | struct Scsi_Host *host = esp->host; | 116 | struct Scsi_Host *host = esp->host; |
| 117 | struct of_device *op = esp->dev; | 117 | struct platform_device *op = esp->dev; |
| 118 | 118 | ||
| 119 | host->irq = op->archdata.irqs[0]; | 119 | host->irq = op->archdata.irqs[0]; |
| 120 | return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); | 120 | return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) | 123 | static void __devinit esp_get_scsi_id(struct esp *esp, struct platform_device *espdma) |
| 124 | { | 124 | { |
| 125 | struct of_device *op = esp->dev; | 125 | struct platform_device *op = esp->dev; |
| 126 | struct device_node *dp; | 126 | struct device_node *dp; |
| 127 | 127 | ||
| 128 | dp = op->dev.of_node; | 128 | dp = op->dev.of_node; |
| @@ -144,7 +144,7 @@ done: | |||
| 144 | 144 | ||
| 145 | static void __devinit esp_get_differential(struct esp *esp) | 145 | static void __devinit esp_get_differential(struct esp *esp) |
| 146 | { | 146 | { |
| 147 | struct of_device *op = esp->dev; | 147 | struct platform_device *op = esp->dev; |
| 148 | struct device_node *dp; | 148 | struct device_node *dp; |
| 149 | 149 | ||
| 150 | dp = op->dev.of_node; | 150 | dp = op->dev.of_node; |
| @@ -156,7 +156,7 @@ static void __devinit esp_get_differential(struct esp *esp) | |||
| 156 | 156 | ||
| 157 | static void __devinit esp_get_clock_params(struct esp *esp) | 157 | static void __devinit esp_get_clock_params(struct esp *esp) |
| 158 | { | 158 | { |
| 159 | struct of_device *op = esp->dev; | 159 | struct platform_device *op = esp->dev; |
| 160 | struct device_node *bus_dp, *dp; | 160 | struct device_node *bus_dp, *dp; |
| 161 | int fmhz; | 161 | int fmhz; |
| 162 | 162 | ||
| @@ -170,10 +170,10 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
| 170 | esp->cfreq = fmhz; | 170 | esp->cfreq = fmhz; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) | 173 | static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dma_of) |
| 174 | { | 174 | { |
| 175 | struct device_node *dma_dp = dma_of->dev.of_node; | 175 | struct device_node *dma_dp = dma_of->dev.of_node; |
| 176 | struct of_device *op = esp->dev; | 176 | struct platform_device *op = esp->dev; |
| 177 | struct device_node *dp; | 177 | struct device_node *dp; |
| 178 | u8 bursts, val; | 178 | u8 bursts, val; |
| 179 | 179 | ||
| @@ -195,7 +195,7 @@ static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) | |||
| 195 | esp->bursts = bursts; | 195 | esp->bursts = bursts; |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static void __devinit esp_sbus_get_props(struct esp *esp, struct of_device *espdma) | 198 | static void __devinit esp_sbus_get_props(struct esp *esp, struct platform_device *espdma) |
| 199 | { | 199 | { |
| 200 | esp_get_scsi_id(esp, espdma); | 200 | esp_get_scsi_id(esp, espdma); |
| 201 | esp_get_differential(esp); | 201 | esp_get_differential(esp); |
| @@ -216,7 +216,7 @@ static u8 sbus_esp_read8(struct esp *esp, unsigned long reg) | |||
| 216 | static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf, | 216 | static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf, |
| 217 | size_t sz, int dir) | 217 | size_t sz, int dir) |
| 218 | { | 218 | { |
| 219 | struct of_device *op = esp->dev; | 219 | struct platform_device *op = esp->dev; |
| 220 | 220 | ||
| 221 | return dma_map_single(&op->dev, buf, sz, dir); | 221 | return dma_map_single(&op->dev, buf, sz, dir); |
| 222 | } | 222 | } |
| @@ -224,7 +224,7 @@ static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf, | |||
| 224 | static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg, | 224 | static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg, |
| 225 | int num_sg, int dir) | 225 | int num_sg, int dir) |
| 226 | { | 226 | { |
| 227 | struct of_device *op = esp->dev; | 227 | struct platform_device *op = esp->dev; |
| 228 | 228 | ||
| 229 | return dma_map_sg(&op->dev, sg, num_sg, dir); | 229 | return dma_map_sg(&op->dev, sg, num_sg, dir); |
| 230 | } | 230 | } |
| @@ -232,7 +232,7 @@ static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg, | |||
| 232 | static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr, | 232 | static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr, |
| 233 | size_t sz, int dir) | 233 | size_t sz, int dir) |
| 234 | { | 234 | { |
| 235 | struct of_device *op = esp->dev; | 235 | struct platform_device *op = esp->dev; |
| 236 | 236 | ||
| 237 | dma_unmap_single(&op->dev, addr, sz, dir); | 237 | dma_unmap_single(&op->dev, addr, sz, dir); |
| 238 | } | 238 | } |
| @@ -240,7 +240,7 @@ static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr, | |||
| 240 | static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg, | 240 | static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg, |
| 241 | int num_sg, int dir) | 241 | int num_sg, int dir) |
| 242 | { | 242 | { |
| 243 | struct of_device *op = esp->dev; | 243 | struct platform_device *op = esp->dev; |
| 244 | 244 | ||
| 245 | dma_unmap_sg(&op->dev, sg, num_sg, dir); | 245 | dma_unmap_sg(&op->dev, sg, num_sg, dir); |
| 246 | } | 246 | } |
| @@ -256,7 +256,7 @@ static void sbus_esp_reset_dma(struct esp *esp) | |||
| 256 | { | 256 | { |
| 257 | int can_do_burst16, can_do_burst32, can_do_burst64; | 257 | int can_do_burst16, can_do_burst32, can_do_burst64; |
| 258 | int can_do_sbus64, lim; | 258 | int can_do_sbus64, lim; |
| 259 | struct of_device *op; | 259 | struct platform_device *op; |
| 260 | u32 val; | 260 | u32 val; |
| 261 | 261 | ||
| 262 | can_do_burst16 = (esp->bursts & DMA_BURST16) != 0; | 262 | can_do_burst16 = (esp->bursts & DMA_BURST16) != 0; |
| @@ -487,8 +487,8 @@ static const struct esp_driver_ops sbus_esp_ops = { | |||
| 487 | .dma_error = sbus_esp_dma_error, | 487 | .dma_error = sbus_esp_dma_error, |
| 488 | }; | 488 | }; |
| 489 | 489 | ||
| 490 | static int __devinit esp_sbus_probe_one(struct of_device *op, | 490 | static int __devinit esp_sbus_probe_one(struct platform_device *op, |
| 491 | struct of_device *espdma, | 491 | struct platform_device *espdma, |
| 492 | int hme) | 492 | int hme) |
| 493 | { | 493 | { |
| 494 | struct scsi_host_template *tpnt = &scsi_esp_template; | 494 | struct scsi_host_template *tpnt = &scsi_esp_template; |
| @@ -562,11 +562,11 @@ fail: | |||
| 562 | return err; | 562 | return err; |
| 563 | } | 563 | } |
| 564 | 564 | ||
| 565 | static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) | 565 | static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match) |
| 566 | { | 566 | { |
| 567 | struct device_node *dma_node = NULL; | 567 | struct device_node *dma_node = NULL; |
| 568 | struct device_node *dp = op->dev.of_node; | 568 | struct device_node *dp = op->dev.of_node; |
| 569 | struct of_device *dma_of = NULL; | 569 | struct platform_device *dma_of = NULL; |
| 570 | int hme = 0; | 570 | int hme = 0; |
| 571 | 571 | ||
| 572 | if (dp->parent && | 572 | if (dp->parent && |
| @@ -585,10 +585,10 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device | |||
| 585 | return esp_sbus_probe_one(op, dma_of, hme); | 585 | return esp_sbus_probe_one(op, dma_of, hme); |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | static int __devexit esp_sbus_remove(struct of_device *op) | 588 | static int __devexit esp_sbus_remove(struct platform_device *op) |
| 589 | { | 589 | { |
| 590 | struct esp *esp = dev_get_drvdata(&op->dev); | 590 | struct esp *esp = dev_get_drvdata(&op->dev); |
| 591 | struct of_device *dma_of = esp->dma; | 591 | struct platform_device *dma_of = esp->dma; |
| 592 | unsigned int irq = esp->host->irq; | 592 | unsigned int irq = esp->host->irq; |
| 593 | bool is_hme; | 593 | bool is_hme; |
| 594 | u32 val; | 594 | u32 val; |
