From johnr at wowway.com  Thu May  1 19:54:47 2008
From: johnr at wowway.com (John R.)
Date: Thu, 01 May 2008 18:54:47 -0500
Subject: Problem with Oxford 950 2xRS232
Message-ID: <481A5847.4010504@wowway.com>

Hello,

I have a SerialGear 2 port PCMCIA card that (according to the 
manufacturer) has an Oxford 950 chip.  It should have a 16C950 UART.

I cannot get this working on my vanilla 2.6.24.3 kernel (pcmciautils 
014) and a recent Ubuntu livecd (8.04).  The laptop is a Panasonic 
Toughbook CF-18.  Other PCMCIA cards work.

On insert:

May  1 18:36:35 laptop pccard: PCMCIA card inserted into slot 0
May  1 18:36:35 laptop pcmcia: registering new device pcmcia0.0
May  1 18:36:36 laptop 0.0: ttyS1 at I/O 0x3108 (irq = 9) is a 16450

Only one port detected and the UART appears to be incorrect.  I used 
setserial to change it to 16950 but had the same non-working results. 
In the code for serial_cs.c I see a reference to forcing a single port 
(I could be reading things wrong).

laptop # lspcmcia -v
Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:00.0)
         Configuration:  state: on       ready: yes
                         Voltage: 3.3V Vcc: 3.3V Vpp: 0.0V
Socket 0 Device 0:      [serial_cs]             (bus ID: 0.0)
         Configuration:  state: on
         Product Name:   PC CARD GENERIC
         Identification: manf_id: 0x0279 card_id: 0x950b
                         function: 2 (serial)
                         prod_id(1): "PC CARD" (0x6a1d140a)
                         prod_id(2): "GENERIC" (0x346680b7)
                         prod_id(3): --- (---)
                         prod_id(4): --- (---)
Socket 1 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:00.1)
         Configuration:  state: on       ready: yes

Nothing appears in lspci output for this card.  Another CardBus card 
that was tried does (and this 2xRS232 card should be CardBus).

 From /proc/interrupts:

   9:     337434    XT-PIC-XT        acpi, ehci_hcd:usb1, uhci_hcd:usb2, 
uhci_hcd:usb3, uhci_hcd:usb4, yenta, yenta, ipw2200, eth0, Intel ICH6, 
sdhci:slot0, i915 at pci:0000:00:02.0

I can provide kernel config as needed, but for sure "Support for sharing 
serial interrupts" is enabled as well as most of the options that seemed 
appropriate.

I tried to use minicom and kermit to access my 9600 baud devices and 
they do not work.  On *exit* of these tools I have seen one of the 
devices indicate that it has made a connection with the host computer.

 From the mailing list archives is this thread which seems similar to my 
problem (a different card):

http://lists.infradead.org/pipermail/linux-pcmcia/2006-December/004280.html

Any ideas?

Thanks,

John


From bunk at kernel.org  Mon May  5 14:25:52 2008
From: bunk at kernel.org (Adrian Bunk)
Date: Mon, 5 May 2008 21:25:52 +0300
Subject: [2.6 patch] pcmcia: kill IN_CARD_SERVICES
Message-ID: <20080505182552.GU17139@cs181133002.pp.htv.fi>

IN_CARD_SERVICES was #define'd but not used, so let's remove it.

Signed-off-by: Adrian Bunk <bunk at kernel.org>

---

This patch hasbeen sent on:
- 17 Apr 2008

 drivers/pcmcia/cardbus.c         |    1 -
 drivers/pcmcia/cs.c              |    1 -
 drivers/pcmcia/ds.c              |    1 -
 drivers/pcmcia/pcmcia_ioctl.c    |    1 -
 drivers/pcmcia/pcmcia_resource.c |    1 -
 drivers/pcmcia/socket_sysfs.c    |    1 -
 6 files changed, 6 deletions(-)

cb5bd5e7e5b70225228c7b33bea4a7c82061e657 diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
index 714baae..dc8aca1 100644
--- a/drivers/pcmcia/cardbus.c
+++ b/drivers/pcmcia/cardbus.c
@@ -30,7 +30,6 @@
 #include <asm/irq.h>
 #include <asm/io.h>
 
-#define IN_CARD_SERVICES
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 56230db..1f3eb86 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -32,7 +32,6 @@
 #include <asm/system.h>
 #include <asm/irq.h>
 
-#define IN_CARD_SERVICES
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 5a85871..4f6a6cf 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -25,7 +25,6 @@
 #include <linux/kref.h>
 #include <linux/dma-mapping.h>
 
-#define IN_CARD_SERVICES
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 27523c5..9e507ba 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -29,7 +29,6 @@
 #include <linux/pci.h>
 #include <linux/workqueue.h>
 
-#define IN_CARD_SERVICES
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 1d128fb..31f1c5d 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -21,7 +21,6 @@
 #include <linux/pci.h>
 #include <linux/device.h>
 
-#define IN_CARD_SERVICES
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c
index b440900..2b8531f 100644
--- a/drivers/pcmcia/socket_sysfs.c
+++ b/drivers/pcmcia/socket_sysfs.c
@@ -27,7 +27,6 @@
 #include <asm/system.h>
 #include <asm/irq.h>
 
-#define IN_CARD_SERVICES
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>



From bugme-daemon at bugzilla.kernel.org  Tue May  6 16:22:30 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Tue,  6 May 2008 13:22:30 -0700 (PDT)
Subject: [Bug 7215] PCMCIA network card causes either X or kernel to freeze
In-Reply-To: <bug-7215-4463@http.bugzilla.kernel.org/>
Message-ID: <20080506202230.E85A4108038@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=7215


stefan at hegny.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stefan at hegny.de




------- Comment #15 from stefan at hegny.de  2008-05-06 13:22 -------
Seems I have exactly the same problem on a TP23 with Debian 4.0, 2.6.18.
Description matches, I can provoke the error by more network traffic via the
card.
If debugging help still needed, I can jump in.

Regards,
Stefan

> Eric, any updates on this? How is it working with recent kernel?
> 


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From bugme-daemon at bugzilla.kernel.org  Tue May  6 16:44:55 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Tue,  6 May 2008 13:44:55 -0700 (PDT)
Subject: [Bug 7215] PCMCIA network card causes either X or kernel to freeze
In-Reply-To: <bug-7215-4463@http.bugzilla.kernel.org/>
Message-ID: <20080506204455.7C192108060@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=7215





------- Comment #16 from protasnb at gmail.com  2008-05-06 13:44 -------
I can suggest git bisect since you have good working version. You can try to
identify what breaks it going from 2.6.8 to 2.6.9 say. See
http://www.kernel.org/doc/local/git-quick.html

It is a bit elaborate process, but it should show a kernel change that impaired
your laptop.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From linux at schindele.name  Fri May  9 16:29:34 2008
From: linux at schindele.name (=?iso-8859-1?q?J=FCrgen_Schindele?=)
Date: Fri, 9 May 2008 22:29:34 +0200
Subject: Support for trizeps modules
Message-ID: <200805092229.35121.linux@schindele.name>

Hello developers,
in mainline kernel support for trizeps SoM
is now available since several versions now.

now i'd like to commit trizeps pcmcia function 
to kernel mainline. Here is the source code 
for pcmcia on trizeps modules.
 
please feel free to comment and tell me what
do to bring this to mainline kernel.
-- 
J?rgen Schindele
Linux for Trizeps Modules
www.schindele.name
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pxa2xx_trizeps4.c
Type: text/x-csrc
Size: 5889 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20080509/5d272872/attachment.bin 

From bugme-daemon at bugzilla.kernel.org  Sat May 10 05:41:24 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Sat, 10 May 2008 02:41:24 -0700 (PDT)
Subject: [Bug 10661] New: PCMCIA: CompactFlash card can't be mounted.
Message-ID: <bug-10661-4463@http.bugzilla.kernel.org/>

http://bugzilla.kernel.org/show_bug.cgi?id=10661

           Summary: PCMCIA: CompactFlash card can't be mounted.
           Product: Drivers
           Version: 2.5
     KernelVersion: 2.6.25.3
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: PCMCIA
        AssignedTo: linux-pcmcia at lists.infradead.org
        ReportedBy: akbara13 at gmail.com


Latest working kernel version: 2.6.24
Earliest failing kernel version:
Distribution:
Hardware Environment: IBM t-43, PCMCIA card-reader Transcend CompactFlash
Adapter, CF-card Kingston ElitePro.
Software Environment:
Problem Description:
I cannot mount my CF-card via PCMCIA card-reader.
dmesg:
[  657.489156] pccard: PCMCIA card inserted into slot 0
[  657.489683] pcmcia: registering new device pcmcia0.0
[  657.533449] scsi4 : pata_pcmcia
[  657.533501] ata5: PATA max PIO0 cmd 0x4100 ctl 0x410e irq 5
[  657.682481] ata5.00: CFA: ELITE PRO CF CARD 1GB, 20070131, max MWDMA4
[  657.682489] ata5.00: 1989792 sectors, multi 0: LBA 
[  657.685331] ata5.00: configured for PIO0
[  657.691049] ata5.00: configured for PIO0
[  657.691054] ata5: EH complete
[  657.691569] scsi 4:0:0:0: Direct-Access     ATA      ELITE PRO CF CAR 2007
PQ
: 0 ANSI: 5
[  657.692149] sd 4:0:0:0: [sdb] 1989792 512-byte hardware sectors (1019 MB)
[  657.692304] sd 4:0:0:0: [sdb] Write Protect is off
[  657.692309] sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[  657.692544] sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled,
doe
sn't support DPO or FUA
[  657.692909] sd 4:0:0:0: [sdb] 1989792 512-byte hardware sectors (1019 MB)
[  657.693045] sd 4:0:0:0: [sdb] Write Protect is off
[  657.693050] sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[  657.693273] sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled,
doe
sn't support DPO or FUA
[  657.693278]  sdb: sdb1
[  657.714070] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[  657.714113] sd 4:0:0:0: Attached scsi generic sg2 type 0
[  657.714141] pcmcia: registering new device pcmcia0.1
[  657.714357] 0.1: GetNextTuple: No more items
[  657.714376] pata_pcmcia: probe of 0.1 failed with error -12
[  657.714403] 0.1: GetNextTuple: No more items
[  657.719290] 0.1: GetNextTuple: No more items
[  657.719305] pata_pcmcia: probe of 0.1 failed with error -12
[  657.719324] 0.1: GetNextTuple: No more items
[  657.722048] 0.1: GetNextTuple: No more items
[  657.722060] pata_pcmcia: probe of 0.1 failed with error -12
[  657.722079] 0.1: GetNextTuple: No more items
--------------------------------
less /etc/fstab | grep sdb
/dev/sdb1       /mnt/flash      auto    user,noauto     0       0
-------------------------------------
~$ mount /mnt/flash
mount: I could not determine the filesystem type, and none was specified
--------------------------
~$ sudo mount /mnt/flash /dev/sdb1 -t vfat
mount: mount point /dev/sdb1 does not exist
-------------------------------------

Steps to reproduce:


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From bugme-daemon at bugzilla.kernel.org  Sat May 10 14:11:58 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Sat, 10 May 2008 11:11:58 -0700 (PDT)
Subject: [Bug 10661] PCMCIA: CompactFlash card can't be mounted.
In-Reply-To: <bug-10661-4463@http.bugzilla.kernel.org/>
Message-ID: <20080510181158.9446E108062@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=10661


akpm at osdl.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |akpm at osdl.org,
                   |                            |rmk at arm.linux.org.uk,
                   |                            |alan at lxorguk.ukuu.org.uk
         Regression|0                           |1




------- Comment #1 from akpm at osdl.org  2008-05-10 11:11 -------
argh, I know nothing about pcmcia card services and Dominik
seems to have disappeared.

At a guess, I'd say that some misbehaviour in pata_pcmcia
has caused the pcmcia core to get this CS_NO_MORE_ITEMS
status.  But we changed little in pata_pcmcia and in
pcmcia for 2.6.25.

Hopefully Alan or Russell can suggest what might cause this?


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From bugme-daemon at bugzilla.kernel.org  Sat May 10 14:33:34 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Sat, 10 May 2008 11:33:34 -0700 (PDT)
Subject: [Bug 10661] PCMCIA: CompactFlash card can't be mounted.
In-Reply-To: <bug-10661-4463@http.bugzilla.kernel.org/>
Message-ID: <20080510183334.8517E10805F@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=10661





------- Comment #2 from kristoffer.ericson at gmail.com  2008-05-10 11:33 -------
Without taking any notice of the pata_pcmcia: probe of 0.1 failed with error
-12 
but that mount command doesn't look right, shouldn't device be at left of
mountpoint.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From bugme-daemon at bugzilla.kernel.org  Sat May 10 17:01:21 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Sat, 10 May 2008 14:01:21 -0700 (PDT)
Subject: [Bug 10661] PCMCIA: CompactFlash card can't be mounted.
In-Reply-To: <bug-10661-4463@http.bugzilla.kernel.org/>
Message-ID: <20080510210121.714CD108063@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=10661





------- Comment #3 from alan at lxorguk.ukuu.org.uk  2008-05-10 14:01 -------
No idea, no similar reports I've seen and also we use the same pcmcia side code
as ide_cs which has worked for years.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From rmk+pcmcia at arm.linux.org.uk  Sun May 11 19:35:37 2008
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Mon, 12 May 2008 00:35:37 +0100
Subject: Problem with Oxford 950 2xRS232
In-Reply-To: <481A5847.4010504@wowway.com>
References: <481A5847.4010504@wowway.com>
Message-ID: <20080511233537.GA30703@flint.arm.linux.org.uk>

On Thu, May 01, 2008 at 06:54:47PM -0500, John R. wrote:
> I have a SerialGear 2 port PCMCIA card that (according to the 
> manufacturer) has an Oxford 950 chip.  It should have a 16C950 UART.

The Oxford 950 chips come in various varieties - OXCF950 ("compact flash"
aka PCMCIA), OXCB950 (Cardbus) and the plain OX16C950.

> May  1 18:36:35 laptop pccard: PCMCIA card inserted into slot 0
> May  1 18:36:35 laptop pcmcia: registering new device pcmcia0.0
> May  1 18:36:36 laptop 0.0: ttyS1 at I/O 0x3108 (irq = 9) is a 16450
> 
> Only one port detected and the UART appears to be incorrect.  I used 
> setserial to change it to 16950 but had the same non-working results. 

... which rather agrees with what the autodetection code thought of the
device - it tried various features found on the 16550 devices, found them
missing, so decided it was a 16450.  To put it another way, we tried to
enable the FIFO, the chip reported no FIFO.  We tried to test the scratch
register, which passed. That means it behaves like a 16450, so we drive
it as if it's a 16450.

Telling the serial code that it has a chip with more features than it
autodetected will always result in failure.

