blob: e9c5fb4af846c59d7bc0060f73bf01afa55a4f41 [file] [log] [blame]
Masahiro Yamada048899b2014-11-07 18:48:33 +09001/*
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
15struct uniphier_ehci_platform_data {
16 unsigned long base;
17};
18
19extern struct uniphier_ehci_platform_data uniphier_ehci_platdata[];
20
21static 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 */