Lines Matching +full:0 +full:x1740
22 #define DATA_REG 0x100
23 #define SDEVCON_REG 0x138
26 #define ATAPI_CONTROL1_REG 0x180
27 #define ATAPI_STATUS_REG 0x184
28 #define ATAPI_INT_ENABLE_REG 0x188
29 #define ATAPI_DTB_ADR_REG 0x198
30 #define ATAPI_DMA_START_ADR_REG 0x19C
31 #define ATAPI_DMA_TRANS_CNT_REG 0x1A0
32 #define ATAPI_CONTROL2_REG 0x1A4
33 #define ATAPI_SIG_ST_REG 0x1B0
34 #define ATAPI_BYTE_SWAP_REG 0x1BC
43 #define ATAPI_CONTROL1_START BIT(0)
52 #define ATAPI_STATUS_ACT BIT(0)
61 #define ATAPI_INT_ENABLE_ACT BIT(0)
64 #define SATAPHYADDR_REG 0x200
65 #define SATAPHYWDATA_REG 0x204
66 #define SATAPHYACCEN_REG 0x208
67 #define SATAPHYRESET_REG 0x20C
68 #define SATAPHYRDATA_REG 0x210
69 #define SATAPHYACK_REG 0x214
77 #define SATAPHYACCEN_PHYLANE BIT(0)
81 #define SATAPHYRESET_PHYSRES BIT(0)
84 #define SATAPHYACK_PHYACK BIT(0)
87 #define BISTCONF_REG 0x102C
88 #define SDATA_REG 0x1100
89 #define SSDEVCON_REG 0x1204
91 #define SCRSSTS_REG 0x1400
92 #define SCRSERR_REG 0x1404
93 #define SCRSCON_REG 0x1408
94 #define SCRSACT_REG 0x140C
96 #define SATAINTSTAT_REG 0x1508
97 #define SATAINTMASK_REG 0x150C
101 #define SATAINTSTAT_ATA BIT(0)
107 #define SATAINTMASK_ATAMSK BIT(0)
108 #define SATAINTMASK_ALL_GEN1 0x7ff
109 #define SATAINTMASK_ALL_GEN2 0xfff
115 #define SATAPCTLR1_REG 0x43
116 #define SATAPCTLR2_REG 0x52
117 #define SATAPCTLR3_REG 0x5A
118 #define SATAPCTLR4_REG 0x60
120 /* Descriptor table word 0 bit (when DTA32M = 1) */
121 #define SATA_RCAR_DTEND BIT(0)
123 #define SATA_RCAR_DMA_BOUNDARY 0x1FFFFFFFUL
126 #define RCAR_GEN2_PHY_CTL1_REG 0x1704
127 #define RCAR_GEN2_PHY_CTL1 0x34180002
128 #define RCAR_GEN2_PHY_CTL1_SS 0xC180 /* Spread Spectrum */
130 #define RCAR_GEN2_PHY_CTL2_REG 0x170C
131 #define RCAR_GEN2_PHY_CTL2 0x00002303
133 #define RCAR_GEN2_PHY_CTL3_REG 0x171C
134 #define RCAR_GEN2_PHY_CTL3 0x000B0194
136 #define RCAR_GEN2_PHY_CTL4_REG 0x1724
137 #define RCAR_GEN2_PHY_CTL4 0x00030994
139 #define RCAR_GEN2_PHY_CTL5_REG 0x1740
140 #define RCAR_GEN2_PHY_CTL5 0x03004001
162 iowrite32(0, base + SATAPHYADDR_REG); in sata_rcar_gen1_phy_preinit()
167 iowrite32(0, base + SATAPHYRESET_REG); in sata_rcar_gen1_phy_preinit()
177 iowrite32(0, base + SATAPHYRESET_REG); in sata_rcar_gen1_phy_write()
188 for (timeout = 0; timeout < 100; timeout++) { in sata_rcar_gen1_phy_write()
196 iowrite32(0, base + SATAPHYADDR_REG); in sata_rcar_gen1_phy_write()
202 sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0); in sata_rcar_gen1_phy_init()
203 sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1); in sata_rcar_gen1_phy_init()
204 sata_rcar_gen1_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0); in sata_rcar_gen1_phy_init()
205 sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0); in sata_rcar_gen1_phy_init()
206 sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1); in sata_rcar_gen1_phy_init()
207 sata_rcar_gen1_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0); in sata_rcar_gen1_phy_init()
294 iowrite32(0x55, ioaddr->nsect_addr); in sata_rcar_ata_devchk()
295 iowrite32(0xaa, ioaddr->lbal_addr); in sata_rcar_ata_devchk()
297 iowrite32(0xaa, ioaddr->nsect_addr); in sata_rcar_ata_devchk()
298 iowrite32(0x55, ioaddr->lbal_addr); in sata_rcar_ata_devchk()
300 iowrite32(0x55, ioaddr->nsect_addr); in sata_rcar_ata_devchk()
301 iowrite32(0xaa, ioaddr->lbal_addr); in sata_rcar_ata_devchk()
306 if (nsect == 0x55 && lbal == 0xaa) in sata_rcar_ata_devchk()
309 return 0; /* nothing found */ in sata_rcar_ata_devchk()
344 unsigned int devmask = 0; in sata_rcar_softreset()
348 /* determine if device 0 is present */ in sata_rcar_softreset()
349 if (sata_rcar_ata_devchk(ap, 0)) in sata_rcar_softreset()
350 devmask |= 1 << 0; in sata_rcar_softreset()
362 classes[0] = ata_sff_dev_classify(&link->device[0], devmask, &err); in sata_rcar_softreset()
364 DPRINTK("classes[0]=%u\n", classes[0]); in sata_rcar_softreset()
365 return 0; in sata_rcar_softreset()
386 VPRINTK("hob: feat 0x%X nsect 0x%X, lba 0x%X 0x%X 0x%X\n", in sata_rcar_tf_load()
400 VPRINTK("feat 0x%X nsect 0x%X lba 0x%X 0x%X 0x%X\n", in sata_rcar_tf_load()
410 VPRINTK("device 0x%X\n", tf->device); in sata_rcar_tf_load()
443 DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command); in sata_rcar_exec_command()
464 if (unlikely(buflen & 0x01)) { in sata_rcar_data_xfer()
476 *buf = pad[0]; in sata_rcar_data_xfer()
478 pad[0] = *buf; in sata_rcar_data_xfer()
498 for (count = 0; (ap->ops->sff_check_status(ap) & ATA_DRQ) && in sata_rcar_drain_fifo()
514 return 0; in sata_rcar_scr_read()
524 return 0; in sata_rcar_scr_write()
546 VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", si, addr, sg_len); in sata_rcar_bmdma_fill_sg()
619 /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ in sata_rcar_bmdma_stop()
626 u8 host_stat = 0; in sata_rcar_bmdma_status()
681 int freeze = 0; in sata_rcar_serr_interrupt()
688 DPRINTK("SError @host_intr: 0x%x\n", serror); in sata_rcar_serr_interrupt()
698 freeze = serror & SERR_COMM_WAKE ? 0 : 1; in sata_rcar_serr_interrupt()
711 int handled = 0; in sata_rcar_ata_interrupt()
727 unsigned int handled = 0; in sata_rcar_interrupt()
741 ap = host->ports[0]; in sata_rcar_interrupt()
758 struct ata_port *ap = host->ports[0]; in sata_rcar_setup_port()
798 /* ISM mode, PRD mode, DTEND flag at bit 0 */ in sata_rcar_init_module()
811 iowrite32(0, base + SATAINTSTAT_REG); in sata_rcar_init_module()
893 int ret = 0; in sata_rcar_probe()
895 irq = platform_get_irq(pdev, 0); in sata_rcar_probe()
896 if (irq < 0) in sata_rcar_probe()
909 if (ret < 0) in sata_rcar_probe()
920 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); in sata_rcar_probe()
933 ret = ata_host_activate(host, irq, sata_rcar_interrupt, 0, in sata_rcar_probe()
936 return 0; in sata_rcar_probe()
953 iowrite32(0, base + ATAPI_INT_ENABLE_REG); in sata_rcar_remove()
955 iowrite32(0, base + SATAINTSTAT_REG); in sata_rcar_remove()
961 return 0; in sata_rcar_remove()
975 iowrite32(0, base + ATAPI_INT_ENABLE_REG); in sata_rcar_suspend()
993 if (ret < 0) { in sata_rcar_resume()
1002 iowrite32(0, base + SATAINTSTAT_REG); in sata_rcar_resume()
1012 return 0; in sata_rcar_resume()
1021 if (ret < 0) { in sata_rcar_restore()
1033 return 0; in sata_rcar_restore()