summaryrefslogtreecommitdiff
path: root/src/southbridge/via/vt8235/vt8235_usb.c
blob: 7992602146379aca0a7cebade84f2f1c060571ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
#include "vt8235.h"

/* really nothing to do here, both usb 1.1 & 2.0 are normal PCI devices and so get resources allocated
   properly. They are part of the southbridge and are enabled in the chip enable function for the southbridge */

static void usb_init(struct device *dev)
{
	printk_debug("Configuring VIA USB 1.1\n");

	/* pci_write_config8(dev, 0x04, 0x07); */

	/*
	 * To disable; though do we need to do this?
    		pci_write_config8(dev1, 0x3c, 0x00);
    		pci_write_config8(dev1, 0x04, 0x00);

	   Also, on the root dev, for enable:
	   	regval = pci_read_config8(dev0, 0x50);
		regval &= ~(0x36);
		pci_write_config8(dev0, 0x50, regval);

		(regval |= 0x36; for disable)
	 */
}

/*
static struct device_operations usb_ops = {
	.read_resources   = pci_dev_read_resources,
	.set_resources    = pci_dev_set_resources,
	.enable_resources = pci_dev_enable_resources,
	.init             = usb_init,
	.enable           = 0,
	.ops_pci          = 0,
};

static const struct pci_driver northbridge_driver __pci_driver = {
	.ops    = &usb_ops,
	.vendor = PCI_VENDOR_ID_VIA,
	.device = PCI_DEVICE_ID_VIA_82C586_2,
};
*/