Linux Audio

Check our new training course

Loading...
v6.13.7
  1/* SPDX-License-Identifier: GPL-2.0-or-later */
  2/*
  3 * OMAP cpu type detection
  4 *
  5 * Copyright (C) 2004, 2008 Nokia Corporation
  6 *
  7 * Copyright (C) 2009-11 Texas Instruments.
  8 *
  9 * Written by Tony Lindgren <tony.lindgren@nokia.com>
 10 *
 11 * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com>
 12 * Added DRA7xxx specific defines - Sricharan R<r.sricharan@ti.com>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 13 */
 14
 15#include "omap24xx.h"
 16#include "omap34xx.h"
 17#include "omap44xx.h"
 18#include "ti81xx.h"
 19#include "am33xx.h"
 20#include "omap54xx.h"
 21
 22#ifndef __ASSEMBLY__
 23
 24#include <linux/bitops.h>
 25#include <linux/of.h>
 26
 27/*
 28 * OMAP2+ is always defined as ARCH_MULTIPLATFORM in Kconfig
 29 */
 30#undef MULTI_OMAP2
 
 
 
 31#define MULTI_OMAP2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 32
 33/*
 34 * Omap device type i.e. EMU/HS/TST/GP/BAD
 35 */
 36#define OMAP2_DEVICE_TYPE_TEST		0
 37#define OMAP2_DEVICE_TYPE_EMU		1
 38#define OMAP2_DEVICE_TYPE_SEC		2
 39#define OMAP2_DEVICE_TYPE_GP		3
 40#define OMAP2_DEVICE_TYPE_BAD		4
 41
 42int omap_type(void);
 43
 44/*
 45 * omap_rev bits:
 46 * SoC id bits	(0730, 1510, 1710, 2422...)	[31:16]
 47 * SoC revision	(See _REV_ defined in cpu.h)	[15:08]
 48 * SoC class bits (15xx, 16xx, 24xx, 34xx...)	[07:00]
 49 */
 50unsigned int omap_rev(void);
 51
 52static inline int soc_is_omap(void)
 53{
 54	return omap_rev() != 0;
 55}
 56
 57/*
 58 * Get the SoC revision for OMAP devices
 59 */
 60#define GET_OMAP_REVISION()	((omap_rev() >> 8) & 0xff)
 61
 62/*
 63 * Macros to group OMAP into cpu classes.
 64 * These can be used in most places.
 65 * soc_is_omap24xx():	True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
 66 * soc_is_omap242x():	True for OMAP2420, OMAP2422, OMAP2423
 67 * soc_is_omap243x():	True for OMAP2430
 68 * soc_is_omap343x():	True for OMAP3430
 69 * soc_is_omap443x():	True for OMAP4430
 70 * soc_is_omap446x():	True for OMAP4460
 71 * soc_is_omap447x():	True for OMAP4470
 72 * soc_is_omap543x():	True for OMAP5430, OMAP5432
 73 */
 74#define GET_OMAP_CLASS	(omap_rev() & 0xff)
 75
 76#define IS_OMAP_CLASS(class, id)			\
 77static inline int is_omap ##class (void)		\
 78{							\
 79	return (GET_OMAP_CLASS == (id)) ? 1 : 0;	\
 80}
 81
 82#define GET_AM_CLASS	((omap_rev() >> 24) & 0xff)
 83
 84#define IS_AM_CLASS(class, id)				\
 85static inline int is_am ##class (void)			\
 86{							\
 87	return (GET_AM_CLASS == (id)) ? 1 : 0;		\
 88}
 89
 90#define GET_TI_CLASS	((omap_rev() >> 24) & 0xff)
 91
 92#define IS_TI_CLASS(class, id)			\
 93static inline int is_ti ##class (void)		\
 94{							\
 95	return (GET_TI_CLASS == (id)) ? 1 : 0;	\
 96}
 97
 98#define GET_DRA_CLASS	((omap_rev() >> 24) & 0xff)
 99
