*/
static void ehci_silence_controller(struct ehci_hcd *ehci)
{
+#ifdef CONFIG_USB_ZYNQ_PHY
+ struct usb_hcd *hcd = ehci_to_hcd(ehci);
+#endif
+
ehci_halt(ehci);
spin_lock_irq(&ehci->lock);
ehci->rh_state = EHCI_RH_HALTED;
+#ifdef CONFIG_USB_ZYNQ_PHY
+ /* turn off for non-otg port */
+ if(!hcd->phy)
+ ehci_turn_off_all_ports(ehci);
+#else
ehci_turn_off_all_ports(ehci);
+#endif
/* make BIOS/etc use companion controller during reboot */
ehci_writel(ehci, 0, &ehci->regs->configured_flag);
ehci_quiesce(ehci);
ehci_silence_controller(ehci);
+#ifdef CONFIG_USB_ZYNQ_PHY
+ if(!hcd->phy)
+ ehci_reset (ehci);
+#else
ehci_reset (ehci);
+#endif
hrtimer_cancel(&ehci->hrtimer);
remove_sysfs_files(ehci);
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 temp;
u32 hcc_params;
+#if defined(CONFIG_ARCH_ZYNQ)
+ void __iomem *non_ehci = hcd->regs;
+#endif
hcd->uses_new_polling = 1;
ehci_writel(ehci, INTR_MASK,
&ehci->regs->intr_enable); /* Turn On Interrupts */
-
+#if defined(CONFIG_ARCH_ZYNQ)
+ /* Modifying FIFO Burst Threshold value from 2 to 8 */
+ temp = readl(non_ehci + 0x164);
+ ehci_writel(ehci, 0x00080000, non_ehci + 0x164);
+#endif
/* GRR this is run-once init(), being done every time the HC starts.
* So long as they're part of class devices, we can't do it init()
* since the class device isn't created that early.
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 status, masked_status, pcd_status = 0, cmd;
int bh;
+ u32 intr_en;
spin_lock (&ehci->lock);
status = ehci_readl(ehci, &ehci->regs->status);
-
+ intr_en = ehci_readl(ehci, &ehci->regs->intr_enable);
+
+#ifdef CONFIG_USB_ZYNQ_PHY
+ if(hcd->phy) {
+ /* A device */
+ if (hcd->phy->otg->default_a &&
+ (hcd->phy->state == OTG_STATE_A_PERIPHERAL)) {
+ spin_unlock(&ehci->lock);
+ return IRQ_NONE;
+ }
+ /* B device */
+ if (!hcd->phy->otg->default_a &&
+ ((hcd->phy->state != OTG_STATE_B_WAIT_ACON) &&
+ (hcd->phy->state != OTG_STATE_B_HOST))) {
+ spin_unlock(&ehci->lock);
+ return IRQ_NONE;
+ }
+ /* If HABA is set and B-disconnect occurs, don't process that interrupt */
+ if (ehci_is_TDI(ehci) && tdi_in_host_mode(ehci) == 0) {
+ spin_unlock(&ehci->lock);
+ return IRQ_NONE;
+ }
+ }
+#endif
/* e.g. cardbus physical eject */
if (status == ~(u32) 0) {
ehci_dbg (ehci, "device removed\n");
#define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver
#endif
+#ifdef CONFIG_USB_EHCI_XUSBPS
+#include "ehci-xilinx-usbps.c"
+#define PLATFORM_DRIVER ehci_xusbps_driver
+#endif
+
#ifdef CONFIG_USB_W90X900_EHCI
#include "ehci-w90x900.c"
#define PLATFORM_DRIVER ehci_hcd_w90x900_driver