aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_rb532_cf.c
diff options
context:
space:
mode:
authorPhil Sutter <n0-1@freewrt.org>2009-01-27 08:35:53 -0500
committerJeff Garzik <jgarzik@redhat.com>2009-03-24 22:02:40 -0400
commit6be976e79db3ba691b657476a8bf4a635e5586f9 (patch)
treef500ea1a2b42873c2ed942cd37b9f7773596b829 /drivers/ata/pata_rb532_cf.c
parent180bd147f18316d92bd5f59aebc9932cabc03edd (diff)
pata-rb532-cf: drop custom freeze and thaw
I'm not quite sure what freezing and thawing is used for. Tests showed that the port is being frozen at initialisation state and thawed right afterwards, then the functions were not called anymore. Dropping the complete custom code for handling the frozen state seems to work at least for a standard use case including mounting a partition, copying some files in it (in parallel) and finally removing them and unmounting the partition. Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_rb532_cf.c')
-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/* ------------------------------------------------------------------------ */