Masahiro Yamada | 048899b | 2014-11-07 18:48:33 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Panasonic Corporation |
| 3 | * Author: Masahiro Yamada <yamada.m@jp.panasonic.com> |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #ifndef __PLAT_UNIPHIER_EHCI_H |
| 9 | #define __PLAT_UNIPHIER_EHCI_H |
| 10 | |
| 11 | #include <linux/types.h> |
| 12 | #include <asm/io.h> |
| 13 | #include "mio-regs.h" |
| 14 | |
| 15 | struct uniphier_ehci_platform_data { |
| 16 | unsigned long base; |
| 17 | }; |
| 18 | |
| 19 | extern struct uniphier_ehci_platform_data uniphier_ehci_platdata[]; |
| 20 | |
| 21 | static inline void uniphier_ehci_reset(int index, int on) |
| 22 | { |
| 23 | u32 tmp; |
| 24 | |
| 25 | tmp = readl(MIO_USB_RSTCTRL(index)); |
| 26 | if (on) |
| 27 | tmp &= ~MIO_USB_RSTCTRL_XRST; |
| 28 | else |
| 29 | tmp |= MIO_USB_RSTCTRL_XRST; |
| 30 | writel(tmp, MIO_USB_RSTCTRL(index)); |
| 31 | } |
| 32 | |
| 33 | #endif /* __PLAT_UNIPHIER_EHCI_H */ |