3 * Adaptive Body Bias programming sequence for OMAP5 family
6 * Texas Instruments, <www.ti.com>
8 * Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
10 * See file CREDITS for list of people who contributed to this
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of
16 * the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
30 #include <asm/omap_common.h>
34 * Setup LDOVBB for OMAP5.
35 * On OMAP5+ some ABB settings are fused. They are handled
36 * in the following way:
38 * 1. corresponding EFUSE register contains ABB enable bit
40 * 2. If ABB enable bit is set to 1, than ABB should be
41 * enabled, otherwise ABB should be disabled
42 * 3. If ABB is enabled, than VSET value should be copied
43 * to corresponding MUX control register
45 s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb)
50 * ABB parameters must be properly fused
51 * otherwise ABB should be disabled
54 if (!(vset & OMAP5_ABB_FUSE_ENABLE_MASK))
57 /* prepare VSET value for LDOVBB mux register */
58 vset &= OMAP5_ABB_FUSE_VSET_MASK;
59 vset >>= ffs(OMAP5_ABB_FUSE_VSET_MASK) - 1;
60 vset <<= ffs(OMAP5_ABB_LDOVBBMPU_VSET_OUT_MASK) - 1;
61 vset |= OMAP5_ABB_LDOVBBMPU_MUX_CTRL_MASK;
63 /* setup LDOVBB using fused value */
64 clrsetbits_le32(ldovbb, OMAP5_ABB_LDOVBBMPU_VSET_OUT_MASK, vset);