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
942e4c16
Commit
942e4c16
authored
Mar 30, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Get ALI trident sound working again.
parent
2c692c65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
arch/sparc64/kernel/pci_iommu.c
arch/sparc64/kernel/pci_iommu.c
+28
-0
No files found.
arch/sparc64/kernel/pci_iommu.c
View file @
942e4c16
...
...
@@ -784,6 +784,26 @@ void pci_dma_sync_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelem
spin_unlock_irqrestore
(
&
iommu
->
lock
,
flags
);
}
static
void
ali_sound_dma_hack
(
struct
pci_dev
*
pdev
,
int
set_bit
)
{
struct
pci_dev
*
ali_isa_bridge
;
u8
val
;
/* ALI sound chips generate 31-bits of DMA, a special register
* determines what bit 31 is emitted as.
*/
ali_isa_bridge
=
pci_find_device
(
PCI_VENDOR_ID_AL
,
PCI_DEVICE_ID_AL_M1533
,
NULL
);
pci_read_config_byte
(
ali_isa_bridge
,
0x7e
,
&
val
);
if
(
set_bit
)
val
|=
0x01
;
else
val
&=
~
0x01
;
pci_write_config_byte
(
ali_isa_bridge
,
0x7e
,
val
);
}
int
pci_dma_supported
(
struct
pci_dev
*
pdev
,
u64
device_mask
)
{
struct
pcidev_cookie
*
pcp
=
pdev
->
sysdata
;
...
...
@@ -795,6 +815,14 @@ int pci_dma_supported(struct pci_dev *pdev, u64 device_mask)
struct
pci_iommu
*
iommu
=
pcp
->
pbm
->
iommu
;
dma_addr_mask
=
iommu
->
dma_addr_mask
;
if
(
pdev
->
vendor
==
PCI_VENDOR_ID_AL
&&
pdev
->
device
==
PCI_DEVICE_ID_AL_M5451
&&
device_mask
==
0x7fffffff
)
{
ali_sound_dma_hack
(
pdev
,
(
dma_addr_mask
&
0x80000000
)
!=
0
);
return
1
;
}
}
return
(
device_mask
&
dma_addr_mask
)
==
dma_addr_mask
;
...
...
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