* Copyright (c) 2000-2005 ZyDAS Technology Corporation
* Copyright (c) 2007-2009 Atheros Communications, Inc.
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
- * Copyright 2009, 2010 Christian Lamparter <chunkeey@googlemail.com>
+ * Copyright 2009-2011 Christian Lamparter <chunkeey@googlemail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
~AR9170_USB_EP_IN_TOGGLE);
}
+static inline __inline void usb_clear_input_ep_stall(unsigned int ep)
+{
+ andl(AR9170_USB_REG_EP_IN_MAX_SIZE_HIGH + (ep << 1),
+ ~AR9170_USB_EP_IN_STALL);
+}
+
static inline __inline void usb_set_input_ep_toggle(unsigned int ep)
{
orl(AR9170_USB_REG_EP_IN_MAX_SIZE_HIGH + (ep << 1),
AR9170_USB_EP_OUT_TOGGLE);
}
+static inline __inline void usb_clear_output_ep_stall(unsigned int ep)
+{
+ andl(AR9170_USB_REG_EP_OUT_MAX_SIZE_HIGH + (ep << 1),
+ ~AR9170_USB_EP_OUT_STALL);
+}
+
static inline void usb_structure_check(void)
{
BUILD_BUG_ON(sizeof(struct usb_config_descriptor) != USB_DT_CONFIG_SIZE);
void send_cmd_to_host(const uint8_t len, const uint8_t type,
const uint8_t ext, const uint8_t *body);
+void usb_reset_eps(void);
void usb_init(void);
void usb_ep0rx(void);
void usb_ep0tx(void);