 +	int cs_line;
 +	int board_id;
 +
+=======
+-	if (config_options.override_chip_num > 0 &&
+-	    a1->num_chips > config_options.override_chip_num) {
+-		a1->num_active_chips = config_options.override_chip_num;
++	if (A1_config_options.override_chip_num > 0 &&
++	    a1->num_chips > A1_config_options.override_chip_num) {
++		a1->num_active_chips = A1_config_options.override_chip_num;
+ 		applog(LOG_WARNING, "%d: limiting chain to %d chips",
+-		       a1->board_id, a1->num_active_chips);
++		       a1->chain_id, a1->num_active_chips);
+ 	}
+ 
+ 	a1->chips = calloc(a1->num_active_chips, sizeof(struct A1_chip));
+@@ -790,7 +704,7 @@ struct A1_chain *init_A1_chain(struct spi_ctx *ctx, int board_id)
+ 		check_chip(a1, i);
+ 
+ 	applog(LOG_WARNING, "%d: found %d chips with total %d active cores",
+-	       a1->board_id, a1->num_active_chips, a1->num_cores);
++	       a1->chain_id, a1->num_active_chips, a1->num_cores);
+ 
+ 	mutex_init(&a1->lock);
+ 	INIT_LIST_HEAD(&a1->active_wq.head);
+@@ -802,55 +716,127 @@ failure:
+ 	return NULL;
+ }
+ 
+-static bool A1_detect_one_chain(struct spi_config *cfg)
++
++bool detect_coincraft_desk(void)
+ {
+-	struct cgpu_info *cgpu;
+-	int board_id;
++	static const uint8_t mcp4x_mapping[] = { 0x2c, 0x2b, 0x2a, 0x29, 0x28 };
++	board_selector = ccd_board_selector_init();
++	if (board_selector == NULL) {
++		applog(LOG_ERR, "No CoinCrafd Desk backplane detected.");
++		return false;
++	}
++	board_selector->reset_all();
+ 
+-	for (board_id = 0; board_id < MAX_BOARDS; board_id++) {
+-		struct spi_ctx *ctx = spi_init(cfg);
++	struct spi_config cfg = default_spi_config;
++	cfg.mode = SPI_MODE_1;
++	cfg.speed = A1_config_options.spi_clk_khz * 1000;
++	struct spi_ctx *spi = spi_init(&cfg);
++	if (spi == NULL)
++		return false;
+ 
+-		if (ctx == NULL)
+-			return false;
++	int boards_detected = 0;
++	int board_id;
++	for (board_id = 0; board_id < CCD_MAX_CHAINS; board_id++) {
++		uint8_t mcp_slave = mcp4x_mapping[board_id];
++		struct mcp4x *mcp = mcp4x_init(mcp_slave);
++		if (mcp == NULL)
++			continue;
++
++		if (A1_config_options.wiper != 0)
++			mcp->set_wiper(mcp, 0, A1_config_options.wiper);
+ 
+ 		applog(LOG_WARNING, "checking board %d...", board_id);
+-		a1_board_selector_select_board(board_id);
+-//		a1_board_selector_reset_board();
++		board_selector->select(board_id);
++
++		struct A1_chain *a1 = init_A1_chain(spi, board_id);
++		board_selector->release();
++		if (a1 == NULL)
++			continue;
++
++		struct cgpu_info *cgpu = malloc(sizeof(*cgpu));
++		assert(cgpu != NULL);
++
++		memset(cgpu, 0, sizeof(*cgpu));
++		cgpu->drv = &bitmineA1_drv;
++		cgpu->name = "BitmineA1.CCD";
++		cgpu->threads = 1;
++
++		cgpu->device_data = a1;
++
++		a1->cgpu = cgpu;
++		a1->trimpot = mcp;
++		add_cgpu(cgpu);
++		boards_detected++;
++	}
++	if (boards_detected == 0) {
++		spi_exit(spi);
++		return false;
++	}
++	applog(LOG_WARNING, "Detected CoinCraft Desk with %d boards",
++	       boards_detected);
++	return true;
++}
++
++bool detect_coincraft_rig_v3(void)
++{
++	board_selector = ccr_board_selector_init();
++	if (board_selector == NULL)
++		return false;
++
++	struct spi_config cfg = default_spi_config;
++	cfg.mode = SPI_MODE_1;
++	cfg.speed = A1_config_options.spi_clk_khz * 1000;
++	struct spi_ctx *spi[2];
++	spi[0]= spi_init(&cfg);
++	cfg.cs_line = 1;
++	spi[1]= spi_init(&cfg);
+ 
+-		struct A1_chain *a1 = init_A1_chain(ctx, board_id);
+-		unlock_board_selector();
++	if (spi[0] == NULL || spi[1] == 0)
++		return false;
++
++
++	board_selector->reset_all();
++	int chains_detected = 0;
++	int c;
++	for (c = 0; c < CCR_MAX_CHAINS; c++) {
++		applog(LOG_WARNING, "checking RIG chain %d...", c);
++
++		board_selector->select(c);
++		struct A1_chain *a1 = init_A1_chain(spi[c & 1], c);
++		board_selector->release();
+ 		if (a1 == NULL)
+ 			continue;
+ 
+-		cgpu = malloc(sizeof(*cgpu));
++		struct cgpu_info *cgpu = malloc(sizeof(*cgpu));
+ 		assert(cgpu != NULL);
+ 
+ 		memset(cgpu, 0, sizeof(*cgpu));
+ 		cgpu->drv = &bitmineA1_drv;
+-		cgpu->name = "BitmineA1";
++		cgpu->name = "BitmineA1.CCR";
+ 		cgpu->threads = 1;
+ 
+ 		cgpu->device_data = a1;
+ 
+ 		a1->cgpu = cgpu;
+ 		add_cgpu(cgpu);
++		chains_detected++;
+ 	}
++	if (chains_detected == 0)
++		return false;
++
++	applog(LOG_WARNING, "Detected CoinCraft Rig with %d chains",
++	       chains_detected);
+ 	return true;
+ }
+ 
+-#define MAX_SPI_BUS	1
+-#define MAX_SPI_CS	1
+ /* Probe SPI channel and register chip chain */
+ void A1_detect(bool hotplug)
+ {
+-	int bus;
+-	int cs_line;
+-	int board_id;
+-
+>>>>>>> Stashed changes
  	/* no hotplug support for now */
  	if (hotplug)
  		return;
  
+<<<<<<< Updated upstream
 -	/* parse bimine-a1-options */
  	if (opt_bitmine_a1_options != NULL && parsed_config_options == NULL) {
  		int ref_clk = 0;

diff --git a/A1-board-selector-CCD.c b/A1-board-selector-CCD.c
deleted file mode 100644
index d9c8528..0000000
--- a/A1-board-selector-CCD.c

-- driver-avalon2: this functions used on detect, which don't have thr setup yet
-
-
=======
index eec6a3d..43b63e2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,45 @@
+Version 4.3.3 - 3rd May 2014
+
+- Fix typo
+- Work should be freed when aged, fixing a massive memory leak for bxf devices
+- miner.php fix single rig summary/config field formatting
+- miner.php fix single rig total formatting
+
+
+Version 4.3.2 - 2nd May 2014
+
+- Fix accounting bug with nrolltime drivers
+
+
+Version 4.3.1 - 2nd May 2014
+
+- upgrade some int to int64_t to avoid overflows in reporting
+- Make reconnection messages more explanatory
+- Stratum client.reconnect require matching URL
+- Fix memory leak in submit_noffset_nonce
+- Clean up any work that may not have been used in the work scheduler
+- Avoid unnecessary deref now that it's done within discard_work
+- Clean work pointers after one way usage functions
+- Avoid unnecessary total_work_inc in generating local work
+- Cosmetic fixes
+- Fix idle bug, when redirected client can't auth
+- Rename spond temp rate to asics total rate
+- Build fixes
+- Set the unique id only for usb devices with serial strings longer than 4 chars
+long
+- Use usb serial strings as unique id if devices have them
+- Discretely identify the onestring miners as OSM
+- Add bxf debugging option and osm led modes
+- A1: modularize board selector / add initial CCR support
+- A1: cleanup tca9535 logging
+- A1: fix and extend PLL parameters
+- A1: clean up compile warnings
+- A1: use real level in hexdump
+- Add identification for onestring miner variants
+- Avalon2: Parser the power good signal
+- driver-avalon2: this functions used on detect, which don't have thr setup yet
+
+
>>>>>>> Stashed changes
 Version 4.3.0 - 18th April 2014
 
 - Put sleep in spond hash instead of queue full function
diff --git a/README b/README
<<<<<<< Updated upstream
index c3eb8d6..7cd8478 100644
--- a/README
+++ b/README