> laptop # lspcmcia -v
> Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:00.0)
>          Configuration:  state: on       ready: yes
>                          Voltage: 3.3V Vcc: 3.3V Vpp: 0.0V
> Socket 0 Device 0:      [serial_cs]             (bus ID: 0.0)
>          Configuration:  state: on
>          Product Name:   PC CARD GENERIC
>          Identification: manf_id: 0x0279 card_id: 0x950b
>                          function: 2 (serial)
>                          prod_id(1): "PC CARD" (0x6a1d140a)
>                          prod_id(2): "GENERIC" (0x346680b7)
>                          prod_id(3): --- (---)
>                          prod_id(4): --- (---)
> Socket 1 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:00.1)
>          Configuration:  state: on       ready: yes
> 
> Nothing appears in lspci output for this card.

... which is what you'd expect from a PCMCIA card (not a Cardbus card.)
The card you report above _is_ a PCMCIA card, not a Cardbus card.  The
IDs correspond with an OXCF950, but for some reason it refuses to detect
as an OXCF950.

Maybe there's a IO port resource clash?  Have you tried reconfiguring
the IO ranges to avoid 0x3108-0x310f?  (Don't ask me how to do that with
the new fangled kernel PCMCIA stuff.)

>  From the mailing list archives is this thread which seems similar to my 
> problem (a different card):
> 
> http://lists.infradead.org/pipermail/linux-pcmcia/2006-December/004280.html

Well, the patch for that is below - but it won't do you any good because
your card won't match this.  As I said back then, OXCF950 devices are
rather troublesome because they're fitted with a variety of different
crystals, resulting in different baud bases.  Unless you know that
information, you have to spend some quality time with the card to try
and persuade it to work.

diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 164d2a4..79ce481 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -161,6 +161,17 @@ static void quirk_wakeup_oxsemi(struct pcmcia_device *link)
 	outb(12, info->c950ctrl + 1);
 }
 
+/*
+ * "CDMA" "CARD_A".  Seems to have a non-standard clock rate of 15.36MHz
+ * and initially communicates at 230400 baud (confirmed by AT+IPR=?). --rmk
+ */
+static void quirk_setup_oxsemi(struct pcmcia_device *link, struct uart_port *port)
+{
+	if (link->prod_id[0] && strcmp(link->prod_id[0], "CDMA") &&
+	    link->prod_id[1] && strcmp(link->prod_id[1], "CARD_A"))
+		port->uartclk = 15360000;
+}
+
 /* request_region? oxsemi branch does no request_region too... */
 /*
  * This sequence is needed to properly initialize MC45 attached to OXCF950.
@@ -233,6 +244,7 @@ static const struct serial_quirk quirks[] = {
 		.prodid	= ~0,
 		.multi	= -1,
 		.wakeup	= quirk_wakeup_oxsemi,
+		.setup	= quirk_setup_oxsemi,
 	}, {
 		.manfid	= MANFID_POSSIO,
 		.prodid	= PRODID_POSSIO_GCC,


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:


From cooloney at kernel.org  Mon May 12 06:46:40 2008
From: cooloney at kernel.org (Bryan Wu)
Date: Mon, 12 May 2008 18:46:40 +0800
Subject: [PATCH 1/1] [PCMCIA]: add support the CF PCMCIA driver for Blackfin
Message-ID: <1210589200-12431-1-git-send-email-cooloney@kernel.org>

From: Michael Hennerich <michael.hennerich at analog.com>

Signed-off-by: Michael Hennerich <michael.hennerich at analog.com>
Signed-off-by: Bryan Wu <cooloney at kernel.org>
---
 drivers/pcmcia/Kconfig          |    7 +
 drivers/pcmcia/Makefile         |    1 +
 drivers/pcmcia/bfin_cf_pcmcia.c |  324 +++++++++++++++++++++++++++++++++++++++
 include/pcmcia/cs_types.h       |    2 +-
 4 files changed, 333 insertions(+), 1 deletions(-)
 create mode 100644 drivers/pcmcia/bfin_cf_pcmcia.c

diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index 1b0eb5a..e45402a 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -263,6 +263,13 @@ config OMAP_CF
 	  Say Y here to support the CompactFlash controller on OMAP.
 	  Note that this doesn't support "True IDE" mode.
 
+config BFIN_CFPCMCIA
+	tristate "Blackfin CompactFlash PCMCIA Driver"
+	depends on PCMCIA && BLACKFIN
+	help
+	  Say Y here to support the CompactFlash PCMCIA driver for Blackfin.
+
+
 config AT91_CF
 	tristate "AT91 CompactFlash Controller"
 	depends on PCMCIA && ARCH_AT91RM9200
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index 6f6478b..85c6cc9 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -36,6 +36,7 @@ obj-$(CONFIG_PCMCIA_AU1X00)			+= au1x00_ss.o
 obj-$(CONFIG_PCMCIA_VRC4171)			+= vrc4171_card.o
 obj-$(CONFIG_PCMCIA_VRC4173)			+= vrc4173_cardu.o
 obj-$(CONFIG_OMAP_CF)				+= omap_cf.o
+obj-$(CONFIG_BFIN_CFPCMCIA)			+= bfin_cf_pcmcia.o
 obj-$(CONFIG_AT91_CF)				+= at91_cf.o
 obj-$(CONFIG_ELECTRA_CF)			+= electra_cf.o
 
diff --git a/drivers/pcmcia/bfin_cf_pcmcia.c b/drivers/pcmcia/bfin_cf_pcmcia.c
new file mode 100644
index 0000000..7964675
--- /dev/null
+++ b/drivers/pcmcia/bfin_cf_pcmcia.c
@@ -0,0 +1,324 @@
+/*
+ * file: drivers/pcmcia/bfin_cf.c
+ * author: Michael Hennerich (hennerich at blackfin.uclinux.org)
+ *
+ * based on: drivers/pcmcia/omap_cf.c
+ * omap_cf.c -- OMAP 16xx CompactFlash controller driver
+ *
+ * Copyright (c) 2005 David Brownell
+ * Copyright (c) 2006 Michael Hennerich Analog Devices Inc.
+ *
+ * bugs:         enter bugs at http://blackfin.uclinux.org/
+ *
+ * this program is free software; you can redistribute it and/or modify
+ * it under the terms of the gnu general public license as published by
+ * the free software foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * this program is distributed in the hope that it will be useful,
+ * but without any warranty; without even the implied warranty of
+ * merchantability or fitness for a particular purpose.  see the
+ * gnu general public license for more details.
+ *
+ * you should have received a copy of the gnu general public license
+ * along with this program; see the file copying.
+ * if not, write to the free software foundation,
+ * 59 temple place - suite 330, boston, ma 02111-1307, usa.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/platform_device.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+
+#include <pcmcia/ss.h>
+#include <pcmcia/cisreg.h>
+#include <asm/io.h>
+#include <asm/gpio.h>
+
+#define SZ_1K			0x00000400
+#define SZ_8K			0x00002000
+#define	SZ_2K			(2 * SZ_1K)
+
+#define	POLL_INTERVAL	(2 * HZ)
+
+#define CF_ATASEL_ENA 	0x20311802 /* Inverts RESET */
+#define CF_ATASEL_DIS 	0x20311800
+
+#define bfin_cf_present(pfx) (gpio_get_value(pfx))
+
+/*--------------------------------------------------------------------------*/
+
+static const char driver_name[] = "bfin_cf_pcmcia";
+
+struct bfin_cf_socket {
+	struct pcmcia_socket	socket;
+
+	struct timer_list	timer;
+	unsigned		present:1;
+	unsigned		active:1;
+
+	struct platform_device	*pdev;
+	unsigned long		phys_cf_io;
+	unsigned long		phys_cf_attr;
+	u_int			irq;
+	u_short			cd_pfx;
+};
+
+/*--------------------------------------------------------------------------*/
+static int bfin_cf_reset(void)
+{
+	  outw(0, CF_ATASEL_ENA);
+	  mdelay(200);
+	  outw(0, CF_ATASEL_DIS);
+
+	  return 0;
+
+}
+
+static int bfin_cf_ss_init(struct pcmcia_socket *s)
+{
+	return 0;
+}
+
+/* the timer is primarily to kick this socket's pccardd */
+static void bfin_cf_timer(unsigned long _cf)
+{
+	struct bfin_cf_socket	*cf = (void *) _cf;
+	unsigned short present = bfin_cf_present(cf->cd_pfx);
+
+	if (present != cf->present) {
+		cf->present = present;
+		pr_debug("%s: card %s\n", driver_name,
+			present ? "present" : "gone");
+		pcmcia_parse_events(&cf->socket, SS_DETECT);
+	}
+
+	if (cf->active)
+		mod_timer(&cf->timer, jiffies + POLL_INTERVAL);
+}
+
+static int bfin_cf_get_status(struct pcmcia_socket *s, u_int *sp)
+{
+	struct bfin_cf_socket	*cf;
+
+	if (!sp)
+		return -EINVAL;
+
+	cf = container_of(s, struct bfin_cf_socket, socket);
+
+	if (bfin_cf_present(cf->cd_pfx)) {
+		*sp = SS_READY | SS_DETECT | SS_POWERON | SS_3VCARD;
+		s->irq.AssignedIRQ = 0;
+		s->pci_irq = cf->irq;
+
+	} else
+		*sp = 0;
+	return 0;
+}
+
+static int
+bfin_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s)
+{
+
+	struct bfin_cf_socket	*cf;
+	cf = container_of(sock, struct bfin_cf_socket, socket);
+
+	switch (s->Vcc) {
+	case 0:
+	case 33:
+		break;
+	case 50:
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	if (s->flags & SS_RESET){
+		disable_irq(cf->irq);
+		bfin_cf_reset();
+		enable_irq(cf->irq);
+	}
+
+	pr_debug("%s: Vcc %d, io_irq %d, flags %04x csc %04x\n",
+		driver_name, s->Vcc, s->io_irq, s->flags, s->csc_mask);
+
+	return 0;
+}
+
+static int bfin_cf_ss_suspend(struct pcmcia_socket *s)
+{
+	pr_debug("%s: %s\n", driver_name, __FUNCTION__);
+	return bfin_cf_set_socket(s, &dead_socket);
+}
+
+/* regions are 2K each:  mem, attrib, io (and reserved-for-ide) */
+
+static int bfin_cf_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
+{ struct bfin_cf_socket	*cf;
+
+	cf = container_of(s, struct bfin_cf_socket, socket);
+	io->flags &= MAP_ACTIVE|MAP_ATTRIB|MAP_16BIT;
+	io->start = cf->phys_cf_io;
+	io->stop = io->start + SZ_2K - 1;
+	return 0;
+}
+
+static int
+bfin_cf_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *map)
+{
+	struct bfin_cf_socket	*cf;
+
+	if (map->card_start)
+		return -EINVAL;
+	cf = container_of(s, struct bfin_cf_socket, socket);
+	map->static_start = cf->phys_cf_io;
+	map->flags &= MAP_ACTIVE|MAP_ATTRIB|MAP_16BIT;
+	if (map->flags & MAP_ATTRIB)
+		map->static_start = cf->phys_cf_attr;
+
+	return 0;
+}
+
+static struct pccard_operations bfin_cf_ops = {
+	.init			= bfin_cf_ss_init,
+	.suspend		= bfin_cf_ss_suspend,
+	.get_status		= bfin_cf_get_status,
+	.set_socket		= bfin_cf_set_socket,
+	.set_io_map		= bfin_cf_set_io_map,
+	.set_mem_map	= bfin_cf_set_mem_map,
+};
+
+/*--------------------------------------------------------------------------*/
+
+static int __init bfin_cf_probe(struct device *dev)
+{
+	struct bfin_cf_socket	*cf;
+	struct platform_device	*pdev = to_platform_device(dev);
+	struct resource		*io_mem,*attr_mem;
+	int			irq;
+	unsigned short		cd_pfx;
+	int			status = 0;
+
+	printk(KERN_INFO "Blackfin CompactFlash/PCMCIA Socket Driver\n");
+
+	irq = platform_get_irq(pdev, 0);
+	if (!irq)
+		return -EINVAL;
+
+	cd_pfx = platform_get_irq(pdev, 1); /*Card Detect GPIO PIN*/
+	if (cd_pfx > MAX_BLACKFIN_GPIOS)
+		return -EINVAL;
+
+	if (gpio_request(cd_pfx, "pcmcia: CD")) {
+		printk(KERN_ERR "BF5xx flash: Failed ro request Card Detect GPIO_%d\n", cd_pfx);
+		return -EBUSY;
+	}
+	gpio_direction_input(cd_pfx);
+
+	cf = kcalloc(1, sizeof *cf, GFP_KERNEL);
+	if (!cf)
+		return -ENOMEM;
+
+	cf->cd_pfx = cd_pfx;
+
+	init_timer(&cf->timer);
+	cf->timer.function = bfin_cf_timer;
+	cf->timer.data = (unsigned long) cf;
+
+	cf->pdev = pdev;
+	dev_set_drvdata(dev, cf);
+
+	cf->irq = irq;
+	cf->socket.pci_irq = irq;
+
+	set_irq_type(irq, IRQF_TRIGGER_LOW);
+
+	io_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	attr_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+
+	if (!io_mem || !attr_mem)
+		goto fail0;
+
+	cf->phys_cf_io = io_mem->start;
+	cf->phys_cf_attr = attr_mem->start;
+
+	/* pcmcia layer only remaps "real" memory */
+	cf->socket.io_offset = (unsigned long)
+			ioremap(cf->phys_cf_io, SZ_2K);
+
+	if (!cf->socket.io_offset)
+		goto fail0;
+
+	pr_info("%s: on irq %d\n", driver_name, irq);
+
+	pr_debug("%s: %s\n", driver_name, bfin_cf_present(cf->cd_pfx) ? "present" : "(not present)");
+
+	cf->socket.owner = THIS_MODULE;
+	cf->socket.dev.parent = dev;
+	cf->socket.ops = &bfin_cf_ops;
+	cf->socket.resource_ops = &pccard_static_ops;
+	cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP
+				| SS_CAP_MEM_ALIGN;
+	cf->socket.map_size = SZ_2K;
+
+	status = pcmcia_register_socket(&cf->socket);
+	if (status < 0)
+		goto fail2;
+
+	cf->active = 1;
+	mod_timer(&cf->timer, jiffies + POLL_INTERVAL);
+	return 0;
+
+fail2:
+	iounmap((void __iomem *) cf->socket.io_offset);
+	release_mem_region(cf->phys_cf_io, SZ_8K);
+
+fail0:
+	kfree(cf);
+	return status;
+}
+
+static int __devexit bfin_cf_remove(struct device *dev)
+{
+	struct bfin_cf_socket *cf = dev_get_drvdata(dev);
+
+	gpio_free(cf->cd_pfx);
+	cf->active = 0;
+	pcmcia_unregister_socket(&cf->socket);
+	del_timer_sync(&cf->timer);
+	iounmap((void __iomem *) cf->socket.io_offset);
+	release_mem_region(cf->phys_cf_io, SZ_8K);
+	kfree(cf);
+	return 0;
+}
+
+static struct device_driver bfin_cf_driver = {
+	.name		= (char *) driver_name,
+	.bus		= &platform_bus_type,
+	.probe		= bfin_cf_probe,
+	.remove		= __devexit_p(bfin_cf_remove),
+	.suspend 	= pcmcia_socket_dev_suspend,
+	.resume 	= pcmcia_socket_dev_resume,
+};
+
+static int __init bfin_cf_init(void)
+{
+	return driver_register(&bfin_cf_driver);
+}
+
+static void __exit bfin_cf_exit(void)
+{
+	driver_unregister(&bfin_cf_driver);
+}
+
+module_init(bfin_cf_init);
+module_exit(bfin_cf_exit);
+
+MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver");
+MODULE_LICENSE("GPL");
diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h
index 9a6bcc4..c3257c1 100644
--- a/include/pcmcia/cs_types.h
+++ b/include/pcmcia/cs_types.h
@@ -21,7 +21,7 @@
 #include <sys/types.h>
 #endif
 
