Re: [PATCH] USB: Add EHCI and OHCI for Renesas R-Mobile SoC (r8a7740)

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

 



Hi Iwamatsu-san

> The Renesas R-Mobile SoC (r8a7740) has USB EHCI and OHCI controllers.
> 
> The ehci and ohci blocks share a common register and clocking infrastructure.
> Initialization of the host controller and clocks is common between these and
> is factored out into the rmobile-common.c file.

(snip)

> +void rmobile_hc_start(struct usb_hcd *hcd, struct platform_device *pdev)
...
> +	data = SMODE_READY_CTR | MMODE_HBUSREQ |
> +			MMODE_WR_INCR | MMODE_BYTE_BURST | MMODE_HTRANS;
> +
> +	if (data == __raw_readl(hci->base + AHB_BUS_CTR))
> +		return;
> +
> +	/* AHB-PCI Bridge Communication Registers */
> +	AHB_WRITE(hci, data, AHB_BUS_CTR);
> +	AHB_WRITE(hci, (PHYS_OFFSET & 0xf0000000) | PREFETCH,
> +				PCIAHB_WIN1_CTR);
> +	AHB_WRITE(hci, 0xf0000000 | PREFETCH, PCIAHB_WIN2_CTR);
> +	AHB_WRITE(hci, hci->phys_base | PCIWIN2_PCICMD, AHBPCI_WIN2_CTR);
> +	data = __raw_readl(hci->base + PCI_ARBITER_CTR);
> +	AHB_WRITE(hci, data | PCIBP_MODE | PCIREQ1 | PCIREQ0,
> +				PCI_ARBITER_CTR);
> +
> +	/* PCI Configuration Registers for AHBPCI */
> +	AHB_WRITE(hci, PCIWIN1_PCICMD | AHB_CFG_AHBPCI, AHBPCI_WIN1_CTR);
> +	AHB_WRITE(hci, hci->phys_base + AHBPCI_OFFSET,
> +				PCI_CONF_AHBPCI_BASEAD);
> +	AHB_WRITE(hci, PHYS_OFFSET & 0xf0000000, PCI_CONF_AHBPCI_WIN1_BASEAD);
> +	AHB_WRITE(hci, 0xf0000000, PCI_CONF_AHBPCI_WIN2_BASEAD);
> +	AHB_WRITE(hci, SERREN | PERREN | MASTEREN | MEMEN,
> +				PCI_CONF_AHBPCI_CMND_STS);
> +
> +	/* PCI Configuration Registers for EHCI */
> +	AHB_WRITE(hci, PCIWIN1_PCICMD | AHB_CFG_HOST, AHBPCI_WIN1_CTR);
> +	AHB_WRITE(hci, hci->phys_base + OHCI_OFFSET, OHCI_BASEAD);
> +	AHB_WRITE(hci, hci->phys_base + EHCI_OFFSET, EHCI_BASEAD);
> +
> +	data = SERREN | PERREN | MASTEREN | MEMEN;
> +	AHB_WRITE(hci, data, OHCI_CMND_STS);
> +	AHB_WRITE(hci, data, EHCI_CMND_STS);
> +
> +	/* enable pci interrupt */
> +	data = __raw_readl(hci->base + PCI_INT_ENABLE);
> +	data |= USBH_PMEEN | USBH_INTBEN | USBH_INTAEN;
> +	AHB_WRITE(hci, data, PCI_INT_ENABLE);

Are these setting Renesas mobile "Common" ???
I don't think so.
It is R8A7740 specific settings


Best regards
---
Kuninori Morimoto
--
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