Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
8ec3894c
Commit
8ec3894c
authored
Oct 12, 2002
by
Alan Cox
Committed by
Linus Torvalds
Oct 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ricoh performance fix
parent
c452d8e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
drivers/pcmcia/ricoh.h
drivers/pcmcia/ricoh.h
+17
-0
No files found.
drivers/pcmcia/ricoh.h
View file @
8ec3894c
...
...
@@ -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
...
...
@@ -117,6 +123,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
...
...
@@ -128,9 +135,17 @@ static int ricoh_open(pci_socket_t *socket)
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
;
}
...
...
@@ -142,6 +157,8 @@ static int ricoh_init(pci_socket_t *socket)
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment