From: Daniel Ritz <daniel.ritz@gmx.ch>
To: Russel King <rmk@arm.linux.org.uk>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
"linux-pcmcia" <linux-pcmcia@lists.infradead.org>
Subject: [PATCH 2.6] ToPIC specific init for yenta_socket
Date: Wed, 6 Aug 2003 20:25:08 +0200 [thread overview]
Message-ID: <200308062025.08861.daniel.ritz@gmx.ch> (raw)
this patch adds override functions for the ToPIC family of controllers.
also adds the device id for ToPIC100 and (untested) support for zoom
video for ToPIC97/100.
tested with start/stop and suspend/resume.
--- 1.3/drivers/pcmcia/topic.h Sat Oct 19 01:11:25 2002
+++ edited/drivers/pcmcia/topic.h Wed Aug 6 19:25:39 2003
@@ -93,4 +93,60 @@
#define TOPIC97_RCR_CAUDIO_OFF 0x00000002
#define TOPIC_RCR_CAUDIO_INVERT 0x00000001
+#define TOPIC97_ZOOM_VIDEO_CONTROL 0x009c /* 8 bit */
+#define TOPIC97_ZOOM_VIDEO_ENABLE 0x01
+
+/* general ToPIC stuff */
+static int topic_init(struct pcmcia_socket *sock)
+{
+ struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
+ u8 val;
+
+ yenta_init(sock);
+
+ /* enable CB, CB/PCCARD regs, lock ID */
+ val = config_readb(socket, TOPIC_SLOT_CONTROL);
+ val |= TOPIC_SLOT_SLOTON | TOPIC_SLOT_SLOTEN | TOPIC_SLOT_ID_LOCK |
+ TOPIC_SLOT_ID_WP;
+ config_writeb(socket, TOPIC_SLOT_CONTROL, val);
+
+ /* enable CB, HW change detect */
+ val = config_readb(socket, TOPIC_CARD_DETECT);
+ val |= TOPIC_CDR_MODE_PC32;
+ val &= ~TOPIC_CDR_SW_DETECT;
+ config_writeb(socket, TOPIC_CARD_DETECT, val);
+
+ return 0;
+}
+
+static int topic_override(struct yenta_socket *socket)
+{
+ socket->socket.ops->init = topic_init;
+ return 0;
+}
+
+/* ToPIC97/100 stuff */
+static void topic97_zoom_video(struct pcmcia_socket *sock, int onoff)
+{
+ struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
+ config_writeb(socket, TOPIC97_ZOOM_VIDEO_CONTROL,
+ onoff? TOPIC97_ZOOM_VIDEO_ENABLE: 0);
+}
+
+static int topic97_init(struct pcmcia_socket *sock)
+{
+ topic_init(sock);
+
+ /* ToPIC97/100 support ZV */
+ sock->zoom_video = topic97_zoom_video;
+
+ return 0;
+}
+
+static int topic97_override(struct yenta_socket *socket)
+{
+ socket->socket.ops->init = topic97_init;
+ return 0;
+}
+
#endif /* _LINUX_TOPIC_H */
--- 1.35/drivers/pcmcia/yenta_socket.c Sun Aug 3 17:05:56 2003
+++ edited/drivers/pcmcia/yenta_socket.c Wed Aug 6 17:27:24 2003
@@ -769,6 +769,7 @@
#include "ti113x.h"
#include "ricoh.h"
+#include "topic.h"
/*
* Different cardbus controllers have slightly different
@@ -809,6 +810,11 @@
{ PD(RICOH,RL5C475), &ricoh_override },
{ PD(RICOH,RL5C476), &ricoh_override },
{ PD(RICOH,RL5C478), &ricoh_override },
+
+ { PD(TOSHIBA,TOPIC95_A), &topic_override },
+ { PD(TOSHIBA,TOPIC95_B), &topic_override },
+ { PD(TOSHIBA,TOPIC97), &topic97_override },
+ { PD(TOSHIBA,TOPIC100), &topic97_override },
{ }, /* all zeroes */
};
--- 1.112/include/linux/pci_ids.h Wed Aug 6 00:37:33 2003
+++ edited/include/linux/pci_ids.h Wed Aug 6 16:55:04 2003
@@ -1310,6 +1310,7 @@
#define PCI_DEVICE_ID_TOSHIBA_601 0x0601
#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a
#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
+#define PCI_DEVICE_ID_TOSHIBA_TOPIC100 0x0617
#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
#define PCI_DEVICE_ID_TOSHIBA_TX3927 0x000a
next reply other threads:[~2003-08-06 18:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-06 18:25 Daniel Ritz [this message]
2003-08-06 18:44 ` [PATCH 2.6] ToPIC specific init for yenta_socket Russell King
2003-08-06 19:07 ` Pavel Roskin
2003-08-06 19:32 ` Russell King
2003-08-06 20:39 ` Pavel Roskin
2003-08-06 22:23 ` TI yenta-alikes (was: ToPIC specific init for yenta_socket) Tim Small
2003-08-07 4:01 ` Pavel Roskin
2003-08-07 9:02 ` Russell King
2003-08-07 12:18 ` Alan Cox
2003-08-07 13:02 ` TI yenta-alikes Tim Small
2003-08-07 13:16 ` Russell King
2003-08-07 14:00 ` Alan Cox
2003-08-07 14:38 ` Russell King
2003-08-07 14:49 ` Tim Small
2003-08-07 13:12 ` TI yenta-alikes (was: ToPIC specific init for yenta_socket) Russell King
2003-08-07 9:18 ` TI yenta-alikes Tim Small
2003-08-06 20:50 ` [PATCH 2.6] ToPIC specific init for yenta_socket Daniel Ritz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200308062025.08861.daniel.ritz@gmx.ch \
--to=daniel.ritz@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=rmk@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox