forked from PAWPAW-Mirror/lib_xua
Merge branch 'master' of git://git/apps/sc_usb_audio
This commit is contained in:
@@ -3,11 +3,7 @@
|
|||||||
#include "devicedefines.h"
|
#include "devicedefines.h"
|
||||||
|
|
||||||
#include "xud.h"
|
#include "xud.h"
|
||||||
//#ifdef ARCH_G
|
|
||||||
//#include "XUD_USB_Defines.h"
|
|
||||||
//#else
|
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
//#endif
|
|
||||||
|
|
||||||
#include "dfu_types.h"
|
#include "dfu_types.h"
|
||||||
#include "flash_interface.h"
|
#include "flash_interface.h"
|
||||||
|
|||||||
@@ -250,7 +250,7 @@
|
|||||||
/* Device release number in BCD: 0xJJMN */
|
/* Device release number in BCD: 0xJJMN */
|
||||||
#define BCD_DEVICE_J 6
|
#define BCD_DEVICE_J 6
|
||||||
#define BCD_DEVICE_M 3
|
#define BCD_DEVICE_M 3
|
||||||
#define BCD_DEVICE_N 2
|
#define BCD_DEVICE_N 3
|
||||||
|
|
||||||
#ifndef BCD_DEVICE
|
#ifndef BCD_DEVICE
|
||||||
#define BCD_DEVICE ((BCD_DEVICE_J << 8) | ((BCD_DEVICE_M & 0xF) << 4) | (BCD_DEVICE_N & 0xF))
|
#define BCD_DEVICE ((BCD_DEVICE_J << 8) | ((BCD_DEVICE_M & 0xF) << 4) | (BCD_DEVICE_N & 0xF))
|
||||||
|
|||||||
@@ -10,10 +10,9 @@ unsigned get_tile_id(tileref);
|
|||||||
|
|
||||||
extern tileref tile[];
|
extern tileref tile[];
|
||||||
|
|
||||||
/* Reboots XMOS device by writing to the PLL config register */
|
void device_reboot_aux(void)
|
||||||
void device_reboot_implementation(chanend spare)
|
{
|
||||||
{
|
#if (XUD_SERIES_SUPPORT == 1)
|
||||||
#ifdef XUD_ON_U_SERIES
|
|
||||||
/* Disconnect from bus */
|
/* Disconnect from bus */
|
||||||
unsigned data[] = {4};
|
unsigned data[] = {4};
|
||||||
write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
|
write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
|
||||||
@@ -27,12 +26,6 @@ void device_reboot_implementation(chanend spare)
|
|||||||
unsigned int tileId;
|
unsigned int tileId;
|
||||||
unsigned int tileArrayLength;
|
unsigned int tileArrayLength;
|
||||||
|
|
||||||
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));
|
|
||||||
|
|
||||||
/* Find size of tile array - note in future tools versions this will be available from platform.h */
|
/* Find size of tile array - note in future tools versions this will be available from platform.h */
|
||||||
asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength));
|
asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength));
|
||||||
|
|
||||||
@@ -54,5 +47,17 @@ void device_reboot_implementation(chanend spare)
|
|||||||
read_sswitch_reg(localTileId, 6, pllVal);
|
read_sswitch_reg(localTileId, 6, pllVal);
|
||||||
write_sswitch_reg_no_ack(localTileId, 6, pllVal);
|
write_sswitch_reg_no_ack(localTileId, 6, pllVal);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reboots XMOS device by writing to the PLL config register */
|
||||||
|
void device_reboot_implementation(chanend spare)
|
||||||
|
{
|
||||||
|
#if (XUD_SERIES_SUPPORT != 1)
|
||||||
|
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));
|
||||||
|
#endif
|
||||||
|
device_reboot_aux();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user