Skip to content

Commit

Permalink
parisc: Set PCI CLS early in boot.
Browse files Browse the repository at this point in the history
Set the PCI CLS early in the boot process to prevent
device failures. In pcibios_set_master use the new
pci_cache_line_size instead of a hard-coded value.

Signed-off-by: Carlos O'Donell <[email protected]>
Reviewed-by: Grant Grundler <[email protected]>
Signed-off-by: Kyle McMartin <[email protected]>
  • Loading branch information
Carlos O'Donell authored and jkkm committed Feb 24, 2010
1 parent 75ef7cd commit 5fd4514
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/parisc/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <asm/io.h>
#include <asm/system.h>
#include <asm/cache.h> /* for L1_CACHE_BYTES */
#include <asm/superio.h>

#define DEBUG_RESOURCES 0
Expand Down Expand Up @@ -123,6 +122,10 @@ static int __init pcibios_init(void)
} else {
printk(KERN_WARNING "pci_bios != NULL but init() is!\n");
}

/* Set the CLS for PCI as early as possible. */
pci_cache_line_size = pci_dfl_cache_line_size;

return 0;
}

Expand Down Expand Up @@ -171,7 +174,7 @@ void pcibios_set_master(struct pci_dev *dev)
** upper byte is PCI_LATENCY_TIMER.
*/
pci_write_config_word(dev, PCI_CACHE_LINE_SIZE,
(0x80 << 8) | (L1_CACHE_BYTES / sizeof(u32)));
(0x80 << 8) | pci_cache_line_size);
}


Expand Down

0 comments on commit 5fd4514

Please sign in to comment.