mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
7c7ce3600a
The new common rockchip pinctrl driver does not support explicit requests for a particular pinctrl function. As a result, the board_init() function bails out early before enabling the boot-on regulators. Fix this by simply removing the request for pwm0, pwm2 and pwm3. The generic DM code already does the necessary configuration if necessary. Reported-by: Levin Du <djw@t-chip.com.cn> Signed-of-by: Mark Kettenis <kettenis@openbsd.org>
35 lines
694 B
C
35 lines
694 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2016 Rockchip Electronics Co., Ltd
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <dm/pinctrl.h>
|
|
#include <asm/arch-rockchip/periph.h>
|
|
#include <power/regulator.h>
|
|
|
|
int board_init(void)
|
|
{
|
|
struct udevice *regulator;
|
|
int ret;
|
|
|
|
ret = regulators_enable_boot_on(false);
|
|
if (ret)
|
|
debug("%s: Cannot enable boot on regulator\n", __func__);
|
|
|
|
ret = regulator_get_by_platname("vcc5v0_host", ®ulator);
|
|
if (ret) {
|
|
debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret);
|
|
goto out;
|
|
}
|
|
|
|
ret = regulator_set_enable(regulator, true);
|
|
if (ret) {
|
|
debug("%s vcc5v0-host-en set fail!\n", __func__);
|
|
goto out;
|
|
}
|
|
|
|
out:
|
|
return 0;
|
|
}
|