2 * "Inventra" High-speed Dual-Role Controller (MUSB-HDRC), Mentor Graphics,
3 * USB2.0 OTG compliant core used in various chips.
5 * Only host-mode and non-DMA accesses are currently supported.
7 * Copyright (C) 2008 Nokia Corporation
8 * Written by Andrzej Zaborowski <balrog@zabor.org>
10 * SPDX-License-Identifier: GPL-2.0-or-later
16 enum musb_irq_source_e
{
23 musb_irq_vbus_request
,
29 /* Add new interrupts here */
30 musb_irq_max
/* total number of interrupts defined */
33 /* TODO convert hcd-musb to QOM/qdev and remove MUSBReadFunc/MUSBWriteFunc */
34 typedef void MUSBWriteFunc(void *opaque
, hwaddr addr
, uint32_t value
);
35 typedef uint32_t MUSBReadFunc(void *opaque
, hwaddr addr
);
36 extern MUSBReadFunc
* const musb_read
[];
37 extern MUSBWriteFunc
* const musb_write
[];
39 typedef struct MUSBState MUSBState
;
41 MUSBState
*musb_init(DeviceState
*parent_device
, int gpio_base
);
42 void musb_reset(MUSBState
*s
);
43 uint32_t musb_core_intr_get(MUSBState
*s
);
44 void musb_core_intr_clear(MUSBState
*s
, uint32_t mask
);
45 void musb_set_size(MUSBState
*s
, int epnum
, int size
, int is_tx
);