aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_rb532_cf.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index 9fb91e4dd887..fbfee1bd85ff 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -48,26 +48,11 @@
48struct rb532_cf_info { 48struct rb532_cf_info {
49 void __iomem *iobase; 49 void __iomem *iobase;
50 unsigned int gpio_line; 50 unsigned int gpio_line;
51 int frozen;
52 unsigned int irq; 51 unsigned int irq;
53}; 52};
54 53
55/* ------------------------------------------------------------------------ */ 54/* ------------------------------------------------------------------------ */
56 55
57static void rb532_pata_freeze(struct ata_port *ap)
58{
59 struct rb532_cf_info *info = ap->host->private_data;
60
61 info->frozen = 1;
62}
63
64static void rb532_pata_thaw(struct ata_port *ap)
65{
66 struct rb532_cf_info *info = ap->host->private_data;
67
68 info->frozen = 0;
69}
70
71static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance) 56static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance)
72{ 57{
73 struct ata_host *ah = dev_instance; 58 struct ata_host *ah = dev_instance;
@@ -75,8 +60,7 @@ static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance)
75 60
76 if (gpio_get_value(info->gpio_line)) { 61 if (gpio_get_value(info->gpio_line)) {
77 set_irq_type(info->irq, IRQ_TYPE_LEVEL_LOW); 62 set_irq_type(info->irq, IRQ_TYPE_LEVEL_LOW);
78 if (!info->frozen) 63 ata_sff_interrupt(info->irq, dev_instance);
79 ata_sff_interrupt(info->irq, dev_instance);
80 } else { 64 } else {
81 set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH); 65 set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH);
82 } 66 }
@@ -87,8 +71,6 @@ static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance)
87static struct ata_port_operations rb532_pata_port_ops = { 71static struct ata_port_operations rb532_pata_port_ops = {
88 .inherits = &ata_sff_port_ops, 72 .inherits = &ata_sff_port_ops,
89 .sff_data_xfer = ata_sff_data_xfer32, 73 .sff_data_xfer = ata_sff_data_xfer32,
90 .freeze = rb532_pata_freeze,
91 .thaw = rb532_pata_thaw,
92}; 74};
93 75
94/* ------------------------------------------------------------------------ */ 76/* ------------------------------------------------------------------------ */