Google Groups Home
Help | Sign in
Support pcmcia slot on sharp sl-5500
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Pavel Machek  
View profile
 More options Oct 13 2005, 4:20 pm
Newsgroups: linux.kernel
From: Pavel Machek <pa...@ucw.cz>
Date: Thu, 13 Oct 2005 22:20:15 +0200
Local: Thurs, Oct 13 2005 4:20 pm
Subject: Support pcmcia slot on sharp sl-5500
Hi!

This adds support for pcmcia slot on sharp zaurus
sl-5500. pxa2xx_sharpsl.c thus becomes quite miss-named, but I guess
that is not worth fixing?

Signed-off-by: Pavel Machek <pa...@suse.cz>

diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -57,6 +57,7 @@ sa1111_cs-$(CONFIG_SA1100_JORNADA720)         +
 sa1100_cs-y                                    += sa1100_generic.o
 sa1100_cs-$(CONFIG_SA1100_ASSABET)             += sa1100_assabet.o
 sa1100_cs-$(CONFIG_SA1100_CERF)                        += sa1100_cerf.o
+sa1100_cs-$(CONFIG_SA1100_COLLIE)              += pxa2xx_sharpsl.o
 sa1100_cs-$(CONFIG_SA1100_H3600)               += sa1100_h3600.o
 sa1100_cs-$(CONFIG_SA1100_SHANNON)             += sa1100_shannon.o
 sa1100_cs-$(CONFIG_SA1100_SIMPAD)              += sa1100_simpad.o
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -18,10 +18,15 @@
 #include <linux/interrupt.h>
 #include <linux/device.h>

+#include <asm/mach-types.h>
 #include <asm/hardware.h>
 #include <asm/irq.h>
 #include <asm/hardware/scoop.h>
-#include <asm/arch/pxa-regs.h>
+#ifdef CONFIG_SA1100_COLLIE
+#include <asm/arch-sa1100/collie.h>
+#else
+#include <asm/arch-pxa/pxa-regs.h>
+#endif

 #include "soc_common.h"

@@ -38,6 +43,7 @@ static int sharpsl_pcmcia_hw_init(struct
 {
        int ret;

+#ifndef CONFIG_SA1100_COLLIE
        /*
         * Setup default state of GPIO outputs
         * before we enable them as outputs.
@@ -60,6 +66,7 @@ static int sharpsl_pcmcia_hw_init(struct
        pxa_gpio_mode(GPIO55_nPREG_MD);
        pxa_gpio_mode(GPIO56_nPWAIT_MD);
        pxa_gpio_mode(GPIO57_nIOIS16_MD);
+#endif

        /* Register interrupts */
        if (scoop_devs[skt->nr].cd_irq >= 0) {
@@ -213,12 +219,20 @@ static void sharpsl_pcmcia_socket_init(s
        write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_IMR, 0x00C0);
        write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_MCR, 0x0101);
        scoop_devs[skt->nr].keep_vs = NO_KEEP_VS;
+
+       if (machine_is_collie())
+               /* We need to disable SS_OUTPUT_ENA here. */
+               write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR, read_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR) & ~0x0080);
 }

 static void sharpsl_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
 {
        /* CF_BUS_OFF */
        sharpsl_pcmcia_init_reset(&scoop_devs[skt->nr]);
+
+       if (machine_is_collie())
+               /* We need to disable SS_OUTPUT_ENA here. */
+               write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR, read_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR) & ~0x0080);
 }

 static struct pcmcia_low_level sharpsl_pcmcia_ops = {
@@ -235,6 +249,19 @@ static struct pcmcia_low_level sharpsl_p

 static struct platform_device *sharpsl_pcmcia_device;

+#ifdef CONFIG_SA1100_COLLIE
+int __init pcmcia_collie_init(struct device *dev)
+{
+       int ret = -ENODEV;
+
+       if (machine_is_collie())
+               ret = sa11xx_drv_pcmcia_probe(dev, &sharpsl_pcmcia_ops, 0, 1);
+
+       return ret;
+}
+
+#else
+
 static int __init sharpsl_pcmcia_init(void)
 {
        int ret;
@@ -269,6 +296,7 @@ static void __exit sharpsl_pcmcia_exit(v

 fs_initcall(sharpsl_pcmcia_init);
 module_exit(sharpsl_pcmcia_exit);
+#endif

 MODULE_DESCRIPTION("Sharp SL Series PCMCIA Support");
 MODULE_LICENSE("GPL");
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c
--- a/drivers/pcmcia/sa1100_generic.c
+++ b/drivers/pcmcia/sa1100_generic.c
@@ -38,8 +38,12 @@
 #include <pcmcia/cs.h>
 #include <pcmcia/ss.h>

+#include <asm/hardware/scoop.h>
+
 #include "sa1100_generic.h"

+int __init pcmcia_collie_init(struct device *dev);
+
 static int (*sa11x0_pcmcia_hw_init[])(struct device *dev) = {
 #ifdef CONFIG_SA1100_ASSABET
        pcmcia_assabet_init,
@@ -56,6 +60,9 @@ static int (*sa11x0_pcmcia_hw_init[])(st
 #ifdef CONFIG_SA1100_SIMPAD
        pcmcia_simpad_init,
 #endif
+#ifdef CONFIG_SA1100_COLLIE
+       pcmcia_collie_init,
+#endif
 };

 static int sa11x0_drv_pcmcia_probe(struct device *dev)

--
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google