• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7800-V1.0.2.28/target/linux/generic/files/crypto/ocf/kirkwood/mvHal/kw_family/ctrlEnv/sys/
1
2/*******************************************************************************
3Copyright (C) Marvell International Ltd. and its affiliates
4
5This software file (the "File") is owned and distributed by Marvell
6International Ltd. and/or its affiliates ("Marvell") under the following
7alternative licensing terms.  Once you have made an election to distribute the
8File under one of the following license alternatives, please (i) delete this
9introductory statement regarding license alternatives, (ii) delete the two
10license alternatives that you have not elected to use and (iii) preserve the
11Marvell copyright notice above.
12
13********************************************************************************
14Marvell Commercial License Option
15
16If you received this File from Marvell and you have entered into a commercial
17license agreement (a "Commercial License") with Marvell, the File is licensed
18to you under the terms of the applicable Commercial License.
19
20********************************************************************************
21Marvell GPL License Option
22
23If you received this File from Marvell, you may opt to use, redistribute and/or
24modify this File in accordance with the terms and conditions of the General
25Public License Version 2, June 1991 (the "GPL License"), a copy of which is
26available along with the File in the license.txt file or by writing to the Free
27Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or
28on the worldwide web at http://www.gnu.org/licenses/gpl.txt.
29
30THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED
31WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY
32DISCLAIMED.  The GPL License provides additional details about this warranty
33disclaimer.
34********************************************************************************
35Marvell BSD License Option
36
37If you received this File from Marvell, you may opt to use, redistribute and/or
38modify this File under the following licensing terms.
39Redistribution and use in source and binary forms, with or without modification,
40are permitted provided that the following conditions are met:
41
42    *   Redistributions of source code must retain the above copyright notice,
43	    this list of conditions and the following disclaimer.
44
45    *   Redistributions in binary form must reproduce the above copyright
46        notice, this list of conditions and the following disclaimer in the
47        documentation and/or other materials provided with the distribution.
48
49    *   Neither the name of Marvell nor the names of its contributors may be
50        used to endorse or promote products derived from this software without
51        specific prior written permission.
52
53THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
54ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
55WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
56DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
57ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
58(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
59LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
60ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
61(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
62SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63
64*******************************************************************************/
65#ifndef __INCMVSysSdmmcAddrDech
66#define __INCMVSysSdmmcAddrDech
67
68#include "mvCommon.h"
69#include "ctrlEnv/mvCtrlEnvLib.h"
70#include "ctrlEnv/sys/mvCpuIf.h"
71
72
73#ifdef __cplusplus
74extern "C" {
75#endif
76
77typedef struct _mvSdmmcDecWin
78{
79    MV_TARGET     target;
80    MV_ADDR_WIN   addrWin;    /* An address window*/
81    MV_BOOL       enable;     /* Address decode window is enabled/disabled    */
82
83} MV_SDMMC_DEC_WIN;
84
85
86#define MV_SDMMC_MAX_ADDR_DECODE_WIN 4
87
88#define MV_SDMMC_WIN_CTRL_REG(dev, win)        (MV_SDIO_REG_BASE + 0x108 + ((win)<<3))
89#define MV_SDMMC_WIN_BASE_REG(dev, win)        (MV_SDIO_REG_BASE + 0x10c + ((win)<<3))
90
91
92/* BITs in Windows 0-3 Control and Base Registers */
93#define MV_SDMMC_WIN_ENABLE_BIT               0
94#define MV_SDMMC_WIN_ENABLE_MASK              (1<<MV_SDMMC_WIN_ENABLE_BIT)
95
96#define MV_SDMMC_WIN_TARGET_OFFSET            4
97#define MV_SDMMC_WIN_TARGET_MASK              (0xF<<MV_SDMMC_WIN_TARGET_OFFSET)
98
99#define MV_SDMMC_WIN_ATTR_OFFSET              8
100#define MV_SDMMC_WIN_ATTR_MASK                (0xFF<<MV_SDMMC_WIN_ATTR_OFFSET)
101
102#define MV_SDMMC_WIN_SIZE_OFFSET              16
103#define MV_SDMMC_WIN_SIZE_MASK                (0xFFFF<<MV_SDMMC_WIN_SIZE_OFFSET)
104
105#define MV_SDMMC_WIN_BASE_OFFSET              16
106#define MV_SDMMC_WIN_BASE_MASK                (0xFFFF<<MV_SDMMC_WIN_BASE_OFFSET)
107
108MV_STATUS mvSdmmcWinGet(int dev, MV_U32 winNum, MV_SDMMC_DEC_WIN *pAddrDecWin);
109MV_STATUS mvSdmmcWinSet(int dev, MV_U32 winNum, MV_SDMMC_DEC_WIN *pAddrDecWin);
110MV_STATUS mvSdmmcWinByTargetGet(MV_TARGET target, MV_SDMMC_DEC_WIN *pAddrDecWin);
111MV_STATUS mvSdmmcWinInit(MV_VOID);
112MV_VOID   mvSdmmcAddrDecShow(MV_VOID);
113
114
115#ifdef __cplusplus
116}
117#endif
118
119
120#endif
121
122
123
124
125
126