diff --git a/lib_xua/api/xua_conf_default.h b/lib_xua/api/xua_conf_default.h index 38db0d98..a1db834c 100644 --- a/lib_xua/api/xua_conf_default.h +++ b/lib_xua/api/xua_conf_default.h @@ -1244,10 +1244,6 @@ enum USBEndpointNumber_Out #define MAX_VOL (0x20000000) -#if defined(SU1_ADC_ENABLE) && (SU1_ADC_ENABLE == 0) -#undef SU1_ADC_ENABLE -#endif - #if defined(LEVEL_METER_LEDS) && !defined(LEVEL_UPDATE_RATE) #define LEVEL_UPDATE_RATE 400000 #endif diff --git a/lib_xua/src/core/buffer/decouple/interrupt.h b/lib_xua/src/core/buffer/decouple/interrupt.h index 1aec8cd9..894ebd49 100644 --- a/lib_xua/src/core/buffer/decouple/interrupt.h +++ b/lib_xua/src/core/buffer/decouple/interrupt.h @@ -72,13 +72,8 @@ //int ksp_enter, ksp_exit, r11_store; -#if defined(__XS2A__) || defined(__XS3A__) #define ISSUE_MODE_SINGLE ".issue_mode single\n" #define ISSUE_MODE_DUAL ".issue_mode dual\n" -#else -#define ISSUE_MODE_SINGLE -#define ISSUE_MODE_DUAL -#endif #define do_interrupt_handler(f,args) \ asm(ISSUE_MODE_SINGLE\ diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index afa1602e..26ef4d39 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -196,14 +196,6 @@ in port p_pdm_mclk = PORT_PDM_MCLK; #endif #endif - - -#if (defined(__XS2A__) && (ADAT_RX)) -/* Cannot use default clock (CLKBLK_REF) for ADAT RX since it is tied to the -60MHz USB clock on XS2 processors. */ -on tile[XUD_TILE] : clock clk_adat_rx = CLKBLK_ADAT_RX; -#endif - on tile[AUDIO_IO_TILE] : clock clk_audio_mclk = CLKBLK_MCLK; /* Master clock */ #if(AUDIO_IO_TILE != XUD_TILE) && XUA_USB_EN @@ -214,15 +206,6 @@ on tile[XUD_TILE] : in port p_mclk_in_usb = PORT_MCLK_IN_USB; on tile[AUDIO_IO_TILE] : clock clk_audio_bclk = CLKBLK_I2S_BIT; /* Bit clock */ - -/* L/G Series needs a port to use for USB reset */ -#if ((defined(__XS2A__) || defined (__XS3A__)) && defined(PORT_USB_RESET)) -/* This define is checked since it could be on a shift reg or similar */ -on tile[XUD_TILE] : out port p_usb_rst = PORT_USB_RESET; -#else -#define p_usb_rst null -#endif - #ifdef IAP /* I2C ports - in a struct for use with module_i2c_shared & module_i2c_simple/module_i2c_single_port */ #ifdef PORT_I2C @@ -443,7 +426,7 @@ void SpdifTxWrapper(chanend c_spdif_tx) } #endif -void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc, +void usb_audio_io(chanend ?c_aud_in, #if (XUA_SPDIF_TX_EN) && (SPDIF_TX_TILE != AUDIO_IO_TILE) chanend c_spdif_tx, #endif @@ -571,11 +554,6 @@ int main() chan c_ea_data; #endif #endif -#ifdef SU1_ADC_ENABLE - chan c_adc; -#else -#define c_adc null -#endif #ifdef MIXER chan c_mix_ctl; @@ -659,7 +637,7 @@ int main() on tile[AUDIO_IO_TILE]: { - usb_audio_io(c_mix_out, c_adc + usb_audio_io(c_mix_out #if (XUA_SPDIF_TX_EN) && (SPDIF_TX_TILE != AUDIO_IO_TILE) , c_spdif_tx #endif @@ -725,11 +703,6 @@ int main() { set_thread_fast_mode_on(); -#if defined(__XS2A__) - /* Can't use REF clock as this is usb clock */ - set_port_clock(p_adat_rx, clk_adat_rx); - start_clock(clk_adat_rx); -#endif while (1) { adatReceiver48000(p_adat_rx, c_adat_rx); @@ -765,11 +738,6 @@ int main() #endif /*MIC_PROCESSING_USE_INTERFACE*/ #endif /*XUA_NUM_PDM_MICS > 0*/ #endif /*PDM_RECORD*/ - - -#ifdef SU1_ADC_ENABLE - xs1_su_adc_service(c_adc); -#endif } return 0; diff --git a/lib_xua/src/core/mixer/fastmix.S b/lib_xua/src/core/mixer/fastmix.S index c8828a38..9f298115 100644 --- a/lib_xua/src/core/mixer/fastmix.S +++ b/lib_xua/src/core/mixer/fastmix.S @@ -1,13 +1,9 @@ // Copyright 2018-2021 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. -//#include "devicedefines.h" #define MAX_MIX_COUNT 8 #define MIX_INPUTS 18 - -#if defined(__XS2A__) || defined(__XS3A__) - #define DOMIX_TOP(i) \ .cc_top doMix##i.function,doMix##i; \ .align 4 ;\ @@ -50,52 +46,6 @@ doMix##i##: ;\ .size doMix##i, .-doMix##i; \ .cc_bottom doMix##i##.function; -#else - - -#define DOMIX_TOP(i) \ -.cc_top doMix##i.function,doMix##i; \ - .align 4 ;\ -.globl doMix##i ;\ -.type doMix##i, @function ;\ -.globl doMix##i##.nstackwords ;\ -.globl doMix##i##.maxthreads ; \ -.globl doMix##i##.maxtimers ; \ -.globl doMix##i##.maxchanends ; \ -.globl doMix##i##.maxsync ;\ -.linkset doMix##i##.locnoside, 1; \ -.linkset doMix##i##.locnochandec, 1;\ -.linkset doMix##i##.nstackwords, 0 ;\ -.linkset doMix##i##.maxchanends, 0 ;\ -.linkset doMix##i##.maxtimers, 0 ;\ -.linkset doMix##i##.maxthreads, 1; \ -doMix##i##: ;\ - set cp, r0; \ - set dp, r1; \ - lsub r0, r1, r0, r0, r0;\ - .label_##i##: - -#define DOMIX_BOT(i) \ - ldap r11, _dp; \ - set dp, r11;\ - ldap r11, _cp;\ - set cp, r11;\ -\ - mov r0, r1;\ - ldc r2, 0x19;\ - sext r0, r2;\ - eq r0, r0, r1;\ - bf r0, .L20; \ -\ - shl r0, r1, 0x7;\ - retsp 0x0;\ -\ -\ -.size doMix##i, .-doMix##i; \ -.cc_bottom doMix##i##.function; - -#endif - #define N MIX_INPUTS #define BODY(i) \ ldw r2,cp[i]; \ @@ -115,8 +65,6 @@ doMix##i##: ;\ retsp 0x0; \ - - #if(MAX_MIX_COUNT > 0) DOMIX_TOP(0) #include "repeat.h" diff --git a/lib_xua/src/core/ports/audioports.xc b/lib_xua/src/core/ports/audioports.xc index 330b7f96..1f40b89e 100644 --- a/lib_xua/src/core/ports/audioports.xc +++ b/lib_xua/src/core/ports/audioports.xc @@ -62,37 +62,12 @@ unsigned int divide, unsigned curSamFreq) } #endif -#if defined(__XS2A__) || defined(__XS3A__) unsafe { /* Clock bitclock clock block from master clock pin (divided) */ configure_clock_src_divide(clk_audio_bclk, (port) p_mclk_in, (divide/2)); configure_port_clock_output(p_bclk, clk_audio_bclk); } -#else - #error XS1 no longer supported in audio core - /* For a divide of one (i.e. bitclock == master-clock) BClk is set to clock_output mode. - * In this mode it outputs an edge clock on every tick of itsassociated clock_block. - * - * For all other divides, BClk is clocked by the master clock and data - * will be output to p_bclk to generate the bit clock. - */ - if (divide == 1) /* e.g. 176.4KHz from 11.2896 */ - { - configure_port_clock_output(p_bclk, clk_audio_mclk); - - /* Generate bit clock block straight from mclk */ - configure_clock_src(clk_audio_bclk, p_mclk_in); - } - else - { - /* bit clock port from master clock clock-clock block */ - configure_out_port_no_ready(p_bclk, clk_audio_mclk, 0); - - /* Generate bit clock block from pin */ - configure_clock_src(clk_audio_bclk, p_bclk); - } -#endif if(!isnull(p_lrclk)) { diff --git a/lib_xua/src/core/support/reboot.xc b/lib_xua/src/core/support/reboot.xc index e3f4eb2a..7c78928e 100644 --- a/lib_xua/src/core/support/reboot.xc +++ b/lib_xua/src/core/support/reboot.xc @@ -38,8 +38,6 @@ void device_reboot(void) /* 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); -#elif defined(__XS3A__) - #warning Assuming that tile reset also resets USB in XS3 architectures #endif tileArrayLength = sizeof(tile)/sizeof(tileref); diff --git a/lib_xua/src/dfu/dfu.xc b/lib_xua/src/dfu/dfu.xc index 43064281..849f4e28 100644 --- a/lib_xua/src/dfu/dfu.xc +++ b/lib_xua/src/dfu/dfu.xc @@ -11,11 +11,12 @@ #include "flash_interface.h" #include "dfu_interface.h" -#if defined(__XS3A__) -#define FLAG_ADDRESS 0xfffcc -#elif defined(__XS2A__) +#if defined(__XS2A__) /* Note range 0x7FFC8 - 0x7FFFF guarenteed to be untouched by tools */ #define FLAG_ADDRESS 0x7ffcc +#else +/* Note range 0xFFFC8 - 0xFFFFF guarenteed to be untouched by tools */ +#define FLAG_ADDRESS 0xfffcc #endif /* Store Flag to fixed address */