Freer requires outct CT_END negociation in both ways before closing down.

This commit is contained in:
Russell
2012-01-09 16:11:32 +00:00
parent 541ee1af81
commit dd5e086088
3 changed files with 178 additions and 147 deletions

View File

@@ -8,6 +8,7 @@ int write_sswitch_reg_blind(unsigned coreid, unsigned reg, unsigned data);
void device_reboot(chanend spare)
{
outct(spare, XS1_CT_END); // have to do this before freeing the chanend
inct(spare); // Receive end ct from usb_buffer to close down in both directions
// Need a spare chanend so we can talk to the pll register
asm("freer res[%0]"::"r"(spare));
// Need to tell the mapper we have freed one