X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=board%2Fdavedenx%2Fqong%2Fqong.c;h=ad1694b79fb7d7ef77af0a1014a9c006b731d2b1;hb=3be2bdf5dc69b3142c1162a59bc67191c9077567;hp=c41f11d60c75a4ed1687a5dca0334ac728262680;hpb=0c2dd9a05bdcf3b2b4880509ec690116873fe158;p=karo-tx-uboot.git diff --git a/board/davedenx/qong/qong.c b/board/davedenx/qong/qong.c index c41f11d60c..ad1694b79f 100644 --- a/board/davedenx/qong/qong.c +++ b/board/davedenx/qong/qong.c @@ -2,23 +2,7 @@ * * (c) 2009 Emcraft Systems, Ilya Yanok * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -28,21 +12,15 @@ #include #include #include -#include +#include #include #include #include "qong_fpga.h" #include +#include DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_HW_WATCHDOG -void hw_watchdog_reset(void) -{ - mxc_hw_watchdog_reset(); -} -#endif - int dram_init(void) { /* dram_init must store complete ramsize in gd->ram_size */ @@ -172,17 +150,22 @@ int board_late_init(void) { u32 val; struct pmic *p; + int ret; - pmic_init(); - p = get_pmic(); + ret = pmic_init(I2C_PMIC); + if (ret) + return ret; + p = pmic_get("FSL_PMIC"); + if (!p) + return -ENODEV; /* Enable RTC battery */ pmic_reg_read(p, REG_POWER_CTL0, &val); pmic_reg_write(p, REG_POWER_CTL0, val | COINCHEN); pmic_reg_write(p, REG_INT_STATUS1, RTCRSTI); #ifdef CONFIG_HW_WATCHDOG - mxc_hw_watchdog_enable(); + hw_watchdog_init(); #endif return 0;