1 // SPDX-License-Identifier: GPL-2.0
3 * xHCI host controller driver for RZ/V2M
5 * Copyright (C) 2022 Renesas Electronics Corporation
8 #include <linux/usb/rzv2m_usb3drd.h>
10 #include "xhci-plat.h"
11 #include "xhci-rzv2m.h"
13 #define RZV2M_USB3_INTEN 0x1044 /* Interrupt Enable */
15 #define RZV2M_USB3_INT_XHC_ENA BIT(0)
16 #define RZV2M_USB3_INT_HSE_ENA BIT(2)
17 #define RZV2M_USB3_INT_ENA_VAL (RZV2M_USB3_INT_XHC_ENA \
18 | RZV2M_USB3_INT_HSE_ENA)
20 int xhci_rzv2m_init_quirk(struct usb_hcd
*hcd
)
22 struct device
*dev
= hcd
->self
.controller
;
24 rzv2m_usb3drd_reset(dev
->parent
, true);
29 void xhci_rzv2m_start(struct usb_hcd
*hcd
)
34 /* Interrupt Enable */
35 int_en
= readl(hcd
->regs
+ RZV2M_USB3_INTEN
);
36 int_en
|= RZV2M_USB3_INT_ENA_VAL
;
37 writel(int_en
, hcd
->regs
+ RZV2M_USB3_INTEN
);