Re: FIX ME in oxu210p-hcd.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14-09-21 07:53 PM, Peter Chen wrote:
> 
>  
>> Subject: Re: FIX ME in oxu210p-hcd.c
>>
>>
>> I found a unfixed FIX ME in the file stated in my above message. I am
>> wondering what to set hcd->self.comtroller->dma_mask to as it's now been
>> defined to NULL and clearly even as a newbie this seem incorrect.
>> Regards Nick
> 
> Usually, it is set at its controller driver or pass through through device tree or
> platform data.
> 
> Peter
> 
Sorry Peter,
I apologize for asking for more help here but I will paste the function below and with my changes.
Please let me known if I am wrong and how to fix it as I new here.
Sorry for Wasting Your Time,
Nick 
static int oxu_reset(struct usb_hcd *hcd)
{
 	struct oxu_hcd *oxu = hcd_to_oxu(hcd);
 	int ret;

 	spin_lock_init(&oxu->mem_lock);
 	INIT_LIST_HEAD(&oxu->urb_list);
	oxu->urb_len = 0;

-	/* FIMXE */
+ 	hcd->self.controller->dma_mask = hcd->regs;

 	if (oxu->is_otg) {
		oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET;
		oxu->regs = hcd->regs + OXU_OTG_CAP_OFFSET + \
			HC_LENGTH(readl(&oxu->caps->hc_capbase));
 
		oxu->mem = hcd->regs + OXU_SPH_MEM;
	} else {
		oxu->caps = hcd->regs + OXU_SPH_CAP_OFFSET;
 		oxu->regs = hcd->regs + OXU_SPH_CAP_OFFSET + \
 			HC_LENGTH(readl(&oxu->caps->hc_capbase));

 		oxu->mem = hcd->regs + OXU_OTG_MEM;
	}

 	oxu->hcs_params = readl(&oxu->caps->hcs_params);
 	oxu->sbrn = 0x20;

	ret = oxu_hcd_init(hcd);
	if (ret)
 		return ret;
 
 	return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux