source: mainline/uspace/drv/platform/amdm37x/uhh.h

Last change on this file was 4122410, checked in by Jakub Jermar <jakub@…>, 7 years ago

Improve Doxygen documentaion

This is stil WiP. A number of libraries, drivers and services were
converted to using a more hierarchical and decentralized scheme when it
comes to specifying to which doxygen group they belong.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/*
2 * Copyright (c) 2012 Jan Vesely
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup amdm37x
30 * @{
31 */
32/** @file
33 * @brief UHH IO register structure.
34 */
35#ifndef AMDM37x_UHH_H
36#define AMDM37x_UHH_H
37
38#include <macros.h>
39#include <ddi.h>
40
41#define AMDM37x_UHH_BASE_ADDRESS 0x48064000
42#define AMDM37x_UHH_SIZE 1024
43
44typedef struct {
45 const ioport32_t revision;
46#define UHH_REVISION_MINOR_MASK 0x0f
47#define UHH_REVISION_MAJOR_MASK 0xf0
48
49 PADD32(3);
50 ioport32_t sysconfig;
51#define UHH_SYSCONFIG_AUTOIDLE_FLAG (1 << 0)
52#define UHH_SYSCONFIG_SOFTRESET_FLAG (1 << 1)
53#define UHH_SYSCONFIG_ENWAKEUP_FLAG (1 << 2)
54#define UHH_SYSCONFIG_SIDLE_MODE_MASK (0x3 << 3)
55#define UHH_SYSCONFIG_SIDLE_MODE_FORCE (0x0 << 3)
56#define UHH_SYSCONFIG_SIDLE_MODE_NO (0x1 << 3)
57#define UHH_SYSCONFIG_SIDLE_MODE_SMART (0x2 << 3)
58#define UHH_SYSCONFIG_CLOCKACTIVITY_FLAG (1 << 8)
59#define UHH_SYSCONFIG_MIDLE_MODE_MASK (0x3 << 12)
60#define UHH_SYSCONFIG_MIDLE_MODE_FORCE (0x0 << 12)
61#define UHH_SYSCONFIG_MIDLE_MODE_NO (0x1 << 12)
62#define UHH_SYSCONFIG_MIDLE_MODE_SMART (0x2 << 12)
63
64 const ioport32_t sysstatus;
65#define UHH_SYSSTATUS_RESETDONE_FLAG (1 << 0)
66#define UHH_SYSSTATUS_OHCI_RESETDONE_FLAG (1 << 1)
67#define UHH_SYSSTATUS_EHCI_RESETDONE_FLAG (1 << 2)
68
69 PADD32(10);
70 ioport32_t hostconfig;
71#define UHH_HOSTCONFIG_P1_ULPI_BYPASS_FLAG (1 << 0)
72#define UHH_HOSTCONFIG_AUTOPPD_ON_OVERCUR_EN_FLAG (1 << 1)
73#define UHH_HOSTCONFIG_ENA_INCR4_FLAG (1 << 2)
74#define UHH_HOSTCONFIG_ENA_INCR8_FLAG (1 << 3)
75#define UHH_HOSTCONFIG_ENA_INCR16_FLA (1 << 4)
76#define UHH_HOSTCONFIG_ENA_INCR_ALIGN_FLAG (1 << 5)
77#define UHH_HOSTCONFIG_P1_CONNECT_STATUS_FLAG (1 << 8)
78#define UHH_HOSTCONFIG_P2_CONNECT_STATUS_FLAG (1 << 9)
79#define UHH_HOSTCONFIG_P3_CONNECT_STATUS_FLAG (1 << 10)
80#define UHH_HOSTCONFIG_P2_ULPI_BYPASS_FLAG (1 << 11)
81#define UHH_HOSTCONFIG_P3_ULPI_BYPASS_FLAG (1 << 12)
82
83 ioport32_t debug_csr;
84#define UHH_DEBUG_CSR_EHCI_FLADJ_MASK (0x3f << 0)
85#define UHH_DEBUG_CSR_EHCI_FLADJ(x) ((x) & 0x3f)
86#define UHH_DEBUG_CSR_EHCI_SIMULATION_MODE_FLAG (1 << 6)
87#define UHH_DEBUG_CSR_OHCI_CNTSEL_FLAG (1 << 7)
88#define UHH_DEBUG_CSR_OHCI_GLOBAL_SUSPEND_FLAG (1 << 16)
89#define UHH_DEBUG_CSR_OHCI_CCS1_FLAG (1 << 17)
90#define UHH_DEBUG_CSR_OHCI_CCS2_FLAG (1 << 18)
91#define UHH_DEBUG_CSR_OHCI_CCS3_FLAG (1 << 19)
92
93} uhh_regs_t;
94
95#endif
96/**
97 * @}
98 */
Note: See TracBrowser for help on using the repository browser.