I add some lines in amd8111, if USB2 is disabled, it will don't touch 0x48,
only touch 0x47.
if ((dev->vendor == PCI_VENDOR_ID_AMD) &&
(dev->device == PCI_DEVICE_ID_AMD_8111_USB2)) {
if(!dev->enabled) {
byte = pci_read_config8(lpc_dev, 0x47);
byte |= (1<<7);
pci_write_config8(lpc_dev, 0x47, byte);
return;
}
}
reg = reg_old = pci_read_config16(lpc_dev, 0x48);
reg &= ~(1 << index);
if (dev->enabled) {
reg |= (1 << index);
}
if (reg != reg_old) {
pci_write_config16(lpc_dev, 0x48, reg);
}
-----邮件原件-----
发件人: Li-Ta Lo [mailto:ollie@lanl.gov]
发送时间: 2004年5月5日 10:28
收件人: YhLu
抄送: ron minnich; Stefan Reinauer; LinuxBIOS
主题: Re: 答复: 答复: 答复: Disable USB2 in AMD8111 and remove ide hardcode
io addr
On Wed, 2004-05-05 at 10:51, YhLu wrote:
> If I changed config.lb
> PCI 1:0.2 on --> PCI 1:0.2 off
> The PCI 1:0.0 and PCI 1:0.1 will be disabled together.
>
> According to AMD 8111 data sheet, LPC 0x48, only can be disabled the
device
> in second bus by device num, and the three USB share one device number.
>
> So I guess the code about 0x47 must be there.
>
Ron and I just dicurssed about the enable/disable mechanism for
amd8111. We are going to implement a slightly better one soon.
Actually, the enable/disable for devices in amd8111 is multiplexed
in amd8111_enable and the device_operation::enable() is directed to
amd8111_enable. We are going to demultiplex this and each devices
has its own "real" enable method.
Ollie