patch-2.4.21 linux-2.4.21/drivers/pcmcia/ricoh.h
Next file: linux-2.4.21/drivers/pcmcia/sa1100_generic.c
Previous file: linux-2.4.21/drivers/pcmcia/i82092.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
2003-06-13 07:51:35.000000000 -0700
- Orig file:
linux-2.4.20/drivers/pcmcia/ricoh.h
- Orig date:
2002-11-28 15:53:14.000000000 -0800
diff -urN linux-2.4.20/drivers/pcmcia/ricoh.h linux-2.4.21/drivers/pcmcia/ricoh.h
@@ -75,6 +75,12 @@
#define RL5C46X_BCR_3E0_ENA 0x0800
#define RL5C46X_BCR_3E2_ENA 0x1000
+/* Bridge Configuration Register */
+#define RL5C4XX_CONFIG 0x80 /* 16 bit */
+#define RL5C4XX_CONFIG_IO_1_MODE 0x0200
+#define RL5C4XX_CONFIG_IO_0_MODE 0x0100
+#define RL5C4XX_CONFIG_PREFETCH 0x0001
+
/* Misc Control Register */
#define RL5C4XX_MISC 0x0082 /* 16 bit */
#define RL5C4XX_MISC_HW_SUSPEND_ENA 0x0002
@@ -119,6 +125,7 @@
#define rl_ctl(socket) ((socket)->private[1])
#define rl_io(socket) ((socket)->private[2])
#define rl_mem(socket) ((socket)->private[3])
+#define rl_config(socket) ((socket)->private[4])
/*
* Magic Ricoh initialization code.. Save state at
@@ -130,9 +137,17 @@
rl_ctl(socket) = config_readw(socket, RL5C4XX_16BIT_CTL);
rl_io(socket) = config_readw(socket, RL5C4XX_16BIT_IO_0);
rl_mem(socket) = config_readw(socket, RL5C4XX_16BIT_MEM_0);
+ rl_config(socket) = config_readw(socket, RL5C4XX_CONFIG);
/* Set the default timings, don't trust the original values */
rl_ctl(socket) = RL5C4XX_16CTL_IO_TIMING | RL5C4XX_16CTL_MEM_TIMING;
+
+ if(socket->dev->device < PCI_DEVICE_ID_RICOH_RL5C475) {
+ rl_ctl(socket) |= RL5C46X_16CTL_LEVEL_1 | RL5C46X_16CTL_LEVEL_2;
+ } else {
+ rl_config(socket) |= RL5C4XX_CONFIG_PREFETCH;
+ }
+
return 0;
}
@@ -174,6 +189,7 @@
config_writew(socket, RL5C4XX_16BIT_CTL, rl_ctl(socket));
config_writew(socket, RL5C4XX_16BIT_IO_0, rl_io(socket));
config_writew(socket, RL5C4XX_16BIT_MEM_0, rl_mem(socket));
+ config_writew(socket, RL5C4XX_CONFIG, rl_config(socket));
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)