~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-ux500/id.h

Version: ~ [ linux-5.4-rc7 ] ~ [ linux-5.3.10 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.83 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.153 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.200 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.200 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.76 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright (C) ST-Ericsson SA 2010
  3  *
  4  * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
  5  * License terms: GNU General Public License (GPL) version 2
  6  */
  7 
  8 #ifndef __MACH_UX500_ID
  9 #define __MACH_UX500_ID
 10 
 11 /**
 12  * struct dbx500_asic_id - fields of the ASIC ID
 13  * @process: the manufacturing process, 0x40 is 40 nm 0x00 is "standard"
 14  * @partnumber: hithereto 0x8500 for DB8500
 15  * @revision: version code in the series
 16  */
 17 struct dbx500_asic_id {
 18         u16     partnumber;
 19         u8      revision;
 20         u8      process;
 21 };
 22 
 23 extern struct dbx500_asic_id dbx500_id;
 24 
 25 static inline unsigned int __attribute_const__ dbx500_partnumber(void)
 26 {
 27         return dbx500_id.partnumber;
 28 }
 29 
 30 static inline unsigned int __attribute_const__ dbx500_revision(void)
 31 {
 32         return dbx500_id.revision;
 33 }
 34 
 35 /*
 36  * SOCs
 37  */
 38 
 39 static inline bool __attribute_const__ cpu_is_u8500(void)
 40 {
 41         return dbx500_partnumber() == 0x8500;
 42 }
 43 
 44 static inline bool __attribute_const__ cpu_is_u8520(void)
 45 {
 46         return dbx500_partnumber() == 0x8520;
 47 }
 48 
 49 static inline bool cpu_is_u8500_family(void)
 50 {
 51         return cpu_is_u8500() || cpu_is_u8520();
 52 }
 53 
 54 static inline bool __attribute_const__ cpu_is_u9540(void)
 55 {
 56         return dbx500_partnumber() == 0x9540;
 57 }
 58 
 59 static inline bool __attribute_const__ cpu_is_u8540(void)
 60 {
 61         return dbx500_partnumber() == 0x8540;
 62 }
 63 
 64 static inline bool __attribute_const__ cpu_is_u8580(void)
 65 {
 66         return dbx500_partnumber() == 0x8580;
 67 }
 68 
 69 static inline bool cpu_is_ux540_family(void)
 70 {
 71         return cpu_is_u9540() || cpu_is_u8540() || cpu_is_u8580();
 72 }
 73 
 74 /*
 75  * 8500 revisions
 76  */
 77 
 78 static inline bool __attribute_const__ cpu_is_u8500ed(void)
 79 {
 80         return cpu_is_u8500() && dbx500_revision() == 0x00;
 81 }
 82 
 83 static inline bool __attribute_const__ cpu_is_u8500v1(void)
 84 {
 85         return cpu_is_u8500() && (dbx500_revision() & 0xf0) == 0xA0;
 86 }
 87 
 88 static inline bool __attribute_const__ cpu_is_u8500v10(void)
 89 {
 90         return cpu_is_u8500() && dbx500_revision() == 0xA0;
 91 }
 92 
 93 static inline bool __attribute_const__ cpu_is_u8500v11(void)
 94 {
 95         return cpu_is_u8500() && dbx500_revision() == 0xA1;
 96 }
 97 
 98 static inline bool __attribute_const__ cpu_is_u8500v2(void)
 99 {
100         return cpu_is_u8500() && ((dbx500_revision() & 0xf0) == 0xB0);
101 }
102 
103 static inline bool cpu_is_u8500v20(void)
104 {
105         return cpu_is_u8500() && (dbx500_revision() == 0xB0);
106 }
107 
108 static inline bool cpu_is_u8500v21(void)
109 {
110         return cpu_is_u8500() && (dbx500_revision() == 0xB1);
111 }
112 
113 static inline bool cpu_is_u8500v22(void)
114 {
115         return cpu_is_u8500() && (dbx500_revision() == 0xB2);
116 }
117 
118 static inline bool cpu_is_u8500v20_or_later(void)
119 {
120         return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11());
121 }
122 
123 /*
124  * 8540 revisions
125  */
126 
127 static inline bool __attribute_const__ cpu_is_u8540v10(void)
128 {
129         return cpu_is_u8540() && dbx500_revision() == 0xA0;
130 }
131 
132 static inline bool __attribute_const__ cpu_is_u8580v10(void)
133 {
134         return cpu_is_u8580() && dbx500_revision() == 0xA0;
135 }
136 
137 static inline bool ux500_is_svp(void)
138 {
139         return false;
140 }
141 
142 #define ux500_unknown_soc()     BUG()
143 
144 #endif
145 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp