blob: 2e22ad5c36a986c3d4388db780aa2a8709b34ec5 [file] [log] [blame]
Pankaj Guptac518de42020-12-09 14:02:39 +05301/*
2 * Copyright 2021 NXP
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef UTILITY_H
9#define UTILITY_H
10
11#include <dcfg.h>
12
13#if defined(NXP_HAS_CCN504) || defined(NXP_HAS_CCN508)
14#define CCN_HN_F_SAM_CTL 0x8
15#define CCN_HN_F_REGION_SIZE 0x10000
16#endif
17
18unsigned long get_ddr_freq(struct sysinfo *sys, int ctrl_num);
19unsigned int get_memory_clk_ps(unsigned long clk);
20unsigned int picos_to_mclk(unsigned long data_rate, unsigned int picos);
21unsigned int get_ddrc_version(const struct ccsr_ddr *ddr);
22void print_ddr_info(struct ccsr_ddr *ddr);
23
24#endif