[RAMEN9610-21536]f2fs: avoid wrong decrypted data from disk
[GitHub/MotorolaMobilityLLC/kernel-slsi.git] / drivers / bts / cal_bts.h
1 /* arch/arm/mach-exynos/cal_bts.h
2 *
3 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * EXYNOS - BTS CAL code.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13 #ifndef __BTSCAL_H__
14 #define __BTSCAL_H__
15
16 #if defined(CONFIG_EXYNOS7420_BTS)
17 #include <linux/io.h>
18
19 #define Outp32(addr, data) (__raw_writel(data, addr))
20 #define Inp32(addr) (__raw_readl(addr))
21 typedef void __iomem *addr_u32;
22
23 #else
24 typedef unsigned long u32;
25 typedef unsigned long addr_u32;
26 #define Outp32(addr, data) (*(volatile unsigned int *)(addr) = (data))
27 #define Inp32(addr) (*(volatile unsigned int *)(addr))
28
29 #endif
30
31 /* for BTS V2.1 Register */
32 #define BTS_RCON 0x100
33 #define BTS_RMODE 0x104
34 #define BTS_WCON 0x180
35 #define BTS_WMODE 0x184
36 #define BTS_PRIORITY 0x200
37 #define BTS_TOKENMAX 0x204
38 #define BTS_BWUPBOUND 0x20C
39 #define BTS_BWLOBOUND 0x210
40 #define BTS_INITTKN 0x214
41 #define BTS_RSTCLK 0x218
42 #define BTS_RSTTKN 0x21C
43 #define BTS_DEMWIN 0x220
44 #define BTS_DEMTKN 0x224
45 #define BTS_DEFWIN 0x228
46 #define BTS_DEFTKN 0x22C
47 #define BTS_PRMWIN 0x230
48 #define BTS_PRMTKN 0x234
49 #define BTS_MOUPBOUND 0x240
50 #define BTS_MOLOBOUND 0x244
51 #define BTS_FLEXIBLE 0x280
52 #define BTS_POLARITY 0x284
53 #define BTS_FBMGRP0ADRS 0x290
54 #define BTS_FBMGRP0ADRE 0x294
55 #define BTS_FBMGRP1ADRS 0x298
56 #define BTS_FBMGRP1ADRE 0x29C
57 #define BTS_FBMGRP2ADRS 0x2A0
58 #define BTS_FBMGRP2ADRE 0x2A4
59 #define BTS_FBMGRP3ADRS 0x2A8
60 #define BTS_FBMGRP3ADRE 0x2AC
61 #define BTS_FBMGRP4ADRS 0x2B0
62 #define BTS_FBMGRP4ADRE 0x2B4
63 #define BTS_EMERGENTRID 0x2C0
64 #define BTS_EMERGENTWID 0x3C0
65 #define BTS_RISINGTH 0x2C4
66 #define BTS_FALLINGTH 0x2C8
67 #define BTS_FALLINGMO 0x2CC
68 #define BTS_MOCOUNTER 0x2F0
69 #define BTS_STATUS 0x2F4
70 #define BTS_BWMONLOW 0x2F8
71 #define BTS_BWMONUP 0x2FC
72
73 #define WOFFSET 0x100
74
75 /* for TREX_BTS Register */
76 #define TBTS_CON 0x000
77 #define TBTS_TKNUPBOUND 0x010
78 #define TBTS_TKNLOBOUND 0x014
79 #define TBTS_LOADUP 0x020
80 #define TBTS_LOADDOWN 0x024
81 #define TBTS_TKNINC0 0x040
82 #define TBTS_TKNINC1 0x044
83 #define TBTS_TKNINC2 0x048
84 #define TBTS_TKNINC3 0x04C
85 #define TBTS_TKNINC4 0x050
86 #define TBTS_TKNINC5 0x054
87 #define TBTS_TKNINC6 0x058
88 #define TBTS_TKNINC7 0x05C
89 #define TBTS_DEMTH 0x070
90 #define TBTS_PRMTH 0x074
91 #define TBTS_DEMQOS 0x080
92 #define TBTS_DEFQOS 0x084
93 #define TBTS_PRMQOS 0x088
94 #define TBTS_TIMEOUT 0x090
95 #define TBTS_QURGUPTH 0x0D0
96 #define TBTS_QURGDOWNTH 0x0D4
97 #define TBTS_SELIDMASK 0x0E0
98 #define TBTS_SELIDVAL 0x0E4
99 #define TBTS_RCON 0x100
100 #define TBTS_RTKNINIT 0x110
101 #define TBTS_RTKNDEC 0x120
102 #define TBTS_WCON 0x200
103 #define TBTS_WTKNINIT 0x210
104 #define TBTS_WTKNDEC 0x220
105 #define TBTS_EMERGENTID 0x2014
106 #define TBTS_MASK 0x2010
107
108 #define MAX_MO_LIMIT 0x80
109
110 void bts_setqos(addr_u32 base, unsigned int priority);
111 void bts_setqos_bw(addr_u32 base, unsigned int priority,
112 unsigned int window, unsigned int token);
113 void bts_setqos_mo(addr_u32 base, unsigned int priority,
114 unsigned int rmo, unsigned int wmo);
115 void bts_setqos_fbmbw(addr_u32 base, unsigned int priority, unsigned int window,
116 unsigned int token, unsigned int fbm);
117 void bts_disable(addr_u32 base);
118 void bts_settrexqos(addr_u32 base, unsigned int priority);
119 void bts_settrexqos_mo(addr_u32 base, unsigned int priority, unsigned int mo);
120 void bts_settrexqos_bw(addr_u32 base, unsigned int priority, unsigned int decval);
121 void bts_settrexqos_fbmbw(addr_u32 base, unsigned int priority);
122 void bts_trexdisable(addr_u32 base);
123 void bts_setnsp(addr_u32 base, unsigned int nsp);
124
125 #endif