Blackfin pata-bf54x driver: Add debug information

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by Sonic Zhang and committed by Jeff Garzik f9204112 a315acda

+19 -18
+19 -18
drivers/ata/pata_bf54x.c
··· 299 299 */ 300 300 n6 = num_clocks_min(t6min, fsclk); 301 301 if (mode >= 0 && mode <= 4 && n6 >= 1) { 302 - pr_debug("set piomode: mode=%d, fsclk=%ud\n", mode, fsclk); 302 + dev_dbg(adev->ap->dev, "set piomode: mode=%d, fsclk=%ud\n", mode, fsclk); 303 303 /* calculate the timing values for register transfers. */ 304 304 while (mode > 0 && pio_fsclk[mode] > fsclk) 305 305 mode--; ··· 376 376 377 377 mode = adev->dma_mode - XFER_UDMA_0; 378 378 if (mode >= 0 && mode <= 5) { 379 - pr_debug("set udmamode: mode=%d\n", mode); 379 + dev_dbg(adev->ap->dev, "set udmamode: mode=%d\n", mode); 380 380 /* the most restrictive timing value is t6 and tc, 381 381 * the DIOW - data hold. If one SCLK pulse is longer 382 382 * than this minimum value then register ··· 433 433 434 434 mode = adev->dma_mode - XFER_MW_DMA_0; 435 435 if (mode >= 0 && mode <= 2) { 436 - pr_debug("set mdmamode: mode=%d\n", mode); 436 + dev_dbg(adev->ap->dev, "set mdmamode: mode=%d\n", mode); 437 437 /* the most restrictive timing value is tf, the DMACK to 438 438 * read data released. If one SCLK pulse is longer than 439 439 * this maximum value then the MDMA mode ··· 697 697 write_atapi_register(base, ATA_REG_LBAL, tf->hob_lbal); 698 698 write_atapi_register(base, ATA_REG_LBAM, tf->hob_lbam); 699 699 write_atapi_register(base, ATA_REG_LBAH, tf->hob_lbah); 700 - pr_debug("hob: feat 0x%X nsect 0x%X, lba 0x%X " 700 + dev_dbg(ap->dev, "hob: feat 0x%X nsect 0x%X, lba 0x%X " 701 701 "0x%X 0x%X\n", 702 702 tf->hob_feature, 703 703 tf->hob_nsect, ··· 711 711 write_atapi_register(base, ATA_REG_LBAL, tf->lbal); 712 712 write_atapi_register(base, ATA_REG_LBAM, tf->lbam); 713 713 write_atapi_register(base, ATA_REG_LBAH, tf->lbah); 714 - pr_debug("feat 0x%X nsect 0x%X lba 0x%X 0x%X 0x%X\n", 714 + dev_dbg(ap->dev, "feat 0x%X nsect 0x%X lba 0x%X 0x%X 0x%X\n", 715 715 tf->feature, 716 716 tf->nsect, 717 717 tf->lbal, ··· 721 721 722 722 if (tf->flags & ATA_TFLAG_DEVICE) { 723 723 write_atapi_register(base, ATA_REG_DEVICE, tf->device); 724 - pr_debug("device 0x%X\n", tf->device); 724 + dev_dbg(ap->dev, "device 0x%X\n", tf->device); 725 725 } 726 726 727 727 ata_wait_idle(ap); ··· 782 782 const struct ata_taskfile *tf) 783 783 { 784 784 void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; 785 - pr_debug("ata%u: cmd 0x%X\n", ap->print_id, tf->command); 785 + dev_dbg(ap->dev, "ata%u: cmd 0x%X\n", ap->print_id, tf->command); 786 786 787 787 write_atapi_register(base, ATA_REG_CMD, tf->command); 788 788 ata_pause(ap); ··· 834 834 struct scatterlist *sg; 835 835 unsigned int si; 836 836 837 - pr_debug("in atapi dma setup\n"); 837 + dev_dbg(qc->ap->dev, "in atapi dma setup\n"); 838 838 /* Program the ATA_CTRL register with dir */ 839 839 if (qc->tf.flags & ATA_TFLAG_WRITE) { 840 840 /* fill the ATAPI DMA controller */ ··· 870 870 struct scatterlist *sg; 871 871 unsigned int si; 872 872 873 - pr_debug("in atapi dma start\n"); 873 + dev_dbg(qc->ap->dev, "in atapi dma start\n"); 874 874 if (!(ap->udma_mask || ap->mwdma_mask)) 875 875 return; 876 876 ··· 888 888 sg_dma_address(sg) + sg_dma_len(sg)); 889 889 } 890 890 enable_dma(CH_ATAPI_TX); 891 - pr_debug("enable udma write\n"); 891 + dev_dbg(qc->ap->dev, "enable udma write\n"); 892 892 893 893 /* Send ATA DMA write command */ 894 894 bfin_exec_command(ap, &qc->tf); ··· 898 898 | XFER_DIR)); 899 899 } else { 900 900 enable_dma(CH_ATAPI_RX); 901 - pr_debug("enable udma read\n"); 901 + dev_dbg(qc->ap->dev, "enable udma read\n"); 902 902 903 903 /* Send ATA DMA read command */ 904 904 bfin_exec_command(ap, &qc->tf); ··· 936 936 struct scatterlist *sg; 937 937 unsigned int si; 938 938 939 - pr_debug("in atapi dma stop\n"); 939 + dev_dbg(qc->ap->dev, "in atapi dma stop\n"); 940 940 if (!(ap->udma_mask || ap->mwdma_mask)) 941 941 return; 942 942 ··· 1157 1157 host_stat |= ATA_DMA_ERR; 1158 1158 } 1159 1159 1160 + dev_dbg(ap->dev, "ATAPI: host_stat=0x%x\n", host_stat); 1161 + 1160 1162 return host_stat; 1161 1163 } 1162 1164 ··· 1215 1213 { 1216 1214 void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; 1217 1215 1218 - pr_debug("in atapi irq clear\n"); 1219 - 1216 + dev_dbg(ap->dev, "in atapi irq clear\n"); 1220 1217 ATAPI_SET_INT_STATUS(base, ATAPI_GET_INT_STATUS(base)|ATAPI_DEV_INT 1221 1218 | MULTI_DONE_INT | UDMAIN_DONE_INT | UDMAOUT_DONE_INT 1222 1219 | MULTI_TERM_INT | UDMAIN_TERM_INT | UDMAOUT_TERM_INT); ··· 1233 1232 void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; 1234 1233 u8 tmp; 1235 1234 1236 - pr_debug("in atapi irq on\n"); 1235 + dev_dbg(ap->dev, "in atapi irq on\n"); 1237 1236 ap->ctl &= ~ATA_NIEN; 1238 1237 ap->last_ctl = ap->ctl; 1239 1238 ··· 1256 1255 { 1257 1256 void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; 1258 1257 1259 - pr_debug("in atapi dma freeze\n"); 1258 + dev_dbg(ap->dev, "in atapi dma freeze\n"); 1260 1259 ap->ctl |= ATA_NIEN; 1261 1260 ap->last_ctl = ap->ctl; 1262 1261 ··· 1329 1328 1330 1329 static void bfin_port_stop(struct ata_port *ap) 1331 1330 { 1332 - pr_debug("in atapi port stop\n"); 1331 + dev_dbg(ap->dev, "in atapi port stop\n"); 1333 1332 if (ap->udma_mask != 0 || ap->mwdma_mask != 0) { 1334 1333 free_dma(CH_ATAPI_RX); 1335 1334 free_dma(CH_ATAPI_TX); ··· 1338 1337 1339 1338 static int bfin_port_start(struct ata_port *ap) 1340 1339 { 1341 - pr_debug("in atapi port start\n"); 1340 + dev_dbg(ap->dev, "in atapi port start\n"); 1342 1341 if (!(ap->udma_mask || ap->mwdma_mask)) 1343 1342 return 0; 1344 1343