From 833be5511e43d590e6c6ebba281b2bbb648f6b92 Mon Sep 17 00:00:00 2001 From: David Lacey Date: Fri, 17 Jan 2014 11:04:33 +0000 Subject: [PATCH 1/4] Refactor reboot code for test harness --- module_usb_audio/reboot.xc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/module_usb_audio/reboot.xc b/module_usb_audio/reboot.xc index 74964d6d..5aa9ba76 100644 --- a/module_usb_audio/reboot.xc +++ b/module_usb_audio/reboot.xc @@ -10,9 +10,7 @@ unsigned get_tile_id(tileref); extern tileref tile[]; -/* Reboots XMOS device by writing to the PLL config register */ -void device_reboot_implementation(chanend spare) -{ +void device_reboot_aux(void) { #ifdef XUD_ON_U_SERIES /* Disconnect from bus */ unsigned data[] = {4}; @@ -27,12 +25,6 @@ void device_reboot_implementation(chanend spare) unsigned int tileId; 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 */ asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength)); @@ -54,5 +46,17 @@ void device_reboot_implementation(chanend spare) read_sswitch_reg(localTileId, 6, pllVal); write_sswitch_reg_no_ack(localTileId, 6, pllVal); #endif - +} + +/* Reboots XMOS device by writing to the PLL config register */ +void device_reboot_implementation(chanend spare) +{ +#ifndef XUD_ON_U_SERIES + 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(); } From 4bdb00388e7c61139fa087f2cbbf7641c505c387 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 17 Jan 2014 11:28:56 +0000 Subject: [PATCH 2/4] manual BCD_DEVICE bump (6.3.2 to 6.3.3) --- module_usb_audio/devicedefines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index 7d12bfd2..0db5f12a 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -250,7 +250,7 @@ /* Device release number in BCD: 0xJJMN */ #define BCD_DEVICE_J 6 #define BCD_DEVICE_M 3 -#define BCD_DEVICE_N 2 +#define BCD_DEVICE_N 3 #ifndef BCD_DEVICE #define BCD_DEVICE ((BCD_DEVICE_J << 8) | ((BCD_DEVICE_M & 0xF) << 4) | (BCD_DEVICE_N & 0xF)) From 6a0ac4e3210d61d760efd62a5a0b9a288fb09f81 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 17 Jan 2014 11:29:23 +0000 Subject: [PATCH 3/4] XUD_ON_U_SERIES updated to XUD_SERIES_SUPPORT --- module_usb_audio/reboot.xc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module_usb_audio/reboot.xc b/module_usb_audio/reboot.xc index 5aa9ba76..ace0b64a 100644 --- a/module_usb_audio/reboot.xc +++ b/module_usb_audio/reboot.xc @@ -10,8 +10,9 @@ unsigned get_tile_id(tileref); extern tileref tile[]; -void device_reboot_aux(void) { -#ifdef XUD_ON_U_SERIES +void device_reboot_aux(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); @@ -51,7 +52,7 @@ void device_reboot_aux(void) { /* Reboots XMOS device by writing to the PLL config register */ void device_reboot_implementation(chanend spare) { -#ifndef XUD_ON_U_SERIES +#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 From 974187439d7294efed2c73873c526335f0cf5fe9 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 17 Jan 2014 11:29:33 +0000 Subject: [PATCH 4/4] Comment tidy only --- module_dfu/src/dfu.xc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/module_dfu/src/dfu.xc b/module_dfu/src/dfu.xc index 28f0e88c..a1a7e4cc 100644 --- a/module_dfu/src/dfu.xc +++ b/module_dfu/src/dfu.xc @@ -3,11 +3,7 @@ #include "devicedefines.h" #include "xud.h" -//#ifdef ARCH_G -//#include "XUD_USB_Defines.h" -//#else #include "usb.h" -//#endif #include "dfu_types.h" #include "flash_interface.h"