blob: b7f571d03771753895b473c41af8b4cacfe03a60 [file] [log] [blame]
Thomas Abrahama1428962009-01-04 09:41:03 +05301/*
2 * Mentor USB OTG Core host controller driver.
3 *
4 * Copyright (c) 2008 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19 * MA 02111-1307 USA
20 *
21 * Author: Thomas Abraham t-abraham@ti.com, Texas Instruments
22 */
23
24#ifndef __MUSB_HCD_H__
25#define __MUSB_HCD_H__
26
27#include "musb_core.h"
28#ifdef CONFIG_USB_KEYBOARD
29#include <devices.h>
30extern unsigned char new[];
31#endif
32
Bryan Wuc3a012c2009-06-16 05:26:27 -040033#ifndef CONFIG_MUSB_TIMEOUT
34# define CONFIG_MUSB_TIMEOUT 100000
35#endif
36
Thomas Abrahama1428962009-01-04 09:41:03 +053037/* This defines the endpoint number used for control transfers */
38#define MUSB_CONTROL_EP 0
39
40/* This defines the endpoint number used for bulk transfer */
41#define MUSB_BULK_EP 1
42
43/* This defines the endpoint number used for interrupt transfer */
44#define MUSB_INTR_EP 2
45
46/* Determine the operating speed of MUSB core */
47#define musb_ishighspeed() \
48 ((readb(&musbr->power) & MUSB_POWER_HSMODE) \
49 >> MUSB_POWER_HSMODE_SHIFT)
50
51/* extern functions */
52extern int musb_platform_init(void);
53extern void musb_platform_deinit(void);
54
55#endif /* __MUSB_HCD_H__ */