<commit_before>/**
 * @file
 * @brief
 *
 * @author  <NAME>
 * @date    09.10.2013
 */

#ifndef USB_OHCI_H_
#define USB_OHCI_H_

#define OHCI_USB_REV10 0x10 // for USB 1.0

#define OHCI_CTRL_CB_RATIO11          0x00000000
#define OHCI_CTRL_CB_RATIO21          0x00000001
#define OHCI_CTRL_CB_RATIO31          0x00000002
#define OHCI_CTRL_CB_RATIO41          0x00000003

#define OHCI_CTRL_LISTS_EN_MASK       0x0000003c
#define OHCI_CTRL_PERIOD_EN           0x00000004
#define OHCI_CTRL_ISOCHR_EN           0x00000008
#define OHCI_CTRL_CTRL_EN             0x00000010
#define OHCI_CTRL_BULK_EN             0x00000020

#define OHCI_CTRL_FUNC_STATE_MASK     0x000000c0
#define OHCI_CTRL_FUNC_STATE_RST      0x00000000
#define OHCI_CTRL_FUNC_STATE_RESM     0x00000040
#define OHCI_CTRL_FUNC_STATE_OPRT     0x00000080
#define OHCI_CTRL_FUNC_STATE_SUSP     0x000000c0

#define OHCI_CTRL_INT_ROUT            0x00000100

#define OHCI_CMD_OWNER_CHAGE          0x00000008
#define OHCI_CMD_RESET                0x00000001
#define OHCI_CMD_CONTROL_FILLED       0x00000002

#define OHCI_INTERRUPT_ALL_BUTSOF     0xc000007b
#define OHCI_INTERRUPT_RHUB           0x00000040
#define OHCI_INTERRUPT_DONE_QUEUE     0x00000002

#define OHCI_FM_INTERVAL_FI_MASK      0x00003fff
#define OHCI_FM_INTERVAL_FI_TOGL      0x80000000

#define OHCI_PERIOD_START_MASK        0x000003ff

#define OHCI_RH_DESC_A_N_DOWNP_M      0x000000ff

#define OHCI_RH_R_CONN_W_CLREN        0x0001
#define OHCI_RH_R_EN_W_STEN           0x0002
#define OHCI_RH_R_SUSP_W_STSUSP       0x0004
#define OHCI_RH_R_OVERC_W_CLSUSP      0x0008
#define OHCI_RH_R_RST_W_STRST         0x0010
#define OHCI_RH_R_PWR_W_STPWR         0x0100
#define OHCI_RH_R_LOWSPD_W_CLPWR      0x0200

#define OHCI_RH_PS_CSC   (1 << 16)   /* connect status change */

#define OHCI_TD_SETUP                 0x00000000
#define OHCI_TD_OUT                   0x00080000
#define OHCI_TD_IN                    0x00100000
#define OHCI_TD_BUF_ROUND             0x00040000
#define OHCI_TD_FLAGS_CC_MASK         0xf0000000
#define OHCI_TD_CC_NOERR              0x00000000
#define OHCI_TD_CC_STALL              0x40000000
#define OHCI_TD_CC_NOT_RESP           0x50000000
#define OHCI_TD_CC_DATA_OVERRUN       0x80000000
#define OHCI_TD_CC_DATA_UNDERRUN      0x90000000

#define OHCI_ED_FUNC_ADDRESS_MASK     0x0000007f
#define OHCI_ED_FUNC_ADDRESS_OFFS     0
#define OHCI_ED_ENDP_ADDRESS_MASK     0x00000780
#define OHCI_ED_ENDP_ADDRESS_OFFS     7
#define OHCI_ED_DIR_MASK              0x00001800
#define OHCI_ED_S                     0x00002000
#define OHCI_ED_K                     0x00004000
#define OHCI_ED_F                     0x00008000
#define OHCI_ED_MAX_PKT_SIZE_MASK     0x07ff0000
/* spec says some bits could be used by driver */
#define OHCI_ED_SCHEDULED             0x80000000

#define OHCI_HCCA_INTERRUPT_LIST_N    32<commit_msg>minor: clean: Work on ohci usb driver<commit_after>/**
 * @file
 * @brief
 *
 * @author  <NAME>
 * @date    09.10.2013
 */

#ifndef USB_OHCI_H_
#define USB_OHCI_H_

#define OHCI_USB_REV10 0x10 // for USB 1.0

#define OHCI_CTRL_CB_RATIO11          0x00000000
#define OHCI_CTRL_CB_RATIO21          0x00000001
#define OHCI_CTRL_CB_RATIO31          0x00000002
#define OHCI_CTRL_CB_RATIO41          0x00000003

