xref: /openbmc/u-boot/include/tegra-kbc.h (revision 0649cd0d)
1 /*
2  * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6 
7 #ifndef __include_tegra_kbc_h__
8 #define __include_tegra_kbc_h__
9 
10 #include <common.h>
11 
12 #define KEY_IS_MODIFIER(key) ((key) >= KEY_FIRST_MODIFIER)
13 
14 struct kbc_tegra {
15 	u32 control;
16 	u32 interrupt;
17 	u32 row_cfg[4];
18 	u32 col_cfg[3];
19 	u32 timeout_dly;
20 	u32 init_dly;
21 	u32 rpt_dly;
22 	u32 kp_ent[2];
23 	u32 row_mask[16];
24 };
25 
26 #ifdef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
27 extern int overwrite_console(void);
28 #define OVERWRITE_CONSOLE overwrite_console()
29 #else
30 #define OVERWRITE_CONSOLE 0
31 #endif /* CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE */
32 
33 #endif /* __include_tegra_kbc_h__ */
34