2018-11-16 12:10:55 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Synopsys, Inc. All rights reserved.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-12-12 19:16:36 +08:00
|
|
|
* This module provides routines to initialize and support soc-level hardware
|
2018-11-16 12:10:55 +08:00
|
|
|
* for the IoT Development Kit board.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include <device.h>
|
|
|
|
#include <init.h>
|
|
|
|
#include "sysconf.h"
|
|
|
|
|
|
|
|
static int arc_iot_init(struct device *dev)
|
|
|
|
{
|
|
|
|
ARG_UNUSED(dev);
|
|
|
|
|
|
|
|
if (arc_iot_pll_fout_config(
|
2018-12-12 19:16:36 +08:00
|
|
|
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / 1000000) < 0) {
|
2018-11-16 12:10:55 +08:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
SYS_INIT(arc_iot_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|