File tree 5 files changed +30
-11
lines changed
board/imgtec/pistachio_bub
5 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 5
5
* SPDX-License-Identifier: GPL-2.0+
6
6
*/
7
7
8
+ #include <common.h>
8
9
#include <asm/io.h>
9
10
#include <asm/pistachio.h>
10
11
#include "mfio.h"
@@ -327,3 +328,16 @@ void mfio_setup_led(void)
327
328
pistachio_set_gpio_output_state (76 , 1 );
328
329
}
329
330
#endif
331
+
332
+ #if defined(CONFIG_TARGET_PISTACHIO_MARDUK )
333
+ void mfio_setup_tpm (void )
334
+ {
335
+ /* Reset the TPM, first versions of the board
336
+ have the tpm reset connected to gpio 42 instead
337
+ of directly connected to system reset */
338
+ pistachio_configure_gpio (42 , 1 );
339
+ pistachio_set_gpio_output_state (42 , 0 );
340
+ udelay (100 );
341
+ pistachio_set_gpio_output_state (42 , 1 );
342
+ }
343
+ #endif
Original file line number Diff line number Diff line change @@ -189,3 +189,7 @@ void mfio_setup_usb_pwr(void);
189
189
#if defined(CONFIG_TARGET_PISTACHIO_MARDUK )
190
190
void mfio_setup_led (void );
191
191
#endif
192
+
193
+ #if defined(CONFIG_TARGET_PISTACHIO_MARDUK )
194
+ void mfio_setup_tpm (void );
195
+ #endif
Original file line number Diff line number Diff line change @@ -197,19 +197,18 @@ int board_early_init_f(void)
197
197
int board_late_init (void )
198
198
{
199
199
#ifdef CONFIG_TPM
200
- if (tpm_init () || tpm_startup (TPM_ST_CLEAR )) {
201
- printf ("Failed to enable tpm!\n" );
200
+ uint32_t result ;
201
+
202
+ mfio_setup_tpm ();
203
+ udelay (10000 );
204
+ tpm_init ();
205
+ result = tpm_startup (TPM_ST_CLEAR );
206
+ if (result != 0 ) {
207
+ printf ("tpm startup failed with 0x%x\n" , result );
202
208
return 1 ;
203
209
}
210
+ printf ("TPM: Infineon (1.2)\n" );
204
211
#endif
205
- #ifdef CONFIG_PISTACHIO_WATCHDOG
206
- hw_watchdog_init ();
207
- #endif
208
- return 0 ;
209
- }
210
-
211
- int misc_init_r (void )
212
- {
213
212
return 0 ;
214
213
}
215
214
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ static int init_func_watchdog_init(void)
115
115
# if defined(CONFIG_HW_WATCHDOG ) && (defined(CONFIG_BLACKFIN ) || \
116
116
defined(CONFIG_M68K ) || defined(CONFIG_MICROBLAZE ) || \
117
117
defined(CONFIG_SH ) || defined(CONFIG_AT91SAM9_WATCHDOG ) || \
118
- defined(CONFIG_IMX_WATCHDOG ))
118
+ defined(CONFIG_IMX_WATCHDOG ) || defined( CONFIG_PISTACHIO_WATCHDOG ) )
119
119
hw_watchdog_init ();
120
120
# endif
121
121
puts (" Watchdog enabled\n" );
Original file line number Diff line number Diff line change 21
21
#define CONFIG_PISTACHIO
22
22
#define PISTACHIO_BOARD_NAME CONFIG_SYS_CONFIG_NAME
23
23
#define CONFIG_BOARD_EARLY_INIT_F
24
+ #define CONFIG_BOARD_LATE_INIT
24
25
#define CONFIG_DISPLAY_BOARDINFO
25
26
#define CONFIG_WINBOND_OTP
26
27
#define CONFIG_OF_LIBFDT
233
234
#define CONFIG_TPM_TIS_I2C_SLAVE_ADDRESS 0x20
234
235
#define CONFIG_TPM_TIS_I2C
235
236
#define CONFIG_CMD_TPM
237
+ #define CONFIG_CMD_TPM_TEST
236
238
237
239
/* MMC - Sdhost */
238
240
#define CONFIG_MMC
You can’t perform that action at this time.
0 commit comments