Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72384
b: refs/heads/master
c: d79a5f8
h: refs/heads/master
v: v3
  • Loading branch information
Carlos Corbacho authored and Thomas Gleixner committed Oct 23, 2007
1 parent f161564 commit 8983e94
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa76dab935b856871024530ec818bc0a8f88a016
refs/heads/master: d79a5f80dc1153d3f637dfcf3808066414fbb51a
3 changes: 2 additions & 1 deletion trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ and is between 256 and 4096 characters. It is defined in the file
hpet= [X86-32,HPET] option to control HPET usage
Format: { enable (default) | disable | force }
disable: disable HPET and use PIT instead
force: allow force enabled of undocumented chips (ICH4, VIA)
force: allow force enabled of undocumented chips (ICH4,
VIA, nVidia)

com20020= [HW,NET] ARCnet - COM20020 chipset
Format:
Expand Down
37 changes: 36 additions & 1 deletion trunk/arch/x86/kernel/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ static enum {
NONE_FORCE_HPET_RESUME,
OLD_ICH_FORCE_HPET_RESUME,
ICH_FORCE_HPET_RESUME,
VT8237_FORCE_HPET_RESUME
VT8237_FORCE_HPET_RESUME,
NVIDIA_FORCE_HPET_RESUME,
} force_hpet_resume_type;

static void __iomem *rcba_base;
Expand Down Expand Up @@ -321,6 +322,37 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235,
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
vt8237_force_enable_hpet);

/*
* Undocumented chipset feature taken from LinuxBIOS.
*/
static void nvidia_force_hpet_resume(void)
{
pci_write_config_dword(cached_dev, 0x44, 0xfed00001);
printk(KERN_DEBUG "Force enabled HPET at resume\n");
}

static void nvidia_force_enable_hpet(struct pci_dev *dev)
{
u32 uninitialized_var(val);

if (!hpet_force_user || hpet_address || force_hpet_address)
return;

pci_write_config_dword(dev, 0x44, 0xfed00001);
pci_read_config_dword(dev, 0x44, &val);
force_hpet_address = val & 0xfffffffe;
force_hpet_resume_type = NVIDIA_FORCE_HPET_RESUME;
printk(KERN_DEBUG "Force enabled HPET at base address 0x%lx\n",
force_hpet_address);
cached_dev = dev;
return;
}

/* ISA Bridges */
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0050,
nvidia_force_enable_hpet);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0051,
nvidia_force_enable_hpet);

void force_hpet_resume(void)
{
Expand All @@ -334,6 +366,9 @@ void force_hpet_resume(void)
case VT8237_FORCE_HPET_RESUME:
return vt8237_force_hpet_resume();

case NVIDIA_FORCE_HPET_RESUME:
return nvidia_force_hpet_resume();

default:
break;
}
Expand Down

0 comments on commit 8983e94

Please sign in to comment.