Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 Toradex, Inc. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef _TDX_CFG_BLOCK_H |
| 8 | #define _TDX_CFG_BLOCK_H |
| 9 | |
| 10 | #include "tdx-common.h" |
| 11 | |
| 12 | struct toradex_hw { |
| 13 | u16 ver_major; |
| 14 | u16 ver_minor; |
| 15 | u16 ver_assembly; |
| 16 | u16 prodid; |
| 17 | }; |
| 18 | |
| 19 | struct toradex_eth_addr { |
| 20 | u32 oui:24; |
| 21 | u32 nic:24; |
| 22 | } __attribute__((__packed__)); |
| 23 | |
| 24 | enum { |
| 25 | COLIBRI_PXA270_V1_312MHZ = 1, |
| 26 | COLIBRI_PXA270_V1_520MHZ, |
| 27 | COLIBRI_PXA320, |
| 28 | COLIBRI_PXA300, |
| 29 | COLIBRI_PXA310, |
| 30 | COLIBRI_PXA320_IT, |
| 31 | COLIBRI_PXA300_XT, |
| 32 | COLIBRI_PXA270_312MHZ, |
| 33 | COLIBRI_PXA270_520MHZ, |
| 34 | COLIBRI_VF50, /* not currently on sale */ |
| 35 | COLIBRI_VF61, |
| 36 | COLIBRI_VF61_IT, |
| 37 | COLIBRI_VF50_IT, |
| 38 | COLIBRI_IMX6S, |
| 39 | COLIBRI_IMX6DL, |
| 40 | COLIBRI_IMX6S_IT, |
| 41 | COLIBRI_IMX6DL_IT, |
| 42 | COLIBRI_T20_256MB = 20, |
| 43 | COLIBRI_T20_512MB, |
| 44 | COLIBRI_T20_512MB_IT, |
| 45 | COLIBRI_T30, |
| 46 | COLIBRI_T20_256MB_IT, |
| 47 | APALIS_T30_2GB, |
| 48 | APALIS_T30_1GB, |
| 49 | APALIS_IMX6Q, |
| 50 | APALIS_IMX6Q_IT, |
| 51 | APALIS_IMX6D, |
| 52 | COLIBRI_T30_IT, |
| 53 | APALIS_T30_IT, |
| 54 | COLIBRI_IMX7S, |
| 55 | COLIBRI_IMX7D, |
| 56 | APALIS_TK1_2GB, |
| 57 | APALIS_IMX6D_IT, |
| 58 | }; |
| 59 | |
| 60 | extern const char * const toradex_modules[]; |
| 61 | extern bool valid_cfgblock; |
| 62 | extern struct toradex_hw tdx_hw_tag; |
| 63 | extern struct toradex_eth_addr tdx_eth_addr; |
| 64 | extern u32 tdx_serial; |
| 65 | |
| 66 | int read_tdx_cfg_block(void); |
| 67 | |
| 68 | #endif /* _TDX_CFG_BLOCK_H */ |