mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-12 07:57:21 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
56 lines
1.4 KiB
C
56 lines
1.4 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Adaptive Body Bias programming sequence for OMAP5 family
|
|
*
|
|
* (C) Copyright 2013
|
|
* Texas Instruments, <www.ti.com>
|
|
*
|
|
* Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/omap_common.h>
|
|
#include <asm/io.h>
|
|
|
|
/*
|
|
* Setup LDOVBB for OMAP5.
|
|
* On OMAP5+ some ABB settings are fused. They are handled
|
|
* in the following way:
|
|
*
|
|
* 1. corresponding EFUSE register contains ABB enable bit
|
|
* and VSET value
|
|
* 2. If ABB enable bit is set to 1, than ABB should be
|
|
* enabled, otherwise ABB should be disabled
|
|
* 3. If ABB is enabled, than VSET value should be copied
|
|
* to corresponding MUX control register
|
|
*/
|
|
s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb)
|
|
{
|
|
u32 vset;
|
|
u32 fuse_enable_mask = OMAP5_PROD_ABB_FUSE_ENABLE_MASK;
|
|
u32 fuse_vset_mask = OMAP5_PROD_ABB_FUSE_VSET_MASK;
|
|
|
|
if (!is_omap54xx()) {
|
|
/* DRA7 */
|
|
fuse_enable_mask = DRA7_ABB_FUSE_ENABLE_MASK;
|
|
fuse_vset_mask = DRA7_ABB_FUSE_VSET_MASK;
|
|
}
|
|
/*
|
|
* ABB parameters must be properly fused
|
|
* otherwise ABB should be disabled
|
|
*/
|
|
vset = readl(fuse);
|
|
if (!(vset & fuse_enable_mask))
|
|
return -1;
|
|
|
|
/* prepare VSET value for LDOVBB mux register */
|
|
vset &= fuse_vset_mask;
|
|
vset >>= ffs(fuse_vset_mask) - 1;
|
|
vset <<= ffs(OMAP5_ABB_LDOVBBMPU_VSET_OUT_MASK) - 1;
|
|
vset |= OMAP5_ABB_LDOVBBMPU_MUX_CTRL_MASK;
|
|
|
|
/* setup LDOVBB using fused value */
|
|
clrsetbits_le32(ldovbb, OMAP5_ABB_LDOVBBMPU_VSET_OUT_MASK, vset);
|
|
|
|
return 0;
|
|
}
|