[U-Boot] [PATCH v2 57/80] dm: usb: tegra: Remove the port_addr_clear_csc variable

Jim Lin jilin at nvidia.com
Thu Mar 26 10:01:27 CET 2015


Please ignore my question because it is answered by [PATCH v2 34/80].

On 03/26/2015 11:38 AM, Jim Lin wrote:
>> -----Original Message-----
>> From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Simon Glass
>> Sent: Thursday, March 26, 2015 2:23 AM
>> To: U-Boot Mailing List
>> Cc: Marek Vasut; Stephen Warren; Vivek Gautam; Tom Warren
>> Subject: [U-Boot] [PATCH v2 57/80] dm: usb: tegra: Remove the port_addr_clear_csc variable
>>
>> This variable is a bit of a hack. We can obtain the same information from the normal device config. This will fit better with driver model, where global variables > are best avoided.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>
>> Changes in v2: None
>>
>>   drivers/usb/host/ehci-tegra.c | 6 +-----
>>   1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 38333c7..464f55d 100644
>> --- a/drivers/usb/host/ehci-tegra.c
>> +++ b/drivers/usb/host/ehci-tegra.c
>> @@ -87,8 +87,6 @@ struct fdt_usb {
>>   
>>   static struct fdt_usb port[USB_PORTS_MAX];	/* List of valid USB ports */
>>   static unsigned port_count;			/* Number of available ports */
>> -/* Port that needs to clear CSC after Port Reset */ -static u32 port_addr_clear_csc;
>>   
>>   /*
>>    * This table has USB timing parameters for each Oscillator frequency we @@ -206,7 +204,7 @@ static void tegra_ehci_powerup_fixup(struct ehci_ctrl *ctrl,
>    	if (controller->has_hostpc)
>>   		*reg |= EHCI_PS_PE;
>>   
>> -	if (((u32)status_reg & TEGRA_USB_ADDR_MASK) != port_addr_clear_csc)
>> +	if (!config->has_legacy_mode)
>>   		return;
> How do we get config (config->has_legacy_mode) for in this function?
> If you read ehci_set_usbmode, "config"  comes from
> "config = &port[index];".
> Or "config" is an input argument like set_up_vbus(struct fdt_usb *config, ...)
> But for ehci_powerup_fixup, I don't see a way for us to get "config".
>
>>   	/* For EHCI_PS_CSC to be cleared in ehci_hcd.c */
> --nvpublic
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



More information about the U-Boot mailing list