blob: ef79a9aafc08495c11cab9a5bd31c67ec8de24a2 [file] [log] [blame]
Jean-Christophe PLAGNIOL-VILLARD76b2ab72011-04-14 00:34:03 +08001/*
2 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
3 *
4 * Under GPLv2 only
5 */
6
7#ifndef __ARCH_SYSTEM_REV_H__
8#define __ARCH_SYSTEM_REV_H__
9
David Howells9f97da72012-03-28 18:30:01 +010010#include <asm/system_info.h>
11
Jean-Christophe PLAGNIOL-VILLARD76b2ab72011-04-14 00:34:03 +080012/*
13 * board revision encoding
14 * mach specific
15 * the 16-31 bit are reserved for at91 generic information
16 *
17 * bit 31:
Nicolas Ferre64393b32011-07-01 12:25:24 +020018 * 0 => nand 8 bit
19 * 1 => nand 16 bit
Jean-Christophe PLAGNIOL-VILLARD76b2ab72011-04-14 00:34:03 +080020 */
Nicolas Ferre64393b32011-07-01 12:25:24 +020021#define BOARD_HAVE_NAND_16BIT (1 << 31)
22static inline int board_have_nand_16bit(void)
Jean-Christophe PLAGNIOL-VILLARD76b2ab72011-04-14 00:34:03 +080023{
Christian Hitza5f70b62011-10-24 08:57:32 +020024 return (system_rev & BOARD_HAVE_NAND_16BIT) ? 1 : 0;
Jean-Christophe PLAGNIOL-VILLARD76b2ab72011-04-14 00:34:03 +080025}
26
27#endif /* __ARCH_SYSTEM_REV_H__ */