You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.3 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2014-2020. All rights reserved.
* Description: cpu info
* Author: SmartMedia_BSP
* Create: 2014-06-04
*/
#ifndef CPUINFOH
#define CPUINFOH
#include <stddef.h>
struct cpu_info_t {
char *name;
u32 sysid;
uint64 chipid;
uint64 chipid_mask;
uint32 max_ddr_size;
unsigned int devs;
int (*boot_media)(char **media);
void (*get_clock)(unsigned int *cpu, unsigned int *timer);
int (*get_cpu_version)(char **version);
int (*get_ca_type)(void);
};
struct cpu_info_t *get_cpuinfo(void);
#define BOOT_MEDIA_UNKNOWN (0)
#define BOOT_MEDIA_DDR (1)
#define BOOT_MEDIA_NAND (2)
#define BOOT_MEDIA_SPIFLASH (3)
#define BOOT_MEDIA_SPI_NAND (4)
#define BOOT_MEDIA_EMMC (5)
#define BOOT_MEDIA_SD (6)
#define BOOT_MEDIA_UFS (7)
int get_bootmedia(char **media, const char *arg);
int get_boot_media(void);
uint64 get_chipid(void);
unsigned int get_max_ddr_size(void);
const char *get_cpu_name(void);
unsigned int get_timer_clock(void);
int get_cpuno(void);
int get_ca_type(void);
unsigned int get_ca_vendor(void);
unsigned int get_fbl_version(void);
unsigned int get_fbl_version_mask(void);
#endif /* CPUINFOH */