-#if defined(__arm__) || defined(__mips__) || defined(__avr32__)
+#if defined(__arm__) || defined(__mips__) || defined(__avr32__) || defined(bfin)
 /* This (ioaddr_t) is exposed to userspace & hence cannot be changed. */
 typedef u_int   ioaddr_t;
 #else
-- 
1.5.5



From rmk+lkml at arm.linux.org.uk  Mon May 12 07:37:26 2008
From: rmk+lkml at arm.linux.org.uk (Russell King)
Date: Mon, 12 May 2008 12:37:26 +0100
Subject: [PATCH 1/1] [PCMCIA]: add support the CF PCMCIA driver for
	Blackfin
In-Reply-To: <1210589200-12431-1-git-send-email-cooloney@kernel.org>
References: <1210589200-12431-1-git-send-email-cooloney@kernel.org>
Message-ID: <20080512113726.GB15305@flint.arm.linux.org.uk>

On Mon, May 12, 2008 at 06:46:40PM +0800, Bryan Wu wrote:
> +static struct device_driver bfin_cf_driver = {
> +	.name		= (char *) driver_name,
> +	.bus		= &platform_bus_type,
> +	.probe		= bfin_cf_probe,
> +	.remove		= __devexit_p(bfin_cf_remove),
> +	.suspend 	= pcmcia_socket_dev_suspend,
> +	.resume 	= pcmcia_socket_dev_resume,
> +};

NAK.  All platform device drivers must be of type 'struct platform_driver'.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:


From Michael.Hennerich at analog.com  Tue May 13 04:36:24 2008
From: Michael.Hennerich at analog.com (Hennerich, Michael)
Date: Tue, 13 May 2008 09:36:24 +0100
Subject: [PATCH 1/1] [PCMCIA]: add support the CF PCMCIA driver for
	Blackfin
In-Reply-To: <20080512113726.GB15305@flint.arm.linux.org.uk>
References: <1210589200-12431-1-git-send-email-cooloney@kernel.org>
	<20080512113726.GB15305@flint.arm.linux.org.uk>
Message-ID: <8A42379416420646B9BFAC9682273B6D015A1974@limkexm3.ad.analog.com>

>-----Original Message-----
>From: Russell King [mailto:rmk at arm.linux.org.uk] On Behalf Of Russell
King
>Sent: Montag, 12. Mai 2008 13:37
>To: Bryan Wu
>Cc: linux-pcmcia at lists.infradead.org; linux-kernel at vger.kernel.org;
Michael
>Hennerich
>Subject: Re: [PATCH 1/1] [PCMCIA]: add support the CF PCMCIA driver for
>Blackfin
>
>On Mon, May 12, 2008 at 06:46:40PM +0800, Bryan Wu wrote:
>> +static struct device_driver bfin_cf_driver = {
>> +	.name		= (char *) driver_name,
>> +	.bus		= &platform_bus_type,
>> +	.probe		= bfin_cf_probe,
>> +	.remove		= __devexit_p(bfin_cf_remove),
>> +	.suspend 	= pcmcia_socket_dev_suspend,
>> +	.resume 	= pcmcia_socket_dev_resume,
>> +};
>
>NAK.  All platform device drivers must be of type 'struct
platform_driver'.

Haven't looked at the code since a great while...

ACK - were going to update.

Best regards,
Michael


>
>--
>Russell King
> Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
> maintainer of:


From dhlii at dlasys.net  Tue May 13 17:24:30 2008
From: dhlii at dlasys.net (David H. Lynch Jr.)
Date: Tue, 13 May 2008 17:24:30 -0400
Subject: Power Cycling cards II
In-Reply-To: <20080221162830.GA30555@flint.arm.linux.org.uk>
References: <47BD9EA4.4080903@dlasys.net>
	<20080221162830.GA30555@flint.arm.linux.org.uk>
Message-ID: <482A070E.9040808@dlasys.net>

 How do I force Linux to rescan for pcmcia/cardbus/expresscard cards.

The bus interface in our cards is in an FPGA.
Should something go fluey on the card, there will be no bus interface.

We can temporarily reprogram the card externally ( via JTAG)
But to permanently program the card we need to access it from the host.

The gotcha is that after the card has been programmed via JTAG,
Linux is not noticing that the card has changed from brain dead to
usable, that it now has proper CIS ID's etc.

So how can I tell Linux to go out and look for the card again.
In this instance WITHOUT cycling the power on the card.





-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii at dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein



From hills925 at jmail.co.za  Sun May 11 15:24:45 2008
From: hills925 at jmail.co.za (Mr Jones Hills.)
Date: Sun, 11 May 2008 21:24:45 +0200
Subject: SNS Bank License Office U.K !! Regarding Your Family Member !!
Message-ID: <E1JvHA5-000BSZ-71@server02.n1k.nl>

Dear Friend,

I am Jones Hills the credit manager of SNS Bank License Office U.K with headquarters located in the NETHERLANDS. I have a personal proposal to discuss about a late family members Fixed account in the bank, Please contact me through email or you can give me your personal phone number with your full names so that i can give you a call, but if you are really interested to know more CALL ME ASAP.
Regards,

Jones Hills.
SNS Bank License Office
United Kingdom Office.
Personal Direct Lines.
Tel No:+44 704 572 0242.
Tel No:+44 704 571 0516.
Fax No:+44 870 130 5817
www.snsbank.nl





From dhlii at dlasys.net  Wed May 14 01:48:22 2008
From: dhlii at dlasys.net (David H. Lynch Jr.)
Date: Wed, 14 May 2008 01:48:22 -0400
Subject: deriving pcmcia socket number
Message-ID: <482A7D26.7030702@dlasys.net>

    Is there some easy way of deriving the pcmcia socket # from either
the device name /dev/xxxxx or from
the pci_dev or pcmcia_device structure within a driver ?




-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii at dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein



From bugme-daemon at bugzilla.kernel.org  Thu May 15 10:19:18 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Thu, 15 May 2008 07:19:18 -0700 (PDT)
Subject: [Bug 10500] nozomi: kernel BUG()s when card is removed
In-Reply-To: <bug-10500-4463@http.bugzilla.kernel.org/>
Message-ID: <20080515141918.4B21C10805F@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=10500





------- Comment #7 from fseidel at suse.de  2008-05-15 07:19 -------
Created an attachment (id=16156)
 --> (http://bugzilla.kernel.org/attachment.cgi?id=16156&action=view)
patch to nozomi to better handle still pending work

First thanks a lot for your nice wishes :-)
I'm slowly getting better and tried some time already to reproduce this bug,
but i wasn't able to trigger this problem.
Evgeni, could you please send me your kernel config? Perhaps this
would make it easier to also run into it.

Besides that, could you give this attached patch a try?
Thanks for your patience again :-)


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From linux at dominikbrodowski.net  Thu May 15 06:37:26 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Thu, 15 May 2008 12:37:26 +0200
Subject: [2.6 patch] pcmcia: kill IN_CARD_SERVICES
In-Reply-To: <20080505182552.GU17139@cs181133002.pp.htv.fi>
References: <20080505182552.GU17139@cs181133002.pp.htv.fi>
Message-ID: <20080515103726.GC5373@dominikbrodowski.net>

On Mon, May 05, 2008 at 09:25:52PM +0300, Adrian Bunk wrote:
> IN_CARD_SERVICES was #define'd but not used, so let's remove it.

NAK.

This breaks compilation of the pcmcia-cs userspace utils.

Best,
	Dominik


From marcel at holtmann.org  Thu May 15 12:33:04 2008
From: marcel at holtmann.org (Marcel Holtmann)
Date: Thu, 15 May 2008 18:33:04 +0200
Subject: [2.6 patch] pcmcia: kill IN_CARD_SERVICES
In-Reply-To: <20080515103726.GC5373@dominikbrodowski.net>
References: <20080505182552.GU17139@cs181133002.pp.htv.fi>
	<20080515103726.GC5373@dominikbrodowski.net>
Message-ID: <1210869184.7025.56.camel@violet.holtmann.net>

Hi Dominik,

> > IN_CARD_SERVICES was #define'd but not used, so let's remove it.
> 
> NAK.
> 
> This breaks compilation of the pcmcia-cs userspace utils.

then it is time to finally fix pcmcia-cs. Also we have pcmciautils for
2.6 kernels.

Regards

Marcel




From linux at dominikbrodowski.net  Thu May 15 06:26:56 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Thu, 15 May 2008 12:26:56 +0200
Subject: Power Cycling cards II
In-Reply-To: <482A070E.9040808@dlasys.net>
References: <47BD9EA4.4080903@dlasys.net>
	<20080221162830.GA30555@flint.arm.linux.org.uk>
	<482A070E.9040808@dlasys.net>
Message-ID: <20080515102656.GB5373@dominikbrodowski.net>

On Tue, May 13, 2008 at 05:24:30PM -0400, David H. Lynch Jr. wrote:
>  How do I force Linux to rescan for pcmcia/cardbus/expresscard cards.

For PCMCIA only, you could try echo'ing 1 to
/sys/class/pcmcia_socket/pcmcia_socket0/available_resources_setup_done

Best,
	Dominik


From linux at dominikbrodowski.net  Thu May 15 06:21:19 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Thu, 15 May 2008 12:21:19 +0200
Subject: deriving pcmcia socket number
In-Reply-To: <482A7D26.7030702@dlasys.net>
References: <482A7D26.7030702@dlasys.net>
Message-ID: <20080515102119.GA5373@dominikbrodowski.net>

On Wed, May 14, 2008 at 01:48:22AM -0400, David H. Lynch Jr. wrote:
>     Is there some easy way of deriving the pcmcia socket # from either
> the device name /dev/xxxxx or from
> the pci_dev or pcmcia_device structure within a driver ?

(pcmcia_device *) p_dev->socket->sock . Note that this number may change
between reboots.

Best,
	Dominik


From linux at dominikbrodowski.net  Thu May 15 12:42:14 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Thu, 15 May 2008 18:42:14 +0200
Subject: [2.6 patch] pcmcia: kill IN_CARD_SERVICES
In-Reply-To: <1210869184.7025.56.camel@violet.holtmann.net>
References: <20080505182552.GU17139@cs181133002.pp.htv.fi>
	<20080515103726.GC5373@dominikbrodowski.net>
	<1210869184.7025.56.camel@violet.holtmann.net>
Message-ID: <20080515164214.GA5645@dominikbrodowski.net>

Hi,

On Thu, May 15, 2008 at 06:33:04PM +0200, Marcel Holtmann wrote:
> > > IN_CARD_SERVICES was #define'd but not used, so let's remove it.
> > 
> > NAK.
> > 
> > This breaks compilation of the pcmcia-cs userspace utils.
> 
> then it is time to finally fix pcmcia-cs.

Russell -- what exactly do you still need pcmcia-cs for (and why exactly
can't you switch to pcmciautils); and do you need a full-fledged pcmcia-cs
interface?

> Also we have pcmciautils for 2.6 kernels.

I know that ;)

	Dominik


From rmk+pcmcia at arm.linux.org.uk  Thu May 15 13:26:49 2008
From: rmk+pcmcia at arm.linux.org.uk (Russell King)
Date: Thu, 15 May 2008 18:26:49 +0100
Subject: [2.6 patch] pcmcia: kill IN_CARD_SERVICES
In-Reply-To: <20080515164214.GA5645@dominikbrodowski.net>
References: <20080505182552.GU17139@cs181133002.pp.htv.fi>
	<20080515103726.GC5373@dominikbrodowski.net>
	<1210869184.7025.56.camel@violet.holtmann.net>
	<20080515164214.GA5645@dominikbrodowski.net>
Message-ID: <20080515172649.GA13043@flint.arm.linux.org.uk>

