mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: linux-pcmcia@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, dbrownell@users.sourceforge.net,
	andrew@sanpeople.com
Subject: [RFC PATCH 1/11] pcmcia: at91_cf update
Date: Wed, 25 Oct 2006 22:11:43 -0400	[thread overview]
Message-ID: <20061026021143.GB20473@dominikbrodowski.de> (raw)
In-Reply-To: <20061026021027.GA20473@dominikbrodowski.de>

From: David Brownell <david-b@pacbell.net>
Date: Sat, 1 Jul 2006 13:39:55 -0700
Subject: [PATCH] pcmcia: at91_cf update

More correct AT91 CF wakeup logic ... only enable/disable the IRQ wakeup
capability, not the IRQ itself.  That way the we know that the IRQ will be
disabled correctly, in suspend/resume logic instead of ARM IRQ code.

Most of the pin multiplexing setup has moved to the devices.c setup code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
 drivers/pcmcia/at91_cf.c |   25 +++++++------------------
 1 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 7f5df9a..f8db6e3 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -241,12 +241,6 @@ static int __init at91_cf_probe(struct p
 	csa = at91_sys_read(AT91_EBI_CSA);
 	at91_sys_write(AT91_EBI_CSA, csa | AT91_EBI_CS4A_SMC_COMPACTFLASH);
 
-	/* force poweron defaults for these pins ... */
-	(void) at91_set_A_periph(AT91_PIN_PC9, 0);	/* A25/CFRNW */
-	(void) at91_set_A_periph(AT91_PIN_PC10, 0);	/* NCS4/CFCS */
-	(void) at91_set_A_periph(AT91_PIN_PC11, 0);	/* NCS5/CFCE1 */
-	(void) at91_set_A_periph(AT91_PIN_PC12, 0);	/* NCS6/CFCE2 */
-
 	/* nWAIT is _not_ a default setting */
 	(void) at91_set_A_periph(AT91_PIN_PC6, 1);	/*  nWAIT */
 
@@ -322,6 +316,7 @@ fail1:
 	if (board->irq_pin)
 		free_irq(board->irq_pin, cf);
 fail0a:
+	device_init_wakeup(&pdev->dev, 0);
 	free_irq(board->det_pin, cf);
 	device_init_wakeup(&pdev->dev, 0);
 fail0:
@@ -360,26 +355,20 @@ static int at91_cf_suspend(struct platfo
 	struct at91_cf_data	*board = cf->board;
 
 	pcmcia_socket_dev_suspend(&pdev->dev, mesg);
-	if (device_may_wakeup(&pdev->dev))
+	if (device_may_wakeup(&pdev->dev)) {
 		enable_irq_wake(board->det_pin);
-	else {
+		if (board->irq_pin)
+			enable_irq_wake(board->irq_pin);
+	} else {
 		disable_irq_wake(board->det_pin);
-		disable_irq(board->det_pin);
+		if (board->irq_pin)
+			disable_irq_wake(board->irq_pin);
 	}
-	if (board->irq_pin)
-		disable_irq(board->irq_pin);
 	return 0;
 }
 
 static int at91_cf_resume(struct platform_device *pdev)
 {
-	struct at91_cf_socket	*cf = platform_get_drvdata(pdev);
-	struct at91_cf_data	*board = cf->board;
-
-	if (board->irq_pin)
-		enable_irq(board->irq_pin);
-	if (!device_may_wakeup(&pdev->dev))
-		enable_irq(board->det_pin);
 	pcmcia_socket_dev_resume(&pdev->dev);
 	return 0;
 }
-- 
1.4.3


  reply	other threads:[~2006-10-26  2:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26  2:10 [RFC PATCH 0/11] pcmcia: bugfixes for 2.6.19-rc3 Dominik Brodowski
2006-10-26  2:11 ` Dominik Brodowski [this message]
2006-10-26  2:12 ` [RFC PATCH 2/11] pcmcia: add more IDs to hostap_cs.c Dominik Brodowski
2006-10-26  2:13 ` [RFC PATCH 3/11] pcmcia: update alloc_io_space for conflict checking for multifunction PC card Dominik Brodowski
2006-10-26  2:13 ` [RFC PATCH 4/11] pcmcia/ds: driver layer error checking Dominik Brodowski
2006-10-26  2:14 ` [RFC PATCH 5/11] CONFIG_PM=n slim: drivers/pcmcia/* Dominik Brodowski
2006-10-26  2:14 ` [RFC PATCH 6/11] i82092: wire up errors from pci_register_driver() Dominik Brodowski
2006-10-26  2:15 ` [RFC PATCH 7/11] pcmcia: au1000_generic fix Dominik Brodowski
2006-10-26  2:16 ` [RFC PATCH 8/11] ioremap balanced with iounmap for drivers/pcmcia Dominik Brodowski
2006-10-26  2:17 ` [RFC PATCH 9/11] Export soc_common_drv_pcmcia_remove to allow modular PCMCIA Dominik Brodowski
2006-10-26  2:17 ` [RFC PATCH 10/11] PCMCIA: handle sysfs, PCI errors Dominik Brodowski
2006-10-26  2:18 ` [RFC PATCH 11/11] PCMCIA: fix __must_check warnings Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061026021143.GB20473@dominikbrodowski.de \
    --to=linux@dominikbrodowski.net \
    --cc=andrew@sanpeople.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®