-
Notifications
You must be signed in to change notification settings - Fork 54.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPS: Loongson64: Switch to generic PCI driver
We can now enable generic PCI driver in Kconfig, and remove legacy PCI driver code. Radeon vbios quirk is moved to the platform folder to fit the new structure. Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
- Loading branch information
Showing
6 changed files
with
31 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#include <linux/pci.h> | ||
#include <loongson.h> | ||
|
||
static void pci_fixup_radeon(struct pci_dev *pdev) | ||
{ | ||
struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; | ||
|
||
if (res->start) | ||
return; | ||
|
||
if (!loongson_sysconf.vgabios_addr) | ||
return; | ||
|
||
pci_disable_rom(pdev); | ||
if (res->parent) | ||
release_resource(res); | ||
|
||
res->start = virt_to_phys((void *) loongson_sysconf.vgabios_addr); | ||
res->end = res->start + 256*1024 - 1; | ||
res->flags = IORESOURCE_MEM | IORESOURCE_ROM_SHADOW | | ||
IORESOURCE_PCI_FIXED; | ||
|
||
dev_info(&pdev->dev, "BAR %d: assigned %pR for Radeon ROM\n", | ||
PCI_ROM_RESOURCE, res); | ||
} | ||
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, 0x9615, | ||
PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_radeon); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.