ARM: rmobile: Add PRR CPU ID macros
Replace the ad-hoc values in the PRR CPU ID table with macros, so that users can use rmobile_get_cpu_type() can compare the returned value with these macros to figure out on which CPU they are running. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
		
							parent
							
								
									654f37da64
								
							
						
					
					
						commit
						262e91566f
					
				| 
						 | 
					@ -49,15 +49,15 @@ static const struct {
 | 
				
			||||||
	u16 cpu_type;
 | 
						u16 cpu_type;
 | 
				
			||||||
	u8 cpu_name[10];
 | 
						u8 cpu_name[10];
 | 
				
			||||||
} rmobile_cpuinfo[] = {
 | 
					} rmobile_cpuinfo[] = {
 | 
				
			||||||
	{ 0x37, "SH73A0" },
 | 
						{ RMOBILE_CPU_TYPE_SH73A0, "SH73A0" },
 | 
				
			||||||
	{ 0x40, "R8A7740" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7740, "R8A7740" },
 | 
				
			||||||
	{ 0x45, "R8A7790" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7790, "R8A7790" },
 | 
				
			||||||
	{ 0x47, "R8A7791" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7791, "R8A7791" },
 | 
				
			||||||
	{ 0x4A, "R8A7792" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7792, "R8A7792" },
 | 
				
			||||||
	{ 0x4B, "R8A7793" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7793, "R8A7793" },
 | 
				
			||||||
	{ 0x4C, "R8A7794" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7794, "R8A7794" },
 | 
				
			||||||
	{ 0x4F, "R8A7795" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7795, "R8A7795" },
 | 
				
			||||||
	{ 0x52, "R8A7796" },
 | 
						{ RMOBILE_CPU_TYPE_R8A7796, "R8A7796" },
 | 
				
			||||||
	{ 0x0, "CPU" },
 | 
						{ 0x0, "CPU" },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,6 +23,17 @@
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#endif /* CONFIG_ARCH_RMOBILE */
 | 
					#endif /* CONFIG_ARCH_RMOBILE */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* PRR CPU IDs */
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_SH73A0		0x37
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7740	0x40
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7790	0x45
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7791	0x47
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7792	0x4A
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7793	0x4B
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7794	0x4C
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7795	0x4F
 | 
				
			||||||
 | 
					#define RMOBILE_CPU_TYPE_R8A7796	0x52
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ASSEMBLY__
 | 
					#ifndef __ASSEMBLY__
 | 
				
			||||||
u32 rmobile_get_cpu_type(void);
 | 
					u32 rmobile_get_cpu_type(void);
 | 
				
			||||||
u32 rmobile_get_cpu_rev_integer(void);
 | 
					u32 rmobile_get_cpu_rev_integer(void);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue