Commit f07c72a1 authored by David S. Miller's avatar David S. Miller Committed by David S. Miller

[SUNHME]: Use PCI config space if hm-rev property does not exist.

parent 917ba3a6
...@@ -3092,8 +3092,12 @@ static int __init happy_meal_pci_init(struct pci_dev *pdev) ...@@ -3092,8 +3092,12 @@ static int __init happy_meal_pci_init(struct pci_dev *pdev)
#ifdef __sparc__ #ifdef __sparc__
hp->hm_revision = prom_getintdefault(node, "hm-rev", 0xff); hp->hm_revision = prom_getintdefault(node, "hm-rev", 0xff);
if (hp->hm_revision == 0xff) if (hp->hm_revision == 0xff) {
hp->hm_revision = 0xa0; unsigned char prev;
pci_read_config_byte(pdev, PCI_REVISION_ID, &prev);
hp->hm_revision = 0xc0 | (prev & 0x0f);
}
#else #else
/* works with this on non-sparc hosts */ /* works with this on non-sparc hosts */
hp->hm_revision = 0x20; hp->hm_revision = 0x20;
...@@ -3102,7 +3106,7 @@ static int __init happy_meal_pci_init(struct pci_dev *pdev) ...@@ -3102,7 +3106,7 @@ static int __init happy_meal_pci_init(struct pci_dev *pdev)
/* Now enable the feature flags we can. */ /* Now enable the feature flags we can. */
if (hp->hm_revision == 0x20 || hp->hm_revision == 0x21) if (hp->hm_revision == 0x20 || hp->hm_revision == 0x21)
hp->happy_flags = HFLAG_20_21; hp->happy_flags = HFLAG_20_21;
else if (hp->hm_revision != 0xa0) else if (hp->hm_revision != 0xa0 && hp->hm_revision != 0xc0)
hp->happy_flags = HFLAG_NOT_A0; hp->happy_flags = HFLAG_NOT_A0;
if (qp != NULL) if (qp != NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment