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.
11 #ifndef __KEYMILE_COMMON_H
12 #define __KEYMILE_COMMON_H
14 #define WRG_RESET 0x80
15 #define H_OPORTS_14 0x40
19 #define OPRTL_XBUFENA 0x20
21 #define H_OPORTS_SCC4_ENA 0x10
22 #define H_OPORTS_SCC4_FD_ENA 0x04
23 #define H_OPORTS_FCC1_PW_DWN 0x01
25 #define PIGGY_PRESENT 0x80
32 unsigned char res1[3];
35 unsigned char res2[6];
37 unsigned char res3[0xfff0];
39 unsigned char pgy_rev;
40 unsigned char pgy_outputs;
41 unsigned char pgy_eth;
44 #define BFTICU_DIPSWITCH_MASK 0x0f
48 * BFTICU is used on mgcoge and mgocge3ne
51 u8 xi_ena; /* General defect enable */
111 u8 led_on; /* Leds */
113 u8 sfp_control; /* SFP modules */
115 u8 alarm_control; /* Alarm output */
117 u8 icps; /* ICN clock pulse shaping */
118 u8 mswitch; /* Read mode switch */
123 #if !defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET)
124 #define CONFIG_PIGGY_MAC_ADRESS_OFFSET 0
127 int ethernet_present(void);
128 int ivm_read_eeprom(void);
130 int set_km_env(void);
131 int fdt_set_node_and_value(void *blob,
136 int fdt_get_node_and_value(void *blob,
141 #define DELAY_ABORT_SEQ 62 /* @200kHz 9 clocks = 44us, 62us is ok */
142 #define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000))
144 int i2c_soft_read_pin(void);
145 int i2c_make_abort(void);
146 #endif /* __KEYMILE_COMMON_H */