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
5ef7c68b
Commit
5ef7c68b
authored
Feb 17, 2003
by
Alan Cox
Committed by
Linus Torvalds
Feb 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix ALi 32bitisms, fix ALi FIFO, fix ALi IRQ crash
also Enable ATI IGP/ALi combo
parent
91bf58fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
drivers/ide/pci/alim15x3.c
drivers/ide/pci/alim15x3.c
+23
-16
No files found.
drivers/ide/pci/alim15x3.c
View file @
5ef7c68b
/*
* linux/drivers/ide/
alim15x3.c Version 0.15 2002/08/19
* linux/drivers/ide/
pci/alim15x3.c Version 0.16 2003/01/02
*
* Copyright (C) 1998-2000 Michel Aubry, Maintainer
* Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer
...
...
@@ -19,6 +19,10 @@
* Don't use LBA48 mode on ALi <= 0xC4
* Don't poke 0x79 with a non ALi northbridge
* Don't flip undefined bits on newer chipsets (fix Fujitsu laptop hang)
*
* Documentation
* Chipset documentation available under NDA only
*
*/
#include <linux/config.h>
...
...
@@ -94,7 +98,7 @@ static char *channel_status[8] = {
static
int
ali_get_info
(
char
*
buffer
,
char
**
addr
,
off_t
offset
,
int
count
)
{
u
32
bibma
;
u
nsigned
long
bibma
;
u8
reg53h
,
reg5xh
,
reg5yh
,
reg5xh1
,
reg5yh1
,
c0
,
c1
,
rev
,
tmp
;
char
*
q
,
*
p
=
buffer
;
...
...
@@ -106,14 +110,15 @@ static int ali_get_info (char *buffer, char **addr, off_t offset, int count)
fifo
[
3
]
=
" ??? "
;
/* first fetch bibma: */
pci_read_config_dword
(
bmide_dev
,
0x20
,
&
bibma
);
bibma
=
(
bibma
&
0xfff0
)
;
bibma
=
pci_resource_start
(
bmide_dev
,
4
);
/*
* at that point bibma+0x2 et bibma+0xa are byte
* registers to investigate:
*/
c0
=
inb
(
(
unsigned
short
)
bibma
+
0x02
);
c1
=
inb
(
(
unsigned
short
)
bibma
+
0x0a
);
c0
=
inb
(
bibma
+
0x02
);
c1
=
inb
(
bibma
+
0x0a
);
p
+=
sprintf
(
p
,
"
\n
Ali M15x3 Chipset.
\n
"
);
...
...
@@ -295,6 +300,7 @@ static void ali15x3_tune_drive (ide_drive_t *drive, u8 pio)
int
port
=
hwif
->
channel
?
0x5c
:
0x58
;
int
portFIFO
=
hwif
->
channel
?
0x55
:
0x54
;
u8
cd_dma_fifo
=
0
;
int
unit
=
drive
->
select
.
b
.
unit
&
1
;
pio
=
ide_get_best_pio_mode
(
drive
,
pio
,
5
,
&
d
);
s_time
=
ide_pio_timings
[
pio
].
setup_time
;
...
...
@@ -323,13 +329,13 @@ static void ali15x3_tune_drive (ide_drive_t *drive, u8 pio)
*/
pci_read_config_byte
(
dev
,
portFIFO
,
&
cd_dma_fifo
);
if
(
drive
->
media
==
ide_disk
)
{
if
(
hwif
->
channel
)
{
if
(
unit
)
{
pci_write_config_byte
(
dev
,
portFIFO
,
(
cd_dma_fifo
&
0x0F
)
|
0x50
);
}
else
{
pci_write_config_byte
(
dev
,
portFIFO
,
(
cd_dma_fifo
&
0xF0
)
|
0x05
);
}
}
else
{
if
(
hwif
->
channel
)
{
if
(
unit
)
{
pci_write_config_byte
(
dev
,
portFIFO
,
cd_dma_fifo
&
0x0F
);
}
else
{
pci_write_config_byte
(
dev
,
portFIFO
,
cd_dma_fifo
&
0xF0
);
...
...
@@ -779,9 +785,10 @@ static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
static
void
__init
init_hwif_ali15x3
(
ide_hwif_t
*
hwif
)
{
u8
ideic
,
inmir
;
u
8
irq_routing_table
[]
=
{
-
1
,
9
,
3
,
10
,
4
,
5
,
7
,
6
,
s
8
irq_routing_table
[]
=
{
-
1
,
9
,
3
,
10
,
4
,
5
,
7
,
6
,
1
,
11
,
0
,
12
,
0
,
14
,
0
,
15
};
int
irq
=
-
1
;
hwif
->
irq
=
hwif
->
channel
?
15
:
14
;
if
(
isa_dev
)
{
...
...
@@ -801,15 +808,17 @@ static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
*/
pci_read_config_byte
(
isa_dev
,
0x44
,
&
inmir
);
inmir
=
inmir
&
0x0f
;
hwif
->
irq
=
irq_routing_table
[
inmir
];
irq
=
irq_routing_table
[
inmir
];
}
else
if
(
hwif
->
channel
&&
!
(
ideic
&
0x01
))
{
/*
* get SIRQ2 routing table
*/
pci_read_config_byte
(
isa_dev
,
0x75
,
&
inmir
);
inmir
=
inmir
&
0x0f
;
hwif
->
irq
=
irq_routing_table
[
inmir
];
irq
=
irq_routing_table
[
inmir
];
}
if
(
irq
>=
0
)
hwif
->
irq
=
irq
;
}
init_hwif_common_ali15x3
(
hwif
);
...
...
@@ -850,10 +859,8 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
ide_pci_device_t
*
d
=
&
ali15x3_chipsets
[
id
->
driver_data
];
if
(
pci_find_device
(
PCI_VENDOR_ID_ATI
,
PCI_DEVICE_ID_ATI_RADEON_IGP
,
NULL
))
{
printk
(
KERN_ERR
"Warning: ATI Radeon IGP Northbridge is not supported by Linux
\n
"
);
return
1
;
}
printk
(
KERN_ERR
"Warning: ATI Radeon IGP Northbridge is not yet fully tested.
\n
"
);
#if defined(CONFIG_SPARC64)
d
->
init_hwif
=
init_hwif_common_ali15x3
;
#endif
/* CONFIG_SPARC64 */
...
...
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