#define OHCI_CTRL_LISTS_EN_MASK       0x0000003c
#define OHCI_CTRL_PERIOD_EN           0x00000004
#define OHCI_CTRL_ISOCHR_EN           0x00000008
#define OHCI_CTRL_CTRL_EN             0x00000010
#define OHCI_CTRL_BULK_EN             0x00000020

#define OHCI_CTRL_FUNC_STATE_MASK     0x000000c0
#define OHCI_CTRL_FUNC_STATE_RST      0x00000000
#define OHCI_CTRL_FUNC_STATE_RESM     0x00000040
#define OHCI_CTRL_FUNC_STATE_OPRT     0x00000080
#define OHCI_CTRL_FUNC_STATE_SUSP     0x000000c0

#define OHCI_CTRL_INT_ROUT            0x00000100

#define OHCI_CMD_OWNER_CHAGE          0x00000008
#define OHCI_CMD_RESET                0x00000001
#define OHCI_CMD_CONTROL_FILLED       0x00000002

#define OHCI_INTERRUPT_ALL_BUTSOF     0xc000007b
#define OHCI_INTERRUPT_RHUB           0x00000040
#define OHCI_INTERRUPT_DONE_QUEUE     0x00000002

#define OHCI_FM_INTERVAL_FI_MASK      0x00003fff
#define OHCI_FM_INTERVAL_FI_TOGL      0x80000000

#define OHCI_PERIOD_START_MASK        0x000003ff

#define OHCI_RH_DESC_A_N_DOWNP_M      0x000000ff

#define OHCI_RH_R_CONN_W_CLREN        0x0001
#define OHCI_RH_R_EN_W_STEN           0x0002
#define OHCI_RH_R_SUSP_W_STSUSP       0x0004
#define OHCI_RH_R_OVERC_W_CLSUSP      0x0008
#define OHCI_RH_R_RST_W_STRST         0x0010
#define OHCI_RH_R_PWR_W_STPWR         0x0100
#define OHCI_RH_R_LOWSPD_W_CLPWR      0x0200

/* port status */
#define OHCI_RH_PS_CCS            0x00000001 /* current connect status */
#define OHCI_RH_PS_PES            0x00000002 /* port enable status*/
#define OHCI_RH_PS_PSS            0x00000004 /* port suspend status */
#define OHCI_RH_PS_POCI           0x00000008 /* port over current indicator */
#define OHCI_RH_PS_PRS            0x00000010 /* port reset status */
#define OHCI_RH_PS_PPS            0x00000100 /* port power status */
#define OHCI_RH_PS_LSDA           0x00000200 /* low speed device attached */
#define OHCI_RH_PS_CSC            0x00010000 /* (1 << 16) connect status change */
#define OHCI_RH_PS_PESC           0x00020000 /* port enable status change */
#define OHCI_RH_PS_PSSC           0x00040000 /* port suspend status change */
#define OHCI_RH_PS_OCIC           0x00080000 /* over current indicator change */
#define OHCI_RH_PS_PRSC           0x00100000 /* port reset status change */

#define OHCI_TD_SETUP                 0x00000000
#define OHCI_TD_OUT                   0x00080000
#define OHCI_TD_IN                    0x00100000
#define OHCI_TD_BUF_ROUND             0x00040000
#define OHCI_TD_FLAGS_CC_MASK         0xf0000000
#define OHCI_TD_CC_NOERR              0x00000000
#define OHCI_TD_CC_STALL              0x40000000
#define OHCI_TD_CC_NOT_RESP           0x50000000
#define OHCI_TD_CC_DATA_OVERRUN       0x80000000
#define OHCI_TD_CC_DATA_UNDERRUN      0x90000000

#define OHCI_ED_FUNC_ADDRESS_MASK     0x0000007f
#define OHCI_ED_FUNC_ADDRESS_OFFS     0
#define OHCI_ED_ENDP_ADDRESS_MASK     0x00000780
#define OHCI_ED_ENDP_ADDRESS_OFFS     7
#define OHCI_ED_DIR_MASK              0x00001800
#define OHCI_ED_S                     0x00002000
#define OHCI_ED_K                     0x00004000
#define OHCI_ED_F                     0x00008000
#define OHCI_ED_MAX_PKT_SIZE_MASK     0x07ff0000
/* spec says some bits could be used by driver */
#define OHCI_ED_SCHEDULED             0x80000000

#define OHCI_HCCA_INTERRUPT_LIST_N    32
{'fraction_non_alphanumeric': 0.03748103186646434, 'fraction_numerical': 0.14871016691957512, 'mean_word_length': 2.949071300179748, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 44, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4203645', 'n_tokens_mistral': 3305, 'n_tokens_neox': 2462, 'n_words': 464}