blob: 6f2c1fc91429d1763d319c9299859ea58df43505 [file] [log] [blame]
Eugen Hristev3263e742020-08-27 11:51:52 +03001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2020 Microchip Technology, Inc.
4 * Eugen Hristev <eugen.hristev@microchip.com>
5 */
6
Mihai Sain3e357d12022-12-02 09:47:19 +02007#include <asm/arch/sama7g5.h>
8
Eugen Hristev3263e742020-08-27 11:51:52 +03009char *get_cpu_name(void)
10{
Mihai Sain3e357d12022-12-02 09:47:19 +020011 unsigned int extension_id = get_extension_chip_id();
12
13 if (cpu_is_sama7g5())
14 switch (extension_id) {
15 case ARCH_EXID_SAMA7G51:
16 return "SAMA7G51";
17 case ARCH_EXID_SAMA7G52:
18 return "SAMA7G52";
19 case ARCH_EXID_SAMA7G53:
20 return "SAMA7G53";
21 case ARCH_EXID_SAMA7G54:
22 return "SAMA7G54";
23 case ARCH_EXID_SAMA7G54_D1G:
24 return "SAMA7G54 1Gb DDR3L SiP";
25 case ARCH_EXID_SAMA7G54_D2G:
26 return "SAMA7G54 2Gb DDR3L SiP";
27 case ARCH_EXID_SAMA7G54_D4G:
28 return "SAMA7G54 4Gb DDR3L SiP";
29 default:
30 return "Unknown CPU type";
31 }
32 else
33 return "Unknown CPU type";
Eugen Hristev3263e742020-08-27 11:51:52 +030034}