Chameleon

Chameleon Commit Details

Date:2010-08-07 01:53:29 (8 years 11 months ago)
Author:Azimutz
Commit:319
Parents: 318
Message:... finish clean.
Changes:
M/branches/azimutz/Chazileon/i386/libsaio/platform.c
M/branches/azimutz/Chazileon/i386/libsaio/usb.c

File differences

branches/azimutz/Chazileon/i386/libsaio/usb.c
3838
3939
4040
41
4241
4342
4443
4544
4645
4746
48
4947
5048
5149
......
6866
6967
7068
71
69
7270
7371
7472
7573
7674
77
78
79
75
76
77
8078
8179
8280
......
8785
8886
8987
90
91
88
89
9290
91
92
93
9394
9495
9596
9697
97
98
99
98100
99101
100102
......
122124
123125
124126
125
126127
127128
128129
......
130131
131132
132133
133
134
134135
135136
136137
......
208209
209210
210211
211
212
212213
213214
214215
// Add usb device to the list
void notify_usb_dev(pci_dt_t *pci_dev)
{
struct pciList* current = usbList;
if(!usbList)
{
usbList = (struct pciList*)malloc(sizeof(struct pciList));
usbList->next = NULL;
usbList->pciDev = pci_dev;
}
else
{
bool fix_ehci, fix_uhci, fix_usb, fix_legacy;
fix_ehci = fix_uhci = fix_usb = fix_legacy = false;
if (getBoolForKey(kUSBBusFix, &fix_usb, &bootInfo->bootConfig))
if (getBoolForKey(kUSBBusFixKey, &fix_usb, &bootInfo->bootConfig))
{
fix_ehci = fix_uhci = fix_legacy = fix_usb;// Disable all if none set
}
else
{
getBoolForKey(kEHCIacquire, &fix_ehci, &bootInfo->bootConfig);
getBoolForKey(kUHCIreset, &fix_uhci, &bootInfo->bootConfig);
getBoolForKey(kLegacyOff, &fix_legacy, &bootInfo->bootConfig);
getBoolForKey(kEHCIacquireKey, &fix_ehci, &bootInfo->bootConfig);
getBoolForKey(kUHCIresetKey, &fix_uhci, &bootInfo->bootConfig);
getBoolForKey(kLegacyOffKey, &fix_legacy, &bootInfo->bootConfig);
}
struct pciList* current = usbList;
{
// EHCI
case 0x20:
if(fix_ehci) retVal &= ehci_acquire(current->pciDev);
if(fix_legacy) retVal &= legacy_off(current->pciDev);
if (fix_ehci)
retVal &= ehci_acquire(current->pciDev);
if (fix_legacy)
retVal &= legacy_off(current->pciDev);
break;
// UHCI
case 0x00:
if (fix_uhci) retVal &= uhci_reset(current->pciDev);
if (fix_uhci)
retVal &= uhci_reset(current->pciDev);
break;
}
pci_dev->vendor_id, pci_dev->device_id,
pci_dev->dev.bits.bus, pci_dev->dev.bits.dev, pci_dev->dev.bits.func);
// capaddr = Capability Registers = dev.addr + offset stored in dev.addr + 0x10 (USBBASE)
capaddr = pci_config_read32(pci_dev->dev.addr, 0x10);
opaddr = capaddr + *((unsigned char*)(capaddr));
// eecp = EHCI Extended Capabilities offset = capaddr HCCPARAMS bits 15:8
eecp=*((unsigned char*)(capaddr + 9));
eecp = *((unsigned char*)(capaddr + 9));
DBG("capaddr=%x opaddr=%x eecp=%x\n", capaddr, opaddr, eecp);
boolalwaysHardBIOSReset;
alwaysHardBIOSReset = false;
if (!getBoolForKey(kEHCIhard, &alwaysHardBIOSReset, &bootInfo->bootConfig)) {
if (!getBoolForKey(kEHCIhardKey, &alwaysHardBIOSReset, &bootInfo->bootConfig)) {
alwaysHardBIOSReset = true;
}
branches/azimutz/Chazileon/i386/libsaio/platform.c
4343
4444
4545
46
46
4747
4848
4949
if (done) return;
bool useAutodetection = true;
getBoolForKey(kUseMemDetect, &useAutodetection, &bootInfo->bootConfig);
getBoolForKey(kUseMemDetectKey, &useAutodetection, &bootInfo->bootConfig);
if (useAutodetection) {
if (dram_controller_dev!=NULL) {

Archive Download the corresponding diff file

Revision: 319