projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kconfig: make conf_get_autoconfig_name() static
[carl9170fw.git]
/
carlfw
/
include
/
usb.h
diff --git
a/carlfw/include/usb.h
b/carlfw/include/usb.h
index 1fb9e82a70ad6dc55110d9054d9db97ecfe1247d..67a3830f69c3b3618616269d82a1c9e85988027a 100644
(file)
--- a/
carlfw/include/usb.h
+++ b/
carlfw/include/usb.h
@@
-6,7
+6,7
@@
* Copyright (c) 2000-2005 ZyDAS Technology Corporation
* Copyright (c) 2007-2009 Atheros Communications, Inc.
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
* 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
*
* 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
@@
-19,8
+19,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with this program; If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CARL9170FW_USB_H
*/
#ifndef __CARL9170FW_USB_H
@@
-50,11
+49,16
@@
static inline __inline bool usb_configured(void)
AR9170_USB_DEVICE_ADDRESS_CONFIGURE);
}
AR9170_USB_DEVICE_ADDRESS_CONFIGURE);
}
-static inline __inline void usb_remote_wakeup(void)
+static inline __inline void usb_
enable_
remote_wakeup(void)
{
orb(AR9170_USB_REG_MAIN_CTRL, AR9170_USB_MAIN_CTRL_REMOTE_WAKEUP);
}
{
orb(AR9170_USB_REG_MAIN_CTRL, AR9170_USB_MAIN_CTRL_REMOTE_WAKEUP);
}
+static inline __inline void usb_disable_remote_wakeup(void)
+{
+ andb(AR9170_USB_REG_MAIN_CTRL, ~AR9170_USB_MAIN_CTRL_REMOTE_WAKEUP);
+}
+
static inline __inline void usb_enable_global_int(void)
{
orb(AR9170_USB_REG_MAIN_CTRL, AR9170_USB_MAIN_CTRL_ENABLE_GLOBAL_INT);
static inline __inline void usb_enable_global_int(void)
{
orb(AR9170_USB_REG_MAIN_CTRL, AR9170_USB_MAIN_CTRL_ENABLE_GLOBAL_INT);
@@
-136,6
+140,12
@@
static inline __inline void usb_clear_input_ep_toggle(unsigned int ep)
~AR9170_USB_EP_IN_TOGGLE);
}
~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),
static inline __inline void usb_set_input_ep_toggle(unsigned int ep)
{
orl(AR9170_USB_REG_EP_IN_MAX_SIZE_HIGH + (ep << 1),
@@
-154,6
+164,12
@@
static inline __inline void usb_set_output_ep_toggle(unsigned int ep)
AR9170_USB_EP_OUT_TOGGLE);
}
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);
static inline void usb_structure_check(void)
{
BUILD_BUG_ON(sizeof(struct usb_config_descriptor) != USB_DT_CONFIG_SIZE);
@@
-162,11
+178,12
@@
static inline void usb_structure_check(void)
BUILD_BUG_ON(sizeof(struct usb_interface_descriptor) != USB_DT_INTERFACE_SIZE);
}
BUILD_BUG_ON(sizeof(struct usb_interface_descriptor) != USB_DT_INTERFACE_SIZE);
}
-void __
attribute__((noreturn))
jump_to_bootcode(void);
+void __
noreturn
jump_to_bootcode(void);
void send_cmd_to_host(const uint8_t len, const uint8_t type,
const uint8_t ext, const uint8_t *body);
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);
void usb_init(void);
void usb_ep0rx(void);
void usb_ep0tx(void);
@@
-180,7
+197,7
@@
void usb_print_hex_dump(const void *buf, int len);
void usb_init_highspeed_fifo_cfg(void);
void usb_init_fullspeed_fifo_cfg(void);
void usb_init_highspeed_fifo_cfg(void);
void usb_init_fullspeed_fifo_cfg(void);
-void start(void);
-void __
attribute__((noreturn))
reboot(void);
+void
__noreturn
start(void);
+void __
noreturn
reboot(void);
#endif /* __CARL9170FW_USB_H */
#endif /* __CARL9170FW_USB_H */