source: mainline/uspace/drv/infrastructure/rootamdm37x/uhh.h@ 2e842f2

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 2e842f2 was 2e842f2, checked in by Jan Vesely <jano.vesely@…>, 12 years ago

typo

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[063ae706]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 amdm37xdrvuhh
30 * @{
31 */
32/** @file
33 * @brief UHH IO register structure.
34 */
35#ifndef AMDM37x_UHH_H
36#define AMDM37x_UHH_H
[a5a73c0]37#include <macros.h>
[063ae706]38#include <sys/types.h>
39
40#define AMDM37x_UHH_BASE_ADDRESS 0x48064000
41#define AMDM37x_UHH_SIZE 1024
42
43typedef struct {
44 const ioport32_t revision;
[52fc805]45#define UHH_REVISION_MINOR_MASK 0x0f
46#define UHH_REVISION_MAJOR_MASK 0xf0
[063ae706]47
[a5a73c0]48 PADD32[3];
[063ae706]49 ioport32_t sysconfig;
50#define UHH_SYSCONFIG_AUTOIDLE_FLAG (1 << 0)
51#define UHH_SYSCONFIG_SOFTRESET_FLAG (1 << 1)
52#define UHH_SYSCONFIG_ENWAKEUP_FLAG (1 << 2)
[52fc805]53#define UHH_SYSCONFIG_SIDLE_MODE_MASK (0x3 << 3)
54#define UHH_SYSCONFIG_SIDLE_MODE_FORCE (0x0 << 3)
55#define UHH_SYSCONFIG_SIDLE_MODE_NO (0x1 << 3)
56#define UHH_SYSCONFIG_SIDLE_MODE_SMART (0x2 << 3)
[063ae706]57#define UHH_SYSCONFIG_CLOCKACTIVITY_FLAG (1 << 8)
[52fc805]58#define UHH_SYSCONFIG_MIDLE_MODE_MASK (0x3 << 12)
59#define UHH_SYSCONFIG_MIDLE_MODE_FORCE (0x0 << 12)
60#define UHH_SYSCONFIG_MIDLE_MODE_NO (0x1 << 12)
61#define UHH_SYSCONFIG_MIDLE_MODE_SMART (0x2 << 12)
[063ae706]62
63 const ioport32_t sysstatus;
64#define UHH_SYSSTATUS_RESETDONE_FLAG (1 << 0)
65#define UHH_SYSSTATUS_OHCI_RESETDONE_FLAG (1 << 1)
66#define UHH_SYSSTATUS_EHCI_RESETDONE_FLAG (1 << 2)
67
[a5a73c0]68 PADD32[10];
[063ae706]69 ioport32_t hostconfig;
70#define UHH_HOSTCONFIG_P1_ULPI_BYPASS_FLAG (1 << 0)
71#define UHH_HOSTCONFIG_AUTOPPD_ON_OVERCUR_EN_FLAG (1 << 1)
72#define UHH_HOSTCONFIG_ENA_INCR4_FLAG (1 << 2)
73#define UHH_HOSTCONFIG_ENA_INCR8_FLAG (1 << 3)
74#define UHH_HOSTCONFIG_ENA_INCR16_FLA (1 << 4)
75#define UHH_HOSTCONFIG_ENA_INCR_ALIGN_FLAG (1 << 5)
76#define UHH_HOSTCONFIG_P1_CONNECT_STATUS_FLAG (1 << 8)
77#define UHH_HOSTCONFIG_P2_CONNECT_STATUS_FLAG (1 << 9)
78#define UHH_HOSTCONFIG_P3_CONNECT_STATUS_FLAG (1 << 10)
79#define UHH_HOSTCONFIG_P2_ULPI_BYPASS_FLAG (1 << 11)
80#define UHH_HOSTCONFIG_P3_ULPI_BYPASS_FLAG (1 << 12)
81
82 ioport32_t debug_csr;
[52fc805]83#define UHH_DEBUG_CSR_EHCI_FLADJ_MASK (0x3f << 0)
84#define UHH_DEBUG_CSR_EHCI_FLADJ(x) ((x) & 0x3f)
[063ae706]85#define UHH_DEBUG_CSR_EHCI_SIMULATION_MODE_FLAG (1 << 6)
86#define UHH_DEBUG_CSR_OHCI_CNTSEL_FLAG (1 << 7)
[2e842f2]87#define UHH_DEBUG_CSR_OHCI_GLOBAL_SUSPEND_FLAG (1 << 16)
[063ae706]88#define UHH_DEBUG_CSR_OHCI_CCS1_FLAG (1 << 17)
89#define UHH_DEBUG_CSR_OHCI_CCS2_FLAG (1 << 18)
90#define UHH_DEBUG_CSR_OHCI_CCS3_FLAG (1 << 19)
91
92} uhh_regs_t;
93
94#endif
95/**
96 * @}
97 */
Note: See TracBrowser for help on using the repository browser.