libpayload: use correct types in UHCI driver
As we using 16-bit reading and writing in UHCI drive, so all variables related to that must be 16-bit too. Change-Id: Ib1abb03d054c167512e21f24f3c3da688c7fd01f Signed-off-by: Anton Kochkov <anton.kochkov@gmail.com> Reviewed-on: http://review.coreboot.org/1144 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
committed by
Patrick Georgi
parent
f03dff7ab1
commit
8fef662505
@@ -86,7 +86,7 @@ uhci_rh_disable_port (usbdev_t *dev, int port)
|
|||||||
port = PORTSC1;
|
port = PORTSC1;
|
||||||
uhci_reg_write16(controller, port,
|
uhci_reg_write16(controller, port,
|
||||||
uhci_reg_read16(controller, port) & ~4);
|
uhci_reg_read16(controller, port) & ~4);
|
||||||
int value;
|
u16 value;
|
||||||
/* wait for controller to disable port */
|
/* wait for controller to disable port */
|
||||||
/* TOTEST: how long to wait? 100ms for now */
|
/* TOTEST: how long to wait? 100ms for now */
|
||||||
int timeout = 200; /* time out after 200 * 500us == 100ms */
|
int timeout = 200; /* time out after 200 * 500us == 100ms */
|
||||||
@@ -137,7 +137,7 @@ uhci_rh_scanport (usbdev_t *dev, int port)
|
|||||||
static int
|
static int
|
||||||
uhci_rh_report_port_changes (usbdev_t *dev)
|
uhci_rh_report_port_changes (usbdev_t *dev)
|
||||||
{
|
{
|
||||||
int stored, real;
|
u16 stored, real;
|
||||||
|
|
||||||
stored = (RH_INST (dev)->port[0] == -1);
|
stored = (RH_INST (dev)->port[0] == -1);
|
||||||
real = ((uhci_reg_read16 (dev->controller, PORTSC1) & 1) == 0);
|
real = ((uhci_reg_read16 (dev->controller, PORTSC1) & 1) == 0);
|
||||||
|
Reference in New Issue
Block a user