Heiko Schocher | 210c8c0 | 2008-11-21 08:29:40 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2008 |
| 3 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License as |
| 7 | * published by the Free Software Foundation; either version 2 of |
| 8 | * the License, or (at your option) any later version. |
| 9 | */ |
| 10 | |
| 11 | #ifndef __KEYMILE_COMMON_H |
| 12 | #define __KEYMILE_COMMON_H |
| 13 | |
Heiko Schocher | b11f53f | 2011-03-15 16:52:29 +0100 | [diff] [blame] | 14 | #define WRG_RESET 0x80 |
| 15 | #define H_OPORTS_14 0x40 |
| 16 | #define WRG_LED 0x02 |
| 17 | #define WRL_BOOT 0x01 |
| 18 | |
| 19 | #define H_OPORTS_SCC4_ENA 0x10 |
| 20 | #define H_OPORTS_SCC4_FD_ENA 0x04 |
| 21 | #define H_OPORTS_FCC1_PW_DWN 0x01 |
| 22 | |
| 23 | #define PIGGY_PRESENT 0x80 |
| 24 | |
| 25 | struct km_bec_fpga { |
| 26 | unsigned char id; |
| 27 | unsigned char rev; |
| 28 | unsigned char oprth; |
| 29 | unsigned char oprtl; |
| 30 | unsigned char res1[3]; |
| 31 | unsigned char bprth; |
| 32 | unsigned char bprtl; |
| 33 | unsigned char res2[6]; |
| 34 | unsigned char prst; |
| 35 | unsigned char res3[0xfff0]; |
| 36 | unsigned char pgy_id; |
| 37 | unsigned char pgy_rev; |
| 38 | unsigned char pgy_outputs; |
| 39 | unsigned char pgy_eth; |
| 40 | }; |
| 41 | |
| 42 | int ethernet_present(void); |
| 43 | int ivm_read_eeprom(void); |
Heiko Schocher | 210c8c0 | 2008-11-21 08:29:40 +0100 | [diff] [blame] | 44 | |
| 45 | #ifdef CONFIG_KEYMILE_HDLC_ENET |
Heiko Schocher | b11f53f | 2011-03-15 16:52:29 +0100 | [diff] [blame] | 46 | int keymile_hdlc_enet_initialize(bd_t *bis); |
Heiko Schocher | 210c8c0 | 2008-11-21 08:29:40 +0100 | [diff] [blame] | 47 | #endif |
Heiko Schocher | dc71b24 | 2009-07-09 12:04:18 +0200 | [diff] [blame] | 48 | |
Heiko Schocher | b11f53f | 2011-03-15 16:52:29 +0100 | [diff] [blame] | 49 | int fdt_set_node_and_value(void *blob, |
Heiko Schocher | dc71b24 | 2009-07-09 12:04:18 +0200 | [diff] [blame] | 50 | char *nodename, |
| 51 | char *regname, |
| 52 | void *var, |
| 53 | int size); |
Heiko Schocher | b11f53f | 2011-03-15 16:52:29 +0100 | [diff] [blame] | 54 | int fdt_get_node_and_value(void *blob, |
Heiko Schocher | dc71b24 | 2009-07-09 12:04:18 +0200 | [diff] [blame] | 55 | char *nodename, |
| 56 | char *propname, |
| 57 | void **var); |
Heiko Schocher | b11f53f | 2011-03-15 16:52:29 +0100 | [diff] [blame] | 58 | |
| 59 | int i2c_soft_read_pin(void); |
Heiko Schocher | 210c8c0 | 2008-11-21 08:29:40 +0100 | [diff] [blame] | 60 | #endif /* __KEYMILE_COMMON_H */ |