Lines Matching +full:ixp4xx +full:- +full:compact +full:- +full:flash
1 // SPDX-License-Identifier: GPL-2.0-only
14 * ixp4xx PATA/Compact Flash driver
15 * Copyright (C) 2006-07 Tower Technologies
52 struct device *dev = &pdev->dev; in palmld_pata_probe()
57 return -ENOMEM; in palmld_pata_probe()
60 lda->host = ata_host_alloc(dev, 1); in palmld_pata_probe()
61 if (!lda->host) in palmld_pata_probe()
62 return -ENOMEM; in palmld_pata_probe()
70 lda->power = devm_gpiod_get(dev, "power", GPIOD_OUT_HIGH); in palmld_pata_probe()
71 if (IS_ERR(lda->power)) in palmld_pata_probe()
72 return PTR_ERR(lda->power); in palmld_pata_probe()
73 lda->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in palmld_pata_probe()
74 if (IS_ERR(lda->reset)) { in palmld_pata_probe()
75 gpiod_set_value(lda->power, 0); in palmld_pata_probe()
76 return PTR_ERR(lda->reset); in palmld_pata_probe()
80 gpiod_set_value(lda->reset, 1); in palmld_pata_probe()
82 gpiod_set_value(lda->reset, 0); in palmld_pata_probe()
86 ap = lda->host->ports[0]; in palmld_pata_probe()
87 ap->ops = &palmld_port_ops; in palmld_pata_probe()
88 ap->pio_mask = ATA_PIO4; in palmld_pata_probe()
89 ap->flags |= ATA_FLAG_PIO_POLLING; in palmld_pata_probe()
92 ap->ioaddr.cmd_addr = mem + 0x10; in palmld_pata_probe()
93 ap->ioaddr.altstatus_addr = mem + 0xe; in palmld_pata_probe()
94 ap->ioaddr.ctl_addr = mem + 0xe; in palmld_pata_probe()
97 ata_sff_std_ports(&ap->ioaddr); in palmld_pata_probe()
100 ret = ata_host_activate(lda->host, 0, NULL, IRQF_TRIGGER_RISING, in palmld_pata_probe()
104 gpiod_set_value(lda->power, 0); in palmld_pata_probe()
119 gpiod_set_value(lda->power, 0); in palmld_pata_remove()