cosmetic cleanup of sis966 usb2 code
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6494 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
139e6f9555
commit
28cd29192b
|
@ -32,9 +32,7 @@
|
|||
#include "sis966.h"
|
||||
#include <usbdebug.h>
|
||||
|
||||
extern struct ehci_debug_info dbg_info;
|
||||
|
||||
u8 SiS_SiS7002_init[22][3]={
|
||||
static const u8 SiS_SiS7002_init[22][3]={
|
||||
{0x04, 0x00, 0x06},
|
||||
{0x0D, 0x00, 0x00},
|
||||
|
||||
|
@ -70,14 +68,14 @@ static void usb2_init(struct device *dev)
|
|||
{
|
||||
u32 base;
|
||||
struct resource *res;
|
||||
int i;
|
||||
u8 temp8;
|
||||
|
||||
print_debug("USB 2.0 INIT:---------->\n");
|
||||
|
||||
//-------------- enable USB2.0 (SiS7002) -------------------------
|
||||
{
|
||||
u8 temp8;
|
||||
int i=0;
|
||||
//-------------- enable USB2.0 (SiS7002) ----------------------
|
||||
|
||||
i = 0;
|
||||
while(SiS_SiS7002_init[i][0] != 0)
|
||||
{
|
||||
temp8 = pci_read_config8(dev, SiS_SiS7002_init[i][0]);
|
||||
|
@ -86,7 +84,6 @@ static void usb2_init(struct device *dev)
|
|||
pci_write_config8(dev, SiS_SiS7002_init[i][0], temp8);
|
||||
i++;
|
||||
};
|
||||
}
|
||||
|
||||
res = find_resource(dev, 0x10);
|
||||
if(!res)
|
||||
|
@ -95,12 +92,9 @@ static void usb2_init(struct device *dev)
|
|||
base = res->base;
|
||||
printk(BIOS_DEBUG, "base = 0x%08x\n", base);
|
||||
write32(base+0x20, 0x2);
|
||||
//-----------------------------------------------------------
|
||||
//-------------------------------------------------------------
|
||||
|
||||
#if DEBUG_USB2
|
||||
{
|
||||
int i;
|
||||
|
||||
print_debug("****** USB 2.0 PCI config ******");
|
||||
print_debug("\n 03020100 07060504 0B0A0908 0F0E0D0C");
|
||||
|
||||
|
@ -114,7 +108,6 @@ static void usb2_init(struct device *dev)
|
|||
print_debug(" ");
|
||||
}
|
||||
print_debug("\n");
|
||||
}
|
||||
#endif
|
||||
print_debug("USB 2.0 INIT:<----------\n");
|
||||
}
|
||||
|
@ -139,7 +132,6 @@ static void usb2_set_resources(struct device *dev)
|
|||
set_ehci_base(base);
|
||||
report_resource_stored(dev, res, "");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
|
||||
|
@ -147,6 +139,7 @@ static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
|
|||
pci_write_config32(dev, 0x40,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
|
||||
static struct pci_operations lops_pci = {
|
||||
.set_subsystem = lpci_set_subsystem,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue