Browse Source

minion: Reset chip at initialization

Luke Dashjr 11 years ago
parent
commit
9d27e77a0c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      driver-minion.c

+ 3 - 0
driver-minion.c

@@ -211,6 +211,9 @@ bool minion_init(struct thr_info * const thr)
 		if (!buf[2])
 		if (!buf[2])
 			continue;
 			continue;
 		
 		
+		static const uint8_t resetcmd[4] = {0xff, 0xff, 0xa5, 0xf5};
+		minion_set(spi, chipid, MRA_RESET, resetcmd, sizeof(resetcmd));
+		
 		*chip = (struct minion_chip){
 		*chip = (struct minion_chip){
 			.chipid = chipid,
 			.chipid = chipid,
 			.core_count = buf[2],
 			.core_count = buf[2],