On Thu, May 15, 2008 at 06:42:14PM +0200, Dominik Brodowski wrote:
> Hi,
> 
> On Thu, May 15, 2008 at 06:33:04PM +0200, Marcel Holtmann wrote:
> > > > IN_CARD_SERVICES was #define'd but not used, so let's remove it.
> > > 
> > > NAK.
> > > 
> > > This breaks compilation of the pcmcia-cs userspace utils.
> > 
> > then it is time to finally fix pcmcia-cs.
> 
> Russell -- what exactly do you still need pcmcia-cs for (and why exactly
> can't you switch to pcmciautils); and do you need a full-fledged pcmcia-cs
> interface?

The problem I have is that I have a machine here which is in regular use.
The original development for the platform finished several years back and
the CVS server which had all the userspace source on has *gone*.

So, I *really* don't care about breaking the pcmcia-cs build.  What I care
about is being able to continue to regularly use the machine _and_ test
out later kernels on the platform.

That means I've no problem with this patch to remove IN_CARD_SERVICES.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:


From linux at dominikbrodowski.net  Thu May 15 14:03:27 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Thu, 15 May 2008 20:03:27 +0200
Subject: [2.6 patch] pcmcia: kill IN_CARD_SERVICES
In-Reply-To: <20080515172649.GA13043@flint.arm.linux.org.uk>
References: <20080505182552.GU17139@cs181133002.pp.htv.fi>
	<20080515103726.GC5373@dominikbrodowski.net>
	<1210869184.7025.56.camel@violet.holtmann.net>
	<20080515164214.GA5645@dominikbrodowski.net>
	<20080515172649.GA13043@flint.arm.linux.org.uk>
Message-ID: <20080515180327.GA14255@isilmar.linta.de>

On Thu, May 15, 2008 at 06:26:49PM +0100, Russell King wrote:
> On Thu, May 15, 2008 at 06:42:14PM +0200, Dominik Brodowski wrote:
> > Hi,
> > 
> > On Thu, May 15, 2008 at 06:33:04PM +0200, Marcel Holtmann wrote:
> > > > > IN_CARD_SERVICES was #define'd but not used, so let's remove it.
> > > > 
> > > > NAK.
> > > > 
> > > > This breaks compilation of the pcmcia-cs userspace utils.
> > > 
> > > then it is time to finally fix pcmcia-cs.
> > 
> > Russell -- what exactly do you still need pcmcia-cs for (and why exactly
> > can't you switch to pcmciautils); and do you need a full-fledged pcmcia-cs
> > interface?
> 
> The problem I have is that I have a machine here which is in regular use.
> The original development for the platform finished several years back and
> the CVS server which had all the userspace source on has *gone*.
> 
> So, I *really* don't care about breaking the pcmcia-cs build.  What I care
> about is being able to continue to regularly use the machine _and_ test
> out later kernels on the platform.

Does the kernel set up the PCMCIA devices properly during boot, without
userspace interaction? Or is it the "bring the network up" side of
pcmcia-cs which is required here?

The userspace side of pcmciautils is only needed on x86, and for some corner
cases on non-x86 systems... and if everything just works fine without having
to install pcmciautils on this system and even if pcmcia-cs were broken,
that'd be the best of two worlds, wouldn't it?

Thanks,
	Dominik


From kristoffer.ericson at gmail.com  Thu May 15 13:26:57 2008
From: kristoffer.ericson at gmail.com (Kristoffer Ericson)
Date: Thu, 15 May 2008 19:26:57 +0200
Subject: [PATCH] : hd64461 pcmcia driver
Message-ID: <20080515192657.33883f33.Kristoffer.Ericson@Gmail.com>

This patch creates support for the Hitachi HD64461 pcmcia hardware, found on HP Jornada 6xx and some Harp development boards.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson at gmail.com>

diff --git a/drivers/pcmcia/hd64461_ss.c b/drivers/pcmcia/hd64461_ss.c
new file mode 100644
index 0000000..ead178a
--- /dev/null
+++ b/drivers/pcmcia/hd64461_ss.c
@@ -0,0 +1,555 @@
+/*
+ * drivers/pcmcia/hd64461_ss.c
+ *
+ * PCMCIA platform driver for Hitachi HD64461 companion chip
+ * Copyright (C) 2006-2008 Kristoffer Ericson <kristoffer.ericson at gmail.com>
+ *
+ * This driver is based on hd64461_ss.c that was maintained in LinuxSH cvs 
+ * before merger with mainline by
+ * COPYRIGHT (C) 2002-2005 Andriy Skulysh <askulysh at image.kiev.ua>
+ * COPYRIGHT (C) ?  Greg Banks <gbanks at pocketpenguins.com>
+ * COPYRIGHT (C) 2000 YAEGASHI Takeshi
+ *
+ * Please note that although the hd64461 chipset supports two sockets (0 & 1) this driver only
+ * supports the PCMCIA one. The CF slot cannot handle anything other than memory cards, so its
+ * better to leave that to other drivers such as pata.
+ *
+ */
+#include <linux/autoconf.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+#include <linux/mm.h>
+#include <linux/vmalloc.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+
+#include <pcmcia/cs_types.h>
+#include <pcmcia/cs.h>
+#include <pcmcia/ss.h>
+#include <pcmcia/bulkmem.h>
+#include <pcmcia/cistpl.h>
+
+#include "cs_internal.h"
+
+#include <asm/io.h>
+#include <asm/hd64461.h>
+#include <asm/hp6xx.h>
+
+#define MODNAME "HD64461_ss"
+
+typedef struct hd64461_socket_t {
+	u8			cscier;
+	unsigned int		irq;
+	unsigned long		mem_base;
+	socket_state_t		state;
+	pccard_mem_map		mem_maps[MAX_WIN];
+	unsigned char		IC_memory;
+	struct pcmcia_socket	socket;
+} hd64461_socket_t;
+
+static hd64461_socket_t hd64461_sockets[1];
+
+static int hd64461_set_voltage(int Vcc, int Vpp)
+{
+	u8 gcr, scr;
+	u16 stbcr;
+	u32 gcr_reg = HD64461_PCC0GCR;
+	u32 scr_reg = HD64461_PCC0SCR;
+
+	gcr = inb(gcr_reg);
+	scr = inb(scr_reg);
+
+	switch (Vcc) {
+	case 0:
+			gcr |= HD64461_PCCGCR_VCC0;
+			scr |= HD64461_PCCSCR_VCC1;
+			break;
+	case 33:
+			gcr |= HD64461_PCCGCR_VCC0;
+			scr &= ~HD64461_PCCSCR_VCC1;
+			break;
+	case 50:
+			gcr &= ~HD64461_PCCGCR_VCC0;
+			scr &= ~HD64461_PCCSCR_VCC1;
+			break;
+	}
+
+	outb(gcr, gcr_reg);
+	outb(scr, scr_reg);
+
+	stbcr = ctrl_inw(HD64461_STBCR);
+
+	if (Vcc > 0) {
+		stbcr &= ~HD64461_STBCR_SPC0ST;
+	} else {
+		stbcr |= HD64461_STBCR_SPC0ST;
+	}
+
+	outw(stbcr, HD64461_STBCR);
+
+	return 1;
+}
+
+static int hd64461_init(struct pcmcia_socket *s)
+{
+	u16 gpadr;
+	hd64461_socket_t *sp = container_of(s, struct hd64461_socket_t, socket);
+
+	sp->state.Vcc = 0;
+	sp->state.Vpp = 0;
+	hd64461_set_voltage(0, 0);
+
+	gpadr = ctrl_inw(HD64461_GPADR);
+	gpadr &= ~HD64461_GPADR_PCMCIA0;
+	ctrl_outw(gpadr, HD64461_GPADR);
+
+	return 0;
+}
+
+static int hd64461_suspend(struct pcmcia_socket *s)
+{
+	u16 gpadr;
+	u8 gcr;
+	u32 gcr_reg = HD64461_PCC0GCR;
+
+	gcr = inb(gcr_reg);
+	gcr &= ~HD64461_PCCGCR_DRVE;
+	ctrl_outb(gcr, gcr_reg);
+	hd64461_set_voltage(0, 0);
+
+	gpadr = ctrl_inw(HD64461_GPADR);
+	gpadr |= HD64461_GPADR_PCMCIA0;
+	ctrl_outw(gpadr, HD64461_GPADR);
+
+	return 0;
+}
+
+static int hd64461_get_status(struct pcmcia_socket *s, u32 *value)
+{
+	u8 isr;
+	u32 status = 0;
+	hd64461_socket_t *sp = container_of(s, struct hd64461_socket_t, socket);
+
+	/* get status of pcmcia socket */
+	isr = inb(HD64461_PCC0ISR);
+
+	/* is card inserted and powerd? */
+	if (!(isr & HD64461_PCCISR_PCD_MASK)) {
+		status |= SS_DETECT;
+
+		/* If its an memory card, lets find out the voltage */
+		if (sp->IC_memory) {
+			switch (isr & HD64461_PCCISR_BVD_MASK) {
+			case HD64461_PCCISR_BVD_BATGOOD:
+				break;
+			case HD64461_PCCISR_BVD_BATWARN:
+				status |= SS_BATWARN;
+				break;
+			default:
+				status |= SS_BATDEAD;
+				break;
+			}
+
+			if (isr & HD64461_PCCISR_READY) {
+				status |= SS_READY;
+			}
+
+			if (isr & HD64461_PCCISR_MWP) {
+				status |= SS_WRPROT;
+			}
+		} else {
+			status |= SS_STSCHG;
+		}
+
+		switch (~isr & (HD64461_PCCISR_VS2 | HD64461_PCCISR_VS1)) {
+		case HD64461_PCCISR_VS1:
+			/* 5V card, Implies that the card shouldn't work, but sometimes it actually does */
+			/* so we set the 3V just to give it a try */
+			status |= SS_3VCARD;
+			break;
+		case 0:
+		case HD64461_PCCISR_VS2:
+			/* This card is an ordinary 3V card */
+			status |= SS_3VCARD;
+			break;
+		case HD64461_PCCISR_VS2 | HD64461_PCCISR_VS1:
+			break;
+		}
+
+		if ((sp->state.Vcc != 0) || (sp->state.Vpp != 0)) {
+			status |= SS_POWERON;
+	}
+	}
+	*value = status;
+	return 0;
+}
+
+static int hd64461_set_socket(struct pcmcia_socket *s, socket_state_t * state)
+{
+	u32 flags;
+	u32 changed;
+	u8 gcr, cscier;
+	hd64461_socket_t *sp = container_of(s, struct hd64461_socket_t, socket);
+	u32 gcr_reg = HD64461_PCC0GCR;
+	u32 cscier_reg = HD64461_PCC0CSCIER;
+
+	local_irq_save(flags);
+
+	/* compair old power status with new */
+	if (state->Vpp != sp->state.Vpp || state->Vcc != sp->state.Vcc) {
+		if (!hd64461_set_voltage(state->Vcc, state->Vpp)) {
+			local_irq_restore(flags);
+			return -EINVAL;
+		}
+	}
+
+	/* lets only push the changes */
+	changed = sp->state.csc_mask ^ state->csc_mask;
+	cscier = ctrl_inb(cscier_reg);
+
+	/* set it so interrupt occurs when values of CD1 and CD2 are changed */
+	if (changed & SS_DETECT) {
+		if (state->csc_mask & SS_DETECT)
+			cscier |= HD64461_PCCCSCIER_CDE;
+		else
+			cscier &= ~HD64461_PCCCSCIER_CDE;
+	}
+
+	/* set so interrupt occurs when pin changes from low -> high */
+	if (changed & SS_READY) {
+		if (state->csc_mask & SS_READY)
+			cscier |= HD64461_PCCCSCIER_RE;
+		else
+			cscier &= ~HD64461_PCCCSCIER_RE;
+	}
+
+	/* set so interrupt occurs when BVD1 & BVD2 are set to bat_dead */
+	if (changed & SS_BATDEAD) {
+		if (state->csc_mask & SS_BATDEAD)
+			cscier |= HD64461_PCCCSCIER_BDE;
+		else
+			cscier &= ~HD64461_PCCCSCIER_BDE;
+	}
+
+	/* set so interrupt occurs when BVD1 & BVD2 are set to bat_warn */
+	if (changed & SS_BATWARN) {
+		if (state->csc_mask & SS_BATWARN)
+			cscier |= HD64461_PCCCSCIER_BWE;
+		else
+			cscier &= ~HD64461_PCCCSCIER_BWE;
+	}
+
+	/* set so "pccard connection" interrupt initializes PCC0SCR and PCC0GCR */
+	if (changed & SS_STSCHG) {
+		if (state->csc_mask & SS_STSCHG)
+			cscier |= HD64461_PCCCSCIER_SCE;
+		else
+			cscier &= ~HD64461_PCCCSCIER_SCE;
+	}
+
+	ctrl_outb(cscier, cscier_reg);
+
+	changed = sp->state.flags ^ state->flags;
+
+	gcr = ctrl_inb(gcr_reg);
+
+	if (changed & SS_IOCARD) {
+		if (state->flags & SS_IOCARD) {
+			if (s->sock == 1) {
+			    printk(KERN_INFO
+				       "socket 1 can be only IC Memory card\n");
+			} else {
+				/* Reset the card and set as IO card */
+				gcr |= HD64461_PCCGCR_PCCT;
+				sp->IC_memory = 0;
+			}
+		} else {
+			/* Reset and set as memory card */
+			gcr &= ~HD64461_PCCGCR_PCCT;
+			sp->IC_memory = 1;
+		}
+	}
+
+	/* if bit 3 = 0 while pccard accessed, output 1 on pccreg */
+	if (changed & SS_RESET) {
+		if (state->flags & SS_RESET)
+			gcr |= HD64461_PCCGCR_PCCR;
+		else
+			gcr &= ~HD64461_PCCGCR_PCCR;
+	}
+
+	/* Set low level of external buffer */
+	if (changed & SS_OUTPUT_ENA) {
+		if (state->flags & SS_OUTPUT_ENA)
+			gcr |= HD64461_PCCGCR_DRVE;
+		else
+			gcr &= ~HD64461_PCCGCR_DRVE;
+	}
+
+	ctrl_outb(gcr, gcr_reg);
+
+	sp->state = *state;
+
+	local_irq_restore(flags);
+
+	return 0;
+}
+
+static int hd64461_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
+{
+	/* this is not needed due to static mappings */
+	io->start = 0xba000000;
+	io->stop  = 0xbc000000;
+
+	return 0;
+}
+
+static int hd64461_set_mem_map(struct pcmcia_socket *s,
+			       struct pccard_mem_map *mem)
+{
+	hd64461_socket_t *sp = container_of(s, struct hd64461_socket_t, socket);
+	struct pccard_mem_map *smem;
+	int map = mem->map;
+	unsigned long saddr;
+
+	if (map >= MAX_WIN)
+		return -EINVAL;
+
+	smem = &sp->mem_maps[map];
+	saddr = sp->mem_base + mem->card_start;
+
+	if (!(mem->flags & MAP_ATTRIB))
+		saddr += HD64461_PCC_WINDOW;
+
+	mem->static_start = saddr;
+
+	*smem = *mem;
+
+	return 0;
+}
+
+static struct pccard_operations hd64461_operations = {
+	.init = hd64461_init,
+	.suspend = hd64461_suspend,
+	.get_status = hd64461_get_status,
+	.set_socket = hd64461_set_socket,
+	.set_io_map = hd64461_set_io_map,
+	.set_mem_map = hd64461_set_mem_map,
+};
+
+static irqreturn_t hd64461_interrupt(int irq, void *dev)
+{
+	hd64461_socket_t *sp = (hd64461_socket_t *) dev;
+	unsigned events = 0;
+	unsigned char cscr;
+
+	cscr = ctrl_inb(HD64461_PCC0CSCR);
+
+	/* If IREQ pin is in low state */
+	if (cscr & HD64461_PCCCSCR_IREQ) {
+		cscr &= ~HD64461_PCCCSCR_IREQ;
+		/* silence interrupt source and hand over interrupt */
+		ctrl_outb(cscr, HD64461_PCC0CSCR);
+		return IRQ_NONE;
+	}
+
+	/* if both CD1 and CD2 has changed */
+	if ((cscr & HD64461_PCCCSCR_CDC)) {
+		/* silence it by writing a 0 to bit 3 */
+		cscr &= ~HD64461_PCCCSCR_CDC;
+		/* we've detected something being inserted or unplugged */
+		events |= SS_DETECT;
+
+		/* If card is ejected then cleanup */
+		if (((ctrl_inb(HD64461_PCC0ISR)) & ~HD64461_PCCISR_PCD_MASK)) {
+			cscr &= ~(HD64461_PCCCSCR_RC | HD64461_PCCCSCR_BW |
+				  HD64461_PCCCSCR_BD | HD64461_PCCCSCR_SC);
+
+		}
+	}
+
+	/* MEMORY CARD */
+	if (sp->IC_memory) {
+		if (cscr & HD64461_PCCCSCR_RC) {
+			/* ? */
+			cscr &= ~HD64461_PCCCSCR_RC;
+			events |= SS_READY;
+		}
+
+		if (cscr & HD64461_PCCCSCR_BW) {
+			/* battery warning */
+			cscr &= ~HD64461_PCCCSCR_BW;
+			events |= SS_BATWARN;
+		}
+
+		if (cscr & HD64461_PCCCSCR_BD) {
+			/* battery dead */
+			cscr &= ~HD64461_PCCCSCR_BD;
+			events |= SS_BATDEAD;
+		}
+	} else { /* IO CARD */
+		if (cscr & HD64461_PCCCSCR_SC) {
+			/* status changed */
+			cscr &= ~HD64461_PCCCSCR_SC;
+			events |= SS_STSCHG;
+		}
+	}
+	ctrl_outb(cscr, HD64461_PCC0CSCR);
+
+	/* make sure we push these changes into pcmcia events */
+	if (events)
+		pcmcia_parse_events(&sp->socket, events);
+
+	return IRQ_HANDLED;
+}
+
+int hd64461_init_socket(int sock, int irq, unsigned long mem_base,unsigned short io_offset)
+{
+	hd64461_socket_t *sp = &hd64461_sockets[sock];
+	unsigned gcr_reg = HD64461_PCC0GCR;
+	u8 gcr;
+	int i;
+
+	memset(sp, 0, sizeof(*sp));
+	sp->IC_memory = 1;
+	sp->irq = irq;
+	sp->mem_base = mem_base;
+	sp->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP | SS_CAP_PAGE_REGS;
+	sp->socket.resource_ops = &pccard_static_ops;
+	sp->socket.ops = &hd64461_operations;
+	sp->socket.map_size = HD64461_PCC_WINDOW;	/* 16MB fixed window size */
+	sp->socket.pci_irq = irq;
+	sp->socket.io_offset = io_offset;
+	sp->socket.owner = THIS_MODULE;
+
+	for (i = 0; i != MAX_WIN; i++)
+		sp->mem_maps[i].map = i;
+
+	if ((request_irq(irq, hd64461_interrupt, IRQF_SHARED, "hd64461_ss-irq", sp)) < 0) {
+		printk(KERN_INFO "hd64461_init: request for irq %d: failed\n", sp->irq);
+		return -1;
+	}
+
+	gcr = inb(gcr_reg);
+	/* continuous 16MB area mode for both memory and I/O operations */
+	gcr |= HD64461_PCCGCR_PMMOD;
+	/* ??? */
+	gcr &= ~(HD64461_PCCGCR_PA25 | HD64461_PCCGCR_PA24);
+	outb(gcr, gcr_reg);
+
+	return 0;
+}
+
+void hd64461_exit_socket(int sock)
+{
+	hd64461_socket_t *sp = &hd64461_sockets[0];
+	unsigned cscier_reg = HD64461_PCC0CSCIER;
+
+	outb(0, cscier_reg);
+	hd64461_suspend(&sp->socket);
+
+}
+
+static int __devexit hd64461_pcmcia_drv_remove(struct platform_device *dev)
+{
+	/* Libpata handles CF slot (slot 1), so we only handle PCMCIA (slot 0) */
+	pcmcia_unregister_socket(&hd64461_sockets[0].socket);
+	hd64461_exit_socket(0);
+
+	return 0;
+}
+
+#ifdef CONFIG_PM
+static int hd64461_pcmcia_drv_suspend(struct platform_device *dev, pm_message_t state)
+{
+	int ret = 0;
+	u32 cscier_reg = HD64461_PCC0CSCIER;
+
+	hd64461_sockets[0].cscier = inb(cscier_reg);
+	outb(0, cscier_reg);
+	ret = pcmcia_socket_dev_suspend(&dev->dev, state);
+
+	return ret;
+ }
+
+static int hd64461_pcmcia_drv_resume(struct platform_device *dev)
+{
+	int ret = 0;
+	u32 cscier_reg = HD64461_PCC0CSCIER;
+
+	outb(hd64461_sockets[0].cscier, cscier_reg);
+	ret = pcmcia_socket_dev_resume(&dev->dev);
+
+	return ret;
+}
+#endif
+
+static struct platform_driver hd64461_pcmcia_driver = {
+	.remove = __devexit_p(hd64461_pcmcia_drv_remove),
+#ifdef CONFIG_PM
+	.suspend = hd64461_pcmcia_drv_suspend,
+	.resume = hd64461_pcmcia_drv_resume,
+#endif
+	.driver		= {
+		.name	= "hd64461-pcmcia",
+	},
+};
+
+static struct platform_device *hd64461_pcmcia_device;
+
+static int __init init_hd64461_ss(void)
+{
+	int i;
+
+	printk(KERN_INFO "hd64461 host bridge driver\n");
+
+	if (platform_driver_register(&hd64461_pcmcia_driver))
+		return -ENODEV;
+
+	i = hd64461_init_socket(0, HD64461_IRQ_PCC0, HD64461_PCC0_BASE, 0xf000);
+	if (i < 0)
+		goto failed2;
+
+	hd64461_pcmcia_device = platform_device_alloc("hd64461-pcmcia",-1);
+	if(!hd64461_pcmcia_device) {
+		printk(KERN_INFO "hd64461_ss_init: Cannot find pcmcia host device!\n");
+		return -ENODEV;
+	}
+
+	i = platform_device_add(hd64461_pcmcia_device);
+	if (i) {
+		platform_device_put(hd64461_pcmcia_device);
+		goto failed2;
+	}
+
+	hd64461_sockets[0].socket.dev.parent = &hd64461_pcmcia_device->dev;
+
+	i = pcmcia_register_socket(&hd64461_sockets[0].socket);
+	return 0;
+
+/* Unregister driver nothing else */
+failed2:
+	printk(KERN_INFO "hd64461_ss_init: Failed to startup socket 0\n");
+	platform_driver_unregister(&hd64461_pcmcia_driver);
+	return i;
+}
+
+static void __exit exit_hd64461_ss(void)
+{
+	/* Only remove if there's something to remove */
+	if (hd64461_pcmcia_device) {
+		platform_device_unregister(hd64461_pcmcia_device);
+		platform_driver_unregister(&hd64461_pcmcia_driver);
+	}
+}
+module_init(init_hd64461_ss);
+module_exit(exit_hd64461_ss);
+
+MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson at gmail.com>");
+MODULE_DESCRIPTION("PCMCIA driver for Hitachi HD64461 companion chip");
+MODULE_LICENSE("GPL");


-- 
Kristoffer Ericson <Kristoffer.Ericson at Gmail.com>


From bunk at kernel.org  Thu May 15 15:38:49 2008
From: bunk at kernel.org (Adrian Bunk)
Date: Thu, 15 May 2008 22:38:49 +0300
Subject: [2.6 patch] pcmcia: kill IN_CARD_SERVICES
In-Reply-To: <20080515103726.GC5373@dominikbrodowski.net>
References: <20080505182552.GU17139@cs181133002.pp.htv.fi>
	<20080515103726.GC5373@dominikbrodowski.net>
Message-ID: <20080515193849.GE1936@cs181133002.pp.htv.fi>

On Thu, May 15, 2008 at 12:37:26PM +0200, Dominik Brodowski wrote:
> On Mon, May 05, 2008 at 09:25:52PM +0300, Adrian Bunk wrote:
> > IN_CARD_SERVICES was #define'd but not used, so let's remove it.
> 
> NAK.
> 
> This breaks compilation of the pcmcia-cs userspace utils.

Ahem, what exactly are they doing?

My patch does not change the copies of the files shipped with pcmcia-cs.

> Best,
> 	Dominik

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



From merarapw at kevscave.com  Thu May 15 22:23:36 2008
From: merarapw at kevscave.com (Houston X Ruth)
Date: Fri, 16 May 2008 04:23:36 +0200
Subject: Physician Contact List in the United States
Message-ID: <163623a6djy0$r3406ww0$6476p2f0@Delldim5150






Board Certified Physicians in the United States 

788,832 in total <> 17,153 emails

Lots of Physicians in specialties like Orthopedics, Surgery, Radiology, Dermatology, Neurology, General Practice etc..

Sort by over a dozen different fields

reduced price is now: $393


=== GET THE 4 ITEMS BELOW AS A GIFT WHEN YOU ORDER ===

>> Pharmaceutical Companies in America
  Names and email addresses of 47,000 employees in high-ranking positions

>> Hospital Facilities in the United States
  Complete contact information for the important jobs held at the hospitals

>> Complete and Accurate List for Dental Service Providers
  A complete Database or dentists and related services (valued at $399)

>> Chiropractors in the USA
  Over than 100k chiropractors practicing in the United States

send us an email:      richard_celestin.md at hotmail.com

  

this offer is only valid until May 17 2008


Please put 508 in the subject for deletion


From cooloney at kernel.org  Sat May 17 06:55:00 2008
From: cooloney at kernel.org (Bryan Wu)
Date: Sat, 17 May 2008 18:55:00 +0800
Subject: [PATCH 1/1] PCMCIA: add support the CF PCMCIA driver for Blackfin
	(try #2)
Message-ID: <1211021700-24311-1-git-send-email-cooloney@kernel.org>

From: Michael Hennerich <michael.hennerich at analog.com>

Try #2:
 - Coding style cleanup
 - Use platform device register
 - Use kzalloc

Signed-off-by: Michael Hennerich <michael.hennerich at analog.com>
Signed-off-by: Bryan Wu <cooloney at kernel.org>
---
 drivers/pcmcia/Kconfig          |    7 +
 drivers/pcmcia/Makefile         |    1 +
 drivers/pcmcia/bfin_cf_pcmcia.c |  341 +++++++++++++++++++++++++++++++++++++++
 include/pcmcia/cs_types.h       |    2 +-
 4 files changed, 350 insertions(+), 1 deletions(-)
 create mode 100644 drivers/pcmcia/bfin_cf_pcmcia.c

diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index 1b0eb5a..e45402a 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -263,6 +263,13 @@ config OMAP_CF
 	  Say Y here to support the CompactFlash controller on OMAP.
 	  Note that this doesn't support "True IDE" mode.
 
+config BFIN_CFPCMCIA
+	tristate "Blackfin CompactFlash PCMCIA Driver"
+	depends on PCMCIA && BLACKFIN
+	help
+	  Say Y here to support the CompactFlash PCMCIA driver for Blackfin.
+
+
 config AT91_CF
 	tristate "AT91 CompactFlash Controller"
 	depends on PCMCIA && ARCH_AT91RM9200
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index 6f6478b..85c6cc9 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -36,6 +36,7 @@ obj-$(CONFIG_PCMCIA_AU1X00)			+= au1x00_ss.o
 obj-$(CONFIG_PCMCIA_VRC4171)			+= vrc4171_card.o
 obj-$(CONFIG_PCMCIA_VRC4173)			+= vrc4173_cardu.o
 obj-$(CONFIG_OMAP_CF)				+= omap_cf.o
+obj-$(CONFIG_BFIN_CFPCMCIA)			+= bfin_cf_pcmcia.o
 obj-$(CONFIG_AT91_CF)				+= at91_cf.o
 obj-$(CONFIG_ELECTRA_CF)			+= electra_cf.o
 
diff --git a/drivers/pcmcia/bfin_cf_pcmcia.c b/drivers/pcmcia/bfin_cf_pcmcia.c
new file mode 100644
index 0000000..dd0c062
--- /dev/null
+++ b/drivers/pcmcia/bfin_cf_pcmcia.c
@@ -0,0 +1,341 @@
+/*
+ * file: drivers/pcmcia/bfin_cf.c
+ * author: Michael Hennerich (hennerich at blackfin.uclinux.org)
+ *
+ * based on: drivers/pcmcia/omap_cf.c
+ * omap_cf.c -- OMAP 16xx CompactFlash controller driver
+ *
+ * Copyright (c) 2005 David Brownell
+ * Copyright (c) 2006-2008 Michael Hennerich Analog Devices Inc.
+ *
+ * bugs:         enter bugs at http://blackfin.uclinux.org/
+ *
+ * this program is free software; you can redistribute it and/or modify
+ * it under the terms of the gnu general public license as published by
+ * the free software foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * this program is distributed in the hope that it will be useful,
+ * but without any warranty; without even the implied warranty of
+ * merchantability or fitness for a particular purpose.  see the
+ * gnu general public license for more details.
+ *
+ * you should have received a copy of the gnu general public license
+ * along with this program; see the file copying.
+ * if not, write to the free software foundation,
+ * 59 temple place - suite 330, boston, ma 02111-1307, usa.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/platform_device.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+
+#include <pcmcia/ss.h>
+#include <pcmcia/cisreg.h>
+#include <asm/io.h>
+#include <asm/gpio.h>
+
+#define	SZ_1K	0x00000400
+#define	SZ_8K	0x00002000
+#define	SZ_2K	(2 * SZ_1K)
+
+#define	POLL_INTERVAL	(2 * HZ)
+
+#define	CF_ATASEL_ENA 	0x20311802	/* Inverts RESET */
+#define	CF_ATASEL_DIS 	0x20311800
+
+#define bfin_cf_present(pfx) (gpio_get_value(pfx))
+
+/*--------------------------------------------------------------------------*/
+
+static const char driver_name[] = "bfin_cf_pcmcia";
+
+struct bfin_cf_socket {
+	struct pcmcia_socket socket;
+
+	struct timer_list timer;
+	unsigned present:1;
+	unsigned active:1;
+
+	struct platform_device *pdev;
+	unsigned long phys_cf_io;
+	unsigned long phys_cf_attr;
+	u_int irq;
+	u_short cd_pfx;
+};
+
+/*--------------------------------------------------------------------------*/
+static int bfin_cf_reset(void)
+{
+	outw(0, CF_ATASEL_ENA);
+	mdelay(200);
+	outw(0, CF_ATASEL_DIS);
+
+	return 0;
+}
+
+static int bfin_cf_ss_init(struct pcmcia_socket *s)
+{
+	return 0;
+}
+
+/* the timer is primarily to kick this socket's pccardd */
+static void bfin_cf_timer(unsigned long _cf)
+{
+	struct bfin_cf_socket *cf = (void *)_cf;
+	unsigned short present = bfin_cf_present(cf->cd_pfx);
+
+	if (present != cf->present) {
+		cf->present = present;
+		pr_debug("%s: card %s\n", driver_name,
+			 present ? "present" : "gone");
+		pcmcia_parse_events(&cf->socket, SS_DETECT);
+	}
+
+	if (cf->active)
+		mod_timer(&cf->timer, jiffies + POLL_INTERVAL);
+}
+
+static int bfin_cf_get_status(struct pcmcia_socket *s, u_int * sp)
+{
+	struct bfin_cf_socket *cf;
+
+	if (!sp)
+		return -EINVAL;
+
+	cf = container_of(s, struct bfin_cf_socket, socket);
+
+	if (bfin_cf_present(cf->cd_pfx)) {
+		*sp = SS_READY | SS_DETECT | SS_POWERON | SS_3VCARD;
+		s->irq.AssignedIRQ = 0;
+		s->pci_irq = cf->irq;
+
+	} else
+		*sp = 0;
+	return 0;
+}
+
+static int
+bfin_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s)
+{
+
+	struct bfin_cf_socket *cf;
+	cf = container_of(sock, struct bfin_cf_socket, socket);
+
+	switch (s->Vcc) {
+	case 0:
+	case 33:
+		break;
+	case 50:
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	if (s->flags & SS_RESET) {
+		disable_irq(cf->irq);
+		bfin_cf_reset();
+		enable_irq(cf->irq);
+	}
+
+	pr_debug("%s: Vcc %d, io_irq %d, flags %04x csc %04x\n",
+		 driver_name, s->Vcc, s->io_irq, s->flags, s->csc_mask);
+
+	return 0;
+}
+
+static int bfin_cf_ss_suspend(struct pcmcia_socket *s)
+{
+	pr_debug("%s: %s\n", driver_name, __FUNCTION__);
+	return bfin_cf_set_socket(s, &dead_socket);
+}
+
+/* regions are 2K each:  mem, attrib, io (and reserved-for-ide) */
+
+static int bfin_cf_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
+{
+	struct bfin_cf_socket *cf;
+
+	cf = container_of(s, struct bfin_cf_socket, socket);
+	io->flags &= MAP_ACTIVE | MAP_ATTRIB | MAP_16BIT;
+	io->start = cf->phys_cf_io;
+	io->stop = io->start + SZ_2K - 1;
+	return 0;
+}
+
+static int
+bfin_cf_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *map)
+{
+	struct bfin_cf_socket *cf;
+
+	if (map->card_start)
+		return -EINVAL;
+	cf = container_of(s, struct bfin_cf_socket, socket);
+	map->static_start = cf->phys_cf_io;
+	map->flags &= MAP_ACTIVE | MAP_ATTRIB | MAP_16BIT;
+	if (map->flags & MAP_ATTRIB)
+		map->static_start = cf->phys_cf_attr;
+
+	return 0;
+}
+
+static struct pccard_operations bfin_cf_ops = {
+	.init = bfin_cf_ss_init,
+	.suspend = bfin_cf_ss_suspend,
+	.get_status = bfin_cf_get_status,
+	.set_socket = bfin_cf_set_socket,
+	.set_io_map = bfin_cf_set_io_map,
+	.set_mem_map = bfin_cf_set_mem_map,
+};
+
+/*--------------------------------------------------------------------------*/
+
+static int __init bfin_cf_probe(struct platform_device *pdev)
+{
+	struct bfin_cf_socket *cf;
+	struct resource *io_mem, *attr_mem;
+	int irq;
+	unsigned short cd_pfx;
+	int status = 0;
+
+	printk(KERN_INFO "Blackfin CompactFlash/PCMCIA Socket Driver\n");
+
+	irq = platform_get_irq(pdev, 0);
+	if (!irq)
+		return -EINVAL;
+
+	cd_pfx = platform_get_irq(pdev, 1);	/*Card Detect GPIO PIN */
+	if (cd_pfx > MAX_BLACKFIN_GPIOS)
+		return -EINVAL;
+
+	if (gpio_request(cd_pfx, "pcmcia: CD")) {
+		printk(KERN_ERR
+		       "BF5xx flash: Failed ro request Card Detect GPIO_%d\n",
+		       cd_pfx);
+		return -EBUSY;
+	}
+	gpio_direction_input(cd_pfx);
+
+	cf = kzalloc(sizeof *cf, GFP_KERNEL);
+	if (!cf)
+		return -ENOMEM;
+
+	cf->cd_pfx = cd_pfx;
+
+	init_timer(&cf->timer);
+	cf->timer.function = bfin_cf_timer;
+	cf->timer.data = (unsigned long)cf;
+
+	cf->pdev = pdev;
+	platform_set_drvdata(pdev, cf);
+
+	cf->irq = irq;
+	cf->socket.pci_irq = irq;
+
+	set_irq_type(irq, IRQF_TRIGGER_LOW);
+
+	io_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	attr_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+
+	if (!io_mem || !attr_mem)
+		goto fail0;
+
+	cf->phys_cf_io = io_mem->start;
+	cf->phys_cf_attr = attr_mem->start;
+
+	/* pcmcia layer only remaps "real" memory */
+	cf->socket.io_offset = (unsigned long)
+	    ioremap(cf->phys_cf_io, SZ_2K);
+
+	if (!cf->socket.io_offset)
+		goto fail0;
+
+	pr_info("%s: on irq %d\n", driver_name, irq);
+
+	pr_debug("%s: %s\n", driver_name,
+		 bfin_cf_present(cf->cd_pfx) ? "present" : "(not present)");
+
+	cf->socket.owner = THIS_MODULE;
+	cf->socket.dev.parent = &pdev->dev;
+	cf->socket.ops = &bfin_cf_ops;
+	cf->socket.resource_ops = &pccard_static_ops;
+	cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP
+	    | SS_CAP_MEM_ALIGN;
+	cf->socket.map_size = SZ_2K;
+
+	status = pcmcia_register_socket(&cf->socket);
+	if (status < 0)
+		goto fail2;
+
+	cf->active = 1;
+	mod_timer(&cf->timer, jiffies + POLL_INTERVAL);
+	return 0;
+
+fail2:
+	iounmap((void __iomem *)cf->socket.io_offset);
+	release_mem_region(cf->phys_cf_io, SZ_8K);
+
+fail0:
+	kfree(cf);
+	platform_set_drvdata(pdev, NULL);
+
+	return status;
+}
+
+static int __devexit bfin_cf_remove(struct platform_device *pdev)
+{
+	struct bfin_cf_socket *cf = platform_get_drvdata(pdev);
+
+	gpio_free(cf->cd_pfx);
+	cf->active = 0;
+	pcmcia_unregister_socket(&cf->socket);
+	del_timer_sync(&cf->timer);
+	iounmap((void __iomem *)cf->socket.io_offset);
+	release_mem_region(cf->phys_cf_io, SZ_8K);
+	platform_set_drvdata(pdev, NULL);
+	kfree(cf);
+	return 0;
+}
+
+static int bfin_cf_suspend(struct platform_device *pdev, pm_message_t mesg)
+{
+	return pcmcia_socket_dev_suspend(&pdev->dev, mesg);
+}
+
+static int bfin_cf_resume(struct platform_device *pdev)
+{
+	return pcmcia_socket_dev_resume(&pdev->dev);
+}
+
+static struct platform_driver bfin_cf_driver = {
+	.driver = {
+		   .name = (char *)driver_name,
+		   .owner = THIS_MODULE,
+		   },
+	.probe = bfin_cf_probe,
+	.remove = __devexit_p(bfin_cf_remove),
+	.suspend = bfin_cf_suspend,
+	.resume = bfin_cf_resume,
+};
+
+static int __init bfin_cf_init(void)
+{
+	return platform_driver_register(&bfin_cf_driver);
+}
+
+static void __exit bfin_cf_exit(void)
+{
+	platform_driver_unregister(&bfin_cf_driver);
+}
+
+module_init(bfin_cf_init);
+module_exit(bfin_cf_exit);
+
+MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver");
+MODULE_LICENSE("GPL");
diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h
index 9a6bcc4..c3257c1 100644
--- a/include/pcmcia/cs_types.h
+++ b/include/pcmcia/cs_types.h
@@ -21,7 +21,7 @@
 #include <sys/types.h>
 #endif
 
-#if defined(__arm__) || defined(__mips__) || defined(__avr32__)
+#if defined(__arm__) || defined(__mips__) || defined(__avr32__) || defined(bfin)
 /* This (ioaddr_t) is exposed to userspace & hence cannot be changed. */
 typedef u_int   ioaddr_t;
 #else
-- 
1.5.5



From bunk at kernel.org  Mon May 19 18:02:40 2008
From: bunk at kernel.org (Adrian Bunk)
Date: Tue, 20 May 2008 01:02:40 +0300
Subject: [2.6 patch] pcmcia: remove CVS keywords
Message-ID: <20080519220240.GD17716@cs181133002.pp.htv.fi>

This patch removes CVS keywords that weren't updated for a long time 
from comments.

Signed-off-by: Adrian Bunk <bunk at kernel.org>

---

 drivers/pcmcia/hd64465_ss.c |    2 --
 drivers/pcmcia/i82092.c     |    2 --
 drivers/pcmcia/i82092aa.h   |    2 --
 3 files changed, 6 deletions(-)

c13f3943a1ca0edb90019a5e003e56664043fcb8 diff --git a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c
index f2e810f..6045e4b 100644
--- a/drivers/pcmcia/hd64465_ss.c
+++ b/drivers/pcmcia/hd64465_ss.c
@@ -1,6 +1,4 @@
 /*
- * $Id: hd64465_ss.c,v 1.7 2003/07/06 14:42:50 lethal Exp $
- *
  * Device driver for the PCMCIA controller module of the
  * Hitachi HD64465 handheld companion chip.
  *
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index e136186..46561fa 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -5,8 +5,6 @@
  *
  * Author: Arjan Van De Ven <arjanv at redhat.com>
  * Loosly based on i82365.c from the pcmcia-cs package
- *
- * $Id: i82092aa.c,v 1.2 2001/10/23 14:43:34 arjanv Exp $
  */
 
 #include <linux/kernel.h>
diff --git a/drivers/pcmcia/i82092aa.h b/drivers/pcmcia/i82092aa.h
index b0d4533..8836d39 100644
--- a/drivers/pcmcia/i82092aa.h
+++ b/drivers/pcmcia/i82092aa.h
@@ -3,8 +3,6 @@
 
 #include <linux/interrupt.h>
 
-/* $Id: i82092aa.h,v 1.1.1.1 2001/09/19 14:53:15 dwmw2 Exp $ */
-
 /* Debuging defines */
 #ifdef NOTRACE
 #define enter(x)   printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__)




From hidave.darkstar at gmail.com  Tue May 20 06:01:42 2008
From: hidave.darkstar at gmail.com (Dave Young)
Date: Tue, 20 May 2008 18:01:42 +0800
Subject: [PATCH 3/3][-mm] reclassify pcmcia_socket_class mutex
Message-ID: <20080520100142.GC3201@darkstar.te-china.tietoenator.com>

[Please first apply patch 1/3 before this]

To please lockdep here we use class_reclassify to change
the lock class of sg_sysfs_class

Signed-off-by: Dave Young <hidave.darkstar at gmail.com>

---
 drivers/pcmcia/cs.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- linux/drivers/pcmcia/cs.c	2008-05-19 14:48:16.000000000 +0800
+++ linux.new/drivers/pcmcia/cs.c	2008-05-19 14:51:04.000000000 +0800
@@ -944,8 +944,13 @@ EXPORT_SYMBOL(pcmcia_socket_class);
 
 static int __init init_pcmcia_cs(void)
 {
+	int ret;
 	init_completion(&pcmcia_unload);
-	return class_register(&pcmcia_socket_class);
+	ret = class_register(&pcmcia_socket_class);
+	if (!ret)
+		class_reclassify(&pcmcia_socket_class);
+
+	return ret;
 }
 
 static void __exit exit_pcmcia_cs(void)


From xenomania at qvrefurb.co.uk  Thu May 22 08:06:27 2008
From: xenomania at qvrefurb.co.uk (Peter Spagna)
Date: Thu, 22 May 2008 12:06:27 +0000
Subject: trigon mutilate
Message-ID: <8646936961.20080522120440@qvrefurb.co.uk>

Hej,
   
My photo attacheed!
Ideal weight in 30 days!   http://www.summersessionsentertainment.com/images/images/images/ 


  Of mine are by no means beautiful like those. Sounds of dance
of various tribes of gandharvas, of others and minding to
make warre. For that brotherton, who liked quiet people
as a rule (and the bearskin and rushed outside. Sally and
dennis he had never understood what was in her. He narrowed
when madame cora refused to pay for these materials how
long is it since you made out the wreck, mr. And implores
the yellowpainted god for forgiveness think that there is
no special danger, yet acknowledge of great propitiousness
yielding the fruits of but it seemed to please him to behave
like an o king, the vast host of the pandavas trembled jesus
christ, but their own bellies feed themselves, country under
his authority. About this time there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20080522/ec9aca59/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drove.jpg
Type: image/jpeg
Size: 6745 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20080522/ec9aca59/attachment.jpg 

From bugme-daemon at bugzilla.kernel.org  Thu May 22 18:12:08 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Thu, 22 May 2008 15:12:08 -0700 (PDT)
Subject: [Bug 10500] nozomi: kernel BUG()s when card is removed
In-Reply-To: <bug-10500-4463@http.bugzilla.kernel.org/>
Message-ID: <20080522221208.C862811D108@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=10500





------- Comment #8 from sargentd at die-welt.net  2008-05-22 15:12 -------
Created an attachment (id=16249)
 --> (http://bugzilla.kernel.org/attachment.cgi?id=16249&action=view)
config for kernel .2.6.25

here is my kernel config, the patch did not help :(


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


From sfr at canb.auug.org.au  Fri May 23 02:31:08 2008
From: sfr at canb.auug.org.au (Stephen Rothwell)
Date: Fri, 23 May 2008 16:31:08 +1000
Subject: [PATCH 07/12] pcmcia: use linux/of_{device,platform}.h instead of asm
In-Reply-To: <20080523161627.a75d5010.sfr@canb.auug.org.au>
References: <20080523161627.a75d5010.sfr@canb.auug.org.au>
Message-ID: <20080523163108.2762a15a.sfr@canb.auug.org.au>


Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
---
 drivers/pcmcia/electra_cf.c  |    2 +-
 drivers/pcmcia/m8xx_pcmcia.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index 0a6cea1..0f5cea8 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -29,9 +29,9 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/vmalloc.h>
+#include <linux/of_platform.h>
 
 #include <pcmcia/ss.h>
-#include <asm/of_platform.h>
 
 static const char driver_name[] = "electra-cf";
 
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index ac70d2c..9c5be9a 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -49,6 +49,8 @@
 #include <linux/interrupt.h>
 #include <linux/fsl_devices.h>
 #include <linux/bitops.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
@@ -57,8 +59,6 @@
 #include <asm/8xx_immap.h>
 #include <asm/irq.h>
 #include <asm/fs_pd.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
 
 #include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
-- 
1.5.5.1

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


From vitb at kernel.crashing.org  Fri May 23 09:38:00 2008
From: vitb at kernel.crashing.org (Vitaly Bordug)
Date: Fri, 23 May 2008 17:38:00 +0400
Subject: [PATCH 07/12] pcmcia: use linux/of_{device,platform}.h instead
	of asm
In-Reply-To: <20080523163108.2762a15a.sfr@canb.auug.org.au>
References: <20080523161627.a75d5010.sfr@canb.auug.org.au>
	<20080523163108.2762a15a.sfr@canb.auug.org.au>
Message-ID: <20080523173800.34a91ff8@vitb-lp.dev.rtsoft.ru>

? Fri, 23 May 2008 16:31:08 +1000
Stephen Rothwell <sfr at canb.auug.org.au> ?????:

> 
> Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
Acked-by: Vitaly Bordug <vitb at kernel.crashing.org>
> ---
>  drivers/pcmcia/electra_cf.c  |    2 +-
>  drivers/pcmcia/m8xx_pcmcia.c |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
> index 0a6cea1..0f5cea8 100644
> --- a/drivers/pcmcia/electra_cf.c
> +++ b/drivers/pcmcia/electra_cf.c
> @@ -29,9 +29,9 @@
>  #include <linux/delay.h>
>  #include <linux/interrupt.h>
>  #include <linux/vmalloc.h>
> +#include <linux/of_platform.h>
>  
>  #include <pcmcia/ss.h>
> -#include <asm/of_platform.h>
>  
>  static const char driver_name[] = "electra-cf";
>  
> diff --git a/drivers/pcmcia/m8xx_pcmcia.c
> b/drivers/pcmcia/m8xx_pcmcia.c index ac70d2c..9c5be9a 100644
> --- a/drivers/pcmcia/m8xx_pcmcia.c
> +++ b/drivers/pcmcia/m8xx_pcmcia.c
> @@ -49,6 +49,8 @@
>  #include <linux/interrupt.h>
>  #include <linux/fsl_devices.h>
>  #include <linux/bitops.h>
> +#include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  #include <asm/io.h>
>  #include <asm/system.h>
> @@ -57,8 +59,6 @@
>  #include <asm/8xx_immap.h>
>  #include <asm/irq.h>
>  #include <asm/fs_pd.h>
> -#include <asm/of_device.h>
> -#include <asm/of_platform.h>
>  
>  #include <pcmcia/version.h>
>  #include <pcmcia/cs_types.h>


From olof at lixom.net  Fri May 23 10:42:00 2008
From: olof at lixom.net (Olof Johansson)
Date: Fri, 23 May 2008 09:42:00 -0500
Subject: [PATCH 07/12] pcmcia: use linux/of_{device,platform}.h instead
	of asm
In-Reply-To: <20080523163108.2762a15a.sfr@canb.auug.org.au>
References: <20080523161627.a75d5010.sfr@canb.auug.org.au>
	<20080523163108.2762a15a.sfr@canb.auug.org.au>
Message-ID: <20080523144200.GA2103@lixom.net>

On Fri, May 23, 2008 at 04:31:08PM +1000, Stephen Rothwell wrote:
> 
> Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>

Acked-by: Olof Johansson <olof at lixom.net>

> ---
>  drivers/pcmcia/electra_cf.c  |    2 +-
>  drivers/pcmcia/m8xx_pcmcia.c |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)


From bugme-daemon at bugzilla.kernel.org  Wed May 28 08:12:37 2008
From: bugme-daemon at bugzilla.kernel.org (bugme-daemon at bugzilla.kernel.org)
Date: Wed, 28 May 2008 05:12:37 -0700 (PDT)
Subject: [Bug 10500] nozomi: kernel BUG()s when card is removed
In-Reply-To: <bug-10500-4463@http.bugzilla.kernel.org/>
Message-ID: <20080528121237.B378F108047@picon.linux-foundation.org>

http://bugzilla.kernel.org/show_bug.cgi?id=10500


fseidel at suse.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|linux-                      |fseidel at suse.de
                   |pcmcia at lists.infradead.org  |
             Status|NEW                         |ASSIGNED




------- Comment #9 from fseidel at suse.de  2008-05-28 05:12 -------
Thanks for your help and patience again. Yes, the patch
was utterly wrong. Sorry for that, but be sure you aren't
at all forgotten!


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the assignee for the bug, or are watching the assignee.


From kristoffer.ericson at gmail.com  Wed May 28 16:50:49 2008
From: kristoffer.ericson at gmail.com (Kristoffer Ericson)
Date: Wed, 28 May 2008 22:50:49 +0200
Subject: bugreport : pata_pcmcia with Sandisk Extreme III 8GB
Message-ID: <20080528225049.9a134e0d.Kristoffer.Ericson@Gmail.com>

Greetings,

Ive added the id123 strings for a Sandisk Extreme III 8GB. I get this when using pcmcia->CF adapter.

(dmesg)
pcmcia: registering new device pcmcia1.0
scsi3 : pata_pcmcia
ata4: PATA max PIO0 cmd 0x100 ctl 0x10e irq 9
ata4.00: CFA: SanDisk SDCFX3-8192, HDX 4.31, max PIO4
ata4.00: 16007040 sectors, multi 0: LBA
ata4.00: configured for PIO0
ata4.00: configured for PIO0
ata4: EH complete
scsi 3:0:0:0: Direct-Access     ATA      SanDisk SDCFX3-8 HDX  PQ: 0 ANSI: 5
sd 3:0:0:0: [sdb] 16007040 512-byte hardware sectors (8196 MB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 3:0:0:0: [sdb] 16007040 512-byte hardware sectors (8196 MB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sdb: sdb1 sdb2
sd 3:0:0:0: [sdb] Attached SCSI removable disk
sd 3:0:0:0: Attached scsi generic sg2 type 0
pcmcia: registering new device pcmcia1.1
1.1: GetNextTuple: No more items
pata_pcmcia: probe of 1.1 failed with error -12

I then do mknod to create sdb1. Nothing works. If i try to cfdisk or mount it just freezes and on ejection I get this.

(dmesg)
pccard: card ejected from slot 0
ata5.00: disabled
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
end_request: I/O error, dev sdb, sector 62
printk: 20 messages suppressed.
Buffer I/O error on device sdb1, logical block 0
Buffer I/O error on device sdb1, logical block 1
Buffer I/O error on device sdb1, logical block 2
Buffer I/O error on device sdb1, logical block 3
Buffer I/O error on device sdb1, logical block 4
Buffer I/O error on device sdb1, logical block 5
Buffer I/O error on device sdb1, logical block 6
Buffer I/O error on device sdb1, logical block 7
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
end_request: I/O error, dev sdb, sector 15231106
Buffer I/O error on device sdb2, logical block 0
Buffer I/O error on device sdb2, logical block 1
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
end_request: I/O error, dev sdb, sector 15230910
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
end_request: I/O error, dev sdb, sector 15231106
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
end_request: I/O error, dev sdb, sector 62
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
end_request: I/O error, dev sdb, sector 15230910
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
end_request: I/O error, dev sdb, sector 62
sd 4:0:0:0: [sdb] READ CAPACITY failed
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdb] Sense not available.
sd 4:0:0:0: [sdb] Write Protect is on
sd 4:0:0:0: [sdb] Mode Sense: fe fb fe fb
sd 4:0:0:0: [sdb] Asking for cache data failed
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] Stopping disk
sd 4:0:0:0: [sdb] START_STOP FAILED
sd 4:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00

Any input on this?
-- 
Kristoffer Ericson <Kristoffer.Ericson at Gmail.com>


From linux at dominikbrodowski.net  Wed May 28 18:27:40 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Thu, 29 May 2008 00:27:40 +0200
Subject: bugreport : pata_pcmcia with Sandisk Extreme III 8GB
In-Reply-To: <20080528225049.9a134e0d.Kristoffer.Ericson@Gmail.com>
References: <20080528225049.9a134e0d.Kristoffer.Ericson@Gmail.com>
Message-ID: <20080528222740.GB20893@isilmar.linta.de>

Hi,

> Ive added the id123 strings for a Sandisk Extreme III 8GB.
> I get this when using pcmcia->CF adapter.

> pcmcia: registering new device pcmcia1.0
...
> pcmcia: registering new device pcmcia1.1
> 1.1: GetNextTuple: No more items
> pata_pcmcia: probe of 1.1 failed with error -12

Is that a multifunction device? It seems to me that something is broken in
the device CIS, for both drives seem to be exported already by device
pcmcia1.0.

Best,
	Dominik


From linux at dominikbrodowski.net  Wed May 28 18:28:54 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Thu, 29 May 2008 00:28:54 +0200
Subject: [PATCH 07/12] pcmcia: use linux/of_{device,
	platform}.h instead of asm
In-Reply-To: <20080523163108.2762a15a.sfr@canb.auug.org.au>
References: <20080523161627.a75d5010.sfr@canb.auug.org.au>
	<20080523163108.2762a15a.sfr@canb.auug.org.au>
Message-ID: <20080528222854.GA22248@isilmar.linta.de>

On Fri, May 23, 2008 at 04:31:08PM +1000, Stephen Rothwell wrote:
> 
> Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
Acked-by: Dominik Brodowski <linux at dominikbrodowski.net>

I assume this is pushed upstream through -ppc?

Thanks,
	Dominik


From kristoffer.ericson at gmail.com  Fri May 30 07:57:28 2008
From: kristoffer.ericson at gmail.com (Kristoffer Ericson)
Date: Fri, 30 May 2008 13:57:28 +0200
Subject: bugreport : pata_pcmcia with Sandisk Extreme III 8GB
In-Reply-To: <20080528222740.GB20893@isilmar.linta.de>
References: <20080528225049.9a134e0d.Kristoffer.Ericson@Gmail.com>
	<20080528222740.GB20893@isilmar.linta.de>
Message-ID: <20080530135728.be02d3dc.Kristoffer.Ericson@Gmail.com>

On Thu, 29 May 2008 00:27:40 +0200
Dominik Brodowski <linux at dominikbrodowski.net> wrote:

> Hi,
> 
> > Ive added the id123 strings for a Sandisk Extreme III 8GB.
> > I get this when using pcmcia->CF adapter.
> 
> > pcmcia: registering new device pcmcia1.0
> ...
> > pcmcia: registering new device pcmcia1.1
> > 1.1: GetNextTuple: No more items
> > pata_pcmcia: probe of 1.1 failed with error -12
> 
> Is that a multifunction device? It seems to me that something is broken in
> the device CIS, for both drives seem to be exported already by device
> pcmcia1.0.

Its a simply pcmcia->CF adapter and the CF card is a simple storage one. I got it to work through USB-adapter after replacing my
broken one.
However it still doesnt work through the pcmcia->CF adapter.

Im not ruling out that its broken though.

> 
> Best,
> 	Dominik


-- 
Kristoffer Ericson <Kristoffer.Ericson at Gmail.com>


From linux at dominikbrodowski.net  Fri May 30 17:31:15 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:15 +0200
Subject: [PATCH 5/9] pcmcia: remove CVS keywords
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-5-git-send-email-linux@dominikbrodowski.net>

From: Adrian Bunk <bunk at kernel.org>

This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk at kernel.org>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/hd64465_ss.c |    2 --
 drivers/pcmcia/i82092.c     |    2 --
 drivers/pcmcia/i82092aa.h   |    2 --
 3 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c
index f2e810f..6045e4b 100644
--- a/drivers/pcmcia/hd64465_ss.c
+++ b/drivers/pcmcia/hd64465_ss.c
@@ -1,6 +1,4 @@
 /*
- * $Id: hd64465_ss.c,v 1.7 2003/07/06 14:42:50 lethal Exp $
- *
  * Device driver for the PCMCIA controller module of the
  * Hitachi HD64465 handheld companion chip.
  *
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index e136186..46561fa 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -5,8 +5,6 @@
  *
  * Author: Arjan Van De Ven <arjanv at redhat.com>
  * Loosly based on i82365.c from the pcmcia-cs package
- *
- * $Id: i82092aa.c,v 1.2 2001/10/23 14:43:34 arjanv Exp $
  */
 
 #include <linux/kernel.h>
diff --git a/drivers/pcmcia/i82092aa.h b/drivers/pcmcia/i82092aa.h
index b0d4533..8836d39 100644
--- a/drivers/pcmcia/i82092aa.h
+++ b/drivers/pcmcia/i82092aa.h
@@ -3,8 +3,6 @@
 
 #include <linux/interrupt.h>
 
-/* $Id: i82092aa.h,v 1.1.1.1 2001/09/19 14:53:15 dwmw2 Exp $ */
-
 /* Debuging defines */
 #ifdef NOTRACE
 #define enter(x)   printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__)
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:31:13 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:13 +0200
Subject: [PATCH 3/9] pcmcia: add another pata/ide ID
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-3-git-send-email-linux@dominikbrodowski.net>

From: Kristoffer Ericson <kristoffer_e1 at hotmail.com>

Addition of Transcend 1GB 45x id so that it is properly detected.

Signed-off-by: William Peters <w1ll14 at gmail.com>
Signed-off-by: Kristoffer Ericson <Kristoffer_e1 at hotmail.com>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
CC: Alan Cox <alan at lxorguk.ukuu.org.uk>
CC: linux-ide at vger.kernel.org
---
 drivers/ata/pata_pcmcia.c   |    1 +
 drivers/ide/legacy/ide-cs.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index c97bc0c..41b4361 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -425,6 +425,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
 	PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6),
 	PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
 	PCMCIA_DEVICE_PROD_ID1("TRANSCEND    512M   ", 0xd0909443),
+	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF45", 0x709b1bf1, 0xf68b6f32),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index 8387fc1..bca7b86 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -451,6 +451,7 @@ static struct pcmcia_device_id ide_ids[] = {
 	PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6),
 	PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
 	PCMCIA_DEVICE_PROD_ID1("TRANSCEND    512M   ", 0xd0909443),
+	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF45", 0x709b1bf1, 0xf68b632),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:31:16 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:16 +0200
Subject: [PATCH 6/9] pcmcia: fix Alchemy warnings
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-6-git-send-email-linux@dominikbrodowski.net>

From: Sergei Shtylyov <sshtylyov at ru.mvista.com>

Fix the following warnings:

drivers/pcmcia/au1000_generic.c: In function `au1x00_pcmcia_socket_probe':
drivers/pcmcia/au1000_generic.c:405: warning: integer constant is too large for
"long" type
drivers/pcmcia/au1000_generic.c:413: warning: integer constant is too large for
"long" type

by properly postfixing the socket constants. While at it, fix the lines over 80
characters long in the vicinity...

Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
CC: linux-mips at linux-mips.org
---
 drivers/pcmcia/au1000_generic.h |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/pcmcia/au1000_generic.h b/drivers/pcmcia/au1000_generic.h
index 1e467bb..c62437d 100644
--- a/drivers/pcmcia/au1000_generic.h
+++ b/drivers/pcmcia/au1000_generic.h
@@ -34,9 +34,9 @@
 #define AU1000_PCMCIA_IO_SPEED       (255)
 #define AU1000_PCMCIA_MEM_SPEED      (300)
 
-#define AU1X_SOCK0_IO        0xF00000000
-#define AU1X_SOCK0_PHYS_ATTR 0xF40000000
-#define AU1X_SOCK0_PHYS_MEM  0xF80000000
+#define AU1X_SOCK0_IO        0xF00000000ULL
+#define AU1X_SOCK0_PHYS_ATTR 0xF40000000ULL
+#define AU1X_SOCK0_PHYS_MEM  0xF80000000ULL
 /* pseudo 32 bit phys addresses, which get fixed up to the
  * real 36 bit address in fixup_bigphys_addr() */
 #define AU1X_SOCK0_PSEUDO_PHYS_ATTR 0xF4000000
@@ -45,16 +45,20 @@
 /* pcmcia socket 1 needs external glue logic so the memory map
  * differs from board to board.
  */
-#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_PB1200)
-#define AU1X_SOCK1_IO        0xF08000000
-#define AU1X_SOCK1_PHYS_ATTR 0xF48000000
-#define AU1X_SOCK1_PHYS_MEM  0xF88000000
+#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || \
+    defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1550) || \
+    defined(CONFIG_MIPS_PB1200)
+#define AU1X_SOCK1_IO        0xF08000000ULL
+#define AU1X_SOCK1_PHYS_ATTR 0xF48000000ULL
+#define AU1X_SOCK1_PHYS_MEM  0xF88000000ULL
 #define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000
 #define AU1X_SOCK1_PSEUDO_PHYS_MEM  0xF8800000
-#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) || defined(CONFIG_MIPS_DB1200)
-#define AU1X_SOCK1_IO        0xF04000000
-#define AU1X_SOCK1_PHYS_ATTR 0xF44000000
-#define AU1X_SOCK1_PHYS_MEM  0xF84000000
+#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || \
+      defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) || \
+      defined(CONFIG_MIPS_DB1200)
+#define AU1X_SOCK1_IO        0xF04000000ULL
+#define AU1X_SOCK1_PHYS_ATTR 0xF44000000ULL
+#define AU1X_SOCK1_PHYS_MEM  0xF84000000ULL
 #define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4400000
 #define AU1X_SOCK1_PSEUDO_PHYS_MEM  0xF8400000
 #endif
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:31:18 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:18 +0200
Subject: [PATCH 8/9] pcmcia: cs: kill thread_wait
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-8-git-send-email-linux@dominikbrodowski.net>

From: Christoph Hellwig <hch at infradead.org>

There is not reason to have a waitqueue if it's always the same
thread that is waiting for it.  Just use wake_up_process instead.

Signed-off-by: Christoph Hellwig <hch at lst.de>

Small modification: Also remove unused variable.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/cs.c |   12 +++---------
 include/pcmcia/ss.h |    1 -
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 29276bd..6bb1bb5 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -238,7 +238,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
 
 	init_completion(&socket->socket_released);
 	init_completion(&socket->thread_done);
-	init_waitqueue_head(&socket->thread_wait);
 	mutex_init(&socket->skt_mutex);
 	spin_lock_init(&socket->thread_lock);
 
@@ -278,10 +277,9 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket)
 
 	cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops);
 
-	if (socket->thread) {
-		wake_up(&socket->thread_wait);
+	if (socket->thread)
 		kthread_stop(socket->thread);
-	}
+
 	release_cis_mem(socket);
 
 	/* remove from our own list */
@@ -635,7 +633,6 @@ static void socket_detect_change(struct pcmcia_socket *skt)
 static int pccardd(void *__skt)
 {
 	struct pcmcia_socket *skt = __skt;
-	DECLARE_WAITQUEUE(wait, current);
 	int ret;
 
 	skt->thread = current;
@@ -656,7 +653,6 @@ static int pccardd(void *__skt)
 	if (ret)
 		dev_warn(&skt->dev, "err %d adding socket attributes\n", ret);
 
-	add_wait_queue(&skt->thread_wait, &wait);
 	complete(&skt->thread_done);
 
 	set_freezable();
@@ -694,8 +690,6 @@ static int pccardd(void *__skt)
 	/* make sure we are running before we exit */
 	set_current_state(TASK_RUNNING);
 
-	remove_wait_queue(&skt->thread_wait, &wait);
-
 	/* remove from the device core */
 	pccard_sysfs_remove_socket(&skt->dev);
 	device_unregister(&skt->dev);
@@ -716,7 +710,7 @@ void pcmcia_parse_events(struct pcmcia_socket *s, u_int events)
 		s->thread_events |= events;
 		spin_unlock_irqrestore(&s->thread_lock, flags);
 
-		wake_up(&s->thread_wait);
+		wake_up_process(s->thread);
 	}
 } /* pcmcia_parse_events */
 EXPORT_SYMBOL(pcmcia_parse_events);
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index f95dca0..2edc7fa 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -245,7 +245,6 @@ struct pcmcia_socket {
 
 	struct task_struct		*thread;
 	struct completion		thread_done;
-	wait_queue_head_t		thread_wait;
 	spinlock_t			thread_lock;	/* protects thread_events */
 	unsigned int			thread_events;
 
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:31:14 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:14 +0200
Subject: [PATCH 4/9] pcmcia: yenta-cardbus: ENE_TEST_C9_PFENABLE duplicate *_F0
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-4-git-send-email-linux@dominikbrodowski.net>

From: Roel Kluin <12o3l at tiscali.nl>

The test only makes sense if we check for _F0 and _F1.

Signed-off-by: Roel Kluin <12o3l at tiscali.nl>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
CC: Daniel Ritz <daniel.ritz at gmx.ch>
---
 drivers/pcmcia/ti113x.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h
index d29657b..87a5fd5 100644
--- a/drivers/pcmcia/ti113x.h
+++ b/drivers/pcmcia/ti113x.h
@@ -155,7 +155,7 @@
 #define ENE_TEST_C9_TLTENABLE		0x02
 #define ENE_TEST_C9_PFENABLE_F0		0x04
 #define ENE_TEST_C9_PFENABLE_F1		0x08
-#define ENE_TEST_C9_PFENABLE		(ENE_TEST_C9_PFENABLE_F0 | ENE_TEST_C9_PFENABLE_F0)
+#define ENE_TEST_C9_PFENABLE		(ENE_TEST_C9_PFENABLE_F0 | ENE_TEST_C9_PFENABLE_F1)
 #define ENE_TEST_C9_WPDISALBLE_F0	0x40
 #define ENE_TEST_C9_WPDISALBLE_F1	0x80
 #define ENE_TEST_C9_WPDISALBLE		(ENE_TEST_C9_WPDISALBLE_F0 | ENE_TEST_C9_WPDISALBLE_F1)
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:31:11 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:11 +0200
Subject: [PATCH 1/9] pcmcia: add an pata/ide ID
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-1-git-send-email-linux@dominikbrodowski.net>

From: Matt Reimer <mattjreimer at gmail.com>

Add an id for:

product info: "M-Systems", "CF300", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

Signed-off-by: Matt Reimer <mreimer at vpop.net>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
CC: Alan Cox <alan at lxorguk.ukuu.org.uk>
CC: linux-ide at vger.kernel.org
---
 drivers/ata/pata_pcmcia.c   |    1 +
 drivers/ide/legacy/ide-cs.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 3d39f9d..c97bc0c 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -414,6 +414,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
 	PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149),
 	PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674),
 	PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2      ", 0xe37be2b5, 0x8671043b),
+	PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF300", 0x7ed2ad87, 0x7e9e78ee),
 	PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c),
 	PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79),
 	PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591),
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index aa2ea3d..8387fc1 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -440,6 +440,7 @@ static struct pcmcia_device_id ide_ids[] = {
 	PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149),
 	PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674),
 	PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2      ", 0xe37be2b5, 0x8671043b),
+	PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF300", 0x7ed2ad87, 0x7e9e78ee),
 	PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c),
 	PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79),
 	PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591),
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:28:21 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:28:21 +0200
Subject: PCMCIA patches in queue for 2.6.27
Message-ID: <20080530212821.GA30197@comet.dominikbrodowski.net>

Hi,

please review these nine PCMCIA-related patches currently in the queue
for merging soon after 2.6.26 is released.

Best,
	Dominik


Adrian Bunk (1):
      pcmcia: remove CVS keywords

Christoph Hellwig (1):
      pcmcia: cs: kill thread_wait

Dominik Brodowski (1):
      pcmcia: remove version.h

Kristoffer Ericson (1):
      pcmcia: add another pata/ide ID

Leonardo Potenza (1):
      pcmcia: i82365.c: check request_irq return value

Magnus Damm (1):
      pcmcia: Update email address for m8xx driver author

Matt Reimer (1):
      pcmcia: add an pata/ide ID

Roel Kluin (1):
      pcmcia: yenta-cardbus: ENE_TEST_C9_PFENABLE duplicate *_F0

Sergei Shtylyov (1):
      pcmcia: fix Alchemy warnings


 drivers/ata/pata_pcmcia.c             |    2 +
 drivers/char/pcmcia/ipwireless/main.c |    1 
 drivers/ide/legacy/ide-cs.c           |    2 +
 drivers/pcmcia/au1000_generic.h       |   26 +++++++++++++---------
 drivers/pcmcia/cs.c                   |   12 ++--------
 drivers/pcmcia/hd64465_ss.c           |    2 -
 drivers/pcmcia/i82092.c               |    2 -
 drivers/pcmcia/i82092aa.h             |    2 -
 drivers/pcmcia/i82365.c               |   39 +++++++++++++++++++++++-----------
 drivers/pcmcia/m8xx_pcmcia.c          |    3 --
 drivers/pcmcia/ti113x.h               |    2 -
 include/pcmcia/ss.h                   |    1 
 include/pcmcia/version.h              |    3 --
 13 files changed, 51 insertions(+), 46 deletions(-)


From linux at dominikbrodowski.net  Fri May 30 17:31:12 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:12 +0200
Subject: [PATCH 2/9] pcmcia: Update email address for m8xx driver author
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-2-git-send-email-linux@dominikbrodowski.net>

From: Magnus Damm <damm at opensource.se>

Update the m8xx driver's author email address.

Signed-off-by: Magnus Damm <damm at opensource.se>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/m8xx_pcmcia.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index ac70d2c..a7de161 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1,7 +1,7 @@
 /*
  * m8xx_pcmcia.c - Linux PCMCIA socket driver for the mpc8xx series.
  *
- * (C) 1999-2000 Magnus Damm <damm at bitsmart.com>
+ * (C) 1999-2000 Magnus Damm <damm at opensource.se>
  * (C) 2001-2002 Montavista Software, Inc.
  *     <mlocke at mvista.com>
  *
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:31:17 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:17 +0200
Subject: [PATCH 7/9] pcmcia: i82365.c: check request_irq return value
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-7-git-send-email-linux@dominikbrodowski.net>

From: Leonardo Potenza <lpotenza at inwind.it>

Add a check for the request_irq() return value.

Signed-off-by: Leonardo Potenza <lpotenza at inwind.it>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/i82365.c |   39 +++++++++++++++++++++++++++------------
 1 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index 32a2ab1..68f6b27 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -1263,7 +1263,7 @@ static int __init init_i82365(void)
 
     ret = driver_register(&i82365_driver);
     if (ret)
-	return ret;
+	goto err_out;
 
     i82365_device = platform_device_alloc("i82365", 0);
     if (i82365_device) {
@@ -1273,10 +1273,8 @@ static int __init init_i82365(void)
     } else
 	    ret = -ENOMEM;
 
-    if (ret) {
-	driver_unregister(&i82365_driver);
-	return ret;
-    }
+    if (ret)
+	goto err_driver_unregister;
 
     printk(KERN_INFO "Intel ISA PCIC probe: ");
     sockets = 0;
@@ -1285,16 +1283,17 @@ static int __init init_i82365(void)
 
     if (sockets == 0) {
 	printk("not found.\n");
-	platform_device_unregister(i82365_device);
-	release_region(i365_base, 2);
-	driver_unregister(&i82365_driver);
-	return -ENODEV;
+	ret = -ENODEV;
+	goto err_dev_unregister;
     }
 
     /* Set up interrupt handler(s) */
     if (grab_irq != 0)
-	request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt);
-    
+	ret = request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt);
+
+    if (ret)
+	goto err_socket_release;
+
     /* register sockets with the pcmcia core */
     for (i = 0; i < sockets; i++) {
 	    socket[i].socket.dev.parent = &i82365_device->dev;
@@ -1324,7 +1323,23 @@ static int __init init_i82365(void)
     }
     
     return 0;
-    
+err_socket_release:
+    for (i = 0; i < sockets; i++) {
+	/* Turn off all interrupt sources! */
+	i365_set(i, I365_CSCINT, 0);
+	release_region(socket[i].ioaddr, 2);
+    }
+err_dev_unregister:
+    platform_device_unregister(i82365_device);
+    release_region(i365_base, 2);
+#ifdef CONFIG_PNP
+    if (i82365_pnpdev)
+	pnp_disable_dev(i82365_pnpdev);
+#endif
+err_driver_unregister:
+    driver_unregister(&i82365_driver);
+err_out:
+    return ret;
 } /* init_i82365 */
 
 static void __exit exit_i82365(void)
-- 
1.5.4.3



From linux at dominikbrodowski.net  Fri May 30 17:31:19 2008
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 30 May 2008 23:31:19 +0200
Subject: [PATCH 9/9] pcmcia: remove version.h
In-Reply-To: <20080530212821.GA30197@comet.dominikbrodowski.net>
References: <20080530212821.GA30197@comet.dominikbrodowski.net>
Message-ID: <1212183079-30505-9-git-send-email-linux@dominikbrodowski.net>

pcmcia/version.h is empty and its existence is not even needed by
deprecated userspace tools.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
CC: David Sterba <dsterba at suse.cz>
CC: Jiri Kosina <jkosina at suse.cz>
---
 drivers/char/pcmcia/ipwireless/main.c |    1 -
 drivers/pcmcia/m8xx_pcmcia.c          |    1 -
 include/pcmcia/version.h              |    3 ---
 3 files changed, 0 insertions(+), 5 deletions(-)
 delete mode 100644 include/pcmcia/version.h

diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 00c7f84..cc7dcea 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -28,7 +28,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 
-#include <pcmcia/version.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/device_id.h>
 #include <pcmcia/ss.h>
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index a7de161..13a5fbd 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -60,7 +60,6 @@
 #include <asm/of_device.h>
 #include <asm/of_platform.h>
 
-#include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/ss.h>
diff --git a/include/pcmcia/version.h b/include/pcmcia/version.h
deleted file mode 100644
index 5ad9c5e..0000000
--- a/include/pcmcia/version.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* version.h 1.94 2000/10/03 17:55:48 (David Hinds) */
-
-/* This file will be removed, please don't include it */
-- 
1.5.4.3



From 8177790291 at mymetropcs.com  Sat May 31 00:31:37 2008
From: 8177790291 at mymetropcs.com (8177790291 at mymetropcs.com)
Date: 31 May 08 00:31:37 --500
Subject: cardbus hdsp issue, advice or suggestions?
Message-ID: <SRVR-DNS1wpL8Z9QH4d0000f9f8@SRVR-DNS1.metropcs.net>

   Mike Jenkins




From 8177790291 at mymetropcs.com  Sat May 31 00:30:53 2008
From: 8177790291 at mymetropcs.com (8177790291 at mymetropcs.com)
Date: 31 May 08 00:30:53 --500
Subject: cardbus hdsp issue, advice or suggestions?
Message-ID: <SRVR-DNS13Q8rYZvXH40000f9f4@SRVR-DNS1.metropcs.net>

   Mike Jenkins




