Pankaj Gupta | c518de4 | 2020-12-09 14:02:39 +0530 | [diff] [blame] | 1 | /* |
| 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 | |
| 18 | unsigned long get_ddr_freq(struct sysinfo *sys, int ctrl_num); |
| 19 | unsigned int get_memory_clk_ps(unsigned long clk); |
| 20 | unsigned int picos_to_mclk(unsigned long data_rate, unsigned int picos); |
| 21 | unsigned int get_ddrc_version(const struct ccsr_ddr *ddr); |
| 22 | void print_ddr_info(struct ccsr_ddr *ddr); |
| 23 | |
| 24 | #endif |