100#define IS_DRA_CLASS(class, id)				\
101static inline int is_dra ##class (void)			\
102{							\
103	return (GET_DRA_CLASS == (id)) ? 1 : 0;		\
104}
105
106#define GET_OMAP_SUBCLASS	((omap_rev() >> 20) & 0x0fff)
107
108#define IS_OMAP_SUBCLASS(subclass, id)			\
109static inline int is_omap ##subclass (void)		\
110{							\
111	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
112}
113
114#define IS_TI_SUBCLASS(subclass, id)			\
115static inline int is_ti ##subclass (void)		\
116{							\
117	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
118}
119
120#define IS_AM_SUBCLASS(subclass, id)			\
121static inline int is_am ##subclass (void)		\
122{							\
123	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
124}
125
126#define IS_DRA_SUBCLASS(subclass, id)			\
127static inline int is_dra ##subclass (void)		\
128{							\
129	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
130}
131
132#define GET_DRA_PACKAGE		(omap_rev() & 0xff)
133
134#define IS_DRA_SUBCLASS_PACKAGE(subclass, package, id)			\
135static inline int is_dra ##subclass ##_ ##package (void)		\
136{									\
137	return (is_dra ##subclass () && GET_DRA_PACKAGE == id) ? 1 : 0;	\
138}
139
140IS_OMAP_CLASS(24xx, 0x24)
141IS_OMAP_CLASS(34xx, 0x34)
142IS_OMAP_CLASS(44xx, 0x44)
143IS_AM_CLASS(35xx, 0x35)
144IS_OMAP_CLASS(54xx, 0x54)
145IS_AM_CLASS(33xx, 0x33)
146IS_AM_CLASS(43xx, 0x43)
147
148IS_TI_CLASS(81xx, 0x81)
149IS_DRA_CLASS(7xx, 0x7)
150
151IS_OMAP_SUBCLASS(242x, 0x242)
152IS_OMAP_SUBCLASS(243x, 0x243)
153IS_OMAP_SUBCLASS(343x, 0x343)
154IS_OMAP_SUBCLASS(363x, 0x363)
155IS_OMAP_SUBCLASS(443x, 0x443)
156IS_OMAP_SUBCLASS(446x, 0x446)
157IS_OMAP_SUBCLASS(447x, 0x447)
158IS_OMAP_SUBCLASS(543x, 0x543)
159
160IS_TI_SUBCLASS(816x, 0x816)
161IS_TI_SUBCLASS(814x, 0x814)
162IS_AM_SUBCLASS(335x, 0x335)
163IS_AM_SUBCLASS(437x, 0x437)
164IS_DRA_SUBCLASS(76x, 0x76)
165IS_DRA_SUBCLASS_PACKAGE(76x, abz, 2)
166IS_DRA_SUBCLASS_PACKAGE(76x, acd, 3)
167IS_DRA_SUBCLASS(75x, 0x75)
168IS_DRA_SUBCLASS(72x, 0x72)
169
 
 
 
 
 
170#define soc_is_ti81xx()			0
171#define soc_is_ti816x()			0
172#define soc_is_ti814x()			0
173#define soc_is_am35xx()			0
174#define soc_is_am33xx()			0
175#define soc_is_am335x()			0
176#define soc_is_am43xx()			0
177#define soc_is_am437x()			0
178#define soc_is_omap44xx()		0
179#define soc_is_omap443x()		0
180#define soc_is_omap446x()		0
181#define soc_is_omap447x()		0
182#define soc_is_omap54xx()		0
183#define soc_is_omap543x()		0
184#define soc_is_dra7xx()			0
185#define soc_is_dra76x()			0
186#define soc_is_dra74x()			0
187#define soc_is_dra72x()			0
188
189#if defined(CONFIG_ARCH_OMAP2)
190# define soc_is_omap24xx()		is_omap24xx()
191#else
192# define soc_is_omap24xx()		0
193#endif
194#if defined(CONFIG_SOC_OMAP2420)
195# define soc_is_omap242x()		is_omap242x()
196#else
197# define soc_is_omap242x()		0
198#endif
199#if defined(CONFIG_SOC_OMAP2430)
200# define soc_is_omap243x()		is_omap243x()
201#else
202# define soc_is_omap243x()		0
203#endif
204#if defined(CONFIG_ARCH_OMAP3)
205# define soc_is_omap34xx()		is_omap34xx()
206# define soc_is_omap343x()		is_omap343x()
 
207#else
208# define soc_is_omap34xx()		0
209# define soc_is_omap343x()		0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210#endif
211
212/*
213 * Macros to detect individual cpu types.
214 * These are only rarely needed.
215 * soc_is_omap2420():	True for OMAP2420
216 * soc_is_omap2422():	True for OMAP2422
217 * soc_is_omap2423():	True for OMAP2423
218 * soc_is_omap2430():	True for OMAP2430
219 * soc_is_omap3430():	True for OMAP3430
220 */
221#define GET_OMAP_TYPE	((omap_rev() >> 16) & 0xffff)
222
223#define IS_OMAP_TYPE(type, id)				\
224static inline int is_omap ##type (void)			\
225{							\
226	return (GET_OMAP_TYPE == (id)) ? 1 : 0;		\
227}
228
229IS_OMAP_TYPE(2420, 0x2420)
230IS_OMAP_TYPE(2422, 0x2422)
231IS_OMAP_TYPE(2423, 0x2423)
232IS_OMAP_TYPE(2430, 0x2430)
233IS_OMAP_TYPE(3430, 0x3430)
234
235#define soc_is_omap2420()		0
236#define soc_is_omap2422()		0
237#define soc_is_omap2423()		0
238#define soc_is_omap2430()		0
239#define soc_is_omap3430()		0
240#define soc_is_omap3630()		0
241#define soc_is_omap5430()		0
242
243/* These are needed for the common code */
 
244#define soc_is_omap7xx()		0
245#define soc_is_omap15xx()		0
246#define soc_is_omap16xx()		0
247#define soc_is_omap1510()		0
248#define soc_is_omap1610()		0
249#define soc_is_omap1611()		0
250#define soc_is_omap1621()		0
251#define soc_is_omap1710()		0
252#define cpu_class_is_omap1()		0
253#define cpu_class_is_omap2()		1
 
254
255#if defined(CONFIG_ARCH_OMAP2)
256# undef  soc_is_omap2420
257# undef  soc_is_omap2422
258# undef  soc_is_omap2423
259# undef  soc_is_omap2430
260# define soc_is_omap2420()		is_omap2420()
261# define soc_is_omap2422()		is_omap2422()
262# define soc_is_omap2423()		is_omap2423()
263# define soc_is_omap2430()		is_omap2430()
264#endif
265
266#if defined(CONFIG_ARCH_OMAP3)
267# undef soc_is_omap3430
268# undef soc_is_ti81xx
269# undef soc_is_ti816x
270# undef soc_is_ti814x
271# undef soc_is_am35xx
272# define soc_is_omap3430()		is_omap3430()
273# undef soc_is_omap3630
274# define soc_is_omap3630()		is_omap363x()
275# define soc_is_ti81xx()		is_ti81xx()
276# define soc_is_ti816x()		is_ti816x()
277# define soc_is_ti814x()		is_ti814x()
278# define soc_is_am35xx()		is_am35xx()
279#endif
280
281# if defined(CONFIG_SOC_AM33XX)
282# undef soc_is_am33xx
283# undef soc_is_am335x
284# define soc_is_am33xx()		is_am33xx()
285# define soc_is_am335x()		is_am335x()
286#endif
287
288#ifdef	CONFIG_SOC_AM43XX
289# undef soc_is_am43xx
290# undef soc_is_am437x
291# define soc_is_am43xx()		is_am43xx()
292# define soc_is_am437x()		is_am437x()
293#endif
294
295# if defined(CONFIG_ARCH_OMAP4)
296# undef soc_is_omap44xx
297# undef soc_is_omap443x
298# undef soc_is_omap446x
299# undef soc_is_omap447x
300# define soc_is_omap44xx()		is_omap44xx()
301# define soc_is_omap443x()		is_omap443x()
302# define soc_is_omap446x()		is_omap446x()
303# define soc_is_omap447x()		is_omap447x()
304# endif
305
306# if defined(CONFIG_SOC_OMAP5)
307# undef soc_is_omap54xx
308# undef soc_is_omap543x
309# define soc_is_omap54xx()		is_omap54xx()
310# define soc_is_omap543x()		is_omap543x()
311#endif
312
313#if defined(CONFIG_SOC_DRA7XX)
314#undef soc_is_dra7xx
315#undef soc_is_dra76x
316#undef soc_is_dra76x_abz
317#undef soc_is_dra76x_acd
318#undef soc_is_dra74x
319#undef soc_is_dra72x
320#define soc_is_dra7xx()	is_dra7xx()
321#define soc_is_dra76x()	is_dra76x()
322#define soc_is_dra76x_abz()	is_dra76x_abz()
323#define soc_is_dra76x_acd()	is_dra76x_acd()
324#define soc_is_dra74x()	is_dra75x()
325#define soc_is_dra72x()	is_dra72x()
326#endif
327
328/* Various silicon revisions for omap2 */
329#define OMAP242X_CLASS		0x24200024
330#define OMAP2420_REV_ES1_0	OMAP242X_CLASS
331#define OMAP2420_REV_ES2_0	(OMAP242X_CLASS | (0x1 << 8))
332
333#define OMAP243X_CLASS		0x24300024
334#define OMAP2430_REV_ES1_0	OMAP243X_CLASS
335
336#define OMAP343X_CLASS		0x34300034
337#define OMAP3430_REV_ES1_0	OMAP343X_CLASS
338#define OMAP3430_REV_ES2_0	(OMAP343X_CLASS | (0x1 << 8))
339#define OMAP3430_REV_ES2_1	(OMAP343X_CLASS | (0x2 << 8))
340#define OMAP3430_REV_ES3_0	(OMAP343X_CLASS | (0x3 << 8))
341#define OMAP3430_REV_ES3_1	(OMAP343X_CLASS | (0x4 << 8))
342#define OMAP3430_REV_ES3_1_2	(OMAP343X_CLASS | (0x5 << 8))
343
344#define OMAP363X_CLASS		0x36300034
345#define OMAP3630_REV_ES1_0	OMAP363X_CLASS
346#define OMAP3630_REV_ES1_1	(OMAP363X_CLASS | (0x1 << 8))
347#define OMAP3630_REV_ES1_2	(OMAP363X_CLASS | (0x2 << 8))
348
349#define TI816X_CLASS		0x81600081
350#define TI8168_REV_ES1_0	TI816X_CLASS
351#define TI8168_REV_ES1_1	(TI816X_CLASS | (0x1 << 8))
352#define TI8168_REV_ES2_0	(TI816X_CLASS | (0x2 << 8))
353#define TI8168_REV_ES2_1	(TI816X_CLASS | (0x3 << 8))
354
355#define TI814X_CLASS		0x81400081
356#define TI8148_REV_ES1_0	TI814X_CLASS
357#define TI8148_REV_ES2_0	(TI814X_CLASS | (0x1 << 8))
358#define TI8148_REV_ES2_1	(TI814X_CLASS | (0x2 << 8))
359
360#define AM35XX_CLASS		0x35170034
361#define AM35XX_REV_ES1_0	AM35XX_CLASS
362#define AM35XX_REV_ES1_1	(AM35XX_CLASS | (0x1 << 8))
363
364#define AM335X_CLASS		0x33500033
365#define AM335X_REV_ES1_0	AM335X_CLASS
366#define AM335X_REV_ES2_0	(AM335X_CLASS | (0x1 << 8))
367#define AM335X_REV_ES2_1	(AM335X_CLASS | (0x2 << 8))
368
369#define AM437X_CLASS		0x43700000
370#define AM437X_REV_ES1_0	(AM437X_CLASS | (0x10 << 8))
371#define AM437X_REV_ES1_1	(AM437X_CLASS | (0x11 << 8))
372#define AM437X_REV_ES1_2	(AM437X_CLASS | (0x12 << 8))
373
374#define OMAP443X_CLASS		0x44300044
375#define OMAP4430_REV_ES1_0	(OMAP443X_CLASS | (0x10 << 8))
376#define OMAP4430_REV_ES2_0	(OMAP443X_CLASS | (0x20 << 8))
377#define OMAP4430_REV_ES2_1	(OMAP443X_CLASS | (0x21 << 8))
378#define OMAP4430_REV_ES2_2	(OMAP443X_CLASS | (0x22 << 8))
379#define OMAP4430_REV_ES2_3	(OMAP443X_CLASS | (0x23 << 8))
380
381#define OMAP446X_CLASS		0x44600044
382#define OMAP4460_REV_ES1_0	(OMAP446X_CLASS | (0x10 << 8))
383#define OMAP4460_REV_ES1_1	(OMAP446X_CLASS | (0x11 << 8))
384
385#define OMAP447X_CLASS		0x44700044
386#define OMAP4470_REV_ES1_0	(OMAP447X_CLASS | (0x10 << 8))
387
388#define OMAP54XX_CLASS		0x54000054
389#define OMAP5430_REV_ES2_0	(OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8))
390#define OMAP5432_REV_ES2_0	(OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8))
391
392#define DRA7XX_CLASS		0x07000000
393#define DRA762_REV_ES1_0	(DRA7XX_CLASS | (0x62 << 16) | (0x10 << 8))
394#define DRA762_ABZ_REV_ES1_0	(DRA762_REV_ES1_0 | (2 << 0))
395#define DRA762_ACD_REV_ES1_0	(DRA762_REV_ES1_0 | (3 << 0))
396#define DRA752_REV_ES1_0	(DRA7XX_CLASS | (0x52 << 16) | (0x10 << 8))
397#define DRA752_REV_ES1_1	(DRA7XX_CLASS | (0x52 << 16) | (0x11 << 8))
398#define DRA752_REV_ES2_0	(DRA7XX_CLASS | (0x52 << 16) | (0x20 << 8))
399#define DRA722_REV_ES1_0	(DRA7XX_CLASS | (0x22 << 16) | (0x10 << 8))
 
400#define DRA722_REV_ES2_0	(DRA7XX_CLASS | (0x22 << 16) | (0x20 << 8))
401#define DRA722_REV_ES2_1	(DRA7XX_CLASS | (0x22 << 16) | (0x21 << 8))
402
403void omap2xxx_check_revision(void);
404void omap3xxx_check_revision(void);
405void omap4xxx_check_revision(void);
406void omap5xxx_check_revision(void);
407void dra7xxx_check_revision(void);
408void omap3xxx_check_features(void);
409void ti81xx_check_features(void);
410void am33xx_check_features(void);
411void omap4xxx_check_features(void);
412
413/*
414 * Runtime detection of OMAP3 features
415 *
416 * OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip
417 *    family have OS-level control over the I/O chain clock.  This is
418 *    to avoid a window during which wakeups could potentially be lost
419 *    during powerdomain transitions.  If this bit is set, it
420 *    indicates that the chip does support OS-level control of this
421 *    feature.
422 */
423extern u32 omap_features;
424
425#define OMAP3_HAS_L2CACHE		BIT(0)
426#define OMAP3_HAS_IVA			BIT(1)
427#define OMAP3_HAS_SGX			BIT(2)
428#define OMAP3_HAS_NEON			BIT(3)
429#define OMAP3_HAS_ISP			BIT(4)
430#define OMAP3_HAS_192MHZ_CLK		BIT(5)
431#define OMAP3_HAS_IO_WAKEUP		BIT(6)
432#define OMAP3_HAS_SDRC			BIT(7)
433#define OMAP3_HAS_IO_CHAIN_CTRL		BIT(8)
434#define OMAP4_HAS_PERF_SILICON		BIT(9)
435
436
437#define OMAP3_HAS_FEATURE(feat,flag)			\
438static inline unsigned int omap3_has_ ##feat(void)	\
439{							\
440	return omap_features & OMAP3_HAS_ ##flag;	\
441}							\
442
443OMAP3_HAS_FEATURE(l2cache, L2CACHE)
444OMAP3_HAS_FEATURE(sgx, SGX)
445OMAP3_HAS_FEATURE(iva, IVA)
446OMAP3_HAS_FEATURE(neon, NEON)
447OMAP3_HAS_FEATURE(isp, ISP)
448OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
449OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
450OMAP3_HAS_FEATURE(sdrc, SDRC)
451OMAP3_HAS_FEATURE(io_chain_ctrl, IO_CHAIN_CTRL)
452
453/*
454 * Runtime detection of OMAP4 features
455 */
456#define OMAP4_HAS_FEATURE(feat, flag)			\
457static inline unsigned int omap4_has_ ##feat(void)	\
458{							\
459	return omap_features & OMAP4_HAS_ ##flag;	\
460}							\
461
462OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON)
463
464/*
465 * We need to make sure omap initcalls don't run when
466 * multiplatform kernels are booted on other SoCs.
467 */
468#define omap_initcall(level, fn)		\
469static int __init __used __##fn(void)		\
470{						\
471	if (!soc_is_omap())			\
472		return 0;			\
473	return fn();				\
474}						\
475level(__##fn);
476
477#define omap_early_initcall(fn)		omap_initcall(early_initcall, fn)
478#define omap_core_initcall(fn)		omap_initcall(core_initcall, fn)
479#define omap_postcore_initcall(fn)	omap_initcall(postcore_initcall, fn)
480#define omap_arch_initcall(fn)		omap_initcall(arch_initcall, fn)
481#define omap_subsys_initcall(fn)	omap_initcall(subsys_initcall, fn)
482#define omap_device_initcall(fn)	omap_initcall(device_initcall, fn)
483#define omap_late_initcall(fn)		omap_initcall(late_initcall, fn)
484#define omap_late_initcall_sync(fn)	omap_initcall(late_initcall_sync, fn)
485
486/* Legacy defines, these can be removed when users are removed */
487#define cpu_is_omap2420()	soc_is_omap2420()
488#define cpu_is_omap2422()	soc_is_omap2422()
489#define cpu_is_omap242x()	soc_is_omap242x()
490#define cpu_is_omap2430()	soc_is_omap2430()
491#define cpu_is_omap243x()	soc_is_omap243x()
492#define cpu_is_omap24xx()	soc_is_omap24xx()
493#define cpu_is_omap3430()	soc_is_omap3430()
494#define cpu_is_omap343x()	soc_is_omap343x()
495#define cpu_is_omap34xx()	soc_is_omap34xx()
496#define cpu_is_omap3630()	soc_is_omap3630()
497#define cpu_is_omap443x()	soc_is_omap443x()
498#define cpu_is_omap446x()	soc_is_omap446x()
499#define cpu_is_omap44xx()	soc_is_omap44xx()
500#define cpu_is_ti814x()		soc_is_ti814x()
501#define cpu_is_ti816x()		soc_is_ti816x()
502#define cpu_is_ti81xx()		soc_is_ti81xx()
503
504#endif	/* __ASSEMBLY__ */
v4.6
 
  1/*
  2 * OMAP cpu type detection
  3 *
  4 * Copyright (C) 2004, 2008 Nokia Corporation
  5 *
  6 * Copyright (C) 2009-11 Texas Instruments.
  7 *
  8 * Written by Tony Lindgren <tony.lindgren@nokia.com>
  9 *
 10 * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com>
 11 * Added DRA7xxx specific defines - Sricharan R<r.sricharan@ti.com>
 12 *
 13 * This program is free software; you can redistribute it and/or modify
 14 * it under the terms of the GNU General Public License as published by
 15 * the Free Software Foundation; either version 2 of the License, or
 16 * (at your option) any later version.
 17 *
 18 * This program is distributed in the hope that it will be useful,
 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 21 * GNU General Public License for more details.
 22 *
 23 * You should have received a copy of the GNU General Public License
 24 * along with this program; if not, write to the Free Software
 25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 26 *
 27 */
 28
 29#include "omap24xx.h"
 30#include "omap34xx.h"
 31#include "omap44xx.h"
 32#include "ti81xx.h"
 33#include "am33xx.h"
 34#include "omap54xx.h"
 35
 36#ifndef __ASSEMBLY__
 37
 38#include <linux/bitops.h>
 39#include <linux/of.h>
 40
 41/*
 42 * Test if multicore OMAP support is needed
 43 */
 44#undef MULTI_OMAP2
 45#undef OMAP_NAME
 46
 47#ifdef CONFIG_ARCH_MULTIPLATFORM
 48#define MULTI_OMAP2
 49#endif
 50#ifdef CONFIG_SOC_OMAP2420
 51# ifdef OMAP_NAME
 52#  undef  MULTI_OMAP2
 53#  define MULTI_OMAP2
 54# else
 55#  define OMAP_NAME omap2420
 56# endif
 57#endif
 58#ifdef CONFIG_SOC_OMAP2430
 59# ifdef OMAP_NAME
 60#  undef  MULTI_OMAP2
 61#  define MULTI_OMAP2
 62# else
 63#  define OMAP_NAME omap2430
 64# endif
 65#endif
 66#ifdef CONFIG_ARCH_OMAP3
 67# ifdef OMAP_NAME
 68#  undef  MULTI_OMAP2
 69#  define MULTI_OMAP2
 70# else
 71#  define OMAP_NAME omap3
 72# endif
 73#endif
 74#ifdef CONFIG_ARCH_OMAP4
 75# ifdef OMAP_NAME
 76#  undef  MULTI_OMAP2
 77#  define MULTI_OMAP2
 78# else
 79#  define OMAP_NAME omap4
 80# endif
 81#endif
 82
 83#ifdef CONFIG_SOC_OMAP5
 84# ifdef OMAP_NAME
 85#  undef  MULTI_OMAP2
 86#  define MULTI_OMAP2
 87# else
 88#  define OMAP_NAME omap5
 89# endif
 90#endif
 91
 92#ifdef CONFIG_SOC_AM33XX
 93# ifdef OMAP_NAME
 94#  undef  MULTI_OMAP2
 95#  define MULTI_OMAP2
 96# else
 97#  define OMAP_NAME am33xx
 98# endif
 99#endif
100
101#ifdef CONFIG_SOC_AM43XX
102# ifdef OMAP_NAME
103#  undef  MULTI_OMAP2
104#  define MULTI_OMAP2
105# else
106#  define OMAP_NAME am43xx
107# endif
108#endif
109
110#ifdef CONFIG_SOC_DRA7XX
111# ifdef OMAP_NAME
112#  undef MULTI_OMAP2
113#  define MULTI_OMAP2
114# else
115#  define OMAP_NAME DRA7XX
116# endif
117#endif
118
119/*
120 * Omap device type i.e. EMU/HS/TST/GP/BAD
121 */
122#define OMAP2_DEVICE_TYPE_TEST		0
123#define OMAP2_DEVICE_TYPE_EMU		1
124#define OMAP2_DEVICE_TYPE_SEC		2
125#define OMAP2_DEVICE_TYPE_GP		3
126#define OMAP2_DEVICE_TYPE_BAD		4
127
128int omap_type(void);
129
130/*
131 * omap_rev bits:
132 * SoC id bits	(0730, 1510, 1710, 2422...)	[31:16]
133 * SoC revision	(See _REV_ defined in cpu.h)	[15:08]
134 * SoC class bits (15xx, 16xx, 24xx, 34xx...)	[07:00]
135 */
136unsigned int omap_rev(void);
137
138static inline int soc_is_omap(void)
139{
140	return omap_rev() != 0;
141}
142
143/*
144 * Get the SoC revision for OMAP devices
145 */
146#define GET_OMAP_REVISION()	((omap_rev() >> 8) & 0xff)
147
148/*
149 * Macros to group OMAP into cpu classes.
150 * These can be used in most places.
151 * soc_is_omap24xx():	True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
152 * soc_is_omap242x():	True for OMAP2420, OMAP2422, OMAP2423
153 * soc_is_omap243x():	True for OMAP2430
154 * soc_is_omap343x():	True for OMAP3430
155 * soc_is_omap443x():	True for OMAP4430
156 * soc_is_omap446x():	True for OMAP4460
157 * soc_is_omap447x():	True for OMAP4470
158 * soc_is_omap543x():	True for OMAP5430, OMAP5432
159 */
160#define GET_OMAP_CLASS	(omap_rev() & 0xff)
161
162#define IS_OMAP_CLASS(class, id)			\
163static inline int is_omap ##class (void)		\
164{							\
165	return (GET_OMAP_CLASS == (id)) ? 1 : 0;	\
166}
167
168#define GET_AM_CLASS	((omap_rev() >> 24) & 0xff)
169
170#define IS_AM_CLASS(class, id)				\
171static inline int is_am ##class (void)			\
172{							\
173	return (GET_AM_CLASS == (id)) ? 1 : 0;		\
174}
175
176#define GET_TI_CLASS	((omap_rev() >> 24) & 0xff)
177
178#define IS_TI_CLASS(class, id)			\
179static inline int is_ti ##class (void)		\
180{							\
181	return (GET_TI_CLASS == (id)) ? 1 : 0;	\
182}
183
184#define GET_DRA_CLASS	((omap_rev() >> 24) & 0xff)
185
186#define IS_DRA_CLASS(class, id)				\
187static inline int is_dra ##class (void)			\
188{							\
189	return (GET_DRA_CLASS == (id)) ? 1 : 0;		\
190}
191
192#define GET_OMAP_SUBCLASS	((omap_rev() >> 20) & 0x0fff)
193
194#define IS_OMAP_SUBCLASS(subclass, id)			\
195static inline int is_omap ##subclass (void)		\
196{							\
197	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
198}
199
200#define IS_TI_SUBCLASS(subclass, id)			\
201static inline int is_ti ##subclass (void)		\
202{							\
203	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
204}
205
206#define IS_AM_SUBCLASS(subclass, id)			\
207static inline int is_am ##subclass (void)		\
208{							\
209	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
210}
211
212#define IS_DRA_SUBCLASS(subclass, id)			\
213static inline int is_dra ##subclass (void)		\
214{							\
215	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
216}
217
 
 
 
 
 
 
 
 
218IS_OMAP_CLASS(24xx, 0x24)
219IS_OMAP_CLASS(34xx, 0x34)
220IS_OMAP_CLASS(44xx, 0x44)
221IS_AM_CLASS(35xx, 0x35)
222IS_OMAP_CLASS(54xx, 0x54)
223IS_AM_CLASS(33xx, 0x33)
224IS_AM_CLASS(43xx, 0x43)
225
226IS_TI_CLASS(81xx, 0x81)
227IS_DRA_CLASS(7xx, 0x7)
228
229IS_OMAP_SUBCLASS(242x, 0x242)
230IS_OMAP_SUBCLASS(243x, 0x243)
231IS_OMAP_SUBCLASS(343x, 0x343)
232IS_OMAP_SUBCLASS(363x, 0x363)
233IS_OMAP_SUBCLASS(443x, 0x443)
234IS_OMAP_SUBCLASS(446x, 0x446)
235IS_OMAP_SUBCLASS(447x, 0x447)
236IS_OMAP_SUBCLASS(543x, 0x543)
237
238IS_TI_SUBCLASS(816x, 0x816)
239IS_TI_SUBCLASS(814x, 0x814)
240IS_AM_SUBCLASS(335x, 0x335)
241IS_AM_SUBCLASS(437x, 0x437)
 
 
 
242IS_DRA_SUBCLASS(75x, 0x75)
243IS_DRA_SUBCLASS(72x, 0x72)
244
245#define soc_is_omap24xx()		0
246#define soc_is_omap242x()		0
247#define soc_is_omap243x()		0
248#define soc_is_omap34xx()		0
249#define soc_is_omap343x()		0
250#define soc_is_ti81xx()			0
251#define soc_is_ti816x()			0
252#define soc_is_ti814x()			0
253#define soc_is_am35xx()			0
254#define soc_is_am33xx()			0
255#define soc_is_am335x()			0
256#define soc_is_am43xx()			0
257#define soc_is_am437x()			0
258#define soc_is_omap44xx()		0
259#define soc_is_omap443x()		0
260#define soc_is_omap446x()		0
261#define soc_is_omap447x()		0
262#define soc_is_omap54xx()		0
263#define soc_is_omap543x()		0
264#define soc_is_dra7xx()			0
 
265#define soc_is_dra74x()			0
266#define soc_is_dra72x()			0
267
268#if defined(MULTI_OMAP2)
269# if defined(CONFIG_ARCH_OMAP2)
270#  undef  soc_is_omap24xx
271#  define soc_is_omap24xx()		is_omap24xx()
272# endif
273# if defined (CONFIG_SOC_OMAP2420)
274#  undef  soc_is_omap242x
275#  define soc_is_omap242x()		is_omap242x()
276# endif
277# if defined (CONFIG_SOC_OMAP2430)
278#  undef  soc_is_omap243x
279#  define soc_is_omap243x()		is_omap243x()
280# endif
281# if defined(CONFIG_ARCH_OMAP3)
282#  undef  soc_is_omap34xx
283#  undef  soc_is_omap343x
284#  define soc_is_omap34xx()		is_omap34xx()
285#  define soc_is_omap343x()		is_omap343x()
286# endif
287#else
288# if defined(CONFIG_ARCH_OMAP2)
289#  undef  soc_is_omap24xx
290#  define soc_is_omap24xx()		1
291# endif
292# if defined(CONFIG_SOC_OMAP2420)
293#  undef  soc_is_omap242x
294#  define soc_is_omap242x()		1
295# endif
296# if defined(CONFIG_SOC_OMAP2430)
297#  undef  soc_is_omap243x
298#  define soc_is_omap243x()		1
299# endif
300# if defined(CONFIG_ARCH_OMAP3)
301#  undef  soc_is_omap34xx
302#  define soc_is_omap34xx()		1
303# endif
304# if defined(CONFIG_SOC_OMAP3430)
305#  undef  soc_is_omap343x
306#  define soc_is_omap343x()		1
307# endif
308#endif
309
310/*
311 * Macros to detect individual cpu types.
312 * These are only rarely needed.
313 * soc_is_omap2420():	True for OMAP2420
314 * soc_is_omap2422():	True for OMAP2422
315 * soc_is_omap2423():	True for OMAP2423
316 * soc_is_omap2430():	True for OMAP2430
317 * soc_is_omap3430():	True for OMAP3430
318 */
319#define GET_OMAP_TYPE	((omap_rev() >> 16) & 0xffff)
320
321#define IS_OMAP_TYPE(type, id)				\
322static inline int is_omap ##type (void)			\
323{							\
324	return (GET_OMAP_TYPE == (id)) ? 1 : 0;		\
325}
326
327IS_OMAP_TYPE(2420, 0x2420)
328IS_OMAP_TYPE(2422, 0x2422)
329IS_OMAP_TYPE(2423, 0x2423)
330IS_OMAP_TYPE(2430, 0x2430)
331IS_OMAP_TYPE(3430, 0x3430)
332
333#define soc_is_omap2420()		0
334#define soc_is_omap2422()		0
335#define soc_is_omap2423()		0
336#define soc_is_omap2430()		0
337#define soc_is_omap3430()		0
338#define soc_is_omap3630()		0
339#define soc_is_omap5430()		0
340
341/* These are needed for the common code */
342#ifdef CONFIG_ARCH_OMAP2PLUS
343#define soc_is_omap7xx()		0
344#define soc_is_omap15xx()		0
345#define soc_is_omap16xx()		0
346#define soc_is_omap1510()		0
347#define soc_is_omap1610()		0
348#define soc_is_omap1611()		0
349#define soc_is_omap1621()		0
350#define soc_is_omap1710()		0
351#define cpu_class_is_omap1()		0
352#define cpu_class_is_omap2()		1
353#endif
354
355#if defined(CONFIG_ARCH_OMAP2)
356# undef  soc_is_omap2420
357# undef  soc_is_omap2422
358# undef  soc_is_omap2423
359# undef  soc_is_omap2430
360# define soc_is_omap2420()		is_omap2420()
361# define soc_is_omap2422()		is_omap2422()
362# define soc_is_omap2423()		is_omap2423()
363# define soc_is_omap2430()		is_omap2430()
364#endif
365
366#if defined(CONFIG_ARCH_OMAP3)
367# undef soc_is_omap3430
368# undef soc_is_ti81xx
369# undef soc_is_ti816x
370# undef soc_is_ti814x
371# undef soc_is_am35xx
372# define soc_is_omap3430()		is_omap3430()
373# undef soc_is_omap3630
374# define soc_is_omap3630()		is_omap363x()
375# define soc_is_ti81xx()		is_ti81xx()
376# define soc_is_ti816x()		is_ti816x()
377# define soc_is_ti814x()		is_ti814x()
378# define soc_is_am35xx()		is_am35xx()
379#endif
380
381# if defined(CONFIG_SOC_AM33XX)
382# undef soc_is_am33xx
383# undef soc_is_am335x
384# define soc_is_am33xx()		is_am33xx()
385# define soc_is_am335x()		is_am335x()
386#endif
387
388#ifdef	CONFIG_SOC_AM43XX
389# undef soc_is_am43xx
390# undef soc_is_am437x
391# define soc_is_am43xx()		is_am43xx()
392# define soc_is_am437x()		is_am437x()
393#endif
394
395# if defined(CONFIG_ARCH_OMAP4)
396# undef soc_is_omap44xx
397# undef soc_is_omap443x
398# undef soc_is_omap446x
399# undef soc_is_omap447x
400# define soc_is_omap44xx()		is_omap44xx()
401# define soc_is_omap443x()		is_omap443x()
402# define soc_is_omap446x()		is_omap446x()
403# define soc_is_omap447x()		is_omap447x()
404# endif
405
406# if defined(CONFIG_SOC_OMAP5)
407# undef soc_is_omap54xx
408# undef soc_is_omap543x
409# define soc_is_omap54xx()		is_omap54xx()
410# define soc_is_omap543x()		is_omap543x()
411#endif
412
413#if defined(CONFIG_SOC_DRA7XX)
414#undef soc_is_dra7xx
 
 
 
415#undef soc_is_dra74x
416#undef soc_is_dra72x
417#define soc_is_dra7xx()	is_dra7xx()
 
 
 
418#define soc_is_dra74x()	is_dra75x()
419#define soc_is_dra72x()	is_dra72x()
420#endif
421
422/* Various silicon revisions for omap2 */
423#define OMAP242X_CLASS		0x24200024
424#define OMAP2420_REV_ES1_0	OMAP242X_CLASS
425#define OMAP2420_REV_ES2_0	(OMAP242X_CLASS | (0x1 << 8))
426
427#define OMAP243X_CLASS		0x24300024
428#define OMAP2430_REV_ES1_0	OMAP243X_CLASS
429
430#define OMAP343X_CLASS		0x34300034
431#define OMAP3430_REV_ES1_0	OMAP343X_CLASS
432#define OMAP3430_REV_ES2_0	(OMAP343X_CLASS | (0x1 << 8))
433#define OMAP3430_REV_ES2_1	(OMAP343X_CLASS | (0x2 << 8))
434#define OMAP3430_REV_ES3_0	(OMAP343X_CLASS | (0x3 << 8))
435#define OMAP3430_REV_ES3_1	(OMAP343X_CLASS | (0x4 << 8))
436#define OMAP3430_REV_ES3_1_2	(OMAP343X_CLASS | (0x5 << 8))
437
438#define OMAP363X_CLASS		0x36300034
439#define OMAP3630_REV_ES1_0	OMAP363X_CLASS
440#define OMAP3630_REV_ES1_1	(OMAP363X_CLASS | (0x1 << 8))
441#define OMAP3630_REV_ES1_2	(OMAP363X_CLASS | (0x2 << 8))
442
443#define TI816X_CLASS		0x81600081
444#define TI8168_REV_ES1_0	TI816X_CLASS
445#define TI8168_REV_ES1_1	(TI816X_CLASS | (0x1 << 8))
446#define TI8168_REV_ES2_0	(TI816X_CLASS | (0x2 << 8))
447#define TI8168_REV_ES2_1	(TI816X_CLASS | (0x3 << 8))
448
449#define TI814X_CLASS		0x81400081
450#define TI8148_REV_ES1_0	TI814X_CLASS
451#define TI8148_REV_ES2_0	(TI814X_CLASS | (0x1 << 8))
452#define TI8148_REV_ES2_1	(TI814X_CLASS | (0x2 << 8))
453
454#define AM35XX_CLASS		0x35170034
455#define AM35XX_REV_ES1_0	AM35XX_CLASS
456#define AM35XX_REV_ES1_1	(AM35XX_CLASS | (0x1 << 8))
457
458#define AM335X_CLASS		0x33500033
459#define AM335X_REV_ES1_0	AM335X_CLASS
460#define AM335X_REV_ES2_0	(AM335X_CLASS | (0x1 << 8))
461#define AM335X_REV_ES2_1	(AM335X_CLASS | (0x2 << 8))
462
463#define AM437X_CLASS		0x43700000
464#define AM437X_REV_ES1_0	(AM437X_CLASS | (0x10 << 8))
465#define AM437X_REV_ES1_1	(AM437X_CLASS | (0x11 << 8))
466#define AM437X_REV_ES1_2	(AM437X_CLASS | (0x12 << 8))
467
468#define OMAP443X_CLASS		0x44300044
469#define OMAP4430_REV_ES1_0	(OMAP443X_CLASS | (0x10 << 8))
470#define OMAP4430_REV_ES2_0	(OMAP443X_CLASS | (0x20 << 8))
471#define OMAP4430_REV_ES2_1	(OMAP443X_CLASS | (0x21 << 8))
472#define OMAP4430_REV_ES2_2	(OMAP443X_CLASS | (0x22 << 8))
473#define OMAP4430_REV_ES2_3	(OMAP443X_CLASS | (0x23 << 8))
474
475#define OMAP446X_CLASS		0x44600044
476#define OMAP4460_REV_ES1_0	(OMAP446X_CLASS | (0x10 << 8))
477#define OMAP4460_REV_ES1_1	(OMAP446X_CLASS | (0x11 << 8))
478
479#define OMAP447X_CLASS		0x44700044
480#define OMAP4470_REV_ES1_0	(OMAP447X_CLASS | (0x10 << 8))
481
482#define OMAP54XX_CLASS		0x54000054
483#define OMAP5430_REV_ES2_0	(OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8))
484#define OMAP5432_REV_ES2_0	(OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8))
485
486#define DRA7XX_CLASS		0x07000000
 
 
 
487#define DRA752_REV_ES1_0	(DRA7XX_CLASS | (0x52 << 16) | (0x10 << 8))
488#define DRA752_REV_ES1_1	(DRA7XX_CLASS | (0x52 << 16) | (0x11 << 8))
489#define DRA752_REV_ES2_0	(DRA7XX_CLASS | (0x52 << 16) | (0x20 << 8))
490#define DRA722_REV_ES1_0	(DRA7XX_CLASS | (0x22 << 16) | (0x10 << 8))
491#define DRA722_REV_ES1_0	(DRA7XX_CLASS | (0x22 << 16) | (0x10 << 8))
492#define DRA722_REV_ES2_0	(DRA7XX_CLASS | (0x22 << 16) | (0x20 << 8))
 
493
494void omap2xxx_check_revision(void);
495void omap3xxx_check_revision(void);
496void omap4xxx_check_revision(void);
497void omap5xxx_check_revision(void);
498void dra7xxx_check_revision(void);
499void omap3xxx_check_features(void);
500void ti81xx_check_features(void);
501void am33xx_check_features(void);
502void omap4xxx_check_features(void);
503
504/*
505 * Runtime detection of OMAP3 features
506 *
507 * OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip
508 *    family have OS-level control over the I/O chain clock.  This is
509 *    to avoid a window during which wakeups could potentially be lost
510 *    during powerdomain transitions.  If this bit is set, it
511 *    indicates that the chip does support OS-level control of this
512 *    feature.
513 */
514extern u32 omap_features;
515
516#define OMAP3_HAS_L2CACHE		BIT(0)
517#define OMAP3_HAS_IVA			BIT(1)
518#define OMAP3_HAS_SGX			BIT(2)
519#define OMAP3_HAS_NEON			BIT(3)
520#define OMAP3_HAS_ISP			BIT(4)
521#define OMAP3_HAS_192MHZ_CLK		BIT(5)
522#define OMAP3_HAS_IO_WAKEUP		BIT(6)
523#define OMAP3_HAS_SDRC			BIT(7)
524#define OMAP3_HAS_IO_CHAIN_CTRL		BIT(8)
525#define OMAP4_HAS_PERF_SILICON		BIT(9)
526
527
528#define OMAP3_HAS_FEATURE(feat,flag)			\
529static inline unsigned int omap3_has_ ##feat(void)	\
530{							\
531	return omap_features & OMAP3_HAS_ ##flag;	\
532}							\
533
534OMAP3_HAS_FEATURE(l2cache, L2CACHE)
535OMAP3_HAS_FEATURE(sgx, SGX)
536OMAP3_HAS_FEATURE(iva, IVA)
537OMAP3_HAS_FEATURE(neon, NEON)
538OMAP3_HAS_FEATURE(isp, ISP)
539OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
540OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
541OMAP3_HAS_FEATURE(sdrc, SDRC)
542OMAP3_HAS_FEATURE(io_chain_ctrl, IO_CHAIN_CTRL)
543
544/*
545 * Runtime detection of OMAP4 features
546 */
547#define OMAP4_HAS_FEATURE(feat, flag)			\
548static inline unsigned int omap4_has_ ##feat(void)	\
549{							\
550	return omap_features & OMAP4_HAS_ ##flag;	\
551}							\
552
553OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON)
554
555/*
556 * We need to make sure omap initcalls don't run when
557 * multiplatform kernels are booted on other SoCs.
558 */
559#define omap_initcall(level, fn)		\
560static int __init __used __##fn(void)		\
561{						\
562	if (!soc_is_omap())			\
563		return 0;			\
564	return fn();				\
565}						\
566level(__##fn);
567
568#define omap_early_initcall(fn)		omap_initcall(early_initcall, fn)
569#define omap_core_initcall(fn)		omap_initcall(core_initcall, fn)
570#define omap_postcore_initcall(fn)	omap_initcall(postcore_initcall, fn)
571#define omap_arch_initcall(fn)		omap_initcall(arch_initcall, fn)
572#define omap_subsys_initcall(fn)	omap_initcall(subsys_initcall, fn)
573#define omap_device_initcall(fn)	omap_initcall(device_initcall, fn)
574#define omap_late_initcall(fn)		omap_initcall(late_initcall, fn)
575#define omap_late_initcall_sync(fn)	omap_initcall(late_initcall_sync, fn)
576
577/* Legacy defines, these can be removed when users are removed */
578#define cpu_is_omap2420()	soc_is_omap2420()
579#define cpu_is_omap2422()	soc_is_omap2422()
580#define cpu_is_omap242x()	soc_is_omap242x()
581#define cpu_is_omap2430()	soc_is_omap2430()
582#define cpu_is_omap243x()	soc_is_omap243x()
583#define cpu_is_omap24xx()	soc_is_omap24xx()
584#define cpu_is_omap3430()	soc_is_omap3430()
585#define cpu_is_omap343x()	soc_is_omap343x()
586#define cpu_is_omap34xx()	soc_is_omap34xx()
587#define cpu_is_omap3630()	soc_is_omap3630()
588#define cpu_is_omap443x()	soc_is_omap443x()
589#define cpu_is_omap446x()	soc_is_omap446x()
590#define cpu_is_omap44xx()	soc_is_omap44xx()
591#define cpu_is_ti814x()		soc_is_ti814x()
592#define cpu_is_ti816x()		soc_is_ti816x()
593#define cpu_is_ti81xx()		soc_is_ti81xx()
594
595#endif	/* __ASSEMBLY__ */