Commit f9e60d7b authored by Daniel Ritz's avatar Daniel Ritz Committed by Linus Torvalds

[PATCH] pcmcia: enable read prefetch on o2micro bridges to fix HDSP

enable read prefetching on O2micro bridges. It fixes the problems
seen with the RME Hammerfall DSP.
Thanks to Eric Still from O2micro for the input.

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: default avatarDaniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f1ddf228
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
#include "cirrus.h" #include "cirrus.h"
#include "vg468.h" #include "vg468.h"
#include "ricoh.h" #include "ricoh.h"
#include "o2micro.h"
#ifdef DEBUG #ifdef DEBUG
static const char version[] = static const char version[] =
......
...@@ -120,4 +120,30 @@ ...@@ -120,4 +120,30 @@
#define O2_MODE_E_LED_OUT 0x08 #define O2_MODE_E_LED_OUT 0x08
#define O2_MODE_E_SKTA_ACTV 0x10 #define O2_MODE_E_SKTA_ACTV 0x10
static int o2micro_override(struct yenta_socket *socket)
{
/*
* 'reserved' register at 0x94/D4. chaning it to 0xCA (8 bit) enables
* read prefetching which for example makes the RME Hammerfall DSP
* working. for some bridges it is at 0x94, for others at 0xD4. it's
* ok to write to both registers on all O2 bridges.
* from Eric Still, 02Micro.
*/
if (PCI_FUNC(socket->dev->devfn) == 0) {
config_writeb(socket, 0x94, 0xCA);
config_writeb(socket, 0xD4, 0xCA);
}
return 0;
}
static void o2micro_restore_state(struct yenta_socket *socket)
{
/*
* as long as read prefetch is the only thing in
* o2micro_override, it's safe to call it from here
*/
o2micro_override(socket);
}
#endif /* _LINUX_O2MICRO_H */ #endif /* _LINUX_O2MICRO_H */
...@@ -668,6 +668,7 @@ static struct pccard_operations yenta_socket_operations = { ...@@ -668,6 +668,7 @@ static struct pccard_operations yenta_socket_operations = {
#include "ti113x.h" #include "ti113x.h"
#include "ricoh.h" #include "ricoh.h"
#include "topic.h" #include "topic.h"
#include "o2micro.h"
enum { enum {
CARDBUS_TYPE_DEFAULT = -1, CARDBUS_TYPE_DEFAULT = -1,
...@@ -676,7 +677,8 @@ enum { ...@@ -676,7 +677,8 @@ enum {
CARDBUS_TYPE_TI12XX, CARDBUS_TYPE_TI12XX,
CARDBUS_TYPE_TI1250, CARDBUS_TYPE_TI1250,
CARDBUS_TYPE_RICOH, CARDBUS_TYPE_RICOH,
CARDBUS_TYPE_TOPIC97 CARDBUS_TYPE_TOPIC97,
CARDBUS_TYPE_O2MICRO,
}; };
/* /*
...@@ -716,6 +718,10 @@ struct cardbus_type cardbus_type[] = { ...@@ -716,6 +718,10 @@ struct cardbus_type cardbus_type[] = {
[CARDBUS_TYPE_TOPIC97] = { [CARDBUS_TYPE_TOPIC97] = {
.override = topic97_override, .override = topic97_override,
}, },
[CARDBUS_TYPE_O2MICRO] = {
.override = o2micro_override,
.restore_state = o2micro_restore_state,
},
}; };
...@@ -1100,6 +1106,8 @@ static struct pci_device_id yenta_table [] = { ...@@ -1100,6 +1106,8 @@ static struct pci_device_id yenta_table [] = {
CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC97, TOPIC97), CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC97, TOPIC97),
CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC100, TOPIC97), CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC100, TOPIC97),
CB_ID(PCI_VENDOR_ID_O2, PCI_ANY_ID, O2MICRO),
/* match any cardbus bridge */ /* match any cardbus bridge */
CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT), CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT),
{ /* all zeroes */ } { /* all zeroes */ }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment