mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 22:03:15 +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>
61 lines
1.3 KiB
C
61 lines
1.3 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2013-2014 Panasonic Corporation
|
|
* Copyright (C) 2015-2016 Socionext Inc.
|
|
*/
|
|
|
|
#include <linux/delay.h>
|
|
#include <linux/io.h>
|
|
|
|
#include "../init.h"
|
|
#include "../sc-regs.h"
|
|
|
|
int uniphier_sld8_dpll_init(const struct uniphier_board_data *bd)
|
|
{
|
|
u32 tmp;
|
|
/*
|
|
* Set DPLL SSC parameters for DPLLCTRL3
|
|
* [23] DIVN_TEST 0x1
|
|
* [22:16] DIVN 0x50
|
|
* [10] FREFSEL_TEST 0x1
|
|
* [9:8] FREFSEL 0x2
|
|
* [4] ICPD_TEST 0x1
|
|
* [3:0] ICPD 0xb
|
|
*/
|
|
tmp = readl(SC_DPLLCTRL3);
|
|
tmp &= ~0x00ff0717;
|
|
tmp |= 0x00d0061b;
|
|
writel(tmp, SC_DPLLCTRL3);
|
|
|
|
/*
|
|
* Set DPLL SSC parameters for DPLLCTRL
|
|
* <-1%> <-2%>
|
|
* [29:20] SSC_UPCNT 132 (0x084) 132 (0x084)
|
|
* [14:0] SSC_dK 6335(0x18bf) 12710(0x31a6)
|
|
*/
|
|
tmp = readl(SC_DPLLCTRL);
|
|
tmp &= ~0x3ff07fff;
|
|
#ifdef DPLL_SSC_RATE_1PER
|
|
tmp |= 0x084018bf;
|
|
#else
|
|
tmp |= 0x084031a6;
|
|
#endif
|
|
writel(tmp, SC_DPLLCTRL);
|
|
|
|
/*
|
|
* Set DPLL SSC parameters for DPLLCTRL2
|
|
* [31:29] SSC_STEP 0
|
|
* [27] SSC_REG_REF 1
|
|
* [26:20] SSC_M 79 (0x4f)
|
|
* [19:0] SSC_K 964689 (0xeb851)
|
|
*/
|
|
tmp = readl(SC_DPLLCTRL2);
|
|
tmp &= ~0xefffffff;
|
|
tmp |= 0x0cfeb851;
|
|
writel(tmp, SC_DPLLCTRL2);
|
|
|
|
/* Wait 500 usec until dpll gets stable */
|
|
udelay(500);
|
|
|
|
return 0;
|
|
}
|