mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Following patch fixes the boot_switch_sata_ide logic. It can swap
primary / secondary IDE channel with SATA (in IDE mode). The bug was that setup was done in wrong device. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5932 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
14cc927178
commit
e522164ae1
1 changed files with 5 additions and 2 deletions
|
@ -51,10 +51,13 @@ static void ide_init(struct device *dev)
|
||||||
|
|
||||||
/* set ide as primary, if you want to boot from IDE, you'd better set it
|
/* set ide as primary, if you want to boot from IDE, you'd better set it
|
||||||
* in $vendor/$mainboard/devicetree.cb */
|
* in $vendor/$mainboard/devicetree.cb */
|
||||||
|
|
||||||
|
|
||||||
if (conf->boot_switch_sata_ide == 1) {
|
if (conf->boot_switch_sata_ide == 1) {
|
||||||
byte = pci_read_config8(dev, 0xAD);
|
struct device *sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
|
||||||
|
byte = pci_read_config8(sm_dev, 0xAD);
|
||||||
byte |= 1 << 4;
|
byte |= 1 << 4;
|
||||||
pci_write_config8(dev, 0xAD, byte);
|
pci_write_config8(sm_dev, 0xAD, byte);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_PCI_ROM_RUN == 1
|
#if CONFIG_PCI_ROM_RUN == 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue