- Added suport for enabling USB P4 on the olpc

USB P4 is disabled by default and we need to setup the mux bits proper
to make it work.  This is the frame work for that.  All thats needed
is the right address values



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2387 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Richard Smith
2006-08-25 05:01:30 +00:00
parent 689c144839
commit 59ba228f92
4 changed files with 51 additions and 3 deletions

View File

@@ -152,6 +152,48 @@ static void southbridge_init(struct device *dev)
outl(sb->unwanted_vpci[i] + 0x7C, 0xCF8);
outl(0xDEADBEEF, 0xCFC);
}
if (sb->enable_USBP4_host) {
volatile unsigned long* uocmux;
unsigned long val;
printk_err("Base 0x%08x\n",USB2_SB_GLD_MSR_CAP);
msr = rdmsr(USB2_SB_GLD_MSR_CAP);
printk_err("CAP 0x%08x%08x\n", msr.hi,msr.lo);
msr = rdmsr(USB2_SB_GLD_MSR_OHCI_BASE);
printk_err("OHCI base 0x%08x%08x\n", msr.hi,msr.lo);
msr = rdmsr(USB2_SB_GLD_MSR_EHCI_BASE);
printk_err("EHCI base 0x%08x%08x\n", msr.hi,msr.lo);
msr = rdmsr(USB2_SB_GLD_MSR_DEVCTL_BASE);
printk_err("DevCtl base 0x%08x%08x\n", msr.hi,msr.lo);
msr = rdmsr(USB2_SB_GLD_MSR_UOC_BASE);
printk_err("Old UOC Base 0x%08x%08x\n", msr.hi,msr.lo);
msr.hi |= 0xa;
msr.lo |= 0xfe010000;
#if 0
wrmsr(USB2_SB_GLD_MSR_UOC_BASE, msr);
msr = rdmsr(USB2_SB_GLD_MSR_UOC_BASE);
printk_err("New UOC Base 0x%08x%08x\n", msr.hi,msr.lo);
uocmux = (unsigned long *)msr.lo+4;
val = *uocmux;
printk_err("UOCMUX is 0x%lx\n",*val);
val &= ~(0xc0);
val |= 0x2;
*uocmux = val;
#endif
}
}