forked from PAWPAW-Mirror/lib_xua
Remove XS1 support
This commit is contained in:
@@ -38,22 +38,12 @@ static void reset_tile(unsigned const tileId)
|
||||
*/
|
||||
void device_reboot(void)
|
||||
{
|
||||
#if (XUD_SERIES_SUPPORT == 1)
|
||||
/* Disconnect from bus */
|
||||
unsigned data[] = {4};
|
||||
write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
|
||||
|
||||
/* Ideally we would reset SU1 here but then we loose power to the xcore and therefore the DFU flag */
|
||||
/* Disable USB and issue reset to xcore only - not analogue chip */
|
||||
write_node_config_reg(usb_tile, XS1_SU_CFG_RST_MISC_NUM,0b10);
|
||||
#else
|
||||
|
||||
unsigned int localTileId = get_local_tile_id();
|
||||
unsigned int tileId;
|
||||
unsigned int tileArrayLength;
|
||||
unsigned int localTileNum;
|
||||
|
||||
#if (XUD_SERIES_SUPPORT == 4)
|
||||
#if defined(__XS2A__)
|
||||
/* Disconnect from bus */
|
||||
unsigned data[] = {4};
|
||||
write_periph_32(usb_tile, XS2_SU_PERIPH_USB_ID, XS1_GLX_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
|
||||
@@ -75,24 +65,14 @@ void device_reboot(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__XS2A__) || defined(__XS3A__)
|
||||
/* Reset all even tiles, starting from the remote ones */
|
||||
for(int tileNum = tileArrayLength-2; tileNum>=0; tileNum-=2)
|
||||
#else
|
||||
/* Reset all tiles, starting from the remote ones */
|
||||
for(int tileNum = tileArrayLength-1; tileNum>=0; tileNum--)
|
||||
#endif
|
||||
{
|
||||
/* Cannot cast tileref to unsigned! */
|
||||
tileId = get_tile_id(tile[tileNum]);
|
||||
|
||||
/* Do not reboot local tile (or tiles residing on the same node) yet */
|
||||
#if defined(__XS2A__) || defined(__XS3A__)
|
||||
if((localTileNum | 1) != (tileNum | 1))
|
||||
|
||||
#else
|
||||
if(localTileNum != tileNum)
|
||||
#endif
|
||||
{
|
||||
reset_tile(tileId);
|
||||
}
|
||||
@@ -100,7 +80,6 @@ void device_reboot(void)
|
||||
|
||||
/* Finally reboot the node this tile resides on */
|
||||
reset_tile(localTileId);
|
||||
#endif
|
||||
|
||||
while (1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user