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:
committed by
Stefan Reinauer
parent
139e6f9555
commit
28cd29192b
@@ -32,9 +32,7 @@
|
|||||||
#include "sis966.h"
|
#include "sis966.h"
|
||||||
#include <usbdebug.h>
|
#include <usbdebug.h>
|
||||||
|
|
||||||
extern struct ehci_debug_info dbg_info;
|
static const u8 SiS_SiS7002_init[22][3]={
|
||||||
|
|
||||||
u8 SiS_SiS7002_init[22][3]={
|
|
||||||
{0x04, 0x00, 0x06},
|
{0x04, 0x00, 0x06},
|
||||||
{0x0D, 0x00, 0x00},
|
{0x0D, 0x00, 0x00},
|
||||||
|
|
||||||
@@ -70,14 +68,14 @@ static void usb2_init(struct device *dev)
|
|||||||
{
|
{
|
||||||
u32 base;
|
u32 base;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
int i;
|
||||||
|
u8 temp8;
|
||||||
|
|
||||||
print_debug("USB 2.0 INIT:---------->\n");
|
print_debug("USB 2.0 INIT:---------->\n");
|
||||||
|
|
||||||
//-------------- enable USB2.0 (SiS7002) -------------------------
|
//-------------- enable USB2.0 (SiS7002) ----------------------
|
||||||
{
|
|
||||||
u8 temp8;
|
|
||||||
int i=0;
|
|
||||||
|
|
||||||
|
i = 0;
|
||||||
while(SiS_SiS7002_init[i][0] != 0)
|
while(SiS_SiS7002_init[i][0] != 0)
|
||||||
{
|
{
|
||||||
temp8 = pci_read_config8(dev, SiS_SiS7002_init[i][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);
|
pci_write_config8(dev, SiS_SiS7002_init[i][0], temp8);
|
||||||
i++;
|
i++;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
res = find_resource(dev, 0x10);
|
res = find_resource(dev, 0x10);
|
||||||
if(!res)
|
if(!res)
|
||||||
@@ -95,12 +92,9 @@ static void usb2_init(struct device *dev)
|
|||||||
base = res->base;
|
base = res->base;
|
||||||
printk(BIOS_DEBUG, "base = 0x%08x\n", base);
|
printk(BIOS_DEBUG, "base = 0x%08x\n", base);
|
||||||
write32(base+0x20, 0x2);
|
write32(base+0x20, 0x2);
|
||||||
//-----------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|
||||||
#if DEBUG_USB2
|
#if DEBUG_USB2
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
print_debug("****** USB 2.0 PCI config ******");
|
print_debug("****** USB 2.0 PCI config ******");
|
||||||
print_debug("\n 03020100 07060504 0B0A0908 0F0E0D0C");
|
print_debug("\n 03020100 07060504 0B0A0908 0F0E0D0C");
|
||||||
|
|
||||||
@@ -114,7 +108,6 @@ static void usb2_init(struct device *dev)
|
|||||||
print_debug(" ");
|
print_debug(" ");
|
||||||
}
|
}
|
||||||
print_debug("\n");
|
print_debug("\n");
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
print_debug("USB 2.0 INIT:<----------\n");
|
print_debug("USB 2.0 INIT:<----------\n");
|
||||||
}
|
}
|
||||||
@@ -139,7 +132,6 @@ static void usb2_set_resources(struct device *dev)
|
|||||||
set_ehci_base(base);
|
set_ehci_base(base);
|
||||||
report_resource_stored(dev, res, "");
|
report_resource_stored(dev, res, "");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
|
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,
|
pci_write_config32(dev, 0x40,
|
||||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_operations lops_pci = {
|
static struct pci_operations lops_pci = {
|
||||||
.set_subsystem = lpci_set_subsystem,
|
.set_subsystem = lpci_set_subsystem,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user