Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

GEODE: reboot fixup for geode machines with CS5536 boards

Writing to MSR 0x51400017 forces a hard reset on CS5536-based machines,
this has the reboot fixup do just that if such a board is detected.

Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andres Salomon and committed by
Linus Torvalds
95069f89 1feb17e2

+15 -2
+2 -2
arch/i386/Kconfig
··· 441 441 this config is intended, is when reboot ends with a stalled/hung 442 442 system. 443 443 444 - Currently, the only fixup is for the Geode GX1/CS5530A/TROM2.1. 445 - combination. 444 + Currently, the only fixup is for the Geode machines using 445 + CS5530A and CS5536 chipsets. 446 446 447 447 Say Y if you want to enable the fixup. Currently, it's safe to 448 448 enable this option even if you don't need it.
+13
arch/i386/kernel/reboot_fixups.c
··· 5 5 * 6 6 * List of supported fixups: 7 7 * geode-gx1/cs5530a - Jaya Kumar <jayalk@intworks.biz> 8 + * geode-gx/lx/cs5536 - Andres Salomon <dilinger@debian.org> 8 9 * 9 10 */ 10 11 11 12 #include <asm/delay.h> 12 13 #include <linux/pci.h> 13 14 #include <asm/reboot_fixups.h> 15 + #include <asm/msr.h> 14 16 15 17 static void cs5530a_warm_reset(struct pci_dev *dev) 16 18 { ··· 23 21 return; 24 22 } 25 23 24 + static void cs5536_warm_reset(struct pci_dev *dev) 25 + { 26 + /* 27 + * 6.6.2.12 Soft Reset (DIVIL_SOFT_RESET) 28 + * writing 1 to the LSB of this MSR causes a hard reset. 29 + */ 30 + wrmsrl(0x51400017, 1ULL); 31 + udelay(50); /* shouldn't get here but be safe and spin a while */ 32 + } 33 + 26 34 struct device_fixup { 27 35 unsigned int vendor; 28 36 unsigned int device; ··· 41 29 42 30 static struct device_fixup fixups_table[] = { 43 31 { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset }, 32 + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset }, 44 33 }; 45 34 46 35 /*